@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn[wght].woff2') format('woff2-variations'), url('../fonts/Vazirmatn[wght].woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* --- core tokens (same names as before — every template/inline-style keeps
     working; only the values changed) --- */
  --bg: #0a0e14;
  --card: #131920;
  --card-2: #1a222b;
  --border: #262f3b;
  --text: #edf1f5;
  --muted: #8b9aac;
  --muted-2: #5c6b7e;
  --accent: #e3a73e;
  --accent-dark: #c68a26;
  --danger: #2e1418;
  --danger-text: #f9c6c9;
  --danger-strong: #6b2228;
  --success: #12281d;
  --success-text: #a8efc4;
  --ok: #33c17b;
  --fail: #ef4b54;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 14px 30px -16px rgba(0,0,0,.6);

  /* --- extended tokens: status chips, severity, categorical/heatmap --- */
  --accent-soft: #2c220e;
  --accent-ink: #f0c673;
  --good: var(--ok);
  --good-soft: #12281d;
  --good-ink: var(--success-text);
  --warning: #e8763d;
  --warning-soft: #2c1b10;
  --warning-ink: #f6c9ac;
  --serious: #e86450;
  --serious-soft: #2c1712;
  --serious-ink: #f7c4b8;
  --critical: var(--fail);
  --critical-soft: var(--danger);
  --critical-ink: var(--danger-text);
  --cat-1: #4c8fe0;
  --cat-2: #d9722e;
  --cat-3: #1fa57a;
  --seq-1: #cde2fb;
  --seq-2: #86b6ef;
  --seq-3: #4c8fe0;
  --seq-4: #1c5cab;
  --seq-5: #0d366b;
}

* { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
}

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-size: 13.5px;
}

.num, code, .mono { font-variant-numeric: tabular-nums; }
.num { direction: ltr; unicode-bidi: isolate; }

/* ================= shell: grouped icon+label rail + top status strip ================= */
.shell { display: flex; min-height: 100vh; align-items: stretch; }

.side-rail {
  width: 236px; flex: none;
  background: var(--card); border-inline-start: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.rail-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 18px 15px; border-bottom: 1px solid var(--border); flex: none;
}
.rail-logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(155deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
}
.rail-logo svg { width: 18px; height: 18px; stroke: #1c1305; }
.rail-brand .rb-title { font-weight: 800; font-size: 14.5px; letter-spacing: .01em; }
.rail-brand .rb-sub { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 1px; }

.rail-module-switch {
  display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card-2);
  color: var(--text); font-size: 12.5px; font-weight: 700; text-decoration: none;
}
.rail-module-switch svg { width: 15px; height: 15px; flex: none; stroke: var(--muted); }
.rail-module-switch-hint { margin-inline-start: auto; font-size: 11px; color: var(--muted); font-weight: 600; }
.rail-module-switch:hover { border-color: var(--accent); }
.rail-links { flex: 1; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 14px; }
.rail-group { display: flex; flex-direction: column; gap: 1px; }
.rail-group-label { font-size: 11px; color: var(--muted-2); font-weight: 700; padding: 0 10px 5px; }
.rail-sub { opacity: .85; }
.rail-soon {
  font-size: 11px; color: var(--muted-2); padding: 8px 10px; margin-top: 4px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
}

