/* Existing dashboard components. Workspace design follows below. */
:root {
    /* DARK MODE (Default) */
    --bg: #0d1117;
    --card-bg: #161b22;
    --border: #30363d;
    --text: #c9d1d9;
    --accent: #58a6ff;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f1c40f;
    /* Purple is retired — every former purple accent now aliases the single brand accent. */
    --purple: var(--accent);
    --hover-bg: #21262d;
    /* BROADCAST BUTTON COLORS (Dark Mode) */
    --broadcast-bg: #7dd3fc;
    --broadcast-text: #0f172a;
    /* OMNICHANNEL METRICS: one hue (accent), four shades — not four colors. */
    --omni-dooh: var(--accent);
    --omni-social: var(--accent-shade-2);
    --omni-search: var(--accent-shade-3);
    --omni-ctv: var(--accent-shade-4);
}
      /* LIGHT MODE OVERRIDES */
:root[data-theme="light"] {
    --bg: #f4f0eb;
    --card-bg: #fdfcfb;
    --border: #e6e1d8;
    --text: #2c2925;
    --hover-bg: #ede8e1;
    --accent: #0969da;
    --purple: var(--accent);
    /* BROADCAST BUTTON COLORS (Light Mode) */
    --broadcast-bg: #0ea5e9;
    --broadcast-text: #0c0c0c;
    /* OMNICHANNEL METRICS: one hue (accent), four shades — not four colors. */
    --omni-dooh: var(--accent);
    --omni-social: var(--accent-shade-2);
    --omni-search: var(--accent-shade-3);
    --omni-ctv: var(--accent-shade-4);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
/* 1. The Main Live Feed Container */
#feed-container { font-family: 'Inter', system-ui, sans-serif; }
/* 2. The "Executive Card" (Using Markdown Blockquotes) */
#feed-container blockquote { background-color: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 1.25rem; margin-bottom: 1rem; border-left: none; }
/* 3. The Blue Slide/Card Title (Using Markdown ###) */
#feed-container blockquote h3 { color: #60a5fa; font-size: 1.1rem; font-weight: 600; margin-top: 0; margin-bottom: 0.75rem; }
/* 4. The Bulleted Metrics */
#feed-container blockquote ul { padding-left: 1.5rem; margin-bottom: 1rem; }
#feed-container blockquote li { margin-bottom: 0.25rem; line-height: 1.5; color: #c9d1d9; }
/* 5. The Speaker Notes / Context (Using Markdown Italics) */
#feed-container blockquote em, #feed-container blockquote i { color: #8b949e; font-style: italic; display: block; font-size: 0.95rem; line-height: 1.5; border-top: 1px solid #30363d; padding-top: 0.75rem; margin-top: 0.75rem; }
/* MOBILE BACKDROP OVERLAY */
#mobile-menu-backdrop { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 9998; backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.3s ease; }
#mobile-menu-backdrop.active { display: block; opacity: 1; }
/* FLUID SINGLE-COLUMN LAYOUT */
.dashboard-container { width: 96%; max-width: 1200px; display: flex; flex-direction: column; gap: 25px; margin: 10px auto 30px auto; }
main { min-width: 0; width: 100%; }
/* CARD STYLING */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); position: relative; transition: background 0.3s, border 0.3s; word-wrap: break-word; overflow-wrap: break-word; }
h1, h2, h3 { color: var(--text); margin-bottom: 10px; }
h3 { font-size: 1.1em; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 15px; }
/* FIXED BLUE SUBTITLES FOR MOBILE (Word Wrap enforced) */
h4, .feed-item h4, .markdown-content h4 { color: var(--accent); margin-top: 20px; margin-bottom: 15px; font-weight: 600; text-transform: uppercase; font-size: 0.85em; letter-spacing: 0.5px; white-space: normal !important; word-wrap: break-word !important; overflow-wrap: break-word !important; line-height: 1.5 !important; }
/* TABS */
.tab-content { display: none; }
.tab-content.active { display: block !important; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
/* FORM ELEMENTS */
label { font-size: 0.8em; color: var(--text); opacity: 0.9; display: block; margin-bottom: 5px; font-weight: 600; }
textarea, select, input[type="text"], input[type="password"], input[type="email"], input[type="file"], input[type="number"] { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 12px; border-radius: 4px; margin-bottom: 12px; font-family: 'JetBrains Mono', monospace; font-size: 16px; appearance: none; }
/* BUTTONS */
.btn { cursor: pointer; border: none; border-radius: 4px; padding: 12px 16px; font-weight: 600; width: 100%; transition: 0.2s; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.85em; display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-success { background: var(--success); color: #ffffff; }
.btn-success:hover { opacity: 0.9; }
.btn-purple { background: var(--accent); color: #ffffff; }
.btn-purple:hover { opacity: 0.9; }
.btn-broadcast { background: var(--broadcast-bg); color: var(--broadcast-text); }
.btn-broadcast:hover { opacity: 0.9; }
/* OMNICHANNEL METRIC CARDS */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.metric-card { background: var(--hover-bg); border: 1px solid var(--border); padding: 15px; border-radius: 6px; text-align: center; }
.metric-value { font-size: 1.8em; font-weight: bold; font-family: 'JetBrains Mono', monospace; margin-top: 5px; }
.omni-badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 0.7em; font-weight: bold; text-transform: uppercase; margin-bottom: 5px; cursor: help;}
       /* VAULT STYLES */
.vault-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.vault-locked { text-align: center; padding: 50px 20px; background: rgba(187, 134, 252, 0.05); border: 1px dashed var(--purple); border-radius: 8px; }
/* TOGGLE SWITCH */
.switch { position: relative; display: inline-block; width: 46px; height: 24px; flex-shrink: 0;}
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border); transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(22px); }
/* STATUS INDICATORS */
.status-active { color: var(--success); font-weight: bold; font-size: 0.8em; text-transform: uppercase; }
.status-offline { color: #7f8c8d; font-weight: bold; font-size: 0.8em; text-transform: uppercase; }
      /* 🌍 NEXUS MAP - MOBILE FIX */
#nexus-map {
    width: 100%;
    height: 500px; 
    min-height: 400px; 
    border-radius: 8px;
    position: relative; /* 🚀 NEW */
    z-index: 100; /* 🚀 NEW: Forces it above the feed */
}
@media (max-width: 768px) {
    #nexus-map {
        height: 350px; 
        min-height: 350px;
    }
}
/* FEED ITEMS */
.feed-item { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 20px; border-left: 4px solid var(--accent); margin-bottom: 20px; }
.feed-meta { font-size: 0.75em; color: var(--text); opacity: 0.7; margin-bottom: 15px; display: flex; justify-content: space-between; border-bottom:1px solid var(--border); padding-bottom:8px; flex-wrap: wrap; gap: 5px;}
.timer-display { font-family: 'JetBrains Mono', monospace; color: var(--warning); font-size: 0.9em; background: rgba(241, 196, 15, 0.1); padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(241, 196, 15, 0.2); }
.pagination-controls { display: flex; justify-content: center; gap: 15px; margin-top: 20px; flex-wrap: wrap; }
.voice-btn { background: transparent; border: 1px solid var(--border); border-radius: 5px; color: var(--text); cursor: pointer; font-size: 1.1em; padding: 8px 12px; transition: 0.2s; display: flex; align-items: center; justify-content: center;}
.voice-btn.recording { color: var(--danger); border-color: var(--danger); animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); } }
.template-block { background: color-mix(in srgb, var(--accent) 5%, transparent); border-left: 3px solid var(--accent); padding: 10px; margin-bottom: 15px; border-radius: 0 4px 4px 0; }
/* TABLES */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; padding-bottom: 15px; }
.table-container::-webkit-scrollbar { height: 12px; }
.table-container::-webkit-scrollbar-track { background: var(--bg); border-radius: 6px; border: 1px solid var(--border); }
.table-container::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }
.table-container::-webkit-scrollbar-thumb:hover { background: var(--success); }
.styled-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.85em; background-color: var(--card-bg); border-radius: 6px; }
.styled-table th, .styled-table td { padding: 12px 15px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.styled-table th { background-color: var(--hover-bg); color: var(--accent); font-weight: 600; cursor: pointer; transition: 0.2s; }
.styled-table th:hover { background-color: var(--border); color: var(--text); }
.styled-table tr:hover { background-color: var(--hover-bg); }
.styled-table td a, .truncate-link { display: inline-block; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; color: var(--accent); text-decoration: none; }
.styled-table td a:hover { text-decoration: underline; }
@media (min-width: 768px) { .styled-table td a, .truncate-link { max-width: 250px; } }
/* MARKDOWN CONTENT */
.markdown-content { font-family: 'Inter', sans-serif; line-height: 1.6; color: var(--text); font-size: 0.95em; }
.markdown-content a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--accent); }
/* THEME TOGGLE */
/* MODALS */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); backdrop-filter: blur(3px); overflow-y: auto; padding: 20px 10px; }
.modal-content { background-color: var(--card-bg); margin: auto; padding: 25px; border: 1px solid var(--accent); width: 100%; max-width: 650px; border-radius: 8px; position: relative; }
.close-btn { position: absolute; top: 15px; right: 20px; color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; }
/* ========================================= */
/* 📱 MOBILE NAVIGATION & RESPONSIVE FIXES   */
/* ========================================= */
/* Hidden by default on Desktops */
.mobile-menu-toggle { display: none; }
/* Tablets and Phones (1024px and below) */
@media (max-width: 1024px) {
    .mobile-menu-toggle { display: flex; align-items: center; gap: 10px; background: var(--card-bg); color: var(--accent); border: 1px solid var(--border); padding: 12px 20px; border-radius: 8px; font-weight: bold; font-size: 1.1em; cursor: pointer; margin: 10px auto 20px auto; width: 100%; justify-content: center; z-index: 1000; position: relative; box-sizing: border-box; }
    .dashboard-container { display: flex; flex-direction: column; width: 100%; margin: 15px 0; }
    header h1 { font-size: 1.5rem; }
    .card { padding: 15px; }
    .btn-group-mobile { display: flex; flex-direction: column; gap: 10px; width: 100%; }
    .btn-group-mobile .btn { width: 100% !important; margin: 0 !important; }
}
/* 📱 VERTICAL PHONE SPECIFIC FIXES */
@media (max-width: 480px) { 
    .feed-item { padding: 15px; } 
    .vault-grid { grid-template-columns: 1fr; } 
    .modal-content { padding: 20px 15px; } 
    #simulation-feed div[style*="display: flex"], #simulation-feed div[style*="display:flex"] { flex-wrap: wrap !important; }
    #simulation-feed h3, #simulation-feed h4 { flex: 1 1 100% !important; width: 100% !important; min-width: 100% !important; margin-bottom: 10px !important; line-height: 1.4 !important; }
}
/* ========================================= */
/* 🌐 GOOGLE TRANSLATE NUCLEAR OVERRIDES     */
/* ========================================= */
.goog-te-gadget { font-size: 0px !important; color: transparent !important; display: flex !important; align-items: center !important; }
.goog-logo-link { display: none !important; }
.goog-te-gadget .goog-te-combo { margin: 0 !important; }
select.goog-te-combo { background-color: var(--card-bg) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 6px !important; padding: 8px 12px !important; font-family: 'Inter', sans-serif !important; font-size: 14px !important; outline: none !important; cursor: pointer !important; transition: all 0.3s ease !important; display: inline-block !important; height: auto !important; }
.goog-te-banner-frame.skiptranslate, iframe.goog-te-banner-frame { display: none !important; }
body { top: 0px !important; position: relative !important; }
iframe.goog-te-banner-frame, .goog-te-banner-frame, .skiptranslate > iframe { display: none !important; visibility: hidden !important; height: 0px !important; width: 0px !important; opacity: 0 !important; pointer-events: none !important; }
html, body { top: 0px !important; position: static !important; margin-top: 0px !important; padding-top: 0px !important; }
#goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* NEXUS WORKSPACE — shared surfaces, controls, and responsive application shell. */
/* Light, warm-neutral base with a confident indigo primary and a lime "pop" accent for high-signal moments. */
:root {
    color-scheme: light;
    --bg: #f8f7fb;
    --card-bg: #ffffff;
    --surface-raised: #f4f2fa;
    --sidebar-bg: #14121f;
    --sidebar-text: #f1effa;
    --sidebar-text-muted: #9b96b0;
    --sidebar-hover: #1e1b2c;
    --sidebar-border: #262233;
    --input-bg: #ffffff;
    --border: #e7e4f0;
    --text: #14121f;
    --text-muted: #6b7280;
    --text-faint: #9a9fac;
    --accent: #6c5ce7;
    --accent-strong: #5842d6;
    --accent-soft: rgba(108, 92, 231, .10);
    --accent-shade-2: rgba(108, 92, 231, .7);
    --accent-shade-3: rgba(108, 92, 231, .45);
    --accent-shade-4: rgba(108, 92, 231, .25);
    --pop: #d6ff4f;
    --pop-ink: #14121f;
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, .12);
    --success-ink: #15803d;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, .12);
    --danger-ink: #b91c1c;
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, .14);
    --warning-ink: #9a5b09;
    --neutral-badge: #64748b;
    --neutral-badge-soft: rgba(100, 116, 139, .12);
    --neutral-ink: #475569;
    --accent-ink: #4c3fb0;
    --hover-bg: #f1effa;
    --grid-line: rgba(20, 18, 31, 0);
    --panel-shadow: 0 1px 2px rgba(20, 18, 31, .04), 0 10px 28px rgba(20, 18, 31, .06);
    --sidebar-width: 244px;
    --page-gutter: clamp(22px, 3vw, 48px);
    --radius: 20px;
    --radius-pill: 999px;
    --broadcast-bg: #6c5ce7;
    --broadcast-text: #ffffff;
    --font-display: 'Sora', 'Inter', sans-serif;
}

