/* RevCon ANPR — shared enterprise design system.
   Loaded after the Tailwind CDN on every page; Tailwind handles layout/spacing,
   these tokens + component classes handle the brand look. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg:            #0a0e16;
  --bg-2:          #0c1119;
  --surface:       #10151f;
  --surface-2:     #161d2a;
  --surface-3:     #1b2433;
  --border:        #212b3a;
  --border-strong: #2c3a4e;
  --text:          #e7ebf3;
  --text-muted:    #93a1b8;
  --text-faint:    #5e6c82;
  --brand:         #6366f1;
  --brand-2:       #818cf8;
  --brand-soft:    rgba(99,102,241,.14);
  --brand-ring:    rgba(99,102,241,.35);
  --success:       #10b981;
  --info:          #38bdf8;
  --warn:          #f59e0b;
  --danger:        #f43f5e;
  --radius:        14px;
  --radius-sm:     10px;
  --shadow:        0 1px 2px rgba(0,0,0,.35), 0 12px 32px -16px rgba(0,0,0,.7);
  --sidebar-w:     248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { text-decoration: none; color: inherit; }
.mono { font-family: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace; }
.tnum { font-variant-numeric: tabular-nums; }

/* ── motion ─────────────────────────────────────────────────────────────── */
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fadein { animation: fadein .4s cubic-bezier(.21,.6,.35,1) both; }
.fadein-2 { animation-delay: .05s; }
.fadein-3 { animation-delay: .1s; }
.fadein-4 { animation-delay: .15s; }

/* ── scrollbars ─────────────────────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a4860; }
::-webkit-scrollbar-track { background: transparent; }

/* ── surfaces ───────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-hover { transition: border-color .15s, transform .15s; }
.card-hover:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.hairline { border-color: var(--border) !important; }

/* labels */
.eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: 13px; font-weight: 600; line-height: 1;
  padding: .52rem .8rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.btn svg { width: 15px; height: 15px; }
/* <use> instances of the <defs> symbols don't inherit the group's fill/stroke,
   so set them explicitly here or icon-only buttons render as empty rects. */
.btn svg, .brand-mark svg, .pill svg, .nav-item svg {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn-primary svg { fill: currentColor; stroke: none; }  /* solid play triangle */
.btn-primary { background: var(--brand); border-color: transparent; color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: transparent; }
.btn-icon { padding: .52rem; }

/* ── pills / badges ─────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap;
  padding: .28rem .52rem; border-radius: 999px; border: 1px solid transparent;
}
.pill svg { width: 12px; height: 12px; }
.pill-success { background: rgba(16,185,129,.12);  color: #34d399; border-color: rgba(16,185,129,.26); }
.pill-info    { background: rgba(56,189,248,.12);  color: #7dd3fc; border-color: rgba(56,189,248,.26); }
.pill-warn    { background: rgba(245,158,11,.13);  color: #fbbf24; border-color: rgba(245,158,11,.26); }
.pill-danger  { background: rgba(244,63,94,.12);   color: #fb7185; border-color: rgba(244,63,94,.28); }
.pill-muted   { background: rgba(148,163,184,.1);  color: #9aa8bd; border-color: rgba(148,163,184,.2); }
.pill-brand   { background: var(--brand-soft);     color: #a5b4fc; border-color: rgba(99,102,241,.3); }

.dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; }
.live-dot { box-shadow: 0 0 0 0 rgba(16,185,129,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5);} 70% { box-shadow: 0 0 0 6px rgba(16,185,129,0);} 100% { box-shadow:0 0 0 0 rgba(16,185,129,0);} }

/* ── inputs ─────────────────────────────────────────────────────────────── */
.input, .select {
  background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: .55rem .7rem; font-size: 13px; outline: none;
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.input::placeholder { color: var(--text-faint); }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }

/* ── app shell ──────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 30;
}
/* mobile drawer: off-canvas below the lg breakpoint, static on desktop */
.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 29;
  background: rgba(4, 7, 12, .6); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.21,.6,.35,1);
    box-shadow: 0 24px 60px -12px rgba(0,0,0,.8);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
}
@media (min-width: 1024px) {
  .sidebar-backdrop { display: none; }
}

.nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .58rem .7rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: #c7d2fe; }
.nav-item.active svg { color: var(--brand-2); }
.nav-item svg { width: 18px; height: 18px; flex: none; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,14,22,.8); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), #8b5cf6);
  box-shadow: 0 6px 16px -6px rgba(99,102,241,.7);
}
.brand-mark svg { width: 19px; height: 19px; }

/* ── data table ─────────────────────────────────────────────────────────── */
.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt thead th {
  text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); padding: .7rem 1rem; background: var(--surface);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.dt tbody td { padding: .68rem 1rem; border-bottom: 1px solid var(--border); }
.dt tbody tr { transition: background .12s; }
.dt tbody tr:hover { background: var(--surface-2); }
.dt tbody tr:last-child td { border-bottom: 0; }

/* progress / meter */
.meter { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; }