.module-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px; margin-top: 22px;
}
.module-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 16px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.module-tile-emoji { font-size: 34px; }
.module-tile-label { font-size: 15px; font-weight: 800; margin-top: 4px; }
.module-tile-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* --- per-module theming (2026-09-01): each module's accent family, applied
   via data-module on <html> -- overrides the same tokens every existing
   button/focus-ring/active-nav-link already uses, so this is a full-app
   reskin per module, not just the sidebar. Hue families follow tara.txt's
   suggested colors, brightened enough to stay legible on this dark UI
   (tara.txt's own values were picked for a light header bar, too dark/muddy
   to use as-is for an accent color against #0a0e14). */
html[data-module="parking"] { --accent: #4a90d9; --accent-dark: #3a76b8; --accent-soft: #16283a; --accent-ink: #a8d0f5; }
html[data-module="school"] { --accent: #3ecf6e; --accent-dark: #2eb35c; --accent-soft: #0f2818; --accent-ink: #a8f0c4; }
html[data-module="home"] { --accent: #a066e0; --accent-dark: #8a4fc9; --accent-soft: #241534; --accent-ink: #ddc2f5; }
html[data-module="hotel"] { --accent: #e3a73e; --accent-dark: #c68a26; --accent-soft: #2c220e; --accent-ink: #f0c673; }
html[data-module="hospital"] { --accent: #38b6d9; --accent-dark: #2a9bb8; --accent-soft: #0f2830; --accent-ink: #a8e8f5; }
html[data-module="factory"] { --accent: #9ca3ad; --accent-dark: #7c828c; --accent-soft: #24262a; --accent-ink: #d5d9de; }
html[data-module="restaurant"] { --accent: #e0524a; --accent-dark: #c43f38; --accent-soft: #2e1414; --accent-ink: #f5b3af; }
html[data-module="gym"] { --accent: #e37a3e; --accent-dark: #c66426; --accent-soft: #2c1c0e; --accent-ink: #f5c19f; }
.rail-links a {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); text-decoration: none; padding: 8.5px 10px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; transition: background .15s, color .15s;
}
.rail-links a svg { width: 17px; height: 17px; flex: none; stroke: currentColor; }
.rail-links a:hover { background: var(--card-2); color: var(--text); }
.rail-links a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }

.rail-foot { padding: 11px 18px 16px; border-top: 1px solid var(--border); flex: none; }
.rail-user { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.rail-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--border);
  flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--muted);
}
.rail-user-name { font-size: 12.5px; font-weight: 700; }
.rail-user-role { font-size: 10.5px; color: var(--muted-2); }
.rail-logout {
  display: flex; align-items: center; gap: 8px;
  color: var(--fail); text-decoration: none; font-weight: 700; font-size: 12.5px;
}
.rail-logout svg { width: 15px; height: 15px; }
.rail-logout:hover { text-decoration: underline; }

.rail-toggle {
  display: none;
  width: 100%; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 55;
  background: var(--card); border: 0; border-bottom: 1px solid var(--border);
  color: var(--text); padding: 13px var(--space-5); cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700;
}
.rail-toggle svg { width: 17px; height: 17px; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .rail-toggle { display: flex; }
  .side-rail {
    position: fixed; inset-inline-start: 0; top: 0; height: 100vh; width: min(78vw, 288px);
    transform: translateX(100%); transition: transform .2s ease; z-index: 60;
    box-shadow: var(--shadow);
  }
  .side-rail.open { transform: translateX(0); }
}

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* persistent top status strip — same info everywhere, not just the dashboard */
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 0 26px; height: 52px; flex: none;
  border-bottom: 1px solid var(--border); background: var(--card); position: sticky; top: 0; z-index: 6;
  overflow-x: auto;
}
.tb-chip { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tb-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.tb-chip .dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--good-soft); }
.tb-chip .dot.warn { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.tb-chip .dot.fail { background: var(--fail); box-shadow: 0 0 0 3px var(--danger); }
.tb-chip strong { color: var(--text); font-weight: 800; }
.tb-sep { width: 1px; height: 16px; background: var(--border); flex: none; }
.tb-spacer { flex: 1; }
.tb-time { font-size: 12px; color: var(--muted-2); font-weight: 600; white-space: nowrap; }

main { padding: var(--space-5) 26px 40px; max-width: 1240px; margin: 0 auto; width: 100%; }
h1 { color: var(--text); margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: .01em; }
h2 { font-weight: 800; }
.subtitle { color: var(--muted); margin-bottom: var(--space-5); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); }
/* Masonry-style flow (not grid rows): cards have very uneven heights (a
   short banner card next to a form with 15+ number fields), and CSS grid
   forces every card in the same row to share that row's height even with
   align-items:start -- leaving a huge dead gap under the short ones. A
   multi-column flow packs cards top-to-bottom per column with no row
   matching, so short cards stack right after each other with no gap. */
.settings-grid { column-width: 420px; column-gap: var(--space-4); }
.settings-grid .card { break-inside: avoid; -webkit-column-break-inside: avoid; margin-bottom: var(--space-4); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-4) var(--space-5); box-shadow: var(--shadow);
}
.card h2 {
  font-size: 14.5px; color: var(--text); margin-top: 0; border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-2); margin-bottom: var(--space-3);
}

.btn {
  display: inline-block; background: var(--accent); color: #1c1305; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 700; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; transition: background .15s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.danger { background: var(--danger); color: var(--danger-text); }
.btn.danger:hover { background: var(--danger-strong); filter: none; }
.btn.secondary { background: var(--card-2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: #223049; filter: none; }

/* Toasts */
.toast-stack {
  position: fixed; top: var(--space-4); left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: var(--space-2); width: min(92vw, 420px);
}
.flash {
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  font-size: 13px; cursor: pointer; animation: toast-in .2s ease-out;
}
.flash.hide { animation: toast-out .2s ease-in forwards; }
.flash.success { background: var(--success); color: var(--success-text); }
.flash.error { background: var(--danger); color: var(--danger-text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .flash, .live-status-badge .dot, .mdot, .pulse-dot, .cam-live .dot { animation: none !important; } }

input[type=text], input[type=number], input[type=password], select {
  width: 100%; padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); background: var(--bg);
  border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); font-family: inherit; font-size: 13.5px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; font-weight: 600; }

.file-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.file-native {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.file-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  background: var(--card-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 12.5px; font-weight: 700;
  transition: background .15s; white-space: nowrap;
}
.file-btn:hover { background: #223049; }

.plate-input { display: flex; align-items: center; gap: 6px; margin-bottom: var(--space-3); }
.plate-input input, .plate-input select { width: auto; margin-bottom: 0; text-align: center; }
.plate-input .plate-part { width: 52px; flex: none; }
.plate-input .plate-part.plate-province { width: 44px; }
.plate-input .plate-letter { flex: none; padding-inline: 6px; font-weight: 700; }
.plate-input .plate-ir { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.file-native:focus-visible + .file-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-name { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

.user-form-layout { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.user-form-fields { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 14px; }
.user-form-fields > div { margin-bottom: 0; }
.avatar-upload { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; width: 116px; }
.avatar-drop {
  position: relative; width: 104px; height: 104px; border-radius: 50%; margin: 0;
  border: 2px dashed var(--border); background: var(--card-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.avatar-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.avatar-drop .avatar-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-placeholder { display: flex; color: var(--muted-2); }
.avatar-placeholder svg { width: 34px; height: 34px; }
.avatar-badge {
  position: absolute; bottom: 2px; inset-inline-end: 2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #1c1305; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--card); pointer-events: none;
}
.avatar-badge svg { width: 14px; height: 14px; }
.avatar-hint { font-size: 10.5px; color: var(--muted-2); text-align: center; line-height: 1.5; }

.capture-panel {
  display: none; flex-direction: column; gap: 10px; width: 100%; max-width: 360px;
  margin: 10px 0 16px; padding: var(--space-3); background: var(--card-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.capture-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.capture-cam-select { flex: 1; min-width: 0; }
.capture-count { font-size: 12px; color: var(--accent-ink); font-weight: 700; white-space: nowrap; }
.capture-preview {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg);
}
.capture-error {
  font-size: 12px; color: var(--muted); text-align: center; padding: var(--space-4) var(--space-2);
  background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.capture-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.capture-thumb { position: relative; width: 52px; height: 52px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.capture-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capture-thumb-remove {
  position: absolute; top: 0; left: 0; width: 18px; height: 18px; border: none; border-radius: 0 0 6px 0;
  background: rgba(6,10,18,0.78); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.capture-thumb-remove:hover { background: var(--danger, #b3413f); }

.customer-nav { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 2px; }
.customer-nav a {
  flex: none; padding: 7px 12px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--border);
  color: var(--text); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.customer-nav a:hover { background: var(--accent-soft); }
.customer-nav a.active { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); font-weight: 800; }

@media (max-width: 480px) {
  /* موبایل: عرض کافی برای ۵ دکمه توی یه خط نیست -- اسکرول افقی مخفی باعث میشد
     دکمه "خروج" بدون هیچ نشونه‌ای بیرون از دید بمونه. اینجا میره خط دوم، همیشه دیدست. */
  .customer-nav { flex-wrap: wrap; overflow-x: visible; }
}

/* پنل کوچیک توی کارت جا نمی‌شد و کاربر واضح نمی‌دید توی چه حالتیه --
   همون الگوی fs-active که برای نمای تمام‌صفحه‌ی دوربین‌ها استفاده شده
   (live_grid.html/live.html) اینجا هم به کار رفته. */
.capture-panel.fs-active {
  display: flex; position: fixed; inset: 0; z-index: 9999; max-width: none; width: 100vw; height: 100vh;
  margin: 0; border-radius: 0; background: var(--bg); padding: 24px;
  justify-content: center; align-items: center;
}
.capture-panel.fs-active .capture-panel-head,
.capture-panel.fs-active .capture-thumbs,
.capture-panel.fs-active .capture-error { width: 100%; max-width: 640px; }
.capture-panel.fs-active .capture-thumbs { justify-content: center; }
.capture-panel.fs-active .capture-preview {
  width: auto; max-width: min(92vw, 720px); max-height: 64vh; aspect-ratio: auto; object-fit: contain;
}
.capture-panel.fs-active .capture-shoot-btn { padding: 12px 30px; font-size: 15px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: var(--space-2) var(--space-3); text-align: right; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 11.5px; font-weight: 700; }
tbody tr:nth-child(even) { background: var(--card-2); }
tbody tr:hover { background: var(--accent-soft); }

.status-ok { color: var(--ok); font-weight: 700; }
.status-fail { color: var(--fail); font-weight: 700; }
.thumb { width: 100%; max-width: 320px; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-top: var(--space-2); }
code { background: var(--bg); padding: 2px 7px; border-radius: 5px; color: var(--accent-ink); font-size: 12px; border: 1px solid var(--border); }

.stat-box { text-align: center; }
.stat-box .num { font-size: 30px; font-weight: 800; color: var(--text); letter-spacing: .01em; }
.stat-box .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }

.row { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.badge { padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.active { background: var(--success); color: var(--success-text); }
.badge.inactive { background: var(--card-2); color: var(--muted); }
.badge.warning { background: var(--warning-soft); color: var(--warning-ink); }
.badge.serious { background: var(--serious-soft); color: var(--serious-ink); }

.empty-state { text-align: center; padding: 40px 16px; color: var(--muted-2); font-size: 13px; }

.monitor-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 10px 12px; background: var(--card-2); border-radius: var(--radius-sm); border: 1px solid var(--border); flex-wrap: wrap; row-gap: 6px; }
.mdot { width: 8px; height: 8px; border-radius: 50%; background: var(--fail); flex-shrink: 0; }
.mdot.on { background: var(--ok); }

/* /health resource readouts -- a label-over-value block reads much faster
   than the old inline "label: value" monitor-item at a glance, and the
   left accent bar echoes alert-row's severity language so a strained
   resource is visually distinct from a healthy one without extra copy. */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
.res-item {
  position: relative; padding: 11px 14px 11px 12px; background: var(--card-2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.res-item::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px;
  background: var(--good);
}
.res-item.warn::before { background: var(--warning); }
.res-item.crit::before { background: var(--critical); }
.res-lbl { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.res-val { font-size: 15px; font-weight: 800; letter-spacing: .01em; }

/* diagnostics results -- same severity-bar language as .alert-row/.res-item
   so a full-system check reads consistently with the rest of the panel
   instead of introducing yet another list style. */
.diag-item {
  position: relative; padding: 10px 14px 10px 12px; background: var(--card-2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.diag-item::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: var(--good);
}
.diag-item.warn::before { background: var(--warning); }
.diag-item.error::before { background: var(--critical); }
.diag-item .drow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.diag-item .dtitle { font-size: 13px; font-weight: 700; }
.diag-item .ddetail { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }

/* Live view */
.live-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: #000; max-width: 720px; aspect-ratio: 704 / 576;
}
.live-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-4);
}
.live-grid .live-wrap { max-width: none; border-radius: 0; border: none; }
.live-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.live-status-badge {
  position: absolute; top: var(--space-3); left: var(--space-3); display: flex; align-items: center; gap: 6px;
  background: rgba(6,10,18,0.8); padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; backdrop-filter: blur(3px);
  color: #fff;
}
.live-status-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse-dot 1.8s ease-in-out infinite; }
.live-status-badge.offline .dot { background: var(--fail); animation: none; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.live-wrap:has(.live-status-badge.offline)::after {
  content: 'پخش زنده در دسترس نیست';
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: rgba(6,10,18,.6); color: var(--muted); font-size: 13px; font-weight: 600; padding: var(--space-5);
}
.live-overlay {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center;
  background: rgba(6,10,18,0.78); color: var(--text); font-size: 14px; padding: var(--space-4);
}
.live-overlay.show { display: flex; }
.live-caption { font-size: 12px; color: var(--muted); margin-top: var(--space-2); }

/* Live wall (all-cameras NVR view) + real fullscreen + per-camera zoom */
.live-fs-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.live-fs-bar h1 { margin-bottom: 2px; }
.live-fs-bar .subtitle { margin-bottom: 0; }

.live-tile { cursor: zoom-in; }
.live-tile .live-wrap { position: relative; }
.live-zoom-hint {
  position: absolute; bottom: var(--space-3); right: var(--space-3); background: rgba(6,10,18,0.75); color: #fff;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; opacity: 0; transition: opacity .15s; pointer-events: none;
}
.live-tile:hover .live-zoom-hint { opacity: 1; }
.live-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 12px; }
.live-tile-foot strong { font-size: 13px; }
.live-tile-foot span { color: var(--muted); }

.live-grid.has-zoom { grid-template-columns: 1fr; }
.live-grid.has-zoom .live-tile { display: none; }
.live-grid.has-zoom .live-tile.zoomed { display: flex; flex-direction: column; cursor: zoom-out; }
.live-grid.has-zoom .live-tile.zoomed .live-wrap { flex: 1 1 auto; min-height: 0; aspect-ratio: unset; }

/* Full screen wall: driven by the .fs-active class (set in JS) so it works
   even if the browser blocks/ignores the native Fullscreen API request --
   position:fixed here guarantees the page covers the entire viewport on its
   own; requestFullscreen() (see live_grid.html) layers true monitor-level
   fullscreen (hides tabs/address bar/taskbar) on top of this when allowed. */
.live-fs-root.fs-active {
  position: fixed; inset: 0; z-index: 9999;
  background: #05070c; padding: 12px; display: flex; flex-direction: column; overflow: hidden;
}
.live-fs-root.fs-active .live-fs-bar h1,
.live-fs-root.fs-active .live-fs-bar .subtitle { display: none; }
.live-fs-root.fs-active .live-fs-bar { margin-bottom: 8px; flex: 0 0 auto; justify-content: flex-end; }
.live-fs-root.fs-active .live-grid { flex: 1 1 auto; min-height: 0; height: 100%; grid-auto-rows: 1fr; gap: 8px; }
.live-fs-root.fs-active .live-grid .card { height: 100%; min-height: 0; display: flex; flex-direction: column; border-radius: 8px; }
.live-fs-root.fs-active .live-wrap { flex: 1 1 auto; min-height: 0; aspect-ratio: unset; }
.live-fs-root.fs-active .live-tile-foot { flex: 0 0 auto; }

.single-live-card { max-width: 760px; }
.single-live-card .live-wrap { cursor: zoom-in; }
.live-fs-root.fs-active .single-live-card .live-wrap { cursor: default; }

/* Single-camera page (live.html) fullscreen variant */
.live-fs-root.fs-active .single-live-card {
  max-width: none; width: 100%; height: 100%; margin: 0; display: flex; flex-direction: column; min-height: 0;
}
.live-fs-root.fs-active .single-live-card .live-wrap {
  max-width: none; width: 100%; flex: 1 1 auto; min-height: 0; aspect-ratio: unset;
}
.live-fs-root.fs-active .single-live-card .live-caption { display: none; }
.live-fs-root.fs-active .single-live-card .row { flex: 0 0 auto; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4,6,10,0.65); display: none; align-items: center; justify-content: center;
  z-index: 100; padding: var(--space-4);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-5); width: min(92vw, 480px); box-shadow: var(--shadow);
  /* 2026-08-25: no height cap here meant a modal taller than the viewport
     (e.g. the camera-edit modal after adding the device-credential fields)
     got clipped off both the top and bottom of the screen with no way to
     scroll down to its own Save button -- only workaround was zooming the
     whole page out. Modal itself now scrolls internally instead. */
  max-height: 88vh; overflow-y: auto;
}
.modal h2 { margin-top: 0; border: 0; padding: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-4); }

/* ---------------- Dashboard-specific components ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-4); }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 17px; display: flex; flex-direction: column; gap: 9px;
  text-decoration: none; color: inherit;
}
.stat-card .stop { display: flex; align-items: center; justify-content: space-between; }
.stat-card .slabel { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat-card .sicon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; }
.stat-card .sicon svg { width: 16px; height: 16px; stroke-width: 1.75; }
.stat-card .sval { font-size: 26px; font-weight: 800; letter-spacing: .01em; }
.stat-card .sfoot { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.pulse-dot.on { background: var(--ok); animation: pulse-dot 1.8s ease-in-out infinite; }
.pulse-dot.off { background: var(--muted-2); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; }
.chip.good { background: var(--good-soft); color: var(--good-ink); }
.chip.critical { background: var(--critical-soft); color: var(--critical-ink); }
.chip.serious { background: var(--serious-soft); color: var(--serious-ink); }
.chip.muted { background: var(--card-2); color: var(--muted); }

.plate-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--card-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 9px; font-weight: 700; font-size: 12.5px; direction: ltr; unicode-bidi: isolate; }

.monitor-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-5); }
.monitor-section-label { font-size: 12px; font-weight: 800; color: var(--accent-ink); margin-bottom: var(--space-2); padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.monitor-section .monitor-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.monitor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); }

/* Dashboard: two-column layout (main content + alerts sidebar) so the live
   camera/table and the alert feed don't just blur together in one long
   stack -- collapses to a single column on narrow screens. */
/* align-items left at the default (stretch, not "start") on purpose: with
   few alerts the side column is naturally much shorter than the main one,
   and "start" left a large dead gap below the alerts card before the next
   full-width section -- stretching lets the alerts card grow to match the
   main column's height instead, so the leftover room reads as "space
   inside a card" rather than "a layout gap between two boxes". */
.dash-columns { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-4); }
.dash-main { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.dash-side { display: flex; flex-direction: column; min-width: 0; }
.dash-side > .card { flex: 1; display: flex; flex-direction: column; }
.dash-side > .card > .alert-feed { flex: 1; }
.dash-side > .card > .empty-state { flex: 1; display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .dash-columns { grid-template-columns: 1fr; }
  .dash-side > .card { flex: none; }
}

/* Dashboard: compact capability status chips -- replaces a wall of ~16
   padded box rows with small inline pills grouped under a light label, so
   "نظارت هوشمند" reads as a scannable summary instead of another table. */
.cap-groups { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-3); }
.cap-group-label { font-size: 12px; font-weight: 800; color: var(--accent-ink); margin-bottom: 8px; }
.cap-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cap-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  padding: 6px 12px 6px 8px; background: var(--card-2); border: 1px solid var(--border); border-radius: 99px;
  white-space: nowrap;
}
.cap-chip .badge { font-size: 10px; padding: 2px 8px; margin-inline-start: 2px; }

.alert-feed { display: flex; flex-direction: column; }
.alert-row { display: flex; gap: 11px; padding: 12px 4px; border-bottom: 1px solid var(--border); position: relative; padding-inline-start: 13px; }
.alert-row:last-child { border-bottom: 0; }
.alert-row::before { content: ''; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; }
.alert-row.sev-critical::before { background: var(--critical); }
.alert-row.sev-serious::before { background: var(--serious); }
.alert-row.sev-warning::before { background: var(--warning); }
.alert-row.sev-info::before { background: var(--muted-2); }
.alert-row .atitle { font-size: 13px; font-weight: 700; line-height: 1.55; }
.alert-row .ameta { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alert-row .atag { font-size: 9.5px; font-weight: 800; padding: 1px 6px; border-radius: 5px; }
.alert-row .aplay { color: var(--accent-ink); font-weight: 700; text-decoration: none; }

.zone-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; font-weight: 600; }
.zone-bar { height: 7px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin-bottom: 13px; }
.zone-bar > i { display: block; height: 100%; border-radius: 99px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-inline-end: 5px; }

.media-lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(5, 7, 10, .92); align-items: center; justify-content: center; padding: 40px;
}
.media-lightbox.open { display: flex; }
.media-lightbox-inner { max-width: 92vw; max-height: 88vh; display: flex; }
.media-lightbox-inner img, .media-lightbox-inner video {
  max-width: 92vw; max-height: 88vh; border-radius: var(--radius); border: 1px solid var(--border); display: block;
}
.media-lightbox-inner iframe {
  width: 90vw; height: 85vh; border-radius: var(--radius); border: 1px solid var(--border);
  display: block; background: #070b14;
}
.media-lightbox-close {
  position: absolute; top: 18px; inset-inline-end: 22px;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 18px; cursor: pointer; line-height: 1;
}
.media-lightbox-close:hover { background: var(--card-2); }

/* RuView (WiFi-radar sensor) native pages -- 2026-08-30 rebuild out of the
   iframe-embedded standalone app. Local tab bar between the 4 pages, plus a
   few widgets (meter/badge/table) specific to the sensitivity + calibration
   pages. The radar/chart canvases keep their own dark "scope" look (drawn in
   JS, not CSS) -- deliberate instrument-panel aesthetic, not a chrome issue. */
.ruview-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.ruview-tabs a {
  font-size: 12.5px; color: var(--muted); text-decoration: none;
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
}
.ruview-tabs a.active { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.ruview-tabs a:hover { color: var(--text); }

/* 2026-08-30: multi-room -- a second, visually distinct pill row (smaller,
   rounder, dashed border) picking WHICH room a page shows, so it doesn't
   read as a second copy of the .ruview-tabs page nav directly above it. */
.ruview-room-switcher { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.ruview-room-switcher a {
  font-size: 11.5px; color: var(--muted); text-decoration: none;
  padding: 4px 12px; border-radius: 999px; border: 1px dashed var(--border);
}
.ruview-room-switcher a.active { color: var(--accent-ink); border-style: solid; border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.ruview-room-switcher a:hover { color: var(--text); }

.ruview-stage { display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; }
.ruview-state { font-size: 26px; font-weight: 800; margin: 10px 0 2px; font-family: 'Courier New', monospace; }
.ruview-state.occupied { color: var(--danger-text); }
.ruview-state.empty { color: var(--success-text); }
.ruview-state.unknown { color: var(--muted); }
.ruview-meta { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.9; font-family: 'Courier New', monospace; }
.ruview-meta .stale { color: var(--warning-ink); }
.ruview-sound-hint { font-size: 12.5px; color: var(--success-text); cursor: pointer; margin-top: 4px; }
.ruview-chartlabel { font-size: 11px; color: var(--muted); margin-top: 6px; }

.ruview-meter { position: relative; height: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; margin-top: 10px; overflow: hidden; }
.ruview-meter .fill { position: absolute; top: 0; inset-inline-end: 0; bottom: 0; background: var(--card-2); transition: width .3s; }
.ruview-meter .fill.occ { background: var(--danger-strong); }
.ruview-meter .fill.emp { background: var(--success); }
.ruview-meter .markline { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--accent); }
.ruview-field { margin-bottom: 22px; }
.ruview-field:last-child { margin-bottom: 0; }
.ruview-field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ruview-field-head label { font-size: 13px; color: var(--text); font-weight: 600; }
.ruview-field-head .val { font-family: 'Courier New', monospace; font-size: 13px; color: var(--accent-ink); }
.ruview-range-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.ruview-live-now { font-size: 11px; color: var(--muted); margin-top: 6px; font-family: 'Courier New', monospace; }
input[type=range].ruview-range { width: 100%; accent-color: var(--accent); height: 20px; }

.ruview-phase-row { display: flex; gap: 12px; margin-bottom: 14px; }
.ruview-phase-btn {
  flex: 1; padding: 16px 8px; border-radius: 10px; border: 2px solid var(--border); background: var(--bg);
  color: var(--text); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-align: center;
}
.ruview-phase-btn.empty { border-color: var(--success); }
.ruview-phase-btn.occupied { border-color: var(--danger-strong); }
.ruview-phase-btn:disabled { opacity: .45; cursor: not-allowed; }
.ruview-phase-btn .check { font-size: 11px; color: var(--success-text); display: block; margin-top: 6px; font-family: 'Courier New', monospace; }
.ruview-prog-wrap { display: none; margin-bottom: 14px; }
.ruview-prog-wrap.show { display: block; }
.ruview-prog-bar { height: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.ruview-prog-bar .fill { height: 100%; background: var(--accent); width: 0%; transition: width .4s linear; }
.ruview-prog-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; font-family: 'Courier New', monospace; display: flex; justify-content: space-between; }
.ruview-result-msg { font-size: 12.5px; margin-top: 12px; line-height: 1.8; font-family: 'Courier New', monospace; white-space: pre-wrap; }
.ruview-result-msg.ok { color: var(--success-text); }
.ruview-result-msg.err { color: var(--danger-text); }
.ruview-summary-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--border); font-family: 'Courier New', monospace; }
.ruview-summary-row:last-child { border-bottom: none; }
.ruview-summary-row span:last-child { color: var(--text); }

/* ========================================================================
   ElementCore Control Room — visual refresh (2026-09-05)
   This final layer intentionally keeps every existing component/route API
   intact. It only raises the shared visual system, responsiveness and focus
   treatment so old and new templates inherit the same finish.
   ======================================================================== */

:root {
  --bg: #080b12;
  --card: #111722;
  --card-2: #182130;
  --border: rgba(151, 170, 199, .14);
  --text: #f4f7fb;
  --muted: #9aa8bb;
  --muted-2: #68778c;
  --accent: #e6b85c;
  --accent-dark: #c88a2c;
  --accent-soft: rgba(230, 184, 92, .12);
  --accent-ink: #f3d99e;
  --danger: rgba(239, 78, 91, .13);
  --danger-text: #ffbdc3;
  --danger-strong: #a93643;
  --success: rgba(51, 193, 123, .13);
  --success-text: #9ce3bd;
  --warning-soft: rgba(232, 118, 61, .13);
  --warning-ink: #f5c2a5;
  --serious-soft: rgba(232, 100, 80, .13);
  --critical-soft: rgba(239, 75, 84, .13);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .025) inset,
            0 18px 48px -28px rgba(0, 0, 0, .85);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, .04) inset,
                  0 24px 56px -27px rgba(0, 0, 0, .9);
  --accent-rgb: 230, 184, 92;
}

html[data-module="parking"] { --accent-rgb: 74, 144, 217; }
html[data-module="school"] { --accent-rgb: 62, 207, 110; }
html[data-module="home"] { --accent-rgb: 160, 102, 224; }
html[data-module="hotel"] { --accent-rgb: 227, 167, 62; }
html[data-module="hospital"] { --accent-rgb: 56, 182, 217; }
html[data-module="factory"] { --accent-rgb: 156, 163, 173; }
html[data-module="restaurant"] { --accent-rgb: 224, 82, 74; }
html[data-module="gym"] { --accent-rgb: 227, 122, 62; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 680px at 88% -16%, rgba(var(--accent-rgb), .09), transparent 62%),
    radial-gradient(840px 620px at -15% 72%, rgba(49, 104, 183, .07), transparent 66%),
    linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { color: #fff; background: rgba(var(--accent-rgb), .42); }

* {
  scrollbar-color: rgba(var(--accent-rgb), .34) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), .3); border-radius: 99px; }

a, button, input, select, textarea { transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), .25);
  outline-offset: 2px;
}

/* App frame */
.shell { min-height: 100dvh; }

.side-rail {
  width: 250px;
  border-inline-start: 0;
  border-inline-end: 1px solid var(--border);
  background:
    radial-gradient(300px 210px at 50% 0, rgba(var(--accent-rgb), .095), transparent 72%),
    rgba(13, 18, 27, .94);
  box-shadow: -20px 0 60px -42px rgba(0, 0, 0, .95);
  backdrop-filter: blur(22px) saturate(125%);
}

.rail-brand {
  min-height: 76px;
  padding: 17px 18px;
  gap: 12px;
  border-color: var(--border);
}

.rail-logo {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 1), var(--accent-dark));
  box-shadow: 0 12px 30px -13px rgba(var(--accent-rgb), .7), inset 0 1px rgba(255, 255, 255, .38);
}

.rail-logo::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(var(--accent-rgb), .15);
  border-radius: 18px;
  pointer-events: none;
}