:root[data-theme="light"] {
    /* "Light" is now the default look above; this block exists only so any lingering [data-theme="light"] selectors keep resolving to the same tokens. */
    color-scheme: light;
    --bg: #f8f7fb;
    --card-bg: #ffffff;
    --surface-raised: #f4f2fa;
    --sidebar-bg: #14121f;
    --sidebar-text: #f1effa;
    --sidebar-text-muted: #9b96b0;
    --sidebar-hover: #1e1b2c;
    --sidebar-border: #262233;
    --input-bg: #ffffff;
    --border: #e7e4f0;
    --text: #14121f;
    --text-muted: #6b7280;
    --text-faint: #9a9fac;
    --accent: #6c5ce7;
    --accent-strong: #5842d6;
    --accent-soft: rgba(108, 92, 231, .10);
    --accent-shade-2: rgba(108, 92, 231, .7);
    --accent-shade-3: rgba(108, 92, 231, .45);
    --accent-shade-4: rgba(108, 92, 231, .25);
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, .12);
    --success-ink: #15803d;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, .12);
    --danger-ink: #b91c1c;
    --warning: #f59e0b;
    --warning-ink: #9a5b09;
    --neutral-ink: #475569;
    --accent-ink: #4c3fb0;
    --hover-bg: #f1effa;
    --grid-line: rgba(40, 77, 115, .04);
    --panel-shadow: 0 8px 28px rgba(40, 65, 100, .04);
    --broadcast-bg: #087d94;
    --broadcast-text: #ffffff;
}

