/* ============================================================================
   BDP Command Center - "Command Deck" design system
   Premium dark UI: Bricolage Grotesque (display) + Hanken Grotesk (body) +
   JetBrains Mono (data). Layered glass, grain, aurora, orchestrated motion.
   All class names preserved for app.js. Themes via [data-theme].
   ============================================================================ */
:root {
  --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif;
  --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --bg: #05070b;
  --bg-tint1: rgba(62,224,198,0.07);
  --bg-tint2: rgba(98,184,255,0.06);
  --panel: rgba(17,22,31,0.55);
  --panel-2: rgba(22,28,39,0.7);
  --panel-solid: #0a0e15;
  --border: rgba(150,170,200,0.10);
  --border-bright: rgba(120,210,205,0.30);
  --hairline: rgba(255,255,255,0.06);
  --text: #eef2f8;
  --muted: #97a4b6;
  --faint: #5c6878;
  --accentA: #3ee0c6;   /* mint */
  --accentB: #62b8ff;   /* azure */
  --cyan: #45d6d0; --green: #46e29a; --violet: #9d8cff; --amber: #ffc46b; --rose: #ff6f8d;
  --good: #46e29a; --watch: #ffc46b; --risk: #ff6f8d;
  --shadow: 0 16px 50px -12px rgba(0,0,0,0.65);
  --shadow-sm: 0 6px 20px -8px rgba(0,0,0,0.5);
  --glow: 0 0 0 1px rgba(120,210,205,0.06), 0 18px 60px -20px rgba(62,224,198,0.18);
  --r: 16px;
}
body[data-theme="brocco-emerald"] {
  --bg: #03110d; --bg-tint1: rgba(52,224,161,0.10); --bg-tint2: rgba(123,240,196,0.06);
  --panel: rgba(11,30,23,0.55); --panel-2: rgba(14,36,27,0.7); --panel-solid: #07150f;
  --border: rgba(90,200,150,0.12); --border-bright: rgba(80,230,170,0.34);
  --accentA: #34e0a1; --accentB: #8ef0c4; --cyan: #34e0a1; --green: #46e29a; --violet: #7bf0c4;
  --glow: 0 0 0 1px rgba(80,230,170,0.07), 0 18px 60px -20px rgba(52,224,161,0.2);
}
body[data-theme="midnight"] {
  --bg: #050813; --bg-tint1: rgba(106,166,255,0.10); --bg-tint2: rgba(157,140,255,0.08);
  --panel: rgba(17,23,42,0.6); --panel-2: rgba(20,27,50,0.72); --panel-solid: #0a1024;
  --border: rgba(120,140,220,0.13); --border-bright: rgba(130,160,255,0.34);
  --accentA: #6aa6ff; --accentB: #b48cff; --cyan: #6aa6ff; --violet: #b48cff;
  --glow: 0 0 0 1px rgba(130,160,255,0.07), 0 18px 60px -20px rgba(106,166,255,0.22);
}
body[data-theme="light-glass"] {
  --bg: #eef1f6; --bg-tint1: rgba(26,166,196,0.10); --bg-tint2: rgba(109,84,224,0.07);
  --panel: rgba(255,255,255,0.66); --panel-2: rgba(255,255,255,0.8); --panel-solid: #ffffff;
  --border: rgba(20,30,60,0.10); --border-bright: rgba(40,120,150,0.32); --hairline: rgba(20,30,60,0.06);
  --text: #131822; --muted: #51607a; --faint: #93a0b4;
  --accentA: #12b5a0; --accentB: #2b8bd6; --cyan: #1aa6c4; --green: #16a861; --violet: #6d54e0; --amber: #c9860a; --rose: #d6396b;
  --good: #16a861; --watch: #c9860a; --risk: #d6396b;
  --shadow: 0 18px 50px -16px rgba(40,60,110,0.18); --shadow-sm: 0 8px 24px -10px rgba(40,60,110,0.14);
  --glow: 0 0 0 1px rgba(40,120,150,0.08), 0 18px 50px -22px rgba(26,166,196,0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text); min-height: 100vh; padding-bottom: 90px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}
