﻿/* DASHBOARD LAYOUT v4.0 */

        /* Scoreboard Header */
        .scoreboard {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: linear-gradient(135deg, rgba(0, 209, 193, 0.15), rgba(30, 41, 59, 0.8));
            border: 1px solid rgba(0, 209, 193, 0.3);
            border-radius: 12px;
            padding: 12px 24px;
            margin-bottom: 16px;
        }

        .score-main {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .score-label {
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #94a3b8;
        }

        .score-value {
            font-size: 2rem;
            font-weight: 800;
            color: #22d3ee;
            text-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
        }

        .score-waste {
            font-size: 0.65rem;
            color: #64748b;
        }

        .score-stats {
            display: flex;
            gap: 32px;
        }

        .score-stat {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }

        .stat-num {
            font-size: 1.4rem;
            font-weight: 700;
            color: #f8fafc;
        }

        .stat-lbl {
            font-size: 0.65rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #64748b;
        }

        /* ===== UNIFIED CALCULATOR CONSOLE ===== */
        .calculator-console {
            border: 1px solid #334155;
            border-radius: 12px;
            overflow: hidden;
            background: #1e293b;
        }

        .console-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
            border-bottom: 1px solid #334155;
        }

        .console-grid {
            display: grid;
            grid-template-columns: 1fr 1.15fr 1fr;
            /* No gaps - using internal borders */
        }

        .console-column {
            padding: 16px;
            border-right: 1px solid #334155;
            background: var(--surface);
            /* Stretch to match tallest column */
            align-self: stretch;
        }

        .console-column:last-child {
            border-right: none;
        }

        .column-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #94a3b8;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border);
        }

        /* Compact Settings Grid */
        .settings-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .input-group-compact {
            margin-bottom: 0;
        }

        .input-group-compact label {
            margin-bottom: 4px;
            font-size: 0.7rem;
        }

        .input-group-compact select,
        .input-group-compact input {
            padding: 8px 10px;
            font-size: 0.85rem;
        }

        .input-group-compact .stepper-control {
            height: 36px;
        }

        .checkbox-label-inline {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            color: #94a3b8;
            cursor: pointer;
            height: 100%;
            padding-top: 18px;
        }

        .checkbox-label-inline input {
            width: 14px;
            height: 14px;
        }

        /* Custom Tile Row */
        .custom-tile-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 10px 0;
        }

        .custom-tile-row input {
            flex: 1;
            padding: 8px;
            font-size: 0.85rem;
        }

        .custom-tile-row span {
            color: #64748b;
            font-weight: 600;
        }

        /* Compact Panel-Specific Styling */
        .panel-geometry .area-manager-section {
            margin-bottom: 12px;
            padding: 10px;
        }

        .panel-geometry .area-list-container {
            max-height: 120px;
        }

        .panel-geometry .shape-selector {
            margin-bottom: 12px;
            gap: 8px;
        }

        .panel-geometry .shape-card {
            padding: 10px 6px;
        }

        .panel-geometry .shape-icon {
            font-size: 1.2rem;
            margin-bottom: 4px;
        }

        .panel-geometry .shape-label {
            font-size: 0.65rem;
        }

        /* Compact Dimension Inputs */
        .panel-geometry .dual-input-row {
            gap: 10px;
        }

        .panel-geometry .input-group {
            margin-bottom: 10px;
        }

        .panel-geometry .dual-input {
            margin-top: 4px;
        }

        .panel-geometry .input-group label {
            font-size: 0.7rem;
            margin-bottom: 4px;
        }

        /* Visualizer Compact */
        .panel-output .visualizer-container {
            height: 160px;
            margin-bottom: 12px;
        }

        .panel-output .preview-header-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
            margin-bottom: 8px;
        }

        .panel-output .visual-controls {
            flex-wrap: wrap;
            gap: 6px;
        }

        .panel-output .materials-checklist-card {
            padding: 12px;
        }

        .panel-output .checklist-header {
            font-size: 0.75rem;
            margin-bottom: 8px;
        }

        /* Responsive */
        @media (max-width: 1100px) {
            .dashboard-grid {
                grid-template-columns: 1fr 1fr;
            }

            .panel-output {
                grid-column: span 2;
            }
        }

        @media (max-width: 768px) {
            .dashboard-grid {
                grid-template-columns: minmax(0, 1fr);
                    overflow: hidden;
            }

            .panel-output {
                grid-column: auto;
            }

            .scoreboard {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }
        }

        /* ===== COMPACT MEASUREMENT INPUTS ===== */
        .compact-measure-row {
            display: flex;
            gap: 16px;
            margin-bottom: 12px;
        }

        .measure-group {
            flex: 1;
        }

        .measure-label {
            display: block;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #94a3b8;
            margin-bottom: 6px;
        }

        .measure-inputs {
            display: flex;
            gap: 6px;
        }

        .input-with-unit {
            flex: 1;
            position: relative;
        }

        .input-with-unit input {
            width: 100%;
            padding: 8px 28px 8px 10px;
            font-size: 0.9rem;
            background: rgba(15, 23, 42, 0.5);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
        }

        .input-with-unit input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 2px var(--accent-glow);
            outline: none;
        }

        .unit-suffix {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.7rem;
            font-weight: 600;
            color: #64748b;
            pointer-events: none;
        }

        /* ===== L-SHAPE HORIZONTAL LAYOUT ===== */
        .l-shape-horizontal {
            display: flex;
            gap: 12px;
            margin-bottom: 12px;
        }

        .l-shape-horizontal .l-shape-diagram {
            flex: 0 0 80px;
            width: 80px;
            height: 80px;
        }

        .l-shape-horizontal .mini-wireframe {
            width: 100%;
            height: 100%;
        }

        .wireframe-path {
            fill: none;
            stroke: #22d3ee;
            stroke-width: 2;
        }

        .wireframe-label {
            fill: #f8fafc;
            font-size: 12px;
            font-weight: 700;
            text-anchor: middle;
        }

        .l-shape-grid {
            flex: 1;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .l-input-cell label {
            display: block;
            font-size: 0.65rem;
            font-weight: 700;
            color: #22d3ee;
            margin-bottom: 3px;
        }

        .l-input-row {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .l-input-row input {
            width: 40px;
            padding: 5px 4px;
            font-size: 0.8rem;
            text-align: center;
            background: rgba(15, 23, 42, 0.5);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text-primary);
        }

        .l-input-row span {
            font-size: 0.6rem;
            color: #64748b;
            font-weight: 600;
        }

        /* ===== ADD AREA ROW ===== */
        .add-area-row {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-bottom: 12px;
            padding: 10px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
        }

        .add-area-row .type-toggle {
            flex: 0 0 auto;
        }

        .toggle-container-sym.compact {
            padding: 2px;
        }

        .toggle-container-sym.compact .toggle-btn-sym {
            padding: 5px 8px;
            font-size: 0.7rem;
        }

        /* ===== ADD AREA CONTROLS (Reorganized) ===== */
        .add-area-controls {
            margin-bottom: 12px;
            padding: 10px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
        }

        .add-settings-row {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-bottom: 10px;
        }

        .add-settings-row .name-input {
            flex: 1;
            min-width: 0;
            padding: 8px 10px;
            font-size: 0.8rem;
            background: rgba(15, 23, 42, 0.5);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text-primary);
        }

        .add-settings-row .type-toggle {
            flex: 0 0 auto;
        }

        .btn-add-area-full {
            width: 100%;
            padding: 10px 14px;
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            background: linear-gradient(135deg, #22d3ee, #06b6d4);
            color: #0f172a;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-add-area-full:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(34, 211, 238, 0.4);
        }

        /* ===== GRID PREVIEW EMPTY STATE ===== */
        .grid-empty-state {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            min-height: 120px;
            color: #64748b;
            font-size: 0.75rem;
            text-align: center;
            font-style: italic;
        }

        /* ===== AREA LIST SECTION ===== */
        .area-list-section {
            margin-top: 8px;
            padding-top: 10px;
            border-top: 1px solid var(--border);
        }

        .area-list-header {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #64748b;
            margin-bottom: 8px;
        }

        .area-total {
            color: #22d3ee;
            font-weight: 700;
        }

        .area-list-container {
            max-height: 80px;
            overflow-y: auto;
        }

        /* ===== SHOPPING LIST - RECEIPT ROW LAYOUT ===== */
        .shopping-list {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .shopping-row {
            display: flex;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .shopping-row:last-child {
            border-bottom: none;
        }

        .row-icon {
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            flex-shrink: 0;
            font-size: 1rem;
        }

        .row-details {
            flex: 1;
            min-width: 0;
        }

        .row-name {
            font-weight: 600;
            font-size: 0.8rem;
            color: #f8fafc;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .row-desc {
            font-size: 0.65rem;
            color: #94a3b8;
            /* Increased contrast */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .row-qty {
            width: 55px;
            /* Fixed width for alignment */
            text-align: right;
            padding-left: 8px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }

        .qty-num {
            font-size: 1.1rem;
            font-weight: 800;
            /* Bolder for visibility */
            color: #f8fafc;
            line-height: 1.1;
        }

        .qty-unit {
            font-size: 0.55rem;
            color: #94a3b8;
            /* Increased contrast */
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        /* Scrollbar clearance for shopping list */
        .shopping-list {
            padding-right: 8px;
            scrollbar-gutter: stable;
        }

        /* ===== GRID PREVIEW CLEANUP ===== */
        .panel-output .pattern-preview-section {
            background: transparent;
            border: none;
            padding: 0;
        }
/* ========================================
   TILE CALCULATOR - CALCULOVER PRO v3.0
   Modern "Deep Slate" Design System
   Premium SaaS Aesthetic
   ======================================== */

:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --accent: #00D1C1;
    --accent-glow: rgba(0, 209, 193, 0.35);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --spacing: 25px;
}

/* --- GLOBAL RESET --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    background-image: linear-gradient(rgba(0, 209, 193, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 209, 193, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* --- NAVIGATION --- */
.glass-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    padding: 0 30px;
    background: rgba(5, 5, 16, 0.95);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    backdrop-filter: blur(10px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.nav-logo {
    height: 65px;
    width: auto;
    filter: drop-shadow(0 0 3px #bc13fe) brightness(1.2);
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-links-container {
    flex: 1 1 0px;
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: 40px;
    overflow-x: auto;
    white-space: nowrap;
    padding-right: 60px;
    mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-links-container::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: #8888aa;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-link:hover {
    color: #fff;
    text-shadow: 0 0 8px #00f3ff;
}

/* --- MAIN LAYOUT (Wide & Compact) --- */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-title {
    margin-top: 20px;
    margin-bottom: 5px;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    text-align: center;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.calculator-wrapper {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* --- CARDS --- */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--spacing);
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(10px);
}

.card-header-cyan,
.card-header-purple {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    width: 100%;
}

/* --- CUSTOM WALL MANAGER --- */
.custom-wall-manager {
    background: rgba(15, 23, 42, 0.4);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 15px;
}

.wall-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.wall-tag {
    background: rgba(0, 209, 193, 0.1);
    border: 1px solid rgba(0, 209, 193, 0.3);
    color: #00D1C1;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wall-tag button {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

/* --- INPUTS (v3.0) --- */
.input-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dual-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dual-input {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.dual-input span {
    position: absolute;
    right: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
}

/* --- SEGMENTED CONTROL (v3.0) --- */
.segmented-control {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.segment-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.segment-btn.active {
    background: var(--surface);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- SHAPE SELECTOR CARDS --- */
.shape-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.shape-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shape-card:hover {
    border-color: rgba(0, 209, 193, 0.4);
    background: rgba(30, 41, 59, 0.8);
}

.shape-card.active {
    border-color: var(--accent);
    background: rgba(0, 209, 193, 0.1);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.shape-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
}

.shape-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.shape-card.active .shape-label {
    color: #fff;
}

/* --- STEPPER CONTROL (Missing Component) --- */
.stepper-control {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2px;
    height: 42px;
    /* Fixed height matching other inputs */
    width: 100%;
}

.stepper-btn {
    width: 36px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.stepper-btn:hover {
    background: rgba(0, 209, 193, 0.1);
    border-radius: 8px;
    color: #fff;
}

input.stepper-input {
    flex: 1;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    padding: 0;
    height: 100%;
    width: 100%;
}

/* --- COMPACT INPUT GRID (v3.0) --- */
.compact-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.compact-input-grid input:focus,
.compact-input-grid select:focus {
    outline: none;
    border-color: #00f3ff;
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.4);
}

.std-input-sm {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    padding: 2px 8px;
    padding-right: 24px;
    height: 26px;
    min-width: 120px;
    cursor: pointer;
}

.std-input-sm:focus {
    outline: none;
    border-color: #00f3ff;
}

.full-span-mobile {
    grid-column: span 2;
}

.toggle-container {
    display: flex;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.toggle-option {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-size: 0.9rem;
    color: #888;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.toggle-option.active {
    background: #00f3ff;
    color: #050510;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

/* --- AREA LIST --- */
.area-list-container {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.area-manager-section {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.area-list-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Standard Inputs Area */
.add-area-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.add-area-top-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.area-name-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dual-unit-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.input-col-dual {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dual-input-group {
    display: flex;
    align-items: center;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    height: 38px;
    padding: 0 4px;
}

input.dual-input-inner {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.95rem;
    width: 40px;
    text-align: center;
    padding: 0;
    height: 100%;
}

input.dual-input-inner:focus {
    box-shadow: none;
}

.unit-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 2px;
}

.new-area-inputs {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.input-col {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.input-label-sm {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 4px;
    font-weight: 600;
}

.std-input {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    height: 38px;
    transition: all 0.2s;
}

.std-input:focus {
    border-color: #00f3ff;
    outline: none;
    background: #0f172a;
}

.x-divider-lg {
    color: #64748b;
    font-size: 1.2rem;
    padding-bottom: 6px;
}

.btn-primary-add {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #0f172a;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 20px;
    height: 38px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.btn-primary-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

/* Area Type Toggles */
.area-type-toggle {
    display: flex;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 3px;
    height: 38px;
    align-items: center;
}

.area-type-toggle-segment {
    flex: 1;
    text-align: center;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.2s;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.area-type-btn {
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.2s;
    height: 100%;
    display: flex;
    align-items: center;
}

.area-type-btn.active[data-type="add"] {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    font-weight: 600;
}

.toggle-btn-sym.active[data-type="subtract"] {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

/* Area List Items */
.area-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.4);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #94a3b8;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.area-item:hover {
    background: rgba(30, 41, 59, 0.8);
}

.area-item.area-main {
    border-left-color: #c084fc;
}

.area-item.area-add {
    border-left-color: #22d3ee;
}

.area-item.area-subtract {
    border-left-color: #f87171;
}

.area-name {
    font-size: 0.85rem;
    color: #e2e8f0;
    width: 35%;
}

.area-dims {
    font-size: 0.8rem;
    color: #94a3b8;
    width: 30%;
    text-align: center;
}

.area-sqft {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #ffffff;
    width: 25%;
    text-align: right;
}

.area-actions {
    display: flex;
    gap: 10px;
    width: 15%;
    justify-content: flex-end;
}

.btn-remove-area,
.btn-edit-area {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: all 0.2s;
    padding: 0;
}

.btn-remove-area:hover,
.btn-edit-area:hover {
    opacity: 1;
    transform: scale(1.1);
}

.btn-update {
    background: linear-gradient(135deg, #fbbf24, #d97706);
}

/* Tooltip */
.info-tooltip {
    cursor: help;
    font-size: 0.8rem;
    margin-left: 4px;
    opacity: 0.7;
}

.info-tooltip:hover {
    opacity: 1;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid #00f3ff;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-in 2.5s forwards;
    pointer-events: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-msg {
    font-size: 0.9rem;
    font-weight: 500;
}

.warning-icon {
    font-size: 1.2rem;
}

/* --- DASHBOARD RESULTS --- */
.result-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* --- PROJECT SUMMARY CARD --- */
.project-summary-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(188, 19, 254, 0.2);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.project-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #bc13fe, #00f3ff);
}

.summary-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.summary-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #94a3b8;
    text-transform: uppercase;
}

/* PDF Export Button */
.btn-export-pdf {
    background: linear-gradient(135deg, rgba(188, 19, 254, 0.2), rgba(0, 243, 255, 0.2));
    border: 1px solid rgba(188, 19, 254, 0.4);
    color: #e2e8f0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-export-pdf:hover {
    background: linear-gradient(135deg, rgba(188, 19, 254, 0.4), rgba(0, 243, 255, 0.4));
    border-color: #bc13fe;
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.3);
    transform: translateY(-1px);
}

/* Two-Column Summary Layout */
.summary-two-col {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.summary-col-left {
    display: flex;
    flex-direction: column;
}

.summary-col-divider {
    width: 1px;
    height: 80px;
    background: rgba(148, 163, 184, 0.2);
}

.summary-col-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-details-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

/* Cost Section */
.summary-cost-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
    margin-top: 5px;
}

.cost-label {
    font-size: 0.75rem;
    color: #cbd5e1;
    text-transform: uppercase;
    font-weight: 600;
}

.cost-value-hero {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 0 20px rgba(188, 19, 254, 0.3);
}

.summary-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
    margin: 10px 0;
    width: 100%;
}

/* --- STATS GRID (Missing Component) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
    background: rgba(15, 23, 42, 0.3);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

/* Compact Cost Breakdown */
.cost-breakdown-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.cost-item-sm {
    display: flex;
    gap: 5px;
}

.cost-val-sm {
    color: #e2e8f0;
    font-weight: 600;
}

/* Details Grid (Bottom) */
.summary-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-col {
    display: flex;
    flex-direction: column;
}

.detail-val-hero {
    font-size: 2.2rem;
    font-weight: 800;
    color: #00f3ff;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.detail-val-sub {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.2;
    padding-top: 8px;
}

.detail-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    font-weight: 600;
}

/* Progress Bar */
.progress-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar-container {
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 2px;
}

.progress-segment-used {
    height: 100%;
    background: #00f3ff;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.progress-segment-spares {
    height: 100%;
    background: #bc13fe;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.spares-text {
    color: #e2e8f0;
    font-weight: 600;
}

/* --- BENTO GRID LAYOUT --- */
.bento-split-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: stretch;
    min-height: 230px;
}

@media (max-width: 768px) {
    .bento-split-row {
        flex-direction: column;
    }
}

/* --- MATERIALS CHECKLIST --- */
.materials-checklist-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: 300px;
    overflow-y: auto;
}

.checklist-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    padding-bottom: 10px;
    margin-top: -5px;
    padding-top: 5px;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #cbd5e1;
    border-bottom: 1px solid #334155;
    padding-bottom: 15px;
}

.checklist-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.check-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-icon {
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.check-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.check-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.check-label {
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.affiliate-link {
    font-size: 0.65rem;
    color: #00f3ff;
    text-decoration: none;
    background: rgba(0, 243, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.affiliate-link:hover {
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.check-sub {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 400;
}

.check-value {
    font-weight: 700;
    color: #22d3ee;
    font-size: 1.1rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 10px;
}

/* --- PATTERN PREVIEW (Bento Right) --- */
.pattern-preview-section {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.preview-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    height: 30px;
}

.preview-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Symmetrical Header Toggle */
.toggle-container-sym {
    display: flex;
    background: #0f172a;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid #334155;
    width: 140px;
    height: 28px;
    align-items: center;
}

/* Color Selector Group */
.color-selector {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 10px;
}

.color-label {
    font-size: 0.6rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.visual-controls {
    display: flex;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.toggle-btn-sym {
    flex: 1;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn-sym.active {
    background: #22d3ee;
    color: #0f172a;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.visually-hidden {
    display: none;
}

/* Helper */
.visualizer-container {
    width: 100%;
    height: auto;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 5px;
    /* Blueprint grid background */
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.visualizer-container.compact-viz {
    height: 180px;
    min-height: 0;
}

#room-visualizer {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    cursor: crosshair;
}

.visualizer-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 8px;
    text-align: center;
    font-style: italic;
}

/* --- FAQ --- */
.faq-section {
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 50px;
}

.faq-header {
    text-align: center;
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.faq-divider {
    height: 1px;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 30px auto;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
}

details {
    background: #0a0b1e;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #333;
}

summary {
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #ddd;
}

details[open] summary {
    border-bottom: 1px solid #333;
}

details p {
    padding: 15px;
    margin: 0;
    line-height: 1.5;
    color: #ccc;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .calculator-wrapper {
        flex-direction: column;
    }

    .compact-input-grid {
        grid-template-columns: minmax(0, 1fr);
            overflow: hidden;
    }

    .full-span-mobile {
        grid-column: span 1;
    }

    .add-area-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .add-area-top-row {
        flex-direction: column;
        gap: 10px;
    }

    .area-type-toggle-segment {
        width: 100%;
    }

    .toggle-container-sym {
        width: 100%;
    }

    .summary-two-col {
        grid-template-columns: minmax(0, 1fr);
            overflow: hidden;
        gap: 20px;
    }

    .summary-col-divider {
        width: 100%;
        height: 1px;
    }

    .visual-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Mobile Touch Targets */
    .dual-input {
        min-height: 44px;
        font-size: 1rem;
    }

    .dual-input-group {
        height: 48px;
    }

    .btn-primary-add {
        min-height: 48px;
        padding: 12px 24px;
    }
}

/* --- PRINT STYLESHEET --- */
@media print {
    body {
        background: white;
        color: black;
    }

    .glass-navbar,
    .faq-section,
    .btn-export-pdf,
    .btn-primary-add,
    .area-type-toggle-segment,
    .new-area-inputs,
    .add-area-top-row,
    .toggle-container-sym,
    .visual-controls,
    #room-visualizer {
        display: none !important;
    }

    .calculator-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .project-summary-card,
    .materials-checklist-card,
    .pattern-preview-section {
        background: white;
        border: 1px solid #ccc;
    }

    .cost-value-hero {
        color: #000;
        text-shadow: none;
        font-size: 2.5rem;
    }

    .detail-val-hero {
        color: #333;
        text-shadow: none;
    }

    .check-value {
        color: #333;
    }

    .checklist-item {
        border-bottom: 1px solid #ddd !important;
    }

    .area-item {
        background: #f5f5f5;
        border-left-color: #333;
    }

    .progress-bar-container {
        display: none;
    }
}

/* ========================================
   V2.0 ADVANCED UPGRADE STYLES
   ======================================== */

/* --- METRIC TOGGLE --- */
.unit-toggle-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.unit-label-sm {
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
}

.switch-sm {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}

.switch-sm input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-sm {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #222;
    transition: .4s;
    border-radius: 18px;
}

.slider-sm:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #00f3ff;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider-sm {
    background-color: #1a1a2e;
}

input:checked+.slider-sm:before {
    transform: translateX(14px);
    background-color: #bc13fe;
}

/* --- L-SHAPE DIAGRAM --- */
.l-shape-layout {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 12px;
    border: 1px dashed rgba(0, 243, 255, 0.1);
    margin-bottom: 15px;
}

.l-shape-diagram {
    flex: 0 0 100px;
}

.mini-wireframe {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.2));
}

.wireframe-path {
    fill: rgba(0, 243, 255, 0.05);
    stroke: #00f3ff;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.wireframe-labels text {
    fill: #ffffff;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

.l-shape-inputs {
    flex: 1;
    display: grid;
    gap: 10px;
}

/* --- WASTE PERCENTAGE --- */
.waste-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.waste-btn {
    flex: 1;
    padding: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.waste-btn:hover {
    background: #1e293b;
    border-color: #475569;
}

.waste-btn.active {
    background: rgba(188, 19, 254, 0.15);
    border-color: #bc13fe;
    color: #e879f9;
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
}

.waste-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    animation: fadeIn 0.3s;
}

.warning-icon {
    font-size: 1.2rem;
}

#waste-warning-text {
    font-size: 0.8rem;
    color: #fde047;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- ADVANCED TOOLTIP --- */
.tooltip-trigger {
    position: relative;
    cursor: help;
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    border: 1px solid #00f3ff;
    padding: 10px;
    border-radius: 8px;
    width: 200px;
    font-size: 0.75rem;
    color: #cbd5e1;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.4;
}

.tooltip-trigger:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #00f3ff transparent transparent transparent;
}

/* ========================================
   HARMONIZED INSTRUCTIONAL & FAQ STYLES
   ======================================== */

.how-it-works-final {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.professional-header {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #10b981;
    /* Emerald Primary */
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.header-divider {
    width: 60px;
    height: 4px;
    background: #10b981;
    margin: 0 auto 3rem;
    border-radius: 2px;
}

.onboarding-grid-final {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.onboarding-card-final {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.onboarding-card-final:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: #10b981;
    transform: translateY(-5px);
}

.step-indicator {
    position: absolute;
    top: -1rem;
    left: 2rem;
    background: #10b981;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
}

.card-title-final {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #f8fafc;
}

.card-body-final {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
}

/* FAQ SECTION */
.faq-section {
    max-width: 800px;
    margin: 4rem auto 6rem;
    padding: 0 1.5rem;
}

.faq-header {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 1rem;
}

.faq-divider {
    width: 40px;
    height: 2px;
    background: #10b981;
    margin: 0 auto 2.5rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(16, 185, 129, 0.3);
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: #f8fafc;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: #10b981;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: 'âˆ’';
}

.faq-item p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    color: #94a3b8;
    line-height: 1.7;
    font-size: 0.9375rem;
}

.faq-item strong {
    color: #10b981;
    font-weight: 600;
}

@media (max-width: 768px) {
    .onboarding-grid-final {
        grid-template-columns: minmax(0, 1fr);
            overflow: hidden;
        gap: 2.5rem;
    }

    .professional-header {
        font-size: 1.5rem;
    }
}

/* == LIGHT MODE OVERRIDES == */
[data-theme="light"] {
    --bg: #F1F5F9;
    --surface: #FFFFFF;
    --accent: #0F766E;
    --accent-glow: rgba(15,118,110,0.15);
    --border: rgba(0,0,0,0.15);
    --text-primary: #0F172A;
    --text-secondary: #334155;
}

[data-theme="light"] body { background-color: #F1F5F9; color: #0F172A; background-image: none; }
[data-theme="light"] .glass-navbar { background: rgba(255,255,255,0.95); border-bottom: 1px solid rgba(0,0,0,0.12); }
[data-theme="light"] .brand-text { color: #0F172A; }
[data-theme="light"] .nav-link { color: #334155; }
[data-theme="light"] .nav-link:hover { color: #0E7490; }
[data-theme="light"] .hamburger-bar { background: #334155; }
[data-theme="light"] input, [data-theme="light"] select { color-scheme: light; }
[data-theme="light"] .dashboard-container,
[data-theme="light"] .dashboard-wrapper { background: transparent; }
[data-theme="light"] .dashboard-panel,
[data-theme="light"] .dashboard-card,
[data-theme="light"] .card,
[data-theme="light"] .glass-card,
[data-theme="light"] .compact-card,
[data-theme="light"] .calculator-card { background: #FFFFFF; border-color: rgba(0,0,0,0.12); box-shadow: 0 2px 8px rgba(0,0,0,0.08); color: #0F172A; }
[data-theme="light"] .input-group label,
[data-theme="light"] .input-label { color: #334155; }
[data-theme="light"] .input-group input,
[data-theme="light"] .input-group select,
[data-theme="light"] .glass-input,
[data-theme="light"] .input-field,
[data-theme="light"] .fintech-input,
[data-theme="light"] .dashboard-input,
[data-theme="light"] .styled-input { background: #E2E8F0; border-color: rgba(0,0,0,0.15); color: #0F172A; }
[data-theme="light"] .tab-btn,
[data-theme="light"] .calc-tab-btn,
[data-theme="light"] .segment-pill,
[data-theme="light"] .input-tab-btn { background: #E2E8F0; color: #334155; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .tab-btn.active,
[data-theme="light"] .calc-tab-btn.active,
[data-theme="light"] .segment-pill.active,
[data-theme="light"] .input-tab-btn.active { background: #0E7490; color: #fff; }
[data-theme="light"] .preset-chip,
[data-theme="light"] .chip { background: #E2E8F0; color: #334155; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .preset-chip.active,
[data-theme="light"] .chip.active { background: #0E7490; color: #fff; }
[data-theme="light"] .stat-card { background: #FFFFFF; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .stat-label { color: #475569; }
[data-theme="light"] .stat-value { color: #0F172A; }
[data-theme="light"] .hero-result,
[data-theme="light"] .hero-result-box,
[data-theme="light"] .result-card { background: #FFFFFF; border-color: rgba(0,0,0,0.12); color: #0F172A; }
[data-theme="light"] .formula-strip,
[data-theme="light"] .formula-pill { background: #F1F5F9; border-color: rgba(0,0,0,0.08); color: #334155; }
[data-theme="light"] .alert { background: #F8FAFC; border-color: rgba(0,0,0,0.08); color: #334155; }
[data-theme="light"] .action-btn { background: #FFFFFF; border-color: rgba(0,0,0,0.15); color: #334155; }
[data-theme="light"] .action-btn:hover { background: #F1F5F9; }
[data-theme="light"] .chart-card,
[data-theme="light"] .chart-block,
[data-theme="light"] .chart-wrapper { background: #FFFFFF; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] table { border-color: rgba(0,0,0,0.12); }
[data-theme="light"] th { background: #F1F5F9; color: #334155; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] td { color: #0F172A; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .how-to-card,
[data-theme="light"] .faq-item { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .faq-question { color: #0F172A; }
[data-theme="light"] .faq-answer { color: #475569; }
[data-theme="light"] .breadcrumb { color: #475569; background: rgba(0,0,0,0.03); }
[data-theme="light"] .breadcrumb a { color: #475569; }
[data-theme="light"] .breadcrumb a:hover { color: #0E7490; }
[data-theme="light"] .calc-btn,
[data-theme="light"] .calculate-btn { background: #0E7490; color: #fff; }
[data-theme="light"] .toggle-btn { background: #E2E8F0; color: #334155; }
[data-theme="light"] .toggle-btn.active { background: #0E7490; color: #fff; }
[data-theme="light"] .modal-content,
[data-theme="light"] .modal-body { background: #FFFFFF; color: #0F172A; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .mobile-nav { background: rgba(255,255,255,0.98); border-top: 1px solid rgba(0,0,0,0.12); }
[data-theme="light"] .mobile-nav .nav-link { color: #334155; }
[data-theme="light"] .section-title,
[data-theme="light"] .section-header { color: #0F172A; }
[data-theme="light"] .section-desc { color: #475569; }
[data-theme="light"] .calculator-console { background: #F8FAFC; color: #0F172A; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .page-title { color: #0F172A; -webkit-text-fill-color: #0F172A; }
[data-theme="light"] .std-input-sm { background: #E2E8F0; border-color: rgba(0,0,0,0.15); color: #0F172A; }
[data-theme="light"] .console-column { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .segmented-control { background: #E2E8F0; }
[data-theme="light"] .shape-card { background: #F8FAFC; border-color: rgba(0,0,0,0.12); color: #0F172A; }
[data-theme="light"] .shape-card.active { background: #FFFFFF; border-color: #0F766E; }
[data-theme="light"] .calculator-console input,
[data-theme="light"] .name-input { background: #E2E8F0; border-color: rgba(0,0,0,0.15); color: #0F172A; }
[data-theme="light"] .add-area-controls { background: #F8FAFC; }
[data-theme="light"] .mode-toggle-wrapper { background: #E2E8F0; }
[data-theme="light"] .stepper-control { background: #E2E8F0; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .stepper-control button { color: #334155; }
[data-theme="light"] .project-summary-card { background: #F8FAFC; border-color: rgba(0,0,0,0.08); color: #0F172A; }
[data-theme="light"] .pattern-preview-section { background: #F8FAFC; }
[data-theme="light"] .toggle-container-sym { background: #E2E8F0; }
[data-theme="light"] .visualizer-container { background: #F8FAFC; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .materials-checklist-card { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .checklist-header { background: #F1F5F9; color: #0F172A; }
[data-theme="light"] .column-header { color: #334155; }
[data-theme="light"] .wall-tag { background: rgba(15,118,110,0.1); border-color: rgba(15,118,110,0.3); color: #0F766E; }
[data-theme="light"] .scoreboard { background: linear-gradient(135deg, rgba(15,118,110,0.08), rgba(248,250,252,0.9)); border-color: rgba(15,118,110,0.2); }
[data-theme="light"] .stepper-btn:hover { background: rgba(15,118,110,0.1); }
[data-theme="light"] .nav-link.active, [data-theme="light"] .nav-link:focus { color: #0F766E; }
