:root {
  --ink: #14221d;
  --muted: #68746e;
  --paper: #f5f4ee;
  --surface: #fffefa;
  --line: #dde2da;
  --forest: #193d32;
  --forest-2: #245543;
  --lime: #c8f275;
  --orange: #f2a75b;
  --red: #d95d45;
  --shadow: 0 18px 45px rgba(20, 34, 29, .08);
  --radius: 20px;
  --display: Georgia, "Times New Roman", serif;
  --body: "Trebuchet MS", "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --ink: #e9efe8;
  --muted: #aab8b1;
  --paper: #101714;
  --surface: #17211d;
  --line: #304039;
  --forest: #173f32;
  --forest-2: #76a78e;
  --lime: #c8f275;
  --shadow: 0 18px 45px rgba(0, 0, 0, .26);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 90% 0%, #e4eed8 0, transparent 28rem), var(--paper);
  font-family: var(--body);
}
[data-theme="dark"] body { background: radial-gradient(circle at 90% 0%, #1d3329 0, transparent 28rem), var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; background: var(--forest); color: #eff6ec; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; padding: 6px 10px 30px; }
.brand-logo { display: flex; width: min(100%, 205px); padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.brand-logo img { display: block; width: 100%; height: auto; }
.nav-label { margin: 0 10px 8px; color: #8faaa0; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.nav { display: grid; gap: 4px; }
.nav a { padding: 11px 12px; border-radius: 11px; color: #c8d8d0; font-size: 14px; transition: background .2s, color .2s; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.13); color: white; }
.nav a.active { box-shadow: inset 3px 0 0 var(--lime); }
.nav-icon { display: inline-block; width: 24px; color: var(--lime); font-size: 13px; }
.sidebar-bottom { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.user-name { overflow: hidden; color: white; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-role { color: #9eb9ab; font-size: 12px; margin-top: 3px; }
.app-release { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: #759186; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.release-status { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #59d8ff; box-shadow: 0 0 0 0 rgba(89,216,255,.52), 0 0 8px rgba(89,216,255,.72); animation: release-pulse 2.6s ease-out infinite; }
@keyframes release-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(89,216,255,.48), 0 0 8px rgba(89,216,255,.65); opacity: .82; } 45% { box-shadow: 0 0 0 8px rgba(89,216,255,0), 0 0 13px rgba(89,216,255,.9); opacity: 1; } }
.logout { margin-top: 12px; padding: 0; border: 0; color: #c8d8d0; background: transparent; font-size: 12px; }
.logout:hover { color: var(--lime); }

.new-login-body { min-height: 100vh; background: var(--paper); }
.new-login-page { display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(380px, .95fr); min-height: 100vh; }
.new-login-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 100%; padding: clamp(26px, 5vw, 72px); color: #eff8ea; background: linear-gradient(145deg, #102f26 0%, #1d5844 72%, #377255 100%); }
.new-login-intro .brand { padding: 0; }
.new-login-intro .brand-logo { width: min(100%, 240px); padding: 10px 12px; }
.new-login-copy { position: relative; z-index: 1; max-width: 590px; margin: auto 0; padding: 70px 0; }
.new-login-copy .eyebrow { color: var(--lime); }
.new-login-copy h1 { font-size: clamp(42px, 5vw, 72px); }
.new-login-copy > p:last-child { max-width: 440px; margin: 22px 0 0; color: #c8d8d0; font-size: 16px; line-height: 1.65; }
.new-login-orbit { position: absolute; border: 1px solid rgba(200, 242, 117, .32); border-radius: 50%; pointer-events: none; }
.orbit-one { width: min(52vw, 720px); height: min(52vw, 720px); right: -310px; bottom: -255px; border-width: 56px; }
.orbit-two { width: 370px; height: 370px; top: -164px; right: 11%; border-color: rgba(255,255,255,.11); }
.new-login-panel { display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 90% 2%, #e4eed8 0, transparent 27rem), var(--paper); }
.new-login-card { width: min(420px, 100%); padding: clamp(26px, 4vw, 42px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.new-login-card h2 { margin: 7px 0 0; font: 700 clamp(31px, 4vw, 42px)/1 var(--display); letter-spacing: -.05em; }
.new-login-note { margin: 14px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.new-login-note a { color: var(--forest-2); font-weight: 700; text-decoration: none; }
.new-login-note a:hover { text-decoration: underline; }
.form-note { margin: -8px 0 2px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.new-login-brand-mobile { display: none; margin-bottom: 50px; padding: 0; }
.new-login-brand-mobile .brand-logo { width: min(100%, 230px); border: 1px solid var(--line); box-shadow: none; }
.login-form { display: grid; gap: 17px; }
.login-form label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: bold; }
.login-form input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--ink); background: var(--paper); }
.login-form input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(36, 85, 67, .12); }
.new-login-submit { width: 100%; margin-top: 5px; min-height: 47px; }
.login-error { min-height: 20px; margin-top: 14px; color: var(--red); font-size: 13px; }
@media (max-width: 760px) { .new-login-page { display: block; } .new-login-intro { display: none; } .new-login-panel { min-height: 100vh; padding: 20px; } .new-login-brand-mobile { display: flex; } }

.main { width: min(100%, 1640px); margin: 0 auto; padding: 34px clamp(20px, 4vw, 66px) 50px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 5px; color: var(--forest-2); font-size: 11px; font-weight: bold; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(31px, 4vw, 47px)/1 var(--display); letter-spacing: -.055em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.refresh-note { color: var(--muted); font-size: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); font-size: 13px; font-weight: bold; }
.btn:hover { border-color: var(--forest); }
.btn-primary { border-color: var(--forest); color: white; background: var(--forest); }
.btn-primary:hover { background: var(--forest-2); }
.mobile-toggle { display: none; }

.notice { margin-bottom: 20px; padding: 13px 15px; border: 1px solid #efd5ae; border-radius: 12px; color: #73491e; background: #fff6e6; font-size: 13px; }
.hidden { display: none !important; }
.impersonation-banner { position: sticky; z-index: 40; top: 0; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 46px; padding: 7px 18px; color: #fff7df; background: #82461d; font-size: 13px; box-shadow: 0 3px 13px rgba(47, 30, 13, .22); }
.impersonation-banner .btn { min-height: 31px; border-color: rgba(255,255,255,.55); color: #fff; background: transparent; font-size: 11px; }
.impersonation-banner .btn:hover { border-color: #fff; background: rgba(255,255,255,.12); }
.hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 18px; margin-bottom: 18px; }
.hero-copy { min-height: 236px; padding: clamp(26px, 4vw, 46px); overflow: hidden; border-radius: var(--radius); color: #eff8ea; background: linear-gradient(130deg, var(--forest) 0%, #225e49 100%); position: relative; box-shadow: var(--shadow); }
.hero-copy:after { content: ""; position: absolute; width: 270px; height: 270px; right: -62px; top: -92px; border: 34px solid rgba(200,242,117,.20); border-radius: 50%; }
.hero-copy h2 { max-width: 600px; position: relative; z-index: 1; margin: 0; font: 700 clamp(28px, 3.3vw, 43px)/1.04 var(--display); letter-spacing: -.05em; }
.hero-copy p { position: relative; z-index: 1; max-width: 520px; margin: 15px 0 0; color: #c8d8d0; font-size: 14px; line-height: 1.55; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(200,242,117,.14); }
.health-card { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-label { color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .1em; text-transform: uppercase; }
.health-number { margin: 13px 0 8px; font: 700 48px/1 var(--display); letter-spacing: -.06em; }
.health-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.latest-upload { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.latest-upload-title { display: block; margin-top: 8px; font: 700 clamp(25px, 3vw, 35px)/1.08 var(--display); letter-spacing: -.05em; }
.latest-upload-title:hover { color: var(--forest-2); }
.latest-upload p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 25px; }
.stat { min-height: 128px; padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,250,.78); }
.stat .value { display: block; margin-top: 17px; font: 700 31px/1 var(--display); letter-spacing: -.05em; }
.stat .detail { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .72fr); gap: 20px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 30px rgba(20,34,29,.045); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel h2 { margin: 0; font: 700 22px var(--display); letter-spacing: -.04em; }
.panel-link { color: var(--forest-2); font-size: 12px; font-weight: bold; }
.clip-list, .device-list { padding: 4px 22px 12px; }
.clip-row, .device-row { display: grid; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid #edf0ea; }
.clip-row:last-child, .device-row:last-child { border-bottom: 0; }
.clip-row { grid-template-columns: 72px minmax(0, 1fr) auto; }
.thumbnail { width: 72px; height: 45px; overflow: hidden; border-radius: 8px; background: #e6ece5; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.clip-title, .device-title { overflow: hidden; font-size: 13px; font-weight: bold; text-overflow: ellipsis; white-space: nowrap; }
.clip-meta, .device-meta { margin-top: 5px; color: var(--muted); font-size: 12px; }
.clip-duration { color: var(--forest); font-size: 12px; font-weight: bold; }
.side-stack { display: grid; gap: 20px; }
.dashboard-alert-list { display: grid; padding: 4px 22px 13px; }
.dashboard-alert-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 14px 0; border-bottom: 1px solid #edf0ea; }
.dashboard-alert-item:last-child { border-bottom: 0; }
.dashboard-alert-item:hover strong { color: var(--forest-2); }
.dashboard-alert-level { min-width: 58px; padding: 5px 7px; border: 1px solid #efd5ae; border-radius: 999px; color: #7b4d1a; background: #fff5e4; font-size: 9px; font-weight: bold; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.dashboard-alert-item.critical .dashboard-alert-level { border-color: #edb8af; color: #973b2e; background: #fff0ed; }
.dashboard-alert-copy { min-width: 0; display: grid; gap: 3px; }
.dashboard-alert-copy strong, .dashboard-alert-copy span, .dashboard-alert-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-alert-copy strong { font-size: 12px; }
.dashboard-alert-copy span, .dashboard-alert-copy small { color: var(--muted); font-size: 11px; }
.dashboard-alert-copy small { font-size: 10px; }
.dashboard-alert-empty { padding: 22px 0 7px; color: var(--muted); font-size: 12px; text-align: center; }
.empty { padding: 36px 22px; color: var(--muted); font-size: 13px; text-align: center; }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); font: 700 20px var(--display); }
.action-list { display: grid; padding: 6px 22px 15px; }
.action-list a { padding: 14px 0; border-bottom: 1px solid #edf0ea; color: var(--forest-2); font-size: 13px; font-weight: bold; }
.action-list a:last-child { border: 0; }

.page-intro { max-width: 730px; margin: -18px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.toolbar { display: grid; grid-template-columns: minmax(180px, 1.35fr) minmax(145px, .7fr) minmax(160px, .8fr) minmax(145px, .65fr) auto auto auto; gap: 10px; padding: 15px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.toolbar > label:not(.toolbar-toggle) { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .06em; text-transform: uppercase; }
.recordings-toolbar { grid-template-columns: minmax(210px, 1.4fr) minmax(150px, .8fr) minmax(165px, .85fr) minmax(145px, .65fr) auto auto; align-items: end; }
.recordings-toolbar-actions { display: flex; gap: 8px; }
.recordings-toolbar-actions .btn { min-height: 42px; white-space: nowrap; }
.toolbar-toggle { min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: bold; white-space: nowrap; }
.toolbar-toggle input { accent-color: var(--forest); }
.field { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; color: var(--ink); font-size: 13px; }
.theme-toggle { min-width: 68px; }
[data-theme="dark"] .field { background: #111a16; }
[data-theme="dark"] .stat { background: rgba(23, 33, 29, .88); }
[data-theme="dark"] .thumbnail { background: #26352e; }
[data-theme="dark"] .clip-row, [data-theme="dark"] .device-row, [data-theme="dark"] .action-list a { border-color: #26342e; }
[data-theme="dark"] .dashboard-alert-item { border-color: #26342e; }
[data-theme="dark"] .dashboard-alert-level { border-color: #684f2c; color: #f4d39d; background: #352b1c; }
[data-theme="dark"] .dashboard-alert-item.critical .dashboard-alert-level { border-color: #6c3d37; color: #ffb9ad; background: #34201e; }
[data-theme="dark"] .config-state { background: #23362c; color: #e7f1e4; }
[data-theme="dark"] .config-state.pending { background: #45341f; color: #ffe7bd; }
[data-theme="dark"] .config-state.error { background: #472a28; color: #ffe0da; }
.field:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(36,85,67,.12); }
.recording-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.recording-card { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 16px; min-height: 133px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.recording-card .thumbnail { width: 152px; height: 104px; border-radius: 11px; }
.recording-card h2 { margin: 4px 0 8px; font: 700 19px var(--display); letter-spacing: -.04em; }
.recording-card p { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.recording-results { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 30px rgba(20,34,29,.045); }
.recording-results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.recording-results-head strong { display: block; margin-top: 3px; font: 700 21px var(--display); letter-spacing: -.035em; }
.recording-results > .recording-grid, .recording-results > .recording-list-wrap { padding: 16px; }
.recording-bulkbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 76%, var(--lime)); }
.bulk-selection, .bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.bulk-selection { color: var(--muted); font-size: 11px; }
.bulk-selection label { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; }
.bulk-selection input, .recording-select input { accent-color: var(--forest); }
.bulk-selection strong { color: var(--ink); }
.bulk-link { padding: 0; border: 0; color: var(--forest-2); background: transparent; font-size: 11px; font-weight: bold; }
.bulk-actions .btn { min-height: 32px; padding: 0 10px; font-size: 10px; }
.view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.view-switch-btn { min-height: 32px; padding: 0 11px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; font-weight: bold; }
.view-switch-btn.active { color: white; background: var(--forest); }
.recording-card-content { min-width: 0; }
.recording-card-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.recording-select { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; font-weight: bold; }
.recording-card-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.recording-card-footer .btn { min-height: 34px; padding: 0 11px; font-size: 11px; }
.recording-details { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: -4px 0 12px; color: var(--muted); font-size: 10px; }
.recording-details > span:first-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording-details .chip { min-height: 20px; font-size: 9px; }
.vision-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px 9px; margin: -2px 0 13px; }
.vision-summary-label { color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .06em; text-transform: uppercase; }
.vision-chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.vision-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border: 1px solid #c9d4c2; border-radius: 999px; color: var(--forest); background: #f2f7ec; font-size: 10px; font-weight: bold; white-space: nowrap; }
.vision-chip b { margin-left: 4px; font-size: 9px; }
.vision-chip.plate-chip { color: #174875; border-color: #b9d8f5; background: #eaf5ff; }
.vision-chip.plate-chip.candidate { color: #76501f; border-color: #eed6a6; background: #fff7e7; }
.vision-chip.review-approved { border-color: #86b45f; box-shadow: inset 0 0 0 1px rgba(86, 134, 51, .12); }
.crop-button { cursor: zoom-in; font-family: inherit; }
.crop-button:hover { border-color: var(--forest-2); box-shadow: 0 2px 8px rgba(25, 70, 48, .13); }
.plate-preview { position: fixed; z-index: 70; width: min(300px, calc(100vw - 24px)); padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); pointer-events: none; }
.plate-preview span { display: block; margin: 1px 2px 7px; color: var(--muted); font-size: 10px; font-weight: bold; }
.plate-preview img { display: block; width: 100%; min-height: 58px; border-radius: 7px; background: #0b0d0c; object-fit: contain; }
.plate-crop-modal { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 18px; }
.plate-crop-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 14, .72); }
.plate-crop-card { position: relative; width: min(620px, 100%); padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.plate-crop-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 12px; }
.plate-crop-card header strong { font: 700 18px var(--display); letter-spacing: -.02em; }
.plate-crop-card img { display: block; width: 100%; max-height: min(62vh, 460px); border-radius: 10px; background: #080b09; object-fit: contain; }
.vision-empty { color: var(--muted); font-size: 10px; font-style: italic; }
.vision-frames { grid-column: 2; color: var(--muted); font-size: 10px; }
.vision-summary.compact { display: flex; flex-wrap: wrap; margin: 5px 0 0; }
.vision-summary.compact .vision-summary-label { display: none; }
.vision-summary.compact .vision-chip { min-height: 19px; padding: 0 6px; font-size: 9px; }
.search-panel { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 1.45fr); gap: 22px; margin-bottom: 20px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(125deg, var(--surface), var(--paper)); }
.search-panel-copy strong { display: block; margin: 7px 0 6px; font: 700 24px var(--display); letter-spacing: -.04em; }
.search-panel-copy p { max-width: 390px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.search-controls { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(140px, .7fr) minmax(145px, .8fr); gap: 10px; align-content: start; }
.search-query { grid-column: span 2; }
.search-date { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: bold; }
.search-date .field { min-width: 0; }
.search-actions { display: flex; gap: 8px; justify-content: flex-end; }
.search-results { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.search-results > .recording-results-head { padding: 17px 18px; border-bottom: 1px solid var(--line); }
.search-table-wrap { overflow-x: auto; }
.search-table { min-width: 810px; padding: 0 18px; }
.search-table-head, .search-row { display: grid; grid-template-columns: 94px minmax(165px, .8fr) minmax(280px, 1.45fr) auto; align-items: center; gap: 15px; }
.search-table-head { padding: 12px 0; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .07em; text-transform: uppercase; }
.search-row { min-height: 82px; padding: 12px 0; border-top: 1px solid var(--line); }
.search-row .thumbnail { width: 94px; height: 61px; }
.search-recording { min-width: 0; }
.search-recording strong, .search-recording span, .search-recording time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-recording strong { font-size: 13px; }
.search-recording span, .search-recording time, .search-analysis > span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.search-analysis { min-width: 0; }
.search-analysis .vision-chips { min-height: 22px; }
.search-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.search-row-actions .btn { min-height: 32px; padding: 0 10px; font-size: 10px; }
.recording-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.recording-action { min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: bold; }
.recording-action:hover { border-color: var(--forest); color: var(--forest); }
.recording-action.active { border-color: #9db864; color: var(--forest); background: #edf6db; }
.recording-action.danger { color: #9b3d31; border-color: #efc9c1; background: #fff8f6; }
.recording-list { min-width: 1110px; }
.recording-list-wrap { overflow-x: auto; }
.recording-list-head, .recording-list-row { display: grid; grid-template-columns: 58px 58px minmax(160px, 1.15fr) minmax(130px, .8fr) minmax(130px, .85fr) 68px 72px 92px minmax(330px, 1.3fr); align-items: center; gap: 13px; }
.recording-list-head { padding: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .08em; text-transform: uppercase; }
.recording-list-row { min-height: 66px; padding: 10px 0; border-top: 1px solid var(--line); }
.recording-list-row .thumbnail { width: 58px; height: 42px; }
.recording-list-select { display: grid; place-items: center; }
.recording-list-select .recording-select span { display: none; }
.recording-list-title { min-width: 0; }
.recording-list-title > strong, .recording-list-title > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording-list-title > strong { font-size: 13px; }
.recording-list-title > span, .recording-list-row time, .recording-list-duration { margin-top: 4px; color: var(--muted); font-size: 11px; }
.recording-list-row time { margin: 0; }
.recording-list-duration { margin: 0; color: var(--forest); font-weight: bold; }
.recording-list-device, .recording-list-size { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.recording-list-row > .chip { justify-self: start; }
.recording-list-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.recording-list-controls > .btn { min-height: 32px; padding: 0 10px; font-size: 10px; }
.recording-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.page-size { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: bold; }
.page-size .field { width: 82px; min-height: 36px; }
.page-status { flex: 1; color: var(--muted); font-size: 12px; text-align: center; }
.page-status strong { display: block; color: var(--ink); font-size: 12px; }
.page-actions { display: flex; gap: 8px; }
.page-actions .btn { min-height: 36px; }
.page-numbers { display: flex; align-items: center; justify-content: center; gap: 5px; flex: 1 1 250px; }
.page-number, .page-gap { min-width: 34px; height: 34px; padding: 0 7px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: bold; }
.page-number:hover { border-color: var(--forest); }
.page-number.active { border-color: var(--forest); color: white; background: var(--forest); }
.page-gap { display: grid; place-items: center; border-color: transparent; color: var(--muted); background: transparent; }
.page-jump { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: bold; }
.page-jump .field { width: 62px; min-height: 36px; padding: 0 7px; text-align: center; }
.page-jump .btn { min-height: 36px; padding: 0 11px; }
.chip { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 999px; color: var(--forest); background: #e4f0d1; font-size: 11px; font-weight: bold; }
.chip.warn { color: #804713; background: #fff0d7; }
.chip.offline { color: #8a382e; background: #fce2dd; }
.ai-status { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; vertical-align: middle; color: #58728a; }
.ai-mark { width: 25px; height: 25px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ai-mark circle { fill: var(--surface); }
.ai-status.detected { color: #148141; }
.ai-status.detected .ai-mark { filter: drop-shadow(0 2px 4px rgba(20, 129, 65, .18)); }
.detector-icons { display: inline-flex; align-items: center; gap: 3px; }
.detector-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; border: 1px solid #c4d8eb; border-radius: 7px; color: #2d709d; background: #eff8ff; }
.detector-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.detector-icon.vehicle { color: #147547; border-color: #bddfc9; background: #effaf2; }
.detector-icon.plate { color: #216b9c; border-color: #bfd8ef; background: #f0f8ff; }
.detector-icon.person { color: #735aa2; border-color: #d7cbed; background: #f8f4ff; }
.detector-icon.waste { color: #9a6822; border-color: #ead4ad; background: #fff8e9; }
.discovery-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 18px; padding: 21px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(120deg, var(--surface), var(--paper)); }
.discovery-panel h2 { margin: 6px 0 5px; font: 700 24px var(--display); letter-spacing: -.04em; }
.discovery-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.discovery-counts { display: flex; flex: 0 0 auto; gap: 9px; }
.discovery-counts span { min-width: 92px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: bold; letter-spacing: .03em; text-transform: uppercase; }
.discovery-counts b { display: block; margin-bottom: 5px; color: var(--forest); font: 700 22px var(--display); letter-spacing: -.04em; }
.device-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.device-card { padding: 21px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.device-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.device-card h2 { margin: 6px 0 4px; font: 700 23px var(--display); letter-spacing: -.04em; }
.device-card p { min-height: 37px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.device-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.device-details span { display: block; color: var(--muted); font-size: 11px; }
.device-details b { display: block; margin-top: 3px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.device-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.removed-device { display: inline-grid; place-items: center; min-width: 27px; height: 18px; margin-left: 7px; padding: 0 5px; vertical-align: middle; border: 1px solid #e4aaa2; border-radius: 999px; color: #9c4036; background: #fff2ef; font: 700 9px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-card { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.settings-card h2 { margin: 8px 0 9px; font: 700 24px var(--display); letter-spacing: -.04em; }
.settings-card p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.52; }
.users-layout { display: grid; grid-template-columns: minmax(270px, .52fr) minmax(0, 1.48fr); gap: 18px; align-items: start; }
.user-form { display: grid; gap: 14px; margin-top: 18px; }
.user-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .03em; }
.user-form > .btn { justify-self: start; margin-top: 3px; }
.users-panel { min-width: 0; }
.count-pill { min-width: 27px; height: 27px; padding: 0 9px; border-radius: 999px; display: inline-grid; place-items: center; color: var(--forest); background: var(--lime); font-size: 12px; font-weight: bold; }
.users-list { padding: 2px 22px 13px; }
.users-layout:has(#create-user-card.hidden) { grid-template-columns: minmax(0, 1fr); }
.user-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(148px, .52fr) auto; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row strong, .user-row span { display: block; }
.user-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-identity > span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.ai-review { display: inline-flex !important; margin-top: 7px; padding: 3px 7px; border: 1px solid #e3cfa4; border-radius: 999px; color: #76501e; background: #fff5dd; font-size: 9px !important; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
.ai-review.enabled { border-color: #b6d5bc; color: #28613a; background: #e4f3e5; }
.user-identity em { color: #9b3d31; font-style: normal; }
.user-presence { display: inline-block; width: 8px; height: 8px; margin: 0 7px 1px 1px; border-radius: 50%; background: #54a27b; box-shadow: 0 0 0 3px rgba(84, 162, 123, .14); vertical-align: middle; }
.user-row.is-disabled .user-presence { background: #c3695b; box-shadow: 0 0 0 3px rgba(195, 105, 91, .13); }
.user-last-login { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.user-last-login b { color: var(--ink); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.user-actions { display: flex; justify-content: flex-end; gap: 7px; }
.user-actions .btn { min-height: 34px; padding: 0 10px; font-size: 11px; }
.user-actions-readonly { min-width: 112px; }
.user-readonly { display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--paper); font-size: 11px !important; font-weight: 700; white-space: nowrap; }
.user-readonly i { display: block; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 2px; position: relative; }
.user-readonly i::before { content: ""; position: absolute; width: 6px; height: 5px; left: -0.5px; top: -6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; }
.customers-layout { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(440px, 1.3fr); gap: 20px; align-items: start; }
.customer-form { display: grid; gap: 14px; }
.customer-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .03em; }
.customer-form.modal-card { max-height: calc(100dvh - 36px); overflow-y: auto; }
.customer-section { border: 1px solid var(--line); border-radius: 10px; }
.customer-section summary { padding: 13px 14px; cursor: pointer; font-size: 13px; font-weight: 700; }
.customer-section-body { display: grid; gap: 14px; padding: 0 14px 14px; }
.customer-summary { gap: 0; }
.customer-summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.customer-summary > div:last-child { border-bottom: 0; }
.customer-summary span { color: var(--muted); }
.customer-table-wrap { overflow-x: auto; }
.customer-table { width: 100%; border-collapse: collapse; text-align: left; }
.customer-table th, .customer-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 12px; }
.customer-table th { color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.customer-table td:first-child { min-width: 200px; }
.customer-table td small { display: block; margin-top: 5px; color: var(--muted); }
.customer-name-link { color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.customer-name-link:hover { text-decoration: underline; }
.customer-state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.customer-state::before { width: 8px; height: 8px; border-radius: 50%; background: #35a56e; content: ""; }
.customer-state.suspended::before { background: #b5835c; }
.customer-detail-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .65fr); gap: 20px; align-items: start; }
.customer-detail-card { display: grid; gap: 14px; }
.customer-detail-card h2, .customer-detail-card p { margin: 0; }
.customer-detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.customer-detail-side { display: grid; gap: 16px; }
.customer-detail-label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: bold; }
.customer-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.customer-plan-catalog { background: var(--surface); }
.customer-usage-history { grid-column: 1 / -1; min-width: 0; }
.customer-usage-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; }
.customer-billing-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; border: 0; }
@media (max-width: 520px) { .customer-billing-fields { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .customer-detail-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .customer-detail-fields { grid-template-columns: 1fr; } .customer-table th, .customer-table td { padding: 13px 14px; } }
.customers-panel { min-height: 300px; }
.customers-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(150px, .45fr) minmax(130px, .32fr); gap: 10px; padding: 0 22px 16px; border-bottom: 1px solid var(--line); }
.customers-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .05em; text-transform: uppercase; }
.customers-toolbar .field { min-height: 38px; }
.customers-query { min-width: 0; }
.users-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(135px, .4fr)); }
.devices-toolbar { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(160px, .5fr) minmax(145px, .38fr); gap: 10px; margin-bottom: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.devices-toolbar label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .05em; text-transform: uppercase; }
.devices-toolbar .field { min-height: 38px; }
.devices-query { min-width: 0; }
.customers-list { padding: 2px 22px 13px; }
.customers-pagination { display: grid; grid-template-columns: minmax(130px, 1fr) auto minmax(130px, 1fr); align-items: center; gap: 14px; margin: 0 22px 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.customers-pagination > strong { color: var(--ink); font-size: 12px; }
.customer-page-nav { display: flex; align-items: center; justify-content: center; gap: 7px; }
.customer-page-nav .page-numbers { flex: 0 1 auto; min-width: 0; }
.customer-page-arrow { display: grid; width: 34px; min-height: 34px; padding: 0; place-items: center; font-size: 21px; line-height: 1; }
.customers-pagination .page-size { justify-self: end; }
.devices-pagination { display: grid; grid-template-columns: minmax(130px, 1fr) auto minmax(130px, 1fr); align-items: center; gap: 14px; margin-top: 18px; padding: 16px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.devices-pagination > strong { color: var(--ink); font-size: 12px; }
.device-page-nav { display: flex; align-items: center; justify-content: center; gap: 7px; }
.device-page-nav .page-numbers { flex: 0 1 auto; min-width: 0; }
.device-page-arrow { display: grid; width: 34px; min-height: 34px; padding: 0; place-items: center; font-size: 21px; line-height: 1; }
.devices-pagination .page-size { justify-self: end; }
.customer-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.customer-row:last-child { border-bottom: 0; }
.customer-identity strong, .customer-identity span, .customer-identity small { display: block; }
.customer-identity strong { font-size: 14px; }
.customer-identity span, .customer-identity small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.customer-identity small { font-size: 11px; }
.customer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.customer-actions .btn { min-height: 34px; padding: 0 10px; font-size: 11px; }
.customer-toggle { color: var(--forest); border-color: #c9ddbe; background: #f4f9ee; }
.customer-row.is-disabled { opacity: .72; }
.customer-row.is-disabled .customer-toggle { color: #9b3d31; border-color: #efc9c1; background: #fff8f6; }
.btn.danger { color: #9b3d31; border-color: #efc9c1; background: #fff8f6; }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 14, .54); }
.modal-card { position: relative; width: min(100%, 470px); padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-head h2 { margin: 6px 0 0; font: 700 25px var(--display); letter-spacing: -.04em; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }
.vision-review-card { width: min(100%, 720px); height: min(780px, calc(100dvh - 36px)); max-height: calc(100dvh - 36px); display: flex; flex-direction: column; overflow: hidden; }
.vision-review-recording { margin: 7px 0 0; color: var(--muted); font-size: 11px; font-weight: bold; }
.vision-review-help { margin: 18px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.vision-review-content { min-height: 0; flex: 1 1 auto; display: grid; align-content: start; gap: 14px; overflow-y: auto; overscroll-behavior: contain; padding: 0 7px 2px 0; }
.vision-review-card .modal-actions { flex: 0 0 auto; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.review-group { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.review-group > header { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.review-group > header strong { font-size: 12px; }
.review-group > header span { min-width: 22px; height: 22px; border-radius: 999px; display: inline-grid; place-items: center; color: var(--forest); background: #eaf3e2; font-size: 10px; font-weight: bold; }
.review-group > .vision-empty { display: block; padding: 12px; }
.review-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border-top: 1px solid var(--line); }
.review-group > .review-item:first-of-type { border-top: 0; }
.review-item-copy { min-width: 0; display: grid; gap: 4px; }
.review-item-copy strong { font-size: 12px; }
.review-item-copy span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.review-choices { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.review-choice { min-height: 29px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: bold; }
.review-choice.active { border-color: var(--forest); color: white; background: var(--forest); }
.review-plate { grid-template-columns: minmax(150px, .85fr) minmax(150px, 1fr) auto; }
.review-plate-input { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: bold; }
.review-plate-input .field { min-height: 34px; padding: 0 9px; font-size: 12px; text-transform: uppercase; }
.review-crop { justify-self: start; padding: 0; border: 0; color: var(--forest-2); background: transparent; font-size: 10px; font-weight: bold; text-decoration: underline; cursor: zoom-in; }
.review-delete { min-height: 29px; padding: 0 8px; border: 1px solid #d99c93; border-radius: 7px; color: #9a3025; background: #fff7f5; font-size: 10px; font-weight: bold; }
.review-delete:hover { border-color: #b64335; color: #7f241b; background: #ffe9e5; }
.review-delete:disabled { cursor: wait; opacity: .6; }
.delete-confirmation { display: grid; gap: 7px; margin: 21px 0 12px; color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .03em; }
.delete-confirmation strong { overflow-wrap: anywhere; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: 0; }
.device-edit-form { display: grid; gap: 14px; }
.device-edit-form > label:not(.toggle) { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .03em; }
.device-edit-form .modal-head { margin-bottom: 4px; }
.device-edit-form .form-error { margin-bottom: 0; }
.form-error { min-height: 18px; margin: 0 0 15px; color: #a74337; font-size: 12px; }
.video-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 14, .72); }
.video-modal-card { position: relative; width: min(100%, 1080px); max-height: calc(100dvh - 40px); padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.video-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 3px 3px 12px; }
.video-modal-head > div { display: flex; align-items: center; gap: 8px; }
.video-modal-head .btn { min-height: 34px; padding: 0 10px; font-size: 11px; }
.video-modal-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 14px; align-items: start; max-height: calc(100dvh - 132px); }
.video-modal-card video { display: block; width: 100%; max-height: calc(100dvh - 132px); border-radius: 11px; background: #050806; }
.video-modal-analysis { max-height: calc(100dvh - 132px); overflow: auto; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.recording-video-stage { position: relative; background: #050806; }
.recording-video-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.recording-overlay-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; font-size: 12px; }
.recording-overlay-controls label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.recording-overlay-controls input { width: 16px; height: 16px; margin: 0; }
.recording-overlay-controls [role="status"] { color: var(--muted); font-size: 11px; }
.recording-video-stage:fullscreen { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.recording-video-stage:fullscreen video { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.video-modal-analysis header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.video-modal-analysis header strong { font: 700 17px var(--display); letter-spacing: -.02em; }
.video-modal-analysis header span { color: var(--muted); font-size: 10px; }
.vision-modal-group { display: grid; gap: 7px; margin-top: 14px; }
.vision-modal-group > span { color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .06em; text-transform: uppercase; }
.vision-modal-group p { margin: 0; }
[data-theme="dark"] .user-row { border-color: #26342e; }
[data-theme="dark"] .user-readonly { border-color: #3b4a42; color: #a7b8ad; background: #18241f; }
[data-theme="dark"] .ai-review { border-color: #705a2c; color: #f3d28f; background: #352b19; }
[data-theme="dark"] .ai-review.enabled { border-color: #42684a; color: #afe1b8; background: #1d3824; }
[data-theme="dark"] .btn.danger { color: #ffb9ad; border-color: #613a34; background: #2f201e; }
[data-theme="dark"] .review-group > header { background: #17241e; }
[data-theme="dark"] .review-group > header span { color: #c7e4aa; background: #243b2d; }
[data-theme="dark"] .recording-action.active { border-color: #5b7b39; color: #d8efae; background: #23331c; }
[data-theme="dark"] .recording-action.danger { color: #ffb9ad; border-color: #613a34; background: #2f201e; }
[data-theme="dark"] .vision-chip { color: #d5eac4; border-color: #4a613d; background: #21311e; }
[data-theme="dark"] .vision-chip.plate-chip { color: #bee1ff; border-color: #3e6386; background: #182b3a; }
[data-theme="dark"] .vision-chip.plate-chip.candidate { color: #f3d28f; border-color: #765d31; background: #352b19; }
[data-theme="dark"] .crop-button:hover { border-color: #80bd8d; box-shadow: 0 2px 10px rgba(113, 217, 153, .16); }
[data-theme="dark"] .search-panel { background: linear-gradient(125deg, var(--surface), #17221c); }
[data-theme="dark"] .ai-status { color: #9bb6cb; }
[data-theme="dark"] .ai-status.detected { color: #71d999; }
[data-theme="dark"] .ai-mark circle { fill: var(--surface); }
[data-theme="dark"] .detector-icon { color: #9fd5fa; border-color: #315873; background: #182c39; }
[data-theme="dark"] .detector-icon.vehicle { color: #8ce7ac; border-color: #315f42; background: #183324; }
[data-theme="dark"] .detector-icon.person { color: #dbc6ff; border-color: #5c4b7d; background: #2b233b; }
[data-theme="dark"] .detector-icon.waste { color: #f3cf8a; border-color: #745b31; background: #382c19; }
[data-theme="dark"] .removed-device { border-color: #6d3d37; color: #ffc0b5; background: #34201e; }
[data-theme="dark"] .form-error { color: #ffb3a8; }
.config-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.config-form { display: grid; gap: 16px; }
.config-section { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.config-section-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.config-number { flex: 0 0 auto; width: 31px; height: 31px; border-radius: 10px; color: var(--forest); background: var(--lime); display: grid; place-items: center; font-size: 11px; font-weight: bold; }
.config-section h2 { margin: 0; font: 700 23px var(--display); letter-spacing: -.04em; }
.config-section p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .03em; }
.form-grid .wide { grid-column: span 2; }
.toggle { min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; display: flex !important; align-items: center; gap: 9px; color: var(--ink) !important; font-size: 12px !important; letter-spacing: 0 !important; }
.toggle input { accent-color: var(--forest); }
.config-aside { position: sticky; top: 24px; display: grid; gap: 14px; }
.config-aside .panel { padding: 20px; }
.config-aside h2 { margin: 7px 0 10px; font: 700 21px var(--display); letter-spacing: -.04em; }
.config-aside p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.config-state { margin: 14px 0; padding: 12px; border-radius: 10px; color: var(--forest); background: #edf4e5; font-size: 12px; line-height: 1.45; }
.config-state.pending { color: #75451b; background: #fff1da; }
.config-state.error { color: #8d3126; background: #fde7e2; }
.crypto-details { display: grid; gap: 11px; margin: 0 0 14px; }
.crypto-details div { display: grid; gap: 4px; }
.crypto-details dt { color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .07em; text-transform: uppercase; }
.crypto-details dd { min-width: 0; margin: 0; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.crypto-details code { display: inline-block; max-width: 100%; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); font: 11px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; }
.savebar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.savebar strong { display: block; font: 700 19px var(--display); letter-spacing: -.03em; }
.savebar span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.telemetry-panel { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.telemetry-head, .telemetry-subhead { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.telemetry-head h2, .telemetry-subhead h3 { margin: 5px 0 0; font: 700 23px var(--display); letter-spacing: -.04em; }
.telemetry-head > strong { color: var(--forest-2); font: 700 18px var(--body); }
.storage-meter { height: 12px; margin: 19px 0; overflow: hidden; border-radius: 999px; background: var(--paper); }
.storage-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lime), var(--forest-2)); transition: width .25s ease; }
.telemetry-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.telemetry-stats > div { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.telemetry-stats span, .telemetry-stats strong { display: block; }
.telemetry-stats span { color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
.telemetry-stats strong { margin-top: 6px; font: 700 19px var(--display); letter-spacing: -.03em; }
.telemetry-subhead { margin: 24px 0 12px; }
.telemetry-subhead h3 { font-size: 19px; }
.telemetry-subhead span, .telemetry-note { color: var(--muted); font-size: 12px; }
.queue-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.telemetry-note { min-height: 18px; margin: 14px 0 0; line-height: 1.45; }
.history-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: bold; }
.history-select .field { width: 112px; min-height: 35px; }
.telemetry-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.telemetry-charts article { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.telemetry-charts h3 { margin: 0; font: 700 17px var(--display); }
.telemetry-charts canvas { display: block; width: 100%; height: 190px; margin-top: 12px; }
.telemetry-charts p { min-height: 16px; margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.audit-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 17px 20px; }
.audit-toolbar label { display: grid; min-width: 145px; gap: 6px; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .05em; text-transform: uppercase; }
.audit-toolbar .field { min-height: 38px; min-width: 145px; }
.audit-toolbar .btn { min-height: 38px; }
.audit-panel { padding: 22px; }
.audit-panel .panel-head { align-items: end; }
.audit-panel h2 { margin: 5px 0 0; font: 700 23px var(--display); letter-spacing: -.04em; }
.audit-table-wrap { overflow-x: auto; margin: 18px -4px 0; }
.audit-table { width: 100%; min-width: 940px; border-collapse: collapse; font-size: 12px; }
.audit-table th { padding: 10px 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.audit-table td { max-width: 300px; padding: 12px 11px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.audit-table tr:last-child td { border-bottom: 0; }
.audit-table time, .audit-table small { display: block; }
.audit-table small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.audit-table code { color: var(--ink); font: 10px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; }
.audit-action { color: var(--forest); font-size: 11px; text-transform: capitalize; }
.audit-result { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
.audit-result.ok { color: #24552d; background: #dcefdc; }
.audit-result.error { color: #8f352b; background: #fde1dc; }
.audit-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
[data-theme="dark"] .audit-table th, [data-theme="dark"] .audit-table td { border-color: #26342e; }
[data-theme="dark"] .audit-result.ok { color: #b8ecba; background: #1d4427; }
[data-theme="dark"] .audit-result.error { color: #ffc0b5; background: #4a2722; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 84vw); height: 100dvh; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 18px 0 45px rgba(0,0,0,.2); }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; }
  .hero, .content-grid { grid-template-columns: 1fr; }
  .latest-upload { align-items: flex-start; flex-direction: column; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-panel { grid-template-columns: 1fr; }
  .discovery-panel { align-items: flex-start; flex-direction: column; }
  .users-layout { grid-template-columns: 1fr; }
  .customers-layout { grid-template-columns: 1fr; }
  .customers-toolbar { grid-template-columns: 1fr 1fr; }
  .customers-query { grid-column: 1 / -1; }
  .users-toolbar { grid-template-columns: 1fr 1fr; }
  .devices-toolbar { grid-template-columns: 1fr 1fr; }
  .devices-query { grid-column: 1 / -1; }
  .recordings-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .recordings-query { grid-column: 1 / -1; }
  .recordings-toolbar-actions { justify-content: flex-end; }
  .customers-pagination { grid-template-columns: 1fr; justify-items: center; }
  .customers-pagination .page-size { justify-self: center; }
  .devices-pagination { grid-template-columns: 1fr; justify-items: center; }
  .devices-pagination .page-size { justify-self: center; }
  .config-layout { grid-template-columns: 1fr; }
  .config-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .audit-toolbar { align-items: stretch; }
}
@media (max-width: 620px) {
  .main { padding: 20px 16px 34px; }
  .topbar { align-items: flex-start; margin-bottom: 28px; }
  h1 { font-size: 34px; }
  .refresh-note { display: none; }
  .discovery-counts { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .discovery-counts span { min-width: 0; padding: 10px 8px; }
  .hero-copy { min-height: 205px; padding: 25px; }
  .stats, .recording-grid, .device-grid, .settings-grid, .customers-layout { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .recordings-toolbar { grid-template-columns: 1fr; }
  .recordings-query { grid-column: auto; }
  .toolbar-toggle { justify-content: flex-start; }
  .recordings-toolbar-actions { justify-content: stretch; }
  .recordings-toolbar-actions .btn { flex: 1; }
  .search-controls { grid-template-columns: 1fr; }
  .search-query { grid-column: auto; }
  .search-actions { justify-content: flex-start; }
  .search-table { min-width: 0; padding: 0 14px; }
  .search-table-head { display: none; }
  .search-row { grid-template-columns: 82px minmax(0, 1fr); align-items: start; gap: 11px; }
  .search-row .thumbnail { width: 82px; height: 58px; }
  .search-analysis, .search-row-actions { grid-column: 2; }
  .search-row-actions { justify-content: flex-start; }
  .form-grid, .config-aside { grid-template-columns: 1fr; }
  .telemetry-head, .telemetry-subhead { align-items: flex-start; flex-direction: column; }
  .telemetry-stats, .queue-stats, .telemetry-charts { grid-template-columns: 1fr; }
  .audit-toolbar label, .audit-toolbar .field { width: 100%; }
  .audit-toolbar .btn { width: 100%; }
  .audit-panel { padding: 16px; }
  .audit-pagination { align-items: stretch; flex-direction: column; }
  .user-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .customer-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .user-row time { display: none; }
  .user-row .user-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .user-row .user-actions-readonly { min-width: 0; }
  .customer-actions { justify-content: flex-start; }
  .customers-toolbar { grid-template-columns: 1fr; }
  .customers-query { grid-column: auto; }
  .customers-pagination { margin: 0 14px 14px; }
  .devices-toolbar { grid-template-columns: 1fr; }
  .devices-query { grid-column: auto; }
  .devices-pagination { margin: 0 14px 14px; }
  .form-grid .wide { grid-column: auto; }
  .config-section { padding: 20px; }
  .savebar { align-items: flex-start; flex-direction: column; }
  .recording-card { grid-template-columns: 104px minmax(0, 1fr); }
  .recording-pagination { align-items: stretch; flex-direction: column; }
  .page-size, .page-actions, .page-jump { justify-content: center; }
  .page-numbers { order: 3; flex-basis: 100%; }
  .recording-card .thumbnail { width: 104px; height: 88px; }
  .clip-row { grid-template-columns: 54px minmax(0, 1fr); }
  .clip-row .clip-duration { display: none; }
  .thumbnail { width: 54px; height: 40px; }
  .video-modal { padding: 10px; }
  .video-modal-content { grid-template-columns: 1fr; overflow: auto; }
  .video-modal-card video, .video-modal-analysis { max-height: none; }
  .vision-review-card { height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); padding: 17px; }
  .review-item, .review-plate { grid-template-columns: 1fr; }
  .review-choices { justify-content: flex-start; }
}

.settings-overview { margin-bottom: 20px; }
.settings-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.settings-tab { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px 0 8px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font: 700 13px var(--body); cursor: pointer; }
.settings-tab .section-number { width: 24px; height: 24px; }
.settings-tab.active { color: #fff; background: var(--forest); }
.settings-tab.active .section-number { color: var(--forest); background: var(--lime); }
[data-theme="dark"] .settings-tabs { background: var(--surface); }
.settings-section { margin-bottom: 20px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-title h2 { margin: 0; font: 700 24px var(--display); letter-spacing: -.04em; }
.section-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--forest); background: var(--lime); font-size: 11px; font-weight: bold; }
.admin-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .03em; }
.form-submit { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; align-self: end; min-height: 42px; }
.form-result { min-height: 17px; color: var(--forest); font-size: 12px; }
.form-result.error { color: #a74337; }
.notification-form { display: grid; gap: 14px; max-width: 720px; }
.notification-toggle { width: fit-content; font-size: 14px; font-weight: 700; }
.notification-policy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.notification-policy label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .03em; }
.notification-recipients { display: grid; gap: 8px; }
.notification-recipients strong { font-size: 12px; }
.recipient-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recipient-chip { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--forest-2); background: var(--paper); font-size: 12px; }
.admin-split { display: grid; grid-template-columns: minmax(250px, .7fr) minmax(340px, 1.3fr); gap: 26px; align-items: start; }
.compact-form { grid-template-columns: 1fr; }
.admin-list-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.admin-list-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.admin-list { padding: 0 14px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
.admin-row strong, .admin-row span { display: block; }
.admin-row strong { font-size: 13px; }
.admin-row span { margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.admin-row .btn { flex: 0 0 auto; min-height: 34px; padding: 0 10px; font-size: 11px; }
.identity-row { align-items: center; }
.identity-row > div { display: flex; align-items: center; min-width: 0; gap: 11px; }
.identity-photo { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; background: var(--paper); }
.identity-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.identity-thumb-wrap { position: relative; display: inline-flex; }
.identity-photo-delete { position: absolute; top: -4px; right: -4px; width: 17px; height: 17px; padding: 0; border: 1px solid var(--paper); border-radius: 50%; background: #a63d35; color: #fff; cursor: pointer; font-size: 13px; line-height: 13px; }
.identity-photo-delete:hover { background: #7d2d27; }
.identity-row .identity-meta { min-width: 0; }
.identity-row .identity-meta strong, .identity-row .identity-meta span { display: block; }
.identity-row .identity-meta span { margin-top: 3px; }
[data-theme="dark"] .admin-list-wrap, [data-theme="dark"] .admin-list-head, [data-theme="dark"] .admin-row { border-color: #26342e; }
[data-theme="dark"] .form-result.error { color: #ffb3a8; }
@media (max-width: 760px) { .settings-section { padding: 18px; } .admin-form, .admin-split, .notification-policy { grid-template-columns: 1fr; } .admin-row { align-items: flex-start; } .settings-tabs { flex-direction: column; } .settings-tab { justify-content: flex-start; } }

.worker-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.worker-summary .panel { display: grid; gap: 6px; min-height: 112px; padding: 22px; }
.worker-summary span { color: var(--muted); font-size: 11px; font-weight: bold; letter-spacing: .08em; text-transform: uppercase; }
.worker-summary strong { color: var(--forest); font: 700 34px var(--display); }
.worker-flow { position: relative; overflow: hidden; margin: 0 0 18px; padding: 22px; border: 1px solid rgba(104,145,116,.34); border-radius: var(--radius); background: linear-gradient(135deg, #173f32, #215540 58%, #2c6a4f); color: #f2f8ee; box-shadow: var(--shadow); }
.worker-flow::after { position: absolute; width: 330px; height: 330px; right: -105px; top: -212px; border: 1px solid rgba(200,242,117,.24); border-radius: 50%; box-shadow: 0 0 0 42px rgba(200,242,117,.035), 0 0 0 84px rgba(200,242,117,.025); content: ""; pointer-events: none; }
.worker-flow-head { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.worker-flow-head .card-label { color: var(--lime); }
.worker-flow-head h2 { margin: 5px 0 0; font: 700 26px var(--display); letter-spacing: -.03em; }
.worker-batch-progress { display: grid; gap: 6px; width: min(310px, 42%); }
.worker-batch-progress > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #daeadf; font-size: 11px; }
.worker-batch-progress strong { color: var(--lime); font: 700 20px var(--display); }
.worker-batch-meter { height: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 99px; background: rgba(7,31,21,.28); }
.worker-batch-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #75cde7, var(--lime)); box-shadow: 0 0 12px rgba(200,242,117,.35); transition: width .8s ease; }
.worker-flow-items { position: relative; z-index: 1; display: grid; gap: 9px; }
.worker-flow-card { display: grid; grid-template-columns: minmax(170px, .55fr) minmax(260px, 1.45fr); gap: 18px; min-width: 0; padding: 14px 16px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(8,35,24,.26); transition: transform .25s ease, background .25s ease; }
.worker-flow-card.is-active { background: rgba(10,47,31,.56); box-shadow: inset 0 0 0 1px rgba(200,242,117,.1); }
.worker-flow-card.is-active:hover { transform: translateY(-2px); }
.worker-flow-card-head { display: grid; grid-template-columns: auto 8px; align-content: center; align-items: center; gap: 5px 9px; color: #b9d4c3; font-size: 10px; font-weight: bold; letter-spacing: .09em; text-transform: uppercase; }
.worker-flow-card-head i { width: 7px; height: 7px; border-radius: 50%; background: #77968a; }
.worker-flow-card.is-active .worker-flow-card-head i { background: var(--lime); box-shadow: 0 0 0 4px rgba(200,242,117,.12); animation: flow-dot 1.9s ease-in-out var(--flow-delay) infinite; }
@keyframes flow-dot { 0%, 100% { opacity: .6; transform: scale(.82); } 50% { opacity: 1; transform: scale(1.15); } }
.worker-flow-card strong { grid-column: 1 / -1; display: block; overflow: hidden; color: #fff; font-size: 14px; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.worker-flow-process { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 15px; align-items: center; }
.worker-flow-card p { margin: 0 0 8px; color: #bfd6c7; font-size: 11px; line-height: 1.45; }
.worker-flow-progress { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.14); }
.worker-flow-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8dcc78, var(--lime)); transition: width 1.2s ease; }
.worker-flow-card footer { display: grid; justify-items: end; gap: 4px; color: var(--lime); font-size: 13px; font-weight: bold; }
.worker-flow-card footer small { color: #a9c9b4; font-size: 10px; font-weight: normal; }
.worker-flow-signal { position: relative; z-index: 1; display: flex; align-items: end; gap: 4px; height: 20px; margin: 16px 1px -6px; opacity: .6; }
.worker-flow-signal span { width: 13%; max-width: 64px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, rgba(200,242,117,.78), rgba(200,242,117,.07)); animation: flow-signal 3.8s ease-in-out infinite; }
.worker-flow-signal span:nth-child(1) { height: 34%; } .worker-flow-signal span:nth-child(2) { height: 55%; animation-delay: -.4s; } .worker-flow-signal span:nth-child(3) { height: 42%; animation-delay: -.8s; } .worker-flow-signal span:nth-child(4) { height: 76%; animation-delay: -1.2s; } .worker-flow-signal span:nth-child(5) { height: 61%; animation-delay: -1.6s; } .worker-flow-signal span:nth-child(6) { height: 88%; animation-delay: -2s; } .worker-flow-signal span:nth-child(7) { height: 48%; animation-delay: -2.4s; } .worker-flow-signal span:nth-child(8) { height: 66%; animation-delay: -2.8s; } .worker-flow-signal span:nth-child(9) { height: 38%; animation-delay: -3.2s; }
@keyframes flow-signal { 0%, 100% { transform: scaleY(.65); opacity: .45; } 50% { transform: scaleY(1); opacity: .92; } }
.worker-panel { overflow: hidden; }
.worker-panel .panel-head { align-items: end; }
.worker-panel .panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.workers-list { display: grid; }
.worker-row { display: grid; grid-template-columns: 118px minmax(190px, 1fr) minmax(180px, .9fr) minmax(220px, 1.2fr); gap: 18px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line); }
.worker-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: bold; }
.worker-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(104,116,110,.12); }
.worker-status.online i { background: #3e9566; box-shadow: 0 0 0 4px rgba(62,149,102,.13); }
.worker-status.busy i { background: var(--orange); box-shadow: 0 0 0 4px rgba(242,167,91,.15); }
.worker-identity, .worker-job { min-width: 0; display: grid; gap: 4px; }
.worker-identity strong, .worker-job strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.worker-identity span, .worker-identity small, .worker-job span, .worker-job small, .worker-capabilities { color: var(--muted); font-size: 11px; }
.worker-capabilities { line-height: 1.5; overflow-wrap: anywhere; }
.worker-performance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.perf-card { display: grid; align-content: start; gap: 14px; padding: 22px; }
.perf-card .panel-head { align-items: end; margin: 0; }
.perf-window { margin: 0; color: var(--muted); font-size: 11px; }
.perf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.perf-metric { min-width: 0; display: grid; gap: 3px; }
.perf-metric span { color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .06em; text-transform: uppercase; }
.perf-metric strong { color: var(--forest); font: 700 24px var(--display); }
.perf-metric small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.perf-errors { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.perf-errors.has-errors, .worker-stats .has-errors { color: #b4442f; font-weight: bold; }
.worker-stats { min-width: 0; display: grid; gap: 4px; }
.worker-stats strong { font-size: 13px; }
.worker-stats span, .perf-node-empty { color: var(--muted); font-size: 11px; line-height: 1.45; }
.worker-stats .worker-capabilities { margin-top: 2px; font-size: 10px; opacity: .8; }
[data-theme="dark"] .perf-errors { border-color: #26342e; }
[data-theme="dark"] .perf-errors.has-errors, [data-theme="dark"] .worker-stats .has-errors { color: #ffb3a8; }
@media (max-width: 1100px) { .worker-performance { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .worker-summary { grid-template-columns: 1fr; } .worker-flow-head { align-items: start; flex-direction: column; } .worker-batch-progress { width: 100%; } .worker-flow-card { grid-template-columns: 1fr; gap: 12px; } .worker-flow-process { grid-template-columns: 1fr; } .worker-flow-card footer { justify-items: start; grid-template-columns: auto 1fr; align-items: baseline; } .worker-row { grid-template-columns: 1fr; gap: 10px; } .perf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tema istituzionale Suardi: attivato dal superadmin in Impostazioni > Aspetto via html[data-ui-theme="suardi"]. Non altera data-ui-theme="current". */
html[data-ui-theme="suardi"] {
  --ink: #111111;
  --muted: #5d5d5d;
  --paper: #f3f3f3;
  --surface: #ffffff;
  --line: #d4d4d4;
  --forest: #0a0a0a;
  --forest-2: #d9261c;
  --lime: #e2231a;
  --shadow: none;
  --radius: 2px;
  --display: "Bahnschrift", "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  --body: "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
}
html[data-ui-theme="suardi"][data-theme="dark"] {
  --ink: #f2f2f2;
  --muted: #a8a8a8;
  --paper: #0d0d0d;
  --surface: #171717;
  --line: #363636;
  --forest: #000000;
  --forest-2: #ff5a4d;
  --lime: #e2231a;
}
html[data-ui-theme="suardi"] body { background: var(--paper); }
html[data-ui-theme="suardi"][data-theme="dark"] body { background: var(--paper); }
html[data-ui-theme="suardi"] h1,
html[data-ui-theme="suardi"] .panel h2,
html[data-ui-theme="suardi"] .settings-card h2,
html[data-ui-theme="suardi"] .device-card h2,
html[data-ui-theme="suardi"] .recording-card h2,
html[data-ui-theme="suardi"] .stat .value,
html[data-ui-theme="suardi"] .empty strong,
html[data-ui-theme="suardi"] .modal-head h2,
html[data-ui-theme="suardi"] .section-title h2,
html[data-ui-theme="suardi"] .config-section h2,
html[data-ui-theme="suardi"] .discovery-panel h2,
html[data-ui-theme="suardi"] .telemetry-head h2,
html[data-ui-theme="suardi"] .telemetry-subhead h3,
html[data-ui-theme="suardi"] .audit-panel h2,
html[data-ui-theme="suardi"] .latest-upload-title,
html[data-ui-theme="suardi"] .search-panel-copy strong,
html[data-ui-theme="suardi"] .recording-results-head strong,
html[data-ui-theme="suardi"] .savebar strong,
html[data-ui-theme="suardi"] .worker-summary strong,
html[data-ui-theme="suardi"] .perf-metric strong,
html[data-ui-theme="suardi"] .worker-flow-head h2 { font-stretch: condensed; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; }
html[data-ui-theme="suardi"] .eyebrow,
html[data-ui-theme="suardi"] .card-label { font-stretch: condensed; font-weight: 700; letter-spacing: .12em; }
html[data-ui-theme="suardi"] .topbar { padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
html[data-ui-theme="suardi"] .sidebar { border-top: 4px solid #e2231a; color: #f2f2f2; }
html[data-ui-theme="suardi"] .nav-label { color: #8f8f8f; font-stretch: condensed; font-weight: 700; letter-spacing: .16em; }
html[data-ui-theme="suardi"] .nav a { color: #e4e4e4; border-radius: 0; font-stretch: condensed; font-size: 15px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
html[data-ui-theme="suardi"] .nav a:hover,
html[data-ui-theme="suardi"] .nav a.active { background: rgba(255, 255, 255, .08); color: #fff; }
html[data-ui-theme="suardi"] .user-role { color: #a8a8a8; }
html[data-ui-theme="suardi"] .app-release { color: #858585; }
html[data-ui-theme="suardi"] .logout { color: #e4e4e4; }
html[data-ui-theme="suardi"] .logout:hover { color: #ff5a4d; }
html[data-ui-theme="suardi"] .btn,
html[data-ui-theme="suardi"] .field,
html[data-ui-theme="suardi"] .toggle,
html[data-ui-theme="suardi"] .toolbar,
html[data-ui-theme="suardi"] .toolbar-toggle,
html[data-ui-theme="suardi"] .devices-toolbar,
html[data-ui-theme="suardi"] .stat,
html[data-ui-theme="suardi"] .recording-card,
html[data-ui-theme="suardi"] .device-card,
html[data-ui-theme="suardi"] .discovery-panel,
html[data-ui-theme="suardi"] .discovery-counts span,
html[data-ui-theme="suardi"] .recording-pagination,
html[data-ui-theme="suardi"] .page-number,
html[data-ui-theme="suardi"] .icon-btn,
html[data-ui-theme="suardi"] .modal-card,
html[data-ui-theme="suardi"] .view-switch,
html[data-ui-theme="suardi"] .view-switch-btn,
html[data-ui-theme="suardi"] .savebar,
html[data-ui-theme="suardi"] .telemetry-stats > div,
html[data-ui-theme="suardi"] .telemetry-charts article,
html[data-ui-theme="suardi"] .admin-list-wrap,
html[data-ui-theme="suardi"] .recording-action,
html[data-ui-theme="suardi"] .thumbnail { border-radius: 2px; }
html[data-ui-theme="suardi"] .btn { font-stretch: condensed; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
html[data-ui-theme="suardi"] .btn:hover { border-color: #e2231a; }
html[data-ui-theme="suardi"] .btn-primary { border-color: #0a0a0a; background: #0a0a0a; color: #fff; }
html[data-ui-theme="suardi"] .btn-primary:hover { border-color: #e2231a; background: #e2231a; }
html[data-ui-theme="suardi"] .panel,
html[data-ui-theme="suardi"] .settings-section,
html[data-ui-theme="suardi"] .config-section,
html[data-ui-theme="suardi"] .telemetry-panel,
html[data-ui-theme="suardi"] .recording-results,
html[data-ui-theme="suardi"] .latest-upload { border-top: 3px solid var(--ink); }
html[data-ui-theme="suardi"] .panel,
html[data-ui-theme="suardi"] .recording-results { box-shadow: none; }
html[data-ui-theme="suardi"] .stat { background: var(--surface); border-top: 3px solid var(--ink); }
html[data-ui-theme="suardi"][data-theme="dark"] .stat { background: var(--surface); }
html[data-ui-theme="suardi"] .count-pill,
html[data-ui-theme="suardi"] .section-number,
html[data-ui-theme="suardi"] .config-number,
html[data-ui-theme="suardi"] .settings-tab.active .section-number { color: #fff; background: #e2231a; border-radius: 2px; }
html[data-ui-theme="suardi"] .settings-tabs { padding: 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; }
html[data-ui-theme="suardi"][data-theme="dark"] .settings-tabs { background: transparent; }
html[data-ui-theme="suardi"] .settings-tab { border-radius: 0; font-stretch: condensed; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
html[data-ui-theme="suardi"] .settings-tab.active { color: var(--ink); background: transparent; box-shadow: inset 0 -3px 0 #e2231a; }
html[data-ui-theme="suardi"] .recording-bulkbar { background: var(--paper); }
html[data-ui-theme="suardi"] .thumbnail { background: #e4e4e4; }
html[data-ui-theme="suardi"][data-theme="dark"] .thumbnail { background: #262626; }
html[data-ui-theme="suardi"] .clip-row,
html[data-ui-theme="suardi"] .device-row,
html[data-ui-theme="suardi"] .action-list a,
html[data-ui-theme="suardi"] .dashboard-alert-item { border-color: var(--line); }
html[data-ui-theme="suardi"][data-theme="dark"] .field { background: #101010; }
html[data-ui-theme="suardi"] .field:focus { border-color: #e2231a; box-shadow: 0 0 0 3px rgba(226, 35, 26, .14); }
html[data-ui-theme="suardi"] .audit-table th { color: var(--ink); font-stretch: condensed; font-size: 12px; letter-spacing: .1em; border-bottom: 2px solid var(--ink); }
html[data-ui-theme="suardi"][data-theme="dark"] .audit-table th,
html[data-ui-theme="suardi"][data-theme="dark"] .audit-table td { border-color: var(--line); }
html[data-ui-theme="suardi"] .storage-meter span { background: #e2231a; }
html[data-ui-theme="suardi"][data-theme="dark"] .page-number.active,
html[data-ui-theme="suardi"][data-theme="dark"] .view-switch-btn.active,
html[data-ui-theme="suardi"][data-theme="dark"] .review-choice.active,
html[data-ui-theme="suardi"][data-theme="dark"] .btn-primary { border-color: #e2231a; background: #e2231a; color: #fff; }
html[data-ui-theme="suardi"] .hero-copy { background: linear-gradient(130deg, #000 0%, #262626 100%); }
html[data-ui-theme="suardi"] .hero-copy:after { border-color: rgba(226, 35, 26, .35); }
html[data-ui-theme="suardi"] .worker-flow { background: linear-gradient(135deg, #050505, #1a1a1a 58%, #2a2a2a); border-color: rgba(255, 255, 255, .14); }
html[data-ui-theme="suardi"] .worker-flow::after { border-color: rgba(226, 35, 26, .3); box-shadow: 0 0 0 42px rgba(226, 35, 26, .04), 0 0 0 84px rgba(226, 35, 26, .025); }
html[data-ui-theme="suardi"] .worker-flow-head .card-label,
html[data-ui-theme="suardi"] .worker-batch-progress strong,
html[data-ui-theme="suardi"] .worker-flow-card footer { color: #ff5a4d; }
html[data-ui-theme="suardi"] .worker-batch-progress > div:first-child { color: #dcdcdc; }
html[data-ui-theme="suardi"] .worker-flow-card-head { color: #bdbdbd; }
html[data-ui-theme="suardi"] .worker-flow-card p { color: #c8c8c8; }
html[data-ui-theme="suardi"] .worker-flow-card footer small { color: #b0b0b0; }
html[data-ui-theme="suardi"] .worker-flow-card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); border-radius: 2px; }
html[data-ui-theme="suardi"] .worker-flow-card.is-active { background: rgba(255, 255, 255, .08); box-shadow: inset 3px 0 0 #e2231a; }
html[data-ui-theme="suardi"] .worker-batch-meter span,
html[data-ui-theme="suardi"] .worker-flow-progress span { background: linear-gradient(90deg, #8a8a8a, #e2231a); box-shadow: none; }
html[data-ui-theme="suardi"] .worker-flow-card.is-active .worker-flow-card-head i { background: #e2231a; box-shadow: 0 0 0 4px rgba(226, 35, 26, .2); }
html[data-ui-theme="suardi"] .worker-flow-signal span { background: linear-gradient(180deg, rgba(226, 35, 26, .8), rgba(226, 35, 26, .06)); }
html[data-ui-theme="suardi"][data-theme="dark"] .clip-duration,
html[data-ui-theme="suardi"][data-theme="dark"] .recording-list-duration,
html[data-ui-theme="suardi"][data-theme="dark"] .discovery-counts b,
html[data-ui-theme="suardi"][data-theme="dark"] .audit-action,
html[data-ui-theme="suardi"][data-theme="dark"] .form-result,
html[data-ui-theme="suardi"][data-theme="dark"] .worker-summary strong,
html[data-ui-theme="suardi"][data-theme="dark"] .perf-metric strong,
html[data-ui-theme="suardi"][data-theme="dark"] .recording-action:hover { color: var(--ink); }
html[data-ui-theme="suardi"] .new-login-intro { border-top: 4px solid #e2231a; background: linear-gradient(145deg, #000 0%, #151515 72%, #262626 100%); color: #f2f2f2; }
html[data-ui-theme="suardi"] .new-login-copy .eyebrow { color: #ff5a4d; }
html[data-ui-theme="suardi"] .new-login-copy h1 { font-stretch: condensed; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; }
html[data-ui-theme="suardi"] .new-login-copy > p:last-child { color: #cfcfcf; }
html[data-ui-theme="suardi"] .new-login-orbit { border-color: rgba(226, 35, 26, .32); }
html[data-ui-theme="suardi"] .orbit-two { border-color: rgba(255, 255, 255, .1); }
html[data-ui-theme="suardi"] .new-login-panel { background: var(--paper); }
html[data-ui-theme="suardi"] .new-login-card { border-top: 3px solid var(--ink); border-radius: 2px; box-shadow: none; }
html[data-ui-theme="suardi"] .new-login-card h2 { font-stretch: condensed; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; }
html[data-ui-theme="suardi"] .new-login-note a { color: #d9261c; }
html[data-ui-theme="suardi"][data-theme="dark"] .new-login-note a { color: #ff5a4d; }
html[data-ui-theme="suardi"] .login-form input { border-radius: 2px; }
html[data-ui-theme="suardi"] .login-form input:focus { border-color: #e2231a; box-shadow: 0 0 0 3px rgba(226, 35, 26, .14); }
html[data-ui-theme="suardi"][data-theme="dark"] .login-form input { background: #101010; }
html[data-ui-theme="suardi"] .new-login-brand-mobile .brand-logo { border-radius: 2px; }

/* Tema istituzionale Planetel: attivato dal superadmin in Impostazioni > Aspetto via html[data-ui-theme="planetel"]. */
html[data-ui-theme="planetel"] {
  --ink: #121611;
  --muted: #5e6067;
  --paper: #edf1f4;
  --surface: #ffffff;
  --line: #dbdada;
  --forest: #143d1a;
  --forest-2: #1f7a23;
  --lime: #f29200;
  --shadow: 0 8px 28px rgba(18, 22, 17, .07);
  --radius: 20px;
  --display: "Inter Tight", Inter, "Segoe UI", Arial, sans-serif;
  --body: "Inter Tight", Inter, "Segoe UI", Arial, sans-serif;
}
html[data-ui-theme="planetel"][data-theme="dark"] {
  --ink: #eef2ee;
  --muted: #a9b0aa;
  --paper: #0f130f;
  --surface: #181d18;
  --line: #2f362f;
  --forest: #0c2a11;
  --forest-2: #6fc474;
  --lime: #f29200;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
}
html[data-ui-theme="planetel"] body,
html[data-ui-theme="planetel"][data-theme="dark"] body { background: var(--paper); }
html[data-ui-theme="planetel"] h1,
html[data-ui-theme="planetel"] .panel h2,
html[data-ui-theme="planetel"] .settings-card h2,
html[data-ui-theme="planetel"] .device-card h2,
html[data-ui-theme="planetel"] .recording-card h2,
html[data-ui-theme="planetel"] .stat .value,
html[data-ui-theme="planetel"] .empty strong,
html[data-ui-theme="planetel"] .modal-head h2,
html[data-ui-theme="planetel"] .section-title h2,
html[data-ui-theme="planetel"] .config-section h2,
html[data-ui-theme="planetel"] .discovery-panel h2,
html[data-ui-theme="planetel"] .telemetry-head h2,
html[data-ui-theme="planetel"] .telemetry-subhead h3,
html[data-ui-theme="planetel"] .audit-panel h2,
html[data-ui-theme="planetel"] .latest-upload-title,
html[data-ui-theme="planetel"] .search-panel-copy strong,
html[data-ui-theme="planetel"] .recording-results-head strong,
html[data-ui-theme="planetel"] .savebar strong,
html[data-ui-theme="planetel"] .worker-summary strong,
html[data-ui-theme="planetel"] .perf-metric strong,
html[data-ui-theme="planetel"] .worker-flow-head h2,
html[data-ui-theme="planetel"] .new-login-copy h1,
html[data-ui-theme="planetel"] .new-login-card h2 { font-weight: 700; letter-spacing: -.02em; }
html[data-ui-theme="planetel"] .btn { border-radius: 999px; }
html[data-ui-theme="planetel"] .btn-primary { border-color: #429d46; background: #429d46; color: #fff; }
html[data-ui-theme="planetel"] .btn-primary:hover { border-color: #1f7a23; background: #1f7a23; }
html[data-ui-theme="planetel"] .btn:hover { border-color: #429d46; }
html[data-ui-theme="planetel"] .field { border-radius: 14px; }
html[data-ui-theme="planetel"] .field:focus,
html[data-ui-theme="planetel"] .login-form input:focus { border-color: #429d46; box-shadow: 0 0 0 3px rgba(66, 157, 70, .18); }
html[data-ui-theme="planetel"] .panel,
html[data-ui-theme="planetel"] .recording-results,
html[data-ui-theme="planetel"] .stat,
html[data-ui-theme="planetel"] .settings-section,
html[data-ui-theme="planetel"] .config-section { box-shadow: none; }
html[data-ui-theme="planetel"] .count-pill,
html[data-ui-theme="planetel"] .section-number,
html[data-ui-theme="planetel"] .config-number,
html[data-ui-theme="planetel"] .settings-tab.active .section-number { color: #1f7a23; background: #e3f1ec; }
html[data-ui-theme="planetel"] .settings-tab.active { background: #429d46; }
html[data-ui-theme="planetel"] .nav a { border-radius: 14px; }
html[data-ui-theme="planetel"] .nav a.active { box-shadow: inset 3px 0 0 #f29200; }
html[data-ui-theme="planetel"] .hero-copy { background: linear-gradient(130deg, #143d1a 0%, #1f7a23 100%); }
html[data-ui-theme="planetel"] .hero-copy:after { border-color: rgba(242, 146, 0, .26); }
html[data-ui-theme="planetel"] .worker-flow { background: linear-gradient(135deg, #0f3314, #16491d 58%, #1f7a23); border-color: rgba(111, 196, 116, .34); }
html[data-ui-theme="planetel"] .worker-flow::after { border-color: rgba(242, 146, 0, .26); box-shadow: 0 0 0 42px rgba(242, 146, 0, .04), 0 0 0 84px rgba(242, 146, 0, .025); }
html[data-ui-theme="planetel"] .worker-batch-meter span,
html[data-ui-theme="planetel"] .worker-flow-progress span { background: linear-gradient(90deg, #6fc474, #f29200); }
html[data-ui-theme="planetel"] .worker-flow-card.is-active .worker-flow-card-head i { background: #f29200; box-shadow: 0 0 0 4px rgba(242, 146, 0, .18); }
html[data-ui-theme="planetel"] .worker-flow-signal span { background: linear-gradient(180deg, rgba(242, 146, 0, .78), rgba(242, 146, 0, .07)); }
html[data-ui-theme="planetel"] .storage-meter span { background: linear-gradient(90deg, #6fc474, #429d46); }
html[data-ui-theme="planetel"] .new-login-intro { background: linear-gradient(145deg, #0c2a11 0%, #17491d 72%, #2e8a33 100%); }
html[data-ui-theme="planetel"] .new-login-orbit { border-color: rgba(242, 146, 0, .34); }
html[data-ui-theme="planetel"] .new-login-panel { background: var(--paper); }
html[data-ui-theme="planetel"] .new-login-card { box-shadow: none; }
html[data-ui-theme="planetel"] .new-login-note a { color: #1f7a23; }
html[data-ui-theme="planetel"][data-theme="dark"] .new-login-note a { color: #6fc474; }
html[data-ui-theme="planetel"][data-theme="dark"] .login-form input { background: #111a14; }
html[data-ui-theme="planetel"][data-theme="dark"] .page-number.active,
html[data-ui-theme="planetel"][data-theme="dark"] .view-switch-btn.active,
html[data-ui-theme="planetel"][data-theme="dark"] .review-choice.active,
html[data-ui-theme="planetel"][data-theme="dark"] .settings-tab.active { border-color: #429d46; background: #429d46; color: #fff; }
html[data-ui-theme="planetel"][data-theme="dark"] .clip-duration,
html[data-ui-theme="planetel"][data-theme="dark"] .recording-list-duration,
html[data-ui-theme="planetel"][data-theme="dark"] .discovery-counts b,
html[data-ui-theme="planetel"][data-theme="dark"] .audit-action,
html[data-ui-theme="planetel"][data-theme="dark"] .form-result,
html[data-ui-theme="planetel"][data-theme="dark"] .worker-summary strong,
html[data-ui-theme="planetel"][data-theme="dark"] .perf-metric strong,
html[data-ui-theme="planetel"][data-theme="dark"] .recording-action:hover { color: var(--ink); }

/* Diretta RTSP: HLS attraversa l'HTTPS esistente senza porte UDP lato browser. */
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .3fr); gap: 18px; align-items: start; }
.live-select-wrap { display: grid; gap: 3px; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .08em; text-transform: uppercase; }
.live-select-wrap .field { min-width: 190px; padding: 8px 30px 8px 10px; color: var(--ink); font-size: 13px; font-weight: normal; letter-spacing: normal; text-transform: none; }
.live-player-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.live-player-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.live-player-head h2, .live-info-panel h2 { margin: 5px 0 0; font: 700 26px/1.1 var(--display); letter-spacing: -.04em; }
.live-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: bold; white-space: nowrap; }
.live-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(242,167,91,.15); }
.live-state.is-live { color: var(--forest-2); }
.live-state.is-live i { background: #47bb87; box-shadow: 0 0 0 4px rgba(71,187,135,.15); animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 8px rgba(71,187,135,0); } }
.live-player-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1511; }
.live-player-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #0b1511; }
.live-placeholder { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; padding: 28px; color: #e7eee9; text-align: center; background: radial-gradient(circle at 70% 10%, rgba(80,152,119,.35), transparent 35%), #0b1511; }
.live-placeholder strong { font: 700 25px/1.1 var(--display); }
.live-placeholder span { max-width: 340px; color: #b9cbbf; font-size: 14px; line-height: 1.5; }
.live-info-panel { padding: 24px; }
.live-info-panel > p { margin: 22px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.live-details { display: grid; gap: 13px; margin: 22px 0 0; }
.live-details div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.live-details dt { color: var(--muted); font-size: 12px; }
.live-details dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: bold; text-align: right; }
.live-overlay-control { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.live-overlay-control strong, .live-overlay-control span { display: block; }
.live-overlay-control strong { color: var(--ink); font-size: 13px; }
.live-overlay-control span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.live-switch { flex: 0 0 auto; position: relative; width: 44px; height: 25px; cursor: pointer; }
.live-switch input { position: absolute; opacity: 0; pointer-events: none; }
.live-switch span { display: block; width: 100%; height: 100%; margin: 0; border-radius: 999px; background: var(--line); transition: background .18s ease; }
.live-switch span::after { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); content: ""; transition: transform .18s ease; }
.live-switch input:checked + span { background: #32a878; }
.live-switch input:checked + span::after { transform: translateX(19px); }
.live-switch input:disabled + span { cursor: wait; opacity: .55; }
@media (max-width: 980px) { .live-layout { grid-template-columns: 1fr; } .live-info-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, .8fr); column-gap: 28px; } .live-info-panel > p { grid-column: 1 / -1; } }
@media (max-width: 560px) { .live-player-head { align-items: flex-start; flex-direction: column; } .live-info-panel { display: block; } }
@media (max-width: 560px) { .live-select-wrap { width: 100%; } .live-select-wrap .field { width: 100%; } }

/* Font Inter Tight (licenza OFL) servito localmente, usato solo dal tema Planetel. */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/new/fonts/inter-tight-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/new/fonts/inter-tight-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
