/* ── Reconix Design System v2 ──────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ───────────────────────────────────────────────────────────────── */
:root {
  /* Accent — Indigo */
  --accent:         #4F46E5;
  --accent-hover:   #4338CA;
  --accent-light:   rgba(79,70,229,0.08);
  --accent-border:  rgba(79,70,229,0.20);

  /* Semantic */
  --danger:         #DC2626;
  --danger-light:   rgba(220,38,38,0.08);
  --danger-border:  rgba(220,38,38,0.20);
  --warning:        #D97706;
  --warning-light:  rgba(217,119,6,0.08);
  --warning-border: rgba(217,119,6,0.22);
  --success:        #059669;
  --success-light:  rgba(5,150,105,0.08);
  --success-border: rgba(5,150,105,0.20);
  --national:       #D97706;
  --national-light: rgba(217,119,6,0.08);

  /* Purple */
  --purple:         #7C3AED;
  --purple-light:   rgba(124,58,237,0.08);
  --purple-border:  rgba(124,58,237,0.20);

  /* Page + surface */
  --bg:             #E8EEF7;
  --surface:        #FFFFFF;
  --surface-2:      #F5F8FC;
  --surface-3:      #EAF0F8;
  --border:         #C3CDE0;
  --border-strong:  #8DA2BF;

  /* Text */
  --text:           #0F172A;
  --text-secondary: #475569;
  --text-muted:     #64748B;
  --text-faint:     #94A3B8;

  /* Sidebar — stays dark */
  --sidebar-bg:          #0B1020;
  --sidebar-surface:     #111827;
  --sidebar-hover:       rgba(255,255,255,0.05);
  --sidebar-active:      rgba(79,70,229,0.09);
  --sidebar-text:        rgba(243,246,251,0.55);
  --sidebar-text-active: #F3F6FB;
  --sidebar-border:      #1A2438;
  --sidebar-width:       224px;

  /* Elevation */
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.10),  0 0 0 1px rgba(0,0,0,0.05);
  --shadow:     0 4px 16px rgba(0,0,0,0.12),  0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:  0 8px 28px rgba(0,0,0,0.14),  0 2px 8px rgba(0,0,0,0.07);
  --shadow-lg:  0 16px 40px rgba(0,0,0,0.14);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.16), 0 6px 16px rgba(0,0,0,0.08);

  /* Radius */
  --radius-sm:  4px;
  --radius:     8px;
  --radius-md:  10px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full:9999px;

  /* Spacing */
  --space-1: 4px;  --space-2: 8px;   --space-3: 12px;
  --space-4: 16px; --space-5: 20px;  --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px;

  /* Info */
  --info:         #0284C7;
  --info-light:   rgba(2,132,199,0.08);
  --info-border:  rgba(2,132,199,0.20);

  /* Brand (dark code blocks) */
  --brand: #0A0F1A;
}

/* ── Reset ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Geist', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ── Page load animation ─────────────────────────────────────────────────────── */
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-content {
  animation: page-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── App Shell ───────────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  text-decoration: none;
  transition: opacity 0.15s;
}
.sidebar-logo:hover { opacity: 0.8; text-decoration: none; }
.sidebar-logo img { width: 30px; height: 34px; flex-shrink: 0; }
.sidebar-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
}
.sidebar-logo-text span { color: var(--accent); }