/* atmosphere */
.site-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--bg) url("assets/site-bg.png") center center / cover fixed; }
.site-bg::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, rgba(5,7,11,0.45), rgba(5,7,11,0.78) 100%); }
body[data-theme="light-glass"] .site-bg { display: none; }
.aurora { position: fixed; inset: -20% -10% auto -10%; height: 70vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 15% 0%, var(--bg-tint1), transparent 60%),
    radial-gradient(55% 60% at 92% 8%, var(--bg-tint2), transparent 55%);
  filter: blur(8px); animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(0,-2%,0) scale(1.06); } }
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 30px; position: relative; z-index: 2; }

/* ---------- header ---------- */
header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px) saturate(1.4);
  background: linear-gradient(180deg, rgba(5,7,11,0.85), rgba(5,7,11,0.35)); border-bottom: 1px solid var(--hairline); }
header::after { content:''; position:absolute; left:0; right:0; bottom:-1px; height:1px;
  background: linear-gradient(90deg, transparent, var(--accentA), var(--accentB), transparent); opacity:.5; }
.head-inner { display: flex; align-items: center; gap: 20px; padding: 15px 30px; max-width: 1320px; margin: 0 auto; flex-wrap: wrap; position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 44px; height: 44px; border-radius: 13px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accentA), var(--accentB)); box-shadow: 0 0 0 1px var(--hairline), 0 8px 24px -8px rgba(62,224,198,0.5); position: relative; }
.logo::after { content:''; position:absolute; inset:0; background: radial-gradient(120% 80% at 30% 0%, rgba(255,255,255,0.25), transparent 60%); }
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; background: #070b11; position: relative; z-index: 1; }
.logo.logo-fallback::before { content: "B"; font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #06080c; position: relative; z-index: 1; }
.brand h1 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.brand .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-weight: 500; }
.head-spacer { flex: 1; }
.navbtns { display: flex; gap: 4px; }
.navbtns a { font-size: 12px; color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 9px; border: 1px solid transparent; font-weight: 600; transition: 0.18s; }
.navbtns a:hover { color: var(--text); background: var(--panel); border-color: var(--border); }
.hdr-btn { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 7px 12px; cursor: pointer; transition: 0.18s; }
.hdr-btn:hover { color: var(--text); border-color: var(--border-bright); }
.theme-pick select { font-family: var(--font-mono); background: var(--panel); color: var(--muted); border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; font-size: 11px; outline: none; cursor: pointer; }
.clock { text-align: right; }
.clock .t { font-family: var(--font-mono); font-size: 19px; font-weight: 600; letter-spacing: 0.04em; }
.clock .d { font-size: 11px; color: var(--muted); font-weight: 500; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: blink 2.4s infinite; display: inline-block; margin-right: 6px; }
.pulse.off { background: var(--faint); box-shadow: none; animation: none; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.qbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 0 2px; }
.qlink { font-size: 12px; color: var(--muted); text-decoration: none; border: 1px solid var(--border); padding: 7px 13px; border-radius: 10px; background: var(--panel); transition: 0.18s; cursor: pointer; font-weight: 600; backdrop-filter: blur(8px); }
.qlink:hover { color: var(--text); border-color: var(--border-bright); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* section titles */
.sec-title { font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; text-transform: none; color: var(--text); margin: 44px 0 16px; font-weight: 700; display: flex; align-items: center; gap: 14px; }
.sec-title .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.mini-btn { font-family: var(--font-body); background: linear-gradient(135deg, var(--accentA), var(--accentB)); color: #06080c; border: none; border-radius: 10px; padding: 8px 15px; font-size: 12px; font-weight: 700; cursor: pointer; letter-spacing: 0; box-shadow: 0 6px 18px -8px rgba(62,224,198,0.6); transition: 0.18s; }
.mini-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.micro-lbl { font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.14em; margin: 14px 0 8px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 26px; }
.kpi { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: var(--r); padding: 17px 17px 15px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); transition: 0.25s; }
.kpi::before { content:''; position:absolute; top:0; left:14px; right:14px; height:2px; border-radius:2px; background: var(--accent, var(--accentA)); opacity: 0.9; }
.kpi::after { content:''; position:absolute; inset:0; border-top: 1px solid rgba(255,255,255,0.05); border-radius: var(--r); pointer-events:none; }
.kpi:hover { transform: translateY(-3px); border-color: var(--border-bright); box-shadow: var(--glow); }
.kpi .label { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.kpi .value { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-top: 10px; letter-spacing: -0.03em; line-height: 1; }
.kpi .sub { font-size: 11px; color: var(--faint); margin-top: 7px; font-weight: 500; }
.kpi .trend { position: absolute; top: 15px; right: 15px; font-size: 11px; }
.trend.up { color: var(--green); } .trend.down { color: var(--rose); } .trend.flat { color: var(--faint); }

/* ---------- pulse ---------- */
.pulse-strip { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 14px; padding: 15px 20px;
  background: linear-gradient(100deg, rgba(62,224,198,0.06), rgba(98,184,255,0.04)); border: 1px solid var(--border); border-radius: var(--r); backdrop-filter: blur(12px); position: relative; overflow: hidden; }
.pulse-strip::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background: linear-gradient(180deg, var(--accentA), var(--accentB)); }
.pulse-strip .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: blink 2s infinite; }
.pulse-strip .pl-lbl { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.pulse-strip .pl-item { display: flex; flex-direction: column; gap: 3px; }
.pulse-strip .pl-item .v { font-family: var(--font-mono); font-size: 17px; font-weight: 700; }
.pulse-strip .pl-item .k { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.pulse-strip .spark { display: flex; align-items: flex-end; gap: 2px; height: 32px; }
.pulse-strip .spark > div { width: 4px; background: linear-gradient(180deg, var(--accentA), var(--accentB)); border-radius: 2px; min-height: 2px; opacity: 0.85; }
.pulse-strip .pl-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pulse-strip a.rss { font-family: var(--font-mono); font-size: 10px; color: var(--amber); text-decoration: none; border: 1px solid rgba(255,196,107,0.3); padding: 6px 12px; border-radius: 9px; letter-spacing: 0.06em; }
.pulse-strip a.rss:hover { background: rgba(255,196,107,0.1); }
.pulse-strip .stamp { font-size: 10px; color: var(--faint); }

/* ---------- panels ---------- */
.grid2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; margin-top: 14px; }
.panel { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); position: relative; }
.panel::after { content:''; position:absolute; inset:0; border-top:1px solid rgba(255,255,255,0.05); border-radius: var(--r); pointer-events:none; }
.panel h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 9px; letter-spacing: -0.01em; }
.panel h3 .ic { font-size: 15px; }
.panel h3 .right { margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--faint); }

