/* ══════════════════════════════════════════════════════════════
   ORCHESTRATION CSS — External Stylesheet
   Extracted from ai-orchestration-live.php for modularity
   ══════════════════════════════════════════════════════════════ */

:root {
    /* ── Base dark theme ── */
    --navy: hsl(220, 40%, 5%);
    --navy2: hsl(220, 35%, 7%);
    --navy3: hsl(220, 30%, 10%);

    /* ── Default gold accent (overridden by OrchColorEngine) ── */
    --gold: #f2c14f;
    --gold2: #e8a820;
    --gold-dim: rgba(242,193,79,.08);
    --gold-border: rgba(242,193,79,.35);

    /* ── Dynamic accent (set by orch-colors.js) ── */
    --orch-accent: var(--gold);
    --orch-accent-dim: var(--gold-dim);
    --orch-accent-border: var(--gold-border);
    --orch-accent-light: #f5d680;
    --orch-glow: none;
    --orch-grad-angle: 135deg;
    --orch-status-hue: 220;
    --orch-status-sat: 15%;
    --orch-status-light: 8%;

    /* ── Semantic colors ── */
    --cyan: #00c8ff;
    --cyan-dim: rgba(0,200,255,.08);
    --green: #22c55e;
    --green-dim: rgba(34,197,94,.1);
    --orange: #f97316;
    --orange-dim: rgba(249,115,22,.1);
    --red: #ef4444;
    --red-dim: rgba(239,68,68,.1);
    --purple: #8b5cf6;
    --purple-dim: rgba(139,92,246,.1);

    /* ── Grays ── */
    --gray900: #1a1f2e;
    --gray800: #252b3b;
    --gray700: #2d3548;
    --gray600: #3d4660;
    --gray500: #6b7280;
    --gray400: #9ca3af;
    --gray300: #d1d5db;
    --gray200: #e5e7eb;
    --gray100: #f3f4f6;
    --border: rgba(255,255,255,.07);

    /* ── Fonts ── */
    --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
    --font: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 10px;
    --fs-2xs: 10px;
    --fs-xs: 11px;
    --fs-sm: 12px;
    --fs-md: 13px;
    --fs-lg: 15px;
    --lh-tight: 1.35;
    --lh-normal: 1.55;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;

    /* ── Semantic UI tokens (single source for cascade) ── */
    --app-bg: var(--navy);
    --surface: var(--navy2);
    --surface-elev: var(--navy3);
    --surface-soft: rgba(255,255,255,.04);
    --text: #f8fafc;
    --text-muted: #cbd5e1;
    --text-soft: #94a3b8;
    --input-bg: rgba(255,255,255,.05);
    --input-text: #f8fafc;
    --input-placeholder: #94a3b8;
    --card-bg: var(--surface);
}

:root[data-theme="light"] {
    --navy: #f8fafc;
    --navy2: #ffffff;
    --navy3: #f1f5f9;
    --gray900: #f1f5f9;
    --gray800: #e2e8f0;
    --gray700: #cbd5e1;
    --gray600: #94a3b8;
    --gray500: #64748b;
    --gray400: #475569;
    --gray300: #334155;
    --gray200: #1e293b;
    --gray100: #0f172a;
    --border: rgba(0,0,0,.15);

    --app-bg: #f1f5f9;
    --surface: #ffffff;
    --surface-elev: #f8fafc;
    --surface-soft: rgba(15,23,42,.04);
    --text: #0f172a;
    --text-muted: #334155;
    --text-soft: #475569;
    --input-bg: #ffffff;
    --input-text: #0f172a;
    --input-placeholder: #64748b;
    --card-bg: #ffffff;
}

:root[data-theme="dim"] {
    /* Avond: warm-dark, iets zachter contrast dan nacht */
    --navy: #171b26;
    --navy2: #1c2230;
    --navy3: #262f40;
    --gray900: #0f172a;
    --gray800: #1e293b;
    --gray700: #334155;
    --gray600: #64748b;
    --gray500: #94a3b8;
    --gray400: #cbd5e1;
    --gray300: #e2e8f0;
    --gray200: #f1f5f9;
    --gray100: #f8fafc;
    --border: rgba(148,163,184,.24);

    --app-bg: #171b26;
    --surface: #1c2230;
    --surface-elev: #262f40;
    --surface-soft: rgba(148,163,184,.08);
    --text: #e5edf7;
    --text-muted: #cbd5e1;
    --text-soft: #94a3b8;
    --input-bg: rgba(15,23,42,.45);
    --input-text: #f8fafc;
    --input-placeholder: #94a3b8;
    --card-bg: #1f2838;
}

:root[data-theme="dark"] {
    /* Nacht: diep donker met hoog contrast */
    --navy: #05070d;
    --navy2: #0a0f1a;
    --navy3: #121a27;
    --gray900: #0b1220;
    --gray800: #111827;
    --gray700: #1f2937;
    --gray600: #475569;
    --gray500: #94a3b8;
    --gray400: #cbd5e1;
    --gray300: #e2e8f0;
    --gray200: #f1f5f9;
    --gray100: #ffffff;
    --border: rgba(148,163,184,.28);

    --app-bg: #05070d;
    --surface: #0a0f1a;
    --surface-elev: #121a27;
    --surface-soft: rgba(148,163,184,.09);
    --text: #f8fafc;
    --text-muted: #dbe5f2;
    --text-soft: #a8b6c9;
    --input-bg: rgba(15,23,42,.55);
    --input-text: #ffffff;
    --input-placeholder: #a8b6c9;
    --card-bg: #0f1724;
}

