:root {
  /* Andito design system (design/brand/README.md): orange #ab420f, warm white #fdf8ed, jet, andito-black, Poppins. */
  --bg: #fdf8ed; --card: #ffffff; --ink: #1a1a1a; --head: #272829; --muted: #5f6468; --line: #eadfca;
  --brand: #ab420f; --accent: #ab420f; --accent-ink: #ffffff; --ok: #1f6f43; --ok-bg: #e6f2ea; --warn: #8a4b0b; --warn-bg: #fbecd6;
  --bad: #a3221b; --bad-bg: #fbe5e2; --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1a1a1a; --card: #272829; --ink: #fdf8ed; --head: #fdf8ed; --muted: #b9b2a5; --line: #3a3b3d; --brand: #ab420f;
          --accent: #c9551c; --ok: #7fd3a0; --ok-bg: #1d3327; --warn: #e4b269; --warn-bg: #3a2c16; --bad: #f19a90; --bad-bg: #3d1f1c; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
.top { color: #fdf8ed; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
       background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .01em; }
.brand img { height: 30px; width: auto; display: block; }
.lockup { display: block; height: 96px; width: auto; margin: 4px auto 12px; }
h1, h2 { color: var(--head); font-weight: 700; }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.account button { background: transparent; color: #fdf8ed; border: 1px solid rgba(253,248,237,.55); padding: 6px 10px; min-height: 0; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
h1 { font-size: 24px; margin: 8px 0 4px; }
h2 { font-size: 18px; margin: 0 0 10px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.stack > * + * { margin-top: 10px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
                          border-radius: 10px; padding: 11px 12px; }
input[type=checkbox] { width: auto; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
button { font: inherit; font-weight: 600; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
         padding: 10px 14px; min-height: 44px; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.big { width: 100%; font-size: 18px; min-height: 60px; }
button.danger { color: var(--bad); }
button:disabled { opacity: .55; cursor: default; }
.actions { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.row > button { flex: 0 0 auto; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 650; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.idle { background: var(--line); color: var(--muted); }
.status { font-size: 22px; font-weight: 700; margin: 4px 0; }
.alert { border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.camera { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; max-height: 70vh; margin: 0 auto; }
.camera video, .camera img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera video { transform: scaleX(-1); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 6px 0 4px; }
.tabs button { flex: 0 0 auto; min-height: 38px; padding: 6px 12px; }
.tabs button[aria-selected=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; }
.people { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.person { display: flex; flex-direction: column; gap: 6px; }
.modal { position: fixed; inset: 0; background: rgba(2,6,23,.7); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal[hidden] { display: none; }
.modal .card { max-width: 420px; width: 100%; }
.modal img { width: 100%; border-radius: 10px; display: block; }
.spacer { height: 8px; }
.brand span:last-child { white-space: nowrap; }
.people .card { margin: 0; }
.person .badge { align-self: flex-start; }
@media (max-width: 420px) { .brand span:last-child { font-size: 15px; } .account .small { display: none; } }