.rail-logo svg { width: 20px; height: 20px; }
.rail-brand .rb-title { font-size: 15px; font-weight: 900; letter-spacing: -.015em; }
.rail-brand .rb-sub { color: var(--muted); font-size: 11px; }

.rail-module-switch {
  min-height: 46px;
  margin: 13px 12px 2px;
  padding: 9px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .018));
  box-shadow: inset 0 1px rgba(255, 255, 255, .02);
}

.rail-module-switch:hover {
  border-color: rgba(var(--accent-rgb), .38);
  background: rgba(var(--accent-rgb), .075);
  transform: translateY(-1px);
}

.rail-links { gap: 17px; padding: 14px 11px 12px; }
.rail-group { gap: 3px; }
.rail-group-label {
  padding: 0 11px 6px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .035em;
}

.rail-links a {
  min-height: 38px;
  gap: 11px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 12.8px;
  font-weight: 650;
}

.rail-links a svg { width: 18px; height: 18px; stroke-width: 1.75; }
.rail-links a:hover { color: var(--text); background: rgba(255, 255, 255, .035); border-color: rgba(255, 255, 255, .025); transform: translateX(-2px); }
.rail-links a.active {
  color: #fff;
  border-color: rgba(var(--accent-rgb), .13);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .19), rgba(var(--accent-rgb), .075));
  box-shadow: inset -3px 0 var(--accent), 0 9px 24px -18px rgba(var(--accent-rgb), .8);
}