/* Dark mode: same indigo + lime identity, warm-dark surfaces instead of cold navy. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #17151f;
    --card-bg: #1e1b29;
    --surface-raised: #262233;
    --sidebar-bg: #0e0c15;
    --sidebar-text: #f1effa;
    --sidebar-text-muted: #9b96b0;
    --sidebar-hover: #1a1724;
    --sidebar-border: #262233;
    --input-bg: #211e2c;
    --border: #322d40;
    --text: #f3f1f8;
    --text-muted: #a89fc2;
    --text-faint: #7d7593;
    --accent: #8b7cf6;
    --accent-strong: #a394ff;
    --accent-soft: rgba(139, 124, 246, .14);
    --accent-shade-2: rgba(139, 124, 246, .7);
    --accent-shade-3: rgba(139, 124, 246, .45);
    --accent-shade-4: rgba(139, 124, 246, .25);
    --pop: #d6ff4f;
    --pop-ink: #14121f;
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, .14);
    --success-ink: #34d399;
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .14);
    --danger-ink: #f87171;
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .16);
    --warning-ink: #fbbf24;
    --neutral-badge: #94a3b8;
    --neutral-badge-soft: rgba(148, 163, 184, .16);
    --neutral-ink: #94a3b8;
    --accent-ink: #a394ff;
    --hover-bg: #262233;
    --grid-line: rgba(0, 0, 0, 0);
    --panel-shadow: 0 10px 32px rgba(0, 0, 0, .32);
    --broadcast-bg: #8b7cf6;
    --broadcast-text: #14121f;
}

body {
    font-size: 14px;
    line-height: 1.55;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.25; }
h3 { border: 0; font-size: 17px; padding-bottom: 0; margin-bottom: 18px; }
h4 { font-size: 12px; }
p { line-height: 1.65; }
::selection { background: var(--accent); color: var(--bg); }

#main-dashboard-content { min-height: 100vh; padding-left: var(--sidebar-width); }
.workspace-topbar {
    height: 72px;
    padding: 0 var(--page-gutter);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.topbar-location { display: flex; align-items: center; gap: 16px; min-width: 0; font-size: 12px; color: var(--text-muted); }
.topbar-brand { font: 600 11px 'JetBrains Mono', monospace; letter-spacing: .14em; color: var(--text); }
.breadcrumb-separator { color: var(--text-faint); }
.mission-control-link { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px; text-decoration: none; white-space: nowrap; }
.mission-control-link:hover { color: var(--accent); }
.topbar-search { flex: 1 1 auto; max-width: 420px; display: flex; align-items: center; gap: 10px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 9px 16px; margin: 0 24px; color: var(--text-faint); }
.topbar-search i { font-size: 12px; }
.topbar-search input { flex: 1; border: 0 !important; background: transparent !important; padding: 0 !important; min-height: auto !important; font-size: 13px !important; }
.topbar-search kbd { font: 500 10px 'JetBrains Mono', monospace; color: var(--text-faint); background: var(--card-bg); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.topbar-bell { position: relative; }
.topbar-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #ffffff; display: grid; place-items: center; font: 700 13px var(--font-display); flex-shrink: 0; cursor: default; }
@media (max-width: 1024px) {
    .topbar-search { display: none; }
}
.workspace-intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 38px var(--page-gutter) 28px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--text-faint); font: 500 10px/1.5 'JetBrains Mono', monospace; letter-spacing: .13em; margin: 0 0 12px; }
.workspace-intro .eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.workspace-intro h1 { font-family: var(--font-display); font-size: clamp(30px, 3vw, 44px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; }
.title-dot { color: var(--accent); }
#workspace-description { color: var(--text-muted); font-size: 13px; max-width: 640px; margin: 0; }
.new-task-button { flex: 0 0 auto; width: auto; min-width: 126px; }
.dashboard-container { width: auto; max-width: 1800px; margin: 0 var(--page-gutter) 48px; gap: 24px; }
.skip-link { position: fixed; top: 10px; left: calc(var(--sidebar-width) + 16px); z-index: 10001; padding: 10px 16px; background: var(--accent); color: var(--bg); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

/* All destinations stay visible; the sidebar itself scrolls on short screens. */
#nexus-nav-menu.workspace-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: var(--sidebar-width) !important;
    height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0;
    padding: 24px 14px 16px !important;
    margin: 0;
    background: var(--sidebar-bg) !important;
    border: 0;
    border-right: 1px solid var(--sidebar-border);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-border) transparent;
    box-shadow: none;
    z-index: 1200 !important;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 24px; }
