:root { --bg:#f6f7f9; --panel:#fff; --ink:#1b2430; --muted:#5d6877; --line:#dde2e9; --accent:#0b5cd5; --accent-ink:#fff; --ok:#0f7b4d; --warn:#9a5b00; --bad:#b3261e; --hold:#b3261e; }
@media (prefers-color-scheme: dark) { :root { --bg:#11151b; --panel:#1a2029; --ink:#e8edf3; --muted:#9aa6b5; --line:#2c3541; --accent:#6aa3ff; --accent-ink:#0b1220; --ok:#4cc38a; --warn:#e0a34a; --bad:#ff8a80; --hold:#ff8a80; } }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--ink); }
.hidden { display:none !important; }
h1,h2,h3 { margin:0 0 6px; line-height:1.25; }
h3 { font-size:15px; }
.muted { color:var(--muted); }
.error { color:var(--bad); min-height:1.4em; margin:8px 0 0; }
button, select, input { font:inherit; color:inherit; }
button { border:1px solid var(--line); background:var(--panel); border-radius:8px; padding:7px 12px; cursor:pointer; min-height:36px; }
button:hover { border-color:var(--accent); }
button.primary { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); font-weight:600; }
button.link { border:0; background:none; color:var(--accent); padding:4px; min-height:0; text-decoration:underline; }
button.on-hold { border-color:var(--hold); color:var(--hold); background:transparent; font-weight:600; }
button.on-saved { border-color:var(--ok); color:var(--ok); font-weight:600; }
input, select { border:1px solid var(--line); background:var(--panel); border-radius:8px; padding:7px 10px; min-height:36px; width:100%; }
label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:14px; }
.login { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:16px; }
.login-card { width:100%; max-width:380px; display:flex; flex-direction:column; gap:12px; }
.topbar { display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; padding:10px 16px; background:var(--panel); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.brand { font-weight:700; }
.tabs { display:flex; flex-wrap:wrap; gap:6px; flex:1; }
.tab.active { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.banner { background:color-mix(in srgb, var(--warn) 14%, var(--panel)); border-bottom:1px solid var(--warn); color:var(--ink); padding:8px 16px; font-size:13.5px; }
.who { font-size:13px; color:var(--muted); }
main { max-width:1180px; margin:0 auto; padding:16px; }
.filters { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:10px 12px; align-items:end; margin-bottom:12px; }
.row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.row.between { justify-content:space-between; }
.row.center { justify-content:center; margin:14px 0; }
.grow { flex:1; min-width:220px; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:12px; display:flex; flex-direction:column; gap:6px; }
.card.hold { border-color:var(--hold); }
.card .price { font-size:20px; font-weight:700; }
.meta, .small { font-size:12.5px; color:var(--muted); margin:0; }
.badge { display:inline-block; border-radius:999px; padding:2px 9px; font-size:12px; font-weight:600; border:1px solid currentColor; }
.badge.ok { color:var(--ok); } .badge.out { color:var(--bad); } .badge.unk, .badge.warn { color:var(--warn); }
.pending { font-size:12.5px; color:var(--warn); background:color-mix(in srgb, var(--warn) 10%, transparent); border:1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius:8px; padding:6px 8px; margin:0; }
.actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:auto; padding-top:6px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 12px; }
.chip { font-size:12px; border:1px solid var(--line); border-radius:8px; padding:3px 8px; background:var(--panel); }
.chip.bad { border-color:var(--warn); color:var(--warn); }
a { color:var(--accent); }
dialog { width:min(720px, 94vw); max-height:88vh; overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--panel); color:var(--ink); padding:16px; }
dialog::backdrop { background:rgba(0,0,0,.45); }
.dlg-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px; }
.series { border-top:1px solid var(--line); padding-top:8px; margin-top:8px; }
ul.points { margin:6px 0 0; padding-left:18px; font-size:13px; }
ul.points li { margin-bottom:6px; word-break:break-word; }
.toast { position:fixed; left:50%; transform:translateX(-50%); bottom:16px; background:var(--ink); color:var(--bg); padding:8px 14px; border-radius:10px; font-size:14px; z-index:20; }
.cov h3 { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.cov ul { margin:6px 0 0; padding-left:18px; font-size:13px; }
@media (max-width:640px) {
  main { padding:12px; } .topbar { padding:8px 12px; } .grid { grid-template-columns:1fr; }
  .tabs { order:3; width:100%; } .tab { flex:1 1 auto; } .filters { grid-template-columns:1fr 1fr; }
}