.goal { margin-bottom: 18px; } .goal:last-child { margin-bottom: 0; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.goal-title { font-size: 13.5px; font-weight: 600; }
.goal-pct { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--accentA); }
.bar { height: 6px; background: rgba(127,127,127,0.13); border-radius: 6px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accentA), var(--accentB)); box-shadow: 0 0 12px -2px var(--accentA); transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.goal-note { font-size: 11.5px; color: var(--faint); margin-top: 6px; line-height: 1.45; }

.focus-item { display: flex; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.focus-item:last-child { border-bottom: none; }
.pnum { width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg, rgba(62,224,198,0.18), rgba(98,184,255,0.12)); color: var(--accentA); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; flex-shrink: 0; border: 1px solid var(--border); }
.focus-body { flex: 1; }
.focus-text { font-size: 13px; line-height: 1.5; }
.focus-meta { font-family: var(--font-mono); font-size: 10px; color: var(--faint); margin-top: 4px; letter-spacing: 0.04em; }
.lane-tag { display: inline-block; font-family: var(--font-mono); font-size: 9px; padding: 2px 7px; border-radius: 5px; background: rgba(157,140,255,0.14); color: var(--violet); margin-left: 6px; letter-spacing: 0.04em; vertical-align: middle; }

/* revenue */
.rev-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 6px; }
.rev-kpi { background: rgba(70,226,154,0.06); border: 1px solid rgba(70,226,154,0.16); border-radius: 13px; padding: 14px; }
.rev-kpi .k { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.rev-kpi .v { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--green); letter-spacing: -0.03em; }
.rev-kpi .s { font-size: 10px; color: var(--faint); margin-top: 4px; }
.lane-bars { margin-bottom: 6px; }
.lane-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.lane-row .nm { width: 92px; color: var(--muted); flex-shrink: 0; font-weight: 500; }
.lane-row .track { flex: 1; height: 7px; background: rgba(127,127,127,0.12); border-radius: 5px; overflow: hidden; }
.lane-row .track > div { height: 100%; background: linear-gradient(90deg, var(--green), var(--accentA)); border-radius: 5px; }
.lane-row .amt { width: 78px; text-align: right; font-family: var(--font-mono); font-weight: 600; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 12px; }
table.ledger th { text-align: left; color: var(--faint); font-family: var(--font-mono); font-weight: 500; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; padding: 7px 8px; border-bottom: 1px solid var(--hairline); }
table.ledger td { padding: 9px 8px; border-bottom: 1px solid var(--hairline); }
table.ledger tr:last-child td { border-bottom: none; }
table.ledger .amt { text-align: right; font-family: var(--font-mono); font-weight: 700; color: var(--green); white-space: nowrap; }
.mini-months { display: flex; align-items: flex-end; gap: 7px; height: 64px; margin: 4px 0 16px; }
.mini-months .mcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.mini-months .mbar { width: 100%; background: linear-gradient(180deg, var(--accentA), var(--accentB)); border-radius: 4px 4px 0 0; min-height: 2px; opacity: 0.9; }
.mini-months .mlbl { font-family: var(--font-mono); font-size: 9px; color: var(--faint); }

