/* theme.css - the Lowdraft Lab look, shared by the user page and the admin panel. Same tokens and components as smtrk_lab.html. */
:root { color-scheme: light;
  --bg:#f3f2ef; --surface:#fcfcfb; --surface-2:#f4f3f0; --line:#e6e5e0; --line-strong:#d4d3cc; --ink:#0b0b0b; --ink-2:#52514e; --ink-3:#6c6b66;
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300; --s7:#6250d6; --s8:#e34948; --oth:#a8a79f;
  --good:#0ca30c; --crit:#d03b3b; --good-text:#006300; --crit-text:#a82424; --shadow:0 1px 2px rgba(0,0,0,.04); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark;
  --bg:#121211; --surface:#1a1a19; --surface-2:#232321; --line:#2c2c2a; --line-strong:#3a3a37; --ink:#f0efec; --ink-2:#c3c2b7; --ink-3:#9a998f;
  --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#008300; --s7:#9085e9; --s8:#e66767; --oth:#6d6c65; --good-text:#5fd35f; --crit-text:#f08a8a; --shadow:none; } }
:root[data-theme="dark"] { color-scheme: dark;
  --bg:#121211; --surface:#1a1a19; --surface-2:#232321; --line:#2c2c2a; --line-strong:#3a3a37; --ink:#f0efec; --ink-2:#c3c2b7; --ink-3:#9a998f;
  --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#008300; --s7:#9085e9; --s8:#e66767; --oth:#6d6c65; --good-text:#5fd35f; --crit-text:#f08a8a; --shadow:none; }
/* aliases used by the admin panel styles */
:root { --card:var(--surface); --mut:var(--ink-3); --acc:var(--s1); --acc-ink:#fff; --row:var(--surface-2); --warn:#b4540a; --bad:var(--crit-text); --ok:var(--good-text); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; background:var(--bg); color:var(--ink); font:14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing:antialiased; }
[hidden] { display:none !important; }
.wrap { max-width:min(1840px,98vw); margin:0 auto; padding:18px 20px 60px; }
header.top { display:flex; flex-wrap:wrap; gap:10px 16px; align-items:center; padding:12px 20px; border-bottom:1px solid var(--line); background:var(--surface); position:sticky; top:0; z-index:20; }
.brand { display:flex; align-items:center; gap:9px; font-weight:700; font-size:19px; letter-spacing:-.01em; } .brand svg { width:26px; height:26px; flex:none; }
h1 { font-size:19px; margin:0; font-weight:700; } .sub { color:var(--ink-3); font-size:12px; } .grow { flex:1; } .muted { color:var(--ink-3); }
button, select, input, textarea { font:inherit; color:var(--ink); }
.btn { border:1px solid var(--line-strong); background:var(--surface); border-radius:8px; padding:5px 11px; font-size:13px; cursor:pointer; white-space:nowrap; }
.btn:hover { background:var(--surface-2); } .btn.pri { background:var(--s1); border-color:var(--s1); color:#fff; } .btn.pri:hover { filter:brightness(1.08); }
.btn.bad, .btn.dng { color:var(--crit-text); border-color:var(--crit); } .btn.sm { padding:2px 8px; font-size:12px; border-radius:6px; } .btn:disabled { opacity:.5; cursor:default; }
.btn.on { background:var(--ink); color:var(--bg); border-color:var(--ink); }
input[type=text], input[type=number], input[type=email], select, textarea { border:1px solid var(--line-strong); border-radius:7px; background:var(--surface); padding:5px 8px; font-size:13px; min-width:0; }
input[type=checkbox] { width:17px; height:17px; accent-color:var(--s1); }
.card { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow); min-width:0; margin-bottom:14px; position:relative; }
.card h2 { font-size:12px; font-weight:650; margin:0 0 10px; color:var(--ink-2); text-transform:uppercase; letter-spacing:.05em; }
.card h2.mt16 { margin-top:18px; }
.row { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; }
.tabs { display:flex; flex-wrap:wrap; gap:4px; margin:6px 0 14px; border-bottom:1px solid var(--line-strong); }
.tab { border:0; background:none; padding:8px 14px; cursor:pointer; font-size:14px; color:var(--ink-2); border-bottom:2px solid transparent; margin-bottom:-1px; }
.tab:hover { color:var(--ink); } .tab.on { color:var(--ink); font-weight:650; border-bottom-color:var(--s1); }
.keels { display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 2px; } .keels .btn.on { background:var(--s1); border-color:var(--s1); color:#fff; }
.kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-bottom:14px; }
.kpi { background:var(--surface-2); border:1px solid var(--line); border-radius:11px; padding:10px 12px; }
.kpi .l { font-size:11px; color:var(--ink-3); text-transform:uppercase; letter-spacing:.04em; } .kpi .v { font-size:24px; font-weight:700; font-variant-numeric:tabular-nums; } .kpi .b { font-size:12px; color:var(--ink-3); }
.pos { color:var(--good-text); } .neg { color:var(--crit-text); }
td.bt-good, .kpi.bt-good { background:color-mix(in srgb, var(--good) 22%, var(--surface)); } td.bt-bad, .kpi.bt-bad { background:color-mix(in srgb, var(--crit) 20%, var(--surface)); }
.legend { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:12px; color:var(--ink-2); margin-bottom:6px; }
.legend .chip { cursor:pointer; user-select:none; display:inline-flex; align-items:center; gap:5px; } .legend .chip.off { opacity:.4; text-decoration:line-through; }
.legend i { display:inline-block; width:10px; height:10px; border-radius:2px; vertical-align:-1px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; } .grid2 > * { min-width:0; } @media (max-width:900px) { .grid2 { grid-template-columns:1fr; } }
svg text { fill:var(--ink-3); font-size:11px; font-family:inherit; }
svg .grid { stroke:var(--line); stroke-width:1; } svg .axis { stroke:var(--line-strong); } svg .zero { stroke:var(--line-strong); stroke-dasharray:3 3; }
svg .xl { stroke:var(--line); } svg .cross { stroke:var(--ink-3); stroke-dasharray:3 3; }
svg polyline.ln, svg path.ln { fill:none; stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.c1 { stroke:var(--s1); } .c2 { stroke:var(--s2); } .c3 { stroke:var(--s3); } .coth { stroke:var(--oth); } .cdash { stroke-dasharray:5 4; }
.f1 { fill:var(--s1); } .f2 { fill:var(--s2); } .f3 { fill:var(--s3); } .foth { fill:var(--oth); } .fgood { fill:var(--good); } .fcrit { fill:var(--crit); }
i.sw { display:inline-block; width:10px; height:10px; border-radius:2px; vertical-align:-1px; }
i.b1 { background:var(--s1); } i.b2 { background:var(--s2); } i.b3 { background:var(--s3); } i.both { background:var(--oth); } i.bgood { background:var(--good); } i.bcrit { background:var(--crit); }
svg.chart { width:100%; height:auto; display:block; } svg.chart.sq { max-width:560px; } .chartbox { position:relative; }
.xbtn { position:absolute; top:0; right:0; z-index:3; border:1px solid var(--line-strong); background:var(--surface); color:var(--ink-2); border-radius:6px; width:28px; height:26px; line-height:22px; font-size:15px; cursor:pointer; opacity:.6; padding:0; }
.xbtn:hover { opacity:1; background:var(--surface-2); }
.chartbox > div > .row { padding-right:36px; } .nw { white-space:nowrap; }
.chips { display:inline-flex; gap:4px; } .chips .btn { padding:2px 9px; font-size:12px; border-radius:6px; }
.scroll { overflow-x:auto; max-width:100%; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-3); font-weight:600; text-align:left; padding:6px 8px; border-bottom:1px solid var(--line-strong); white-space:nowrap; }
td { padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:middle; font-variant-numeric:tabular-nums; } th, td { text-align:right; } th.l, td.l, th:first-child, td:first-child { text-align:left; }
tr.hl td { background:var(--surface-2); font-weight:600; } tr.dirty td { background:color-mix(in srgb, var(--s4) 16%, var(--surface)); }
.hm td { text-align:center; font-size:12px; padding:5px 4px; border:1px solid var(--surface); }
.note { font-size:12px; color:var(--ink-3); line-height:1.6; margin:8px 0 0; } .err { color:var(--crit-text); }
.empty { color:var(--ink-3); padding:30px 8px; text-align:center; }
#tip { position:fixed; z-index:50; pointer-events:none; background:var(--surface); color:var(--ink); border:1px solid var(--line-strong); border-radius:8px; padding:6px 10px; font-size:12px; box-shadow:0 4px 14px rgba(0,0,0,.18); opacity:0; transition:opacity .08s; max-width:300px; line-height:1.5; }
#toast { position:fixed; bottom:18px; left:50%; transform:translateX(-50%); background:var(--ink); color:var(--bg); padding:8px 15px; border-radius:9px; font-size:13px; opacity:0; transition:opacity .2s; z-index:60; pointer-events:none; max-width:90vw; } #toast.on { opacity:1; }
#xfull { position:fixed; inset:0; z-index:46; background:var(--bg); display:flex; flex-direction:column; padding:12px 16px; gap:8px; overflow:hidden; } #xfull .body { flex:1; min-height:0; overflow:auto; }
footer.foot { max-width:min(1840px,98vw); margin:0 auto; padding:6px 20px 36px; font-size:12px; color:var(--ink-3); } footer.foot a { color:var(--ink-2); }
.hero { display:flex; flex-wrap:wrap; gap:10px 18px; align-items:flex-end; margin:4px 0 10px; } .hero h2 { margin:0; font-size:22px; font-weight:700; text-transform:none; letter-spacing:-.01em; color:var(--ink); }
.pill { display:inline-block; font-size:11px; padding:1px 8px; border:1px solid var(--line-strong); border-radius:99px; color:var(--ink-3); }
@media (max-width:640px) { .wrap { padding:12px 10px 40px; } header.top { padding:10px 12px; } .tab { padding:8px 10px; } }
svg.chart.big text { font-size:15px; } .legend i { margin-right:5px; } .narrow { max-width:560px; }
.c4 { stroke:var(--s4); } .c5 { stroke:var(--s5); } i.b4 { background:var(--s4); } i.b5 { background:var(--s5); } .mono { font-variant-numeric:tabular-nums; }
.checks { display:flex; flex-wrap:wrap; gap:6px 16px; margin:4px 0 10px; } .checks label { display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.cardgrp td.grp { background:var(--surface-2); font-weight:650; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-2); text-align:left; }
.c6 { stroke:var(--s6); } i.b6 { background:var(--s6); } .cmp-mix { padding:10px 16px; } .cmp-mix summary { cursor:pointer; font-weight:600; color:var(--ink-2); } .cmp-mixrow { gap:8px; margin:4px 0; } .cmp-mixname { min-width:220px; } .cmp-mixrow input { width:70px; }
.f4 { fill:var(--s4); } .f5 { fill:var(--s5); } .f6 { fill:var(--s6); } .bt-bold { font-weight:700; }
.cards-bar { gap:8px 12px; margin-bottom:6px; } .cards-h { margin:0; font-size:12px; font-weight:650; color:var(--ink-2); text-transform:uppercase; letter-spacing:.05em; } .cards-ctl { display:inline-flex; align-items:center; gap:6px; } .cards-ctl input { width:64px; }
.cards-leg { margin:2px 0 6px; } .cards-scroll { max-height:640px; overflow:auto; margin-top:8px; } .cards-svg { min-width:560px; } .cards-sum td { border-top:2px solid var(--line-strong); font-weight:600; }