.sidebar-section {
  padding: 8px 10px;
  flex: 1;
}
.sidebar-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.22);
  padding: 18px 10px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  text-decoration: none;
  margin-bottom: 1px;
  white-space: nowrap;
  line-height: 1.3;
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: rgba(232,234,240,0.85); text-decoration: none; }
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item.active .nav-icon { opacity: 1; color: var(--accent); }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.50; transition: opacity 0.14s, color 0.14s; }
.nav-item:hover .nav-icon { opacity: 0.85; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* New Incident accent nav item */
.nav-item-accent {
  background: rgba(79,70,229,0.16);
  color: #C4C0FF !important;
  border: 1px solid rgba(79,70,229,0.24);
  margin-bottom: 6px;
}
.nav-item-accent:hover { background: rgba(79,70,229,0.24) !important; }
.nav-item-accent .nav-icon { opacity: 1 !important; color: var(--accent) !important; }

.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s;
}
.sidebar-user:hover { background: var(--sidebar-hover); text-decoration: none; }
.sidebar-avatar {
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(232,234,240,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 11px; color: var(--sidebar-text); }

/* ── Main content ────────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────────────────────────────── */
/* ── Topbar ──────────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.tb-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}
.tb-action-wrap { position: relative; }
.tb-badge {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  line-height: inherit;
  background: rgba(255,77,106,0.12);
  color: var(--danger);
  border: 1px solid rgba(255,77,106,0.28);
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
  white-space: nowrap;
  outline-offset: 2px;
}
.tb-badge.visible { display: inline-flex; }
.tb-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}
.tb-badge:hover  { background: rgba(255,77,106,0.20); }
.tb-badge:focus-visible { outline: 2px solid var(--accent); }

/* Action dropdown */
.tb-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 290px;
  max-width: min(340px, calc(100vw - 16px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(15,23,42,0.14), 0 2px 8px rgba(15,23,42,0.07);
  z-index: 300;
  overflow: hidden;
}
.tb-dropdown.open { display: block; }
.tb-dropdown-hd {
  padding: 10px 14px 9px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.tb-dropdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.tb-dropdown-row:last-child { border-bottom: none; }
.tb-dropdown-row:hover,
.tb-dropdown-row:focus-visible { background: var(--surface-2); color: var(--accent); outline: none; }
.tb-dropdown-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(255,77,106,0.12);
  color: var(--danger);
  border: 1px solid rgba(255,77,106,0.22);
}
.tb-dropdown-label { flex: 1; }
.tb-dropdown-arrow { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.tb-dropdown-clear {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

.tb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  user-select: none;
}

.page-content {
  padding: 28px 32px;
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
  margin: 0 0 4px 0;
}
.page-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid #D6E0EC;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.06), 0 10px 28px rgba(15,23,42,0.04);
  margin-bottom: 20px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: 0 4px 16px rgba(15,23,42,0.10), 0 1px 4px rgba(15,23,42,0.06); border-color: var(--border-strong); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Stat cards ──────────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--border-strong); }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
}
.stat-value.danger  { color: var(--danger); }
.stat-value.success { color: var(--success); }
.stat-value.accent  { color: var(--accent); }
.stat-value.warning { color: var(--warning); }
.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.01em;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: scale(0.97) translateY(0); box-shadow: none; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-secondary { background: var(--surface-2); color: var(--text) !important; border-color: var(--border-strong) !important; }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-strong) !important; color: var(--text) !important; }

