:root{
  --bg:#0B0C10; --bg-elev-1:#121318; --bg-elev-2:#171923;
  --border:#262838; --muted:#A2A7B5; --text:#E9ECF1;
  --brand:#25C2A0; --brand-emph:#18A78A; --brand-weak:#143B37;
  --success:#2ECC71; --warning:#F4C542; --danger:#FF6655; --info:#5B8CFF;
  --focus:#5B8CFF; --selection:rgba(91,140,255,0.24);
  --c1:#5B8CFF; --c2:#25C2A0; --c3:#FF8870; --c4:#B076FF; --c5:#F2C94C; --c6:#66D1FF;
  --op-8: rgba(255,255,255,0.08); --op-12: rgba(255,255,255,0.12);
}
*{box-sizing:border-box; transition: background-color .18s, color .18s, border-color .18s, transform .18s;}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;}
::selection{background:var(--selection);}
a{color:inherit;text-decoration:none}
.container{max-width:520px;margin:0 auto;padding:16px 16px 96px}
header.app{position:sticky;top:0;z-index:40;height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:rgba(11,12,16,.9);backdrop-filter:blur(8px);border-bottom:1px solid var(--border);}
.logo{display:flex;align-items:center;gap:8px}
.logo .dot{width:24px;height:24px;background:var(--brand);border-radius:8px}
.progress{width:140px}
.progress .bar{width:100%;height:8px;border-radius:999px;background:var(--op-8);overflow:hidden}
.progress .bar>div{height:8px;background:var(--brand);border-radius:999px}
.progress .label{margin-top:4px;font-size:10px;color:var(--muted);text-align:right}

.card{background:var(--bg-elev-1);border:1px solid var(--border);border-radius:16px;box-shadow:0 1px 1px rgba(0,0,0,.25),0 2px 8px rgba(0,0,0,.35);padding:16px;}

h1,h2,h3{line-height:1.3;margin:0 0 8px;font-weight:600}
p{margin:0 0 12px;color:var(--muted)}
label.block{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}
input[type=text],input[type=datetime-local],textarea{width:100%;height:44px;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:var(--bg-elev-1);color:var(--text)}
textarea{height:auto;resize:vertical}
input::placeholder,textarea::placeholder{color:rgba(233,236,241,.5)}
input:focus,textarea:focus,select:focus{outline:2px solid var(--focus);outline-offset:2px}

.row{display:flex;gap:8px;align-items:center}
.row.wrap{flex-wrap:wrap}
.stack{display:flex;flex-direction:column;gap:12px}
.list{display:flex;flex-direction:column;gap:8px}
.grid{display:grid;gap:8px}

.btn{height:44px;padding:0 14px;border-radius:12px;font-weight:600;border:1px solid transparent;cursor:pointer}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.primary{background:var(--brand);color:#081313}
.btn.primary:hover{background:var(--brand-emph)}
.btn.secondary{background:transparent;border-color:var(--border);color:var(--text)}
.btn.secondary:hover{background:var(--op-8)}

.bottom-bar{position:fixed;left:0;right:0;bottom:0;z-index:40;background:rgba(18,19,24,.95);backdrop-filter:blur(8px);border-top:1px solid var(--border);padding:12px 16px}
.bottom-inner{max-width:520px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px}

.badge{font-size:11px;color:#081313;background:var(--brand);padding:2px 8px;border-radius:999px;font-weight:600}

.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid rgba(255,255,255,.06);padding:10px;text-align:left;font-size:14px}
.table th{color:var(--muted);font-weight:600}
.table .num{text-align:right}

.row-radio{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:12px;cursor:pointer}
.row-radio:hover{background:var(--op-8)}
.row-radio input{width:20px;height:20px;accent-color:var(--brand)}

.tristate{display:flex;gap:6px}
.tristate button{height:36px;padding:0 10px;border-radius:10px;border:1px solid var(--border);background:transparent;color:var(--text);font-size:13px;cursor:pointer}
.tristate button[aria-pressed=true]{border-color:var(--brand);background:var(--brand-weak)}
.tristate .yes[aria-pressed=true]{background:rgba(37,194,160,.20)}
.tristate .maybe[aria-pressed=true]{background:rgba(242,201,76,.20)}
.tristate .no[aria-pressed=true]{background:rgba(255,102,85,.20)}

.toast{position:fixed;bottom:80px;left:12px;right:12px;z-index:50;opacity:0;transform:translateY(8px);transition:.2s}
.toast.show{opacity:1;transform:translateY(0)}
.toast .inner{background:var(--bg-elev-2);border:1px solid var(--border);box-shadow:0 6px 24px rgba(0,0,0,.45);padding:12px 14px;border-radius:12px;display:flex;gap:8px;align-items:flex-start}

.modal{position:fixed;inset:0;display:grid;place-items:center;z-index:60}
.modal .scrim{position:absolute;inset:0;background:rgba(0,0,0,.6)}
.modal .dialog{position:relative;background:var(--bg-elev-2);border:1px solid var(--border);box-shadow:0 6px 24px rgba(0,0,0,.45);border-radius:16px;padding:16px;width:min(92%,480px)}

.helper{font-size:12px;color:var(--muted)}
.small{font-size:12px;color:var(--muted)}