/* =====================================================================
   DockVision AI — ThirdEye Data × JMC Industries
   ===================================================================== */
:root {
  --brand: #12554C; --brand2: #668F45;
  --mint: #2fe0b0; --lime: #b6e35a; --amber: #ffb547; --rose: #ff5d8f; --violet: #a98bff; --sky: #5ad1e3;
  --radius: 18px; --radius-sm: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050d0c; --bg2: #081513; --bg3: #0c1d1a;
  --panel: rgba(13, 30, 27, .72); --panel-solid: #0d1e1b; --panel2: rgba(255,255,255,.03);
  --border: rgba(140, 220, 190, .12); --border2: rgba(140, 220, 190, .22);
  --text: #e9f5f1; --text2: #b9d0c9; --muted: #7f9c94;
  --primary: #2fe0b0; --primary-ink: #04221c;
  --shadow: 0 20px 50px -20px rgba(0,0,0,.65), 0 0 0 1px rgba(140,220,190,.06);
  --glow: 0 0 0 1px rgba(47,224,176,.25), 0 10px 40px -10px rgba(47,224,176,.35);
  --grid-line: rgba(140,220,190,.06);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef4f2; --bg2: #e6eeeb; --bg3: #dce7e3;
  --panel: rgba(255,255,255,.82); --panel-solid: #ffffff; --panel2: rgba(18,85,76,.04);
  --border: rgba(18, 85, 76, .12); --border2: rgba(18, 85, 76, .24);
  --text: #0c1f1b; --text2: #2c4a43; --muted: #5f7a73;
  --primary: #12554C; --primary-ink: #ffffff;
  --mint: #0fae86; --lime: #5f9a1f; --amber: #d98a0b; --rose: #e0336b; --violet: #6d4fe0; --sky: #138ea3;
  --shadow: 0 18px 40px -22px rgba(12,50,44,.35), 0 0 0 1px rgba(18,85,76,.06);
  --glow: 0 0 0 1px rgba(18,85,76,.25), 0 10px 30px -12px rgba(18,85,76,.4);
  --grid-line: rgba(18,85,76,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.45;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, color-mix(in srgb, var(--brand2) 22%, transparent), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, color-mix(in srgb, var(--brand) 40%, transparent), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
}
img { max-width: 100%; display: block; }
svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--border); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .sm { font-size: 12px; }
.w100 { width: 100%; }
html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="light"] .logo-dark { display: none !important; }
html[data-theme="dark"] .i-sun { display: none; } html[data-theme="light"] .i-moon { display: none; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--mint); box-shadow: 0 0 0 0 var(--mint); animation: ping 2s infinite; }
.dot.warn { background: var(--amber); } .dot.bad { background: var(--rose); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mint) 60%, transparent); } 80%,100% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border2); background: var(--panel2); cursor: pointer; font-weight: 600; letter-spacing: .1px; transition: transform .15s var(--ease), background .2s, box-shadow .2s, border-color .2s; white-space: nowrap; text-decoration: none; }
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--primary); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--mint), var(--lime)); color: #04221c; border: 0; box-shadow: var(--glow); }
html[data-theme="light"] .btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: color-mix(in srgb, var(--rose) 16%, transparent); border-color: color-mix(in srgb, var(--rose) 45%, transparent); color: var(--rose); }
.btn-lg { height: 50px; font-size: 15px; border-radius: 14px; }
.btn svg { width: 18px; height: 18px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 10px; justify-content: center; border-radius: 11px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; transition: .2s; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn .lbl { font-size: 12.5px; font-weight: 600; }
.link { background: none; border: 0; color: var(--primary); cursor: pointer; font-weight: 600; padding: 0; }
.chip { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border2); background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); }
.chip.on { color: var(--text); background: color-mix(in srgb, var(--mint) 16%, transparent); border-color: color-mix(in srgb, var(--mint) 50%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; background: var(--panel2); border: 1px solid var(--border2); color: var(--text2); white-space: nowrap; }
.pill.ok { color: var(--mint); border-color: color-mix(in srgb, var(--mint) 45%, transparent); background: color-mix(in srgb, var(--mint) 12%, transparent); }
.pill.warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.pill.live { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 45%, transparent); background: color-mix(in srgb, var(--rose) 12%, transparent); }
.pill.violet { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 45%, transparent); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.client-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-family: var(--display); font-weight: 600; letter-spacing: .2px; background: linear-gradient(135deg, #c8102e, #8a0b20); color: #fff; box-shadow: 0 6px 20px -8px rgba(200,16,46,.6); }
.client-badge b { font-weight: 800; letter-spacing: 1px; }
.client-badge.sm { padding: 2px 8px; border-radius: 7px; font-size: 11.5px; }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); padding: 16px; position: relative; min-width: 0; }
.glass { background: var(--panel); border: 1px solid var(--border2); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .2px; }