/* Day theme overrides (match SBI light feeling) */
:root[data-theme="light"] body {
    background: #f8fafc;
    color: #0f172a;
}
:root[data-theme="light"] .topbar {
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid rgba(15,23,42,.12);
}
:root[data-theme="light"] .topbar-brand,
:root[data-theme="light"] .status-label {
    color: #0f172a;
}
:root[data-theme="light"] .panel-left,
:root[data-theme="light"] .panel-center,
:root[data-theme="light"] .panel-right {
    background: #ffffff;
}
:root[data-theme="light"] .view-tabs,
:root[data-theme="light"] .agent-controls,
:root[data-theme="light"] .preview-browser-bar,
:root[data-theme="light"] .editor-toolbar {
    background: #f8fafc;
}
:root[data-theme="light"] .cmsg.ai {
    background: rgba(2,132,199,.08);
    border-color: rgba(2,132,199,.18);
    color: #0f172a;
}
:root[data-theme="light"] .cmsg.user {
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.28);
    color: #92400e;
}
:root[data-theme="light"] .chat-textarea,
:root[data-theme="light"] .interrupt-input,
:root[data-theme="light"] .chip,
:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .rp-section-header,
:root[data-theme="light"] .lp-section-header {
    background: #ffffff;
    color: #1e293b;
}
:root[data-theme="light"] .metric-value {
    color: #0f172a;
}
:root[data-theme="light"] .preview-pane {
    background: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0 }
html, body {
    height: 100%;
    background: var(--app-bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-md);
    line-height: var(--lh-normal);
    overflow: hidden;
}
h1, h2, h3, h4, h5, h6, .panel-h-title, .scope-pane-title, .sm-toolbar-title {
    font-family: var(--font-heading);
}

/* Ambient glow on body */
body {
    box-shadow: var(--orch-glow);
    transition: box-shadow 2s ease;
}

/* ══════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════ */
.topbar {
    height: 48px;
    background: rgba(10,14,26,.95);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-5);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}
.topbar, .topbar * { color: var(--text); }
.topbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 800;
    font-size: var(--fs-lg);
    color: var(--text);
}
.topbar-brand .logo-icon {
    width: 28px; height: 28px;
    background: linear-gradient(var(--orch-grad-angle), var(--gold), var(--gold2));
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--navy); font-weight: 900;
    transition: background .3s;
}
.topbar-center { display: flex; align-items: center; gap: 8px }
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gray600);
    flex-shrink: 0;
    transition: background .3s;
}
.status-dot.running {
    background: var(--green);
    box-shadow: 0 0 8px rgba(34,197,94,.5);
    animation: pulse 2s infinite;
}
.status-dot.waiting { background: var(--gold); box-shadow: 0 0 8px var(--gold-dim) }
.status-dot.done { background: var(--cyan) }
.status-label { font-size: 12px; color: var(--gray400); font-weight: 500 }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .6 } }

/* ══════════════════════════════════════════
   MAIN LAYOUT
   ══════════════════════════════════════════ */
.orch-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 300px;
    height: calc(100vh - 48px);
    overflow: hidden;
}

/* ══════════════════════════════════════════
   LEFT PANEL: CHAT + FILE TREE
   ══════════════════════════════════════════ */
.panel-left {
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow: hidden;
    min-width: 220px;
}
.panel-header {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.panel-h-title {
    font-size: var(--fs-xs); font-weight: 700;
    text-transform: uppercase; letter-spacing: .8px; color: var(--gray400);
}
.panel-h-badge {
    font-size: 10px; padding: 2px 7px; border-radius: 10px;
    font-weight: 700; background: var(--green-dim); color: var(--green);
}

/* Chat messages */
.chat-msgs {
    flex: 1; overflow-y: auto; padding: var(--space-2);
    display: flex; flex-direction: column; gap: var(--space-2);
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.06) transparent;
    min-height: 0;
}
.cmsg {
    max-width: 94%; padding: var(--space-2) var(--space-3); border-radius: 12px;
    font-size: var(--fs-sm); line-height: var(--lh-normal); animation: msgIn .2s ease;
}
.cmsg.ai {
    background: rgba(0,200,255,.07); border: 1px solid rgba(0,200,255,.12);
    align-self: flex-start; color: var(--text-muted);
}
.cmsg.user {
    background: var(--gold-dim); border: 1px solid var(--gold-border);
    align-self: flex-end; color: var(--gold2);
}
.cmsg .cm-name {
    font-size: 9px; font-weight: 700; margin-bottom: 3px;
    opacity: .7; text-transform: uppercase; letter-spacing: .5px;
}
.cmsg.ai .cm-name { color: var(--cyan) }
.cmsg.user .cm-name { color: var(--gold); text-align: right }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: translateY(0) } }

/* Quick action chips */
.chat-chips {
    display: flex; flex-wrap: wrap; gap: 4px;
    padding: var(--space-2); flex-shrink: 0; border-top: 1px solid var(--border);
}
.chip {
    padding: 5px 10px; border-radius: 999px; font-size: var(--fs-2xs); font-weight: 700;
    border: 1px solid var(--border); background: rgba(255,255,255,.04);
    color: var(--gray400); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--gold-border); color: var(--gold); background: var(--gold-dim) }

/* Chat input */
.chat-input-row {
    display: flex; gap: 6px; padding: var(--space-2);
    border-top: 1px solid var(--border); flex-shrink: 0; align-items: flex-end;
}
.chat-textarea {
    flex: 1; background: var(--input-bg); border: 1px solid var(--border);
    color: var(--input-text); padding: 8px 11px; border-radius: 10px; font-size: var(--fs-sm);
    resize: none; height: 36px; max-height: 80px; outline: none;
    font-family: inherit; transition: border-color .2s; line-height: 1.4;
}
.chat-textarea:focus { border-color: var(--gold-border) }
.chat-textarea::placeholder { color: var(--gray600) }
.chat-textarea::placeholder { color: var(--input-placeholder) }
.btn-chat-send {
    background: var(--gold); color: var(--navy); border: none;
    padding: 8px 12px; border-radius: 10px; cursor: pointer;
    font-weight: 700; font-size: var(--fs-sm); display: flex; align-items: center;
    gap: 4px; transition: all .2s; flex-shrink: 0; height: 36px;
}
.btn-chat-send:hover { filter: brightness(1.1) }