/* meetings */
.mt-head { display: flex; gap: 14px; margin-bottom: 18px; align-items: stretch; }
.gauge { flex-shrink: 0; text-align: center; }
.gauge .ring { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accentA) calc(var(--p) * 1%), rgba(127,127,127,0.13) 0); position: relative; box-shadow: 0 0 24px -8px var(--accentA); }
.gauge .ring::after { content:''; position: absolute; inset: 8px; border-radius: 50%; background: var(--panel-solid); }
.gauge .ring .num { position: relative; z-index: 1; font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.gauge .cap { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); margin-top: 8px; letter-spacing: 0.04em; }
.mt-stats { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mt-stat { background: rgba(62,224,198,0.05); border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; }
.mt-stat .k { font-family: var(--font-mono); font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.mt-stat .v { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-top: 4px; }
.mt-item { display: flex; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--hairline); align-items: flex-start; }
.mt-item:last-child { border-bottom: none; }
.mt-date { width: 50px; flex-shrink: 0; text-align: center; }
.mt-date .dd { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1; }
.mt-date .mo { font-family: var(--font-mono); font-size: 9px; color: var(--faint); text-transform: uppercase; }
.mt-date .tm { font-family: var(--font-mono); font-size: 9.5px; color: var(--accentA); margin-top: 3px; }
.mt-body { flex: 1; }
.mt-title { font-size: 13px; font-weight: 600; }
.mt-meta { font-size: 11px; color: var(--faint); margin-top: 3px; }
.badge { font-family: var(--font-mono); font-size: 8.5px; padding: 2px 6px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.b-confirmed { background: rgba(70,226,154,0.15); color: var(--good); }
.b-requested { background: rgba(255,196,107,0.15); color: var(--amber); }
.b-target { background: rgba(150,160,175,0.13); color: var(--muted); }
.booking { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.book-link { font-size: 11.5px; text-decoration: none; color: var(--accentA); border: 1px solid var(--border-bright); padding: 7px 13px; border-radius: 10px; transition: 0.18s; cursor: pointer; font-weight: 600; }
.book-link:hover { background: rgba(62,224,198,0.1); transform: translateY(-1px); }
.pipe-row { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 12px; }
.pipe-row:last-child { border-bottom: none; }
.pipe-row .pl { width: 86px; flex-shrink: 0; }
.pipe-row .pw { flex: 1; }
.pipe-row .pw b { font-weight: 600; } .pipe-row .pw small { color: var(--faint); display: block; margin-top: 2px; line-height: 1.4; }

/* filters + cards */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 20px; align-items: center; }
.tab { font-size: 12.5px; padding: 8px 15px; border-radius: 11px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); cursor: pointer; transition: 0.18s; font-weight: 600; backdrop-filter: blur(8px); }
.tab:hover { color: var(--text); border-color: var(--border-bright); }
.tab.active { background: linear-gradient(135deg, rgba(62,224,198,0.16), rgba(98,184,255,0.12)); color: var(--text); border-color: var(--border-bright); }
.tab .count { font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); margin-left: 6px; }
.search { margin-left: auto; }
.search input { font-family: var(--font-body); background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 9px 15px; color: var(--text); font-size: 13px; width: 220px; outline: none; transition: 0.2s; }
.search input:focus { border-color: var(--border-bright); width: 270px; box-shadow: var(--shadow-sm); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 17px; }
.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: var(--r); padding: 19px; box-shadow: var(--shadow-sm); transition: transform 0.22s cubic-bezier(.2,.7,.2,1), box-shadow 0.22s, border-color 0.22s; position: relative; display: flex; flex-direction: column; backdrop-filter: blur(12px); overflow: hidden; }
.card::before { content:''; position:absolute; inset:0; border-top:1px solid rgba(255,255,255,0.05); border-radius: var(--r); pointer-events:none; }
.card:hover { transform: translateY(-4px); border-color: var(--border-bright); box-shadow: var(--glow); }
.card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 11px; }
.card-title { font-family: var(--font-display); font-size: 16.5px; font-weight: 700; letter-spacing: -0.02em; flex: 1; }
.health-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; cursor: help; }
.health-good { background: var(--good); box-shadow: 0 0 10px var(--good); }
.health-watch { background: var(--watch); box-shadow: 0 0 10px var(--watch); }
.health-risk { background: var(--risk); box-shadow: 0 0 10px var(--risk); }
.health-unknown { background: var(--faint); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 13px; }
.pill { font-family: var(--font-mono); font-size: 9px; padding: 4px 9px; border-radius: 6px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.pill-lane { background: rgba(150,165,190,0.14); color: var(--muted); }
.st-live { background: rgba(70,226,154,0.16); color: var(--good); }
.st-active { background: rgba(69,214,208,0.16); color: var(--cyan); }
.st-pending { background: rgba(255,196,107,0.16); color: var(--amber); }
.st-parked, .st-paused, .st-dormant { background: rgba(150,160,175,0.14); color: var(--muted); }
.blurb { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 13px; }
.rev { font-size: 11.5px; color: var(--green); margin: -2px 0 13px; line-height: 1.5; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 15px; margin-bottom: 15px; }
.metric { border-left: 2px solid var(--border-bright); padding-left: 10px; }
.metric .mk { font-family: var(--font-mono); font-size: 9px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }
.metric .mv { font-size: 13px; font-weight: 600; margin-top: 2px; }
.next { background: linear-gradient(135deg, rgba(157,140,255,0.08), rgba(98,184,255,0.05)); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; margin-bottom: 13px; }
.next .nk { font-family: var(--font-mono); font-size: 9px; color: var(--violet); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 4px; }
.next .nv { font-size: 12px; line-height: 1.5; color: var(--text); }
.money { background: linear-gradient(135deg, rgba(70,226,154,0.1), rgba(62,224,198,0.05)); border: 1px solid rgba(70,226,154,0.22); border-radius: 11px; padding: 9px 12px; margin-bottom: 13px; font-size: 12px; line-height: 1.5; color: #b9f5d6; }
.money .mlbl2 { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); font-weight: 700; margin-right: 6px; }
.flag { background: rgba(255,196,107,0.07); border: 1px solid rgba(255,196,107,0.2); border-radius: 11px; padding: 9px 12px; margin-bottom: 13px; font-size: 11px; line-height: 1.5; color: var(--amber); }
.card-links { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.clink { font-size: 11px; color: var(--accentA); text-decoration: none; border: 1px solid var(--border); padding: 6px 11px; border-radius: 8px; transition: 0.18s; cursor: pointer; font-weight: 500; }
.clink:hover { background: rgba(62,224,198,0.1); border-color: var(--border-bright); }
.clink.path { color: var(--muted); }
.ctrl-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hairline); }
.ctrl-btn { font-size: 11px; font-weight: 600; border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 9px; padding: 6px 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: 0.18s; }
.ctrl-btn:hover { background: rgba(62,224,198,0.1); border-color: var(--border-bright); transform: translateY(-1px); }
.updated { font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); margin-top: 10px; letter-spacing: 0.04em; }