.brand-mark { width: 37px; height: 40px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 10px 3px 10px 3px; font-size: 22px; }
.brand-name { font-family: var(--font-display); font-size: 16px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--sidebar-text); }
.brand-name > span { color: var(--accent); }
.brand-name small { display: block; margin-top: 7px; font: 400 7px 'JetBrains Mono', monospace; letter-spacing: .14em; color: var(--sidebar-text-muted); }
.workspace-label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--sidebar-border); border-radius: 9px; padding: 10px; margin-bottom: 24px; background: var(--sidebar-hover); font-size: 11px; font-weight: 600; color: var(--sidebar-text); }
.workspace-label small { display: block; color: var(--sidebar-text-muted); font-size: 10px; font-weight: 400; margin-top: 1px; }
.workspace-label > i { display: none; }
.workspace-glyph { display: grid; place-items: center; width: 28px; height: 30px; border-radius: 6px; background: rgba(214, 255, 79, .16); color: var(--pop); font: 600 14px 'JetBrains Mono', monospace; }
.nav-group { flex-shrink: 0; margin-bottom: 20px; }
.nav-group-label { padding: 0 12px; margin-bottom: 8px; font: 500 9px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--sidebar-text-muted); }
#nexus-nav-menu .tab-btn {
    width: 100% !important;
    min-height: 37px;
    padding: 8px 12px !important;
    margin: 2px 0 !important;
    border: 1px solid transparent;
    border-radius: var(--radius-pill) !important;
    background: transparent;
    color: var(--sidebar-text-muted) !important;
    font: 500 13px 'Inter', sans-serif !important;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 12px;
    text-align: left;
    white-space: normal !important;
    transition: color .15s, background .15s, border-color .15s;
}
#nexus-nav-menu .tab-btn i { width: 16px; text-align: center; font-size: 13px; opacity: .8; }
#nexus-nav-menu .tab-btn:hover { background: var(--sidebar-hover); color: var(--sidebar-text) !important; }
#nexus-nav-menu .tab-btn.active { background: var(--accent); border-color: transparent; color: #ffffff !important; }
#nexus-nav-menu .tab-btn.active i { color: #ffffff; opacity: 1; }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--sidebar-border); display: grid; gap: 8px; }
#nexus-nav-menu .language-select, #nexus-nav-menu .theme-toggle-btn { width: 100% !important; min-height: 36px; margin: 0 !important; padding: 8px 12px !important; background: transparent !important; border: 1px solid var(--sidebar-border); border-radius: var(--radius-pill) !important; color: var(--sidebar-text-muted) !important; font-size: 11px !important; justify-content: flex-start !important; text-align: left; }
#nexus-nav-menu .theme-toggle-btn:hover { color: var(--sidebar-text) !important; border-color: var(--accent); }
#nexus-nav-menu .theme-toggle-btn { display: flex; gap: 10px; cursor: pointer; }
.sidebar-signout { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 36px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-pill); color: var(--sidebar-text-muted); font: 400 11px 'Inter', sans-serif; cursor: pointer; }
.sidebar-signout:hover { color: var(--danger); background: var(--sidebar-hover); }
.sidebar-close { display: none !important; }