/* Chat action buttons */
.chat-action-btns { display: flex; flex-direction: column; gap: 5px; margin-top: 6px }
.chat-action-btn {
    padding: 6px 10px; border-radius: 7px;
    background: rgba(242,193,79,.1); border: 1px solid rgba(242,193,79,.25);
    color: var(--gold); font-size: 11px; font-weight: 600;
    cursor: pointer; text-align: left; transition: all .15s; font-family: inherit;
}
.chat-action-btn:hover { background: rgba(242,193,79,.18); border-color: rgba(242,193,79,.45) }

/* Left panel tabs */
.lp-tabs {
    display: flex; flex-direction: column;
    border-bottom: 1px solid var(--border); flex-shrink: 0;
    background: var(--surface-elev);
}
.lp-tab {
    padding: 11px 14px; font-size: var(--fs-xs); font-weight: 700;
    cursor: pointer; color: var(--gray500); border-left: 3px solid transparent;
    transition: all .15s; display: flex; align-items: center; gap: 10px;
    letter-spacing: .4px; user-select: none; background: transparent;
}
.lp-tab:hover { color: var(--text); background: var(--surface-soft) }
.lp-tab.on {
    color: var(--gold); border-left-color: var(--gold);
    background: rgba(242,193,79,.1); font-weight: 800;
}
.lp-tab i { font-size: 12px; width: 16px; text-align: center; flex-shrink: 0 }
.lp-tab .panel-tab-badge { margin-left: auto }
.lp-chat-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden }
.lp-chat-pane.hidden { display: none }
.lp-files-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden }
.lp-files-pane.hidden { display: none }

/* Typing indicator */
.typing-indicator {
    display: none; padding: 6px 11px; font-size: 11px;
    color: var(--cyan); align-self: flex-start; align-items: center; gap: 6px;
}
.typing-indicator.show { display: flex }
.tdots span {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--cyan); display: inline-block; animation: tdot 1.2s infinite;
}
.tdots span:nth-child(2) { animation-delay: .2s }
.tdots span:nth-child(3) { animation-delay: .4s }
@keyframes tdot { 0%,60%,100% { transform: translateY(0); opacity: .4 } 30% { transform: translateY(-5px); opacity: 1 } }

/* File tree */
.filetree-section {
    border-top: 1px solid var(--border); flex-shrink: 0;
    max-height: 220px; overflow: hidden; transition: max-height .3s;
}
.filetree-section.collapsed { max-height: 32px }
.filetree-toggle {
    padding: 6px 14px; font-size: 10px; font-weight: 700;
    color: var(--gray500); cursor: pointer; display: flex;
    align-items: center; gap: 6px; user-select: none;
    background: rgba(255,255,255,.02);
}
.filetree-toggle:hover { color: var(--gray300) }
.filetree { overflow-y: auto; padding: 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.06) transparent }
.ft-folder {
    padding: 6px 8px 6px 4px; font-size: 11px; font-weight: 600;
    color: var(--gray300); display: flex; align-items: center; gap: 6px;
    cursor: pointer; border-radius: 4px; margin: 1px 4px;
    transition: all .15s; user-select: none;
}
.ft-folder:hover { background: rgba(255,255,255,.05); color: var(--gray100) }
.ft-folder-icon { font-size: 12px; width: 16px; text-align: center; transition: transform .2s }
.ft-folder.expanded .ft-folder-icon { transform: rotate(90deg) }
.ft-folder-children { display: none; padding-left: 16px }
.ft-folder.expanded .ft-folder-children { display: block }
.ft-file {
    padding: 5px 8px 5px 26px; font-size: 10px; color: var(--gray400);
    display: flex; align-items: center; gap: 6px; border-radius: 4px;
    margin: 1px 4px; font-family: var(--font-mono); cursor: pointer;
    transition: all .15s; border-left: 2px solid transparent;
}
.ft-file:hover { background: rgba(255,255,255,.05); color: var(--gray200) }
.ft-file.selected { background: rgba(242,193,79,.12); color: var(--gold); border-left-color: var(--gold) }
.ft-file-icon { font-size: 11px; width: 14px; text-align: center }
.ft-file .ft-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--gray700); flex-shrink: 0; transition: all .3s;
}
.ft-file.done .ft-dot { background: var(--green); box-shadow: 0 0 5px rgba(34,197,94,.4) }
.ft-file.active .ft-dot { background: var(--gold); animation: pulse 1s infinite }
.ft-file.done { color: var(--gray400) }
.ft-size { margin-left: auto; font-size: 9px; color: var(--gray600) }

/* ══════════════════════════════════════════
   CENTER: AGENT STREAM
   ══════════════════════════════════════════ */
.panel-center {
    display: flex; flex-direction: column;
    overflow: hidden; background: var(--app-bg); min-width: 0;
}
.agent-controls {
    padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0; flex-wrap: wrap;
}
.btn {
    padding: 7px 14px; border-radius: 10px; border: none;
    font-family: var(--font); font-size: var(--fs-sm); font-weight: 700;
    cursor: pointer; display: inline-flex; align-items: center;
    gap: 6px; transition: all .15s;
}
.btn-primary { background: var(--gold); color: var(--navy) }
.btn-primary:hover { filter: brightness(1.1) }
.btn-danger { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4); color: var(--red) }
.btn-danger:hover { background: rgba(239,68,68,.25) }
.btn-secondary { background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--gray400) }
.btn-secondary:hover { border-color: var(--gold-border); color: var(--gold) }
.btn:disabled { opacity: .4; cursor: not-allowed }
.agent-cards {
    flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-4);
    display: flex; flex-direction: column; gap: 8px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.06) transparent;
}

