:root { --bg:#111; --fg:#eee; --muted:#8b8b8b; --card:#1d1d1d; --line:#2c2c2c;
        --accent:#3fb950; --err:#f85149; --warn:#d29922; }
* { box-sizing:border-box; }
html, body { margin:0; background:var(--bg); color:var(--fg); font:16px system-ui, sans-serif; }
body { padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
header { position:sticky; top:0; z-index:5; display:flex; justify-content:space-between; align-items:center;
         padding:12px 16px; padding-top:calc(12px + env(safe-area-inset-top)); background:var(--bg);
         border-bottom:1px solid var(--line); }
#title { font-weight:700; }
#who { color:var(--muted); font-size:14px; }
main { max-width:560px; margin:0 auto; padding:12px 16px; }
h2 { font-size:20px; margin:8px 0 12px; }
h3 { font-size:16px; margin:16px 0 8px; color:var(--muted); font-weight:600; }
button, input, select { font:inherit; padding:12px; border-radius:10px; border:1px solid var(--line);
                        background:var(--card); color:var(--fg); width:100%; }
button { cursor:pointer; margin:4px 0; text-align:left; }
button.primary { background:var(--accent); color:#000; border:none; text-align:center; font-weight:600; }
button.danger { color:var(--err); text-align:center; }
button.small { width:auto; padding:8px 12px; margin:0; font-size:14px; text-align:center; }
label { display:block; margin:10px 0 4px; color:var(--muted); font-size:14px; }
label.check { display:flex; gap:10px; align-items:flex-start; color:var(--fg); }
label.check input { width:auto; margin-top:3px; }
.grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; }
.grid button { text-align:center; }
.muted { color:var(--muted); font-size:14px; }
.box { background:var(--card); border-radius:12px; padding:14px; margin:10px 0; }
.row { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.list > * { border-bottom:1px solid var(--line); padding:12px 0; }
.list > *:last-child { border-bottom:none; }
.list button:not(.small) { background:none; border:none; padding:0; margin:0; }
.big { font-size:32px; font-weight:700; color:var(--accent); }
.kpis { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.kpis .box { margin:0; }
.kpis b { display:block; font-size:22px; margin-top:4px; }
.err { color:var(--err); }
.tag { font-size:12px; padding:2px 8px; border-radius:20px; background:var(--line); color:var(--muted); }
.bar { height:8px; background:#333; border-radius:4px; overflow:hidden; margin:8px 0 4px; }
.bar > div { height:100%; background:var(--accent); }
.qr { background:#fff; border-radius:12px; padding:8px; display:flex; justify-content:center; }
.qr svg { width:100%; max-width:280px; height:auto; }
.key { font-family:ui-monospace, monospace; word-break:break-all; background:#000; padding:10px; border-radius:8px; }
#reader { width:100%; }
nav { position:fixed; bottom:0; left:0; right:0; display:flex; background:#161616; border-top:1px solid var(--line);
      padding-bottom:env(safe-area-inset-bottom); }
nav a { flex:1; text-align:center; padding:10px 0 12px; color:var(--muted); text-decoration:none; font-size:12px; }
nav a svg { display:block; width:24px; height:24px; margin:0 auto 2px; fill:none; stroke:currentColor;
            stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
nav a.on { color:var(--accent); }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
