body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.event-line { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.event-line:last-child { border-bottom:0; }
.event-line div { display:grid; }
.event-line strong { font-size:12px; }
.event-line small { font-size:10px; color:var(--muted); margin-top:2px; }
button:disabled { opacity:.55; cursor:wait; }
.processing.bad { color:var(--red); }
.processing.bad .spinner { display:none; }
.capture-tabs { display:flex; gap:4px; padding:3px; background:#edf1ef; border-radius:9px; }
.capture-tabs button { flex:1; border:0; background:transparent; border-radius:7px; padding:7px; color:var(--muted); font-weight:600; }
.capture-tabs button.active { background:#fff; color:var(--ink); box-shadow:0 2px 7px rgba(0,0,0,.06); }
.camera-stage { position:relative; aspect-ratio:4/3; overflow:hidden; border-radius:11px; background:#0a1511; display:grid; place-items:center; }
.camera-stage video { width:100%; height:100%; object-fit:cover; transform:scaleX(-1); }
.camera-stage #cameraIdle { position:absolute; color:#8ca097; font-size:12px; }
.camera-capture { display:grid; gap:9px; }
.preview-title { display:flex; justify-content:space-between; margin-bottom:7px; font-size:12px; font-weight:600; }
.preview-title button { border:0; background:transparent; color:var(--red); font-size:11px; }

/* Devtric AI visual system */
:root {
  --bg:#f3f5fa;
  --surface:#ffffff;
  --ink:#172033;
  --muted:#6c768b;
  --line:#e1e6f0;
  --nav:#0b1020;
  --nav2:#171f38;
  --accent:#6677f4;
  --accent-dark:#4b5ed7;
  --red:#c94e5a;
  --amber:#c78b2b;
  --shadow:0 12px 34px rgba(26,35,62,.07);
}
body { background:linear-gradient(180deg,#f8f9fc 0,#f3f5fa 240px); }
.wordmark { letter-spacing:-.035em; }
.wordmark b { color:#9facff; font-weight:750; }
.brand-symbol { color:#fff; background:linear-gradient(145deg,#7c8cff,#5265e7); box-shadow:0 8px 24px rgba(91,108,239,.25); font-size:18px; letter-spacing:-.03em; }
.login-brand { background:radial-gradient(circle at 78% 24%,rgba(108,128,255,.32),transparent 34%),radial-gradient(circle at 12% 86%,rgba(32,197,210,.12),transparent 34%),linear-gradient(145deg,#080d1d,#141c36 72%,#18264b); }
.login-brand::after { content:""; position:absolute; width:280px; height:280px; right:8%; bottom:6%; border:1px solid rgba(151,165,255,.13); border-radius:48% 52% 63% 37%; transform:rotate(18deg); }
.login-brand { position:relative; overflow:hidden; }
.login-brand > * { position:relative; z-index:1; }
.login-copy span { color:#9ca8c8; text-transform:uppercase; letter-spacing:.14em; font-size:11px; }
.login-copy h1 { max-width:760px; }
.login-copy p { max-width:520px; color:#9ca8c8; line-height:1.7; font-size:14px; }
.login-brand>small { color:#7f8baa; letter-spacing:.08em; text-transform:uppercase; }
.login-intro { color:var(--muted); font-size:13px; margin:-15px 0 12px; }
.kicker { color:#5969db; }
input,select { border-color:#dbe1ec; }
input:focus,select:focus { border-color:#7484f3; box-shadow:0 0 0 3px rgba(102,119,244,.13); }
.btn { transition:transform .15s ease,background .15s ease,box-shadow .15s ease; }
.btn:not(:disabled):active { transform:translateY(1px); }
.btn.primary { background:linear-gradient(135deg,#586be5,#4557c9); box-shadow:0 7px 16px rgba(75,94,215,.18); }
.btn.primary:hover { background:linear-gradient(135deg,#4d60d7,#3d4fbd); }
.btn.secondary { background:#edf0f6; color:#35405a; }
.sidebar { background:linear-gradient(180deg,#0b1020,#10172b); box-shadow:8px 0 30px rgba(12,18,35,.08); }
.sidebar nav button { color:#8f9ab4; }
.sidebar nav button span { color:#66728e; }
.sidebar nav button:hover,.sidebar nav button.active { background:#19223d; }
.sidebar-foot { border-color:#202a43; color:#a1abc1; }
.sidebar-foot small { color:#66728e; }
.health-dot.ok { background:#32d0bd; box-shadow:0 0 0 4px rgba(50,208,189,.13); }
.avatar { background:linear-gradient(145deg,#202a4a,#10172d); box-shadow:0 6px 16px rgba(18,26,50,.16); }
.hero-status { background:radial-gradient(circle at 80% 0,rgba(121,139,255,.28),transparent 38%),linear-gradient(110deg,#111936,#26356c); color:#edf0ff; }
.live-pulse { background:#44dfc5; box-shadow:0 0 0 5px rgba(68,223,197,.13); }
.hero-status time { color:#b0bae0; }
.metrics article,.surface { border-color:var(--line); }
.metrics article { position:relative; overflow:hidden; }
.metrics article::after { content:""; position:absolute; width:58px; height:3px; left:17px; bottom:0; border-radius:3px 3px 0 0; background:linear-gradient(90deg,#6577f0,#45cbd4); }
.overview-camera,.stream-card { background:#0d1324; }
.stream-card { border-color:#202b4a; }
.stream-frame { background:#090e1c; }
.stream-label small,.stream-placeholder { color:#8995b2; }
.segmented,.capture-tabs { background:#e9edf5; }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.settings-card { max-width:none; overflow:hidden; }
.settings-title { min-height:78px; }
.settings-title .kicker { margin-bottom:4px; }
.settings-title span { color:#4d5fd0; background:#edf0ff; }
.settings-card label.settings-field { grid-template-columns:1fr; gap:10px; }
.settings-card input[type="checkbox"] { width:42px; height:23px; appearance:none; background:#cdd4e2; border:0; border-radius:999px; padding:0; position:relative; justify-self:end; transition:.18s ease; }
.settings-card input[type="checkbox"]::after { content:""; position:absolute; width:17px; height:17px; top:3px; left:3px; border-radius:50%; background:white; box-shadow:0 2px 5px rgba(20,30,50,.2); transition:.18s ease; }
.settings-card input[type="checkbox"]:checked { background:#5b6ee8; }
.settings-card input[type="checkbox"]:checked::after { transform:translateX(19px); }
.settings-actions.split { display:flex; justify-content:space-between; }
.status.online,.status.granted { background:#dcf6ef; color:#13705e; }
.status.observed { background:#e9edff; color:#485ac8; }
.event-thumb { width:44px; height:44px; display:block; border:0; padding:0; border-radius:10px; overflow:hidden; background:#e9edf5; }
.event-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .2s ease; }
.event-thumb:hover img { transform:scale(1.06); }
.event-thumb-empty { width:44px; height:44px; display:grid; place-items:center; border-radius:10px; background:#edf0f6; color:#9ba5b8; font-size:15px; }
.event-line .event-thumb,.event-line .event-thumb-empty { flex:0 0 42px; width:42px; height:42px; }
.event-line > div:not(.event-thumb-empty) { min-width:0; }
.snapshot-modal { width:min(620px,calc(100% - 28px)); }
.snapshot-shell { padding:22px; }
.snapshot-shell .modal-head { margin-bottom:14px; }
.snapshot-shell>img { width:100%; max-height:68vh; object-fit:contain; display:block; border-radius:12px; background:#0b1020; }
.snapshot-shell .inline-note { margin-top:11px; }
.toast { background:#18213d; box-shadow:0 14px 36px rgba(12,20,42,.25); }

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

@media(max-width:700px) {
  body { background:#f4f6fa; }
  .shell { display:block; }
  .sidebar { position:fixed; z-index:15; inset:auto 0 0; height:70px; padding:7px 8px calc(7px + env(safe-area-inset-bottom)); display:block; background:rgba(11,16,32,.97); backdrop-filter:blur(14px); }
  .wordmark.compact,.sidebar-foot { display:none; }
  .sidebar nav { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:2px; margin:0; overflow:hidden; }
  .sidebar nav button { min-width:0; padding:8px 2px; text-align:center; font-size:8.5px; line-height:1.1; white-space:nowrap; overflow:hidden; }
  .sidebar nav button span { display:block; width:auto; font-size:15px; margin-bottom:4px; }
  main { padding:0 14px calc(92px + env(safe-area-inset-bottom)); }
  .topbar { height:72px; position:sticky; top:0; z-index:10; margin:0 -14px 2px; padding:0 14px; background:rgba(244,246,250,.9); backdrop-filter:blur(12px); border-bottom:1px solid rgba(225,230,240,.8); }
  .topbar h1 { font-size:21px; }
  .topbar .kicker { display:none; }
  .top-actions .secondary { display:none; }
  .avatar { width:36px; height:36px; }
  .hero-status { margin-top:10px; }
  .metrics { grid-template-columns:1fr 1fr; gap:9px; }
  .metrics article { padding:14px; }
  .metrics strong { font-size:25px; }
  .dashboard-grid,.overview-cameras,.live-grid,.enroll-layout,.two-col,.settings-grid { grid-template-columns:1fr; }
  .surface { padding:14px; }
  .table-surface { padding:4px 8px; }
  .section-toolbar { align-items:flex-start; }
  .search-box { width:min(210px,65vw); }
  .camera-row { grid-template-columns:1fr auto; gap:10px; padding:14px; }
  .camera-row .button-row { grid-column:1/-1; overflow-x:auto; padding-top:3px; }
  .camera-row .button-row .btn { white-space:nowrap; }
  .settings-card label { grid-template-columns:1fr; gap:10px; padding:14px 16px; }
  .settings-card input[type="checkbox"] { justify-self:start; }
  .settings-title { padding:17px 16px; }
  .settings-actions { padding:16px; }
  .modal form,.snapshot-shell { padding:18px; }
  .event-thumb,.event-thumb-empty { width:40px; height:40px; }
  th,td { padding:11px 8px; white-space:nowrap; }
  .toast { left:14px; right:14px; top:12px; text-align:center; }
}