/* Agent card */
.agent-card {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; transition: border-color .2s, transform .15s;
}
.agent-card:hover { transform: translateY(-1px); }
.agent-card.active { border-color: var(--gold-border); box-shadow: 0 0 20px var(--gold-dim) }
.agent-card.done { border-color: rgba(34,197,94,.2) }
.agent-card.error { border-color: rgba(239,68,68,.3) }
.agent-head {
    padding: 10px 12px; display: flex; align-items: center; gap: 10px;
    cursor: pointer; background: rgba(255,255,255,.02);
}
.agent-head:hover { background: rgba(255,255,255,.04) }
.agent-num {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; flex-shrink: 0;
    background: var(--gray700); color: var(--gray400);
}
.agent-card.active .agent-num { background: var(--gold-dim); color: var(--gold) }
.agent-card.done .agent-num { background: var(--green-dim); color: var(--green) }
.agent-name { font-weight: 700; font-size: var(--fs-sm); flex: 1; line-height: var(--lh-tight); }
.agent-status {
    font-size: var(--fs-2xs); padding: 3px 8px; border-radius: 999px;
    font-weight: 700; white-space: nowrap;
}
.status-idle { background: var(--gray700); color: var(--gray500) }
.status-running { background: var(--gold-dim); color: var(--gold) }
.status-done { background: var(--green-dim); color: var(--green) }
.status-waiting { background: var(--orange-dim); color: var(--orange) }
.status-error { background: var(--red-dim); color: var(--red) }
.agent-progress-bar { height: 2px; background: var(--gray700); position: relative }
.agent-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold2));
    width: 0%; transition: width .4s ease; border-radius: 2px;
}
.agent-card.done .agent-progress-fill { background: var(--green); width: 100% !important }
.agent-log {
    padding: 9px 12px; font-family: var(--font-mono); font-size: var(--fs-2xs);
    color: var(--gray500); max-height: 80px; overflow-y: auto;
    display: none; border-top: 1px solid var(--border);
}
.agent-card.active .agent-log, .agent-card.expanded .agent-log { display: block }
.agent-log-line { margin-bottom: 2px; display: flex; gap: 6px }
.agent-log-line .lt { color: var(--gray700); min-width: 50px }
.agent-log-line .lm { color: var(--cyan) }
.agent-log-line .lm.ok { color: var(--green) }
.agent-log-line .lm.warn { color: var(--orange) }
.agent-log-line .lm.err { color: var(--red) }
.agent-task-current { font-size: 11px; color: var(--gray400); padding: 0 12px 8px; font-style: italic }

/* Human-in-the-loop */
.hitl-bar {
    background: linear-gradient(90deg, rgba(139,92,246,.1), rgba(139,92,246,.05));
    border: 1px solid rgba(139,92,246,.3); border-radius: var(--radius);
    padding: 12px 14px; margin: 0 var(--space-4); display: none; animation: slideIn .3s ease;
}
.hitl-bar.show { display: block }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: translateY(0) } }
.hitl-title {
    font-size: 11px; font-weight: 700; color: #a78bfa;
    text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.hitl-question { font-size: 12px; color: #fff; margin-bottom: 6px; line-height: 1.5 }
.hitl-editor {
    width: 100%; background: var(--input-bg);
    border: 1px solid rgba(139,92,246,.3); border-radius: 6px;
    padding: 8px 10px; font-size: 11px; color: var(--input-text);
    font-family: var(--font-mono); max-height: 100px; overflow-y: auto;
    margin-bottom: 8px; resize: vertical; outline: none; line-height: 1.55;
}
.hitl-editor:focus { border-color: rgba(139,92,246,.6) }
.hitl-btns { display: flex; gap: 6px; flex-wrap: wrap }
.hitl-btn {
    padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 700;
    cursor: pointer; border: 1px solid; transition: all .15s; font-family: var(--font);
}
.hitl-approve { background: var(--green-dim); color: var(--green); border-color: rgba(34,197,94,.3) }
.hitl-approve:hover { background: rgba(34,197,94,.2) }
.hitl-reject { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,.3) }
.hitl-reject:hover { background: rgba(239,68,68,.2) }

/* Interrupt */
.interrupt-bar {
    padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border);
    display: flex; gap: 8px; flex-shrink: 0;
}
.interrupt-input {
    flex: 1; background: var(--input-bg); border: 1px solid var(--border);
    color: var(--input-text); padding: 8px 12px; border-radius: 10px; font-size: var(--fs-sm);
    font-family: var(--font); outline: none;
}
.interrupt-input:focus { border-color: var(--gold-border) }
.interrupt-input::placeholder { color: var(--gray600) }

/* ══════════════════════════════════════════
   RIGHT PANEL: METRICS
   ══════════════════════════════════════════ */
.panel-right {
    background: var(--surface); border-left: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden; min-width: 240px;
}
.metrics-body {
    flex: 1; overflow-y: auto; padding: var(--space-3);
    display: flex; flex-direction: column; gap: 8px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.06) transparent;
}
.metric-card {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px;
}
.metric-title {
    font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase;
    letter-spacing: .8px; color: var(--gray500); margin-bottom: 4px;
}
.metric-value { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.05 }
.metric-sub { font-size: var(--fs-2xs); color: var(--gray600); margin-top: 4px }