.btn-danger { background: var(--danger); color: #fff !important; border-color: var(--danger) !important; }
.btn-danger:hover { background: #D63355; border-color: #D63355 !important; }

.btn-warning { background: var(--warning); color: #000 !important; border-color: var(--warning) !important; }
.btn-warning:hover { background: #D9901C; }

.btn-success { background: var(--success); color: #fff !important; border-color: var(--success) !important; }
.btn-success:hover { background: #22B88A; }

.btn-ghost { background: transparent; color: var(--text-secondary) !important; border-color: transparent !important; box-shadow: none !important; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text) !important; transform: none; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 14px; font-weight: 600; }
.btn-icon { padding: 7px; }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.badge-match    { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-clear    { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.badge-national { background: var(--national-light); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-camera   { background: var(--accent-light); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-banned   { background: var(--danger-light); color: var(--danger); font-weight: 700; border: 1px solid var(--danger-border); }
.badge-warning  { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-watch    { background: rgba(251,191,36,0.12); color: #FCD34D; border: 1px solid rgba(251,191,36,0.28); }
.badge-active   { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.badge-trial    { background: var(--accent-light); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-suspended{ background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-purple   { background: var(--purple-light); color: var(--purple); border: 1px solid var(--purple-border); }
.badge-sev-low      { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }
.badge-sev-medium   { background: var(--accent-light); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-sev-high     { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-sev-critical { background: var(--danger); color: #fff; border: 1px solid var(--danger); }
.badge-status-open     { background: var(--accent-light);  color: var(--accent);   border: 1px solid var(--accent-border); }
.badge-status-review   { background: var(--purple-light);  color: var(--purple);   border: 1px solid var(--purple-border); }
.badge-status-closed   { background: var(--surface-3);     color: var(--text-muted); border: 1px solid var(--border); }
.badge-status-police   { background: var(--danger-light);  color: var(--danger);   border: 1px solid var(--danger-border); }
.badge-status-verified { background: #dcfce7;              color: #166534;         border: 1px solid #86efac; }
.badge-status-shared   { background: #ede9fe;              color: #7c3aed;         border: 1px solid #c4b5fd; }
.badge-resolved      { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.badge-type          { background: var(--surface-3); color: var(--text-secondary); border: 1px solid var(--border); }

/* Status dots */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}
.dot-live    { background: var(--success); animation: dot-aurora 2.2s ease-in-out infinite; }
.dot-idle    { background: var(--warning); }
.dot-offline { background: var(--danger); }
.dot-never   { background: var(--text-faint); }
@keyframes dot-aurora {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16,185,129,0.25), 0 0 6px rgba(16,185,129,0.35); }
  50%       { box-shadow: 0 0 0 4px rgba(16,185,129,0.10), 0 0 14px rgba(16,185,129,0.55); }
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-4); }
label, .form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.form-input,
input[type=text], input[type=email], input[type=password],
input[type=number], input[type=datetime-local], input[type=file],
select, textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  margin-bottom: 0;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
select option { background: var(--surface-2); color: var(--text); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
input[type=file] { padding: 6px 12px; cursor: pointer; }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.form-hint  { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }

/* ── Tables ──────────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: var(--surface-3);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }
.td-primary { font-weight: 600; }
.td-muted { color: var(--text-muted); font-size: 12px; }
.td-mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }
.empty-row td { text-align: center; color: var(--text-muted); padding: 52px; font-size: 13px; }

/* ── Alerts / Notifications ──────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: var(--space-4);
  font-size: 13px;
}
.alert-error   { background: var(--danger-light); border-color: var(--danger-border); color: #FDA4AF; }
.alert-success { background: var(--success-light); border-color: var(--success-border); color: #6EE7B7; }
.alert-info    { background: var(--accent-light); border-color: var(--accent-border); color: #A5B4FC; }
.alert-warning { background: var(--warning-light); border-color: var(--warning-border); color: #FCD34D; }

/* ── Live Face Grid ──────────────────────────────────────────────────────────── */
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: var(--space-3);
}
.face-tile {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.face-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.face-tile.match {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
  animation: pulse-match 1.2s ease-in-out 4;
}
.face-tile.reported { border-color: var(--purple); }
.face-tile.national { border-color: var(--warning); }
.face-thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-3);
  overflow: hidden;
}
.face-thumb img { width: 100%; height: 100%; object-fit: cover; }
.face-tile-badge { position: absolute; top: 6px; right: 6px; }
.face-tile-info { padding: 8px 10px; }
.face-tile-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.face-tile-name.danger { color: var(--danger); }
.face-tile-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.face-tile-conf { font-size: 11px; color: var(--danger); font-weight: 600; }
.face-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 52px;
  color: var(--text-muted);
  font-size: 13px;
}

@keyframes pulse-match {
  0%, 100% { box-shadow: 0 0 0 1px var(--danger); }
  50%       { box-shadow: 0 0 0 6px rgba(244,63,94,0.18); }
}

/* ── Match Alert Popup ───────────────────────────────────────────────────────── */
#match-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  pointer-events: none;
}
#match-popup-inner {
  position: absolute;
  top: 20px; right: 20px;
  width: 360px;
  pointer-events: all;
}
.match-card {
  background: rgba(11,16,32,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(240,78,107,0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  margin-bottom: var(--space-3);
  overflow: hidden;
  border-left: 3px solid var(--danger);
  animation: slide-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.match-card.banned {
  border-left-color: var(--purple);
  border-color: rgba(167,139,250,0.22);
  animation: slide-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--danger-light);
  border-bottom: 1px solid var(--danger-border);
  color: var(--danger);
}
.match-card.banned .match-card-header {
  background: var(--purple-light);
  border-bottom-color: var(--purple-border);
  color: var(--purple);
}
.match-card-header strong { font-size: 13px; font-weight: 700; }
.match-card-timer { font-size: 11px; opacity: 0.7; }
.match-card-body { display: flex; gap: var(--space-3); padding: var(--space-4); }
.match-card-img {
  width: 76px; height: 76px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--surface-3);
}
.match-card-info { flex: 1; min-width: 0; }
.match-card-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.match-card-detail { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.match-card-notes {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--danger-light);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--danger-border);
}
.match-card-footer { display: flex; gap: 8px; padding: 8px 14px 12px; }

@keyframes slide-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.modal-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: var(--space-5); }
.modal-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface-3);
  margin-bottom: var(--space-4);
}
@keyframes modal-in {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── Auth pages ──────────────────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  background: #0B1020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}
.aurora-full {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.af-1 {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 65vw;
  height: 65vw;
  background: radial-gradient(circle, rgba(79,70,229,0.30) 0%, transparent 65%);
  filter: blur(80px);
  border-radius: 50%;
  animation: af-drift-1 22s ease-in-out infinite;
}
.af-2 {
  position: absolute;
  bottom: -15%;
  right: -5%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(5,150,105,0.20) 0%, transparent 65%);
  filter: blur(90px);
  border-radius: 50%;
  animation: af-drift-2 28s ease-in-out infinite;
}
.af-3 {
  position: absolute;
  top: 35%;
  left: 40%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 65%);
  filter: blur(100px);
  border-radius: 50%;
  animation: af-drift-3 18s ease-in-out infinite;
}
.auth-shell > *:not(.aurora-full) { position: relative; z-index: 1; }
.auth-card {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.60);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-8);
}
.auth-logo img { width: 32px; height: 36px; }
.auth-logo-text { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.4px; }
.auth-logo-text span { color: var(--accent); }
.auth-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.auth-card p { font-size: 13px; color: var(--text-muted); margin-bottom: var(--space-6); }
.auth-footer { margin-top: var(--space-5); font-size: 13px; color: var(--text-muted); text-align: center; }

/* ── Tabs ────────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: var(--space-5);
  width: fit-content;
}
.tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ── Progress bar ────────────────────────────────────────────────────────────── */
.progress-bar { background: var(--surface-3); border-radius: var(--radius-full); height: 5px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.4s ease; }

/* ── Inline banners ──────────────────────────────────────────────────────────── */
.impersonate-bar {
  background: rgba(167,139,250,0.15);
  color: var(--purple);
  border-bottom: 1px solid var(--purple-border);
  padding: 10px var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
}
.announcement-bar {
  padding: 10px var(--space-6);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.ann-info     { background: var(--accent-light); color: var(--accent); border-bottom: 1px solid var(--accent-border); }
.ann-warning  { background: var(--warning-light); color: var(--warning); border-bottom: 1px solid var(--warning-border); }
.ann-critical { background: var(--danger-light); color: var(--danger); border-bottom: 1px solid var(--danger-border); }
.staff-bar {
  background: var(--warning-light);
  color: var(--warning);
  padding: 8px var(--space-6);
  font-size: 12px;
  border-bottom: 1px solid var(--warning-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Push URL ────────────────────────────────────────────────────────────────── */
.push-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  word-break: break-all;
  color: var(--text-secondary);
}
.push-url-dark {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--brand);
  color: var(--success);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  word-break: break-all;
}

/* ── Face profile ────────────────────────────────────────────────────────────── */
.photo-quality { display: flex; gap: 4px; align-items: center; }
.quality-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.quality-dot.filled { background: var(--accent); }
.quality-dot.good   { background: var(--success); }

/* ── Mobile header + hamburger ───────────────────────────────────────────────── */
.mobile-header {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 52px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
  flex-shrink: 0;
}
.hamburger {
  width: 36px; height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  padding: 0;
  transition: background 0.14s, color 0.14s;
}
.hamburger svg { width: 20px; height: 20px; }
.hamburger:hover { background: var(--surface-3); color: var(--text); }
.mobile-logo-link {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.mobile-logo-link span { color: var(--accent); }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }
body.sidebar-open { overflow: hidden; }

/* ── Responsiveness ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.26s cubic-bezier(0.4,0,0.2,1);
    z-index: 100;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-header { display: flex; }
  .topbar { display: none; }
  .page-content { padding: 16px; animation: none; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .page-header h1 { font-size: 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .stat-card { padding: 16px 18px; }
  .stat-value { font-size: 24px; }
  .form-grid, .form-grid-3, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-content > div[style*="grid-template-columns:1fr 320px"],
  .page-content > div[style*="grid-template-columns: 1fr 320px"] {
    grid-template-columns: 1fr !important;
  }
  #type-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .product-row { grid-template-columns: 1fr 1fr !important; }
  .product-row > *:first-child { grid-column: 1 / -1; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #match-popup-inner { width: calc(100vw - 24px); top: auto; bottom: 12px; right: 12px; left: 12px; }
  .tabs { width: 100%; overflow-x: auto; }
  .auth-card { padding: 28px 20px; }
  .card { padding: 16px; }
  h1 { font-size: 22px; }
  h2 { font-size: 15px; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 12px; }
  .page-header { gap: 10px; }
  .btn-lg { padding: 9px 16px; font-size: 13px; }
  .incidents-shell { padding: 0 8px !important; }
}

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1{margin-top:4px} .mt-2{margin-top:8px} .mt-3{margin-top:12px}
.mt-4{margin-top:16px} .mt-5{margin-top:20px} .mt-6{margin-top:24px}
.mb-2{margin-bottom:8px} .mb-4{margin-bottom:16px} .mb-6{margin-bottom:24px}
.text-sm { font-size: 12px; } .text-xs { font-size: 11px; }
.text-muted   { color: var(--text-muted); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-accent  { color: var(--accent); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }

/* ── Global Headings ─────────────────────────────────────────────────────────── */
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; color: var(--text); margin: 0 0 24px 0; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 16px 0; letter-spacing: -0.2px; }
h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 12px 0; }
p { color: var(--text-secondary); margin: 0 0 12px 0; }
p:last-child { margin-bottom: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card > *:last-child { margin-bottom: 0; }
.card a { color: var(--accent); font-weight: 500; }
.card a:hover { color: var(--accent-hover); }

/* ── Site Status Bar ─────────────────────────────────────────────────────────── */

/* ── Incident feed card ──────────────────────────────────────────────────────── */
.inc-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: box-shadow 0.18s;
}
.inc-card:hover { box-shadow: var(--shadow); }

/* ── Timeline ────────────────────────────────────────────────────────────────── */
.timeline-item {
  display: flex;
  gap: var(--space-3);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-thumb {
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.timeline-icon { width: 60px; flex-shrink: 0; text-align: center; font-size: 20px; padding-top: 4px; }
.timeline-comment {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-strong);
  font-style: italic;
}

/* ── Network sharing ─────────────────────────────────────────────────────────── */
.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--purple-light);
  color: var(--purple);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.share-terms {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.share-terms li { margin-bottom: 4px; }
.share-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 8px;
}
.share-check input { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.network-source { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.network-source-avatar {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.network-source-avatar.anon { background: var(--surface-3); color: var(--text-muted); }

/* ── Network Feed — structured safety notice cards ───────────────────────────── */
.inc-feed article.inc-card {
  border-left: 3px solid var(--purple-border);
  transition: border-left-color 0.2s, box-shadow 0.2s;
  margin-bottom: 14px;
}
.inc-feed article.inc-card:hover {
  border-left-color: var(--purple);
  box-shadow: var(--shadow);
}

/* ── Filter selects ──────────────────────────────────────────────────────────── */
.filter-select {
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: background 0.12s;
}
.filter-select:hover, .filter-select:focus { background: var(--surface-3); outline: none; }
.filter-select option { background: var(--surface-2); color: var(--text); }

/* ── Legacy / Compat ─────────────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.card > table { margin: -4px -4px 0; width: calc(100% + 8px); }
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}
.badge-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.badge-ok {
  display: inline-flex;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.badge-cam {
  display: inline-flex;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.empty { text-align: center; color: var(--text-muted); padding: 32px; font-size: 13px; }
.face-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  transition: transform 0.18s, box-shadow 0.18s;
}
.face-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.face-icon { font-size: 48px; }

.role-owner   { background: var(--accent-light); color: var(--accent); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid var(--accent-border); }
.role-manager { background: var(--success-light); color: var(--success); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid var(--success-border); }
.role-viewer  { background: var(--surface-3); color: var(--text-muted); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid var(--border); }

.status-active    { background: var(--success-light); color: var(--success); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid var(--success-border); }
.status-trial     { background: var(--accent-light); color: var(--accent); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid var(--accent-border); }
.status-suspended { background: var(--danger-light); color: var(--danger); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid var(--danger-border); }

.btn:not(.btn-secondary):not(.btn-danger):not(.btn-warning):not(.btn-success):not(.btn-ghost) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn:not(.btn-secondary):not(.btn-danger):not(.btn-warning):not(.btn-success):not(.btn-ghost):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

/* ── Aurora Design Language ──────────────────────────────────────────────────── */

/* Aurora ambient — hidden in main app, only used on auth pages */
.aurora-ambient { display: none; }

/* Auth page full aurora keyframes */
@keyframes af-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  33%       { transform: translate(6%, 5%) scale(1.12); opacity: 1; }
  66%       { transform: translate(-4%, 8%) scale(0.94); opacity: 0.75; }
}
@keyframes af-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  40%       { transform: translate(-7%, -5%) scale(1.1); opacity: 1; }
  80%       { transform: translate(5%, -8%) scale(1.05); opacity: 0.7; }
}
@keyframes af-drift-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50%       { transform: translate(-48%, -52%) scale(1.18); opacity: 1; }
}
.af-3 { transform: translate(-50%, -50%); }



/* Glass utility */
.glass {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}


/* inc-card solid */
.inc-card {
  background: var(--surface);
  border: 1px solid var(--border);
}

/* face-tile solid */
.face-tile {
  background: var(--surface);
  border: 1.5px solid var(--border);
}

/* modal glass – works because overlay darkens bg behind it */
.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xl);
}

/* stat card accent left-border variant */
.stat-card.accent-border { border-left: 2px solid var(--accent); }
.stat-card.danger-border { border-left: 2px solid var(--danger); }
.stat-card.success-border { border-left: 2px solid var(--success); }
.stat-card.warning-border { border-left: 2px solid var(--warning); }

/* ─────────────────────────────────────────────────────────────────────────────
   RECONIX PHASE 2 — COMPONENT SYSTEM
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Page Layout ────────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.page-header-meta { flex: 1; min-width: 0; }
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin: 0 0 4px 0;
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.1px;
}
.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

/* ── KPI Cards ───────────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.kpi-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.3;
  padding-top: 2px;
}
.kpi-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-icon-accent  { background: var(--accent-light);  color: var(--accent); }
.kpi-icon-danger  { background: var(--danger-light);  color: var(--danger); }
.kpi-icon-success { background: var(--success-light); color: var(--success); }
.kpi-icon-warning { background: var(--warning-light); color: var(--warning); }
.kpi-icon-info    { background: var(--info-light);    color: var(--info); }
.kpi-icon-muted   { background: var(--surface-3);     color: var(--text-muted); }
.kpi-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 12px;
}
.kpi-value.danger  { color: var(--danger); }
.kpi-value.success { color: var(--success); }
.kpi-value.warning { color: var(--warning); }
.kpi-value.accent  { color: var(--accent); }
.kpi-delta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.kpi-delta.up   { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* ── Action Panel ────────────────────────────────────────────────────────────── */
.action-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.action-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px 11px 18px;
  background: var(--accent-light);
  border-bottom: 1px solid var(--accent-border);
}
.action-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.action-panel-count {
  font-size: 11px;
  font-weight: 600;
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.action-panel-count.clear {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}
.action-items { padding: 0; }
.action-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.14s;
}
.action-item:last-child { border-bottom: none; }
.action-item:hover { background: var(--surface-2); text-decoration: none; }
.action-item-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.action-item-icon svg { width: 14px; height: 14px; }
.action-item-body { flex: 1; min-width: 0; }
.action-item-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}
.action-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin: 1px 0 0 0;
}
.action-item-arrow {
  width: 16px; height: 16px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.action-item-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  flex-shrink: 0;
}
.action-item-badge.warn {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning-border);
}
.action-item-badge.ok {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}

