        /* ── CSS Variables ─────────────────────────────────────────────── */
        @font-face {
            font-family: 'ITC Blaze';
            src: url('/static/fonts/Blaze-ITC.otf') format('opentype');
            font-weight: normal;
            font-style: normal;
        }

        :root {
            --gold: #D4AF37;
            --gold-light: #F0CE6F;
            --gold-dim: rgba(212, 175, 55, 0.15);
            --gold-glow: rgba(212, 175, 55, 0.30);
            --black: #0A0A0F;
            --surface: #111118;
            --glass: rgba(255, 255, 255, 0.04);
            --glass-hover: rgba(255, 255, 255, 0.08);
            --border: rgba(212, 175, 55, 0.25);
            --border-soft: rgba(255, 255, 255, 0.06);
            --text-primary: #F0F0F5;
            --text-muted: #7A7A8C;
            --text-gold: #D4AF37;
            --radius-lg: 16px;
            --radius-md: 12px;
            --radius-sm: 8px;
            --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.12);
            /* ── Gemini-inspired extensions ── */
            --gemini-purple: #9B6DFF;
            --gemini-blue: #4FC3F7;
            --gemini-pink: #F472B6;
            --spring: cubic-bezier(0.16, 1, 0.3, 1);
            --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.5);
            --sidebar-bg: #06060B;
            /* ── FSM Form overrides ── */
            --fsm-input-bg: rgba(10, 10, 15, 0.6);
            --fsm-dropdown-bg: #111118;
            --fsm-disabled-bg: #444;
            --fsm-disabled-color: #888;
        }

        /* ── Reset & Base ──────────────────────────────────────────────── */
        *,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        /* ── Global Scrollbar Styling (ThKorp identity) ─────────────────── */
        * {
            scrollbar-width: thin;
            scrollbar-color: rgba(212, 175, 55, 0.35) transparent;
        }
        *::-webkit-scrollbar {
            width: 5px;
            height: 5px;
        }
        *::-webkit-scrollbar-track {
            background: transparent;
        }
        *::-webkit-scrollbar-thumb {
            background: rgba(212, 175, 55, 0.35);
            border-radius: 999px;
        }
        *::-webkit-scrollbar-thumb:hover {
            background: rgba(212, 175, 55, 0.65);
        }

        /* ── Global Select Styling ───────────────────────────────────────── */
        select {
            appearance: none;
            background-color: var(--glass, rgba(255,255,255,0.05));
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: 8px;
            color: var(--text-primary, #F0F0F5);
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 13px;
            padding: 7px 28px 7px 10px;
            cursor: pointer;
            outline: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23D4AF37' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 9px center;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        select:focus {
            border-color: var(--gold, #D4AF37);
            box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
        }
        select option {
            background-color: #111118;
            color: #F0F0F5;
        }

        /* Light theme overrides */
        html[data-theme="light"] * {
            scrollbar-color: rgba(138, 101, 0, 0.4) transparent;
        }
        html[data-theme="light"] *::-webkit-scrollbar-thumb {
            background: rgba(138, 101, 0, 0.4);
        }
        html[data-theme="light"] *::-webkit-scrollbar-thumb:hover {
            background: rgba(138, 101, 0, 0.7);
        }
        html[data-theme="light"] select {
            background-color: rgba(255,255,255,0.7);
            border-color: rgba(138, 101, 0, 0.3);
            color: #1C0F00;
        }
        html[data-theme="light"] select option {
            background-color: #F2EBD9;
            color: #1C0F00;
        }

        /* Golden theme overrides */
        html[data-theme="golden"] * {
            scrollbar-color: rgba(196, 148, 26, 0.45) transparent;
        }
        html[data-theme="golden"] *::-webkit-scrollbar-thumb {
            background: rgba(196, 148, 26, 0.45);
        }
        html[data-theme="golden"] *::-webkit-scrollbar-thumb:hover {
            background: rgba(196, 148, 26, 0.75);
        }
        html[data-theme="golden"] select {
            background-color: rgba(196, 148, 26, 0.1);
            border-color: rgba(196, 148, 26, 0.45);
            color: #1C0F00;
        }
        html[data-theme="golden"] select option {
            background-color: #2A1F00;
            color: #F0CE6F;
        }

        html,
        body {
            height: 100%;
            overflow: hidden;
        }

        body {
            font-family: var(--brand-font, 'Inter', sans-serif);
            background-color: var(--black);
            color: var(--text-primary);
            display: flex;
            flex-direction: row;
            /* Changed to row for sidebar */
            line-height: 1.5;
        }

        #main-layer {
            display: flex;
            flex-direction: column;
            flex: 1;
            position: relative;
            overflow: hidden;
            height: 100vh;
        }

        /* ── Left Sidebar ────────────────────────────────────────────── */
        #left-sidebar {
            width: 280px;
            background: var(--sidebar-bg, #06060B);
            border-right: 1px solid rgba(255, 255, 255, 0.06);
            display: flex;
            flex-direction: column;
            z-index: 20;
            transition: width 0.3s var(--spring), transform 0.3s var(--spring);
            flex-shrink: 0;
        }

        /* ── Sidebar Logo Header ── */
        .sidebar-logo-header {
            padding: 14px 16px 12px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            flex-shrink: 0;
            min-height: 56px;
        }
        .sidebar-logo-text {
            font-family: var(--brand-font, 'Outfit', var(--brand-font, 'Inter', sans-serif));
            font-size: 20px;
            color: var(--gold);
            line-height: 1;
            flex-shrink: 0;
            filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
        }
        .sidebar-logo-info {
            flex: 1;
            min-width: 0;
        }
        .sidebar-logo-info > div:first-child {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .sidebar-logo-sub {
            font-family: var(--brand-font, 'Outfit', 'Inter', sans-serif);
            font-size: 10px;
            color: var(--text-muted);
            letter-spacing: 0.3px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .sidebar-toggle-btn {
            margin-left: auto;
            flex-shrink: 0;
        }

        .new-chat-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            width: calc(100% - 20px);
            margin: 10px;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 10px;
            color: var(--text-muted);
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s var(--spring);
            position: relative;
            overflow: hidden;
        }
        .new-chat-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.07), transparent);
            transform: translateX(-200%);
            transition: transform 0.6s ease;
        }
        .new-chat-btn:hover {
            background: rgba(255, 255, 255, 0.07);
            border-color: rgba(212, 175, 55, 0.22);
            color: var(--text-primary);
            transform: translateX(2px);
        }
        .new-chat-btn:hover::after {
            transform: translateX(200%);
        }

        .conv-list {
            flex: 1;
            overflow-y: auto;
            padding: 0 12px;
        }

        .conv-item {
            padding: 8px 12px;
            border-radius: 8px;
            color: var(--text-muted);
            font-size: 13px;
            cursor: pointer;
            margin-bottom: 2px;
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: all 0.2s var(--spring);
            position: relative;
            line-height: 1.4;
        }
        .conv-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%) scaleY(0);
            width: 2px;
            height: 55%;
            background: var(--gold);
            border-radius: 2px;
            transition: transform 0.25s var(--spring);
        }
        .conv-item:hover,
        .conv-item.active {
            background: rgba(255, 255, 255, 0.055);
            color: var(--text-primary);
            padding-left: 16px;
        }
        .conv-item.active::before,
        .conv-item:hover::before {
            transform: translateY(-50%) scaleY(1);
        }

        /* ── Left Sidebar Tabs ───────────────────────────────────────── */
        .sidebar-tabs {
            display: flex;
            padding: 12px 12px 0 12px;
            gap: 10px;
            border-bottom: 1px solid var(--border-soft);
        }

        .sidebar-tab {
            flex: 1;
            padding: 8px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            border-bottom: 2px solid transparent;
            transition: all 0.2s;
        }
        .sidebar-tab-icon {
            width: 14px;
            height: 14px;
            stroke-width: 2.2px;
            flex-shrink: 0;
        }

        .sidebar-tab.active {
            color: var(--gold);
            border-bottom-color: var(--gold);
        }

        .sidebar-content-pane {
            display: none;
            flex-direction: column;
            flex: 1;
            overflow-y: auto;
        }

        .sidebar-content-pane.active {
            display: flex;
        }

        .sub-member-item {
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        }

        .sub-member-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .sub-member-header:hover {
            color: var(--gold);
        }

        .sub-session-list {
            margin-top: 8px;
            padding-left: 12px;
            display: none;
        }

        .sub-session-list.open {
            display: block;
        }

        .sub-session-item {
            font-size: 12px;
            color: var(--text-muted);
            padding: 6px 0;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .sub-session-item:hover {
            color: #fff;
        }

        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        .outfit,
        th,
        button,
        select,
        input,
        .brand-title,
        .status-badge {
            font-family: var(--brand-font, 'Outfit', 'Inter', sans-serif);
            letter-spacing: -0.01em;
        }

        /* ── Animated background ───────────────────────────────────────── */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background:
                radial-gradient(ellipse 80% 60% at 10% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 90% 100%, rgba(212, 175, 55, 0.04) 0%, transparent 55%);
            pointer-events: none;
            z-index: 0;
        }

        /* ── Header ────────────────────────────────────────────────────── */
        header {
            position: relative;
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            height: 56px;
            flex-shrink: 0;
            background: rgba(6, 6, 11, 0.96);
            backdrop-filter: blur(32px) saturate(200%);
            -webkit-backdrop-filter: blur(32px) saturate(200%);
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .header-brand {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .header-title {
            font-family: var(--brand-font, 'Outfit', var(--brand-font, 'Inter', sans-serif));
            font-size: 26px;
            color: var(--gold);
            line-height: 1;
            padding-right: 4px;
        }

        .brand-icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, var(--gold), #8B7020);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
            animation: pulse-subtle 3s ease-in-out infinite;
        }

        @keyframes pulse-subtle {

            0%,
            100% {
                box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
            }

            50% {
                box-shadow: 0 2px 20px rgba(212, 175, 55, 0.5);
            }
        }

        .brand-text {
            display: flex;
            flex-direction: column;
            line-height: 1.2;
        }

        .brand-title {
            font-family: var(--brand-font, 'Outfit', 'Inter', sans-serif);
            font-size: 15px;
            font-weight: 700;
            color: var(--gold);
            letter-spacing: -0.01em;
        }

        .brand-version {
            font-size: 10px;
            color: var(--text-muted);
            font-weight: 400;
        }

        /* Status indicator */
        .status-badge {
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: var(--brand-font, 'Outfit', 'Inter', sans-serif);
            font-size: 11px;
            color: var(--text-muted);
            padding: 4px 10px;
            background: var(--glass);
            border: 1px solid var(--border-soft);
            border-radius: 20px;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .status-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #4CAF50;
            box-shadow: 0 0 6px #4CAF50;
            animation: blink 2s ease-in-out infinite;
        }

        .status-dot.offline {
            background: #f44336;
            box-shadow: 0 0 6px #f44336;
            animation: none;
        }

        @keyframes blink {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.4;
            }
        }

        /* Persona selector */
        #persona-selector {
            appearance: none;
            background: var(--glass);
            border: 1px solid var(--border);
            color: var(--text-primary);
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 13px;
            padding: 6px 28px 6px 12px;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D4AF37' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
        }

        #persona-selector:focus {
            outline: none;
            border-color: var(--gold);
        }

        #persona-selector option {
            background: #1A1A24;
        }

        /* ── Chat Window ───────────────────────────────────────────────── */
        #chat-window {
            flex: 1;
            overflow-y: auto;
            padding: 24px 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: relative;
            z-index: 1;
            scroll-behavior: smooth;
        }

        /* Custom scrollbar */
        #chat-window::-webkit-scrollbar {
            width: 4px;
        }

        #chat-window::-webkit-scrollbar-track {
            background: transparent;
        }

        #chat-window::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 4px;
        }

        /* Summary blocks (like Résumé Exécutif) */
        .executive-summary {
            font-style: italic;
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: var(--radius-md);
            padding: 16px;
            margin: 12px 0;
            background: rgba(212, 175, 55, 0.05);
            color: var(--text-primary);
            font-size: 0.95em;
            line-height: 1.7;
        }

        .bi-section-title {
            font-family: var(--brand-font, 'Outfit', 'Inter', sans-serif);
            font-size: 0.9rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--gold);
            margin: 22px 0 12px 0;
            display: flex;
            align-items: center;
            gap: 10px;
            line-height: 1.2;
        }

        .bi-section-title::before {
            content: '';
            display: inline-block;
            width: 3px;
            height: 16px;
            background: var(--gold);
            border-radius: 2px;
        }

        /* ── Messages ──────────────────────────────────────────────────── */
        .message-wrapper {
            display: flex;
            flex-direction: column;
            animation: slide-in 0.38s var(--spring);
            max-width: 1000px;
            margin: 0 auto;
            width: 100%;
        }

        .message-wrapper.user {
            align-items: flex-end;
        }

        .message-wrapper.bot {
            align-items: flex-start;
            flex-direction: row;
            gap: 12px;
        }

        .message-wrapper.bot.system-notification {
            flex-direction: column;
            align-items: center;
        }

        .message-wrapper.bot .message-body {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            flex: 1;
            min-width: 0;
        }

        @keyframes slide-in {
            from {
                opacity: 0;
                transform: translateY(16px) scale(0.985);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .message {
            max-width: 85%;
            padding: 12px 18px;
            font-size: 15.5px;
            line-height: 1.65;
            word-break: break-word;
        }

        .user-message {
            background: #1e1f20 !important;
            color: #e3e3e3 !important;
            border-radius: 20px !important;
            border: none !important;
            box-shadow: none !important;
        }

        .bot-message {
            background: rgba(255, 255, 255, 0.035) !important;
            color: #e3e3e3 !important;
            border-radius: 20px !important;
            border: 1px solid rgba(255, 255, 255, 0.06) !important;
            padding: 14px 20px !important;
            max-width: 85% !important;
            box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
        }

        .bot-message b {
            color: var(--gold-light);
        }

        .error-message {
            border-color: rgba(239, 68, 68, 0.4) !important;
            background: rgba(239, 68, 68, 0.05) !important;
            box-shadow: 0 2px 20px rgba(239, 68, 68, 0.08) !important;
        }

        .message-time {
            font-size: 10px;
            color: var(--text-muted);
            margin-top: 4px;
            padding: 0 4px;
        }

        /* Typing indicator */
        .typing-indicator {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            padding: 12px 0 !important;
            width: 100%;
            max-width: 450px;
            display: flex !important;
            flex-direction: column;
            gap: 8px;
            height: auto !important;
        }

        .typing-indicator::before,
        .typing-indicator::after {
            content: '';
            height: 10px;
            border-radius: 5px;
            background: linear-gradient(90deg, 
                rgba(255, 255, 255, 0.04) 0%, 
                rgba(212, 175, 55, 0.25) 30%, 
                rgba(155, 109, 255, 0.25) 50%, 
                rgba(79, 195, 247, 0.25) 70%, 
                rgba(255, 255, 255, 0.04) 100%
            );
            background-size: 200% 100%;
            animation: gemini-shimmer 1.8s infinite linear;
            width: 100%;
        }

        .typing-indicator::after {
            width: 65%;
            animation-delay: 0.25s;
        }

        .typing-dot {
            display: none !important;
        }

        @keyframes gemini-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        /* Result table */
        .result-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
            font-size: 12px;
        }

        .result-table th {
            background: var(--gold-dim);
            color: var(--gold);
            padding: 6px 8px;
            text-align: left;
            font-weight: 600;
            border-bottom: 1px solid var(--border);
        }

        .result-table td {
            padding: 6px 8px;
            border-bottom: 1px solid var(--border-soft);
            color: var(--text-primary);
        }

        .result-table tr:last-child td {
            border-bottom: none;
        }

        .result-table tr:hover td {
            background: var(--glass-hover);
        }

        /* ── BI Reports & Content ─────────────────────────────────────── */
        .bi-report-header {
            padding: 12px 18px;
            background: var(--gold-dim);
            border-bottom: 1px solid var(--border);
            font-size: 14px;
            font-weight: 700;
            color: var(--gold);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .bi-report-content {
            padding: 18px 22px;
            font-size: 14px;
            line-height: 1.7;
            color: var(--text-primary);
            max-height: 500px;
            overflow-y: auto;
        }

        .bi-report-content b {
            color: var(--gold-light);
        }

        /* ── Charts ───────────────────────────────────────────────────── */
        .chart-container {
            margin: 16px 0;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border-soft);
            border-radius: var(--radius-md);
            padding: 12px;
            position: relative;
        }

        .chart-export-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--gold-dim);
            border: 1px solid var(--gold);
            color: var(--gold);
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 10px;
            cursor: pointer;
            z-index: 10;
        }

        /* ── Export Chips ──────────────────────────────────────────────── */
        .export-buttons {
            display: flex;
            gap: 8px;
            margin-top: 10px;
            flex-wrap: wrap;
        }

        .chip-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 5px 10px;
            font-size: 11px;
            font-weight: 600;
            border-radius: 6px;
            cursor: pointer;
            border: 1px solid var(--border-soft);
            background: var(--glass);
            color: var(--text-muted);
            transition: all 0.2s;
        }

        .chip-btn:hover {
            border-color: var(--gold);
            color: var(--gold);
            transform: translateY(-1px);
        }



        .bi-report-content ul,
        .bi-report-content ol {
            padding-left: 24px;
            margin: 12px 0;
            list-style-position: outside;
            /* Crucial pour l'alignement propre */
        }

        .bi-report-content li {
            margin-bottom: 10px;
            padding-left: 4px;
            /* Un peu d'air après le numéro */
        }

        .odoo-table-wrapper {
            margin: 16px 0;
            padding: 0 4px;
            /* Un peu d'air autour du tableau */
        }

        /* ── BI UI Kit ────────────────────────────────────────────────── */
        .bi-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(212, 175, 55, 0.15);
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .bi-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
            gap: 12px;
            margin: 16px 0;
        }

        .bi-stat-value {
            font-size: 1.25em;
            font-weight: 700;
            color: var(--gold);
            margin-top: 4px;
            white-space: nowrap;
            /* Empêche le point de tomber à la ligne */
        }

        .bi-stat-label {
            font-size: 0.75em;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .bi-section-title {
            font-size: 1.1em;
            font-weight: 600;
            color: var(--gold);
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 22px 0 14px;
        }

        .bi-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 8px 16px;
            background: var(--gold);
            color: #000;
            border: none;
            border-radius: var(--radius-sm);
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            text-decoration: none;
            box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
        }

        .bi-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
            filter: brightness(1.1);
        }

        .bi-button:active {
            transform: translateY(0);
        }

        /* ── Suggestions chips ─────────────────────────────────────────── */
        #suggestions-bar {
            display: flex;
            gap: 8px;
            padding: 10px 16px 28px !important;
            overflow-x: auto !important;
            overflow-y: hidden !important;
            flex-shrink: 0;
            z-index: 2;
            order: 11;
            max-width: 1000px;
            margin: 0 auto;
            width: 100%;
            scrollbar-width: thin !important;
            scrollbar-color: var(--gold) transparent !important;
        }
        #suggestions-bar::-webkit-scrollbar {
            height: 6px !important;
            display: block !important;
        }
        #suggestions-bar::-webkit-scrollbar-thumb {
            background: rgba(196, 148, 26, 0.4) !important;
            border-radius: 3px !important;
        }
        #suggestions-bar::-webkit-scrollbar-thumb:hover {
            background: rgba(196, 148, 26, 0.7) !important;
        }
        #suggestions-bar::-webkit-scrollbar-track {
            background: transparent !important;
        }

        .suggestion-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 12.5px;
            font-weight: 500;
            color: var(--text-muted);
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 24px;
            white-space: nowrap;
            cursor: pointer;
            transition: all 0.25s var(--spring);
            flex-shrink: 0;
        }

        .suggestion-chip:hover {
            background: rgba(212, 175, 55, 0.1);
            border-color: rgba(212, 175, 55, 0.42);
            color: var(--gold);
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
        }

        /* ── Confirmation Dialog ───────────────────────────────────────── */
        #confirmation-dialog {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(8px);
            align-items: center;
            justify-content: center;
            padding: 20px;
            z-index: 100;
            animation: fade-in 0.2s ease;
        }

        #confirmation-dialog.active {
            display: flex;
        }

        /* ── Location Dialog ───────────────────────────────────────────── */
        #location-dialog {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(8px);
            align-items: center;
            justify-content: center;
            padding: 20px;
            z-index: 100;
            animation: fade-in 0.2s ease;
        }

        /* ── Capabilities Dialog ────────────────────────────────────────── */
        #capabilities-dialog {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(8px);
            align-items: center;
            justify-content: center;
            padding: 20px;
            z-index: 100;
            animation: fade-in 0.2s ease;
        }

        .capabilities-tabs-scrollbar::-webkit-scrollbar {
            height: 4px;
        }
        .capabilities-tabs-scrollbar::-webkit-scrollbar-thumb {
            background: rgba(212,175,55,0.3);
            border-radius: 2px;
        }
        .capabilities-tabs-scrollbar::-webkit-scrollbar-track {
            background: transparent;
        }

        @keyframes fade-in {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .dialog-box {
            background: #13131E;
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            max-width: 440px;
            width: 100%;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), var(--shadow-gold);
            animation: dialog-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes dialog-pop {
            from {
                opacity: 0;
                transform: scale(0.9);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .dialog-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-soft);
            background: var(--gold-dim);
        }

        .dialog-header-icon {
            font-size: 20px;
        }

        .dialog-header-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--gold);
        }

        .dialog-body {
            padding: 16px 20px;
            max-height: 55vh;
            overflow-y: auto;
        }

        .dialog-summary {
            font-size: 14px;
            color: var(--text-primary);
            line-height: 1.6;
            margin-bottom: 14px;
        }

        .dialog-data {
            background: var(--glass);
            border: 1px solid var(--border-soft);
            border-radius: var(--radius-sm);
            overflow: hidden;
        }

        .dialog-data-row {
            display: flex;
            min-height: 32px;
            align-items: stretch;
        }

        .dialog-data-row:not(:last-child) {
            border-bottom: 1px solid var(--border-soft);
        }

        .dialog-data-key {
            min-width: 120px;
            padding: 6px 12px;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            background: rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
        }

        .dialog-data-value {
            padding: 6px 12px;
            font-size: 13px;
            color: var(--text-primary);
            word-break: break-word;
        }

        .dialog-actions {
            display: flex;
            gap: 10px;
            padding: 14px 20px;
            border-top: 1px solid var(--border-soft);
        }

        .btn-confirm {
            flex: 1;
            padding: 11px;
            background: linear-gradient(135deg, var(--gold), #A88C24);
            color: #000;
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 14px;
            font-weight: 700;
            border: none;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: opacity 0.2s, transform 0.1s;
        }

        .btn-confirm:hover {
            opacity: 0.9;
            transform: scale(1.01);
        }

        .btn-confirm:active {
            transform: scale(0.98);
        }

        .btn-cancel {
            flex: 1;
            padding: 11px;
            background: transparent;
            color: var(--text-muted);
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 14px;
            font-weight: 500;
            border: 1px solid var(--border-soft);
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: color 0.2s, border-color 0.2s;
        }

        .btn-cancel:hover {
            color: var(--text-primary);
            border-color: var(--text-muted);
        }

        /* ── Input Footer ──────────────────────────────────────────────── */
        footer {
            position: relative;
            z-index: 10;
            padding: 10px 20px 18px;
            background: rgba(10, 10, 15, 0.92);
            backdrop-filter: blur(24px);
            border-top: 1px solid var(--border);
            order: 10;
        }
        footer:has(#attachment-preview-container:not(.hidden)),
        footer.has-attachment {
            padding-bottom: 32px !important;
        }

        /* ── Staged Attachment Preview ── */
        #attachment-preview-container {
            display: flex;
            gap: 10px;
            padding: 8px 12px;
            background: rgba(212, 175, 55, 0.04);
            border: 1px solid var(--border-soft);
            border-radius: var(--radius-md);
            margin-bottom: 10px;
            margin-left: auto;
            margin-right: auto;
            max-width: 1000px;
            width: calc(100% - 0px);
            align-items: center;
            animation: slide-up 0.25s var(--spring);
        }
        #attachment-preview-container.hidden {
            display: none !important;
        }
        .attachment-preview-card {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            overflow: hidden;
        }
        .attachment-preview-icon {
            width: 36px;
            height: 36px;
            background: var(--gold-dim);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            flex-shrink: 0;
        }
        .attachment-preview-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
        }
        .attachment-preview-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            overflow: hidden;
        }
        .attachment-preview-name {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .attachment-preview-size {
            font-size: 10px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .btn-remove-attachment {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 16px;
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s, transform 0.1s;
        }
        .btn-remove-attachment:hover {
            color: #f44336;
            transform: scale(1.15);
        }
        @keyframes slide-up {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .input-bar {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            background: #1e1f20;
            border: 1px solid transparent;
            border-radius: 28px;
            padding: 10px 10px 10px 20px;
            transition: all 0.3s var(--spring);
            max-width: 1000px;
            margin: 0 auto;
            box-shadow: 0 0 12px 2px rgba(212, 175, 55, 0.12), 0 4px 24px rgba(0, 0, 0, 0.25);
        }

        .input-bar:focus-within {
            border-color: rgba(212, 175, 55, 0.35);
            box-shadow: 0 0 16px 4px rgba(212, 175, 55, 0.22), 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        #user-input {
            flex: 1;
            background: transparent;
            border: none;
            outline: none;
            color: var(--text-primary);
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 15px;
            caret-color: var(--gold);
            min-height: 24px;
            max-height: 160px;
            resize: none;
            line-height: 1.55;
            overflow-y: auto;
            scrollbar-width: none;
        }

        #user-input::-webkit-scrollbar { display: none; }

        #user-input::placeholder {
            color: var(--text-muted);
        }

        .icon-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            background: transparent;
            cursor: pointer;
            font-size: 18px;
            color: var(--text-muted);
            transition: background 0.2s, color 0.2s, transform 0.1s;
            flex-shrink: 0;
        }

        .icon-btn:hover {
            background: var(--glass-hover);
            color: var(--gold);
            transform: scale(1.1);
        }

        .icon-btn:active {
            transform: scale(0.95);
        }

        .icon-btn.recording {
            background: rgba(244, 67, 54, 0.2);
            color: #f44336;
            animation: recording-pulse 1s ease-in-out infinite;
        }

        @keyframes recording-pulse {

            0%,
            100% {
                box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4);
            }

            50% {
                box-shadow: 0 0 0 8px rgba(244, 67, 54, 0);
            }
        }


        /* ── Drag & Drop Overlay ─────────────────────────────────────── */
        #drag-overlay {
            position: fixed;
            inset: 0;
            background: rgba(10, 10, 15, 0.9);
            z-index: 1000;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 2px dashed var(--gold);
            margin: 20px;
            border-radius: var(--radius-lg);
            pointer-events: none;
        }

        #drag-overlay.visible {
            display: flex;
            animation: fadeIn 0.2s ease-out;
        }

        .drag-icon {
            font-size: 64px;
            margin-bottom: 20px;
            animation: bounce 2s infinite;
        }

        .drag-text {
            font-size: 20px;
            font-weight: 600;
            color: var(--gold);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(1.02);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes bounce {

            0%,
            20%,
            50%,
            80%,
            100% {
                transform: translateY(0);
            }

            40% {
                transform: translateY(-20px);
            }

            60% {
                transform: translateY(-10px);
            }
        }

        /* ── Suggestion Chips (FSM) ──────────────────────────────────── */
        .bi-button {
            background: rgba(212, 175, 55, 0.08);
            border: 1px solid var(--border);
            color: var(--gold);
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: normal;
            max-width: 100%;
            text-align: center;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            word-break: break-word;
        }

        .bi-button:hover {
            background: rgba(212, 175, 55, 0.15);
            border-color: var(--gold);
            box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
            transform: translateY(-1px);
        }

        .bi-button:active {
            transform: translateY(0);
        }

        /* ── File Cards (WhatsApp style) ─────────────────────────────── */
        .file-card {
            display: flex;
            align-items: center;
            gap: 12px;
            background: rgba(212, 175, 55, 0.04);
            border: 1px solid var(--border-soft);
            border-radius: var(--radius-md);
            padding: 10px 14px;
            margin: 6px 0;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .file-card:hover {
            background: rgba(212, 175, 55, 0.08);
            border-color: var(--border);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .file-icon {
            width: 42px;
            height: 42px;
            background: var(--gold-dim);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            flex-shrink: 0;
            box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1);
        }

        .file-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            overflow: hidden;
        }

        .file-name {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .file-meta {
            font-size: 10px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.4px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .file-meta::after {
            content: '•';
            opacity: 0.5;
        }

        .file-status {
            font-size: 10px;
            color: var(--gold);
            font-weight: 500;
            font-style: italic;
        }

        /* ── Export Buttons ─────────────────────────────────────────── */
        .export-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }

        .chip-btn {
            padding: 6px 12px;
            font-size: 11px;
            font-weight: 600;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #fff;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .chip-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
            filter: brightness(1.1);
        }

        .chip-btn.docx {
            background: #2b579a !important;
            color: #ffffff !important;
            border-color: #1a4175 !important;
        }

        .chip-btn.xlsx {
            background: #217346 !important;
            color: #ffffff !important;
            border-color: #165231 !important;
        }

        .chip-btn.pptx {
            background: #b7472a !important;
            color: #ffffff !important;
            border-color: #92341d !important;
        }

        .chip-btn.pdf {
            background: #f44336 !important;
            color: #ffffff !important;
            border-color: #c62828 !important;
        }

        .chip-btn.csv {
            background: #607d8b !important;
            color: #ffffff !important;
            border-color: #455a64 !important;
        }

        .chip-btn.html {
            background: #334155 !important;
            color: #ffffff !important;
            border-color: #1e293b !important;
        }

        /* ── Modals & Dialogs (Unified) ────────────────────────────── */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(10px);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            padding: 20px;
            animation: fadeIn 0.3s ease;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-container {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-gold);
            width: 500px;
            max-width: 100%;
            max-height: 95vh;
            display: flex;
            flex-direction: column;
            animation: dialog-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .modal-container.large {
            width: 900px;
            height: 85vh;
        }

        .modal-header {
            padding: 16px 24px;
            border-bottom: 1px solid var(--border-soft);
            background: var(--gold-dim);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-body {
            padding: 24px;
            overflow-y: auto;
            flex: 1;
        }

        .modal-footer {
            padding: 16px 24px;
            border-top: 1px solid var(--border-soft);
            background: rgba(0, 0, 0, 0.2);
            text-align: right;
        }

        /* ── Forms ─────────────────────────────────────────────────── */
        .form-group {
            margin-bottom: 16px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-label {
            font-size: 11px;
            font-weight: 700;
            color: var(--gold-dim);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .form-input {
            background: var(--glass);
            border: 1px solid var(--border-soft);
            color: #fff;
            padding: 12px 14px;
            border-radius: var(--radius-sm);
            font-family: inherit;
            transition: border-color 0.2s;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--gold);
        }

        /* Prevent Chrome blue autofill */
        .form-input:-webkit-autofill,
        .form-input:-webkit-autofill:hover,
        .form-input:-webkit-autofill:focus {
            -webkit-text-fill-color: #fff;
            -webkit-box-shadow: 0 0 0px 1000px var(--surface) inset;
            transition: background-color 5000s ease-in-out 0s;
        }

        .modal-container.large {
            width: 700px;
            max-width: 95vw;
        }

        /* ── Workspace Sidebar ────────────────────────────────────────── */
        #workspace-sidebar {
            position: fixed;
            top: 65px;
            bottom: 0;
            right: -380px;
            width: 360px;
            background: rgba(15, 15, 20, 0.98);
            backdrop-filter: blur(25px);
            border-left: 1px solid var(--border);
            box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
            z-index: 100;
            transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            padding: 24px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        #workspace-sidebar.active {
            right: 0;
        }

        .sidebar-section-title {
            color: var(--gold);
            font-size: 18px;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--border-soft);
            padding-bottom: 12px;
            font-weight: 700;
        }

        /* Utility spacing */
        .sidebar-settings-btn {
            border: 1px solid var(--gold) !important;
            color: var(--gold) !important;
            margin: 0 !important;
            width: 100% !important;
            font-size: 11px !important;
        }

        .dialog-correction {
            display: flex;
            gap: 8px;
            margin-top: 10px;
            padding: 15px 24px;
            background: rgba(255, 255, 255, 0.02);
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .hidden {
            display: none;
        }

        /* ── Mobile Responsiveness ───────────────────────────────────── */
        .mobile-menu-btn {
            display: none;
            background: transparent;
            border: none;
            color: var(--gold);
            font-size: 24px;
            cursor: pointer;
            padding: 5px;
        }

        #mobile-sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 15;
            backdrop-filter: blur(3px);
            opacity: 0;
            transition: opacity 0.3s;
        }

        #mobile-sidebar-overlay.active {
            display: block;
            opacity: 1;
        }

        @media (max-width: 768px) {
            body {
                flex-direction: column;
            }

            .brand-text {
                display: none !important;
            }

            .mobile-menu-btn {
                display: block;
            }

            #left-sidebar {
                position: fixed;
                top: 0;
                bottom: 0;
                left: -280px;
                width: 280px;
                z-index: 30;
                box-shadow: none;
                transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            }

            #left-sidebar.active {
                left: 0;
                box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
            }

            .header-brand {
                gap: 5px;
            }

            .brand-icon {
                width: 30px;
                height: 30px;
                font-size: 16px;
            }

            .brand-title {
                font-size: 13px;
            }

            header {
                padding: 10px 12px;
            }

            #chat-window {
                padding: 10px 8px;
            }

            .message {
                max-width: 92%;
                font-size: 13px;
                padding: 10px 12px;
            }

            .bi-grid {
                grid-template-columns: 1fr 1fr;
            }

            .dialog-box {
                margin: 10px;
                max-height: 90vh;
                overflow-y: auto;
            }

            .dialog-data-row {
                flex-direction: column;
                align-items: flex-start;
            }

            .dialog-data-key {
                width: 100%;
                background: rgba(212, 175, 55, 0.1);
                border-bottom: 1px solid var(--border-soft);
            }

            #persona-selector {
                padding: 6px 20px 6px 8px;
                font-size: 12px;
            }

            .status-badge {
                display: none;
                /* Hide 'Connecté' text to save space on mobile */
            }

            .input-bar {
                padding: 4px;
            }

            /* Prevent message deformation on mobile */
            .bot-message, .user-message {
                max-width: 92% !important;
                box-sizing: border-box !important;
                word-wrap: break-word !important;
                overflow-wrap: break-word !important;
            }
            .bot-message {
                width: 100% !important;
            }
            
            /* Horizontal scrolling for tables and other wide blocks inside messages on mobile */
            .bot-message .odoo-table-wrapper,
            .bot-message .result-table,
            .bot-message table,
            .bot-message pre,
            .bot-message .bi-report-content,
            .bot-message .bi-card,
            .bot-message .chart-container {
                max-width: 100% !important;
                overflow-x: auto !important;
                display: block !important;
                -webkit-overflow-scrolling: touch;
                margin-top: 8px !important;
                margin-bottom: 8px !important;
            }

            .icon-btn {
                width: 30px;
                height: 30px;
                font-size: 16px;
            }

            #user-input {
                font-size: 13px;
            }

            #btn-send {
                width: 32px;
                height: 32px;
                font-size: 14px;
            }

            .modal-container {
                width: 95vw;
                padding: 0;
            }

            #workspace-sidebar {
                width: 100%;
                right: -100%;
            }

            .admin-grid, #admin-budget-form {
                grid-template-columns: 1fr !important;
            }

            /* Hide sidebar collapse button on mobile – not needed */
            #sidebar-collapse-btn {
                display: none !important;
            }

            /* Tighter startup block on mobile: hero + suggestions + input as one unit */
            body.centered-layout #hero-welcome {
                margin-bottom: 0 !important;
                padding-bottom: 8px !important;
            }
            body.centered-layout #suggestions-bar {
                margin-top: 0 !important;
                padding-top: 4px !important;
                padding-bottom: 4px !important;
            }
            body.centered-layout footer {
                padding-top: 4px !important;
            }
        }

        /* ── Gemini-like Centered Layout & Smooth Transitions ── */
        #chat-window {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.5s ease-out, transform 0.5s var(--spring);
        }
        body.centered-layout #chat-window {
            opacity: 0 !important;
            transform: translateY(30px);
            pointer-events: none;
            height: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
            flex: none !important;
        }
        body.centered-layout #hero-welcome {
            opacity: 1;
            transform: translateY(0);
            max-height: 1000px;
            margin-top: auto !important;
            margin-bottom: 0 !important;
            order: 1 !important;
        }
        body:not(.centered-layout) #hero-welcome {
            opacity: 0;
            transform: translateY(-40px);
            max-height: 0;
            padding-top: 0;
            padding-bottom: 0;
            margin: 0;
            pointer-events: none;
        }
        body.centered-layout #suggestions-bar {
            justify-content: center;
            flex-wrap: nowrap;
            order: 2 !important;
            padding: 8px 20px 8px !important;
            max-width: 1000px;
            margin: 4px auto 0 !important;
            width: 100%;
            align-self: center !important;
        }
        body.centered-layout footer {
            position: relative;
            background: transparent !important;
            border: none !important;
            padding: 8px 20px 0;
            order: 3 !important;
            margin-bottom: auto !important;
            margin-top: 0 !important;
        }
        body.centered-layout footer:has(#attachment-preview-container:not(.hidden)),
        body.centered-layout footer.has-attachment {
            padding-bottom: 32px !important;
        }
        body.centered-layout .input-bar {
            background: #1e1f20;
            border: none;
            box-shadow: 0 0 16px 2px rgba(212, 175, 55, 0.15), 0 8px 32px rgba(0, 0, 0, 0.35);
        }
        body.centered-layout #user-input {
            font-size: 16px;
        }
        /* Mobile: stack suggestions vertically at startup */
        @media (max-width: 768px) {
            body.centered-layout #suggestions-bar {
                flex-direction: column !important;
                align-items: center !important;
                overflow-x: hidden !important;
                overflow-y: visible !important;
                padding: 4px 16px 8px !important;
                gap: 6px !important;
            }
            body.centered-layout #suggestions-bar .suggestion-chip {
                width: 100%;
                max-width: 360px;
                justify-content: center;
            }
        }

        /* ── Hero Welcome ─────────────────────────────────────── */
        #hero-welcome {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            order: 1;
            padding: 56px 20px 44px;
            overflow: hidden;
            opacity: 1;
            transform: translateY(0);
            max-height: 1000px;
            transition: opacity 0.4s ease-out, transform 0.4s var(--spring), max-height 0.5s ease-out, padding 0.4s ease-out;
            max-width: 800px;
            width: 100%;
            margin: 0 auto;
        }

        @keyframes hero-fade-in {
            from { opacity: 0; transform: translateY(24px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .hero-greeting {
            font-family: var(--brand-font, 'Inter', sans-serif);
            font-size: 11px;
            font-weight: 600;
            color: var(--gold);
            text-transform: uppercase;
            letter-spacing: 2.5px;
            margin-bottom: 20px;
            opacity: 0.85;
            display: flex;
            align-items: center;
            gap: 8px;
            animation: hero-fade-in 0.5s var(--spring) 0.05s both;
        }

        .hero-title {
            font-family: var(--brand-font, 'Outfit', 'Inter', sans-serif);
            font-size: clamp(36px, 5.8vw, 66px);
            font-weight: 300;
            text-align: center;
            line-height: 1.1;
            margin: 0 auto 18px;
            max-width: 800px;
            width: 100%;
            letter-spacing: -0.025em;
            background: linear-gradient(135deg,
                var(--text-primary) 0%,
                var(--gold-light) 28%,
                #C084FC 55%,
                #4FC3F7 80%,
                var(--gold) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            background-size: 300% 300%;
            animation: gradient-shift 5s ease-in-out infinite;
        }

        @keyframes gradient-shift {
            0%   { background-position: 0% 50%; }
            50%  { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .hero-subtitle {
            font-size: 15.5px;
            color: var(--text-muted);
            text-align: center;
            margin-bottom: 48px;
            max-width: 480px;
            line-height: 1.65;
            animation: hero-fade-in 0.6s var(--spring) 0.15s both;
        }

        .welcome-cards-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            max-width: 680px;
            width: 100%;
        }

        .welcome-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 16px;
            padding: 15px 18px;
            cursor: pointer;
            transition: all 0.3s var(--spring);
            position: relative;
            overflow: hidden;
            text-align: left;
            display: flex;
            align-items: flex-start;
            gap: 13px;
        }
        .welcome-card:nth-child(1) { animation: card-reveal 0.5s var(--spring) 0.1s both; }
        .welcome-card:nth-child(2) { animation: card-reveal 0.5s var(--spring) 0.18s both; }
        .welcome-card:nth-child(3) { animation: card-reveal 0.5s var(--spring) 0.26s both; }
        .welcome-card:nth-child(4) { animation: card-reveal 0.5s var(--spring) 0.34s both; }
        @keyframes card-reveal {
            from { opacity: 0; transform: translateY(18px) scale(0.96); }
            to   { opacity: 1; transform: translateY(0) scale(1); }
        }

        .welcome-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(155, 109, 255, 0.05));
            opacity: 0;
            transition: opacity 0.3s;
            border-radius: inherit;
        }

        .welcome-card:hover {
            border-color: rgba(212, 175, 55, 0.32);
            background: rgba(255, 255, 255, 0.06);
            transform: translateY(-5px) scale(1.015);
            box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(212, 175, 55, 0.14);
        }

        .welcome-card:hover::before { opacity: 1; }
        .welcome-card:active { transform: translateY(-1px) scale(0.99); }

        .welcome-card-icon {
            font-size: 18px;
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            background: var(--gold-dim);
            border: 1px solid rgba(212, 175, 55, 0.14);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        .welcome-card:hover .welcome-card-icon {
            background: rgba(212, 175, 55, 0.18);
            box-shadow: 0 0 18px rgba(212, 175, 55, 0.22);
        }

        .welcome-card-body {
            flex: 1;
            min-width: 0;
        }

        .welcome-card-title {
            font-family: var(--brand-font, 'Outfit', 'Inter', sans-serif);
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .welcome-card-desc {
            font-size: 11.5px;
            color: var(--text-muted);
            line-height: 1.4;
        }

        /* ── Light Theme Overrides ───────────────────────────────────── */
        html[data-theme="light"] {
            --gold: #7A5800;
            --gold-light: #9A7000;
            --gold-dim: rgba(122, 88, 0, 0.12);
            --gold-glow: rgba(122, 88, 0, 0.22);
            --black: #F2EBD9;
            --surface: #E8DFC8;
            --glass: rgba(92, 74, 42, 0.07);
            --glass-hover: rgba(92, 74, 42, 0.13);
            --border: rgba(122, 88, 0, 0.28);
            --border-soft: rgba(92, 74, 42, 0.16);
            --text-primary: #1C0F00;
            --text-muted: #4A3820;
            --text-gold: #7A5800;
            --shadow-gold: 0 10px 40px rgba(122, 88, 0, 0.10);
            --fsm-input-bg: rgba(230, 224, 211, 0.8);
            --fsm-dropdown-bg: #EDE8DE;
            --fsm-disabled-bg: #DDD6C5;
            --fsm-disabled-color: #7A6850;
        }

        html[data-theme="light"] body {
            background-color: var(--black);
            color: var(--text-primary);
        }

        html[data-theme="light"] body::before {
            background:
                radial-gradient(ellipse 80% 60% at 10% 0%, rgba(138, 101, 0, 0.07) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 90% 100%, rgba(138, 101, 0, 0.05) 0%, transparent 55%);
        }

        html[data-theme="light"] header {
            background: rgba(232, 223, 200, 0.92);
            border-bottom-color: var(--border);
            box-shadow: 0 2px 20px rgba(138, 101, 0, 0.10);
        }

        html[data-theme="light"] footer {
            background: rgba(232, 223, 200, 0.94);
            border-top-color: var(--border);
        }

        html[data-theme="light"] #attachment-preview-container {
            background: rgba(230, 224, 211, 0.7);
            border-color: var(--border-soft);
        }

        html[data-theme="light"] #left-sidebar {
            background: #DDD3B8;
            border-right-color: var(--border-soft);
        }

        html[data-theme="light"] .new-chat-btn {
            border-color: rgba(139, 109, 56, 0.25);
            color: var(--text-primary);
        }

        html[data-theme="light"] .new-chat-btn:hover {
            background: rgba(139, 109, 56, 0.08);
        }

        html[data-theme="light"] .conv-item {
            color: var(--text-muted);
        }

        html[data-theme="light"] .conv-item:hover,
        html[data-theme="light"] .conv-item.active {
            background: rgba(139, 109, 56, 0.10);
            color: var(--text-primary);
        }

        html[data-theme="light"] .sub-member-item {
            border-bottom-color: rgba(139, 109, 56, 0.08);
        }

        html[data-theme="light"] .sub-member-header {
            color: var(--text-primary);
        }

        html[data-theme="light"] .sub-session-item {
            color: var(--text-muted);
        }

        html[data-theme="light"] .sub-session-item:hover {
            color: var(--text-primary);
        }

        html[data-theme="light"] .sub-session-list {
            color: var(--text-muted);
        }

        html[data-theme="light"] .sidebar-tab {
            color: var(--text-muted);
        }

        html[data-theme="light"] .sidebar-tab.active {
            color: var(--gold);
            border-bottom-color: var(--gold);
        }

        html[data-theme="light"] #persona-selector {
            background-color: var(--glass);
            color: var(--text-primary);
        }

        html[data-theme="light"] #persona-selector option {
            background: #EDE8DE;
            color: var(--text-primary);
        }

        html[data-theme="light"] .status-badge {
            background: var(--glass);
            border-color: var(--border-soft);
            color: var(--text-muted);
        }

        html[data-theme="light"] .input-bar {
            background: #f0ebe0;
            border-color: transparent;
            box-shadow: 0 0 12px 2px rgba(122, 88, 0, 0.12), 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .input-bar:focus-within {
            box-shadow: 0 0 16px 4px rgba(122, 88, 0, 0.22), 0 8px 28px rgba(0, 0, 0, 0.12);
        }

        html[data-theme="light"] #user-input {
            color: var(--text-primary);
        }

        html[data-theme="light"] #user-input::placeholder {
            color: var(--text-muted);
        }

        html[data-theme="light"] .icon-btn {
            color: var(--text-muted);
        }

        html[data-theme="light"] .icon-btn:hover {
            background: var(--glass-hover);
            color: var(--gold);
        }

        html[data-theme="light"] .user-message {
            background: #E8D19F !important;
            color: #1C0F00 !important;
            border: 1px solid rgba(122, 88, 0, 0.15) !important;
            box-shadow: 0 2px 12px rgba(122, 88, 0, 0.05) !important;
        }

        html[data-theme="light"] .bot-message {
            background: #ffffff !important;
            color: #1f1f1f !important;
            border-radius: 20px !important;
            border: 1px solid rgba(0, 0, 0, 0.08) !important;
            padding: 14px 20px !important;
            max-width: 85% !important;
            box-shadow: 0 4px 16px rgba(0,0,0,0.04) !important;
        }

        html[data-theme="light"] .bot-message b {
            color: #6B4F08;
        }

        html[data-theme="light"] .error-message {
            border-color: rgba(198, 40, 40, 0.4) !important;
            background: rgba(198, 40, 40, 0.05) !important;
            box-shadow: 0 2px 20px rgba(198, 40, 40, 0.08) !important;
        }

        html[data-theme="light"] .message-time {
            color: var(--text-muted);
        }

        html[data-theme="light"] .typing-indicator {
            background: transparent !important;
            border: none !important;
        }
        html[data-theme="light"] .typing-indicator::before,
        html[data-theme="light"] .typing-indicator::after {
            background: linear-gradient(90deg,
                rgba(0, 0, 0, 0.03) 0%,
                rgba(139, 109, 56, 0.20) 30%,
                rgba(100, 80, 160, 0.18) 50%,
                rgba(50, 150, 200, 0.18) 70%,
                rgba(0, 0, 0, 0.03) 100%
            );
            background-size: 200% 100%;
        }

        html[data-theme="light"] .result-table th {
            background: rgba(138, 101, 0, 0.12);
            color: #6B4F08;
            border-bottom-color: var(--border);
        }

        html[data-theme="light"] .result-table td {
            color: var(--text-primary);
            border-bottom-color: var(--border-soft);
        }

        html[data-theme="light"] .result-table tr:hover td {
            background: rgba(92, 74, 42, 0.08);
        }

        html[data-theme="light"] .bi-report-header {
            background: var(--gold-dim);
            border-bottom-color: var(--border);
        }

        html[data-theme="light"] .bi-report-content {
            color: var(--text-primary);
        }

        html[data-theme="light"] .bi-card {
            background: rgba(237, 232, 222, 0.6);
            border-color: rgba(184, 144, 10, 0.18);
        }

        html[data-theme="light"] .chart-container {
            background: rgba(237, 232, 222, 0.5);
            border-color: var(--border-soft);
        }

        html[data-theme="light"] #confirmation-dialog {
            background: rgba(0, 0, 0, 0.40);
        }

        html[data-theme="light"] .dialog-box {
            background: #EDE8DE;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), var(--shadow-gold);
        }

        html[data-theme="light"] .dialog-data {
            background: rgba(230, 224, 211, 0.7);
            border-color: var(--border-soft);
        }

        html[data-theme="light"] .dialog-data-key {
            background: rgba(184, 144, 10, 0.08);
            color: var(--text-muted);
        }

        html[data-theme="light"] .dialog-data-value {
            color: var(--text-primary);
        }

        html[data-theme="light"] .dialog-summary {
            color: var(--text-primary);
        }

        html[data-theme="light"] .btn-cancel {
            color: var(--text-muted);
            border-color: var(--border-soft);
        }

        html[data-theme="light"] .btn-cancel:hover {
            color: var(--text-primary);
            border-color: var(--text-muted);
        }

        html[data-theme="light"] .modal-overlay {
            background: rgba(0, 0, 0, 0.40);
        }

        html[data-theme="light"] .modal-container {
            background: #EDE8DE;
            border-color: var(--border);
        }

        html[data-theme="light"] .modal-header {
            background: var(--gold-dim);
        }

        html[data-theme="light"] .modal-body {
            color: var(--text-primary);
        }

        html[data-theme="light"] .modal-footer {
            background: rgba(139, 109, 56, 0.05);
        }

        html[data-theme="light"] .form-input {
            background: rgba(230, 224, 211, 0.8);
            border-color: var(--border-soft);
            color: var(--text-primary);
        }

        html[data-theme="light"] .form-input:focus {
            border-color: var(--gold);
        }

        html[data-theme="light"] .form-label {
            color: var(--text-muted);
        }

        html[data-theme="light"] .form-input:-webkit-autofill,
        html[data-theme="light"] .form-input:-webkit-autofill:hover,
        html[data-theme="light"] .form-input:-webkit-autofill:focus {
            -webkit-text-fill-color: var(--text-primary);
            -webkit-box-shadow: 0 0 0px 1000px #EDE8DE inset;
        }

        html[data-theme="light"] #workspace-sidebar {
            background: rgba(230, 224, 211, 0.98);
            border-left-color: var(--border);
        }

        html[data-theme="light"] #drag-overlay {
            background: rgba(237, 232, 222, 0.92);
        }

        html[data-theme="light"] .chip-btn {
            border-color: rgba(139, 109, 56, 0.15);
            color: var(--text-muted);
            background: rgba(237, 232, 222, 0.8);
        }

        html[data-theme="light"] .chip-btn:hover {
            border-color: var(--gold);
            color: var(--gold);
        }

        html[data-theme="light"] .suggestion-chip {
            background: var(--gold-dim);
            color: var(--gold);
            border-color: var(--border);
        }

        html[data-theme="light"] .suggestion-chip:hover {
            background: rgba(184, 144, 10, 0.18);
            border-color: var(--gold);
        }

        html[data-theme="light"] .bi-button {
            background: rgba(184, 144, 10, 0.10);
            border-color: var(--border);
            color: var(--gold);
        }

        html[data-theme="light"] .bi-button:hover {
            background: rgba(184, 144, 10, 0.18);
        }

        html[data-theme="light"] .file-card {
            background: rgba(230, 224, 211, 0.7);
            border-color: var(--border-soft);
        }

        html[data-theme="light"] .file-card:hover {
            background: rgba(184, 144, 10, 0.08);
        }

        html[data-theme="light"] .file-icon {
            background: var(--gold-dim);
        }

        html[data-theme="light"] .file-name {
            color: var(--text-primary);
        }

        html[data-theme="light"] .file-meta {
            color: var(--text-muted);
        }

        html[data-theme="light"] #mobile-sidebar-overlay {
            background: rgba(0, 0, 0, 0.25);
        }

        html[data-theme="light"] .executive-summary {
            background: rgba(184, 144, 10, 0.07);
            border-color: rgba(184, 144, 10, 0.22);
            color: var(--text-primary);
        }

        html[data-theme="light"] #alerts-panel {
            background: #EDE8DE !important;
            border-color: var(--border) !important;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), var(--shadow-gold) !important;
        }

        html[data-theme="light"] .alert-item {
            background: rgba(230, 224, 211, 0.6) !important;
            border-color: var(--border-soft) !important;
        }

        html[data-theme="light"] .alert-item:hover {
            background: var(--glass-hover) !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07) !important;
        }

        html[data-theme="light"] .alert-item-title {
            color: var(--text-primary) !important;
        }

        html[data-theme="light"] .alert-item-meta {
            border-top-color: rgba(139, 109, 56, 0.08) !important;
        }

        html[data-theme="light"] .severity-badge.critical {
            background: rgba(244, 67, 54, 0.12);
            color: #c62828;
        }

        html[data-theme="light"] .severity-badge.warning {
            background: rgba(255, 152, 0, 0.12);
            color: #e65100;
        }

        html[data-theme="light"] .auth-section {
            background: rgba(220, 211, 184, 0.7) !important;
            border-color: rgba(138, 101, 0, 0.22) !important;
        }

        html[data-theme="light"] #admin-modal input[type="text"],
        html[data-theme="light"] #admin-modal input[type="password"],
        html[data-theme="light"] #admin-modal input[type="url"] {
            background: rgba(230, 224, 211, 0.8) !important;
            color: var(--text-primary) !important;
            -webkit-text-fill-color: var(--text-primary) !important;
        }

        html[data-theme="light"] #viewer-modal .modal-header button {
            color: var(--text-primary) !important;
        }

        html[data-theme="light"] #viewer-content {
            background: #D0C4A0 !important;
        }

        html[data-theme="light"] .dialog-correction {
            background: rgba(220, 211, 184, 0.6) !important;
            border-top-color: var(--border-soft) !important;
        }

        html[data-theme="light"] .dialog-correction input {
            background: rgba(242, 235, 217, 0.9) !important;
            border-color: var(--border-soft) !important;
            color: var(--text-primary) !important;
        }

        html[data-theme="light"] .sidebar-section-title {
            color: var(--gold);
            border-bottom-color: var(--border-soft);
        }

        html[data-theme="light"] .sidebar-settings-btn {
            border-color: var(--gold) !important;
            color: var(--gold) !important;
        }

        html[data-theme="light"] #location-dialog {
            background: rgba(0, 0, 0, 0.40);
        }

        html[data-theme="light"] body.centered-layout .input-bar {
            background: #f0ebe0 !important;
            box-shadow: 0 0 16px 3px rgba(122, 88, 0, 0.14), 0 8px 32px rgba(122, 88, 0, 0.18) !important;
        }

        html[data-theme="light"] .bi-report-content b {
            color: #6B4F08;
        }

        /* ── Golden Theme ────────────────────────────────────────────── */
        html[data-theme="golden"] {
            --gold: #8B6000;
            --gold-light: #A87800;
            --gold-dim: rgba(139, 96, 0, 0.15);
            --gold-glow: rgba(139, 96, 0, 0.30);
            --black: #F0E0C4;
            --surface: #E6D4B2;
            --glass: rgba(120, 85, 20, 0.08);
            --glass-hover: rgba(120, 85, 20, 0.14);
            --border: rgba(100, 70, 15, 0.25);
            --border-soft: rgba(139, 96, 0, 0.20);
            --text-primary: #1E0E00;
            --text-muted: #4A3010;
            --text-gold: #6B4A00;
            --shadow-gold: 0 10px 40px rgba(100, 70, 15, 0.15);
            --fsm-input-bg: rgba(230, 224, 211, 0.8);
            --fsm-dropdown-bg: #EDE8DE;
            --fsm-disabled-bg: #DDD6C5;
            --fsm-disabled-color: #7A6850;
        }

        html[data-theme="golden"] body {
            background-color: var(--black);
            color: var(--text-primary);
        }

        html[data-theme="golden"] body::before {
            background:
                radial-gradient(ellipse 80% 60% at 10% 0%, rgba(210, 170, 50, 0.20) 0%, transparent 55%),
                radial-gradient(ellipse 60% 50% at 90% 100%, rgba(180, 130, 20, 0.15) 0%, transparent 55%);
        }

        html[data-theme="golden"] header {
            background: rgba(120, 88, 22, 0.94);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(200, 160, 60, 0.28);
            box-shadow: 0 2px 20px rgba(60, 40, 8, 0.22);
        }

        html[data-theme="golden"] header .header-brand div[style*="font-family"] {
            color: #FFF8E8 !important;
            text-shadow: 0 0 10px rgba(196, 148, 26, 0.4);
        }

        html[data-theme="golden"] header .mobile-menu-btn {
            color: #FFF8E8 !important;
        }

        html[data-theme="golden"] header #theme-toggle {
            background: rgba(255, 248, 230, 0.12) !important;
            border: 1px solid rgba(255, 230, 160, 0.45) !important;
            color: #FFF8E8 !important;
            border-radius: 20px;
            font-weight: 600;
        }

        html[data-theme="golden"] header #theme-toggle:hover {
            color: #FFF8E8 !important;
            background: rgba(255, 248, 230, 0.22) !important;
            border-color: var(--gold-light) !important;
        }

        html[data-theme="golden"] footer {
            background: rgba(220, 200, 165, 0.96);
            border-top: 1px solid rgba(180, 130, 20, 0.20);
        }

        html[data-theme="golden"] #attachment-preview-container {
            background: #FFFFFF;
            border-color: rgba(139, 105, 20, 0.12);
        }

        html[data-theme="golden"] #left-sidebar {
            background: #C9AD78;
            border-right: 1px solid rgba(180, 130, 20, 0.20);
        }

        html[data-theme="golden"] .new-chat-btn {
            border-color: rgba(139, 105, 20, 0.25);
            color: #2C1810;
        }

        html[data-theme="golden"] .new-chat-btn:hover {
            background: rgba(139, 105, 20, 0.08);
        }

        html[data-theme="golden"] .conv-item {
            color: #4A3010;
        }

        html[data-theme="golden"] .conv-item:hover,
        html[data-theme="golden"] .conv-item.active {
            background: rgba(139, 105, 20, 0.08);
            color: #2C1810;
        }

        html[data-theme="golden"] .sub-member-item {
            border-bottom-color: rgba(139, 105, 20, 0.10);
        }

        html[data-theme="golden"] .sub-member-header {
            color: #2C1810;
        }

        html[data-theme="golden"] .sub-member-header:hover {
            color: #8B6914;
        }

        html[data-theme="golden"] .sub-session-item {
            color: #6B5744;
        }

        html[data-theme="golden"] .sub-session-item:hover {
            color: #2C1810;
        }

        html[data-theme="golden"] .sub-session-list {
            color: #6B5744;
        }

        html[data-theme="golden"] .sidebar-tab {
            color: #4A3010;
        }

        html[data-theme="golden"] .sidebar-tab.active {
            color: #8B6914;
            border-bottom-color: #8B6914;
        }

        html[data-theme="golden"] .brand-title {
            color: #FFF8E8;
        }

        html[data-theme="golden"] .brand-version {
            color: rgba(255, 248, 230, 0.65);
        }

        html[data-theme="golden"] .status-badge {
            background: rgba(255, 248, 230, 0.12);
            border: 1px solid rgba(255, 230, 160, 0.45);
            color: #FFF8E8;
            border-radius: 20px;
            font-weight: 600;
        }

        html[data-theme="golden"] .pill-persona-selector {
            background-color: #E6D4B2 !important;
            border: 1px solid rgba(139, 105, 20, 0.4) !important;
            color: #2C1810 !important;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%232C1810' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
        }

        html[data-theme="golden"] .pill-persona-selector:hover {
            border-color: var(--gold) !important;
            background-color: #DFCDA9 !important;
        }

        html[data-theme="golden"] #persona-selector option {
            background: #E6D4B2;
            color: #2C1810;
        }

        html[data-theme="golden"] .header-persona-selector {
            color: #FFF8E8 !important;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23FFF8E8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
        }

        html[data-theme="golden"] .header-persona-selector option {
            background: #8B6914;
            color: #FFF8E8;
        }

        html[data-theme="golden"] .input-bar {
            background: #EFE5C5;
            border-color: transparent;
            box-shadow: none;
        }

        html[data-theme="golden"] #user-input {
            color: #2C1810;
        }

        html[data-theme="golden"] #user-input::placeholder {
            color: #7A6040;
        }

        html[data-theme="golden"] .icon-btn {
            color: #4A3010;
        }

        html[data-theme="golden"] .icon-btn:hover {
            background: rgba(139, 105, 20, 0.10);
            color: #8B6914;
        }

        html[data-theme="golden"] #btn-send {
            background: linear-gradient(135deg, #8B6914, #B8880E);
            color: #FFF8E8;
            box-shadow: 0 2px 12px rgba(100, 70, 10, 0.35);
        }

        html[data-theme="golden"] .user-message {
            background: linear-gradient(135deg, #9A7516, #B8880E) !important;
            color: #FFF8E8 !important;
            border: none !important;
            box-shadow: none !important;
        }

        html[data-theme="golden"] .bot-message {
            background: #FFF8E8 !important;
            border-radius: 20px !important;
            border: 1px solid rgba(139, 105, 20, 0.22) !important;
            color: #2C1810 !important;
            padding: 14px 20px !important;
            max-width: 85% !important;
            box-shadow: 0 4px 16px rgba(100, 70, 15, 0.06) !important;
        }

        html[data-theme="golden"] .bot-message b {
            color: #7A5C1A;
        }

        html[data-theme="golden"] .error-message {
            border-color: rgba(167, 29, 42, 0.4) !important;
            background: rgba(167, 29, 42, 0.05) !important;
            box-shadow: 0 2px 20px rgba(167, 29, 42, 0.08) !important;
        }

        html[data-theme="golden"] .message-time {
            color: #6B5030;
        }

        html[data-theme="golden"] .typing-indicator {
            background: transparent !important;
            border: none !important;
        }
        html[data-theme="golden"] .typing-indicator::before,
        html[data-theme="golden"] .typing-indicator::after {
            background: linear-gradient(90deg,
                rgba(0, 0, 0, 0.03) 0%,
                rgba(180, 130, 20, 0.30) 30%,
                rgba(155, 100, 20, 0.25) 50%,
                rgba(190, 140, 30, 0.25) 70%,
                rgba(0, 0, 0, 0.03) 100%
            );
            background-size: 200% 100%;
        }

        html[data-theme="golden"] .result-table th {
            background: rgba(139, 105, 20, 0.08);
            color: #2C1810;
            border-bottom-color: rgba(139, 105, 20, 0.15);
        }

        html[data-theme="golden"] .result-table td {
            color: #2C1810;
            border-bottom-color: rgba(139, 105, 20, 0.08);
        }

        html[data-theme="golden"] .result-table tr:hover td {
            background: rgba(139, 105, 20, 0.05);
        }

        html[data-theme="golden"] .bi-section-title {
            color: #2C1810;
        }

        html[data-theme="golden"] .bi-section-title::before {
            background: #8B6914;
        }

        html[data-theme="golden"] .bi-stat-value {
            color: #8B6914;
        }

        html[data-theme="golden"] .bi-stat-label {
            color: #4A3010;
        }

        html[data-theme="golden"] .bi-report-header {
            background: rgba(139, 105, 20, 0.06);
            color: #2C1810;
            border-bottom-color: rgba(139, 105, 20, 0.12);
        }

        html[data-theme="golden"] .bi-report-content {
            color: #2C1810;
        }

        html[data-theme="golden"] .bi-report-content b {
            color: #7A5C1A;
        }

        html[data-theme="golden"] .bi-card {
            background: #FFFFFF;
            border-color: rgba(139, 105, 20, 0.12);
            box-shadow: 0 4px 15px rgba(139, 105, 20, 0.06);
        }

        html[data-theme="golden"] .chart-container {
            background: #FFFFFF;
            border-color: rgba(139, 105, 20, 0.12);
        }

        html[data-theme="golden"] #confirmation-dialog {
            background: rgba(0, 0, 0, 0.40);
        }

        html[data-theme="golden"] .dialog-box {
            background: #F0E0C4;
            border-color: rgba(180, 130, 20, 0.22);
            box-shadow: 0 20px 60px rgba(80, 55, 10, 0.20);
        }

        html[data-theme="golden"] .dialog-header {
            background: rgba(139, 105, 20, 0.06);
            border-bottom-color: rgba(139, 105, 20, 0.12);
        }

        html[data-theme="golden"] .dialog-header-title {
            color: #2C1810;
        }

        html[data-theme="golden"] .dialog-data {
            background: rgba(139, 105, 20, 0.04);
            border-color: rgba(139, 105, 20, 0.10);
        }

        html[data-theme="golden"] .dialog-data-key {
            background: rgba(139, 105, 20, 0.08);
            color: #4A3010;
        }

        html[data-theme="golden"] .dialog-data-value {
            color: #2C1810;
        }

        html[data-theme="golden"] .dialog-summary {
            color: #2C1810;
        }

        html[data-theme="golden"] .btn-confirm {
            background: linear-gradient(135deg, #8B6914, #C4941A);
            color: #FFFFFF;
        }

        html[data-theme="golden"] .btn-cancel {
            color: #6B5744;
            border-color: rgba(139, 105, 20, 0.20);
        }

        html[data-theme="golden"] .btn-cancel:hover {
            color: #2C1810;
            border-color: rgba(139, 105, 20, 0.35);
        }

        html[data-theme="golden"] .modal-overlay {
            background: rgba(0, 0, 0, 0.40);
        }

        html[data-theme="golden"] .modal-container {
            background: #F0E0C4;
            border-color: rgba(180, 130, 20, 0.22);
        }

        html[data-theme="golden"] .modal-header {
            background: rgba(139, 105, 20, 0.06);
            border-bottom-color: rgba(139, 105, 20, 0.12);
        }

        html[data-theme="golden"] .modal-body {
            color: #2C1810;
        }

        html[data-theme="golden"] .modal-footer {
            background: rgba(139, 105, 20, 0.04);
        }

        html[data-theme="golden"] .form-input {
            background: #FFFFFF;
            border-color: rgba(139, 105, 20, 0.18);
            color: #2C1810;
        }

        html[data-theme="golden"] .form-input:focus {
            border-color: #8B6914;
            box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.12);
        }

        html[data-theme="golden"] .form-label {
            color: #4A3010;
        }

        html[data-theme="golden"] .form-input:-webkit-autofill,
        html[data-theme="golden"] .form-input:-webkit-autofill:hover,
        html[data-theme="golden"] .form-input:-webkit-autofill:focus {
            -webkit-text-fill-color: #2C1810;
            -webkit-box-shadow: 0 0 0px 1000px #FDF8F0 inset;
        }

        html[data-theme="golden"] #workspace-sidebar {
            background: rgba(200, 175, 125, 0.98);
            border-left-color: rgba(180, 130, 20, 0.20);
        }

        html[data-theme="golden"] .sidebar-section-title {
            color: #2C1810;
            border-bottom-color: rgba(139, 105, 20, 0.12);
        }

        html[data-theme="golden"] #drag-overlay {
            background: rgba(240, 224, 196, 0.94);
        }

        html[data-theme="golden"] .drag-text {
            color: #8B6914;
        }

        html[data-theme="golden"] .chip-btn {
            background: rgba(139, 105, 20, 0.06);
            border-color: rgba(139, 105, 20, 0.18);
            color: #2C1810;
        }

        html[data-theme="golden"] .chip-btn:hover {
            background: rgba(139, 105, 20, 0.12);
            border-color: rgba(139, 105, 20, 0.30);
        }

        html[data-theme="golden"] .suggestion-chip {
            background: rgba(255, 255, 255, 0.70);
            color: #2C1810;
            border-color: rgba(180, 130, 20, 0.22);
            box-shadow: 0 1px 4px rgba(100, 70, 15, 0.10);
        }

        html[data-theme="golden"] .suggestion-chip:hover {
            background: rgba(139, 105, 20, 0.06);
            border-color: #8B6914;
        }

        html[data-theme="golden"] .bi-button {
            background: rgba(139, 105, 20, 0.06);
            border-color: rgba(139, 105, 20, 0.18);
            color: #2C1810;
        }

        html[data-theme="golden"] .bi-button:hover {
            background: rgba(139, 105, 20, 0.12);
            box-shadow: 0 0 12px rgba(139, 105, 20, 0.10);
        }

        html[data-theme="golden"] .file-card {
            background: #FFFFFF;
            border-color: rgba(139, 105, 20, 0.12);
        }

        html[data-theme="golden"] .file-card:hover {
            background: rgba(139, 105, 20, 0.04);
        }

        html[data-theme="golden"] .file-icon {
            background: rgba(139, 105, 20, 0.08);
        }

        html[data-theme="golden"] .file-name {
            color: #2C1810;
        }

        html[data-theme="golden"] .file-meta {
            color: #4A3010;
        }

        html[data-theme="golden"] .file-status {
            color: #8B6914;
        }

        html[data-theme="golden"] #mobile-sidebar-overlay {
            background: rgba(0, 0, 0, 0.25);
        }

        html[data-theme="golden"] .executive-summary {
            background: #FFFFFF;
            border-color: rgba(139, 105, 20, 0.15);
            color: #2C1810;
        }

        .bot-avatar {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: conic-gradient(from 180deg at 50% 50%,
                #D4AF37 0deg, #9B6DFF 120deg, #4FC3F7 240deg, #D4AF37 360deg);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            margin-top: 2px;
            font-family: var(--brand-font, 'Outfit', var(--brand-font, 'Inter', sans-serif));
            font-size: 11px;
            color: rgba(255, 255, 255, 0.95);
            font-weight: bold;
            position: relative;
            box-shadow:
                0 0 0 2px rgba(212, 175, 55, 0.28),
                0 0 0 4px rgba(155, 109, 255, 0.1),
                0 4px 18px rgba(155, 109, 255, 0.35);
            animation: avatar-glow 4s ease-in-out infinite;
        }

        @keyframes avatar-glow {
            0%, 100% {
                box-shadow: 0 0 0 2px rgba(212,175,55,0.28), 0 0 0 4px rgba(155,109,255,0.1), 0 4px 18px rgba(155,109,255,0.35);
            }
            50% {
                box-shadow: 0 0 0 3px rgba(212,175,55,0.45), 0 0 0 6px rgba(155,109,255,0.15), 0 4px 28px rgba(155,109,255,0.55);
            }
        }            /* ── Bot Avatar Sparkle ── */

        /* ── Send Button ── */
        #btn-send {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: none;
            background: linear-gradient(135deg, var(--gold) 0%, #B8961E 55%, #C4941A 100%);
            color: #000;
            cursor: pointer;
            flex-shrink: 0;
            transition: all 0.25s var(--spring);
            box-shadow: 0 2px 14px rgba(212, 175, 55, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
            position: relative;
            overflow: hidden;
        }
        #btn-send::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 65%);
        }
        #btn-send:hover {
            transform: scale(1.13);
            box-shadow: 0 6px 26px rgba(212, 175, 55, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.28);
        }
        #btn-send:active { transform: scale(0.91); }
        #btn-send:disabled { opacity: 0.38; transform: none; }

        html[data-theme="golden"] #alerts-panel {
            background: #F0E0C4 !important;
            border-color: rgba(180, 130, 20, 0.22) !important;
            box-shadow: 0 20px 60px rgba(80, 55, 10, 0.18) !important;
        }

        html[data-theme="golden"] .alert-item {
            background: #FFFFFF !important;
            border-color: rgba(139, 105, 20, 0.12) !important;
        }

        html[data-theme="golden"] .alert-item:hover {
            background: rgba(139, 105, 20, 0.04) !important;
        }

        html[data-theme="golden"] .alert-item-title {
            color: #2C1810 !important;
        }

        html[data-theme="golden"] .alert-item-meta {
            border-top-color: rgba(139, 105, 20, 0.10) !important;
        }

        html[data-theme="golden"] .severity-badge.critical {
            background: rgba(220, 53, 69, 0.10);
            color: #A71D2A;
        }

        html[data-theme="golden"] .severity-badge.warning {
            background: rgba(139, 105, 20, 0.10);
            color: #8B6914;
        }

        html[data-theme="golden"] .auth-section {
            background: #FFFFFF !important;
            border-color: rgba(139, 105, 20, 0.15) !important;
        }

        html[data-theme="golden"] #admin-modal input[type="text"],
        html[data-theme="golden"] #admin-modal input[type="password"],
        html[data-theme="golden"] #admin-modal input[type="url"] {
            background: #FFFFFF !important;
            color: #2C1810 !important;
            -webkit-text-fill-color: #2C1810 !important;
        }

        html[data-theme="golden"] #viewer-modal .modal-header button {
            color: #2C1810 !important;
        }

        html[data-theme="golden"] #viewer-content {
            background: #F0E0C4 !important;
        }

        html[data-theme="golden"] .dialog-correction {
            background: rgba(139, 105, 20, 0.04) !important;
            border-top-color: rgba(139, 105, 20, 0.10) !important;
        }

        html[data-theme="golden"] .dialog-correction input {
            background: #FFFFFF !important;
            border-color: rgba(139, 105, 20, 0.18) !important;
            color: #2C1810 !important;
        }

        html[data-theme="golden"] .sidebar-settings-btn {
            border-color: rgba(139, 105, 20, 0.25) !important;
            color: #2C1810 !important;
        }

        html[data-theme="golden"] #location-dialog {
            background: rgba(0, 0, 0, 0.40);
        }

        html[data-theme="golden"] .input-bar {
            background: #EFE5C5;
            box-shadow: 0 0 12px 2px rgba(139, 105, 20, 0.18), 0 4px 24px rgba(100, 70, 15, 0.12);
        }
        html[data-theme="golden"] .input-bar:focus-within {
            box-shadow: 0 0 16px 4px rgba(139, 105, 20, 0.28), 0 8px 32px rgba(100, 70, 15, 0.18);
        }
        html[data-theme="golden"] body.centered-layout .input-bar {
            background: #EFE5C5;
            box-shadow: 0 0 16px 3px rgba(139, 105, 20, 0.22), 0 8px 32px rgba(100, 70, 15, 0.15) !important;
        }

        #suggestions-bar {
            max-width: 800px;
            margin: 0 auto;
            width: 100%;
        }

        /* ── Fix suggestions centering when sidebar is collapsed ─────────── */
        body:not(.centered-layout) #suggestions-bar {
            max-width: 900px;
            margin: 0 auto;
            width: 100%;
            box-sizing: border-box;
            align-self: center;
            display: flex;
            justify-content: center;
        }
        @media (max-width: 768px) {
            body:not(.centered-layout) #suggestions-bar {
                justify-content: flex-start !important;
            }
        }

        /* ── Welcome cards — light theme ─────────────────────────────────── */
        html[data-theme="light"] .welcome-card {
            background: rgba(92, 74, 42, 0.05);
            border-color: rgba(138, 101, 0, 0.14);
        }
        html[data-theme="light"] .welcome-card:hover {
            border-color: rgba(138, 101, 0, 0.38);
            background: rgba(92, 74, 42, 0.09);
            box-shadow: 0 12px 40px rgba(0,0,0,0.10);
        }
        html[data-theme="light"] .welcome-card-title { color: var(--text-primary); }
        html[data-theme="light"] .hero-title {
            background: linear-gradient(135deg, #1C0F00 0%, #8A6500 45%, #7C3AED 80%, #0369A1 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            background-size: 200% 200%;
        }

        /* ── Welcome cards — golden theme ────────────────────────────────── */
        html[data-theme="golden"] .welcome-card {
            background: rgba(139, 105, 20, 0.05);
            border-color: rgba(139, 105, 20, 0.14);
        }
        html[data-theme="golden"] .welcome-card:hover {
            border-color: rgba(139, 105, 20, 0.38);
            background: rgba(139, 105, 20, 0.09);
        }
        html[data-theme="golden"] .hero-title {
            background: linear-gradient(135deg, #2C1810 0%, #8B6914 45%, #7C3AED 80%, #0369A1 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            background-size: 200% 200%;
        }

        /* ── Mobile responsive hero & input ──────────────────────────────── */
        @media (max-width: 768px) {
            .welcome-cards-grid {
                grid-template-columns: 1fr;
                max-width: 100%;
            }
            .hero-title { font-size: 28px; }
            .hero-subtitle { font-size: 13px; }
            #hero-welcome { padding: 20px 16px 12px; }
        }

        /* ── Gemini Layout Enhancements (defined above) ── */

        .sidebar-toggle-btn {
            margin-left: auto;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s, color 0.2s;
        }
        .sidebar-toggle-btn:hover {
            background: rgba(255, 255, 255, 0.05);
            color: var(--gold);
        }

        /* Collapsible Sidebar Styles */
        #left-sidebar {
            transition: width 0.3s var(--spring), transform 0.3s var(--spring);
        }
        #left-sidebar.collapsed {
            width: 68px;
        }
        #left-sidebar.collapsed .sidebar-logo-text,
        #left-sidebar.collapsed .sidebar-logo-info,
        #left-sidebar.collapsed .sidebar-logo-sub,
        #left-sidebar.collapsed .tab-text,
        #left-sidebar.collapsed .btn-text,
        #left-sidebar.collapsed .user-info,
        #left-sidebar.collapsed .settings-gear-btn {
            display: none !important;
        }
        #left-sidebar.collapsed .sidebar-logo-header {
            justify-content: center;
            padding: 16px 0;
        }
        #left-sidebar.collapsed .sidebar-toggle-btn {
            margin-left: 0 !important;
        }
        #left-sidebar.collapsed .sidebar-tabs {
            flex-direction: column;
            align-items: center;
            border-bottom: none;
            padding: 12px 0 0;
            gap: 12px;
        }
        #left-sidebar.collapsed .sidebar-tab {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            font-size: 16px;
            border-bottom: none;
            transition: background 0.2s;
        }
        #left-sidebar.collapsed .sidebar-tab.active {
            background: rgba(212, 175, 55, 0.15);
            color: var(--gold);
        }
        #left-sidebar.collapsed .new-chat-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            padding: 0;
            justify-content: center;
            margin: 10px auto;
        }
        #left-sidebar.collapsed .conv-item {
            justify-content: center;
            padding: 8px 0;
            font-size: 14px;
        }
        #left-sidebar.collapsed .conv-item::before {
            display: none;
        }
        #left-sidebar.collapsed .conv-item .sidebar-icon {
            display: none !important;
        }
        #left-sidebar.collapsed .sidebar-settings-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            padding: 0;
            justify-content: center;
            margin: 10px auto;
        }
        #left-sidebar.collapsed .sidebar-footer {
            padding: 12px 0;
            justify-content: center;
        }
        #left-sidebar.collapsed .user-profile-card {
            justify-content: center;
            padding: 0;
            background: transparent;
            border: none;
        }
        #left-sidebar.collapsed .sub-member-item {
            padding: 8px 0;
            display: flex;
            justify-content: center;
        }
        #left-sidebar.collapsed .sub-member-header {
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        #left-sidebar.collapsed .sub-member-header:hover {
            background: rgba(255, 255, 255, 0.07);
            border-color: var(--gold);
        }
        #left-sidebar.collapsed .sub-member-header span {
            display: none !important;
        }
        #left-sidebar.collapsed .sub-member-header::before {
            content: '👤';
            font-size: 16px;
        }
        #left-sidebar.collapsed .sub-session-list {
            display: none !important;
        }

        /* Sidebar footer styling */
        .sidebar-footer {
            padding: 12px;
            border-top: 1px solid var(--border-soft);
            margin-top: auto;
        }
        .user-profile-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px;
            border-radius: 10px;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.04);
            overflow: hidden;
        }
        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #E91E63;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
            flex-shrink: 0;
        }
        .user-info {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-width: 0;
            line-height: 1.25;
            text-align: left;
        }
        .user-name {
            font-size: 12.5px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .user-role {
            font-size: 10.5px;
            color: var(--text-muted);
            font-weight: 500;
        }
        .settings-gear-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s;
        }
        .settings-gear-btn:hover {
            color: var(--gold);
        }

        /* Input pill styles and selector integration */
        .input-bar {
            border-radius: 32px !important;
            padding: 6px 10px 6px 14px !important;
            align-items: center !important;
            box-shadow: 0 4px 24px rgba(0,0,0,0.15) !important;
        }
        #user-input {
            box-sizing: content-box !important;
            margin: 0 8px !important;
            padding: 8px 0 !important;
            font-size: 14.5px !important;
            line-height: 20px !important;
            height: 20px;
            min-height: 20px !important;
            overflow-y: hidden;
            resize: none;
        }
        .pc-persona-container {
            display: block;
            margin-right: 4px;
            flex-shrink: 0;
        }
        .pill-persona-selector {
            background: rgba(255,255,255,0.03);
            border: 1px solid var(--border-soft);
            color: var(--text-muted);
            border-radius: 20px;
            padding: 4px 24px 4px 10px;
            font-size: 12px;
            outline: none;
            cursor: pointer;
            transition: all 0.2s;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A7A8C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 8px center;
        }
        .pill-persona-selector:hover {
            border-color: var(--gold);
            color: var(--text-primary);
        }
        .mobile-persona-container {
            display: none;
        }
        .header-persona-selector {
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-weight: 600;
            font-size: 14px;
            outline: none;
            cursor: pointer;
            font-family: var(--brand-font, 'Outfit', 'Inter', sans-serif);
            padding-right: 14px;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23D4AF37' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right center;
        }
        .mobile-only-btn {
            display: none;
        }
        @media (max-width: 768px) {
            .pc-persona-container {
                display: none;
            }
            .mobile-persona-container {
                display: block;
                margin: 0 auto;
            }
            header #persona-selector {
                display: none !important;
            }
            .mobile-only-btn {
                display: flex !important;
                align-items: center;
                justify-content: center;
            }
        }

