﻿        /* Page-Specific Styles for Construction Prototype */

        /* --- FONT STACKS --- */
        /* --- THEME & VARIABLES --- */
        :root {
            /* Light Enterprise Palette */
            --bg-app: #F3F4F6;
            /* Light Gray Background */
            --bg-panel: #FFFFFF;
            /* White for cards/panels */
            --bg-hover: #F9FAFB;
            /* Subtle hover state */
            --bg-secondary: #FFFFFF;
            /* White fallback */

            /* Subtle Borders */
            --border: 1px solid #E2E8F0;
            --border-highlight: 1px solid #CBD5E1;
            --card-border: #E2E8F0;

            /* Text Hierarchy */
            --text-main: #1F2937;
            --text-muted: #6B7280;
            --text-secondary: #9CA3AF;
            --accent: #0696D7;

            /* Radius System */
            --radius-lg: 12px;
            --radius-md: 8px;
            --radius-sm: 4px;

            /* Status Colors */
            --success: #10B981;
            --warning: #F59E0B;

            /* FONTS */
            --font-brand: 'Barlow', sans-serif;
            --font-ui: 'Inter', sans-serif;
            --font-data: 'Barlow', sans-serif;
            --font-doc: 'Inter', sans-serif;
            --font-tech: 'JetBrains Mono', monospace;
        }

        body {
            background-color: var(--bg-app);
            color: var(--text-main);
            font-family: var(--font-ui);
            font-feature-settings: "tnum" 1, "cv05" 1;
            -webkit-font-smoothing: antialiased;
        }

        /* Profile Overrides via JS Classes */
        body.os-ios {
            --font-brand: 'Inter', sans-serif;
            --font-ui: 'Inter', sans-serif;
            --font-data: 'Inter', sans-serif;
            --font-doc: 'Inter', sans-serif;
        }

        body.os-android:not(.device-pixel) {
            --font-brand: 'Roboto', sans-serif;
            --font-ui: 'Roboto', sans-serif;
            --font-data: 'Roboto', sans-serif;
            --font-doc: 'Roboto', sans-serif;
        }

        body.device-pixel {
            --font-brand: 'Outfit', sans-serif;
            --font-ui: 'Roboto', sans-serif;
            --font-data: 'Roboto', sans-serif;
            --font-doc: 'Roboto', sans-serif;
        }

        /* Tabular Numbers for Data */
        .gantt-row,
        #coords,
        .doc-meta-value,
        #dateLabel,
        .score-bars {
            font-family: var(--font-data);
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum";
        }

        /* --- AUTH & LOGIN STYLES --- */
        #loginOverlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: var(--bg-app);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-main);
            transition: opacity 0.5s ease-out;
        }

        #loginOverlay.hidden {
            opacity: 0;
            pointer-events: none;
            visibility: hidden;
        }

        .login-container {
            background: var(--bg-panel);
            border: var(--border);
            padding: 40px;
            border-radius: 12px;
            width: 400px;
            text-align: center;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        }

        .branding-logo-container {
            margin-bottom: 20px;
        }

        .branding-logo-container img {
            height: 60px;
            width: auto;
        }

        .brand-logo {
            margin-bottom: 20px;
        }

        .brand-logo img {
            max-height: 200px;
            max-width: 200px;
            width: auto;
            height: auto;
            object-fit: contain;
        }

        .brand-name {
            font-size: 24px;
            font-weight: 700;
            letter-spacing: 2px;
            margin-bottom: 8px;
            color: var(--text-main);
            font-family: var(--font-brand);
        }

        .login-subtitle {
            color: var(--text-muted);
            font-size: 14px;
            margin-bottom: 32px;
        }

        .autodesk-btn,
        .procore-btn,
        .microsoft-btn {
            width: 100%;
            padding: 12px;
            margin-bottom: 12px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: transform 0.1s, filter 0.2s;
        }

        .autodesk-btn {
            background-color: #0696D7;
            color: white;
        }

        .procore-btn {
            background-color: #f36c25;
            color: white;
        }

        .microsoft-btn {
            background-color: #2F2F2F;
            color: white;
            border: 1px solid #555;
        }

        .autodesk-btn:hover,
        .procore-btn:hover,
        .microsoft-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.1);
        }

        .logo-sm {
            height: 22px;
            width: auto;
            max-width: 36px;
            object-fit: contain;
            flex-shrink: 0;
        }

        .logo-sm-white {
            height: 22px;
            width: auto;
            max-width: 36px;
            object-fit: contain;
            flex-shrink: 0;
            filter: brightness(0) invert(1);
        }

        /* PASSWORD LOGIN SECTION */
        .password-login-section {
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid #E2E8F0;
        }

        .password-label {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 10px;
            text-align: left;
        }

        .password-input-group {
            display: flex;
            gap: 8px;
        }

        .password-input {
            flex: 1;
            background: #F9FAFB;
            border: 1px solid #E2E8F0;
            border-radius: 4px;
            padding: 8px 12px;
            color: var(--text-main);
            font-family: inherit;
        }

        .password-input:focus {
            outline: none;
            border-color: #0696D7;
            box-shadow: 0 0 0 2px rgba(6, 150, 215, 0.2);
        }

        .password-btn {
            background: #0696D7;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 0 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }

        .password-btn:hover {
            background: #0077B6;
        }

        /* HOW IT WORKS BUTTON */
        .how-it-works-btn {
            margin-top: 24px;
            width: 100%;
            padding: 12px 16px;
            background: transparent;
            border: 1px dashed #CBD5E1;
            border-radius: 8px;
            color: #64748B;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .how-it-works-btn:hover {
            border-color: #0696D7;
            color: #0696D7;
            background: rgba(6, 150, 215, 0.05);
        }

        /* DATA MATRIX OVERLAY */
        .data-matrix-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .data-matrix-overlay.hidden {
            display: none;
        }

        .data-matrix-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.7);
            -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
        }

        .data-matrix-modal {
            position: relative;
            width: 90vw;
            height: 85vh;
            max-width: 1400px;
            background: white;
            border-radius: 16px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            overflow: hidden;
            z-index: 10001;
        }

        .data-matrix-close {
            position: absolute;
            top: 12px;
            right: 16px;
            width: 36px;
            height: 36px;
            background: rgba(15, 23, 42, 0.8);
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
            z-index: 10002;
            transition: background 0.2s;
        }

        .data-matrix-close:hover {
            background: #0696D7;
        }

        .data-matrix-iframe {
            width: 100%;
            height: 100%;
            border: none;
        }

        /* --- SETTINGS MODAL STYLES --- */
        .settings-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.3);
            -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
            z-index: 5000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        .settings-modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .settings-modal {
            width: 500px;
            background: var(--bg-panel);
            border: var(--border);
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
            max-width: 90vw;
        }

        .settings-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-bottom: var(--border);
        }

        .settings-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-main);
        }

        .settings-close {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        .settings-close:hover {
            color: var(--text-main);
        }

        .view-walkthrough-pill {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            background: #F0F9FF;
            color: #0284C7;
            font-size: 12px;
            font-weight: 600;
            border-radius: 99px;
            border: 1px solid #BAE6FD;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .view-walkthrough-pill:hover {
            background: #E0F2FE;
            color: #0369A1;
            transform: translateY(-1px);
        }

        .settings-section {
            padding: 20px;
        }

        .settings-divider {
            height: 1px;
            background: #E2E8F0;
            margin: 0;
        }

        .settings-section-title {
            font-size: 12px;
            text-transform: uppercase;
            color: var(--text-muted);
            letter-spacing: 1px;
            margin-bottom: 12px;
            font-weight: 600;
        }

        .integration-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: #F9FAFB;
            border: 1px solid #E2E8F0;
            border-radius: 6px;
            margin-bottom: 8px;
        }

        .integration-info {
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--text-main);
        }

        .integration-status {
            font-size: 12px;
        }

        .btn-connect {
            padding: 6px 12px;
            border-radius: 4px;
            border: 1px solid #CBD5E1;
            background: transparent;
            color: var(--text-main);
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-connect:hover {
            background: #F3F4F6;
            border-color: #0696D7;
            color: #0696D7;
        }

        .btn-connect.connected {
            border-color: #10B981;
            color: #10B981;
            background: rgba(16, 185, 129, 0.1);
        }

        .language-select {
            background: #F9FAFB;
            border: 1px solid #E2E8F0;
            color: var(--text-main);
            padding: 6px;
            border-radius: 4px;
        }

        /* Settings Gear Icon */
        .settings-gear {
            cursor: pointer;
            opacity: 0.7;
            transition: opacity 0.2s;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .settings-gear:hover {
            opacity: 1;
            color: var(--text-main);
        }

        .settings-gear.hidden {
            display: none !important;
        }

        #fileListMobile {
            display: flex;
            flex-direction: row;
            gap: 8px;
            overflow-x: auto;
            padding: 8px 0;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: block;
        }

        #fileListMobile::-webkit-scrollbar {
            display: none;
        }

        /* FORCE POINTER EVENTS */
        /* The parent .hud-panel likely has pointer-events: none, so we must re-enable them */
        #fileListMobile,
        .file-card {
            pointer-events: auto !important;
            cursor: pointer;
            position: relative;
            z-index: 200;
            /* High z-index to be safe */
        }


        /* Vertical score bars - Muted for Premium Look */
        .score-bars {
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-top: 12px;
            opacity: 0.8;
            /* Subtle until interaction */
            transition: opacity 0.2s;
        }

        .file-card:hover .score-bars {
            opacity: 1;
        }

        .score-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .score-item .score-label {
            font-size: 9px;
            color: var(--text-muted);
            font-weight: 600;
            min-width: 60px;
            letter-spacing: 0.5px;
        }

        .score-bar {
            flex: 1;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
        }

        .score-bar-fill {
            height: 100%;
            border-radius: 2px;
        }

        /* Mobile: Card stack with flip navigation */
        @media (max-width: 600px) {
            #fileListMobile {
                height: 20vh;
                display: block;
                padding-bottom: 0;
                position: relative;
            }

            .file-card {
                position: absolute;
                left: 10px;
                right: 10px;
                height: 10vh;
                margin-bottom: 0;
                transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
                z-index: 1;
                opacity: 0;
                /* pointer-events: none; REMOVED to fix click issue */
            }

            .file-card .file-name {
                font-size: 14px;
            }

            .file-card .file-meta {
                font-size: 10px;
                margin-bottom: 4px;
            }

            .score-bars {
                height: 6px;
                gap: 2px;
            }

            /* Stack Logic */
            .file-card.card-0 {
                top: 0;
                z-index: 6;
                opacity: 1;
                transform: scale(1);
                pointer-events: auto;
            }

            .file-card.card-1 {
                top: 4vh;
                z-index: 5;
                opacity: 1;
                transform: scale(1);
            }

            .file-card.card-2 {
                top: 7vh;
                z-index: 4;
                opacity: 1;
                transform: scale(1);
            }

            .file-card.card-3 {
                top: 9vh;
                z-index: 3;
                opacity: 1;
                transform: scale(1);
            }

            .file-card.card-4 {
                top: 10vh;
                z-index: 2;
                opacity: 1;
                transform: scale(1);
            }

            .file-card:not(.card-0):not(.card-1):not(.card-2):not(.card-3):not(.card-4) {
                display: none;
            }

            .card-nav {
                display: flex;
                position: absolute;
                right: 0;
                top: -30px;
                gap: 10px;
                z-index: 20;
            }

            .card-nav button {
                width: 28px;
                height: 28px;
                background: var(--bg-panel);
                border: 1px solid var(--border);
                color: #fff;
                border-radius: 4px;
            }
        }

        @media (min-width: 601px) {
            .card-nav {
                display: none;
            }
        }

        /* HUD Toolbar Refactor */
        .hud-panel {
            background: rgba(255, 255, 255, 0.95);
            -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
            border-bottom: 1px solid #E2E8F0;
            padding: 0 20px;
            height: 64px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .hud-header {
            display: flex;
            align-items: center;
            gap: 16px;
            height: 100%;
            width: 100%;
            /* FIX: Fill container */
            justify-content: space-between;
        }

        /* Native-like Inputs */
        /* Unified Input & Button Heights */
        /* Native-like Inputs */
        /* Unified Input & Button Heights */
        .hud-select,
        select,
        .btn-primary,
        .btn-connect {
            background-color: #FFFFFF;
            border: 1px solid #E2E8F0 !important;
            color: var(--text-main) !important;
            padding: 0 16px !important;
            font-size: 12px !important;
            font-weight: 600 !important;
            border-radius: 999px !important;
            height: 36px !important;
            text-align: center !important;
            text-align-last: center !important;
            min-width: 200px;
            /* Generous width to prevent cutoff */
            width: 200px;
            /* Persistent width */
            display: inline-flex;
            align-items: center;
            justify-content: center;
            -webkit-appearance: none;
            appearance: none;
            /* Allow custom styling */
            /* Add custom arrow indicator if appearance is none */
            background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236B7280%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 8px;
            padding-right: 28px !important;
            /* Space for arrow */
            transition: all 0.2s ease;
        }

        .btn-primary {
            background: #0696D7 !important;
            color: white !important;
            border: 1px solid #0696D7 !important;
            cursor: pointer;
            background-image: none;
            /* No arrow for buttons */
        }

        .btn-primary:hover {
            background: #0077B6 !important;
            border-color: #0077B6 !important;
        }

        .btn-connect {
            background-image: none;
        }

        /* Advanced Metrics Toggle */
        .advanced-metrics {
            display: none;
            /* Hidden by default */
        }

        body.show-advanced-metrics .advanced-metrics {
            display: flex;
        }



        #controls {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 350px;
            /* Match Documents sidebar */
            background: #FFFFFF;
            border: 1px solid #E2E8F0;
            border-radius: var(--radius-lg);
            padding: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            display: flex;
            flex-direction: column;
            gap: 8px;
            z-index: 50;
        }

        /* Style Control Rows as clean cards */
        .control-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            width: 100%;
            background: #F9FAFB;
            border: 1px solid #E2E8F0;
            border-radius: 6px;
            padding: 10px 14px;
        }

        .control-row .control-label {
            flex: 0 0 50px;
        }

        .control-row input[type="range"] {
            flex: 1;
            min-width: 80px;
        }

        .control-row select {
            flex: 1;
            max-width: none;
            width: auto;
        }

        /* Custom Range Slider Styling */
        input[type="range"] {
            -webkit-appearance: none;
            appearance: none;
            height: 6px;
            background: #CBD5E1;
            border-radius: 3px;
            outline: none;
            cursor: pointer;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            background: #0696D7;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            transition: transform 0.15s;
        }

        input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.15);
        }

        input[type="range"]::-moz-range-thumb {
            width: 16px;
            height: 16px;
            background: #0696D7;
            border-radius: 50%;
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        input[type="range"]::-moz-range-track {
            height: 6px;
            background: #CBD5E1;
            border-radius: 3px;
        }

        .control-label {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        #scaleLabel,
        #dateLabel {
            font-family: var(--font-tech);
            /* Monospace */
            font-size: 12px;
            font-weight: 600;
            color: var(--accent);
            /* Highlight value */
            text-align: right;
            white-space: nowrap;
        }

        .interactive-label {
            cursor: pointer;
            border-bottom: 1px dashed var(--text-muted);
            transition: all 0.2s;
            padding: 2px 4px;
            border-radius: 3px;
        }

        .interactive-label:hover {
            color: #fff;
            border-color: #fff;
            background: rgba(255, 255, 255, 0.1);
        }



        #modeIndicator {
            position: fixed;
            bottom: max(100px, calc(env(safe-area-inset-bottom) + 85px));
            left: 50%;
            transform: translateX(-50%);
            padding: 6px 14px;
            background: rgba(0, 0, 0, 0.8);
            border: 1px solid var(--card-border);
            font-size: 11px;
            border-radius: 20px;
            z-index: 25;
            display: none;
            pointer-events: none;
        }

        #modeIndicator.walking {
            display: block;
            background: rgba(0, 200, 100, 0.9);
            color: #000;
            animation: pulse 0.8s infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
                transform: translateX(-50%) scale(1);
            }

            50% {
                opacity: 0.8;
                transform: translateX(-50%) scale(1.05);
            }
        }

        /* HUD refactoring */
        .hud-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            align-items: center;
        }

        .hud-status {
            display: flex;
            gap: 12px;
            font-size: 12px;
            align-items: center;
        }

        /* Centered Top Controls */
        #topControls {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 24px;
            flex: 1;
            margin: 0 20px;
        }

        .control-group-centered {
            display: flex;
            align-items: center;
            gap: 8px;
            background: #0696D7;
            padding: 4px 10px;
            border-radius: 6px;
            border: none;
        }

        .hud-label {
            font-size: 11px;
            font-weight: 700;
            color: #FFFFFF;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        /* Top control dropdowns use the same styling as global selects */
        .hud-select {
            background-color: var(--bg-app);
            /* No !important - allow JS color override */
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
            color: #FFFFFF !important;
            padding: 0 16px !important;
            font-size: 12px !important;
            font-weight: 600 !important;
            border-radius: 999px !important;
            height: 36px !important;
            text-align: center !important;
            text-align-last: center !important;
            min-width: 200px !important;
            width: 200px !important;
            cursor: pointer;
            font-family: inherit;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23CBD5E0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 8px;
            padding-right: 28px !important;
        }

        .hud-select:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.3);
        }

        .hud-select option {
            background: #1e293b;
            color: #fff;
        }

        /* Specific overrides for top ROLE and INTENT dropdowns */
        #roleSelect,
        #intentSelect {
            min-width: 200px !important;
            width: 200px !important;
            font-size: 12px !important;
            border-radius: 999px !important;
            padding: 0 16px !important;
            padding-right: 28px !important;
        }

        /* Debug refactoring */
        #sensorDebug {
            display: none;
            position: fixed;
            top: 60px;
            left: 10px;
            background: rgba(0, 0, 0, 0.8);
            padding: 10px;
            border-radius: 8px;
            font-family: monospace;
            font-size: 10px;
            pointer-events: none;
        }

        /* Result formatting */
        .result-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .success-label {
            color: #4ade80;
            font-weight: 500;
        }

        /* Document Viewer Modal */
        #docModal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.85);
            z-index: 1000;
            overflow-y: auto;
            padding: 20px;
        }

        #docModal.active {
            display: flex;
            justify-content: center;
            align-items: flex-start;
        }

        .doc-container {
            background: #fff;
            color: #000;
            max-width: 800px;
            width: 100%;
            margin: 20px auto;
            box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
            border-radius: 4px;
            overflow: hidden;
        }

        .doc-header {
            background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
            color: #fff;
            padding: 20px 24px;
            border-bottom: 4px solid #ed8936;
            position: relative;
        }

        .doc-tag-stack {
            position: absolute;
            top: 20px;
            right: 24px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .doc-header-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
        }

        .doc-type-badge {
            background: #ed8936;
            color: #fff;
            padding: 4px 12px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .doc-number {
            font-size: 24px;
            font-weight: 700;
        }

        .doc-subject {
            font-size: 16px;
            font-weight: 500;
            opacity: 0.9;
            margin-top: 8px;
        }

        .doc-meta-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .doc-meta-item {
            font-size: 12px;
        }

        .doc-meta-label {
            opacity: 0.7;
            text-transform: uppercase;
            font-size: 10px;
            letter-spacing: 0.5px;
        }

        .doc-meta-value {
            font-weight: 500;
            margin-top: 2px;
        }

        .doc-contacts {
            background: #f7fafc;
            padding: 16px 24px;
            border-bottom: 1px solid #e2e8f0;
            font-size: 13px;
        }

        .doc-contact-row {
            display: flex;
            margin-bottom: 8px;
        }

        .doc-contact-row:last-child {
            margin-bottom: 0;
        }

        .doc-contact-label {
            width: 50px;
            font-weight: 600;
            color: #718096;
        }

        .doc-contact-value {
            color: #2d3748;
        }

        .doc-contact-value .company {
            color: #718096;
            font-style: italic;
        }

        .doc-body {
            padding: 24px;
            min-height: 200px;
            line-height: 1.6;
            font-size: 14px;
        }

        .doc-body h3 {
            color: #1a365d;
            font-size: 14px;
            font-weight: 600;
            text-transform: uppercase;
            margin: 20px 0 10px 0;
            padding-bottom: 6px;
            border-bottom: 2px solid #e2e8f0;
        }

        .doc-body h3:first-child {
            margin-top: 0;
        }

        .doc-body p {
            margin: 10px 0;
            color: #2d3748;
        }

        .doc-body ul {
            margin: 10px 0;
            padding-left: 24px;
        }

        .doc-body li {
            margin: 6px 0;
            color: #2d3748;
        }

        .doc-attachments {
            background: #edf2f7;
            padding: 16px 24px;
            border-top: 1px solid #e2e8f0;
        }

        .doc-attachments-title {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            color: #718096;
            margin-bottom: 8px;
        }

        .doc-attachment-item {
            display: inline-flex;
            align-items: center;
            background: #fff;
            padding: 6px 12px;
            border-radius: 4px;
            margin-right: 8px;
            margin-bottom: 8px;
            font-size: 12px;
            color: #2d3748;
            border: 1px solid #e2e8f0;
        }

        .doc-attachment-item::before {
            content: "ðŸ“Ž";
            margin-right: 6px;
        }

        .doc-attachment-pdf {
            background: #2b6cb0;
            color: #fff;
            text-decoration: none;
            cursor: pointer;
            border-color: #2b6cb0;
        }

        .doc-attachment-pdf::before {
            content: "ðŸ“„";
        }

        .doc-attachment-pdf:hover {
            background: #2c5282;
        }

        .doc-footer {
            background: #f7fafc;
            padding: 16px 24px;
            border-top: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .doc-status {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .doc-status-badge {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .doc-status-badge.open {
            background: #fed7d7;
            color: #c53030;
        }

        .doc-status-badge.closed {
            background: #c6f6d5;
            color: #276749;
        }

        .doc-status-badge.approved {
            background: #c6f6d5;
            color: #276749;
        }

        .doc-status-badge.pending {
            background: #feebc8;
            color: #c05621;
        }

        /* RFI Status Stamp - Rotated "official" look */
        /* RFI Status Stamp - Clean Badge Look */
        .rfi-status-stamp {
            display: inline-block;
            border: 2px solid;
            padding: 4px 10px;
            border-radius: 4px;
            font-weight: 700;
            font-size: 12px;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .rfi-status-stamp.submitted {
            border-color: #d32f2f;
            color: #d32f2f;
        }

        .rfi-status-stamp.returned {
            border-color: #f57c00;
            color: #f57c00;
        }

        .rfi-status-stamp.closed {
            border-color: #388e3c;
            color: #388e3c;
        }

        .rfi-status-stamp.open {
            border-color: #d32f2f;
            color: #d32f2f;
        }

        /* New Grid Classes replacing inline styles */
        .doc-meta-grid-3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
        }

        .doc-meta-grid-2-divider {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 10px;
        }

        .doc-close-btn {
            background: #4a5568;
            color: #fff;
            border: none;
            padding: 10px 24px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
        }

        .doc-close-btn:hover {
            background: #2d3748;
        }

        .doc-pdf-embed {
            width: 100%;
            height: 70vh;
            border: none;
        }

        /* --- SCHEDULE PANEL --- */
        .schedule-panel-container {
            position: absolute;
            bottom: 20px;
            left: 20px;
            right: 20px;
            z-index: 100;
            pointer-events: none;
            /* Let clicks pass through container area */
        }

        .schedule-panel {
            background: rgba(20, 24, 32, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            pointer-events: auto;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            position: relative;
            z-index: 101;
        }

        .schedule-resize-handle {
            height: 6px;
            cursor: ns-resize;
            background: transparent;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            z-index: 105;
        }

        .schedule-resize-handle:hover,
        .schedule-resize-handle.active {
            background: rgba(76, 175, 80, 0.5);
        }

        /* --- GANTT STYLES --- */
        .gantt-container {
            padding: 10px;
            overflow-y: auto;
            max-height: 40vh;
        }

        .gantt-header-row {
            display: flex;
            color: #aaa;
            font-size: 10px;
            margin-bottom: 5px;
            border-bottom: 1px solid #333;
        }

        .gantt-activity-col {
            width: 140px;
            flex-shrink: 0;
            /* Prevent squishing */
        }

        .gantt-timeline-col {
            flex: 1;
            display: flex;
            justify-content: space-between;
        }

        .phase-section-title {
            color: #4CAF50;
            font-size: 10px;
            margin: 10px 0 2px 0;
            font-weight: bold;
            border-bottom: 1px solid #333;
        }

        .gantt-row {
            display: flex;
            height: 18px;
            align-items: center;
            cursor: pointer;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .gantt-row:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .gantt-label {
            width: 140px;
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: #ddd;
        }

        .gantt-timeline {
            flex: 1;
            position: relative;
            height: 100%;
            background: rgba(0, 0, 0, 0.2);
        }

        .gantt-bar {
            position: absolute;
            top: 4px;
            bottom: 4px;
            border-radius: 2px;
        }

        .gantt-bar.pending {
            background: #555;
        }

        .gantt-bar.active {
            background: #4CAF50;
            box-shadow: 0 0 5px #4CAF50;
        }

        .gantt-bar.complete {
            background: #2196F3;
            opacity: 0.6;
        }

        @media (max-width: 600px) {
            .gantt-activity-col {
                width: 80px;
            }

            .gantt-label {
                width: 80px;
                font-size: 10px;
            }

            .schedule-panel-container {
                bottom: 10px;
                left: 10px;
                right: 10px;
            }
        }

        /* Data Date Line - Red vertical line showing current selected date */
        .gantt-data-date-line {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 3px;
            background: #ef4444;
            cursor: ew-resize;
            z-index: 10;
            box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
            transition: box-shadow 0.2s;
        }

        .gantt-data-date-line:hover,
        .gantt-data-date-line.dragging {
            width: 4px;
            box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
        }

        .gantt-data-date-line::before {
            content: '';
            position: absolute;
            top: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-top: 8px solid #ef4444;
        }

        .gantt-data-date-label {
            position: absolute;
            top: -30px;
            left: 50%;
            transform: translateX(-50%);
            background: #ef4444;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
            pointer-events: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .gantt-data-date-label::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 4px solid #ef4444;
        }

        .schedule-header {
            padding: 10px 15px;
            background: #0696D7;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            color: #FFFFFF;
        }

        .schedule-content {
            overflow-y: auto;
            padding: 0;
            display: none;
            /* Collapsed by default */
        }

        .schedule-content.open {
            display: block;
        }

        .phase-section {
            margin-bottom: 1px;
        }

        .phase-title {
            padding: 8px 15px;
            background: rgba(255, 255, 255, 0.03);
            font-size: 11px;
            text-transform: uppercase;
            color: #8899aa;
            display: flex;
            justify-content: space-between;
        }

        .activity-item {
            padding: 10px 15px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .activity-item:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        .activity-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 4px;
        }

        .activity-name {
            font-size: 12px;
            font-weight: 500;
            color: #ddd;
        }

        .activity-dates {
            font-size: 10px;
            color: #8899aa;
        }

        .progress-container {
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            background: #4CAF50;
            width: 0%;
        }

        .activity-meta {
            margin-top: 4px;
            font-size: 9px;
            color: #556677;
            display: flex;
            gap: 8px;
        }

        .meta-tag {
            background: rgba(255, 255, 255, 0.05);
            padding: 1px 4px;
            border-radius: 2px;
        }

        .doc-linked-items {
            background: #ebf8ff;
            padding: 12px 24px;
            border-top: 1px solid #bee3f8;
            font-size: 12px;
        }

        .doc-linked-title {
            font-weight: 600;
            color: #2b6cb0;
            margin-bottom: 6px;
        }

        .doc-linked-tag {
            display: inline-block;
            background: #bee3f8;
            color: #2c5282;
            padding: 2px 8px;
            border-radius: 3px;
            margin-right: 6px;
            margin-bottom: 4px;
        }

        @media (max-width: 600px) {
            #docModal {
                padding: 10px;
            }

            .doc-container {
                margin: 10px auto;
            }

            .doc-meta-grid {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .doc-header {
                padding: 16px;
            }

            .doc-body {
                padding: 16px;
            }
        }

        /* SIDEBAR STYLES (Desktop) */
        #documentSidebar {
            position: fixed;
            top: 80px;
            left: 20px;
            width: 400px;
            min-width: 250px;
            max-width: 600px;
            bottom: 100px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            pointer-events: none;
            z-index: 50;
        }

        /* Resize Handle */
        .sidebar-resize-handle {
            position: absolute;
            top: 0;
            right: 0;
            width: 8px;
            height: 100%;
            cursor: ew-resize;
            background: transparent;
            pointer-events: auto;
            z-index: 100;
        }

        .sidebar-resize-handle:hover,
        .sidebar-resize-handle.active {
            background: rgba(6, 150, 215, 0.6);
        }

        #documentSidebar h3 {
            font-size: 14px;
            color: #FFFFFF;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 5px;
            background: #0696D7;
            padding: 8px 14px;
            border-radius: 6px;
            width: fit-content;
            cursor: pointer;
            pointer-events: auto;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: background 0.2s;
            font-weight: 600;
        }

        #documentSidebar h3:hover,
        #docSidebar h3:hover {
            background: #0577B0;
        }

        .sidebar-collapsed #fileListDesktop,
        .sidebar-collapsed #fileListDocs {
            display: none;
        }

        .sidebar-toggle-icon {
            font-size: 8px;
            transition: transform 0.2s;
        }

        .sidebar-collapsed .sidebar-toggle-icon {
            transform: rotate(-90deg);
        }

        #fileListDesktop {
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow-y: auto;
            pointer-events: auto;
            /* Enable clicks on list */
            padding-right: 5px;
            flex: 1;
            /* Take remaining height */
            min-height: 200px;
            /* Force height for debug */
        }

        /* Desktop Card Styles Override */
        #fileListDesktop .file-card {
            position: relative;
            opacity: 1;
            /* Fully opaque */
            transform: none;
            z-index: 1;
            pointer-events: auto;
            cursor: pointer;
            transition: all 0.2s;
            height: auto;
            min-height: 80px;
        }

        #fileListDesktop .file-card:hover {
            transform: translateX(5px);
            opacity: 1;
            box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
        }

        #fileListDesktop .file-card.active {
            opacity: 1;
            border-left-width: 4px;
        }

        #fileListDesktop .file-type-tag {
            position: absolute;
            top: 6px;
            right: 6px;
            color: #fff;
            font-size: 9px;
            padding: 2px 6px;
            border-radius: 3px;
            text-transform: uppercase;
        }

        #fileListDesktop .file-name {
            font-size: 13px;
            margin-bottom: 8px;
            padding-right: 40px;
            /* Space for tag */
        }

        /* HIDE MOBILE list on desktop */
        @media (min-width: 601px) {
            #fileListMobile {
                display: none;
            }

            #documentSidebar,
            #docSidebar {
                display: flex;
            }
        }

        /* HIDE DESKTOP sidebars on mobile */
        @media (max-width: 600px) {

            #documentSidebar,
            #docSidebar {
                display: none;
            }

            #fileListMobile {
                display: block;
                height: 100%;
            }
        }

        /* Right sidebar (Documents) */
        /* Right sidebar (Documents) */
        #docSidebar {
            position: fixed;
            top: 80px;
            right: 20px;
            /* Leave room for controls */
            width: 350px;
            min-width: 250px;
            max-width: 500px;
            bottom: 280px;
            /* Above controls panel */
            display: flex;
            flex-direction: column;
            gap: 10px;
            pointer-events: none;
            z-index: 50;
        }

        #docSidebar h3 {
            font-size: 14px;
            color: #FFFFFF;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 5px;
            background: #0696D7;
            padding: 8px 14px;
            border-radius: 6px;
            width: fit-content;
            cursor: pointer;
            pointer-events: auto;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: background 0.2s;
            font-weight: 600;
        }

        #fileListDocs {
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow-y: auto;
            pointer-events: auto;
            padding-right: 5px;
            flex: 1;
            min-height: 200px;
        }

        /* Doc sidebar card styles */
        #fileListDocs .file-card {
            position: relative;
            opacity: 1;
            /* Fully opaque */
            transform: none;
            z-index: 1;
            pointer-events: auto;
            cursor: pointer;
            transition: all 0.2s;
            height: auto;
            min-height: 80px;
            background: #F0F9FF;
            /* Subtle Light Blue */
            border: 1px solid #E2E8F0;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        #fileListDocs .file-card:hover {
            transform: translateX(-5px);
            opacity: 1;
            box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.15);
        }

        #fileListDocs .file-card.active {
            opacity: 1;
            border-left: 4px solid #0696D7;
        }

        #fileListDocs .file-type-tag {
            position: absolute;
            top: 6px;
            right: 6px;
            color: #fff;
            font-size: 9px;
            padding: 2px 6px;
            border-radius: 3px;
            text-transform: uppercase;
        }

        #fileListDocs .file-name {
            font-size: 13px;
            margin-bottom: 8px;
            padding-right: 40px;
            color: #1F2937;
        }

        .doc-sidebar-resize-handle {
            position: absolute;
            top: 0;
            left: 0;
            width: 8px;
            height: 100%;
            cursor: ew-resize;
            background: transparent;
            pointer-events: auto;
            z-index: 100;
        }

        .doc-sidebar-resize-handle:hover,
        .doc-sidebar-resize-handle.active {
            background: rgba(6, 150, 215, 0.6);
        }

        #topControls {
            display: flex;
            gap: 15px;
            align-items: center;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            pointer-events: auto;
        }

        .hud-select {
            background: rgba(0, 0, 0, 0.7);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
            text-transform: uppercase;
            cursor: pointer;
        }

        .hud-select:hover {
            border-color: rgba(255, 255, 255, 0.6);
        }

        .doc-linked-category {
            font-size: 10px;
            font-weight: bold;
            color: #888;
            text-transform: uppercase;
            margin-bottom: 4px;
            margin-top: 8px;
            width: 100%;
        }

        .doc-linked-item-group {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 2px;
        }

        .doc-linked-clickable {
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .doc-linked-clickable:hover {
            background-color: rgba(255, 255, 255, 0.2);
            text-decoration: underline;
        }

        /* --- ASSET INFO PANEL --- */
        /* Floating panel that appears when hovering over assets or player is near */
        #assetInfoPanel {
            position: fixed;
            display: none;
            flex-direction: column;
            gap: 4px;
            padding: 6px;
            background: rgba(20, 24, 32, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 6px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            z-index: 500;
            pointer-events: auto;
            min-width: 120px;
            max-width: 200px;
        }

        #assetInfoPanel.visible {
            display: flex;
        }

        .asset-info-title {
            font-size: 10px;
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .asset-doc-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            color: #fff;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .asset-doc-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.4);
            transform: translateX(2px);
        }

        .asset-doc-btn.rfi {
            border-left: 3px solid #f44336;
        }

        .asset-doc-btn.submittal {
            border-left: 3px solid #4CAF50;
        }

        .asset-doc-btn .doc-icon {
            font-size: 12px;
        }

        .asset-doc-btn .doc-label {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Fix Procore Logo Aspect Ratio */
        .auth-provider-btn img,
        .auth-btn img {
            object-fit: contain;
            width: auto;
            height: 24px;
            max-width: 100px;
            margin-right: 12px;
        }

        .file-type-tag {
            font-size: 1.5em !important;
            padding: 4px 10px !important;
            line-height: 1.2 !important;
            border-radius: var(--radius-sm);
            font-family: var(--font-data);
            font-weight: 700 !important;
            margin-bottom: 8px;
            display: inline-block;
        }

        /* Enforce Premium "Clean Slate" Style on Cards */
        .file-card {
            background: #F0F9FF !important;
            /* Force solid subtle blue */
            border: var(--border) !important;
            border-radius: var(--radius-lg) !important;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            padding: 16px !important;
            transition: transform 0.2s, box-shadow 0.2s;
            opacity: 1 !important;
            /* Ensure opacity */
        }

        .file-card:hover {
            transform: translateY(-2px);
            border-color: rgba(255, 255, 255, 0.2) !important;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
        }

        /* FIX: Ensure .active state works for Green Highlight */
        .file-card.active {
            border: 2px solid #22c55e !important;
            background: #F0F9FF !important;
            /* Keep solid background */
            box-shadow: 0 0 15px rgba(34, 197, 94, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
        }

        /* Status Badge (Pill) - Modern & Clean */
        .rfi-status-stamp {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 4px 12px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            background: var(--bg-panel);
            border: 1px solid var(--border);
            color: var(--text-muted);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            margin: 0;
            transform: none !important;
        }

        /* Modal Tag Layout (Top Right) */
        .doc-tag-stack {
            position: absolute;
            top: 24px;
            right: 24px;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 8px;
            z-index: 10;
        }

        .doc-type-badge {
            font-family: var(--font-tech);
            font-size: 11px;
            background: var(--bg-app);
            padding: 4px 8px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            font-weight: 600;
        }

        .date-input-wrapper {
            position: relative;
        }

        .date-input-hidden {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
        }

        #roleSelect {
            border-radius: 999px !important;
            padding: 0 16px !important;
            font-weight: 700 !important;
            letter-spacing: 0.5px;
            transition: all 0.2s ease;
        }

        /* =============================================
           ONBOARDING OVERLAY STYLES
           ============================================= */

        .onboarding-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 8000;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.4s ease;
        }

        .onboarding-overlay.hidden {
            opacity: 0;
            pointer-events: none;
            visibility: hidden;
        }

        .onboarding-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.50);
            /* No blur - content stays readable */
        }

        /* Panel positioning modifiers */
        .onboarding-panel.position-right {
            margin-left: auto;
            margin-right: 20px;
        }

        .onboarding-panel.position-top {
            align-self: flex-start;
            margin-top: 80px;
        }

        .onboarding-panel.position-center {
            transform: translateX(0);
            align-self: center;
        }


        /* Undimming class for elements that should be visible during onboarding (no highlight) */
        .onboarding-undim {
            position: relative !important;
            z-index: 8003 !important;
        }

        /* Undimming with highlight effect */
        .onboarding-undim-highlight {
            position: relative !important;
            z-index: 8003 !important;
            box-shadow: 0 0 0 4px #0696D7, 0 0 30px rgba(6, 150, 215, 0.4) !important;
        }

        .onboarding-highlight {
            box-shadow: 0 0 0 3px #0696D7, 0 0 20px rgba(6, 150, 215, 0.4) !important;
            border-radius: 8px;
        }

        /* Fake mouse cursor for demonstrations */
        .fake-mouse-cursor {
            position: fixed;
            width: 24px;
            height: 24px;
            pointer-events: none;
            z-index: 9999;
            transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .fake-mouse-cursor svg {
            width: 100%;
            height: 100%;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }

        .fake-mouse-cursor.clicking {
            transform: scale(0.85);
        }


        .onboarding-spotlight {
            position: absolute;
            border-radius: 12px;
            box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65),
                0 0 40px 8px rgba(6, 150, 215, 0.4);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
            z-index: 8001;
            opacity: 0;
        }

        .onboarding-spotlight.active {
            opacity: 1;
        }

        .onboarding-panel {
            position: relative;
            width: 480px;
            max-width: 90vw;
            background: rgba(255, 255, 255, 0.95);
            -webkit-backdrop-filter: blur(20px);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 16px;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25),
                0 10px 30px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            z-index: 8010;
            transition: transform 0.4s ease, margin 0.4s ease;
        }

        .onboarding-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            border-bottom: 1px solid #E2E8F0;
            background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
        }

        .onboarding-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-main);
            font-family: var(--font-brand);
            letter-spacing: 0.5px;
        }

        .onboarding-steps {
            display: flex;
            gap: 8px;
        }

        .step-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #CBD5E1;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .step-dot.active {
            background: #0696D7;
            box-shadow: 0 0 0 3px rgba(6, 150, 215, 0.2);
            transform: scale(1.2);
        }

        .step-dot.completed {
            background: #10B981;
        }

        .onboarding-content {
            padding: 28px 24px;
            min-height: 260px;
        }

        .onboarding-step-title {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 12px;
            font-family: var(--font-brand);
        }

        .onboarding-step-description {
            font-size: 14px;
            color: var(--text-muted);
            line-height: 1.6;
            margin-bottom: 24px;
        }

        .onboarding-step-usecase {
            background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
            border-left: 3px solid #0696D7;
            padding: 12px 16px;
            border-radius: 0 8px 8px 0;
            margin-bottom: 24px;
        }

        .onboarding-step-usecase span {
            font-size: 11px;
            font-weight: 700;
            color: #0696D7;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .onboarding-step-usecase p {
            font-size: 13px;
            color: #1E40AF;
            margin: 6px 0 0 0;
            line-height: 1.5;
        }

        /* Mouse Navigation Graphic */
        .mouse-graphic {
            display: flex;
            justify-content: center;
            gap: 40px;
            margin-top: 16px;
        }

        .mouse-control {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .mouse-control-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .mouse-svg {
            width: 60px;
            height: 100px;
            overflow: visible;
        }

        .mouse-body {
            fill: #F1F5F9;
            stroke: #94A3B8;
            stroke-width: 2;
        }

        .mouse-button {
            fill: #E2E8F0;
            stroke: #94A3B8;
            stroke-width: 1.5;
            transition: all 0.3s ease;
        }

        .mouse-button.active {
            fill: #0696D7;
            stroke: #0077B6;
        }

        .mouse-scroll {
            fill: #CBD5E1;
            stroke: #94A3B8;
            stroke-width: 1;
            transition: all 0.3s ease;
        }

        .mouse-scroll.active {
            fill: #0696D7;
            stroke: #0077B6;
        }

        .mouse-action-icon {
            fill: #64748B;
        }

        .mouse-action-icon.active {
            fill: #0696D7;
            animation: pulse-icon 1.5s infinite;
        }

        @keyframes pulse-icon {

            0%,
            100% {
                opacity: 1;
                transform: translateY(0);
            }

            50% {
                opacity: 0.6;
                transform: translateY(-2px);
            }
        }

        /* Keyboard Hint */
        .keyboard-hint {
            display: flex;
            justify-content: center;
            gap: 6px;
            margin-top: 20px;
        }

        .key-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            height: 32px;
            padding: 0 10px;
            background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
            border: 1px solid #CBD5E1;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            color: #475569;
            box-shadow: 0 2px 0 #CBD5E1;
            font-family: var(--font-tech);
        }

        .onboarding-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 24px;
            border-top: 1px solid #E2E8F0;
            background: #F8FAFC;
        }

        .onboarding-btn-skip {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 6px;
            transition: all 0.2s;
        }

        .onboarding-btn-skip:hover {
            background: #F1F5F9;
            color: var(--text-main);
        }

        .onboarding-btn-next {
            background: linear-gradient(135deg, #0696D7 0%, #0077B6 100%);
            border: none;
            color: white;
            font-size: 14px;
            font-weight: 600;
            padding: 12px 28px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 4px 12px rgba(6, 150, 215, 0.3);
        }

        .onboarding-btn-next:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(6, 150, 215, 0.4);
        }

        /* Feature highlight icons */
        .onboarding-icon-row {
            display: flex;
            gap: 16px;
            justify-content: center;
            margin-top: 16px;
        }

        .onboarding-feature-icon {
            width: 56px;
            height: 56px;
            border-radius: 12px;
            background: var(--bg-panel);
            border: 1px solid var(--card-border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }

        /* Mobile adjustments */
        @media (max-width: 600px) {
            .onboarding-panel {
                width: 95vw;
                max-height: 85vh;
                overflow-y: auto;
            }

            .onboarding-content {
                padding: 20px 16px;
                min-height: 200px;
            }

            .mouse-graphic {
                gap: 20px;
            }

            .mouse-svg {
                width: 48px;
                height: 80px;
            }
        }