/* Calm component geometry against a more expressive shell. */
.card { padding: 24px; border-radius: var(--radius); margin-bottom: 22px; box-shadow: var(--panel-shadow); min-width: 0; }
.card > h3:first-child { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.btn { min-height: 43px; border-radius: var(--radius-pill) !important; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 11px 20px; line-height: 1.45; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { opacity: 1; background: var(--accent-strong); }
.btn-outline { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--accent-soft); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.text-button { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: var(--text-muted); font-size: 11px; cursor: pointer; }
.text-button:hover { color: var(--accent); }
label { font-size: 12px; font-weight: 500; color: var(--text-muted); opacity: 1; margin-bottom: 7px; }
/* Existing integrations write inline field colors. These shared tokens keep both themes readable. */
textarea, select, input[type="text"], input[type="password"], input[type="email"], input[type="file"], input[type="number"] {
    background-color: var(--input-bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    min-height: 43px;
    padding: 11px 12px;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px;
    line-height: 1.5;
    max-width: 100%;
}
select { appearance: auto; padding-right: 10px; cursor: pointer; }
textarea { resize: vertical; }
textarea::placeholder, input::placeholder { color: var(--text-faint); opacity: 1; }
textarea:focus, select:focus, input:focus { border-color: var(--accent) !important; outline: 2px solid var(--accent-soft); outline-offset: 1px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
input[type="file"]::file-selector-button { border: 0; background: var(--hover-bg); color: var(--text); padding: 6px 10px; border-radius: 4px; margin-right: 10px; cursor: pointer; }
.switch:has(input:focus-visible) .slider { outline: 2px solid var(--accent); outline-offset: 3px; }
.status-active, .status-offline { font: 500 9px 'JetBrains Mono', monospace; letter-spacing: .1em; }
.status-offline { color: var(--text-faint); }
.voice-btn { border-radius: 8px; color: var(--text-muted); min-height: 43px; }
.voice-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Live data remains the source for the activity panel; no sample metrics. */
.workspace-activity.card { margin: 0 var(--page-gutter) 24px; padding: 18px 22px; background: var(--card-bg); }
.activity-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.activity-heading h2 { font-size: 13px; margin: 0 0 2px; letter-spacing: -.01em; }
.activity-heading p { font-size: 10px; color: var(--text-faint); margin: 0; }
.activity-heading .text-button { margin-left: auto; }
.section-symbol { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent); background: var(--accent-soft); color: var(--accent); border-radius: 9px; font-size: 14px; }
#live-task-queue { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; min-width: 0; }
.queue-empty { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border: 1px dashed var(--border); border-radius: 9px; background: var(--input-bg); }
.queue-empty strong { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.queue-empty span:not(.queue-orbit) { display: block; margin-top: 2px; font-size: 11px; color: var(--text-faint); }
.queue-orbit { display: block; width: 22px; height: 22px; border: 1px solid var(--text-faint); border-radius: 50%; position: relative; flex-shrink: 0; opacity: .65; }
.queue-orbit::after { content: ''; position: absolute; inset: 6px; border: 1px solid var(--text-faint); border-radius: 50%; }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--input-bg); }
.task-row-copy { min-width: 0; }
.task-row-copy strong { display: block; font-size: 10px; color: var(--text); font-weight: 500; text-transform: capitalize; }
.task-row-copy p { color: var(--text-muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 4px 0 0; }
.task-status { flex-shrink: 0; display: flex; align-items: center; gap: 5px; font: 500 8px 'JetBrains Mono', monospace; padding: 5px 7px; border-radius: 5px; border: 1px solid currentColor; color: var(--warning); }
.task-status::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.task-status[data-status="completed"] { color: var(--success); }
.task-status[data-status="processing"] { color: var(--purple); }
.task-status[data-status="failed"], .task-status[data-status="error"] { color: var(--danger); }

.control-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.control-primary, .control-secondary { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.control-grid .card { margin: 0; }
.voice-panel { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 18px; padding: 18px 22px; border-radius: 11px; background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%), var(--card-bg); }
.voice-panel > div:first-child { flex: 1 1 200px; }
.voice-panel h3 { font-size: 13px; padding: 0; margin: 0 0 4px; }
.voice-panel h3 i { color: var(--purple); margin-right: 5px; }
.voice-panel p { font-size: 10px; color: var(--text-muted); margin: 0; }
.voice-panel select { min-height: 36px; margin: 0; font-size: 11px; padding: 8px 10px; width: auto; }
.voice-panel #primary-voice-engine { max-width: 200px; }
.voice-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.voice-panel .btn { width: auto; min-height: 36px; padding: 8px 14px; font-size: 11px; }
.task-composer { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--accent) 25%, transparent); background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 65%), var(--card-bg); }
.task-composer::before { content: ''; position: absolute; top: 0; left: 24px; width: 56px; height: 2px; background: var(--accent); }
.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-heading .eyebrow { color: var(--accent); font-size: 8px; margin: 0 0 5px; }
.panel-heading h2 { font-size: 22px; margin: 0; }
.panel-index { align-self: flex-start; margin-left: auto; color: var(--text-faint); font: 400 10px 'JetBrains Mono', monospace; }
.panel-description { font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }
.task-composer textarea { line-height: 1.8; min-height: 140px; }
.task-composer > label { margin-top: 8px; }
.task-composer .launch-task-button { justify-content: space-between; padding-left: 18px; padding-right: 18px; }
.composer-options { margin: 0 0 20px; border-bottom: 1px solid var(--border); }
.composer-options summary { min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 0 10px; color: var(--text-muted); font-size: 10px; cursor: pointer; list-style: none; }
.composer-options .disclosure-body { padding: 8px 0 0; }
.disclosure-chevron { margin-left: auto; font-size: 9px; color: var(--text-faint); transition: transform .2s; }
details[open] > summary .disclosure-chevron { transform: rotate(180deg); }
summary::-webkit-details-marker { display: none; }
.column-heading { display: flex; justify-content: space-between; gap: 12px; color: var(--text-faint); font: 400 8px 'JetBrains Mono', monospace; letter-spacing: .1em; padding: 2px 2px 0; }
.settings-panel.card { padding: 0; border-radius: 11px; }
.settings-panel > summary { display: flex; align-items: center; gap: 13px; min-height: 85px; padding: 18px; list-style: none; cursor: pointer; border-radius: 11px; }
.settings-panel > summary:hover { background: var(--accent-soft); }
.disclosure-title { min-width: 0; }
.disclosure-title strong { display: block; color: var(--text); font-weight: 500; font-size: 13px; }
.agent-state { display: inline-block; margin-left: 8px; vertical-align: 1px; font: 400 8px 'JetBrains Mono', monospace; color: var(--text-faint); }
.agent-state.is-active { color: var(--success); }
.disclosure-title small { display: block; color: var(--text-faint); font-size: 11px; line-height: 1.5; margin-top: 4px; }
.settings-panel .section-symbol { width: 33px; height: 33px; color: var(--text-muted); border-color: var(--border); background: var(--surface-raised); font-size: 12px; }
#autopilot-panel .section-symbol { color: var(--purple); }
.settings-panel[open] { border-color: var(--text-faint); }
.settings-panel[open] > summary { border-bottom: 1px solid var(--border); border-radius: 11px 11px 0 0; }
.settings-panel > .disclosure-body { padding: 20px; }
.settings-panel .disclosure-body > div:empty { display: none; }
.settings-panel input[type="file"] { min-width: 0 !important; }
.workspace-tip { display: flex; gap: 12px; color: var(--text-faint); padding: 7px 4px; }
.workspace-tip i { margin-top: 3px; color: var(--accent); font-size: 12px; }
.workspace-tip p { margin: 0; font-size: 11px; line-height: 1.8; }
.workspace-tip strong { color: var(--text-muted); font-weight: 500; }
.template-block { border-radius: 8px; padding: 12px; background: var(--accent-soft); }