footer { text-align: center; color: var(--faint); font-size: 11px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); letter-spacing: 0.03em; }
.hidden { display: none !important; }
.empty { color: var(--faint); font-size: 12.5px; padding: 8px 0; line-height: 1.5; }
code { font-family: var(--font-mono); background: rgba(127,127,127,0.13); padding: 2px 6px; border-radius: 5px; color: var(--accentA); font-size: 11px; }

/* ---------- Jarvis ---------- */
.jarvis-fab { position: fixed; bottom: 26px; right: 26px; z-index: 150; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accentA), var(--accentB)); color: #06080c; font-family: var(--font-display); font-weight: 700;
  font-size: 13px; padding: 14px 20px; border-radius: 32px; box-shadow: 0 14px 40px -10px rgba(62,224,198,0.6);
  display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.jarvis-fab:hover { transform: translateY(-2px) scale(1.02); }
.jarvis-panel { position: fixed; bottom: 26px; right: 26px; z-index: 151; width: 400px; max-width: calc(100vw - 36px);
  height: 580px; max-height: calc(100vh - 52px); background: var(--panel-solid); border: 1px solid var(--border-bright);
  border-radius: 20px; box-shadow: 0 30px 90px -20px rgba(0,0,0,0.7); display: none; flex-direction: column; overflow: hidden; backdrop-filter: blur(20px); }