/* ── FSM Stepper UI & Toast ── */
.fsm-stepper-container { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 5px; }
.fsm-stepper-item { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); opacity: 0.5; transition: 0.3s ease; }
.fsm-stepper-item.active { opacity: 1; color: var(--gold); }
.fsm-stepper-item.completed { opacity: 0.8; color: var(--text-primary); }
.fsm-stepper-icon { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--glass); border: 1px solid var(--border-soft); }
.fsm-stepper-item.active .fsm-stepper-icon { border-color: var(--gold); background: rgba(212,175,55,0.2); animation: pulseGold 1.5s infinite; }
.fsm-stepper-item.completed .fsm-stepper-icon { background: var(--gold); color: #000; border-color: var(--gold); }
@keyframes pulseGold { 0% { box-shadow: 0 0 0 0 rgba(212,175,55,0.4); } 70% { box-shadow: 0 0 0 6px rgba(212,175,55,0); } 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); } }
/* Toast Odoo Retry */
.odoo-retry-toast { padding: 8px 14px; background: rgba(244,67,54,0.1); border: 1px solid rgba(244,67,54,0.3); border-radius: 8px; color: #ef5350; font-size: 12px; display: flex; align-items: center; gap: 10px; margin-top: 10px; animation: slideDown 0.3s ease-out; }
.odoo-retry-toast.success { background: rgba(76,175,80,0.1); border-color: rgba(76,175,80,0.3); color: #4caf50; }
.odoo-retry-toast .spinner { width: 14px; height: 14px; border: 2px solid rgba(244,67,54,0.3); border-top-color: #ef5350; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ── Offline Mode pending sync ── */
.message-wrapper.pending-sync {
    opacity: 0.65;
    transition: opacity 0.3s ease;
}
.message-wrapper.pending-sync .message {
    border: 1px dashed var(--gold) !important;
}