/* ── Banners ─────────────────────────────────────────────────────────────────── */
.banner {
  display: flex;
  gap: var(--space-3);
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: var(--space-4);
  font-size: 13px;
  line-height: 1.5;
}
.banner-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.banner-icon svg { width: 100%; height: 100%; }
.banner-body { flex: 1; min-width: 0; }
.banner-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 2px 0;
}
.banner-text {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  opacity: 0.85;
}
.banner-action {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.banner-action:hover { text-decoration: underline; }

.banner-info       { background: var(--info-light);    border-color: var(--info-border);    color: var(--info); }
.banner-success    { background: var(--success-light); border-color: var(--success-border); color: var(--success); }
.banner-warning    { background: var(--warning-light); border-color: var(--warning-border); color: var(--warning); }
.banner-danger     { background: var(--danger-light);  border-color: var(--danger-border);  color: var(--danger); }
.banner-compliance {
  background: var(--success-light);
  border-color: var(--success-border);
  color: var(--text-secondary);
  border-left: 3px solid var(--success);
}
.banner-compliance .banner-title { color: var(--success); }

/* ── Modals (standardised) ───────────────────────────────────────────────────── */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.modal-header-meta { flex: 1; min-width: 0; }
.modal-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 4px 0; }
.modal-description { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.4; }
.modal-body { margin-bottom: var(--space-5); }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.modal-footer-left { margin-right: auto; }
.modal-close {
  width: 30px; height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s, color 0.14s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }

/* ── Status Pills ────────────────────────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid;
  white-space: nowrap;
  line-height: 1.3;
}
.status-pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}
/* Incident statuses */
.status-draft         { background: var(--surface-3);     color: var(--text-muted);    border-color: var(--border); }
.status-open          { background: var(--accent-light);  color: var(--accent);         border-color: var(--accent-border); }
.status-submitted     { background: var(--accent-light);  color: var(--accent);         border-color: var(--accent-border); }
.status-review        { background: var(--warning-light); color: var(--warning);        border-color: var(--warning-border); }
.status-reviewed      { background: var(--purple-light);  color: var(--purple);         border-color: var(--purple-border); }
.status-evidence-linked { background: var(--info-light);  color: var(--info);           border-color: var(--info-border); }
.status-shared        { background: var(--purple-light);  color: var(--purple);         border-color: var(--purple-border); }
.status-resolved      { background: var(--success-light); color: var(--success);        border-color: var(--success-border); }
.status-closed        { background: var(--surface-3);     color: var(--text-muted);     border-color: var(--border); }
.status-expired       { background: var(--surface-3);     color: var(--text-faint);     border-color: var(--border); }
.status-pending       { background: var(--warning-light); color: var(--warning);        border-color: var(--warning-border); }
.status-confirmed     { background: var(--success-light); color: var(--success);        border-color: var(--success-border); }
.status-dismissed     { background: var(--surface-3);     color: var(--text-muted);     border-color: var(--border); }
.status-warning       { background: var(--warning-light); color: var(--warning);        border-color: var(--warning-border); }
.status-danger        { background: var(--danger-light);  color: var(--danger);         border-color: var(--danger-border); }
/* Alert review statuses */
.status-match         { background: var(--danger-light);  color: var(--danger);         border-color: var(--danger-border); }
.status-clear         { background: var(--success-light); color: var(--success);        border-color: var(--success-border); }
/* No leading dot for label-only pills */
.status-pill.no-dot::before { display: none; }