/* =====================================================================
   LOGIN
   ===================================================================== */
.login { position: fixed; inset: 0; overflow: auto; display: flex; }
#loginCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.blob { position: fixed; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(80px); opacity: .45; z-index: 0; animation: float 18s ease-in-out infinite alternate; }
.b1 { background: var(--brand); top: -18vmax; left: -12vmax; }
.b2 { background: var(--brand2); bottom: -22vmax; right: -10vmax; animation-delay: -6s; }
.b3 { background: color-mix(in srgb, var(--mint) 60%, transparent); top: 30%; left: 45%; width: 24vmax; height: 24vmax; opacity: .18; animation-delay: -12s; }
html[data-theme="light"] .blob { opacity: .22; }
@keyframes float { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
.login-wrap { position: relative; z-index: 1; margin: auto; width: min(1240px, 100%); padding: 40px 28px; display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.hero-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.hero-brand img { height: 34px; width: auto; }
.hero-brand .x { color: var(--muted); font-size: 20px; }
.login-hero h1 { font-family: var(--display); font-size: clamp(32px, 4.2vw, 54px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -1px; }
.grad { background: linear-gradient(100deg, var(--mint), var(--lime) 50%, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--text2); font-size: 16px; max-width: 560px; margin: 0 0 28px; }
.hero-preview { display: flex; gap: 18px; align-items: stretch; }
.hp-feed { position: relative; width: 190px; aspect-ratio: 478/850; border-radius: 16px; overflow: hidden; border: 1px solid var(--border2); box-shadow: var(--shadow); flex: none; }
.hp-feed img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1); }
.hp-box { position: absolute; border: 2px solid; border-radius: 4px; animation: jitter 3s ease-in-out infinite; }
.hp-box span { position: absolute; top: -17px; left: -2px; font: 700 8.5px/1 var(--mono); padding: 3px 5px; color: #04221c; border-radius: 3px 3px 3px 0; white-space: nowrap; }
.hp-box.p1 { border-color: var(--amber); left: 52%; top: 31%; width: 42%; height: 66%; } .hp-box.p1 span { background: var(--amber); }
.hp-box.p2 { border-color: var(--violet); left: 30%; top: 8%; width: 36%; height: 50%; animation-delay: -1s; } .hp-box.p2 span { background: var(--violet); color: #fff; }
.hp-box.p3 { border-color: var(--lime); left: 47%; top: 26%; width: 24%; height: 9%; box-shadow: 0 0 18px var(--lime); animation-delay: -2s; } .hp-box.p3 span { background: var(--lime); }
@keyframes jitter { 50% { transform: translate(2px, -2px); } }
.hp-scan { position: absolute; left: 0; right: 0; height: 40%; background: linear-gradient(to bottom, transparent, rgba(47,224,176,.18), transparent); animation: scan 3.5s linear infinite; }
@keyframes scan { from { top: -40%; } to { top: 100%; } }
.hp-live { position: absolute; top: 8px; left: 8px; font: 700 9px/1 var(--mono); padding: 4px 6px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; display: flex; gap: 5px; align-items: center; }
.hp-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff3b5c; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.hp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; }
.hp-stats div { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; justify-content: center; backdrop-filter: blur(10px); }
.hp-stats b { font-family: var(--display); font-size: 22px; color: var(--primary); }
.hp-stats span { color: var(--muted); font-size: 12px; }
.login-card { border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.lc-head { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.lc-mark { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 70%, transparent), color-mix(in srgb, var(--brand2) 50%, transparent)); border: 1px solid var(--border2); }
.lc-mark img { width: 34px; }
html[data-theme="light"] .lc-mark { background: color-mix(in srgb, var(--brand2) 14%, white); }
.lc-head h2 { margin: 0; font-family: var(--display); font-size: 24px; }
.lc-head h2 .ai { color: var(--primary); }
.lc-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text2); }
.input { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border2); background: color-mix(in srgb, var(--bg) 50%, transparent); transition: .2s; }
.input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.input svg { color: var(--muted); }
.input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 15px var(--font); }
.eye { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 4px; display: flex; }
.login-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text2); cursor: pointer; }
.check input { accent-color: var(--brand2); width: 16px; height: 16px; }
.cred-hint { font-size: 12.5px; color: var(--text2); background: var(--panel2); border: 1px dashed var(--border2); padding: 10px 12px; border-radius: 12px; }
.login-err { color: var(--rose); font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--rose) 10%, transparent); border: 1px solid color-mix(in srgb, var(--rose) 35%, transparent); padding: 10px 12px; border-radius: 12px; }
.login-err.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.lc-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.lc-foot span { display: flex; gap: 8px; align-items: center; }
.theme-mini { border: 1px solid var(--border); background: var(--panel2); border-radius: 10px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.lc-legal { margin: 0; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.6; }

/* =====================================================================
   SHELL
   ===================================================================== */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 20px 16px; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--bg2) 70%, transparent); backdrop-filter: blur(18px); z-index: 40; overflow-y: auto; }