.rail-links a.active svg { color: var(--accent); filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .3)); }
.rail-soon { border-radius: 12px; background: rgba(255, 255, 255, .016); }

.rail-foot {
  padding: 14px 18px 17px;
  background: rgba(6, 9, 15, .25);
  border-color: var(--border);
}

.rail-avatar {
  width: 34px;
  height: 34px;
  border-color: rgba(var(--accent-rgb), .2);
  background: rgba(var(--accent-rgb), .1);
  color: var(--accent-ink);
}

.rail-logout { opacity: .8; }
.rail-logout:hover { opacity: 1; text-decoration: none; }

.main-col { min-height: 100dvh; }

.topbar {
  height: 62px;
  padding: 0 32px;
  gap: 14px;
  border-color: var(--border);
  background: rgba(9, 13, 20, .74);
  box-shadow: 0 12px 34px -29px rgba(0, 0, 0, .95);
  backdrop-filter: blur(22px) saturate(135%);
}

.tb-chip { gap: 8px; color: var(--muted); font-size: 12px; font-weight: 680; }
.tb-chip strong { color: var(--text); font-weight: 850; }
.tb-chip .dot { width: 7px; height: 7px; box-shadow: 0 0 0 4px rgba(104, 119, 140, .1); }
.tb-chip .dot.ok { box-shadow: 0 0 0 4px rgba(51, 193, 123, .1), 0 0 13px rgba(51, 193, 123, .25); }
.tb-chip .dot.warn { box-shadow: 0 0 0 4px rgba(232, 118, 61, .1), 0 0 13px rgba(232, 118, 61, .2); }
.tb-chip .dot.fail { box-shadow: 0 0 0 4px rgba(239, 75, 84, .1), 0 0 13px rgba(239, 75, 84, .2); }
.tb-sep { height: 20px; background: var(--border); }
.tb-time { color: var(--muted-2); }