/* ── Data Table ──────────────────────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table .th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.data-table .td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child .td { border-bottom: none; }
.data-table tr:hover .td { background: var(--surface-2); }
.td-primary { font-weight: 600; }
.td-secondary { color: var(--text-secondary); font-size: 12px; }
.td-muted-sm { color: var(--text-muted); font-size: 11px; }
.td-mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }
.td-actions { display: flex; align-items: center; gap: var(--space-2); justify-content: flex-end; }

/* Row-level list (non-table) */
.list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.14s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-2); text-decoration: none; }
.row-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
.row-icon svg { width: 15px; height: 15px; }
.row-body { flex: 1; min-width: 0; }
.row-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.row-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ── Forms (standardised) ────────────────────────────────────────────────────── */
.form-section {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border);
}
.form-section:last-child { border-bottom: none; padding-bottom: 0; }
.form-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
}
.form-section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 var(--space-4) 0;
  line-height: 1.5;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-label.required::after {
  content: ' *';
  color: var(--danger);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-faint); }
.form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.form-select option { background: var(--surface-2); color: var(--text); }
.form-help {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  margin-top: var(--space-5);
}
.form-footer-left { margin-right: auto; }
/* Checkbox / radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  cursor: pointer;
  margin-bottom: var(--space-2);
}
.form-check input { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.form-check-label { font-size: 13px; color: var(--text-secondary); line-height: 1.4; cursor: pointer; }
.form-check-label small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Empty States ────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 32px;
  gap: var(--space-3);
}
.empty-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  margin-bottom: var(--space-1);
  flex-shrink: 0;
}
.empty-icon svg { width: 22px; height: 22px; }
.empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}
.empty-description {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.5;
  margin: 0;
}
.empty-action { margin-top: var(--space-2); }

/* ── Severity / Risk badges ──────────────────────────────────────────────────── */
.sev-low      { background: var(--surface-3);     color: var(--text-muted); border: 1px solid var(--border);           padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }
.sev-medium   { background: var(--warning-light); color: var(--warning);    border: 1px solid var(--warning-border);   padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }
.sev-high     { background: var(--danger-light);  color: var(--danger);     border: 1px solid var(--danger-border);    padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }
.sev-critical { background: var(--danger);        color: #fff;              border: 1px solid var(--danger);           padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; white-space: nowrap; }

/* ── Role badges ────────────────────────────────────────────────────────────── */
.role-badge-owner   { background: var(--accent-light);  color: var(--accent);       border: 1px solid var(--accent-border);  padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; display: inline-flex; white-space: nowrap; }
.role-badge-manager { background: var(--success-light); color: var(--success);      border: 1px solid var(--success-border); padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; display: inline-flex; white-space: nowrap; }
.role-badge-viewer  { background: var(--surface-3);     color: var(--text-muted);   border: 1px solid var(--border);         padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; display: inline-flex; white-space: nowrap; }

/* ── Dividers ────────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: var(--space-5) 0; }
.divider-label {
  position: relative;
  text-align: center;
  color: var(--text-faint);
  font-size: 11px;
  margin: var(--space-5) 0;
}
.divider-label::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.divider-label span {
  position: relative;
  background: var(--bg);
  padding: 0 var(--space-3);
}

/* ── Inline meta row ────────────────────────────────────────────────────────── */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--text-muted);
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.meta-item svg { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.7; }