/* Right panel tabs */
.panel-tabs {
    display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.panel-tab {
    flex: 1; padding: 9px 6px; font-size: var(--fs-2xs); font-weight: 800;
    text-align: center; cursor: pointer; color: var(--gray500);
    border-bottom: 2px solid transparent; transition: all .15s;
    display: flex; align-items: center; justify-content: center;
    gap: 4px; letter-spacing: .3px; text-transform: uppercase;
}
.panel-tab:hover { color: var(--text); background: var(--surface-soft) }
.panel-tab.on { color: var(--gold); border-bottom-color: var(--gold); background: var(--gold-dim) }
.panel-tab-badge {
    background: var(--green); color: #000; font-size: 9px;
    padding: 2px 7px; border-radius: 10px; font-weight: 800;
    min-width: 18px; text-align: center; line-height: 1;
}

/* Pipeline stages */
.pipeline-stage {
    padding: 5px 8px; border-radius: 6px; display: flex;
    align-items: center; gap: 7px; background: var(--surface-soft);
    border: 1px solid transparent; transition: all .2s; font-size: 11px;
    color: var(--gray500);
}
.pipeline-stage .ps-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--gray700); flex-shrink: 0; transition: all .3s;
}
.pipeline-stage.active {
    border-color: var(--gold-border); background: var(--gold-dim); color: var(--gold);
}
.pipeline-stage.active .ps-dot {
    background: var(--gold); box-shadow: 0 0 6px var(--gold-dim); animation: pulse 1s infinite;
}
.pipeline-stage.done { color: var(--gray400) }
.pipeline-stage.done .ps-dot { background: var(--green) }
.pipeline-stage .ps-time {
    margin-left: auto; font-size: 9px; font-family: var(--font-mono); color: var(--gray600);
}

/* SSE pipeline mini */
.agent-pipeline-mini { display: flex; align-items: center; gap: 4px; padding: 6px 0 2px }
.pipeline-mini-step {
    font-size: 8px; padding: 2px 5px; border-radius: 3px;
    border: 1px solid var(--border); color: var(--gray600);
    background: var(--gray900); font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px; transition: all .2s; white-space: nowrap;
}
.pipeline-mini-step.active { border-color: var(--gold-border); color: var(--gold); background: var(--gold-dim) }
.pipeline-mini-step.done { border-color: rgba(34,197,94,.25); color: var(--green); background: var(--green-dim) }
.pipeline-mini-arrow { color: var(--gray700); font-size: 9px }

/* Timeline */
.timeline { padding: 8px 0; display: flex; flex-direction: column; gap: 4px }
.tl-item {
    font-size: 10px; color: var(--gray500); display: flex; gap: 6px; align-items: baseline;
}
.tl-item .tl-time {
    color: var(--gray700); font-family: var(--font-mono); white-space: nowrap; font-size: 9px;
}
.tl-item.active { color: var(--cyan) }
.tl-item.done { color: var(--green) }

/* Right and Left panel accordion */
.rp-accordeon, .lp-accordeon { display: flex; flex-direction: column; flex: 1; overflow: hidden }
.rp-section, .lp-section { display: flex; flex-direction: column; flex-shrink: 0; border-bottom: 1px solid var(--border); }
.rp-section.expanded, .lp-section.expanded { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.rp-section:not(.expanded), .lp-section:not(.expanded) { flex: 0 0 auto; }
.rp-section-header, .lp-section-header {
    padding: 10px 14px; cursor: pointer; display: flex;
    align-items: center; gap: 8px; background: var(--surface-soft);
    border-left: 3px solid transparent; transition: all .15s;
    user-select: none; flex-shrink: 0;
}
.rp-section-header:hover, .lp-section-header:hover { background: var(--surface-soft); filter: brightness(1.05); }
.rp-section.expanded .rp-section-header, .lp-section.expanded .lp-section-header { border-left-color: var(--gold); background: rgba(242,193,79,.08) }
.rp-section-chevron, .lp-section-chevron { font-size: 8px; color: var(--gray600); transition: transform .2s; width: 10px; flex-shrink: 0 }
.rp-section.expanded .rp-section-chevron, .lp-section.expanded .lp-section-chevron { transform: rotate(90deg) }
.rp-section-icon, .lp-section-icon { font-size: 11px; color: var(--gold); width: 14px; text-align: center; flex-shrink: 0 }
.rp-section-title, .lp-section-title { font-size: 11px; font-weight: 700; color: var(--gray400); flex: 1; letter-spacing: .4px }
.rp-section-content, .lp-section-content { display: none }
.rp-section.expanded .rp-section-content, .lp-section.expanded .lp-section-content {
    display: flex; flex-direction: column; flex: 1;
    overflow-y: auto; scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.06) transparent; min-height: 0;
}
.rp-section-body, .lp-section-body { padding: 12px }
.panel-tab-badge { background: var(--gold); color: #000; border-radius: 12px; padding: 2px 6px; font-size: 8px; font-weight: 800; }

/* ══════════════════════════════════════════
   VIEW TABS + PREVIEW
   ══════════════════════════════════════════ */
.view-tabs {
    display: flex; border-bottom: 1px solid var(--border);
    flex-shrink: 0; background: var(--surface);
}
.view-tab {
    flex: 1; padding: 8px 12px; font-size: 11px; font-weight: 700;
    text-align: center; cursor: pointer; color: var(--gray500);
    border-bottom: 2px solid transparent; transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.view-tab:hover { color: var(--text); background: var(--surface-soft) }
.view-tab.on { color: var(--gold); border-bottom-color: var(--gold); background: var(--gold-dim) }

.preview-pane {
    flex: 1; overflow: hidden; display: none;
    flex-direction: column; background: #f1f5f9;
}
.preview-pane.show { display: flex }
.preview-browser-bar {
    height: 28px; background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 10px; gap: 6px; flex-shrink: 0;
}
.preview-url { flex: 1; font-size: 9px; font-family: var(--font-mono); color: var(--gray500) }
#previewIframe { flex: 1; border: none; width: 100%; background: #fff }
.preview-placeholder {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--gray600); font-size: 12px; gap: 8px;
}
.preview-placeholder .pp-icon { font-size: 36px; opacity: .3 }
.preview-building {
    font-size: 10px; padding: 6px 12px;
    background: var(--gold-dim); border: 1px solid var(--gold-border);
    border-radius: 6px; color: var(--gold);
    display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
}

/* Editor toolbar */
.editor-toolbar {
    height: 36px; background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none; align-items: center; padding: 0 10px; gap: 6px; flex-shrink: 0;
}
.editor-toolbar.show { display: flex }
.editor-btn {
    padding: 5px 11px; border-radius: 7px; font-size: var(--fs-2xs); font-weight: 700;
    cursor: pointer; border: 1px solid var(--border);
    background: var(--navy); color: var(--gray400); transition: all .15s;
    font-family: var(--font);
}
.editor-btn:hover { background: rgba(255,255,255,.08); color: #fff }
.editor-btn.active { background: var(--gold); color: #000; border-color: var(--gold) }
.editor-section-label {
    font-size: 9px; color: var(--gray600); font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
}

/* ══════════════════════════════════════════
   FILE EXPLORER
   ══════════════════════════════════════════ */
.fe-toolbar {
    display: flex; gap: 4px; padding: 8px 10px;
    border-bottom: 1px solid var(--border); flex-shrink: 0;
    background: rgba(255,255,255,.02);
}
.fe-btn {
    padding: 6px 10px; border-radius: 8px; font-size: var(--fs-2xs); font-weight: 700;
    cursor: pointer; border: 1px solid var(--border);
    background: rgba(255,255,255,.03); color: var(--gray400);
    transition: all .15s; display: flex; align-items: center; gap: 5px;
}
.fe-btn:hover { background: rgba(255,255,255,.08); color: var(--gray200); border-color: var(--gray500) }
.fe-btn-ai {
    background: linear-gradient(135deg, rgba(168,85,247,.15), rgba(236,72,153,.15));
    color: var(--purple); border-color: rgba(168,85,247,.3);
}
.fe-btn-ai:hover {
    background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(236,72,153,.25));
    border-color: rgba(168,85,247,.5);
}
.fe-tree-container { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.06) transparent }
.fe-preview {
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
    border-top: 1px solid var(--border); background: var(--navy3);
    display: flex; flex-direction: column;
}
.fe-preview.show { max-height: 500px }
.fe-preview-header {
    padding: 8px 12px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); flex-shrink: 0;
}
.fe-preview-title { font-size: 11px; font-weight: 700; color: var(--gray300); font-family: var(--font-mono) }
.fe-preview-actions { display: flex; gap: 4px }
.fe-preview-btn {
    padding: 4px 10px; border-radius: 4px; font-size: 9px; font-weight: 700;
    cursor: pointer; border: 1px solid var(--border);
    background: rgba(255,255,255,.03); color: var(--gray400); transition: all .15s;
}
.fe-preview-btn:hover { background: var(--gold-dim); color: var(--gold); border-color: var(--gold) }
.fe-preview-body {
    flex: 1; overflow-y: auto; padding: 12px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.06) transparent;
}
.fe-image-preview { display: flex; flex-direction: column; gap: 8px }
.fe-image-info {
    font-size: 10px; color: var(--gray500); font-family: var(--font-mono);
    padding: 6px 10px; background: rgba(0,0,0,.3); border-radius: 6px;
}
.fe-code-editor { display: flex; flex-direction: column; height: 100% }
#feCodeArea {
    flex: 1; background: var(--input-bg); border: 1px solid var(--border);
    color: var(--input-text); padding: 11px; border-radius: 10px; font-size: var(--fs-sm);
    font-family: var(--font-mono); outline: none; resize: none;
    line-height: 1.6; min-height: 300px;
}

