:root {
  --bg:#F5F5F3; --panel:#FFFFFF; --ink:#111111; --muted:#666666; --line:#E3E3E0;
  --gold:#AA884E; --gold-dark:#7A6235; --sand:#DCCCAC; --tan:#C2A46E; --grey:#C9C9C4;
  --sans:"Prompt",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:var(--sans); font-size:15px; }
a { color:var(--gold-dark); }
.hidden { display:none !important; }

/* login */
.login { min-height:100vh; display:grid; place-items:center; background:#111; padding:24px; }
.login-box { background:#fff; border-radius:14px; padding:36px 32px; width:min(400px,100%); }
.login-box img { display:block; width:170px; margin:0 auto 10px; }
.login-box .sub { text-align:center; font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-bottom:26px; }
.login-box label { display:block; font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin:14px 0 6px; }
.login-box input { width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:9px; font-size:15px; font-family:inherit; }
.login-box input:focus { outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(170,136,78,.18); }
.login-box button { width:100%; margin-top:22px; padding:13px; border:0; border-radius:9px; background:#111; color:#fff; font-size:15px; font-weight:600; font-family:inherit; cursor:pointer; }
.login-box button:hover { background:#333; }
.err { color:#A4332B; font-size:13.5px; margin-top:14px; min-height:1.2em; }

/* skelet */
.app { display:grid; grid-template-columns:232px minmax(0,1fr); min-height:100vh; }
.side { background:#111; padding:28px 16px; display:flex; flex-direction:column; gap:24px; position:sticky; top:0; align-self:start; min-height:100vh; }
.brand { padding:0 6px 20px; border-bottom:1px solid rgba(255,255,255,.14); }
.brand img { display:block; width:100%; max-width:170px; }
.brand .sub { font-size:10.5px; letter-spacing:.14em; color:rgba(255,255,255,.5); text-transform:uppercase; margin-top:10px; }
nav { display:flex; flex-direction:column; gap:4px; }
nav button { all:unset; cursor:pointer; display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:8px; color:rgba(255,255,255,.82); font-size:14.5px; }
nav button:hover { background:rgba(255,255,255,.09); color:#fff; }
nav button[aria-current="page"] { background:var(--gold); color:#fff; font-weight:600; }
nav svg { width:16px; height:16px; flex:none; }
.who { margin-top:auto; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.05); border-radius:10px; padding:12px 14px; font-size:12px; color:rgba(255,255,255,.55); }
.who b { display:block; color:#fff; font-size:13.5px; margin:3px 0; }
.who button { all:unset; cursor:pointer; color:var(--sand); font-size:12.5px; margin-top:8px; }
.who button:hover { text-decoration:underline; }
main { padding:32px clamp(16px,3vw,44px) 56px; min-width:0; }
.top { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; padding-bottom:22px; border-bottom:1px solid var(--line); margin-bottom:28px; }
h1 { font-weight:400; font-size:clamp(30px,4vw,44px); margin:0; letter-spacing:-.01em; }
.top .sub { color:var(--muted); font-size:14px; margin-top:8px; }
.pill { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); background:#fff; border-radius:8px; padding:8px 12px; font-size:13px; }
.dot { width:7px; height:7px; border-radius:50%; background:#5E7A4A; }
.dot.warn { background:#C9A227; }
h2 { font-weight:400; font-size:24px; margin:34px 0 4px; }
.h2sub { color:var(--muted); font-size:13px; margin:0 0 16px; }
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); gap:16px; }
.tile { background:var(--panel); border:1px solid var(--line); border-top:3px solid var(--gold); border-radius:10px; padding:18px 20px; min-height:110px; }
.tile.lead { border-top-color:var(--sand); } .tile.dialog { border-top-color:var(--tan); }
.tile.warm { border-top-color:var(--gold); } .tile.plan { border-top-color:var(--gold-dark); }
.tile.solgt { border-top-color:#111; } .tile.grey { border-top-color:var(--grey); } .tile.blue { border-top-color:#4F6D8A; }
.label { font-size:11.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--muted); font-weight:600; }
.num { display:block; font-weight:400; font-size:clamp(28px,3vw,36px); margin:10px 0 6px; font-variant-numeric:tabular-nums; line-height:1.1; }
.note { font-size:12.5px; color:var(--muted); }
.card { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:22px 24px; margin-top:18px; }
.card h3 { font-weight:400; font-size:20px; margin:0; }
.cap { font-size:12.5px; color:var(--muted); margin:4px 0 14px; }
.wrap { max-height:520px; overflow:auto; border:1px solid var(--line); border-radius:10px; }
table { width:100%; border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; }
th { position:sticky; top:0; background:#FAFAF8; text-align:left; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); font-weight:600; padding:10px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
td.n, th.n { text-align:right; }
tr:last-child td { border-bottom:0; }
tr.click { cursor:pointer; } tr.click:hover td { background:#FAF7F1; }
.empty { color:var(--muted); font-size:13px; padding:14px 12px; }
.stage { display:inline-block; font-size:11.5px; font-weight:600; padding:2px 8px; border-radius:999px; color:#fff; white-space:nowrap; }
.search { width:100%; border:1px solid var(--line); background:#fff; border-radius:10px; padding:13px 16px; font-size:15px; font-family:inherit; }
.search:focus { outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(170,136,78,.15); }
.hint { font-size:12.5px; color:var(--muted); margin:8px 0 0; }
.btn { cursor:pointer; font-size:13.5px; color:#fff; background:#111; border:0; border-radius:8px; padding:10px 16px; font-family:inherit; }
.btn:hover { background:#333; }
.btn.ghost { background:#fff; color:var(--ink); border:1px solid var(--line); }
.btn.ghost:hover { background:#FAF7F1; }
.bars { display:grid; gap:10px; }
.bar { display:grid; grid-template-columns:150px 1fr auto; align-items:center; gap:12px; font-size:13px; }
.bar .track { background:#EFEFEC; border-radius:5px; height:26px; overflow:hidden; display:flex; }
.bar .seg { height:100%; }
.bar b { font-variant-numeric:tabular-nums; }
.legend { display:flex; gap:16px; flex-wrap:wrap; font-size:12.5px; color:var(--muted); margin-top:14px; }
.legend span { display:inline-flex; align-items:center; gap:6px; }
.legend i { width:10px; height:10px; border-radius:2px; }
.form-row { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:16px; }
.form-row label { font-size:11.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); font-weight:600; display:block; margin-bottom:6px; }
.form-row input, .form-row select { padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:14px; font-family:inherit; }
.msg { font-size:13.5px; margin-top:10px; min-height:1.2em; }
.msg.ok { color:#4A6639; } .msg.bad { color:#A4332B; }
.stalebar { background:#FBF3DC; border:1px solid #E8D9A8; color:#7A5E12; border-radius:9px; padding:10px 14px; font-size:13px; margin-bottom:18px; }
footer { margin-top:40px; padding-top:16px; border-top:1px solid var(--line); font-size:12px; color:var(--muted); line-height:1.6; }
@media (max-width:820px) {
  .app { grid-template-columns:1fr; }
  .side { position:static; min-height:0; padding:16px; }
  nav { flex-direction:row; flex-wrap:wrap; }
  .who { display:none; }
  .bar { grid-template-columns:110px 1fr auto; }
}