/* The rest of the workspace uses the same surface and type scale. */
.metric-card { border-radius: 10px; padding: 20px; background: var(--surface-raised); text-align: left; }
.metric-value { font-size: 26px; letter-spacing: -.04em; }
.styled-table { font-size: 12px; }
.styled-table th { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; background: var(--input-bg); }
.styled-table th, .styled-table td { padding: 15px; }
.table-container { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.table-container::-webkit-scrollbar { height: 5px; }
.table-container::-webkit-scrollbar-thumb { background: var(--border); }
.feed-item { background: var(--card-bg); border-radius: 12px; border-left-width: 2px; }
#feed-container blockquote { background: var(--surface-raised); border-color: var(--border); }
#feed-container blockquote li { color: var(--text); }
#feed-container blockquote em, #feed-container blockquote i { color: var(--text-muted); }
.vault-locked { border-color: var(--border); background: var(--surface-raised); border-radius: 12px; }
.modal-content { border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 90px rgba(0, 0, 0, .3); }
#trial-banner { width: 100%; padding: 8px 16px 8px calc(var(--sidebar-width) + 16px) !important; background: var(--accent-soft) !important; color: var(--text) !important; border-bottom: 1px solid var(--border); font-size: 11px !important; font-weight: 400 !important; }
#trial-banner a { color: var(--accent) !important; }

/* Sign-in shares the workspace palette without changing authentication. */
.workspace-login { background-color: var(--bg) !important; background-image: radial-gradient(ellipse at 10% 10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%) !important; background-size: auto; padding: 32px 16px; }
.workspace-login > div[style*="position: fixed"] { display: none; }
.workspace-login > div[style*="position: relative"] { background: var(--card-bg) !important; border-color: var(--border) !important; width: 100%; max-width: 430px !important; padding: 36px !important; box-shadow: var(--panel-shadow) !important; }
.workspace-login h1 { color: var(--text) !important; font-size: 27px !important; margin: 12px 0 6px !important; }
.workspace-login img { width: 60px !important; border-radius: 12px !important; box-shadow: none !important; }
.workspace-login .btn-outline { background: var(--input-bg) !important; border-color: var(--border) !important; color: var(--text) !important; }
.workspace-login #btn-login { background: var(--accent); color: var(--bg); }
.workspace-login span[style*="position: absolute"] { background: var(--card-bg) !important; color: var(--text-muted) !important; white-space: nowrap; font-size: 9px !important; }

.error-banner { display: flex; align-items: center; gap: 10px; background: var(--danger-soft); color: var(--danger-ink); border: 1px solid var(--danger); border-radius: 12px; padding: 12px 18px; font-size: 13px; margin-bottom: 20px; }

/* ---- Overview hero + pipeline pulse (Control Center) ---- */
.hero-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 24px; }
.hero-card { border-radius: var(--radius); padding: 28px 32px; position: relative; overflow: hidden; }
.hero-card-dark { background: linear-gradient(135deg, #2b1f66 0%, #171233 100%); color: #ffffff; }
.hero-glow { position: absolute; width: 300px; height: 300px; right: -80px; top: -100px; border-radius: 50%; background: radial-gradient(circle, rgba(214, 255, 79, .28), transparent 70%); filter: blur(30px); pointer-events: none; }
.hero-eyebrow { position: relative; z-index: 1; font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .14em; opacity: .7; margin: 0 0 14px; }
.hero-eyebrow-dark { color: var(--pop-ink); opacity: .65; }
.hero-card h2 { position: relative; z-index: 1; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; line-height: 1.25; }
.hero-sub { position: relative; z-index: 1; opacity: .75; font-size: 13px; line-height: 1.6; margin: 0 0 20px; max-width: 420px; }
.hero-sub-dark { color: var(--pop-ink); }
.hero-stats { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; font-size: 12px; opacity: .9; }
.hero-stats i { margin-right: 6px; opacity: .8; }
.hero-btn-light, .hero-btn-dark { width: auto; position: relative; z-index: 1; }
.hero-btn-light { background: #ffffff; color: #171233; }
.hero-btn-light:hover { background: #f1effa; }
.hero-btn-dark { background: var(--pop-ink); color: var(--pop); }
.hero-btn-dark:hover { opacity: .85; }
.hero-card-pop { background: var(--pop); color: var(--pop-ink); }
.hero-card-pop h2 { color: var(--pop-ink); }
.pulse-card { margin-bottom: 24px; }
.pulse-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; gap: 10px; }
.pulse-head h3 { margin: 0; font-size: 15px; }
.pulse-head span { font-size: 11px; color: var(--text-faint); }
.pulse-row { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.pulse-node { display: flex; align-items: center; gap: 12px; flex: 1 1 160px; min-width: 0; }
.pulse-node strong { display: block; font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 600; color: var(--text); }
.pulse-node span { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pulse-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 15px; color: #ffffff; }
.pulse-icon-1 { background: #6c5ce7; }
.pulse-icon-2 { background: #8b7cf6; }
.pulse-icon-3 { background: #a78bfa; }
.pulse-icon-4 { background: var(--danger); }
.pulse-connector { flex: 0 1 40px; min-width: 16px; height: 2px; background: var(--border); margin: 0 8px; }
@media (max-width: 900px) {
    .hero-row { grid-template-columns: 1fr; }
    .pulse-connector { display: none; }
}

/* ---- Needs your attention / Recent opportunities ---- */
.attention-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.attention-card { margin-bottom: 0; }
.attention-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.attention-head h3 { margin: 0; font-size: 15px; }
.attention-list { display: flex; flex-direction: column; gap: 4px; }
.attention-empty { color: var(--text-faint); font-size: 12.5px; padding: 12px 0; margin: 0; }
.attention-row-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; }
.attention-row-item:hover { background: var(--hover-bg); }
.attention-row-item .attention-text { flex: 1; min-width: 0; }
.attention-row-item .attention-text strong { display: block; font-size: 13px; color: var(--text); }
.attention-row-item .attention-text span { display: block; font-size: 11.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-row-item .attention-time { font-size: 11px; color: var(--text-faint); flex-shrink: 0; margin-right: 4px; }
.attention-row-item .btn { width: auto; min-height: 32px; padding: 6px 14px; font-size: 11px; flex-shrink: 0; }
@media (max-width: 900px) {
    .attention-row { grid-template-columns: 1fr; }
}

/* ---- Funnel strip (Leads) ---- */
.funnel-strip { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.funnel-stage { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px 22px; box-shadow: var(--panel-shadow); min-width: 110px; }
.funnel-stage strong { display: block; font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; color: var(--text); }
.funnel-stage span { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.funnel-stage-accent { background: var(--accent-soft); border-color: transparent; }
.funnel-stage-accent strong { color: var(--accent-ink); }
.funnel-stage-success { background: var(--success-soft); border-color: transparent; }
.funnel-stage-success strong { color: var(--success-ink); }
.funnel-stage-neutral { background: var(--neutral-badge-soft); border-color: transparent; }
.funnel-stage-neutral strong { color: var(--neutral-ink); }
.funnel-chevron { color: var(--text-faint); font-size: 12px; }

/* ---- Status/fit pills (Leads table, and reusable anywhere) ---- */
.pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill-success { background: var(--success-soft); color: var(--success-ink); }
.pill-warning { background: var(--warning-soft); color: var(--warning-ink); }
.pill-danger { background: var(--danger-soft); color: var(--danger-ink); }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-neutral { background: var(--neutral-badge-soft); color: var(--neutral-ink); }
.fit-score-num { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px; color: var(--text); margin-left: 4px; }

/* ---- Company cell (Leads table row) ---- */
.company-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.company-avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: #ffffff; font-weight: 700; font-size: 13px; font-family: var(--font-display); }
.company-cell-text { min-width: 0; }
.company-cell-text strong { display: block; font-size: 13px; color: var(--text); }
.company-cell-text span { display: block; font-size: 11.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

/* ---- Lead detail panel (Leads tab) ---- */
.leads-layout { display: flex; align-items: flex-start; gap: 20px; }
#leads-table-card { flex: 1; min-width: 0; }
#leads-table tbody tr { cursor: pointer; }
#leads-table tbody tr:hover { background: var(--hover-bg); }
.lead-detail-panel { width: 380px; flex-shrink: 0; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 22px !important; }
.detail-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.detail-header .company-avatar { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }
.detail-header-text { flex: 1; min-width: 0; }
.detail-header-text h3 { margin: 0 0 2px; font-size: 16px; font-family: var(--font-display); }
.detail-header-text p { margin: 0; font-size: 12px; color: var(--text-muted); }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; font-size: 12px; }
.detail-meta div span { display: block; color: var(--text-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.detail-meta div strong { display: block; color: var(--text); font-weight: 600; font-size: 12.5px; }
.detail-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.detail-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 8px 4px; margin-right: 16px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.detail-tab.active { color: var(--accent-ink); border-bottom-color: var(--accent); }
.detail-tab-panel h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin: 0 0 8px; }
.detail-tab-panel p { font-size: 13px; color: var(--text); line-height: 1.6; margin: 0 0 16px; }
.detail-activity-item { padding: 10px 12px; border-radius: 10px; background: var(--surface-raised); margin-bottom: 8px; font-size: 12.5px; }
.detail-activity-item .detail-activity-meta { display: flex; justify-content: space-between; color: var(--text-faint); font-size: 10.5px; margin-bottom: 4px; }
.detail-notes-textarea { width: 100%; min-height: 90px; margin-bottom: 10px; }
.detail-footer { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.detail-footer .btn { width: 100%; }
@media (max-width: 1200px) {
    .lead-detail-panel { position: fixed; inset: 0; width: 100%; max-height: 100%; z-index: 1300; border-radius: 0; margin: 0; }
}

/* ---- Pill-shaped filter controls ---- */
#leads-search-input, #leads-source-filter, #leads-status-filter, #leads-limit-select {
    border-radius: var(--radius-pill) !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}

/* ---- Chart-driven stat components (Analytics / Omnichannel) ---- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.kpi-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; text-align: left; }
.kpi-card .kpi-label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.kpi-card .kpi-value { font: 600 22px 'JetBrains Mono', monospace; letter-spacing: -.02em; color: var(--text); }
.chart-panel { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.chart-panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.chart-panel-head h4 { margin: 0 !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 12.5px !important; color: var(--text) !important; }
.chart-panel-head span { font-size: 10.5px; color: var(--text-faint); }

/* Horizontal bar chart (single hue = magnitude) */
.hbar-chart { display: grid; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: 108px 1fr 52px; align-items: center; gap: 10px; }
.hbar-row .hbar-name { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 8px; border-radius: 4px; background: var(--input-bg); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s ease; }
.hbar-row .hbar-value { font: 600 11.5px 'JetBrains Mono', monospace; text-align: right; color: var(--text); }

/* Two-series comparison bars (categorical, <=3 series) */
.cbar-chart { display: grid; gap: 12px; }
.cbar-row { display: grid; grid-template-columns: 90px 1fr 48px; align-items: center; gap: 10px; }
.cbar-row .cbar-name { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-muted); }
.cbar-row .cbar-name .sw { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.cbar-track { height: 8px; border-radius: 4px; background: var(--input-bg); overflow: hidden; }
.cbar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.cbar-row .cbar-value { font: 600 11.5px 'JetBrains Mono', monospace; text-align: right; color: var(--text); }

/* Stacked funnel bar (part-to-whole) */
.stacked-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--input-bg); margin-bottom: 12px; }
.stacked-bar span { height: 100%; transition: width .4s ease; }
.stacked-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.stacked-legend .item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-muted); }
.stacked-legend .sw { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.stacked-legend strong { color: var(--text); font: 600 11px 'JetBrains Mono', monospace; }

@media (min-width: 1900px) {
    .dashboard-container, .workspace-intro, .workspace-activity.card { max-width: 1660px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 1200px) and (min-width: 1025px) {
    :root { --sidebar-width: 218px; --page-gutter: 24px; }
    .control-grid { grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr); gap: 18px; }
    .voice-panel { gap: 12px; }
    .voice-panel > div:first-child { flex-basis: 100%; }
}
@media (min-width: 1025px) {
    #mobile-menu-backdrop { display: none !important; }
    .workspace-topbar .mobile-menu-toggle { display: none; }
}
@media (max-width: 1024px) {
    :root { --page-gutter: 24px; }
    #main-dashboard-content { padding-left: 0; }
    #nexus-nav-menu.workspace-sidebar { width: 268px !important; left: -280px !important; padding: 24px 14px 16px !important; box-shadow: 10px 0 40px rgba(0, 0, 0, .2); transition: left .2s ease !important; z-index: 9999 !important; }
    #nexus-nav-menu.workspace-sidebar.mobile-open { left: 0 !important; }
    .sidebar-close { display: inline-flex !important; width: 28px; height: 28px; margin-left: auto; }
    .sidebar-brand { gap: 9px; padding-left: 4px; padding-right: 0; }
    .brand-name { font-size: 15px; }
    .workspace-topbar .mobile-menu-toggle { display: inline-flex; width: 36px; padding: 0; margin: 0; min-height: 36px; z-index: auto; }
    .workspace-topbar { height: 64px; }
    .workspace-intro { margin-top: 28px; }
    .skip-link { left: 16px; }
    #trial-banner { padding-left: 16px !important; }
    body.navigation-open { overflow: hidden; }
}
@media (max-width: 760px) {
    :root { --page-gutter: 18px; }
    .workspace-intro { align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
    .workspace-intro h1 { font-size: 32px; }
    .workspace-intro .eyebrow { font-size: 8px; }
    #workspace-description { font-size: 12px; }
    .new-task-button { display: none; }
    .control-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .voice-panel { gap: 14px; padding: 18px; }
    .voice-panel > div:first-child { flex-basis: 100%; }
    .voice-panel #primary-voice-engine { flex: 1 1 100%; max-width: none; width: 100%; }
    .voice-actions { width: 100%; }
    .voice-actions select, .voice-actions .btn { flex: 1; min-width: 0; }
    .workspace-activity.card { padding: 16px; }
    .activity-heading .section-symbol { display: none; }
    .card { padding: 20px; }
    .control-secondary { gap: 12px; }
    .column-heading { padding-top: 8px; padding-bottom: 4px; }
    .mission-control-link { font-size: 11px; }
    .mission-control-link i { display: none; }
    .topbar-location { gap: 10px; font-size: 10px; }
    .topbar-brand { font-size: 10px; }
    .workspace-login > div[style*="position: relative"] { padding: 28px 22px !important; }
    /* 16px fields avoid automatic zoom while preserving user-controlled zoom. */
    textarea, select, input[type="text"], input[type="password"], input[type="email"], input[type="number"] { font-size: 16px !important; }
    .tab-content > .card { max-width: 100%; }
    .tab-content [style*="min-width: 300px"], .tab-content [style*="min-width:300px"] { min-width: 0 !important; }
    #nexus-toast-container { left: 16px !important; right: 16px !important; bottom: 16px !important; }
    #nexus-toast-container > div { min-width: 0 !important; }
}
@media (max-width: 380px) {
    :root { --page-gutter: 12px; }
    .workspace-topbar .topbar-brand, .breadcrumb-separator { display: none; }
    .voice-actions { flex-wrap: wrap; }
    .voice-actions .btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
