
        :root {
            /* OEDS Design Variables */
            --bg: var(--bg-page);
            --sidebar-bg: var(--bg-panel);
            --sidebar-text: var(--text-secondary);
            --sidebar-active: var(--text-primary);
            --sidebar-active-bg: var(--sap-blue-light);
            --primary: var(--sap-blue);
            --primary-light: var(--sap-blue-light);
            --text: var(--text-primary);
            --muted: var(--text-secondary);
            --line: var(--border);
            --panel: var(--bg-panel);
            --shadow: var(--ol-shadow-sm);
            --shadow-md: var(--ol-shadow-sm);
            --shadow-lg: var(--ol-shadow-md);
            --bg-secondary: var(--bg-table-head);

            /* Status & Intent Colors */
            --hot: var(--color-error);
            --warm: var(--color-warning);
            --cold: var(--color-success);
        }

        /* Light Theme */
        body.light-theme {
            --bg: #f5f6f7;
            --sidebar-bg: #ffffff;
            --sidebar-text: #64748b;
            --sidebar-active: #1a1a1a;
            --sidebar-active-bg: #e8f2fc;
            --primary: #0a6ed1;
            --primary-light: #e8f2fc;
            --text: #1a1a1a;
            --muted: #64748b;
            --line: #e2e8f0;
            --panel: #ffffff;
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
            --bg-secondary: #f0f2f5;
            --ol-text: #1a1a1a;
            --ol-text-strong: #0f172a;
            --ol-muted: #64748b;
            --ol-muted-2: #94a3b8;
            --ol-gold: #0a6ed1;
            --ol-border: #e2e8f0;
            --ol-surface: #ffffff;
            --ol-base: #f5f6f7;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            height: 100%;
        }

        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background: var(--bg);
            color: var(--text);
            width: 100%;
            height: 100%;
            overflow: hidden;
            display: flex;
        }

        body.light-theme {
            background: var(--bg);
        }

        /* Select Options Dark Mode Contrast Fix */
        select option, .ol-input option {
            background-color: #161b22 !important;
            color: #f0f6fc !important;
            padding: 6px 12px;
        }

        body.light-theme select option, body.light-theme .ol-input option {
            background-color: #ffffff !important;
            color: #212529 !important;
        }

        /* Sleek Gold-Tinted Scrollbars for Results Grid & LeadGrid Body */
        [id^="lg-body-"], #v2-results-grid {
            max-height: calc(100vh - 270px) !important;
            overflow-y: auto !important;
            min-height: 0 !important;
        }

        [id^="lg-body-"]::-webkit-scrollbar, #v2-results-grid::-webkit-scrollbar, #v2-filter-chips-bar::-webkit-scrollbar {
            width: 8px !important;
            height: 8px !important;
        }
        [id^="lg-body-"]::-webkit-scrollbar-track, #v2-results-grid::-webkit-scrollbar-track, #v2-filter-chips-bar::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05) !important;
            border-radius: 4px !important;
        }
        [id^="lg-body-"]::-webkit-scrollbar-thumb, #v2-results-grid::-webkit-scrollbar-thumb, #v2-filter-chips-bar::-webkit-scrollbar-thumb {
            background: rgba(200, 169, 91, 0.5) !important;
            border-radius: 4px !important;
            border: 1px solid rgba(200, 169, 91, 0.3) !important;
        }
        [id^="lg-body-"]::-webkit-scrollbar-thumb:hover, #v2-results-grid::-webkit-scrollbar-thumb:hover, #v2-filter-chips-bar::-webkit-scrollbar-thumb:hover {
            background: var(--ol-gold) !important;
        }

        /* App Shell */
        .app-shell {
            display: flex;
            width: 100%;
            height: 100%;
        }

        .app-shell.buyer-fullscreen .sidebar {
            display: none;
        }

        .app-shell.buyer-fullscreen #buyer-discovery-view {
            width: 100%;
        }

        #buyer-fullscreen-exit {
            display: none;
        }

        .app-shell.buyer-fullscreen #buyer-fullscreen-exit {
            display: flex;
        }

        .app-shell.buyer-fullscreen #buyer-fullscreen-enter {
            display: none;
        }

        /* Sidebar */
        .sidebar {
            width: 264px;
            background:
                radial-gradient(circle at top left, rgba(200, 169, 91, 0.08), transparent 24%),
                linear-gradient(180deg, rgba(9, 11, 15, 0.98), rgba(15, 18, 24, 0.98));
            color: var(--sidebar-text);
            display: flex;
            flex-direction: column;
            z-index: 50;
            border-right: 1px solid rgba(255, 255, 255, 0.06);
        }

        body.light-theme .sidebar {
            background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
            color: var(--sidebar-text);
            border-right: 1px solid #dee2e6;
        }

        .sidebar-header {
            padding: 14px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .sidebar-logo {
            height: 26px;
            display: flex;
            align-items: center;
            flex: 1;
        }

        .sidebar-logo img {
            height: 100%;
            width: auto;
            object-fit: contain;
        }

        body.light-theme .sidebar-logo img {
            filter: invert(1) brightness(0.2);
        }

        .theme-toggle {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.04);
            color: var(--ol-muted-2);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        body.light-theme .theme-toggle {
            border-color: rgba(0, 0, 0, 0.1);
            background: rgba(0, 0, 0, 0.03);
            color: #6c757d;
        }

        .theme-toggle:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.12);
            color: var(--ol-text-strong);
        }

        body.light-theme .theme-toggle:hover {
            background: rgba(0, 0, 0, 0.06);
            border-color: rgba(0, 0, 0, 0.15);
            color: #212529;
        }

        .theme-toggle .material-symbols-outlined {
            font-size: 18px;
        }

        .sidebar-title {
            color: var(--ol-text-strong);
            font-size: 18px;
            font-weight: 500;
            font-family: 'Cormorant Garamond', serif;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .sidebar-nav {
            flex: 1;
            padding: 10px;
            overflow-y: auto;
        }

        .nav-group-label {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--ol-gold);
            margin: 10px 8px 6px;
            font-family: 'Syne Mono', monospace;
        }

        .nav-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 12px;
            font-family: 'Syne', sans-serif;
            cursor: pointer;
            transition: all 0.2s;
            margin-bottom: 3px;
            border: 1px solid transparent;
            color: var(--ol-muted-2);
        }

        .nav-copy {
            display: flex;
            flex-direction: column;
            gap: 1px;
            min-width: 0;
        }

        .nav-title {
            font-size: 12px;
            font-weight: 700;
            color: inherit;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .nav-subtitle {
            font-size: 10px;
            line-height: 1.15;
            color: var(--ol-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .nav-item.active .nav-subtitle {
            color: var(--ol-muted-2);
        }

        .nav-item .material-symbols-outlined {
            margin-top: 1px;
            font-size: 17px;
        }

        .nav-item:hover {
            color: var(--ol-text-strong);
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.05);
        }

        body.light-theme .nav-item:hover {
            color: var(--ol-text-strong);
            background: rgba(0, 0, 0, 0.04);
            border-color: rgba(0, 0, 0, 0.05);
        }

        .nav-item.active {
            color: var(--ol-text-strong);
            background: rgba(255, 255, 255, 0.06);
            border-color: rgba(255, 255, 255, 0.06);
            box-shadow: inset 4px 0 0 var(--ol-gold);
        }

        body.light-theme .nav-item.active {
            color: var(--ol-text-strong);
            background: rgba(200, 169, 91, 0.1);
            border-color: rgba(200, 169, 91, 0.2);
            box-shadow: inset 4px 0 0 var(--ol-gold);
        }

        .sidebar-footer {
            padding: 14px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        body.light-theme .sidebar-footer {
            border-top: 1px solid rgba(0, 0, 0, 0.08);
        }

        .logout-button {
            display: flex;
            align-items: center;
            gap: 0;
            padding: 12px 16px;
            background: none;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            color: rgba(232, 236, 242, 0.72);
            font-family: 'Syne', sans-serif;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            width: 100%;
            justify-content: center;
        }

        .logout-button:hover {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.12);
            color: var(--ol-text-strong);
        }

        .logout-button .material-symbols-outlined {
            font-size: 18px;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(200, 169, 91, 0.9));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
        }

        /* Main Viewport */
        .viewport {
            flex: 1;
            min-width: 0;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            height: 100vh;
        }

        /* View Content Styling */
        .view {
            display: none;
            height: 100%;
            min-width: 0;
            flex-direction: column;
        }

        .view.active {
            display: flex;
            width: 100%;
        }

        /* Common Header inside Viewport */
        .view-header {
            padding: 24px 32px;
            background: var(--panel);
            border-bottom: 1px solid var(--line);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }

        body.light-theme .view-header {
            background: #ffffff;
            border-bottom: 1px solid #e9ecef;
        }

        .view-title h1,
        .module-page-title {
            font-size: clamp(24px, 2.4vw, 32px);
            font-weight: 400;
            font-family: 'Cormorant Garamond', serif;
            letter-spacing: -0.03em;
            line-height: 1.02;
            color: var(--text);
        }

        .view-title p {
            font-size: 14px;
            color: var(--muted);
            margin-top: 4px;
        }

        /* Property Search View Styling (JobRadar Style) */
        #property-search-view .content-grid {
            display: grid;
            grid-template-columns: 280px 340px 1fr;
            flex: 1;
            overflow: hidden;
        }

        .panel {
            background: var(--ol-surface);
            border-right: 1px solid var(--ol-border);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        body.light-theme .panel {
            background: var(--panel);
        }

        .panel-header {
            padding: 16px 20px;
            font-size: 11px;
            font-weight: 500;
            font-family: 'Syne Mono', monospace;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--ol-gold);
            border-bottom: 1px solid var(--ol-border);
            display: flex;
            justify-content: space-between;
        }

        body.light-theme .panel-header {
            color: #6c757d;
            background: #f8f9fa;
        }

        .panel-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
        }

        /* Leads View Layout (Table + Split Bottom) */
        /* display logic handled by .view class */
        .leads-top {
            padding: 20px;
            background: var(--ol-surface);
            border-bottom: 1px solid var(--ol-border);
        }

        body.light-theme .leads-top {
            background: var(--panel);
        }

        .leads-middle {
            flex: 1;
            width: 100%;
            overflow-y: auto;
            background: var(--ol-surface);
        }

        body.light-theme .leads-middle {
            background: var(--bg);
        }

        .leads-bottom {
            height: 400px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            border-top: 1px solid var(--ol-border);
            background: var(--ol-base);
        }

        .detail-panel {
            border-right: 1px solid var(--ol-border);
            overflow-y: auto;
            padding: 20px;
            background: var(--ol-surface);
        }

        body.light-theme .detail-panel {
            background: #ffffff;
        }

        .kanban-panel {
            overflow-x: auto;
            padding: 20px;
            background: var(--ol-base);
        }

        body.light-theme .kanban-panel {
            background: #f8f9fa;
        }

        /* UI Elements */
        .btn {
            padding: 10px 18px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 700;
            font-family: 'Syne', sans-serif;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid var(--ol-border);
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: linear-gradient(180deg, rgba(200, 169, 91, 0.18), rgba(184, 150, 69, 0.12));
            border-color: rgba(200, 169, 91, 0.34);
            color: var(--ol-text-strong);
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            border-color: rgba(200, 169, 91, 0.48);
        }

        .btn-secondary {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--ol-border);
            color: var(--ol-text);
        }

        .btn-secondary:hover {
            border-color: var(--ol-gold);
            color: var(--ol-gold);
        }

        body.light-theme .btn-secondary {
            background: rgba(0, 0, 0, 0.02);
        }

        .input {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--ol-border);
            border-radius: 14px;
            background: var(--ol-surface-2, var(--ol-surface));
            color: var(--ol-text);
            font-family: 'Syne', sans-serif;
            font-size: 14px;
            transition: all 0.2s;
        }

        body.light-theme .input {
            background: #ffffff;
            color: #1a1a1a;
        }

        /* Fix for white background on dropdown options in dark mode */
        .input option {
            background-color: #141820;
            /* Matches --ol-surface-2 */
            color: var(--ol-text);
        }

        body.light-theme .input option {
            background-color: #ffffff;
            color: #1a1a1a;
        }

        .input:focus {
            outline: none;
            border-color: rgba(200, 169, 91, 0.65);
            box-shadow: 0 0 0 4px rgba(200, 169, 91, 0.12);
        }

        /* Tables */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 12px 20px;
            font-size: 11px;
            font-weight: 500;
            font-family: 'Syne Mono', monospace;
            letter-spacing: 0.12em;
            color: var(--ol-gold);
            text-transform: uppercase;
            border-bottom: 1px solid var(--ol-border);
            background: var(--ol-surface-2, var(--ol-surface));
        }

        body.light-theme .data-table th {
            background: #f8f9fa;
            color: #6c757d;
        }

        .data-table td {
            padding: 14px 20px;
            font-size: 14px;
            line-height: 1.55;
            color: var(--ol-text);
            border-bottom: 1px solid var(--ol-border);
        }

