/* Hermes Erika Operations Console — v72 */

:root {
  --bg:#0a0a12; --surface:#12121e; --card:#1a1a2e; --panel:#16162a;
  --border:#2a2a4a; --border-light:#3a3a5a;
  --primary:#5ee7df; --primary-dim:#3a9d96; --accent:#4a90d9;
  --text:#e0e0e8; --text-muted:#8a8aa0; --text-dim:#5a5a7a;
  --success:#00cc88; --warning:#ffaa33; --danger:#ff4466; --info:#4488ff;
  --font-main:'SF Pro Display','Segoe UI',system-ui,sans-serif;
  --trust-high: var(--success);
  --trust-drift: var(--warning);
  --trust-reduced: var(--danger);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: var(--font-main); font-size: 13px; background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; }
body { display: flex; flex-direction: column; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.header { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 16px; }
.header-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo { display: flex; align-items: center; gap: 6px; }
.logo-icon { font-size: 20px; }
.logo-text { font-size: 14px; font-weight: 700; letter-spacing: 2px; color: var(--primary); }
.header-title-main { font-size: 14px; font-weight: 600; }
.header-title-sub { font-size: 10px; color: var(--text-muted); }

/* Trust Score Header Block */
.trust-score-header { text-align: center; min-width: 140px; }
.tsh-label { font-size: 9px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.tsh-value { font-size: 32px; font-weight: 800; color: var(--success); line-height: 1; transition: color 0.4s; }
.tsh-value.drift { color: var(--warning); }
.tsh-value.reduced { color: var(--danger); }
.tsh-detail { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.header-center { flex: 1; display: flex; justify-content: center; }
.header-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header-metric { display: flex; align-items: center; gap: 6px; }
.header-metric-icon { font-size: 16px; }
.header-metric-label { font-size: 10px; color: var(--text-muted); }
.header-metric-value { font-size: 15px; font-weight: 700; }
.vps-badge { font-size: 11px; }

/* ── App Body ─────────────────────────────────────────────────────────────── */
.app-body { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar { width: 90px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 8px 0; flex-shrink: 0; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; cursor: pointer; color: var(--text-muted); font-size: 9px; font-weight: 700; letter-spacing: 0.5px; transition: all 0.15s; text-align: center; }
.nav-item:hover { background: rgba(94,231,223,0.08); color: var(--text); }
.nav-item.active { background: rgba(94,231,223,0.12); color: var(--primary); border-left: 3px solid var(--primary); }
.nav-icon { font-size: 16px; }
.nav-text { font-size: 8px; }
.sidebar-footer { margin-top: auto; padding: 10px 8px; border-top: 1px solid var(--border); }
.user-profile { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.user-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.user-name { font-size: 10px; font-weight: 600; }
.user-role { font-size: 9px; color: var(--text-muted); }
.sign-out { font-size: 10px; color: var(--text-muted); cursor: pointer; text-align: center; padding: 4px 0; }
.sign-out:hover { color: var(--danger); }

/* ── Main Content ─────────────────────────────────────────────────────────── */
.main-content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 10px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 10px; }

/* ── Zone ─────────────────────────────────────────────────────────────────── */
.zone { border-radius: 8px; border: 1px solid var(--border); overflow: hidden; background: var(--surface); }
.zone-label { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: rgba(94,231,223,0.05); border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--primary); cursor: pointer; user-select: none; }
.zone-label:hover { background: rgba(94,231,223,0.12); }
.zone-label-icon { font-size: 14px; }
.zone-label-question { margin-left: auto; font-size: 10px; color: var(--text-muted); font-weight: 400; }
/* Zone collapsed = only header visible */
.zone-collapsed > *:not(.zone-label) { display: none !important; }
.zone-collapsed .zone-label { border-bottom: none; }

/* ── Erika Zone ───────────────────────────────────────────────────────────── */
.erika-top-row { display: flex; gap: 0; }
.erika-status-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; padding: 8px 10px; flex: 1; align-content: start; grid-auto-rows: min-content; }
.erika-status-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; min-width: 0; }
.esc-label { font-size: 9px; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 3px; text-transform: uppercase; }
.esc-value { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esc-urgent { color: var(--danger); }
.esc-warn { color: var(--warning); }
.esc-src { font-size: 8px; color: var(--text-dim); margin-top: 3px; letter-spacing: .3px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esc-src::before { content: "↳ "; opacity: .6; }
.ap-src { font-size: 8px; color: var(--text-dim); opacity: .65; margin-top: 1px; }

/* ── Alignment Panel ──────────────────────────────────────────────────────── */
.alignment-panel { width: 220px; flex-shrink: 0; border-left: 1px solid var(--border); padding: 8px 10px; background: var(--card); }
.ap-title { font-size: 9px; font-weight: 700; color: var(--primary); letter-spacing: 1px; margin-bottom: 6px; }
.ap-metrics { display: flex; flex-direction: column; gap: 4px; }
.ap-metric {}
.ap-label { font-size: 9px; color: var(--text-muted); margin-bottom: 1px; }
.ap-bar-row { display: flex; align-items: center; gap: 6px; }
.ap-mini-bar { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.ap-mini-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.ap-fill-good { background: var(--success); }
.ap-fill-warn { background: var(--warning); }
.ap-fill-danger { background: var(--danger); }
.ap-val { font-size: 11px; font-weight: 700; min-width: 32px; text-align: right; }
.ap-stat-row { display: flex; gap: 8px; margin-top: 2px; }
.ap-stat { flex: 1; }
.ap-stat-label { font-size: 9px; color: var(--text-muted); }
.ap-stat-val { font-size: 13px; font-weight: 700; }
.ap-stat-danger { color: var(--danger); }
.ap-stat-warn { color: var(--warning); }

/* ── Trust Banner ─────────────────────────────────────────────────────────── */
.trust-banner { display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: var(--card); border-top: 1px solid var(--border); }
.trust-clickable { cursor: pointer; transition: opacity 0.15s; }
.trust-clickable:hover { opacity: 0.82; }
.trust-banner-left { flex-shrink: 0; min-width: 130px; }
.trust-banner-label { font-size: 10px; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.trust-banner-status { font-size: 11px; color: var(--success); font-weight: 600; transition: color 0.4s; }
.trust-banner-status.drift { color: var(--warning); }
.trust-banner-status.reduced { color: var(--danger); }
.trust-banner-bar-wrap { flex: 1; position: relative; }
.trust-banner-bar { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.trust-banner-fill { height: 100%; background: linear-gradient(90deg, var(--success), var(--primary)); border-radius: 5px; transition: width 0.5s, background 0.4s; }
.trust-banner-fill.drift { background: linear-gradient(90deg, var(--warning), #ffcc44); }
.trust-banner-fill.reduced { background: linear-gradient(90deg, var(--danger), #ff7799); }
.trust-thresholds { position: absolute; top: 0; left: 0; right: 0; height: 10px; pointer-events: none; }
.threshold-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--surface); opacity: 0.7; }
.threshold-label { position: absolute; bottom: -14px; font-size: 8px; color: var(--text-dim); transform: translateX(-50%); }
.trust-banner-right { flex-shrink: 0; text-align: right; }
.trust-banner-detail { font-size: 11px; color: var(--text-muted); }
.trust-banner-pct { font-size: 20px; font-weight: 800; color: var(--success); transition: color 0.4s; }
.trust-banner-pct.drift { color: var(--warning); }
.trust-banner-pct.reduced { color: var(--danger); }

/* ── Command Surface ──────────────────────────────────────────────────────── */
.command-surface { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); }
.command-input { flex: 1; padding: 8px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; outline: none; }
.command-input:focus { border-color: var(--primary); }
.command-input::placeholder { color: var(--text-dim); }
.cmd-btn { padding: 8px 16px; background: var(--primary-dim); color: var(--bg); border: none; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.cmd-btn:hover { background: var(--primary); }

/* ── Main Split ───────────────────────────────────────────────────────────── */
.main-split { display: flex; gap: 0; align-items: stretch; }
.exec-flow-panel { border-right: 1px solid var(--border); border-radius: 0; }
.inbox-panel { border-radius: 0; }
.bottom-split { display: flex; gap: 0; align-items: stretch; }
/* Panels inside splits participate in accordion */
.main-split > .panel, .bottom-split > .panel { flex: 1 1 0%; min-width: 0; overflow: hidden; border-radius: 0; border: none; transition: flex-basis 0.3s ease, opacity 0.25s ease; }
.main-split > .panel + .panel { border-left: 1px solid var(--border); }
.bottom-split > .panel + .panel { border-left: 1px solid var(--border); }
/* Minimised sibling panel collapses to zero width */
.main-split > .panel.panel-minimized, .bottom-split > .panel.panel-minimized { flex: 0 0 0 !important; overflow: hidden; opacity: 0; pointer-events: none; border: none !important; }

/* ── Panel ────────────────────────────────────────────────────────────────── */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.panel-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; transition: background 0.15s; }
.panel-header:hover { background: color-mix(in srgb, var(--panel) 85%, var(--primary) 15%); }
.panel-header-icon { font-size: 14px; flex-shrink: 0; }
.panel-header-title { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; flex-shrink: 0; }
.panel-header-question { margin-left: auto; font-size: 10px; color: var(--text-muted); }
.panel-toggle { flex-shrink: 0; margin-left: 8px; font-size: 11px; color: var(--text-muted); transition: transform 0.22s ease; line-height: 1; }
.panel.collapsed .panel-toggle { transform: rotate(-90deg); }
.panel.collapsed .panel-header { border-bottom: none; }
.panel-body { padding: 8px; overflow-y: auto; max-height: 300px; transition: max-height 0.25s ease, padding 0.2s ease, opacity 0.2s; }
/* Inside full-screen views, panels and their bodies fill available height */
[id^="view-"] { display: flex; flex-direction: column; min-height: 0; }
.main-content > .zone[id^="view-"] { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
[id^="view-"] > .panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
[id^="view-"] > .panel .panel-body { max-height: none; flex: 1; overflow-y: auto; min-height: 0; }
#view-kanban { overflow-y: auto; }
#view-kanban .kanban-toolbar { flex: 0 0 auto; }
#view-kanban .kanban-board { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
#view-kanban .kanban-column { min-height: 0; }
#view-kanban .kanban-col-body { max-height: none; min-height: 0; }
.panel.collapsed .panel-body { max-height: 0 !important; padding-top: 0; padding-bottom: 0; overflow: hidden; opacity: 0; }
.panel-footer { padding: 6px 12px; border-top: 1px solid var(--border); font-size: 11px; }
.panel.collapsed .panel-footer { display: none; }
.panel-footer-link { color: var(--primary); cursor: pointer; font-size: 11px; }
.panel-footer-link:hover { text-decoration: underline; }

/* ── Execution Flow ───────────────────────────────────────────────────────── */
.exec-flow-legend { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.exec-flow-list { display: flex; flex-direction: column; gap: 4px; }
.exec-task-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--panel); border-radius: 5px; font-size: 11px; border-left: 3px solid var(--border); transition: border-color 0.2s; }
.exec-task-row.vstatus-VERIFIED { border-left-color: var(--success); }
.exec-task-row.vstatus-EXECUTION_CLAIMED { border-left-color: var(--primary); }
.exec-task-row.vstatus-VERIFYING { border-left-color: var(--info); }
.exec-task-row.vstatus-FAILED { border-left-color: var(--danger); }
.exec-task-title { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exec-task-owner { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.exec-task-stage { font-size: 10px; color: var(--text-dim); white-space: nowrap; }
.exec-task-actions { display: flex; gap: 4px; }
.exec-btn { padding: 2px 6px; font-size: 9px; border-radius: 3px; border: 1px solid var(--border); cursor: pointer; background: var(--card); color: var(--text-muted); transition: all 0.1s; }
.exec-btn:hover { border-color: var(--primary); color: var(--primary); }
.exec-btn.verify { border-color: var(--primary-dim); color: var(--primary); }
.exec-btn.claim { border-color: var(--accent); color: var(--accent); }

/* ── Verification status pills ───────────────────────────────────────────── */
.vstatus-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 10px; font-size: 9px; font-weight: 700; letter-spacing: 0.3px; }
.vstatus-verified   { background: rgba(0,204,136,0.15); color: var(--success); }
.vstatus-claimed    { background: rgba(94,231,223,0.12); color: var(--primary); }
.vstatus-verifying  { background: rgba(68,136,255,0.12); color: var(--info); }
.vstatus-failed     { background: rgba(255,68,102,0.15); color: var(--danger); }
.vstatus-open       { background: rgba(90,90,122,0.2);   color: var(--text-muted); }

/* ── Inbox ────────────────────────────────────────────────────────────────── */
.inbox-item { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--panel); border-radius: 5px; margin-bottom: 6px; border-left: 3px solid var(--border); }
.inbox-item.priority-P1 { border-left-color: var(--danger); }
.inbox-item.priority-P2 { border-left-color: var(--warning); }
.inbox-item.priority-P3 { border-left-color: var(--info); }
.inbox-item-header { display: flex; align-items: center; gap: 8px; }
.inbox-item-title { flex: 1; font-size: 12px; font-weight: 600; }
.inbox-item-meta { display: flex; gap: 8px; align-items: center; }
.inbox-item-owner { font-size: 10px; color: var(--text-muted); }
.inbox-item-impact { font-size: 10px; color: var(--text-dim); }
.inbox-item-rec { font-size: 11px; color: var(--text-muted); font-style: italic; }
.inbox-item-actions { display: flex; gap: 6px; }
.inbox-action-btn { padding: 4px 10px; font-size: 10px; font-weight: 600; border-radius: 4px; border: 1px solid; cursor: pointer; transition: all 0.15s; }
.inbox-action-btn.approve { border-color: var(--success); color: var(--success); background: rgba(0,204,136,0.08); }
.inbox-action-btn.approve:hover { background: rgba(0,204,136,0.2); }
.inbox-action-btn.view { border-color: var(--border); color: var(--text-muted); background: transparent; }
.inbox-action-btn.view:hover { border-color: var(--primary); color: var(--primary); }

/* ── Audit List ───────────────────────────────────────────────────────────── */
.audit-entry { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.audit-entry:last-child { border-bottom: none; }
.audit-time { font-size: 10px; color: var(--text-dim); white-space: nowrap; min-width: 40px; }
.audit-event { flex: 1; color: var(--text-muted); }
.audit-source { font-size: 9px; color: var(--text-dim); white-space: nowrap; }

/* ── Ecosystem Health ─────────────────────────────────────────────────────── */
.entity-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--panel); border-radius: 4px; margin-bottom: 4px; font-size: 11px; }
.entity-name { flex: 1; font-weight: 600; }
.entity-status { font-size: 10px; padding: 2px 6px; border-radius: 8px; }
.entity-healthy { background: rgba(0,204,136,0.15); color: var(--success); }
.entity-blocked { background: rgba(255,68,102,0.15); color: var(--danger); }
.entity-warn { background: rgba(255,170,51,0.15); color: var(--warning); }
.entity-revenue { font-size: 10px; color: var(--text-muted); }
.entity-compliance { font-size: 10px; color: var(--text-dim); }
.infra-mini { display: flex; gap: 12px; font-size: 10px; color: var(--text-muted); }
.infra-mini span { padding: 2px 6px; background: var(--panel); border-radius: 4px; }

/* ── Data Table ───────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { text-align: left; padding: 6px 8px; font-size: 9px; color: var(--text-muted); font-weight: 700; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); text-transform: uppercase; }
.data-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(94,231,223,0.03); }

/* ── Status Pills ─────────────────────────────────────────────────────────── */
.status-pill { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 9px; font-weight: 700; }
.status-ontrack  { background: rgba(0,204,136,0.15); color: var(--success); }
.status-atrisk   { background: rgba(255,68,102,0.15); color: var(--danger); }
.status-attention{ background: rgba(255,170,51,0.15); color: var(--warning); }
.status-closed   { background: rgba(90,90,122,0.2);   color: var(--text-muted); }

/* ── Severity Pills ───────────────────────────────────────────────────────── */
.severity-pill { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 9px; font-weight: 700; }
.severity-high   { background: rgba(255,68,102,0.15); color: var(--danger); }
.severity-medium { background: rgba(255,170,51,0.15); color: var(--warning); }
.severity-low    { background: rgba(68,136,255,0.15); color: var(--info); }

/* ── Priority Pills ───────────────────────────────────────────────────────── */
.priority-pill { display: inline-block; padding: 2px 6px; border-radius: 8px; font-size: 9px; font-weight: 700; }
.priority-P1 { background: rgba(255,68,102,0.15); color: var(--danger); }
.priority-P2 { background: rgba(255,170,51,0.15); color: var(--warning); }
.priority-P3 { background: rgba(68,136,255,0.12); color: var(--info); }

/* ── Verify Btn ───────────────────────────────────────────────────────────── */
.verify-btn { margin-left: auto; padding: 4px 12px; font-size: 10px; font-weight: 700; background: var(--primary-dim); color: var(--bg); border: none; border-radius: 4px; cursor: pointer; }
.verify-btn:hover { background: var(--primary); }

/* ── Loading ──────────────────────────────────────────────────────────────── */
.loading-msg { font-size: 11px; color: var(--text-dim); padding: 12px; text-align: center; }

/* ── VPS Sync Badge ───────────────────────────────────────────────────────── */
.vps-sync-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.sync-ok      { background: rgba(0,204,136,0.15); color: var(--success); }
.sync-unknown { background: var(--border);         color: var(--text-muted); }
.sync-error   { background: rgba(255,68,102,0.15); color: var(--danger); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { display: flex; align-items: center; justify-content: space-between; padding: 5px 16px; background: var(--surface); border-top: 1px solid var(--border); font-size: 10px; color: var(--text-muted); flex-shrink: 0; gap: 8px; }
.footer-verified { color: var(--success); font-weight: 600; }
.footer-by { color: var(--text-dim); }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Detail Slide-over Panel ──────────────────────────────────────────────── */
.detail-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.detail-backdrop.open { opacity: 1; pointer-events: all; }
.detail-panel { position: fixed; top: 0; right: 0; height: 100dvh; width: 440px; max-width: 92vw; background: var(--surface); border-left: 1px solid var(--border); z-index: 101; transform: translateX(100%); transition: transform 0.25s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; overflow: hidden; }
.detail-panel.open { transform: translateX(0); box-shadow: -8px 0 32px rgba(0,0,0,0.5); }

.dp-header { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--card); flex-shrink: 0; }
.dp-header-info { flex: 1; min-width: 0; }
.dp-type-label { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: var(--primary); text-transform: uppercase; margin-bottom: 4px; }
.dp-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; word-break: break-word; }
.dp-close { flex-shrink: 0; background: none; border: 1px solid var(--border); color: var(--text-muted); border-radius: 4px; width: 28px; height: 28px; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.dp-close:hover { border-color: var(--danger); color: var(--danger); }

.dp-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.dp-section-label { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--text-dim); text-transform: uppercase; margin-bottom: 8px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }

.dp-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dp-meta-item { background: var(--panel); border-radius: 5px; padding: 8px 10px; }
.dp-meta-key { font-size: 9px; color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 2px; }
.dp-meta-val { font-size: 12px; font-weight: 600; color: var(--text); word-break: break-word; }

.dp-evidence-block { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; font-family: 'SF Mono','Cascadia Code',monospace; font-size: 11px; color: var(--primary); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; line-height: 1.5; }

.dp-actions { display: flex; flex-direction: column; gap: 8px; }

/* Desktop: absolute footer at bottom of panel, always visible */
.dp-footer { display: none; padding: 10px 16px 14px; border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.detail-panel.open .dp-footer { display: block; position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; }
/* Mobile: panel shrunk to avoid Safari toolbar */
@media (max-width: 767px) {
  .detail-panel { height: calc(100dvh - 80px); }
  .dp-footer { padding: 8px 12px; }
  .dp-body { padding-bottom: 60px; }
}
.dp-btn { padding: 9px 14px; border-radius: 5px; font-size: 12px; font-weight: 700; cursor: pointer; border: 1px solid; transition: all 0.15s; text-align: center; width: 100%; }
.dp-btn-primary { background: var(--primary-dim); border-color: var(--primary-dim); color: var(--bg); }
.dp-btn-primary:hover:not(:disabled) { background: var(--primary); border-color: var(--primary); }
.dp-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.dp-btn-success { background: rgba(0,204,136,0.1); border-color: var(--success); color: var(--success); }
.dp-btn-success:hover { background: rgba(0,204,136,0.22); }
.dp-btn-muted { background: transparent; border-color: var(--border); color: var(--text-muted); }
.dp-btn-muted:hover { border-color: var(--primary); color: var(--primary); }

.dp-notify { padding: 12px 14px; border-radius: 6px; font-size: 12px; line-height: 1.6; font-weight: 500; }
.dp-notify-success { background: rgba(0,204,136,0.1); border: 1px solid rgba(0,204,136,0.3); color: var(--success); }
.dp-notify-error   { background: rgba(255,68,102,0.1); border: 1px solid rgba(255,68,102,0.3); color: var(--danger); }
.dp-notify-info    { background: rgba(68,136,255,0.1); border: 1px solid rgba(68,136,255,0.3); color: var(--info); }

.dp-source-options { display: flex; flex-direction: column; gap: 6px; }
.dp-source-option { padding: 10px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 5px; cursor: pointer; font-size: 12px; color: var(--text); transition: all 0.15s; display: flex; align-items: center; gap: 8px; }
.dp-source-option:hover { border-color: var(--primary); color: var(--primary); }
.dp-source-option.selected { border-color: var(--primary); background: rgba(94,231,223,0.1); color: var(--primary); }
.dp-source-desc { font-size: 10px; color: var(--text-dim); margin-left: auto; }
.dp-source-option.selected .dp-source-desc { color: var(--primary-dim); }

.dp-meta-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--border); }
.dp-meta-row:last-child { border-bottom: none; }
.dp-label { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim); flex-shrink: 0; margin-right: 12px; }
.dp-value { font-size: 12px; color: var(--text-muted); text-align: right; word-break: break-all; }
.dp-value.mono { font-family: 'SF Mono','Cascadia Code',monospace; font-size: 11px; color: var(--primary); }
/* ── Filing deadline badges ── */
.fil-badge { display:inline-block; padding:2px 7px; border-radius:3px; font-size:10px; font-weight:700; letter-spacing:.4px; }
.fil-overdue  { background:rgba(255,68,102,.18); color:#ff4466; border:1px solid rgba(255,68,102,.35); }
.fil-urgent   { background:rgba(255,170,51,.15); color:#ffaa33; border:1px solid rgba(255,170,51,.3); }
.fil-upcoming { background:rgba(68,136,255,.12); color:#4488ff; border:1px solid rgba(68,136,255,.25); }
.fil-filed    { background:rgba(0,204,136,.12);  color:#00cc88; border:1px solid rgba(0,204,136,.25); }
.fil-pending  { background:rgba(255,255,255,.04); color:var(--text-dim); border:1px solid var(--border); }

/* ── Nav badge ── */
.nav-badge { display:inline-flex; align-items:center; justify-content:center; background:var(--danger); color:#fff; border-radius:9px; min-width:16px; height:16px; font-size:9px; font-weight:700; padding:0 4px; margin-left:auto; }

/* ── Entity health badges ── */
.hc-badge { display:inline-block; padding:1px 7px; border-radius:3px; font-size:11px; font-weight:700; letter-spacing:.5px; }
.hc-ok  { background:rgba(0,204,136,.15); color:var(--success); border:1px solid rgba(0,204,136,.3); }
.hc-err { background:rgba(255,77,77,.12);  color:var(--danger);  border:1px solid rgba(255,77,77,.25); }
.hc-nc  { background:rgba(255,255,255,.04); color:var(--text-dim); border:1px solid var(--border); }
.entity-health-row:hover td { background:rgba(94,231,223,.04); }

/* ── Detail panel config inputs ── */
.dp-input { width:100%; box-sizing:border-box; background:var(--panel); border:1px solid var(--border); border-radius:4px; color:var(--text-muted); font-size:12px; padding:6px 10px; outline:none; transition:border-color .15s; }
.dp-input:focus { border-color:var(--primary); }
.dp-input::placeholder { color:var(--text-dim); }

.dp-result-list { display: flex; flex-direction: column; gap: 4px; }
.dp-result-item { padding: 6px 10px; background: var(--panel); border-radius: 4px; font-size: 11px; font-family: monospace; color: var(--text-muted); border-left: 3px solid var(--border); }
.dp-result-item.ok   { color: var(--success); border-left-color: var(--success); }
.dp-result-item.fail { color: var(--danger);  border-left-color: var(--danger); }

/* ── Kanban Board ─────────────────────────────────────────────────────────────── */
.kanban-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.chat-log { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; padding: 10px 12px; background: var(--bg); border-top: 1px solid var(--border); font-size: 12px; }
.chat-msg { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border-radius: 6px; max-width: 85%; }
.chat-msg-admin { align-self: flex-end; background: var(--primary); color: var(--bg); }
.chat-msg-erika { align-self: flex-start; background: var(--surface); border: 1px solid var(--border-light); }
.chat-msg-system { align-self: center; background: var(--card); border: 1px dashed var(--border); font-size: 10px; color: var(--text-muted); }
.chat-msg-meta { font-size: 9px; opacity: 0.7; margin-bottom: 2px; }
.chat-msg-body { line-height: 1.4; }
.header-command { display: flex; align-items: center; gap: 6px; flex: 0 1 380px; min-width: 200px; }
.chat-input { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: 4px; font-size: 12px; }
.chat-input:focus { outline: none; border-color: var(--primary); }
.chat-btn { background: var(--primary); color: var(--bg); border: none; padding: 6px 14px; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chat-btn:hover { opacity: 0.9; }
.console-log { display: flex; flex-direction: column; gap: 2px; max-height: 120px; overflow-y: auto; padding: 8px 12px; background: var(--bg); border-top: 1px solid var(--border); font-family: monospace; font-size: 11px; }
.console-entry { display: flex; align-items: center; gap: 6px; padding: 2px 0; color: var(--text-muted); }
.console-prompt { color: var(--primary); font-weight: 700; }
.console-ok { color: var(--success); }
.console-err { color: var(--danger); }
.console-result { color: var(--text); }
.console-error { color: var(--danger); }
.kanban-filter { background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 4px 10px; border-radius: 4px; font-size: 12px; }
.kanban-count { font-size: 11px; color: var(--text-muted); }
.kanban-board { display: flex; gap: 8px; padding: 12px; flex: 1; min-height: 0; }
.kanban-column { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; max-height: 100%; }
.kanban-col-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--card); border-radius: 6px 6px 0 0; }
.kanban-col-title { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted); }
.kanban-col-count { font-size: 11px; font-weight: 700; color: var(--primary); background: rgba(94,231,223,0.12); padding: 1px 6px; border-radius: 10px; }
.kanban-col-body { flex: 1; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.kanban-card { background: var(--panel); border: 1px solid var(--border-light); border-radius: 4px; padding: 8px; cursor: grab; transition: transform 0.1s, box-shadow 0.1s; }
.kanban-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-card-entity { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 1px 5px; border-radius: 3px; display: inline-block; margin-bottom: 4px; }
.kanban-card-title { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 4px; }
.kanban-card-meta { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--text-dim); }
.kanban-card-pill { padding: 1px 5px; border-radius: 3px; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.pill-p1 { background: rgba(255,68,102,0.15); color: var(--danger); }
.pill-p2 { background: rgba(255,170,51,0.15); color: var(--warning); }
.pill-p3 { background: rgba(68,136,255,0.15); color: var(--info); }
.kanban-col-body.drag-over { background: rgba(94,231,223,0.06); border: 1px dashed var(--primary); }
/* Entity badge color palette — rotates through accent hues */
.entity-infrastructure     { background: rgba(94,231,223,0.15); color: var(--primary); }
.entity-norcal             { background: rgba(100,210,120,0.15); color: #64d278; }
.entity-orion              { background: rgba(138,99,210,0.15); color: #8a63d2; }
.entity-knowledge          { background: rgba(255,170,51,0.15); color: var(--warning); }
.entity-life-wiki          { background: rgba(68,136,255,0.15); color: var(--info); }
/* ENT-ID fallbacks */
.entity-ent-001, .entity-norcal           { background: rgba(100,210,120,0.15); color: #64d278; }
.entity-ent-002, .entity-orion            { background: rgba(138,99,210,0.15); color: #8a63d2; }
.entity-ent-003                           { background: rgba(255,100,150,0.15); color: #ff6496; }
.entity-ent-004                           { background: rgba(51,204,153,0.15); color: #33cc99; }
.entity-ent-005                           { background: rgba(255,200,68,0.15); color: #ffc844; }
.entity-ent-006                           { background: rgba(200,120,255,0.15); color: #c878ff; }
/* Generic fallback for any unrecognized entity */
.kanban-card-entity:not([class*="entity-"]) { background: rgba(150,150,150,0.15); color: var(--text-dim); }

.dp-audit-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.dp-audit-entry { display: flex; align-items: flex-start; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 11px; background: var(--panel); }
.dp-audit-entry:last-child { border-bottom: none; }
.dp-audit-time { font-size: 10px; color: var(--text-dim); white-space: nowrap; min-width: 36px; padding-top: 1px; }
.dp-audit-event { flex: 1; color: var(--text-muted); line-height: 1.4; }

/* ── Mobile Responsive Layer ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  html, body { font-size: 14px; }

  /* Header */
  .header { padding: 6px 10px; gap: 8px; flex-wrap: wrap; }
  .header-left { gap: 8px; }
  .logo-icon { font-size: 18px; }
  .logo-text { font-size: 12px; letter-spacing: 1px; }
  .header-title-main { font-size: 12px; }
  .header-title-sub { font-size: 9px; }
  .header-center { order: 3; width: 100%; justify-content: flex-start; }
  .trust-score-header { min-width: 0; text-align: left; }
  .tsh-value { font-size: 24px; }
  .header-right { gap: 8px; flex-wrap: wrap; }
  .header-metric { gap: 4px; }
  .header-metric-icon { font-size: 14px; }
  .header-metric-label { font-size: 9px; }
  .header-metric-value { font-size: 13px; }
  .vps-badge { font-size: 10px; }

  /* Sidebar hidden on mobile */
  .sidebar { display: none !important; }

  /* App body */
  .app-body { flex-direction: column; }
  .main-content { padding: 6px; gap: 6px; }

  /* Zones */
  .zone-label { padding: 5px 10px; font-size: 10px; }
  .zone-label-icon { font-size: 12px; }
  .zone-label-question { font-size: 9px; }

  /* Erika zone */
  .erika-top-row { flex-direction: column; }
  .erika-status-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 8px; }
  .esc-label { font-size: 8px; }
  .esc-value { font-size: 11px; }
  .alignment-panel { width: 100%; border-left: none; border-top: 1px solid var(--border); padding: 8px; }

  /* Main split */
  .main-split { flex-direction: column; }
  .main-split > .panel + .panel { border-left: none; border-top: 1px solid var(--border); }
  .bottom-split { flex-direction: column; }
  .bottom-split > .panel + .panel { border-left: none; border-top: 1px solid var(--border); }

  /* Chat */
  .header-command { flex: 1 1 100%; order: 5; }
  .chat-input { font-size: 14px; padding: 8px 10px; }
  .chat-btn { padding: 8px 16px; font-size: 14px; }
  .chat-log { max-height: 250px; padding: 8px; }
  .chat-msg { max-width: 92%; padding: 8px 12px; }
  .chat-msg-meta { font-size: 10px; }
  .chat-msg-body { font-size: 14px; }

  /* Panels */
  .panel-body { max-height: 350px; }
  .panel-header { padding: 6px 10px; }
  .panel-header-title { font-size: 10px; }
  .exec-task-row { padding: 8px; font-size: 12px; }
  .exec-task-title { white-space: normal; }
  .exec-task-actions { gap: 6px; }
  .exec-btn { padding: 4px 8px; font-size: 10px; }
  .inbox-item { padding: 10px; }
  .inbox-item-title { font-size: 13px; }
  .inbox-item-meta { font-size: 11px; }
  .inbox-action-btn { padding: 6px 12px; font-size: 12px; }

  /* Detail panel */
  .detail-panel { width: 100%; max-width: 100%; }
  .dp-header { padding: 10px 12px; }
  .dp-title { font-size: 13px; }
  .dp-body { padding: 10px 12px; }
  .dp-meta-grid { grid-template-columns: 1fr; }
  .dp-btn { padding: 10px 14px; font-size: 13px; }
  .dp-input { font-size: 14px; padding: 8px 10px; }
  .dp-source-option { padding: 12px; font-size: 13px; }

  /* Kanban */
  .kanban-board { flex-direction: column; padding: 8px; }
  .kanban-column { max-height: 60vh; }
  .kanban-card { padding: 10px; }
  .kanban-card-title { font-size: 13px; }
  .kanban-card-meta { font-size: 10px; }
  .kanban-card-entity { font-size: 9px; }
  .kanban-card-pill { font-size: 10px; }

  /* Data tables */
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 5px 6px; }

  /* Footer */
  .footer { padding: 4px 10px; font-size: 9px; flex-wrap: wrap; gap: 4px; }
  .footer-left, .footer-center, .footer-right { flex: 1; min-width: 0; }
  .footer-by { font-size: 8px; }

  /* Mobile nav bar */
  .mobile-nav { display: flex !important; }
  .main-content { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

  /* Zone collapse on mobile — keep label sticky */
  .zone-collapsed { border-radius: 6px; margin-bottom: 6px; }
  .zone-collapsed .zone-label { padding: 8px 10px; font-size: 11px; }
}

/* Mobile nav bar (hidden on desktop) */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; background: var(--surface); border-top: 1px solid var(--border); justify-content: space-around; align-items: center; padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
.mn-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; cursor: pointer; color: var(--text-muted); font-size: 9px; font-weight: 600; transition: all 0.15s; border: none; background: none; flex: 1; }
.mn-item:hover { color: var(--text); }
.mn-item.active { color: var(--primary); }
.mn-icon { font-size: 18px; line-height: 1; }
.mn-label { font-size: 8px; letter-spacing: 0.3px; }

/* Mobile overflow menu */
.mn-more-sheet { display: none; position: fixed; bottom: 56px; left: 0; right: 0; z-index: 89; background: var(--surface); border-top: 1px solid var(--border); padding: 8px 0; box-shadow: 0 -4px 16px rgba(0,0,0,0.4); }
.mn-more-sheet.open { display: block; }
.mn-more-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--text-muted); font-size: 13px; cursor: pointer; }
.mn-more-item:hover { background: rgba(94,231,223,0.08); color: var(--text); }
.mn-more-item.active { color: var(--primary); }
.mn-more-icon { font-size: 16px; }

/* Touch-friendly tap targets */
.touch-large { min-height: 44px; min-width: 44px; }

/* Hide mobile nav when detail panel is open */
.detail-panel.open ~ .mobile-nav,
.detail-panel.open ~ * .mobile-nav { display: none !important; }

/* ── v86: Erika Workflow Manager, Operations zone, global infra ───────── */
#erika-section { overflow-y: auto; }

.erika-ewm {
    margin-top: 12px; padding: 10px 12px;
    border: 1px solid rgba(127,127,127,.18); border-radius: 8px;
    background: rgba(127,127,127,.05);
}
.ewm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ewm-topology { font-size: 12px; font-weight: 600; color: var(--muted, #9aa6b2); letter-spacing: .02em; }
.ewm-toggle {
    font-size: 10px; font-family: inherit; letter-spacing: .04em;
    background: rgba(127,127,127,.12); color: var(--muted, #9aa6b2);
    border: 1px solid rgba(127,127,127,.2); border-radius: 5px; padding: 3px 8px; cursor: pointer;
}
.ewm-toggle:hover { background: rgba(127,127,127,.2); }
.ewm-pipeline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ewm-cell { display: flex; flex-direction: column; min-width: 90px; font-size: 13px; }
.ewm-k { font-size: 9px; letter-spacing: .06em; color: var(--muted, #9aa6b2); margin-bottom: 2px; }
.ewm-sub { font-size: 11px; color: var(--muted, #9aa6b2); }
.ewm-arrow { color: var(--muted, #9aa6b2); opacity: .5; }
.erika-pipeline-wrap { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(127,127,127,.15); }
.ewm-row { font-size: 12px; margin: 3px 0; }
.ewm-row .ewm-k { display: inline-block; min-width: 130px; }
.ewm-assessment { font-size: 11px; color: var(--muted, #9aa6b2); white-space: pre-wrap; margin-top: 6px; max-height: 120px; overflow-y: auto; }
.ewm-timeline { font-size: 11px; margin-top: 6px; }

.command-history-panel { display: none; margin-top: 8px; padding: 8px 10px; font-size: 12px;
    border: 1px solid rgba(127,127,127,.18); border-radius: 8px; background: rgba(127,127,127,.05);
    max-height: 200px; overflow-y: auto; }
.command-history-panel.open { display: block; }

/* Operations zone */
.entity-ribbon { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ops-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.ops-split + .ops-split { margin-top: 12px; }
.ops-sub { font-size: 9px; letter-spacing: .08em; color: var(--muted, #9aa6b2); margin: 10px 0 4px; }
.ops-sub:first-child { margin-top: 0; }
.ops-mini { font-size: 11px; color: var(--muted, #9aa6b2); margin-top: 6px; }

/* Global infra: status bar */
.status-bar { position: fixed; bottom: 0; right: 0; z-index: 900;
    display: flex; align-items: center; gap: 12px;
    padding: 4px 12px; font-size: 11px; color: var(--muted, #9aa6b2);
    background: rgba(20,24,30,.92); border-top-left-radius: 8px;
    border: 1px solid rgba(127,127,127,.2); border-right: none; border-bottom: none; }
.status-bar-right { display: flex; align-items: center; gap: 8px; }
.vps-push-indicator { font-size: 11px; }
.force-pull-btn { font-family: inherit; font-size: 10px; cursor: pointer;
    background: rgba(127,127,127,.15); color: var(--muted, #9aa6b2);
    border: 1px solid rgba(127,127,127,.25); border-radius: 5px; padding: 2px 8px; }
.force-pull-btn:hover { background: rgba(127,127,127,.28); }

/* Focus banner */
.focus-banner { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 950;
    display: flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 12px;
    background: rgba(20,24,30,.95); border: 1px solid rgba(127,127,127,.25); border-radius: 999px; }
.focus-banner-label { font-size: 9px; letter-spacing: .08em; color: var(--muted, #9aa6b2); }
.focus-clear { font-family: inherit; font-size: 10px; cursor: pointer; background: none;
    color: var(--muted, #9aa6b2); border: 1px solid rgba(127,127,127,.3); border-radius: 5px; padding: 1px 6px; }

/* Pinned zone */
.pinned-zone { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.pinned-zone-label { font-size: 9px; letter-spacing: .08em; color: var(--muted, #9aa6b2); width: 100%; }

/* Toast stack */
.toast-stack { position: fixed; bottom: 36px; right: 12px; z-index: 1000;
    display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast-stack > * { background: rgba(20,24,30,.96); color: #e6edf3; font-size: 12px;
    padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(127,127,127,.25);
    box-shadow: 0 4px 14px rgba(0,0,0,.4); }

/* Card context menu */
.card-ctx-menu { position: fixed; z-index: 1100; min-width: 140px;
    background: rgba(20,24,30,.98); border: 1px solid rgba(127,127,127,.25); border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,.4); overflow: hidden; }
.card-ctx-item { font-size: 12px; padding: 8px 12px; cursor: pointer; }
.card-ctx-item:hover { background: rgba(127,127,127,.18); }

/* Gear / preset panel */
.gear-overlay { position: fixed; inset: 0; z-index: 1190; background: rgba(0,0,0,.4); display: none; }
.gear-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1200; width: 280px;
    background: rgba(18,22,28,.98); border-left: 1px solid rgba(127,127,127,.25);
    padding: 16px; transform: translateX(110%); transition: transform .2s ease; }
.gear-panel.open { transform: translateX(0); }
.gear-panel-head { display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; letter-spacing: .06em; color: var(--muted, #9aa6b2); margin-bottom: 14px; }
.gear-close { background: none; border: none; color: var(--muted, #9aa6b2); cursor: pointer; font-size: 14px; }
.gear-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.gear-row button { font-family: inherit; font-size: 12px; cursor: pointer;
    background: rgba(127,127,127,.12); color: inherit;
    border: 1px solid rgba(127,127,127,.25); border-radius: 6px; padding: 6px 12px; }
.gear-row button:hover { background: rgba(127,127,127,.24); }

/* Dropdown content pane */
.main-content-pane { position: fixed; inset: 0; z-index: 1150; overflow: auto;
    background: rgba(12,15,20,.98); padding: 16px; }
.main-pane-head { display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; letter-spacing: .04em; color: var(--muted, #9aa6b2); margin-bottom: 12px; }
.main-pane-close { background: none; border: none; color: var(--muted, #9aa6b2); cursor: pointer; font-size: 16px; }