main {
  max-width: 1480px;
  padding: 30px 34px 64px;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(23px, 2vw, 29px);
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -.025em;
}

h2 { letter-spacing: -.012em; }
.subtitle { margin-bottom: 24px; color: var(--muted); font-size: 13.5px; line-height: 1.8; }

/* Surfaces and layout */
.grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.settings-grid { column-width: 460px; column-gap: 20px; }
.settings-grid .card { margin-bottom: 20px; }

.card, .stat-card, .module-tile {
  border-color: var(--border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 36%),
    linear-gradient(165deg, rgba(18, 25, 37, .97), rgba(14, 20, 30, .97));
  box-shadow: var(--shadow);
}

.card {
  padding: 21px 22px;
  border-radius: var(--radius);
}

.card h2 {
  margin-bottom: 17px;
  padding-bottom: 13px;
  border-color: var(--border);
  font-size: 15.5px;
  font-weight: 880;
}

a.card:hover, .module-tile:hover, .stat-card:hover {
  border-color: rgba(var(--accent-rgb), .3);
  box-shadow: var(--shadow-hover), 0 0 0 1px rgba(var(--accent-rgb), .035) inset;
  transform: translateY(-2px);
}

.module-grid { grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 18px; margin-top: 28px; }
.module-tile {
  position: relative;
  min-height: 210px;
  justify-content: center;
  gap: 10px;
  padding: 27px 20px;
  border-radius: 22px;
  overflow: hidden;
}