/* Theme-specific polish for readable cascade */
:root[data-theme="light"] {
    color-scheme: light;
}
:root[data-theme="light"] .btn-secondary,
:root[data-theme="light"] .editor-btn,
:root[data-theme="light"] .fe-btn,
:root[data-theme="light"] .chip {
    background: #ffffff;
    color: #334155;
    border-color: rgba(15,23,42,.16);
}
:root[data-theme="light"] .preview-url,
:root[data-theme="light"] .metric-sub,
:root[data-theme="light"] .panel-h-title,
:root[data-theme="light"] .agent-task-current {
    color: #475569;
}
:root[data-theme="light"] .panel-tab.on,
:root[data-theme="light"] .view-tab.on {
    background: rgba(2,132,199,.10);
    color: #0369a1;
}

:root[data-theme="dim"], :root[data-theme="dark"] {
    color-scheme: dark;
}
:root[data-theme="dark"] .panel-tab.on,
:root[data-theme="dark"] .view-tab.on,
:root[data-theme="dim"] .panel-tab.on,
:root[data-theme="dim"] .view-tab.on {
    background: var(--gold-dim);
    color: var(--gold);
}
:root[data-theme="dim"] .btn-secondary,
:root[data-theme="dark"] .btn-secondary {
    background: var(--surface-soft);
    color: var(--text-muted);
}
:root[data-theme="dim"] .agent-head:hover,
:root[data-theme="dark"] .agent-head:hover,
:root[data-theme="dim"] .panel-tab:hover,
:root[data-theme="dark"] .panel-tab:hover {
    background: rgba(148,163,184,.10);
}
#feCodeArea:focus { border-color: rgba(242,193,79,.5) }

/* ══════════════════════════════════════════
   WIZARD MODAL (Light theme)
   ══════════════════════════════════════════ */