.sb-brand img { height: 30px; width: auto; }
.sb-product { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); font-size: 20px; font-weight: 700; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 40%, transparent), color-mix(in srgb, var(--brand2) 25%, transparent)); border: 1px solid var(--border2); }
.sb-product b { color: var(--primary); } .sb-product em { margin-left: auto; font: 600 11px var(--mono); color: var(--muted); font-style: normal; }
.sb-nav { display: flex; flex-direction: column; gap: 4px; }
.sb-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--text2); font-weight: 600; position: relative; transition: .2s; }
.sb-nav a:hover { background: var(--panel2); color: var(--text); }
.sb-nav a.active { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--text); box-shadow: inset 3px 0 0 var(--primary); }
.sb-nav a.active svg { color: var(--primary); }
.sb-nav .badge { margin-left: auto; font: 700 11px var(--mono); padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--lime) 18%, transparent); color: var(--lime); }
.live-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
body.is-live .live-dot { background: #ff3b5c; animation: blink 1s infinite; }
.sb-card { margin-top: auto; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 9px; }
.sb-card-h { font-size: 12px; color: var(--muted); } .sb-card-h b { color: var(--text); font-family: var(--mono); }
.meter { display: grid; grid-template-columns: 38px 1fr 40px; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.meter div { height: 6px; border-radius: 99px; background: var(--panel2); overflow: hidden; border: 1px solid var(--border); }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mint), var(--lime)); transition: width 1s var(--ease); }
.meter em { font: 600 11px var(--mono); color: var(--text2); font-style: normal; text-align: right; }
.sb-net { font-size: 11.5px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.sb-foot { display: flex; flex-direction: column; gap: 10px; }
.sb-powered { text-align: center; font-size: 11px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(18px) saturate(150%); }
.tb-title { min-width: 0; flex: 1; }
.tb-crumb { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.tb-crumb .sep { opacity: .5; }
.tb-title h1 { margin: 2px 0 0; font-family: var(--display); font-size: 22px; letter-spacing: -.3px; }
.tb-right { display: flex; align-items: center; gap: 8px; }
.tb-live { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border2); background: var(--panel); font: 700 11px var(--mono); color: var(--muted); }
.tb-live b { font-family: var(--display); font-size: 18px; color: var(--primary); min-width: 16px; text-align: center; }
.tb-live .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
body.is-live .tb-live .rec { background: #ff3b5c; animation: blink 1s infinite; }
.tb-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; padding: 0 6px; }
.tb-clock span { font-size: 11px; color: var(--muted); }
.tb-clock b { font: 700 15px var(--mono); }
.tb-clock em { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #04221c; background: linear-gradient(135deg, var(--mint), var(--lime)); }
#pages { padding: 20px 24px 40px; flex: 1; position: relative; }
.page { animation: pageIn .45s var(--ease); }
.page.off { display: none; }
/* keep the live page running (video + engine) while user browses other pages */
#page-live.off { display: block; position: fixed; left: -300vw; top: 0; width: 100vw; visibility: hidden; pointer-events: none; animation: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.only-mobile { display: none; }
.bottom-nav { display: none; }
.scrim { display: none; }

/* =====================================================================
   LIVE
   ===================================================================== */
.live-grid { display: grid; grid-template-columns: minmax(300px, auto) minmax(0, 1fr); gap: 20px; align-items: start; }
.feed-col { position: sticky; top: 88px; }
.feed-card { padding: 12px; }
.feed { position: relative; height: calc(100vh - 220px); min-height: 520px; max-height: 900px; aspect-ratio: 478 / 850; border-radius: 14px; overflow: hidden; background: #000; isolation: isolate; }
.feed { container-type: inline-size; }
@container (max-width: 380px) {
  .hud { font-size: 9px; }
  .hud-chip { display: none; }
  .hud.bl span:first-child, .hud.br span:last-child { display: none; }
  .hud-count b { font-size: 12px; }
}
.feed video, .feed canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.feed video { object-fit: fill; }
.hud { position: absolute; z-index: 3; display: flex; gap: 6px; font: 600 10.5px/1 var(--mono); color: #eafff7; text-shadow: 0 1px 2px #000; pointer-events: none; }
.hud.tl { top: 10px; left: 10px; } .hud.tr { top: 10px; right: 10px; flex-direction: column; align-items: flex-end; }
.hud-count { background: rgba(4,34,28,.82); border: 1px solid #2fe0b0; color: #b6e35a; padding: 5px 8px; border-radius: 6px; font-weight: 800; letter-spacing: .5px; }
.hud-count b { font-size: 14px; margin-left: 4px; }
.hud.bl { bottom: 12px; left: 10px; flex-direction: column; } .hud.br { bottom: 12px; right: 10px; flex-direction: column; align-items: flex-end; }
.hud.bl span, .hud.br span { background: rgba(0,0,0,.45); padding: 4px 6px; border-radius: 4px; backdrop-filter: blur(4px); }
.hud-chip, .hud-ts { background: rgba(0,0,0,.55); padding: 5px 7px; border-radius: 5px; backdrop-filter: blur(4px); }
.rec-pill { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.55); padding: 5px 8px; border-radius: 5px; }
.rec-pill i { width: 7px; height: 7px; border-radius: 50%; background: #888; }
body.is-live .rec-pill i { background: #ff3b5c; animation: blink 1s infinite; }
body.is-live .rec-pill b { color: #ff8aa1; }
.corner { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(47,224,176,.85); z-index: 2; pointer-events: none; }
.c1 { top: 40px; left: 8px; border-right: 0; border-bottom: 0; } .c2 { top: 40px; right: 8px; border-left: 0; border-bottom: 0; }
.c3 { bottom: 64px; left: 8px; border-right: 0; border-top: 0; } .c4 { bottom: 64px; right: 8px; border-left: 0; border-top: 0; }
.scanline { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
body.is-live .scanline::after { content: ''; position: absolute; left: 0; right: 0; height: 26%; background: linear-gradient(to bottom, transparent, rgba(47,224,176,.10), transparent); animation: scan 4s linear infinite; }
.flash { position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .55; } 100% { opacity: 0; } }
.plus-one { position: absolute; z-index: 5; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.6); font: 800 64px/1 var(--display); color: var(--lime); text-shadow: 0 0 30px rgba(182,227,90,.8), 0 4px 10px rgba(0,0,0,.6); opacity: 0; pointer-events: none; }
.plus-one.go { animation: plus 1.2s var(--ease); }
@keyframes plus { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 70% { opacity: 1; transform: translate(-50%, -70%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -110%) scale(.9); } }
.feed-cover { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 50% 45%, rgba(0,0,0,.25), rgba(0,0,0,.72)); transition: opacity .4s; }
.feed-cover.gone { opacity: 0; pointer-events: none; }
.play-big { width: 86px; height: 86px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: linear-gradient(135deg, var(--mint), var(--lime)); color: #04221c; box-shadow: 0 0 0 10px rgba(47,224,176,.18), 0 0 0 22px rgba(47,224,176,.08), 0 20px 40px rgba(0,0,0,.5); animation: pulse 2.2s infinite; }
.play-big svg { width: 34px; height: 34px; margin-left: 4px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px rgba(47,224,176,.12), 0 0 0 32px rgba(47,224,176,.04), 0 20px 40px rgba(0,0,0,.5); } }
.fc-txt { display: flex; flex-direction: column; align-items: center; color: #fff; text-align: center; padding: 0 16px; }
.fc-txt b { font-family: var(--display); font-size: 17px; } .fc-txt span { font: 500 11.5px var(--mono); opacity: .75; }
.feed-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.layers { margin-left: auto; display: flex; gap: 6px; }
.progress { height: 4px; border-radius: 99px; background: var(--panel2); margin-top: 12px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--lime), var(--amber)); }

.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kpi-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; }
.kpi.hero .kpi-h { flex-wrap: wrap; }
.kpi .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pk { font-size: 11px; color: var(--muted); font-weight: 600; }
.perf .kv { flex-wrap: wrap; gap: 4px 6px; }
.perf .kv b { font-size: 32px; }
.mono-logo.long { font-size: 11.5px; letter-spacing: 0; }
.kpi { display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.kpi-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.kpi.hero { background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 55%, var(--panel)), color-mix(in srgb, var(--brand2) 28%, var(--panel))); border-color: color-mix(in srgb, var(--mint) 30%, transparent); }
html[data-theme="light"] .kpi.hero { background: linear-gradient(140deg, #12554C, #3f7a49); color: #fff; border: 0; }
html[data-theme="light"] .kpi.hero .kpi-h, html[data-theme="light"] .kpi.hero .hero-meta span { color: rgba(255,255,255,.75); }
html[data-theme="light"] .kpi.hero .pill { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }
.kpi.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(182,227,90,.28), transparent 70%); pointer-events: none; }
.hero-count { display: flex; align-items: center; gap: 22px; }
.odo { flex: none; display: flex; font: 700 92px/1.2 var(--display); letter-spacing: -2px; height: 1.2em; overflow: hidden; }
.odo .d { flex: none; height: 1.2em; overflow: hidden; width: .64em; }
.odo .d > div { transition: transform .9s cubic-bezier(.3,1.4,.4,1); }
.odo .d span { display: block; height: 1.2em; line-height: 1.2em; text-align: center; background: linear-gradient(180deg, #fff, #c9f3e3); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="light"] .odo .d span { background: linear-gradient(180deg, #fff, #dff6d0); -webkit-background-clip: text; background-clip: text; }
.kpi.hero.bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { transform: scale(1.025); box-shadow: 0 0 0 2px var(--lime), 0 0 60px -10px var(--lime); } }
.hero-meta { display: grid; gap: 6px; font-size: 12px; }
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta span { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; }
.hero-meta b { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.hero-bar { position: relative; height: 22px; border-radius: 99px; background: rgba(0,0,0,.25); overflow: hidden; }
.hero-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--mint), var(--lime)); transition: width .8s var(--ease); }
.hero-bar span { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; height: 100%; font: 700 11px var(--mono); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ring-wrap { position: relative; width: 112px; height: 112px; margin: 0 auto; }
.ring { width: 112px; height: 112px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--panel2); stroke: color-mix(in srgb, var(--text) 8%, transparent); }
.ring-fg { stroke: url(#ringGrad); stroke: var(--mint); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset .9s var(--ease), stroke .3s; }
.ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-c b { font: 700 24px var(--display); } .ring-c span { font: 600 11px var(--mono); color: var(--muted); }
.recon-status { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text2); text-align: center; }
.kv { display: flex; align-items: baseline; gap: 8px; } .kv b { font: 700 34px var(--display); } .kv em { font-style: normal; color: var(--muted); font-size: 12px; }
.kv2 { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: auto; } .kv2 b { font-family: var(--mono); color: var(--text); }
.spark { height: 44px; margin-top: auto; }
.spark svg { width: 100%; height: 100%; }

.pipeline { display: flex; align-items: center; gap: 0; padding: 12px 14px; overflow-x: auto; scrollbar-width: none; }
.pipeline::-webkit-scrollbar { display: none; }
.pl-step { display: flex; align-items: center; gap: 9px; flex: none; padding: 6px 10px; border-radius: 12px; transition: .3s; }
.pl-step i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 700 12px var(--mono); font-style: normal; background: var(--panel2); border: 1px solid var(--border2); color: var(--muted); transition: .3s; }
.pl-step b { display: block; font-size: 12.5px; } .pl-step span { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.pl-step.on i { background: linear-gradient(135deg, var(--mint), var(--lime)); color: #04221c; border-color: transparent; box-shadow: 0 0 16px -2px var(--mint); }
.pl-step.fire { background: color-mix(in srgb, var(--lime) 14%, transparent); }
.pl-link { flex: 1; min-width: 14px; height: 2px; background: var(--border2); position: relative; overflow: hidden; }
body.is-live .pl-link::after { content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--mint), transparent); animation: flow 1.4s linear infinite; }
@keyframes flow { to { left: 100%; } }

.dash-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.timeline { display: flex; flex-direction: column; gap: 10px; max-height: 760px; overflow-y: auto; padding-right: 2px; }
.timeline .empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--border2); border-radius: 14px; }
.timeline .empty svg { width: 34px; height: 34px; opacity: .6; }
.timeline .empty p { margin: 0; max-width: 260px; }
.tl-item { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 10px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--border); cursor: pointer; transition: .2s; animation: slideIn .6s var(--ease); }
.tl-item:hover { border-color: var(--primary); }
.tl-item.new { box-shadow: 0 0 0 1px var(--lime), 0 0 30px -8px var(--lime); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px) scale(.98); } }
.tl-thumb { width: 74px; height: 110px; border-radius: 10px; overflow: hidden; background: #000; position: relative; }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tl-thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; font: 600 10px var(--mono); color: var(--muted); }
.tl-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tl-top { display: flex; align-items: center; gap: 8px; }
.tl-n { font: 800 18px var(--display); color: var(--primary); }
.tl-title { font-weight: 700; font-size: 13px; }
.tl-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 11.5px; color: var(--muted); }
.tl-meta b { color: var(--text2); font-family: var(--mono); font-weight: 600; }
.tl-hash { font: 500 10px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.rules li { display: flex; gap: 11px; }
.rules b { display: block; font-size: 13px; } .rules span { font-size: 12px; color: var(--muted); }
.sw { width: 12px; height: 12px; border-radius: 4px; margin-top: 3px; flex: none; }
.sw.lime { background: var(--lime); box-shadow: 0 0 10px var(--lime); } .sw.rose { background: repeating-linear-gradient(45deg, var(--rose) 0 3px, transparent 3px 5px); border: 1px solid var(--rose); }
.sw.amber { border: 2px dashed var(--amber); } .sw.violet { background: var(--violet); }
.chart { height: 190px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart text { font: 500 10px var(--mono); fill: var(--muted); }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.dl div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.dl b { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.plate { display: inline-block; width: max-content; font-family: var(--mono) !important; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; background: #fff7d1; color: #111; border: 2px solid #111; font-size: 12.5px !important; }

/* =====================================================================
   GENERIC PAGE BLOCKS
   ===================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); max-width: 680px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mt { margin-top: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .lbl i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.stat .lbl i svg { width: 15px; height: 15px; }
.stat .val { font: 700 34px/1.05 var(--display); letter-spacing: -.5px; }
.stat .sub { font-size: 12px; color: var(--muted); }
.ic-mint { background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); }
.ic-lime { background: color-mix(in srgb, var(--lime) 16%, transparent); color: var(--lime); }
.ic-amber { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.ic-violet { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); }
.ic-rose { background: color-mix(in srgb, var(--rose) 16%, transparent); color: var(--rose); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 60px 20px; border: 1px dashed var(--border2); border-radius: var(--radius); background: var(--panel); }
.empty-state .big { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--mint) 22%, transparent), color-mix(in srgb, var(--lime) 18%, transparent)); color: var(--primary); }
.empty-state .big svg { width: 34px; height: 34px; }
.empty-state h3 { margin: 0; font-family: var(--display); font-size: 20px; }
.empty-state p { margin: 0; color: var(--muted); max-width: 440px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.mono { font-family: var(--mono); }
.tbl-wrap { overflow-x: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.note { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.note svg { width: 15px; height: 15px; margin-top: 1px; color: var(--primary); }

/* Evidence */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.ev-card { padding: 0; overflow: hidden; cursor: pointer; transition: transform .25s var(--ease), border-color .2s; }
.ev-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.ev-img { aspect-ratio: 478/850; background: #000; position: relative; overflow: hidden; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ev-card:hover .ev-img img { transform: scale(1.04); }
.ev-tag { position: absolute; top: 8px; left: 8px; font: 700 11px var(--mono); padding: 4px 8px; border-radius: 6px; background: var(--lime); color: #04221c; }
.ev-ok { position: absolute; top: 8px; right: 8px; font: 700 10px var(--mono); padding: 4px 7px; border-radius: 6px; background: rgba(0,0,0,.6); color: var(--mint); display: flex; gap: 4px; align-items: center; }
.ev-info { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.ev-info b { font-size: 13px; } .ev-info span { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.lightbox { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 20px; }
.lightbox img { width: 100%; border-radius: 12px; border: 1px solid var(--border2); }
.meta-list { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.meta-list div { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.meta-list span { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.meta-list b { font-weight: 600; overflow-wrap: anywhere; } .meta-list .mono { font-family: var(--mono); font-size: 11.5px; }
.verify { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }

/* Integrations */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.int-card { display: flex; flex-direction: column; gap: 12px; }
.int-top { display: flex; align-items: center; gap: 12px; }
.mono-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 800 14px var(--display); color: #fff; flex: none; letter-spacing: .3px; }
.int-top b { display: block; font-size: 14px; } .int-top span { font-size: 11.5px; color: var(--muted); }
.int-card p { margin: 0; font-size: 12.5px; color: var(--muted); flex: 1; }
.int-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.switch { position: relative; width: 44px; height: 24px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--border2); cursor: pointer; transition: .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: .25s var(--ease); }
.switch.on { background: color-mix(in srgb, var(--mint) 30%, transparent); border-color: var(--mint); }
.switch.on::after { left: 22px; background: var(--mint); }
.section-title { font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
pre.json { margin: 0; max-height: 380px; overflow: auto; font: 500 11.5px/1.55 var(--mono); padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 70%, #000 10%); border: 1px solid var(--border); color: var(--text2); white-space: pre; }
html[data-theme="light"] pre.json { background: #0f1f1c; color: #cfe9e1; }
.form-grid { display: grid; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text2); }
.form-grid input, .form-grid select { height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border2); background: color-mix(in srgb, var(--bg) 50%, transparent); color: var(--text); font: 500 13px var(--font); outline: 0; }
.form-grid input:focus { border-color: var(--primary); }

/* Site */
.map-card { padding: 0; overflow: hidden; }
.map { position: relative; height: 420px; background: color-mix(in srgb, var(--bg3) 80%, transparent); }
.map > svg { width: 100%; height: 100%; }
.map .lbl { font: 600 10px var(--mono); fill: var(--muted); letter-spacing: .5px; }
.map-over { position: absolute; left: 14px; bottom: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.map-over .glass { padding: 10px 14px; border-radius: 12px; font-size: 12px; }
.map-over .glass b { font-family: var(--mono); }
.zone-diagram svg { width: 100%; height: auto; }
.cam-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--border); }
.cam-row .cam-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); }

/* =====================================================================
   OVERLAYS: toast, modal, tour
   ===================================================================== */
.toasts { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 360px; padding: 12px 14px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--border2); box-shadow: var(--shadow); animation: toastIn .45s var(--ease); font-size: 13px; }
.toast.out { animation: toastOut .3s forwards; }
.toast .t-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.toast b { display: block; } .toast span { color: var(--muted); font-size: 12px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(2,8,7,.6); backdrop-filter: blur(6px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 22px; padding: 24px; animation: pop .35s var(--ease); background: var(--panel-solid); }
.modal-card.wide { width: min(900px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.modal-card h2 { margin: 0 0 6px; font-family: var(--display); font-size: 22px; }
.modal-card > p { margin: 0 0 16px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-x { float: right; border: 0; background: var(--panel2); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.summary-hero { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--mint) 18%, transparent), color-mix(in srgb, var(--lime) 12%, transparent)); border: 1px solid color-mix(in srgb, var(--mint) 40%, transparent); margin-bottom: 16px; }
.summary-hero .big { font: 800 64px/1 var(--display); color: var(--primary); }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.summary-grid div { padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--border); }
.summary-grid span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.summary-grid b { font: 700 18px var(--display); }

/* Guided tour — non-blocking: page stays fully visible & interactive; card is draggable; fluorescent orange arrow */
.tour { position: fixed; inset: 0; z-index: 110; pointer-events: none; --fluo: #FF6A00; }
.tour-ring { position: fixed; left: 0; top: 0; border-radius: 16px; pointer-events: none; border: 2.5px solid var(--fluo); box-shadow: 0 0 0 4px rgba(255,106,0,.18), 0 0 26px 2px rgba(255,106,0,.55), inset 0 0 22px rgba(255,106,0,.18); animation: ringPulse 1.6s ease-in-out infinite; transition: opacity .25s; will-change: transform; }
@keyframes ringPulse { 50% { box-shadow: 0 0 0 8px rgba(255,106,0,.10), 0 0 40px 6px rgba(255,106,0,.65), inset 0 0 26px rgba(255,106,0,.22); } }
.tour-arrow { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; overflow: visible; transition: opacity .2s; }
.ta-glow { fill: none; stroke: #FF7A1A; stroke-width: 10; stroke-linecap: round; opacity: .55; }
.ta-line { fill: none; stroke: var(--fluo); stroke-width: 4; stroke-linecap: round; }
.ta-flow { fill: none; stroke: #FFE2C2; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 14; animation: taFlow .7s linear infinite; opacity: .95; }
@keyframes taFlow { to { stroke-dashoffset: -16; } }
.ta-dot { fill: var(--fluo); stroke: #fff; stroke-width: 2; }
.ta-pulse { fill: none; stroke: var(--fluo); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: taPulse 1.2s ease-out infinite; }
@keyframes taPulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.tour-pop { position: fixed; pointer-events: auto; width: min(380px, calc(100vw - 24px)); border-radius: 18px; padding: 0 20px 18px; background: var(--panel-solid); border: 1.5px solid rgba(255,106,0,.55); box-shadow: 0 24px 60px -18px rgba(0,0,0,.6), 0 0 0 4px rgba(255,106,0,.10), 0 0 34px -6px rgba(255,106,0,.45); transition: top .45s var(--ease), left .45s var(--ease); touch-action: none; user-select: none; }
.tour-pop.dragging { transition: none; cursor: grabbing; box-shadow: 0 30px 70px -18px rgba(0,0,0,.7), 0 0 0 4px rgba(255,106,0,.18), 0 0 44px -4px rgba(255,106,0,.6); }
.tp-bar { display: flex; align-items: center; gap: 10px; margin: 0 -20px 4px; padding: 10px 12px 8px 16px; cursor: grab; border-bottom: 1px dashed var(--border2); }
.tp-grip { display: grid; grid-template-columns: repeat(3, 4px); gap: 3px; opacity: .7; }
.tp-grip i { width: 4px; height: 4px; border-radius: 50%; background: #FF6A00; }
.tp-tools { margin-left: auto; display: flex; gap: 4px; }
.tp-ic { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border2); background: var(--panel2); cursor: pointer; display: grid; place-items: center; font-size: 12px; color: var(--text2); }
.tp-exit { height: 26px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255,106,0,.55); background: rgba(255,106,0,.12); color: #FF7A1A; font: 700 11.5px var(--font); cursor: pointer; white-space: nowrap; }
.tp-exit:hover { background: #FF6A00; color: #fff; }
.tp-ic:hover { border-color: #FF6A00; color: #FF6A00; }
.tour-pop .tp-step { font: 700 11px var(--mono); color: #FF6A00; letter-spacing: 1px; }
.tour-pop h3 { margin: 10px 0 8px; font-family: var(--display); font-size: 19px; }
.tour-pop p { margin: 0; color: var(--text2); font-size: 13.5px; }
.tour-pop .tp-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 8px; }
.tp-dots { display: flex; gap: 5px; } .tp-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--border2); transition: .3s; } .tp-dots i.on { width: 18px; background: var(--primary); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1800px) {
  .pl-step span { display: none; }
  .pl-step { padding: 5px 6px; gap: 7px; }
  .pl-link { min-width: 8px; }
}
@media (max-width: 1500px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-row .kpi.hero { grid-column: 1 / -1; }
  .dash-grid { grid-template-columns: 1fr; }
  .pl-step b { font-size: 11.5px; }
  .pl-step i { width: 22px; height: 22px; font-size: 11px; }
}
@media (max-width: 1280px) {
  .dash-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-row .kpi.hero { grid-column: 1 / -1; }
  .feed { height: calc(100vh - 230px); min-height: 480px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-right .lbl { display: none; }
}
@media (max-width: 1080px) {
  .login-wrap { grid-template-columns: 1fr; gap: 28px; max-width: 560px; }
  .hero-preview { display: none; }
  .login-hero h1 { font-size: 34px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-105%); transition: transform .35s var(--ease); box-shadow: var(--shadow); background: var(--panel-solid); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.5); }
  .only-mobile { display: inline-flex; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .tb-crumb { display: none; }
  .tb-title h1 { font-size: 18px; }
  .tb-clock span { display: none; }
  .avatar, #btnLogout { display: none; }
  #pages { padding: 14px 14px 96px; }
  .live-grid { grid-template-columns: 1fr; }
  .feed-col { position: static; }
  .feed { height: auto; width: 100%; max-width: max(300px, calc((100vh - 170px) * 478 / 850)); margin: 0 auto; min-height: 0; max-height: none; }
  .feed-card { padding: 8px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 45; padding: 6px; border-radius: 20px; background: color-mix(in srgb, var(--panel-solid) 88%, transparent); border: 1px solid var(--border2); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; border-radius: 14px; text-decoration: none; font-size: 10.5px; font-weight: 600; color: var(--muted); }
  .bottom-nav a.active { color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); }
  .bottom-nav svg { width: 20px; height: 20px; }
  .toasts { left: 14px; right: 14px; bottom: auto; top: 66px; } .toast { max-width: none; }
  .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; }
  .lightbox img { max-height: 60vh; width: auto; margin: 0 auto; }
}
@media (max-width: 560px) {
  .kpi-row { gap: 10px; }
  .card { padding: 13px; border-radius: 16px; }
  .odo { font-size: 72px; }
  .hero-count { gap: 14px; }
  .kv b { font-size: 26px; }
  .ring-wrap, .ring { width: 92px; height: 92px; }
  .ring-c b { font-size: 19px; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .val { font-size: 26px; }
  .tb-live span { display: none; }
  .tb-clock, #btnTour { display: none; }
  .tb-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
  .tb-right { gap: 6px; }
  .icon-btn { min-width: 36px; height: 36px; padding: 0 8px; }
  .layers { margin-left: 0; width: 100%; }
  .feed-controls .btn { flex: 1; }
  .login-wrap { padding: 20px 14px; }
  .login-card { padding: 22px; border-radius: 20px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .dl { grid-template-columns: 1fr; }
  .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ev-ok { display: none; }
  .modal-card { padding: 18px; }
  .hud { font-size: 9px; }
  .page-head h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* live (no-target) indicators */
.hero-bar.live i { background: linear-gradient(90deg, rgba(47,224,176,.25), var(--mint), var(--lime), rgba(47,224,176,.25)); background-size: 200% 100%; animation: barflow 1.6s linear infinite; }
@keyframes barflow { to { background-position: -200% 0; } }
.ring.spin { animation: ringspin 1.8s linear infinite; }
@keyframes ringspin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