.module-tile::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  top: -95px;
  inset-inline-start: -65px;
  border-radius: 50%;
  background: var(--tile-accent, var(--accent));
  opacity: .09;
  filter: blur(6px);
  transition: transform .3s ease, opacity .3s ease;
}

.module-tile:hover::before { opacity: .16; transform: scale(1.28); }
.module-tile-emoji {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 21px;
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
  font-size: 33px;
}
.module-tile-label { margin-top: 4px; font-size: 16px; font-weight: 900; }
.module-tile-desc { max-width: 210px; color: var(--muted); font-size: 12.5px; line-height: 1.75; }

/* Controls */
.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 17px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: #07101c;
  box-shadow: 0 11px 25px -14px rgba(var(--accent-rgb), .72), inset 0 1px rgba(255, 255, 255, .3);
  font-size: 13px;
  font-weight: 850;
}

.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 15px 30px -15px rgba(var(--accent-rgb), .8), inset 0 1px rgba(255, 255, 255, .35); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.small { min-height: 34px; padding: 5px 11px; border-radius: 10px; }
.btn.secondary {
  color: var(--text);
  border-color: var(--border);
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.btn.secondary:hover { background: rgba(255, 255, 255, .075); border-color: rgba(var(--accent-rgb), .28); }
.btn.danger {
  color: var(--danger-text);
  border-color: rgba(239, 75, 84, .17);
  background: linear-gradient(145deg, rgba(132, 35, 44, .52), rgba(70, 24, 31, .6));
  box-shadow: none;
}
.btn:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; transform: none; }