/* ── Responsive Phase 2 ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .page-header { flex-direction: column; align-items: flex-start; margin-bottom: var(--space-6); }
  .page-actions { width: 100%; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 24px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   DETECTION CARD COMPONENT — reusable for Live Monitor LPR + FR tiles
   ───────────────────────────────────────────────────────────────────────────── */

/* Card shell */
.det-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border-strong);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.det-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

/* Tier accent top-borders */
.det-card.tier-match     { border-top-color: var(--danger); }
.det-card.tier-first     { border-top-color: var(--info); }
.det-card.tier-returning { border-top-color: var(--success); }
.det-card.tier-regular   { border-top-color: var(--warning); }

/* Match glow — contained, not neon */
.det-card.tier-match { box-shadow: 0 0 0 1px rgba(220,38,38,0.12), var(--shadow-sm); }
.det-card.tier-match:hover { box-shadow: 0 0 0 2px rgba(220,38,38,0.20), var(--shadow-md); }

/* Media container */
.det-card-fr .det-media  { position: relative; width: 100%; aspect-ratio: 1; background: var(--surface-3); overflow: hidden; }
.det-card-lpr .det-media { position: relative; width: 100%; height: 108px; background: var(--surface-3); overflow: hidden; }
.det-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Chip overlays on image */
.det-type {
  position: absolute; top: 7px; left: 7px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.92);
}
.det-badge {
  position: absolute; top: 7px; right: 7px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px; font-weight: 700; line-height: 1.4;
}
.det-badge.match { background: rgba(220,38,38,0.82); color: #fff; }
.det-badge.hit   { background: rgba(220,38,38,0.82); color: #fff; }

/* Info panel below media */
.det-info {
  padding: 9px 11px 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.det-info-name {
  font-size: 12px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.det-info-plate {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  font-size: 13px;
}
.det-info-meta {
  font-size: 10px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.det-onsite { color: var(--success); font-weight: 600; }

/* Tier pill inside info panel */
.det-tier {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  border: 1px solid;
}
.det-tier.tier-match     { background: var(--danger-light);  color: var(--danger);  border-color: var(--danger-border); }
.det-tier.tier-first     { background: var(--info-light);    color: var(--info);    border-color: var(--info-border); }
.det-tier.tier-returning { background: var(--success-light); color: var(--success); border-color: var(--success-border); }
.det-tier.tier-regular   { background: var(--warning-light); color: var(--warning); border-color: var(--warning-border); }

/* Detection grid */
.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 10px;
}
.feed-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 12px;
}

/* NZ Plate graphic */
.nz-plate-wrap {
  width: 100%; height: 100%;
  background: #F5F5F5;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.nz-plate-strip {
  position: absolute; left: 0; top: 0; bottom: 0; width: 22px;
  background: #003087;
  display: flex; flex-direction: column; align-items: center; justify-content: space-around;
  padding: 4px 0;
}
.nz-plate-num {
  margin-left: 26px; padding: 0 10px 8px;
  font-family: 'Arial Black', Impact, Arial, sans-serif;
  font-weight: 900; letter-spacing: 3px; color: #111;
  text-align: center; line-height: 1; text-transform: uppercase;
}
.nz-plate-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; height: 9px;
  background: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
}
.nz-plate-bottom span { color: #fff; font-size: 6px; font-weight: 700; letter-spacing: 2px; }

/* ── Live Monitor — operational console layout ──────────────────────────────── */
.mon-layout { display: flex; flex-direction: column; gap: 14px; }
.mon-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.mon-section-hd {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: space-between;
}
.mon-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-secondary);
}
.mon-section-sub { font-size: 11px; color: var(--text-muted); }
.mon-section-bd  { padding: 12px; max-height: 280px; overflow-y: auto; }
.mon-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 12px; }