.jarvis-panel.open { display: flex; animation: jpop .3s cubic-bezier(.2,.8,.2,1); }
@keyframes jpop { from { opacity:0; transform: translateY(16px) scale(.98); } to { opacity:1; transform:none; } }
.jp-head { display: flex; align-items: center; gap: 9px; padding: 15px 17px; border-bottom: 1px solid var(--hairline);
  background: linear-gradient(100deg, rgba(62,224,198,0.08), rgba(98,184,255,0.05)); }
.jp-title { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; flex: 1; }
.jp-icon { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 9px; width: 32px; height: 32px; cursor: pointer; font-size: 14px; display: grid; place-items: center; transition: 0.16s; }
.jp-icon:hover { color: var(--text); border-color: var(--border-bright); }
.jp-icon.active { background: rgba(62,224,198,0.12); color: var(--accentA); border-color: var(--border-bright); }
.jp-msgs { flex: 1; overflow-y: auto; padding: 17px; display: flex; flex-direction: column; gap: 11px; }
.jp-msg { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; animation: jpop .25s ease; }
.jp-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--accentA), var(--accentB)); color: #06080c; border-bottom-right-radius: 4px; font-weight: 600; }
.jp-msg.bot { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.jp-msg.bot strong { color: var(--accentA); font-weight: 700; }
.jp-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 17px 14px; }
.jp-chip { font-family: var(--font-mono); font-size: 10.5px; padding: 6px 11px; border-radius: 20px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); cursor: pointer; transition: 0.16s; }
.jp-chip:hover { color: var(--text); border-color: var(--border-bright); }
.jp-input { display: flex; gap: 8px; padding: 13px; border-top: 1px solid var(--hairline); align-items: center; }
.jp-input input { flex: 1; font-family: var(--font-body); background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; color: var(--text); font-size: 13px; outline: none; }
.jp-input input:focus { border-color: var(--border-bright); }
.jp-send { background: linear-gradient(135deg, var(--accentA), var(--accentB)); border: none; color: #06080c; width: 40px; height: 40px; border-radius: 11px; cursor: pointer; font-size: 15px; transition: 0.16s; }
.jp-send:hover { filter: brightness(1.08); }
.jp-mic-on { background: var(--risk) !important; color: #fff !important; border-color: var(--risk) !important; animation: blink 1.1s infinite; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(2,4,8,0.66); backdrop-filter: blur(6px); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 64px 20px; overflow-y: auto; }
.modal-bg.open { display: flex; }
.modal { background: var(--panel-solid); border: 1px solid var(--border-bright); border-radius: 18px; width: 100%; max-width: 640px; box-shadow: 0 30px 90px -20px rgba(0,0,0,0.7); animation: jpop .28s cubic-bezier(.2,.8,.2,1); }
.modal-head { display: flex; align-items: center; padding: 19px 23px; border-bottom: 1px solid var(--hairline); }
.modal-head h2 { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 24px; line-height: 1; background: none; border: none; }
.modal-body { padding: 22px 23px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font-family: var(--font-body); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; color: var(--text); font-size: 13px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--border-bright); }
.field textarea { resize: vertical; min-height: 64px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.btn { font-family: var(--font-body); border: 1px solid var(--border-bright); background: var(--panel); color: var(--text); border-radius: 10px; padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.16s; }
.btn-primary { background: linear-gradient(135deg, var(--accentA), var(--accentB)); color: #06080c; border: none; }
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.fb-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 11px; }
.fb-item { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--hairline); font-size: 12.5px; }
.fb-item:last-child { border-bottom: none; }
.fb-item .nm { flex: 1; cursor: pointer; }
.fb-item .nm.dir { color: var(--accentA); font-weight: 600; }
.fb-item .nm.dir::before { content: "\1F4C1  "; }
.fb-run { font-family: var(--font-mono); font-size: 10px; font-weight: 700; background: linear-gradient(135deg, var(--accentA), var(--accentB)); color: #06080c; border: none; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.fb-open { font-family: var(--font-mono); font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer; background: none; }
.console { background: #04060a; border: 1px solid var(--border); border-radius: 11px; padding: 13px; font-family: var(--font-mono); font-size: 11.5px; color: #b9c6d6; white-space: pre-wrap; max-height: 280px; overflow-y: auto; margin-top: 15px; line-height: 1.5; }
.console .ok { color: var(--green); } .console .err { color: var(--rose); }
.banner { font-size: 11.5px; padding: 9px 13px; border-radius: 9px; margin-bottom: 15px; line-height: 1.5; }
.banner.warn { background: rgba(255,196,107,0.1); border: 1px solid rgba(255,196,107,0.25); color: var(--amber); }
.banner.info { background: rgba(62,224,198,0.07); border: 1px solid var(--border); color: var(--muted); }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--panel-solid); border: 1px solid var(--border-bright); border-radius: 12px; padding: 13px 22px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: 0.28s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--green); } .toast.err { border-color: var(--rose); }