input[type=text], input[type=number], input[type=password], input[type=email], input[type=tel], input[type=url],
input[type=date], input[type=time], select, textarea {
  min-height: 44px;
  padding: 9px 13px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 9, 15, .64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .018);
  font-family: inherit;
  font-size: 13.5px;
}

textarea { width: 100%; min-height: 108px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: rgba(151, 170, 199, .25); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), .68);
  background: rgba(6, 10, 17, .82);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .09), inset 0 1px rgba(255, 255, 255, .02);
}

input::placeholder, textarea::placeholder { color: #59687d; opacity: 1; }
label { margin-bottom: 6px; color: var(--muted); font-size: 12.5px; font-weight: 720; }
.file-btn { min-height: 40px; border-radius: 11px; background: rgba(255, 255, 255, .035); }
.file-btn:hover { border-color: rgba(var(--accent-rgb), .32); background: rgba(var(--accent-rgb), .08); }

/* Data, status and feedback */
.table-wrap { margin-inline: -4px; padding: 0 4px 4px; }
table { font-size: 13.5px; }
th, td { padding: 12px 13px; border-color: var(--border); }
th { color: var(--muted); font-size: 11.8px; font-weight: 800; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .018); }
tbody tr:hover { background: rgba(var(--accent-rgb), .07); }

.badge, .chip {
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 999px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.badge { padding: 4px 10px; }
.chip { padding: 5px 10px; }
.plate-badge { padding: 5px 10px; border-radius: 9px; background: rgba(4, 8, 14, .55); }
code { padding: 3px 8px; border-radius: 8px; background: rgba(4, 8, 14, .6); }

.toast-stack { top: 20px; width: min(92vw, 460px); }
.flash { padding: 13px 16px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; backdrop-filter: blur(18px); }

.empty-state {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 45px 20px;
  border: 1px dashed rgba(151, 170, 199, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .012);
}

.monitor-item, .res-item, .diag-item {
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.modal-backdrop { background: rgba(2, 5, 10, .76); backdrop-filter: blur(9px); }
.modal { padding: 25px; border-radius: 22px; box-shadow: 0 32px 90px -30px #000; }

/* Dashboard and monitoring */
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 18px; }
.stat-card {
  position: relative;
  min-height: 145px;
  padding: 19px 20px;
  gap: 10px;
  border-radius: 19px;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  top: -65px;
  inset-inline-end: -50px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .09);
  filter: blur(2px);
  pointer-events: none;
}

.stat-card .slabel { color: var(--muted); font-size: 12.5px; font-weight: 760; }
.stat-card .sicon {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 12px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}
.stat-card .sicon svg { width: 18px; height: 18px; }
.stat-card .sval { font-size: 32px; line-height: 1.1; font-weight: 900; letter-spacing: -.025em; }
.stat-card .sfoot { margin-top: auto; font-size: 11.8px; }
.dash-columns { grid-template-columns: minmax(0, 2.05fr) minmax(300px, .95fr); gap: 20px; }
.dash-main { gap: 20px; }
.alert-row { padding: 14px 7px 14px 15px; gap: 12px; }
.alert-row::before { width: 3px; border-radius: 3px; }
.cap-chip { padding: 7px 13px 7px 9px; border-radius: 999px; background: rgba(255, 255, 255, .025); }
.zone-bar { height: 8px; background: rgba(255, 255, 255, .035); }

/* Camera surfaces */
.live-wrap {
  border-color: rgba(151, 170, 199, .18);
  border-radius: 16px;
  background: #020408;
  box-shadow: 0 16px 40px -28px #000;
}
.live-status-badge {
  top: 13px;
  left: 13px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(4, 8, 14, .72);
  backdrop-filter: blur(14px);
}
.live-tile-foot { padding: 12px 15px; }
.live-zoom-hint { padding: 5px 10px; backdrop-filter: blur(10px); }
.capture-panel { border-radius: 15px; background: rgba(255, 255, 255, .025); }

/* Secondary navigation */
.customer-nav, .ruview-tabs { gap: 8px; padding-bottom: 4px; }
.customer-nav a, .ruview-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .018);
}
.customer-nav a.active, .ruview-tabs a.active { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .06); }
.ruview-room-switcher a { padding: 5px 13px; background: rgba(255, 255, 255, .014); }

/* Standalone login, setup, customer and intercom pages. Their templates
   include small local style blocks; these higher-specificity selectors keep
   their layout while applying this shared visual finish. */
body > .box {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  padding: 38px;
  border: 1px solid rgba(151, 170, 199, .16);
  border-radius: 26px;
  background:
    radial-gradient(320px 190px at 85% 0, rgba(var(--accent-rgb), .12), transparent 68%),
    linear-gradient(155deg, rgba(20, 28, 41, .97), rgba(12, 18, 27, .98));
  box-shadow: 0 40px 110px -46px #000, inset 0 1px rgba(255, 255, 255, .035);
  overflow: hidden;
}

body > .box::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .62), transparent);
}

body > .box h1 { margin-bottom: 12px; font-size: 20px; }
body > .box h1 .mark, body > .box > .mark {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  box-shadow: 0 18px 40px -18px rgba(var(--accent-rgb), .72), inset 0 1px rgba(255, 255, 255, .38);
}
body > .box h1 .mark svg, body > .box > .mark svg { width: 27px; height: 27px; }
body > .box .sub { margin-bottom: 24px; color: var(--muted); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
body > .box form input { min-height: 50px; margin-bottom: 13px; }
body > .box form button, body > .box .btn { min-height: 48px; border-radius: 14px; }

body > .wrap { position: relative; }
body > .wrap > .topbar {
  position: relative;
  top: auto;
  height: auto;
  min-height: 68px;
  margin-bottom: 20px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(14, 20, 30, .78);
  box-shadow: var(--shadow);
}
body > .wrap > .topbar h1 { font-size: 19px; }
body > .wrap > .card { margin-bottom: 18px; }

.unit-grid button {
  min-height: 60px;
  border-color: var(--border) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .03) !important;
}
.unit-grid button:hover { border-color: rgba(var(--accent-rgb), .36) !important; background: rgba(var(--accent-rgb), .09) !important; transform: translateY(-1px); }
.snapshot { border-radius: 16px !important; }