/* On-site + faces rows */
.onsite-row, .person-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; border-radius: var(--radius);
  transition: background 0.1s;
}
.onsite-row:last-child, .person-row:last-child { border-bottom: none; }
.onsite-row:hover, .person-row:hover { background: var(--surface-3); }
.person-thumb {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  object-fit: cover; flex-shrink: 0;
  background: var(--surface-3);
  border: 1px solid var(--border);
}

/* Severity pills (monitor sidebar) */
.sev-pill { display: inline-block; padding: 1px 7px; border-radius: var(--radius-full); font-size: 10px; font-weight: 700; border: 1px solid; }
.sev-banned  { background: var(--danger-light);  color: var(--danger);  border-color: var(--danger-border); }
.sev-warning { background: var(--warning-light); color: var(--warning); border-color: var(--warning-border); }
.sev-watch   { background: var(--accent-light);  color: var(--accent);  border-color: var(--accent-border); }
.sev-stolen  { background: rgba(127,29,29,0.08); color: #7f1d1d;        border-color: rgba(127,29,29,0.20); }

/* ── Slide-out drawer ────────────────────────────────────────────────────────── */
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 360px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index: 500; display: flex; flex-direction: column; overflow: hidden;
}
.drawer.open { transform: translateX(0); }
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.22);
  z-index: 499; display: none;
  backdrop-filter: blur(2px);
}
.drawer-overlay.active { display: block; }
.drawer-img-wrap { background: var(--surface-3); flex-shrink: 0; border-bottom: 1px solid var(--border); }
.drawer-img-wrap img { width: 100%; max-height: 200px; object-fit: cover; display: block; }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 14px; }
.drawer-footer { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.dsec { margin-bottom: 14px; }
.dsec-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted); margin-bottom: 6px;
}
.dstat { background: var(--surface-2); padding: 10px; border-radius: var(--radius); text-align: center; border: 1px solid var(--border); }
.dstat-val { font-size: 20px; font-weight: 700; color: var(--text); }
.dstat-lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ── Toast notifications ─────────────────────────────────────────────────────── */
#toast-wrap {
  position: fixed; top: 16px; right: 16px; z-index: 600;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  padding: 11px 14px;
  min-width: 260px; pointer-events: all;
  animation: slide-in-r 0.3s ease;
}
@keyframes slide-in-r {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}

/* Monitor — disable content max-width (wide operational view) */
.monitor-wide .page-content,
.page-content.monitor-wide { max-width: none; }
