:root { --bg:#fbfbfc; --side:#f7f7f8; --card:#fff; --ink:#17181c; --muted:#6b6e76; --line:#e6e7ea; --head:#f0f0f2; --hover:#ebecee;
  --brand:#1753b0; --ok:#16794a; --okbg:#dff4e8; --warn:#8a5b00; --warnbg:#fdf0cf; --bad:#b42318; --badbg:#fde4e1; --info:#1753b0; --infobg:#e2ecfb; }
@media (prefers-color-scheme: dark) { :root { --bg:#0c0d10; --side:#111216; --card:#15161b; --ink:#eceef2; --muted:#9a9ea8; --line:#262830; --head:#1b1d23; --hover:#22242b;
  --brand:#6ea2ff; --ok:#5fd39b; --okbg:#10382a; --warn:#f0c464; --warnbg:#3b2f10; --bad:#ff9a90; --badbg:#45201d; --info:#9ec0ff; --infobg:#172a4c; } }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.layout { display:grid; grid-template-columns: 250px minmax(0,1fr); min-height:100vh; }
aside { background:var(--side); border-right:1px solid var(--line); padding:14px 10px; display:flex; flex-direction:column; gap:3px; position:sticky; top:0; height:100vh; overflow:auto; }
.workspace { display:flex; align-items:center; gap:10px; padding:6px 10px 16px; font-weight:600; }
.avatar { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; color:#fff; font-size:.85rem; background:linear-gradient(135deg,#1753b0,#00a39a); flex:none; }
aside a { display:flex; align-items:center; gap:12px; padding:8px 12px; border-radius:10px; color:var(--muted); text-decoration:none; font-weight:500; }
aside a:hover { background:var(--hover); color:var(--ink); }
aside a[aria-current="page"] { background:var(--hover); color:var(--ink); }
aside svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }
aside hr { border:0; border-top:1px solid var(--line); margin:10px 8px; }
aside .foot { margin-top:auto; padding:10px 12px; color:var(--muted); font-size:.82rem; overflow-wrap:anywhere; }
main { padding:34px 40px 60px; max-width:1200px; width:100%; }
h1 { font-size:1.9rem; letter-spacing:-.02em; margin:0 0 22px; }
h2 { font-size:1.05rem; margin:28px 0 12px; }
.titlebar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.banner { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; border:1px dashed var(--line); border-radius:14px; padding:14px 18px; margin-bottom:18px; background:linear-gradient(90deg, color-mix(in srgb, #00a39a 10%, transparent), transparent 60%); }
.tabs { display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
.tabs button { border:0; background:none; padding:7px 14px; border-radius:10px; cursor:pointer; color:var(--muted); font-weight:600; }
.tabs button[aria-pressed="true"] { background:var(--hover); color:var(--ink); }
.filters { display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.filters input[type=search] { flex:1; min-width:200px; }
input, select, textarea { background:var(--head); border:1px solid var(--line); border-radius:10px; padding:8px 12px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline:2px solid var(--brand); outline-offset:1px; }
.btn { background:var(--head); border:1px solid var(--line); border-radius:10px; padding:8px 14px; cursor:pointer; font-weight:600; }
.btn:hover { background:var(--hover); }
.btn.primary { background:var(--ink); color:var(--bg); border-color:var(--ink); }
.btn.danger { color:var(--bad); }
.btn:disabled { opacity:.5; cursor:default; }
.btn.small { padding:3px 10px; font-size:.85rem; }
.tablewrap { overflow-x:auto; }
table { width:100%; border-collapse:separate; border-spacing:0; min-width:640px; }
th { text-align:left; font-size:.82rem; background:var(--head); border-block:1px solid var(--line); padding:10px 14px; white-space:nowrap; }
th:first-child { border-left:1px solid var(--line); border-radius:12px 0 0 12px; }
th:last-child { border-right:1px solid var(--line); border-radius:0 12px 12px 0; }
td { padding:13px 14px; border-bottom:1px solid var(--line); vertical-align:middle; }
td.actions { text-align:right; white-space:nowrap; } td.actions .btn { margin-left:6px; }
.who { display:flex; align-items:center; gap:12px; }
.who .box { width:34px; height:34px; border-radius:10px; border:1px solid var(--line); background:var(--head); display:grid; place-items:center; font-weight:700; color:var(--muted); flex:none; }
.who a { color:var(--ink); text-decoration:underline dotted; text-underline-offset:4px; }
.badge { display:inline-block; padding:2px 10px; border-radius:8px; font-size:.82rem; font-weight:600; white-space:nowrap; }
.ok { background:var(--okbg); color:var(--ok); } .warn { background:var(--warnbg); color:var(--warn); } .bad { background:var(--badbg); color:var(--bad); }
.info { background:var(--infobg); color:var(--info); } .plain { background:var(--head); color:var(--muted); }
.muted { color:var(--muted); } .small { font-size:.85rem; }
.empty { text-align:center; color:var(--muted); padding:48px 10px; }
.pager { display:flex; justify-content:space-between; align-items:center; margin-top:16px; color:var(--muted); gap:10px; }
.cards { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px; }
.card .label { color:var(--muted); font-size:.8rem; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.card .value { font-size:1.8rem; font-weight:700; margin-top:4px; }
.chart { display:flex; align-items:flex-end; gap:6px; height:170px; }
.chart > div { flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; gap:6px; }
.chart i { display:block; width:100%; max-width:38px; min-height:2px; border-radius:6px 6px 0 0; background:linear-gradient(#00a39a,#1753b0); }
.chart span { font-size:.68rem; color:var(--muted); }
.meter { width:130px; height:6px; border-radius:9px; background:var(--head); overflow:hidden; margin-top:4px; }
.meter i { display:block; height:100%; background:var(--brand); } .meter i.full { background:var(--bad); }
.kv { display:grid; grid-template-columns:190px 1fr; gap:8px 16px; margin:0; } .kv dt { color:var(--muted); } .kv dd { margin:0; }
dialog { border:1px solid var(--line); border-radius:16px; background:var(--card); color:var(--ink); width:min(460px, calc(100% - 32px)); padding:24px; }
dialog::backdrop { background:rgba(0,0,0,.45); }
dialog h2 { margin-top:0; }
label.field { display:block; margin-bottom:14px; font-weight:600; font-size:.9rem; } label.field > * { display:block; width:100%; margin-top:6px; font-weight:400; }
label.check { display:flex; gap:8px; align-items:center; margin-bottom:14px; }
.row { display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; }
.error { color:var(--bad); margin:0 0 12px; }
.toast { position:fixed; right:20px; bottom:20px; background:var(--ink); color:var(--bg); padding:12px 18px; border-radius:12px; z-index:20; max-width:360px; }
.signin { min-height:100vh; display:grid; place-items:center; padding:20px; }
.signin form { width:min(380px,100%); background:var(--card); border:1px solid var(--line); border-radius:18px; padding:28px; }
.signin h1 { font-size:1.4rem; }
@media (max-width: 820px) {
  .layout { grid-template-columns:1fr; }
  aside { position:static; height:auto; flex-direction:row; flex-wrap:wrap; border-right:0; border-bottom:1px solid var(--line); }
  aside hr, aside .foot { display:none; } .workspace { width:100%; padding-bottom:8px; }
  main { padding:20px 16px 50px; } .kv { grid-template-columns:1fr; }
}