@media (max-width: 1100px) {
  main { padding-inline: 26px; }
  .dash-columns { grid-template-columns: 1fr; }
  .dash-side > .card { flex: none; }
}

@media (max-width: 900px) {
  body { background-size: auto, auto, 34px 34px, 34px 34px; }
  .rail-toggle {
    min-height: 58px;
    padding: 12px 17px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    background: rgba(10, 14, 22, .93);
    backdrop-filter: blur(20px);
  }
  .rail-toggle svg { width: 19px; height: 19px; }
  .side-rail {
    width: min(86vw, 320px);
    border-inline-end: 1px solid var(--border);
    box-shadow: -24px 0 70px -24px #000;
  }
  body:has(.side-rail.open)::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 58;
    background: rgba(1, 4, 9, .62);
    backdrop-filter: blur(4px);
    pointer-events: none;
  }
  .side-rail.open { z-index: 60; }
  .topbar { top: 58px; height: 54px; padding: 0 18px; }
  main { padding: 24px 18px 54px; }
  .settings-grid { column-width: auto; column-count: 1; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .topbar { gap: 10px; }
  .tb-sep { display: none; }
  .tb-time { display: none; }
  main { padding: 20px 14px 44px; }
  h1 { font-size: 22px; }
  .subtitle { margin-bottom: 19px; font-size: 12.5px; }
  .card { padding: 18px 16px; border-radius: 17px; }
  .card h2 { font-size: 14.5px; }
  .grid, .live-grid { grid-template-columns: 1fr; gap: 14px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-card { min-height: 132px; padding: 16px; border-radius: 16px; }
  .stat-card .sval { font-size: 27px; }
  .stat-card .slabel { font-size: 11.5px; }
  .stat-card .sfoot { font-size: 10.5px; }
  .module-grid { gap: 12px; }
  .module-tile { min-height: 180px; padding: 20px 13px; border-radius: 18px; }
  .module-tile-emoji { width: 56px; height: 56px; border-radius: 17px; font-size: 28px; }
  .module-tile-desc { font-size: 11px; }
  .btn { min-height: 44px; }
  .modal { width: min(94vw, 480px); padding: 20px 17px; border-radius: 19px; }
  body > .box { width: calc(100vw - 28px); padding: 29px 22px; border-radius: 22px; }
  body > .wrap { max-width: calc(100vw - 28px) !important; }
  body > .wrap > .topbar { min-height: 60px; padding: 10px 13px; border-radius: 15px; }
  th, td { padding: 10px; }
}

@media (max-width: 390px) {
  .module-grid { grid-template-columns: 1fr; }
  .module-tile { min-height: 158px; }
}

@media (max-width: 340px) {
  .stat-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ========================================================================
   Dashboard hero + AI assistant / system-status widgets (2026-09-06)
   ======================================================================== */

.dash-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  min-height: 168px;
  margin-bottom: 22px;
  padding: 26px 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background-image:
    linear-gradient(100deg, rgba(4, 7, 13, .92) 0%, rgba(4, 7, 13, .62) 45%, rgba(4, 7, 13, .88) 100%),
    url('/static/img/control-hero.jpg');
  background-size: cover;
  background-position: center 30%;
  box-shadow: var(--shadow);
}

.dash-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(650px 300px at 50% 120%, rgba(var(--accent-rgb), .16), transparent 70%);
  pointer-events: none;
}

.dash-hero-brand, .dash-hero-tagline, .dash-hero-clock { position: relative; z-index: 1; }

.dash-hero-brand { display: flex; align-items: center; gap: 12px; }
.dash-hero-logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #04070d;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 1), var(--accent-dark));
  box-shadow: 0 12px 30px -13px rgba(var(--accent-rgb), .8), inset 0 1px rgba(255, 255, 255, .4);
}
.dash-hero-logo svg { width: 22px; height: 22px; }
.dhb-title { font-size: 14px; font-weight: 900; letter-spacing: .08em; color: #fff; }
.dhb-sub { font-size: 11.5px; color: rgba(244, 247, 251, .68); margin-top: 2px; }

.dash-hero-tagline { text-align: center; flex: 1; min-width: 180px; }
.dht-main { font-size: 21px; font-weight: 900; color: #fff; letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.dht-sub { font-size: 12px; color: rgba(244, 247, 251, .7); margin-top: 4px; }

.dash-hero-clock { text-align: end; }
.dhc-time { font-size: 22px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.dhc-date { font-size: 11.5px; color: rgba(244, 247, 251, .68); margin-top: 2px; }

@media (max-width: 720px) {
  .dash-hero { justify-content: center; text-align: center; padding: 22px; }
  .dash-hero-clock { text-align: center; }
}

/* AI assistant widget */
.assistant-card .live-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--critical-ink);
  background: var(--critical-soft);
  padding: 3px 9px;
  border-radius: 99px;
}
.assistant-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}
.assistant-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.assistant-actions a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .022);
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}
.assistant-actions a::before { content: "›"; color: var(--accent); font-weight: 900; }
.assistant-actions a:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .08); transform: translateX(-2px); }
.assistant-actions a:last-child { color: var(--accent-ink); font-weight: 800; }

/* System status ring + vitals */
.status-ring-wrap { display: flex; align-items: center; gap: 18px; margin-top: 6px; }
.status-ring {
  position: relative;
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--ok) calc(var(--pct, 0) * 1%), rgba(255, 255, 255, .07) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .4s ease;
}
.status-ring.warn { background: conic-gradient(var(--warning) calc(var(--pct, 0) * 1%), rgba(255, 255, 255, .07) 0); }
.status-ring.bad { background: conic-gradient(var(--fail) calc(var(--pct, 0) * 1%), rgba(255, 255, 255, .07) 0); }
.status-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
}
.status-ring-value { position: relative; z-index: 1; font-size: 19px; font-weight: 900; }
.status-dots { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.status-dot-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.vitals-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.vital-tile {
  padding: 10px 8px;
  border-radius: 12px;
  text-align: center;
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--border);
}
.vt-val { font-size: 17px; font-weight: 850; }
.vt-label { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* Camera picker strip */
.cam-picker { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.cam-picker-item {
  flex: none;
  width: 96px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}
.cam-picker-item img { width: 100%; height: 54px; object-fit: cover; border-radius: 8px; background: #020408; }
.cam-picker-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-picker-item:hover { border-color: rgba(var(--accent-rgb), .3); }
.cam-picker-item.active { border-color: var(--accent); background: rgba(var(--accent-rgb), .1); color: var(--text); }
