:root {
  --bg: #0f172a; --panel: #1e293b; --panel2: #273449; --line: #334155;
  --txt: #e2e8f0; --muted: #94a3b8;
  /* Бренд-акцент Genesis (Suite-токен --ge-color-brand indigo #4f46e5; фолбэк) */
  --acc: var(--ge-color-brand, #6366f1); --ok: #22c55e;
  --warn: #f59e0b; --crit: #ef4444;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--txt); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh; padding-top: env(safe-area-inset-top);
}
#topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--bg); border-bottom: 1px solid var(--line);
}
#topbar h1 { font-size: 18px; margin: 0; flex: 1; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.dot.off { background: var(--muted); }
button.icon { background: none; border: none; color: var(--txt); font-size: 26px; line-height: 1; padding: 0 6px; }
#view { flex: 1; padding: 14px; overflow-y: auto; padding-bottom: 80px; }
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--panel);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
#tabbar button { flex: 1; background: none; border: none; color: var(--muted); padding: 12px 4px; font-size: 14px; }
#tabbar button.active { color: var(--acc); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.muted { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel2); color: var(--muted); }
.pill.open { color: var(--acc); } .pill.in_progress { color: var(--warn); }
.pill.done { color: var(--ok); } .pill.high, .pill.critical { color: var(--crit); }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; background: var(--panel2); border: 1px solid var(--line); color: var(--txt);
  border-radius: 10px; padding: 11px; font: inherit;
}
.btn {
  display: block; width: 100%; background: var(--acc); color: #fff; border: none;
  border-radius: 10px; padding: 13px; font-weight: 600; font-size: 16px; margin-top: 12px;
}
.btn.sec { background: var(--panel2); color: var(--txt); }
.btn.danger { background: var(--crit); color: #fff; }
.chk { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chk input[type=checkbox] { width: 22px; height: 22px; flex: 0 0 auto; }
.chk input[type=text] { flex: 1; }
.empty { text-align: center; color: var(--muted); margin-top: 40px; }
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 20;
  background: #000d; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; max-width: 90%;
}
.qbadge { position: fixed; right: 12px; bottom: 76px; z-index: 6; background: var(--warn); color: #000; font-size: 12px; padding: 4px 9px; border-radius: 999px; }
#scanVideo { width: 100%; border-radius: 12px; background: #000; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