.data-table tr:hover {
    background: rgba(200, 169, 91, 0.05);
    cursor: pointer;
}

/* SCCB-PDE-INQUIRIES-UI-001: Tighter inquiries layout */
#inquiries-view .data-table td {
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#inquiries-view .data-table th {
    padding: 8px 12px;
    font-size: 10px;
}
#inquiries-view .col-name { max-width: 160px; min-width: 100px; }
#inquiries-view .col-phone { max-width: 100px; min-width: 80px; }
#inquiries-view .col-email { max-width: 200px; min-width: 120px; }
#inquiries-view .col-source { max-width: 80px; min-width: 60px; }
#inquiries-view .col-intent { max-width: 70px; min-width: 55px; }
#inquiries-view .col-message { max-width: 50%; min-width: 100px; width: auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#inquiries-view .col-date { max-width: 90px; min-width: 80px; width: 90px; white-space: nowrap; }
#inquiries-view .sortable { cursor: pointer; user-select: none; }
#inquiries-view .sortable:hover { color: var(--ol-text-strong); }

        body.light-theme .data-table tr:hover {
            background: rgba(200, 169, 91, 0.08);
        }

        .discovery-row-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .discovery-preview-panel {
            padding: 12px 14px;
            display: grid;
            gap: 12px;
        }

        .discovery-preview-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }

        .discovery-preview-head-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-left: auto;
            flex-shrink: 0;
        }

        .discovery-preview-meta {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 10px 14px;
        }

        .discovery-preview-meta-item strong {
            display: block;
            margin-bottom: 2px;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--muted);
        }

        .discovery-preview-meta-item span {
            font-size: 12px;
            color: var(--ol-text);
            line-height: 1.4;
        }

        .discovery-preview-body {
            max-height: 360px;
            overflow: auto;
            padding: 12px 14px;
            border: 1px solid var(--ol-border);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.02);
        }

        .discovery-preview-content {
            line-height: 1.5;
        }

        .discovery-preview-clamp {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 10;
            line-clamp: 10;
            overflow: hidden;
        }

        .discovery-preview-body h1,
        .discovery-preview-body h2 {
            font-size: 16px;
            font-weight: 700;
            line-height: 1.3;
            margin: 0 0 10px;
            color: var(--ol-gold);
        }

        .discovery-preview-body p {
            font-size: 13px;
            line-height: 1.5;
            color: var(--ol-text);
            margin: 0 0 10px;
        }

        .discovery-preview-body ul {
            margin: 0 0 10px;
            padding-left: 18px;
        }

        .discovery-preview-body li {
            font-size: 13px;
            line-height: 1.5;
            margin: 0 0 4px;
            color: var(--ol-text);
        }

        .discovery-preview-body a {
            color: var(--ol-gold);
            text-decoration: underline;
        }

        .discovery-preview-toggle {
            margin-top: 10px;
            display: flex;
            justify-content: flex-start;
        }

        .preview-highlight {
            font-weight: 700;
            border-radius: 4px;
            padding: 0 3px;
        }

        .preview-highlight-intent {
            color: #ffe0a0;
            background: rgba(200, 169, 91, 0.18);
        }

        .preview-highlight-money {
            color: #c6f6d5;
            background: rgba(34, 197, 94, 0.16);
        }

        .preview-highlight-location {
            color: #bfdbfe;
            background: rgba(59, 130, 246, 0.18);
        }

        /* KPI Cards */
        .kpi-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            padding: 20px;
        }

        .kpi-card {
            background: var(--ol-surface);
            padding: 20px;
            border-radius: var(--ol-radius-md);
            box-shadow: var(--ol-shadow-sm);
            border: 1px solid var(--ol-border);
        }

        body.light-theme .kpi-card {
            background: #ffffff;
            border: 1px solid #e9ecef;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        }

        .kpi-value {
            font-family: 'Cormorant Garamond', serif;
            font-size: clamp(28px, 3vw, 42px);
            font-weight: 500;
            line-height: 1;
            letter-spacing: -0.04em;
            color: var(--ol-text-strong);
        }

        .kpi-label {
            font-family: 'Syne Mono', monospace;
            font-size: 10px;
            font-weight: 500;
            letter-spacing: 0.12em;
            color: var(--ol-gold);
            text-transform: uppercase;
            margin-top: 8px;
        }

        /* Posting Center */
        .posting-header {
            padding: 12px 24px;
            background: rgba(15, 17, 21, 0.95);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: space-between;
            z-index: 100;
        }

        .posting-exit-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 16px;
            border-radius: 100px;
            background: rgba(239, 68, 68, 0.08);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: #ef4444;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-family: 'Syne', sans-serif;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .posting-exit-btn:hover {
            background: #ef4444;
            color: white;
            transform: scale(1.05);
            box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
        }

        .posting-exit-btn .material-symbols-outlined {
            font-size: 18px;
        }

        .posting-title-block {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .posting-title-block h1 {
            margin: 0;
            font-family: 'Cormorant Garamond', serif;
            font-size: clamp(34px, 4vw, 52px);
            font-weight: 400;
            line-height: 0.98;
            letter-spacing: -0.03em;
            color: var(--ol-text-strong);
        }

        .posting-title-block p {
            max-width: 760px;
            color: rgba(232, 236, 242, 0.72);
            font-size: 15px;
            line-height: 1.7;
        }

        .posting-title-block>h1,
        .posting-title-block>p {
            display: none;
        }

        .posting-main-title {
            font-family: 'Cormorant Garamond', serif;
            font-size: clamp(24px, 3vw, 36px);
            font-weight: 400;
            line-height: 0.98;
            letter-spacing: -0.03em;
            color: var(--ol-text-strong);
        }

        .posting-main-copy {
            max-width: 760px;
            color: rgba(232, 236, 242, 0.72);
            font-size: 13px;
            line-height: 1.5;
        }

        .posting-header-pill {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            margin-left: auto;
            padding: 12px 18px;
            border-radius: 999px;
            border: 1px solid rgba(200, 169, 91, 0.24);
            background: rgba(200, 169, 91, 0.08);
            color: var(--ol-text-strong);
            font-family: 'Syne Mono', monospace;
            font-size: 11px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .posting-layout {
            display: grid;
            grid-template-columns: 1fr 3fr 1fr;
            gap: 16px;
            padding: 16px;
            flex: 1;
            overflow: hidden;
            background:
                radial-gradient(circle at top left, rgba(200, 169, 91, 0.08), transparent 24%),
                linear-gradient(180deg, #11141a 0%, #0c0f13 100%);
        }

        .posting-rail {
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow-y: auto;
        }

        .posting-shell {
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
                #10141b;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
            overflow: hidden;
        }

        .posting-shell-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 16px 18px 0;
        }

        .posting-shell-header .ol-label {
            color: var(--ol-gold);
        }

        .posting-connect {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 0 14px;
            min-height: 34px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.03);
            color: var(--ol-text);
            font-family: 'Syne Mono', monospace;
            font-size: 11px;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        .posting-connect-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #f97370;
            box-shadow: 0 0 0 6px rgba(249, 115, 112, 0.14);
        }

        .posting-control-copy {
            padding: 6px 18px 0;
            color: rgba(232, 236, 242, 0.68);
            font-size: 12px;
            line-height: 1.5;
        }

        .posting-form {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 16px 18px;
        }

        .posting-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .posting-field .ol-label {
            color: rgba(232, 236, 242, 0.62);
        }

        .posting-field .input,
        .posting-chat-area .input,
        .posting-stage-draft .input {
            min-height: 42px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.04);
            color: var(--ol-text-strong);
            font-family: 'Syne', sans-serif;
            box-shadow: none;
        }

        .posting-field .input:focus,
        .posting-chat-area .input:focus,
        .posting-stage-draft .input:focus {
            border-color: rgba(200, 169, 91, 0.5);
            box-shadow: 0 0 0 3px rgba(200, 169, 91, 0.12);
        }

        .posting-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 16px;
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            background: rgba(255, 255, 255, 0.03);
        }

        .posting-toggle-copy {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .posting-toggle-copy strong {
            color: var(--ol-text-strong);
            font-size: 14px;
            font-weight: 600;
        }

        .posting-toggle-copy span {
            color: rgba(232, 236, 242, 0.52);
            font-size: 12px;
        }

        .posting-toggle input {
            width: 20px;
            height: 20px;
            accent-color: var(--ol-gold-strong);
        }

        .posting-generate {
            width: 100%;
            min-height: 44px;
            border-radius: 16px;
            border: 1px solid rgba(200, 169, 91, 0.28);
            background:
                linear-gradient(135deg, rgba(200, 169, 91, 0.28), rgba(20, 23, 29, 0.1)),
                linear-gradient(180deg, #191d24, #12161c);
            color: var(--ol-text-strong);
            font-family: 'Syne', sans-serif;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: -0.02em;
            justify-content: center;
        }

        .posting-generate:hover {
            transform: translateY(-1px);
            border-color: rgba(200, 169, 91, 0.48);
        }

        .posting-metrics {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            padding: 12px 18px 16px;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(7, 8, 10, 0.18));
        }

        .posting-metric {
            padding: 10px 12px 8px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .posting-metric strong {
            display: block;
            margin-top: 6px;
            color: var(--ol-text-strong);
            font-size: 13px;
            font-weight: 700;
            line-height: 1.3;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .posting-metric span {
            display: block;
            margin-top: 3px;
            color: rgba(232, 236, 242, 0.54);
            font-size: 11px;
            line-height: 1.4;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .posting-reminder {
            width: 100%;
            justify-content: center;
            display: inline-flex;
            align-items: center;
            margin-top: 8px;
            padding: 8px;
            min-height: 36px;
            border-radius: 10px;
        }

        .posting-reminder svg {
            opacity: 0.8;
        }

        .posting-reminder:hover svg {
            opacity: 1;
        }

        .posting-stage {
            display: flex;
            min-width: 0;
        }

        .posting-stage .posting-shell {
            width: 100%;
            display: flex;
            flex-direction: column;
            min-height: 100%;
            background:
                radial-gradient(circle at top right, rgba(200, 169, 91, 0.08), transparent 24%),
                linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
                #11141a;
        }

        .posting-stage-header {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            padding: 16px 20px 0;
            align-items: flex-start;
        }

        .posting-stage-header .ol-kicker {
            margin-bottom: 6px;
        }

        .posting-stage-title {
            font-family: 'Cormorant Garamond', serif;
            font-size: clamp(22px, 2.8vw, 32px);
            font-weight: 400;
            line-height: 1;
            letter-spacing: -0.03em;
            color: var(--ol-text-strong);
        }

        .posting-stage-subtitle {
            margin-top: 4px;
            max-width: 720px;
            color: rgba(232, 236, 242, 0.66);
            font-size: 13px;
            line-height: 1.5;
        }

        .posting-stage-status {
            padding: 10px 14px;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            background: rgba(255, 255, 255, 0.03);
            text-align: right;
        }

        .posting-stage-status .ol-label {
            color: rgba(232, 236, 242, 0.52);
        }

        .posting-stage-status strong {
            display: block;
            margin-top: 6px;
            color: var(--ol-text-strong);
            font-size: 15px;
        }

        .posting-stage-body {
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding: 16px 20px 20px;
            flex: 1;
        }

        .posting-chat-area {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 76px;
            gap: 12px;
            align-items: stretch;
            padding: 14px;
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            background: rgba(255, 255, 255, 0.03);
        }

        .posting-chat-area textarea {
            min-height: 90px;
            resize: vertical;
            font-family: 'Syne Mono', monospace;
            font-size: 12px;
            line-height: 1.6;
        }

        .posting-apply {
            min-height: 90px;
            border-radius: 16px;
            justify-content: center;
            flex-direction: column;
            background: rgba(200, 169, 91, 0.08);
            border: 1px solid rgba(200, 169, 91, 0.18);
            color: var(--ol-text-strong);
        }

        .posting-apply span:last-child {
            font-size: 9px;
            letter-spacing: 0.12em;
        }

        .posting-stage-note {
            padding: 10px 14px;
            border-left: 2px solid rgba(200, 169, 91, 0.5);
            background: rgba(200, 169, 91, 0.06);
            color: rgba(232, 236, 242, 0.72);
            font-family: 'Cormorant Garamond', serif;
            font-size: 22px;
            font-style: italic;
            line-height: 1.15;
        }

        .posting-stage-draft {
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex: 1;
            min-height: 280px;
            padding: 16px;
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
        }

        .posting-draft-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
        }

        .posting-draft-toolbar strong {
            color: var(--ol-text-strong);
            font-size: 15px;
            letter-spacing: -0.02em;
        }

        .posting-draft-toolbar span {
            color: rgba(232, 236, 242, 0.56);
            font-size: 11px;
        }

        .posting-stage-draft textarea {
            flex: 1;
            min-height: 240px;
            resize: none;
            border-radius: 16px;
            padding: 16px;
            background: rgba(7, 8, 10, 0.24);
            color: var(--ol-text-strong);
            font-size: 14px;
            line-height: 1.7;
        }

        .posting-action-row {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            padding-top: 2px;
        }

        .posting-actions-left,
        .posting-actions-right {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .posting-action-primary,
        .posting-action-secondary {
            min-height: 40px;
            border-radius: 999px;
            padding: 0 18px;
            font-family: 'Syne', sans-serif;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .posting-action-primary {
            background: linear-gradient(135deg, rgba(200, 169, 91, 0.35), rgba(12, 15, 19, 0.1)), #171c23;
            border: 1px solid rgba(200, 169, 91, 0.35);
            color: var(--ol-text-strong);
        }

        .posting-action-secondary {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: var(--ol-text);
        }

        .posting-action-secondary:hover,
        .posting-action-primary:hover {
            transform: translateY(-1px);
        }

        .posting-status {
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid rgba(200, 169, 91, 0.18);
            background: rgba(200, 169, 91, 0.08);
            color: var(--ol-text-strong);
            font-family: 'Syne Mono', monospace;
            font-size: 10px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        @media (max-width: 1260px) {
            .posting-layout {
                grid-template-columns: 1fr;
            }

            .posting-header {
                align-items: flex-start;
                flex-direction: column;
            }

            .posting-header-pill {
                margin-left: 0;
            }
        }

        @media (max-width: 760px) {
            .posting-chat-area {
                grid-template-columns: 1fr;
            }

            .posting-apply {
                min-height: 54px;
                flex-direction: row;
            }

            .posting-metrics {
                grid-template-columns: 1fr;
            }

            .posting-stage-body,
            .posting-shell-header,
            .posting-control-copy,
            .posting-form,
            .posting-metrics,
            .posting-stage-header {
                padding-left: 18px;
                padding-right: 18px;
            }
        }

        /* Modal */
        .modal {
            position: fixed;
            inset: 0;
            background: rgba(7, 8, 10, 0.7);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 100;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: var(--ol-surface);
            border: 1px solid var(--ol-border);
            width: 90%;
            max-width: 500px;
            border-radius: var(--ol-radius-md);
            box-shadow: var(--ol-shadow-md);
            overflow: hidden;
        }

        /* Utilities */
        .hidden {
            display: none !important;
        }

        .flex {
            display: flex !important;
        }

        .gap-4 {
            gap: 16px;
        }

        .m-4 {
            margin: 16px;
        }

        .p-4 {
            padding: 16px;
        }

        .toast-stack {
            position: fixed;
            right: 20px;
            bottom: 20px;
            display: grid;
            gap: 8px;
            z-index: 120;
        }

        .toast-item {
            background: var(--ol-surface);
            color: var(--ol-text);
            border: 1px solid var(--ol-border);
            border-left: 3px solid var(--ol-gold);
            border-radius: 8px;
            padding: 10px 12px;
            font-size: 12px;
            box-shadow: var(--ol-shadow-sm);
            min-width: 220px;
        }

        .inline-spinner {
            width: 14px;
            height: 14px;
            border: 2px solid rgba(255, 255, 255, 0.24);
            border-top-color: var(--ol-gold);
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
            display: inline-block;
            vertical-align: middle;
            margin-right: 8px;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* SCCB-122: Discovery loading premium ring */
        .discovery-progress-ring {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid rgba(200, 169, 91, 0.45);
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            flex-shrink: 0;
        }

        .discovery-progress-ring::after {
            content: none;
        }

        .discovery-timer-display {
            position: relative;
            z-index: 1;
            font-family: 'Courier New', Courier, monospace;
            font-size: 11px;
            font-weight: 700;
            color: #c8a951;
            letter-spacing: 1px;
            pointer-events: none;
        }

        .discovery-ai-badge {
            font-size: 17px;
            font-weight: 900;
            background: linear-gradient(135deg, #b8922e 0%, #f0d080 45%, #c8a951 75%, #e8c060 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            filter: drop-shadow(0 0 6px rgba(200, 169, 81, 0.4));
            line-height: 1;
            letter-spacing: 2px;
        }

        .animated-dots::after {
            content: '';
            animation: dotAnimation 1.5s steps(4, end) infinite;
        }

        @keyframes dotAnimation {
            0%   { content: ''; }
            25%  { content: '.'; }
            50%  { content: '..'; }
            75%  { content: '...'; }
            100% { content: ''; }
        }

        /* SCCB-PR-DE-013: Hairline Scrollbar */
        #buyer-discovery-tree::-webkit-scrollbar,
        #buyer-discovery-detail-content::-webkit-scrollbar {
            width: 2px;
            height: 2px;
        }

        #buyer-discovery-tree::-webkit-scrollbar-track,
        #buyer-discovery-detail-content::-webkit-scrollbar-track {
            background: transparent;
        }

        #buyer-discovery-tree::-webkit-scrollbar-thumb,
        #buyer-discovery-detail-content::-webkit-scrollbar-thumb {
            background: rgba(200, 169, 91, 0.3);
            border-radius: 1px;
        }

        #buyer-discovery-tree::-webkit-scrollbar-thumb:hover,
        #buyer-discovery-detail-content::-webkit-scrollbar-thumb:hover {
            background: rgba(200, 169, 91, 0.5);
        }

        /* SCCB-PR-DE-013: Tree Explorer Styles */
        .tree-node {
            user-select: none;
        }

        .tree-node-header {
            display: flex;
            align-items: center;
            padding: 6px 8px;
            cursor: pointer;
            border-radius: 6px;
            transition: background 0.15s;
            font-size: 13px;
        }

        .tree-node-header:hover {
            background: rgba(255, 255, 255, 0.04);
        }

        body.light-theme .tree-node-header:hover {
            background: rgba(0, 0, 0, 0.04);
        }

        .tree-node-label {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .tree-node-count {
            font-size: 11px;
            color: var(--ol-muted);
            background: rgba(255, 255, 255, 0.05);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
        }

        .tree-node-chevron {
            font-size: 16px;
            color: var(--ol-muted);
            transition: transform 0.2s;
            margin-right: 4px;
        }

        .tree-node.collapsed .tree-node-chevron {
            transform: rotate(-90deg);
        }

        .tree-node-children {
            padding-left: 16px;
            margin-top: 2px;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
        }

        .tree-node.collapsed .tree-node-children {
            max-height: 0 !important;
            margin-top: 0;
        }

        .tree-leaf {
            display: flex;
            align-items: center;
            padding: 6px 8px;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.15s;
            font-size: 12px;
            color: var(--ol-muted-2);
            margin-bottom: 1px;
        }

        .tree-leaf:hover {
            background: rgba(255, 255, 255, 0.04);
            color: var(--ol-text);
        }

        body.light-theme .tree-leaf:hover {
            background: rgba(0, 0, 0, 0.04);
        }

        .tree-leaf.selected {
            background: rgba(200, 169, 91, 0.15);
            color: var(--ol-text-strong);
            border-left: 2px solid var(--ol-gold);
        }

        .tree-leaf.hidden {
            display: none;
        }

        /* SCCB-PR-DE-014: Filter Chips */
        .filter-chip {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
            background: rgba(255, 255, 255, 0.05);
            color: var(--ol-muted-2);
            border: 1px solid transparent;
        }

        .filter-chip:hover {
            background: rgba(255, 255, 255, 0.08);
            color: var(--ol-text);
        }

        body.light-theme .filter-chip {
            background: rgba(0, 0, 0, 0.05);
        }

        body.light-theme .filter-chip:hover {
            background: rgba(0, 0, 0, 0.08);
        }

        .filter-chip.active {
            background: rgba(200, 169, 91, 0.15);
            color: var(--ol-gold);
            border-color: rgba(200, 169, 91, 0.3);
        }

        .tree-leaf-icon {
            font-size: 14px;
            margin-right: 6px;
            color: var(--ol-muted);
        }

        .tree-leaf.selected .tree-leaf-icon {
            color: var(--ol-gold);
        }

        /* SCCB-PDE-BUYERDISCOVERY-UI-CORRECTION-V2-0905 */
                #buyer-discovery-view .discovery-content-area,
                .discovery-content-area {
                    display: flex;
                    flex-direction: column;
                    flex: 1;
                    min-width: 0;
                    max-width: 100%;
                    overflow: hidden;
                }


        .discovery-top-section {
            background: var(--ol-surface);
            border-bottom: 1px solid var(--ol-border);
            display: flex;
            flex-direction: column;
            padding: 16px 24px;
            gap: 12px;
            min-width: 0;
            max-width: 100%;
            overflow: visible;
            /* Prevent clipping of dropdowns/tooltips */
        }



        .discovery-bottom-section {
            flex: 1;
            min-width: 0;
            max-width: 100%;
            overflow: auto;
            background: var(--ol-base);
            padding: 0;
        }

        #discovery-view .leads-middle {
            overflow: visible;
        }

        #discovery-view .discovery-results-table {
            table-layout: fixed;
            min-width: 0;
        }

        #discovery-view .discovery-results-table th,
        #discovery-view .discovery-results-table td {
            padding-left: 12px;
            padding-right: 12px;
        }

        #discovery-view .discovery-col-source {
            width: 96px;
        }

        #discovery-view .discovery-col-intent {
            width: 92px;
        }

        #discovery-view .discovery-col-confidence {
            width: 104px;
        }

        #discovery-view .discovery-col-location {
            width: 136px;
        }

        #discovery-view .discovery-col-status {
            width: 96px;
        }

        #discovery-view .discovery-col-date {
            width: 94px;
        }

        #discovery-view .discovery-col-action {
            width: 108px;
        }

        #discovery-view .discovery-results-table :is(th, td):nth-child(1) {
            width: 96px;
        }

        #discovery-view .discovery-results-table :is(th, td):nth-child(3) {
            width: 92px;
        }

        #discovery-view .discovery-results-table :is(th, td):nth-child(4) {
            width: 104px;
        }

        #discovery-view .discovery-results-table :is(th, td):nth-child(5) {
            width: 136px;
        }

        #discovery-view .discovery-results-table :is(th, td):nth-child(6) {
            width: 96px;
        }

        #discovery-view .discovery-results-table :is(th, td):nth-child(7) {
            width: 94px;
        }

        #discovery-view .discovery-results-table :is(th, td):nth-child(8) {
            width: 108px;
        }

        @media (max-width: 1180px) {

            #discovery-view .discovery-results-table th,
            #discovery-view .discovery-results-table td {
                padding-left: 6px;
                padding-right: 6px;
            }

            #discovery-view .discovery-col-source {
                width: 66px;
            }

            #discovery-view .discovery-col-intent {
                width: 58px;
            }

            #discovery-view .discovery-col-confidence {
                width: 70px;
            }

            #discovery-view .discovery-col-location {
                width: 76px;
            }

            #discovery-view .discovery-col-status {
                width: 58px;
            }

            #discovery-view .discovery-col-date {
                width: 72px;
            }

            #discovery-view .discovery-col-action {
                width: 78px;
            }

            #discovery-view .discovery-results-table :is(th, td):nth-child(1) {
                width: 66px;
            }

            #discovery-view .discovery-results-table :is(th, td):nth-child(3) {
                width: 58px;
            }

            #discovery-view .discovery-results-table :is(th, td):nth-child(4) {
                width: 70px;
            }

            #discovery-view .discovery-results-table :is(th, td):nth-child(5) {
                width: 76px;
            }

            #discovery-view .discovery-results-table :is(th, td):nth-child(6) {
                width: 58px;
            }

            #discovery-view .discovery-results-table :is(th, td):nth-child(7) {
                width: 72px;
            }

            #discovery-view .discovery-results-table :is(th, td):nth-child(8) {
                width: 78px;
            }

            #discovery-view .discovery-source-tag,
            #discovery-view .discovery-intent-tag,
            #discovery-view .confidence-badge,
            #discovery-view .ol-badge {
                padding-left: 6px;
                padding-right: 6px;
            }

            #discovery-view .discovery-action-column .discovery-row-actions {
                gap: 4px !important;
                min-width: 0 !important;
            }

            #discovery-view .discovery-action-column .ol-button {
                width: 28px !important;
                height: 30px !important;
            }
        }

        #discovery-view .discovery-date-column,
        #discovery-view .discovery-action-column {
            position: sticky;
            background: var(--ol-surface-2);
            box-shadow: -1px 0 0 var(--ol-border);
        }

        #discovery-view .discovery-date-column {
            right: 108px;
            z-index: 6;
        }

        #discovery-view .discovery-action-column {
            right: 0;
            z-index: 7;
        }

        #discovery-view td.discovery-date-column,
        #discovery-view td.discovery-action-column {
            background: var(--ol-base);
        }

        body.light-theme #discovery-view td.discovery-date-column,
        body.light-theme #discovery-view td.discovery-action-column {
            background: #ffffff;
        }

        body.light-theme #discovery-view th.discovery-date-column,
        body.light-theme #discovery-view th.discovery-action-column {
            background: #f8f9fa;
        }

        @media (max-width: 1180px) {
            #discovery-view .discovery-date-column {
                right: 78px;
            }
        }

        .discovery-filter-row {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            align-items: flex-end;
            width: 100%;
            min-width: 0;
            max-width: 100%;
        }

        .discovery-action-row {
            display: flex;
            align-items: center;
            gap: 20px;
            padding-top: 12px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            width: 100%;
            min-width: 0;
            max-width: 100%;
        }

        .discovery-search-row {
            display: flex;
            width: 100%;
        }

        .discovery-search-row .ol-input {
            width: 100%;
            height: 40px;
        }

        .discovery-action-left {
            display: flex;
            gap: 8px;
            align-items: center;
            min-width: 0;
            flex: 1;
        }

        .discovery-action-controls {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: nowrap;
            justify-content: flex-start;
            width: 100%;
            min-width: 0;
        }

        .discovery-post-fetch-filters {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: nowrap;
            flex-shrink: 0;
            margin-left: 4px;
            padding-left: 8px;
            border-left: 1px solid rgba(255, 255, 255, 0.1);
        }

        .discovery-inline-toolbar {
            display: flex;
            gap: 6px;
            align-items: center;
            margin-right: 4px;
            border-right: 1px solid rgba(255, 255, 255, 0.1);
            padding-right: 8px;
            min-width: 0;
            flex: 1 1 auto;
            overflow: hidden;
        }

        .discovery-source-pills,
        .discovery-signal-pills,
        .discovery-contact-pills {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: nowrap;
        }

        .discovery-signal-pills {
            min-width: 0;
            flex: 1 1 auto;
            overflow: hidden;
        }

        .discovery-summary-inline {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            flex: 1 1 auto;
            overflow: hidden;
            white-space: nowrap;
        }

        .discovery-summary-inline .discovery-signal-pills {
            flex: 0 0 auto;
        }

        .discovery-summary-inline .discovery-sources-text {
            min-width: 0;
            flex: 1 1 auto;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .discovery-summary-cta {
            appearance: none;
            display: inline-flex;
            align-items: center;
            font: inherit;
        }

        .discovery-contact-pills,
        .discovery-low-signal-toggle {
            flex-shrink: 0;
        }

        .discovery-source-chip,
        .discovery-signal-chip,
        .discovery-icon-pill {
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.025);
            color: var(--ol-muted);
            cursor: pointer;
            transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
        }

        .discovery-source-chip,
        .discovery-signal-chip {
            font-size: 10px;
            font-weight: 600;
            letter-spacing: 0.03em;
            white-space: nowrap;
            padding: 5px 7px;
            border-radius: 999px;
        }

        .discovery-source-chip:hover,
        .discovery-signal-chip:hover,
        .discovery-icon-pill:hover {
            color: var(--ol-text-strong);
            transform: translateY(-1px);
        }

        .discovery-source-chip.active,
        .discovery-signal-chip.active {
            color: var(--ol-gold);
            background: rgba(200, 169, 91, 0.14);
            border-color: rgba(200, 169, 91, 0.35);
            box-shadow: inset 0 0 0 1px rgba(200, 169, 91, 0.08);
        }

        /* SCCB-131A: Summary chip visual hierarchy */
        .discovery-chip-qualified {
            color: var(--ol-gold);
            background: rgba(200, 169, 91, 0.10);
            border-color: rgba(200, 169, 91, 0.30);
        }

        .discovery-chip-qualified.active {
            background: rgba(200, 169, 91, 0.22);
            border-color: rgba(200, 169, 91, 0.52);
            box-shadow: inset 0 0 0 1px rgba(200, 169, 91, 0.12), 0 0 8px rgba(200, 169, 91, 0.06);
        }

        .discovery-chip-rejected {
            color: rgba(210, 110, 100, 0.78);
            background: rgba(180, 60, 60, 0.07);
            border-color: rgba(180, 60, 60, 0.22);
        }

        .discovery-chip-rejected .source-count-val {
            color: rgba(220, 120, 110, 0.90) !important;
        }

        .discovery-chip-rejected.active {
            color: rgba(220, 120, 110, 0.92);
            background: rgba(180, 60, 60, 0.14);
            border-color: rgba(180, 60, 60, 0.38);
        }

        .discovery-icon-pill {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.05);
            padding: 0;
        }

        .discovery-icon-pill.active {
            background: rgba(200, 169, 91, 0.16);
            border-color: rgba(200, 169, 91, 0.35);
            color: var(--ol-gold);
            box-shadow: inset 0 0 0 1px rgba(200, 169, 91, 0.25);
        }

        .discovery-icon-pill .material-symbols-outlined {
            font-size: 16px;
        }

        .discovery-source-total {
            gap: 4px;
            width: auto;
            padding: 0 7px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            color: var(--ol-muted);
        }

        .discovery-source-total,
        .discovery-contact-total {
            width: auto;
            min-width: 28px;
            gap: 4px;
            padding: 0 7px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            white-space: nowrap;
        }

        .discovery-source-total {
            min-width: 48px;
        }

        .discovery-contact-total {
            width: 28px;
            padding: 0;
        }

        .discovery-divider {
            width: 1px;
            height: 16px;
            background: rgba(255, 255, 255, 0.1);
            margin: 0 4px;
            flex-shrink: 0;
        }

        .discovery-low-signal-toggle {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            padding: 0;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.035);
            color: var(--ol-muted);
            cursor: pointer;
            transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
        }

        .discovery-low-signal-toggle input {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            margin: 0;
            opacity: 0;
            cursor: pointer;
        }

        .discovery-low-signal-toggle:hover {
            color: var(--ol-text-strong);
            transform: translateY(-1px);
        }

        .discovery-low-signal-toggle:has(input:checked) {
            background: rgba(200, 169, 91, 0.16);
            border-color: rgba(200, 169, 91, 0.35);
            color: var(--ol-gold);
            box-shadow: inset 0 0 0 1px rgba(200, 169, 91, 0.25);
        }

        .discovery-action-controls>.ol-button {
            flex: 0 0 32px;
            height: 32px !important;
            min-height: 32px !important;
            width: 32px !important;
        }

        .discovery-action-controls>.ol-button .material-symbols-outlined {
            font-size: 18px;
        }

        .discovery-post-fetch-filter {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .discovery-post-fetch-filter .ol-select {
            height: 40px;
            box-sizing: border-box;
            font-size: 8px;
            line-height: 1;
            padding-left: 10px;
            padding-right: 28px;
        }

        .discovery-post-fetch-filter .ol-select option {
            font-size: 8px;
        }

        #discovery-price-filter {
            width: 132px !important;
            min-width: 132px;
        }

        #discovery-time-filter {
            width: 148px !important;
            min-width: 148px;
        }

        .saved-search-cta {
            display: none;
            align-items: center;
            gap: 8px;
            padding: 6px 32px 6px 10px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            cursor: pointer;
            transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
            flex-shrink: 0;
            min-height: 40px;
            width: 185px;
            min-width: 185px;
            box-sizing: border-box;
            position: relative;
        }

        .saved-search-cta:hover {
            border-color: rgba(200, 169, 91, 0.45);
            background: rgba(255, 255, 255, 0.06);
            transform: translateY(-1px);
        }

        .saved-search-inline-group {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            flex-wrap: nowrap;
            flex-shrink: 0;
            padding-bottom: 1px;
        }

        .saved-search-copy {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 2px;
            min-width: 0;
            width: 100%;
        }

        .saved-search-title {
            font-size: 11px;
            color: var(--ol-text);
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
            width: 100%;
        }

        .saved-search-meta {
            font-size: 10px;
            color: var(--ol-muted-2);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            padding: 0;
            border-radius: 0;
            background: transparent;
            line-height: 1.2;
            width: 100%;
        }

        .discovery-filter-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex-shrink: 0;
        }

        /* Hairline Scrollbar Styling */
        .discovery-bottom-section::-webkit-scrollbar {
            width: 3px;
            height: 3px;
        }

        .discovery-bottom-section::-webkit-scrollbar-track {
            background: transparent;
        }

        .discovery-bottom-section::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
        }

        .discovery-bottom-section::-webkit-scrollbar-thumb:hover {
            background: var(--ol-gold);
        }

        /* Global hairline scrollbar for all scrollable areas */
        ::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--ol-gold);
        }


        .discovery-action-row {
            display: flex;
            gap: 8px;
            align-items: center;
            justify-content: flex-start;
            flex-wrap: nowrap;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 6px;
            overflow-x: auto;
            overflow-y: hidden;
        }


        .discovery-filter-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .discovery-filter-label {
            font-family: 'Syne Mono', monospace;
            font-size: 10px;
            font-weight: 600;
            color: var(--ol-gold);
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .discovery-signal-row {
            transition: all 0.2s ease;
        }

        .discovery-signal-row:hover {
            background: rgba(200, 169, 91, 0.06) !important;
            transform: scale(1.002);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .discovery-source-tag {
            padding: 4px 10px;
            border-radius: 6px;
            background: var(--ol-surface-2);
            border: 1px solid var(--ol-border);
            color: var(--ol-gold);
            font-weight: 700;
            font-size: 11px;
            font-family: 'Syne Mono', monospace;
        }

        .discovery-intent-tag {
            padding: 4px 10px;
            border-radius: 6px;
            font-weight: 700;
            font-size: 10px;
            font-family: 'Syne Mono', monospace;
            text-transform: uppercase;
            display: inline-flex;
            align-items: center;
        }

        .intent-sell {
            background: rgba(34, 197, 94, 0.1);
            color: #4ade80;
            border: 1px solid rgba(34, 197, 94, 0.2);
        }

        .intent-rent {
            background: rgba(59, 130, 246, 0.1);
            color: #60a5fa;
            border: 1px solid rgba(59, 130, 246, 0.2);
        }

        .intent-manage {
            background: rgba(168, 85, 247, 0.1);
            color: #c084fc;
            border: 1px solid rgba(168, 85, 247, 0.2);
        }

        .intent-buy {
            background: rgba(251, 191, 36, 0.1);
            color: #fbbf24;
            border: 1px solid rgba(251, 191, 36, 0.2);
        }

        .discovery-preview-drawer {
            background: var(--ol-surface-2);
            border-top: none;
            padding: 24px;
            animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

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

        @keyframes modal-slide-up {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

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

        .discovery-preview-card {
            background: var(--ol-base);
            border: 1px solid var(--ol-border);
            border-radius: var(--ol-radius-md);
            overflow: hidden;
            box-shadow: var(--ol-shadow-md);
        }

        .discovery-preview-header {
            padding: 20px 24px;
            border-bottom: 1px solid var(--ol-border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: linear-gradient(to right, var(--ol-surface), transparent);
        }

        .discovery-preview-body {
            padding: 24px;
            max-height: 500px;
            overflow-y: auto;
            font-family: 'Inter', sans-serif;
            line-height: 1.8;
            color: var(--ol-text);
        }

        .discovery-preview-meta-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px;
            padding: 20px 24px;
            background: var(--ol-surface);
            border-bottom: 1px solid var(--ol-border);
        }

        .discovery-preview-meta-item strong {
            display: block;
            font-family: 'Syne Mono', monospace;
            font-size: 10px;
            color: var(--ol-gold);
            text-transform: uppercase;
            margin-bottom: 4px;
        }

        .discovery-preview-meta-item span {
            font-size: 13px;
            font-weight: 500;
        }

        .discovery-action-btn {
            height: 32px;
            padding: 0 16px;
            font-size: 11px;
            border-radius: 8px;
        }

        /* Light Theme specific overrides */
        body.light-theme .discovery-filter-bar {
            background: linear-gradient(135deg, rgba(200, 169, 91, 0.05), rgba(200, 169, 91, 0.02));
            border-color: #dee2e6;
        }

        body.light-theme .discovery-source-tag {
            background: #ffffff;
            border-color: #dee2e6;
        }

        body.light-theme .discovery-preview-drawer {
            background: #f8f9fa;
        }

        body.light-theme .discovery-preview-card {
            background: #ffffff;
            border-color: #dee2e6;
        }

        body.light-theme .discovery-preview-header {
            background: linear-gradient(to right, #f8f9fa, transparent);
        }

        body.light-theme .discovery-preview-meta-grid {
            background: #f8f9fa;
            border-color: #dee2e6;
        }


        /* --- Posting Center Template Preview Styles --- */
        .preview-scaler {
            width: 100%;
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            background: radial-gradient(circle at top, #1e293b 0%, #020617 100%);
            border-radius: 12px;
            padding: 16px;
            min-height: 0;
            scrollbar-width: thin;
        }

        #post-template-gallery {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            width: 100%;
        }

        .template-thumb-wrapper {
            aspect-ratio: 9/16;
            background: #000;
            border-radius: 6px;
            overflow: hidden;
            position: relative;
            border: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: transform 0.2s, border-color 0.2s;
        }

        .template-thumb-wrapper:hover {
            transform: translateY(-2px);
            border-color: #c8a95b;
        }

        .template-thumb-wrapper:last-child {
            grid-column: 2;
            /* Center the 10th item */
        }

        .thumb-canvas {
            width: 540px;
            height: 960px;
            background: white;
            position: absolute;
            top: 0;
            left: 0;
            transform-origin: top left;
        }

        .thumb-label {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            font-size: 8px;
            padding: 4px;
            text-align: center;
            text-transform: uppercase;
            z-index: 10;
        }

        .premium-border-outer {
            position: absolute;
            inset: 0;
            border: 12px solid var(--border-color, #065f46);
            pointer-events: none;
            z-index: 50;
        }

        /* --- Post Preview Modal (Contained Message Box) --- */
        #post-preview-modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10000;
            background: transparent;
            align-items: center;
            justify-content: center;
            padding: 20px;
            pointer-events: none;
        }

        #post-preview-modal>.modal-window {
            pointer-events: all;
        }

        .modal-window {
            background: #020617;
            border: 1px solid rgba(200, 169, 91, 0.3);
            border-radius: 24px;
            height: 96vh;
            aspect-ratio: 9 / 16;
            max-width: 95vw;
            position: relative;
            display: flex;
            flex-direction: column;
            padding: 16px 16px 20px;
            box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
            animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            overflow: hidden;
        }

        @keyframes modalPop {
            from {
                transform: scale(0.9);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .modal-content-frame {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            height: 100%;
            width: 100%;
            overflow: hidden;
            justify-content: flex-start;
        }

        .modal-header-frame {
            background: rgba(200, 169, 91, 0.1);
            border: 1px solid rgba(200, 169, 91, 0.2);
            padding: 4px 12px;
            border-radius: 100px;
            margin-bottom: 8px;
        }

        #modal-template-title {
            color: #c8a95b;
            font-family: 'Syne', sans-serif;
            font-size: 10px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
            padding-right: 15px;
        }

        #modal-template-canvas {
            width: 540px;
            height: 960px;
            background: white;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
            transform-origin: top center;
            position: relative;
            overflow: hidden;
            flex-shrink: 0;
        }

        .modal-close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #94a3b8;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: 0.2s;
            z-index: 100;
        }

        .modal-close-btn:hover {
            background: #ef4444;
            color: white;
            transform: scale(1.1);
        }

        .modal-close-btn:hover {
            background: #ef4444;
            transform: rotate(90deg);
        }

        .premium-border-inner {
            position: absolute;
            inset: 18px;
            border: 1px solid var(--border-color, #065f46);
            opacity: 0.3;
            pointer-events: none;
            z-index: 50;
        }

        .t-img-fit {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .t-flex {
            display: flex;
        }

        .t-grid {
            display: grid;
        }

        /* Community Radar Styles */
        .radar-platform-facebook {
            background: rgba(24, 119, 242, 0.1) !important;
            color: #1877f2 !important;
            border: 1px solid rgba(24, 119, 242, 0.2) !important;
        }

        .radar-platform-linkedin {
            background: rgba(10, 102, 194, 0.1) !important;
            color: #0a66c2 !important;
            border: 1px solid rgba(10, 102, 194, 0.2) !important;
        }

        .radar-platform-reddit {
            background: rgba(255, 69, 0, 0.1) !important;
            color: #ff4500 !important;
            border: 1px solid rgba(255, 69, 0, 0.2) !important;
        }

        .radar-platform-youtube {
            background: rgba(255, 0, 0, 0.1) !important;
            color: #ff0000 !important;
            border: 1px solid rgba(255, 0, 0, 0.2) !important;
        }

        .radar-platform-instagram {
            background: rgba(225, 48, 108, 0.1) !important;
            color: #e1306c !important;
            border: 1px solid rgba(225, 48, 108, 0.2) !important;
        }

        .radar-platform-whatsapp {
            background: rgba(37, 211, 102, 0.1) !important;
            color: #25d366 !important;
            border: 1px solid rgba(37, 211, 102, 0.2) !important;
        }

        .priority-high {
            background: rgba(200, 169, 91, 0.15) !important;
            color: var(--ol-gold) !important;
            border: 1px solid rgba(200, 169, 91, 0.3) !important;
        }

        .priority-medium {
            background: rgba(148, 163, 184, 0.1) !important;
            color: #94a3b8 !important;
            border: 1px solid rgba(148, 163, 184, 0.2) !important;
        }

        .priority-low {
            background: rgba(71, 85, 105, 0.1) !important;
            color: #64748b !important;
            border: 1px solid rgba(71, 85, 105, 0.2) !important;
        }

        #radar-table-body tr.active-row {
            background: rgba(200, 169, 91, 0.12) !important;
            border-left: 3px solid var(--ol-gold) !important;
        }

        /* Collapsible Sidebar Styles */
        .sidebar {
            transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
            flex-shrink: 0;
        }

        .sidebar.collapsed {
            width: 72px;
        }

        .sidebar.collapsed .nav-copy,
        .sidebar.collapsed .nav-group-label,
        .sidebar.collapsed .sidebar-logo,
        .sidebar.collapsed .theme-toggle,
        .sidebar.collapsed #sidebar-serper-quota-container {
            display: none !important;
        }

        .sidebar.collapsed .sidebar-header {
            justify-content: center;
            padding: 20px 10px;
        }

        .sidebar.collapsed .sidebar-header::before {
            content: "P";
            font-family: 'Cormorant Garamond', serif;
            font-size: 24px;
            font-weight: 700;
            color: var(--ol-gold);
        }

        .sidebar.collapsed .sidebar-footer {
            flex-direction: column;
            gap: 12px;
            padding: 16px 10px;
            align-items: center;
            justify-content: center;
        }

        .sidebar.collapsed .nav-item {
            justify-content: center;
            padding: 12px;
        }

        /* Collapsible Discovery Left Panel Styles */
        .discovery-left-panel {
            transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
        }

        .discovery-left-panel.collapsed {
            width: 0px !important;
            min-width: 0px !important;
            padding: 0px !important;
            border-right: none !important;
        }


        .intent-badge {
            display: inline-flex;
            align-items: center;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .intent-sell {
            color: #f87171;
            background: rgba(248, 113, 113, 0.1);
            border: 1px solid rgba(248, 113, 113, 0.2);
        }
        .intent-rent {
            color: #60a5fa;
            background: rgba(96, 165, 250, 0.1);
            border: 1px solid rgba(96, 165, 250, 0.2);
        }
        .intent-manage {
            color: #34d399;
            background: rgba(52, 211, 153, 0.1);
            border: 1px solid rgba(52, 211, 153, 0.2);
        }
        .intent-buy {
            color: #fbbf24;
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.2);
        }
        .intent-general {
            color: #9ca3af;
            background: rgba(156, 163, 175, 0.1);
            border: 1px solid rgba(156, 163, 175, 0.2);
        }
        body.light-theme .intent-sell {
            color: #dc2626;
            background: #fef2f2;
            border-color: #fee2e2;
        }
        body.light-theme .intent-rent {
            color: #2563eb;
            background: #eff6ff;
            border-color: #dbeafe;
        }
        body.light-theme .intent-manage {
            color: #059669;
            background: #ecfdf5;
            border-color: #d1fae5;
        }
        body.light-theme .intent-buy {
            color: #d97706;
            background: #fffbeb;
            border-color: #fef3c7;
        }
        body.light-theme .intent-general {
            color: #4b5563;
            background: #f9fafb;
            border-color: #f3f4f6;
        }
    