.mode-pill { font-family: var(--font-mono); font-size: 9.5px; padding: 3px 9px; border-radius: 6px; font-weight: 700; letter-spacing: 0.06em; }
.mode-live { background: rgba(70,226,154,0.15); color: var(--green); }
.mode-static { background: rgba(150,160,175,0.14); color: var(--muted); }

/* ---------- orchestrated load motion (first paint only) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
body.first-load .kpi, body.first-load .pulse-strip, body.first-load .grid2 > .panel,
body.first-load .sec-title, body.first-load .card { opacity: 0; animation: rise 0.7s cubic-bezier(.2,.7,.2,1) forwards; }
body.first-load .kpi:nth-child(1){animation-delay:.04s} body.first-load .kpi:nth-child(2){animation-delay:.08s}
body.first-load .kpi:nth-child(3){animation-delay:.12s} body.first-load .kpi:nth-child(4){animation-delay:.16s}
body.first-load .kpi:nth-child(5){animation-delay:.2s} body.first-load .kpi:nth-child(6){animation-delay:.24s}
body.first-load .pulse-strip{animation-delay:.28s}
body.first-load .grid2 > .panel:nth-child(1){animation-delay:.32s} body.first-load .grid2 > .panel:nth-child(2){animation-delay:.38s}
body.first-load .card:nth-child(1){animation-delay:.06s} body.first-load .card:nth-child(2){animation-delay:.1s}
body.first-load .card:nth-child(3){animation-delay:.14s} body.first-load .card:nth-child(4){animation-delay:.18s}
body.first-load .card:nth-child(5){animation-delay:.22s} body.first-load .card:nth-child(6){animation-delay:.26s}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ====================== HERO / COMMAND BRIDGE ====================== */
.hero { position: relative; width: 100%; height: 92vh; min-height: 620px; overflow: hidden; display: flex; align-items: center;
  border-bottom: 1px solid var(--hairline); }