.wiz-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(12px); animation: fadeIn .3s ease;
}
.wiz-overlay.hide { animation: fadeOut .25s ease forwards }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut { from { opacity: 1 } to { opacity: 0 } }
.wiz-card {
    --wiz-accent: #0891b2;
    --wiz-accent-dim: rgba(8,145,178,.08);
    --wiz-accent-border: rgba(8,145,178,.25);
    background: #fff; border: none; border-radius: 20px;
    width: 640px; max-width: 96vw; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06);
    animation: cardPop .3s ease; color: #1f2937;
}
@keyframes cardPop { from { transform: scale(.95) translateY(12px); opacity: 0 } to { transform: scale(1) translateY(0); opacity: 1 } }
.wiz-header { padding: 20px 24px 0; display: flex; align-items: center; gap: 10px }
.wiz-logo {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--wiz-accent), color-mix(in srgb, var(--wiz-accent) 80%, #000));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff; font-weight: 900; flex-shrink: 0;
}
.wiz-title { font-size: 16px; font-weight: 800; color: #111827 }
.wiz-sub { font-size: 12px; color: #6b7280; margin-top: 2px }
.wiz-steps { display: flex; gap: 4px; padding: 14px 24px 8px; align-items: center }
.wiz-step { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: #9ca3af }
.wiz-step.on { color: var(--wiz-accent) }
.wiz-step.done { color: #22c55e }
.wiz-step-circle {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid #d1d5db; display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800; flex-shrink: 0;
    background: #f9fafb; color: #9ca3af; transition: all .2s;
}
.wiz-step.on .wiz-step-circle { border-color: var(--wiz-accent); background: var(--wiz-accent-dim); color: var(--wiz-accent) }
.wiz-step.done .wiz-step-circle { border-color: #22c55e; background: rgba(34,197,94,.1); color: #22c55e }
.wiz-step-line { flex: 1; height: 2px; background: #e5e7eb; min-width: 20px; border-radius: 1px }
.wiz-step.done + .wiz-step-line, .wiz-step.done ~ .wiz-step-line { background: #bbf7d0 }
.wiz-body { padding: 14px 24px 18px }
.wiz-label {
    font-size: 11px; font-weight: 700; color: #4b5563;
    margin-bottom: 5px; margin-top: 12px;
    display: flex; align-items: center; gap: 5px;
}
.wiz-input {
    width: 100%; background: #f9fafb; border: 1px solid #d1d5db;
    color: #111827; padding: 9px 13px; border-radius: 10px;
    font-size: 13px; font-family: var(--font); outline: none; transition: all .2s;
}
.wiz-input:focus { border-color: var(--wiz-accent); box-shadow: 0 0 0 3px var(--wiz-accent-dim) }
.wiz-input::placeholder { color: #9ca3af }
.wiz-row { display: flex; gap: 7px }
.wiz-search-results {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    max-height: 200px; overflow-y: auto; margin-top: 4px; display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.wiz-search-results.show { display: block }
.wiz-result-item {
    padding: 9px 13px; cursor: pointer; display: flex; align-items: center;
    gap: 9px; transition: background .15s; font-size: 12px;
    border-bottom: 1px solid #f3f4f6; color: #374151;
}
.wiz-result-item:last-child { border-bottom: none }
.wiz-result-item:hover { background: var(--wiz-accent-dim) }
.wiz-result-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0; background: #f3f4f6;
}
.wiz-result-name { font-weight: 700; font-size: 12px; color: #111827 }
.wiz-result-tag { font-size: 9px; color: #6b7280 }
.wiz-selected {
    background: var(--wiz-accent-dim); border: 1px solid var(--wiz-accent-border);
    border-radius: 10px; padding: 10px 14px;
    display: flex; align-items: center; gap: 9px; margin-top: 6px;
}
.wiz-selected-clear { margin-left: auto; cursor: pointer; color: #9ca3af; font-size: 12px }
.wiz-selected-clear:hover { color: #ef4444 }
.wiz-kvk-row { display: flex; gap: 6px; align-items: flex-end }
.kvk-result {
    background: rgba(34,197,94,.06); border: 1px solid rgba(34,197,94,.2);
    border-radius: 10px; padding: 10px 14px; font-size: 11px;
    margin-top: 8px; display: none; color: #374151;
}
.kvk-result.show { display: block }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px }
.color-swatch {
    width: 36px; height: 36px; border-radius: 10px;
    cursor: pointer; border: 3px solid transparent;
    transition: all .2s; position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.color-swatch.active { border-color: #111827; transform: scale(1.1) }
.color-swatch.active::after {
    content: '\2713'; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; font-weight: 900;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.color-swatch:hover { transform: scale(1.12); box-shadow: 0 4px 12px rgba(0,0,0,.2) }
.wiz-footer {
    padding: 12px 24px 20px; display: flex; gap: 8px;
    justify-content: flex-end; border-top: 1px solid #e5e7eb;
}
.wiz-btn {
    padding: 9px 18px; border-radius: 10px; font-size: 12px; font-weight: 700;
    cursor: pointer; border: none; font-family: var(--font); transition: all .15s;
}
.wiz-btn-ghost { background: #f3f4f6; color: #4b5563; border: 1px solid #d1d5db }
.wiz-btn-ghost:hover { background: #e5e7eb; color: #111827 }
.wiz-btn-primary {
    background: var(--wiz-accent); color: #fff; font-size: 13px;
    padding: 10px 26px; box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.wiz-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.2) }
.biz-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px }
.biz-card {
    background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 12px;
    padding: 10px; cursor: pointer; transition: all .2s; text-align: center;
}
.biz-card:hover { border-color: var(--wiz-accent-border); background: var(--wiz-accent-dim); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.06) }
.biz-card.active { border-color: var(--wiz-accent); background: var(--wiz-accent-dim); box-shadow: 0 0 0 3px var(--wiz-accent-dim) }
.biz-card-icon { font-size: 20px; margin-bottom: 5px }
.biz-card-name { font-size: 10px; font-weight: 700; color: #1f2937 }
.biz-card-tag { font-size: 9px; color: #6b7280; margin-top: 2px }
.wiz-streetview {
    min-height: 120px; border-radius: 10px; background: #f3f4f6;
    border: 1px solid #e5e7eb; overflow: hidden;
    display: flex; align-items: center; justify-content: center; margin-top: 8px;
}
.wiz-gmb-cta {
    display: none; align-items: center; gap: 8px;
    padding: 9px 13px; background: rgba(66,133,244,.06);
    border: 1px solid rgba(66,133,244,.18); border-radius: 10px;
    margin-top: 8px; color: #374151;
}

/* ══════════════════════════════════════════
   AI IMAGE MODAL
   ══════════════════════════════════════════ */
.ai-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.ai-modal.show { display: flex }
.ai-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(4px) }
.ai-modal-content {
    position: relative;
    background: linear-gradient(var(--orch-grad-angle), var(--navy2), var(--navy3));
    border: 1px solid var(--border); border-radius: 16px;
    max-width: 700px; width: 100%; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: modalSlideUp .3s ease;
}
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(30px) } to { opacity: 1; transform: translateY(0) } }
.ai-modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; background: var(--navy2); z-index: 10;
}
.ai-modal-title { font-size: 20px; font-weight: 800; color: var(--gold); margin: 0 }
.ai-modal-close {
    background: rgba(255,255,255,.05); border: 1px solid var(--border);
    color: var(--gray400); width: 32px; height: 32px; border-radius: 8px;
    cursor: pointer; transition: all .15s;
    display: flex; align-items: center; justify-content: center;
}
.ai-modal-close:hover { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.5); color: #ef4444 }
.ai-modal-body {
    padding: 24px; scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.06) transparent;
}
.ai-form-group { margin-bottom: 20px }
.ai-label { font-size: 12px; font-weight: 700; color: var(--gray300); margin-bottom: 8px; display: block; letter-spacing: .3px }
.ai-label-sm { font-size: 10px; font-weight: 700; color: var(--gray400); margin-bottom: 4px; display: block }
.ai-textarea {
    width: 100%; background: rgba(0,0,0,.3); border: 1px solid var(--border);
    color: #fff; padding: 12px 14px; border-radius: 10px; font-size: 13px;
    font-family: var(--font); outline: none; resize: vertical; min-height: 80px;
    transition: border-color .2s;
}
.ai-textarea:focus { border-color: rgba(242,193,79,.5); background: rgba(0,0,0,.4) }
.ai-select {
    width: 100%; background: rgba(0,0,0,.3); border: 1px solid var(--border);
    color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 12px;
    font-family: var(--font); outline: none; cursor: pointer;
}
.ai-select:focus { border-color: rgba(242,193,79,.5) }
.ai-provider-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px; margin-top: 10px;
}
.ai-provider-card {
    background: rgba(255,255,255,.03); border: 2px solid var(--border);
    border-radius: 10px; padding: 14px; cursor: pointer; transition: all .2s;
    text-align: center; display: flex; flex-direction: column;
    align-items: center; gap: 6px;
}
.ai-provider-card:hover { background: rgba(255,255,255,.08); border-color: var(--gray500); transform: translateY(-2px) }
.ai-provider-card.selected { background: rgba(242,193,79,.12); border-color: var(--gold); box-shadow: 0 0 20px var(--gold-dim) }
.ai-provider-icon { font-size: 28px; line-height: 1 }
.ai-provider-name { font-size: 12px; font-weight: 700; color: var(--gray200) }
.ai-provider-models { font-size: 9px; color: var(--gray500); font-weight: 600; text-transform: uppercase; letter-spacing: .3px }
.ai-advanced-options {
    margin-top: 10px; padding: 12px; background: rgba(0,0,0,.2);
    border-radius: 8px; border: 1px solid var(--border);
}
.ai-modal-footer {
    padding: 16px 24px; border-top: 1px solid var(--border);
    display: flex; gap: 10px; justify-content: flex-end;
    position: sticky; bottom: 0; background: var(--navy2); z-index: 10;
}
.ai-btn {
    padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 700;
    cursor: pointer; border: none; display: flex; align-items: center;
    gap: 8px; transition: all .15s;
}
.ai-btn-primary {
    background: linear-gradient(135deg, var(--gold2), var(--gold));
    color: #000; box-shadow: 0 4px 12px var(--gold-dim);
}
.ai-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--gold-dim) }
.ai-btn-secondary {
    background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--gray300);
}
.ai-btn-secondary:hover { background: rgba(255,255,255,.1) }
.ai-modal-loading {
    position: absolute; inset: 0; background: rgba(10,14,26,.95);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; color: var(--gold); font-size: 14px; font-weight: 700; z-index: 100;
}
.ai-spinner {
    width: 50px; height: 50px;
    border: 4px solid var(--border); border-top-color: var(--gold);
    border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.ai-modal-result { padding: 24px; display: flex; flex-direction: column; gap: 16px }
.ai-modal-result img { max-width: 100%; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.3) }
.ai-result-actions { display: flex; gap: 10px; justify-content: center }

/* ══════════════════════════════════════════
   MOBILE RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1100px) {
    .orch-layout { grid-template-columns: 220px minmax(0, 1fr) 240px }
}
@media (max-width: 700px) {
    .orch-layout { grid-template-columns: 1fr !important; grid-template-rows: auto; height: auto }
    .panel-left, .panel-right { display: none }
    .panel-center { height: calc(100vh - 48px) }
}
@media (max-width: 700px) {
    .orch-layout { grid-template-columns: 1fr }
    .panel-left, .panel-right { display: none }
    .topbar { padding: 0 12px }
    .topbar-brand { font-size: 12px; gap: 6px }
    .topbar-brand .logo-icon { width: 24px; height: 24px; font-size: 11px }
    /* Mobile hamburger menu placeholder */
    .topbar-mobile-toggle { display: block }
}
@media (min-width: 701px) {
    .orch-layout { display: grid !important; grid-template-columns: 300px minmax(0, 1fr) 300px !important; height: calc(100vh - 48px) !important }
    .panel-left, .panel-right {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        display: flex !important;
    }
    .panel-center { margin: 0 !important; height: auto !important; display: flex !important; min-width: 0 }
}
@media (min-width: 701px) and (max-width: 1100px) {
    .orch-layout { grid-template-columns: 220px minmax(0, 1fr) 240px !important }
}
@media (max-width: 600px) {
    .topbar { padding: 0 10px }
    .topbar-brand { font-size: 11px; gap: 6px }
    .topbar-center { display: none }
    #topbarBusiness { display: none }
    .agent-controls { flex-wrap: wrap; padding: 8px 10px; gap: 6px }
    .agent-card-header { padding: 8px 10px }
    .view-tab { font-size: 10px; padding: 6px 8px }
}