.hero-bg { position: absolute; inset: 0; z-index: 0; background: #04060a url("assets/hero-bg-1.png") center 42% / cover no-repeat;
  animation: kenburns 40s ease-in-out infinite alternate; will-change: transform; }
@keyframes kenburns { from { transform: scale(1.05) translate3d(0,0,0); } to { transform: scale(1.16) translate3d(-1.5%,-2%,0); } }
#constellation { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.hero-grid-fade { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5,7,11,0.2) 0%, transparent 30%, transparent 60%, var(--bg) 100%),
    radial-gradient(80% 60% at 50% 46%, transparent 40%, rgba(5,7,11,0.5) 100%); }
.hero-inner { position: relative; z-index: 3; max-width: 1320px; width: 100%; margin: 0 auto; padding: 0 30px; pointer-events: none; }
.hero-inner > * { pointer-events: auto; }
.hero-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.28em; color: var(--accentA); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; opacity: 0; animation: heroIn .8s ease forwards .2s; }
.hk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accentA); box-shadow: 0 0 14px var(--accentA); animation: blink 2s infinite; }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 7.4vw, 104px); line-height: 0.94; letter-spacing: -0.04em;
  max-width: 16ch; opacity: 0; animation: heroIn 1s cubic-bezier(.2,.7,.2,1) forwards .35s; }
.hero-title .acc { background: linear-gradient(110deg, var(--accentA), var(--accentB), #d6fff5, var(--accentA)); background-size: 250% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 250% center; } }
.hero-sub { font-size: clamp(14px, 1.5vw, 18px); color: var(--muted); margin-top: 22px; max-width: 56ch; line-height: 1.6; font-weight: 500;
  opacity: 0; animation: heroIn 1s ease forwards .6s; }
.hero-stats { display: flex; gap: 44px; margin-top: 40px; flex-wrap: wrap; opacity: 0; animation: heroIn 1s ease forwards .8s; }
.hero-stat { position: relative; }
.hero-stat .hs-v { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 46px); letter-spacing: -0.03em; line-height: 1; }
.hero-stat .hs-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-top: 10px; }
.hero-stat::after { content:''; position: absolute; left: -22px; top: 4px; bottom: 4px; width: 1px; background: var(--hairline); }
.hero-stat:first-child::after { display: none; }
.scroll-cue { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-radius: 30px; padding: 11px 20px; margin-top: 48px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; opacity: 0; animation: heroIn 1s ease forwards 1s; transition: 0.2s; backdrop-filter: blur(8px); }
.scroll-cue:hover { color: var(--text); border-color: var(--border-bright); transform: translateY(-2px); }
.scroll-cue span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.con-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--panel-solid); border: 1px solid var(--border-bright);
  border-radius: 10px; padding: 9px 13px; font-size: 12px; box-shadow: var(--shadow); opacity: 0; transition: opacity 0.15s; transform: translate(-50%, -130%); }
.con-tip.show { opacity: 1; }
.con-tip .ct-name { font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.con-tip .ct-meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 3px; letter-spacing: 0.04em; }
.boot { position: absolute; inset: 0; z-index: 8; background: var(--bg); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8%;
  transition: opacity .6s ease; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-line { font-family: var(--font-mono); font-size: 12px; color: var(--accentA); letter-spacing: 0.1em; white-space: pre; min-height: 1.4em; text-shadow: 0 0 14px var(--accentA); }
.card.flash { animation: cardFlash 1.4s ease; }
@keyframes cardFlash { 0%,100% { box-shadow: var(--shadow-sm); } 25% { box-shadow: 0 0 0 2px var(--accentA), var(--glow); transform: translateY(-4px); } }

@media (max-width: 700px) { .hero { height: 86vh; } .hero-stats { gap: 28px; } .hero-stat::after { display: none; } }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } .grid2 { grid-template-columns: 1fr; } .rev-kpis { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, 1fr); } .wrap, .head-inner { padding-left: 16px; padding-right: 16px; } .search input { width: 140px; } .navbtns { display: none; } }
