:root {
  --coral:#C8534B; --coral-soft:rgba(200,83,75,.1); --bg:#F6F4F1; --surface:#FFFFFF; --text:#262626; --muted:#777777;
  --line:#ECE7E3; --ok:#2E9E4F; --warn:#D98B0B; --danger:#D93A31; --blue:#3F7CC4; --violet:#7A66C8; --teal:#2AA198;
  --shadow:0 1px 2px rgba(0,0,0,.04),0 6px 20px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#101010; --surface:#1B1B1D; --text:#F2F2F2; --muted:#A0A0A0; --line:#2C2826; --coral-soft:rgba(217,102,94,.16); --coral:#D9665E;
          --shadow:0 1px 2px rgba(0,0,0,.4); --ok:#4CC26B; --warn:#F0B23E; --danger:#F0675F; --blue:#6A9CD6; --violet:#9C8BE0; --teal:#45B8AF; }
}
* { box-sizing:border-box; }
html, body { height:100%; }
body { margin:0; font:15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Tahoma, sans-serif; background:var(--bg); color:var(--text); }
button, input, select, textarea { font:inherit; color:inherit; }
.hidden { display:none !important; }
.center { min-height:100vh; display:grid; place-items:center; padding:16px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); }
.auth { width:100%; max-width:380px; padding:28px; text-align:center; }
.logo { width:56px; height:56px; border-radius:16px; background:var(--coral); color:#fff; display:grid; place-items:center; font-weight:800; font-size:26px; margin:0 auto 10px; }
.logo.sm { width:34px; height:34px; border-radius:10px; font-size:17px; margin:0; }
h1 { font-size:22px; margin:6px 0 2px; } h2 { font-size:17px; margin:0 0 12px; } h3 { font-size:14px; margin:0 0 8px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.muted { color:var(--muted); } .small { font-size:13px; } .num { font-variant-numeric:tabular-nums; }
input[type=email], input[type=password], input[type=text], input[type=search], input[type=number], textarea, select {
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--bg); outline:none;
}
.auth input { margin-top:10px; }
input:focus, textarea:focus, select:focus { border-color:var(--coral); }
textarea { resize:vertical; min-height:90px; }
.btn { border:0; border-radius:999px; padding:8px 15px; cursor:pointer; font-weight:600; background:var(--coral-soft); color:var(--coral); white-space:nowrap; }
.btn:hover { filter:brightness(.97); }
.btn.primary { background:var(--coral); color:#fff; } .btn.danger { background:rgba(217,58,49,.12); color:var(--danger); }
.btn.ghost { background:transparent; border:1px solid var(--line); color:var(--text); }
.btn.block { width:100%; margin-top:14px; padding:12px; } .btn:disabled { opacity:.5; cursor:default; }
.err { color:var(--danger); font-size:13px; margin-top:10px; min-height:18px; }
.qr { background:#fff; padding:10px; border-radius:12px; display:inline-block; margin-top:12px; } .qr img { width:180px; height:180px; display:block; }
code { font-family:ui-monospace, Menlo, monospace; font-size:12px; word-break:break-all; }

/* layout */
#v-app { display:flex; min-height:100vh; }
.side { width:236px; flex:none; background:var(--surface); border-inline-end:1px solid var(--line); padding:18px 12px; position:sticky; top:0; height:100vh; display:flex; flex-direction:column; }
.side .brand { display:flex; align-items:center; gap:10px; padding:4px 10px 18px; font-size:17px; }
.side .brand b { color:var(--coral); }
#nav { display:flex; flex-direction:column; gap:2px; flex:1; }
#nav a { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; color:var(--muted); text-decoration:none; font-weight:600; }
#nav a:hover { background:var(--bg); }
#nav a.on { background:var(--coral-soft); color:var(--coral); }
#nav .ic { width:22px; text-align:center; }
#nav .count { margin-inline-start:auto; background:var(--coral); color:#fff; border-radius:999px; padding:0 8px; font-size:12px; min-width:20px; text-align:center; }
.side-foot { padding:10px; border-top:1px solid var(--line); }
.shell { flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar { position:sticky; top:0; z-index:10; display:flex; align-items:center; gap:10px; padding:12px 24px; background:var(--bg); border-bottom:1px solid var(--line); }
.gsearch { position:relative; width:min(460px, 100%); }
.gsearch input { padding:10px 14px; border-radius:999px; background:var(--surface); }
.gs-results { position:absolute; top:46px; inset-inline:0; background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 32px rgba(0,0,0,.18); overflow:hidden; z-index:30; }
.gs-results a { display:flex; gap:10px; align-items:center; padding:10px 14px; color:inherit; text-decoration:none; border-bottom:1px solid var(--line); }
.gs-results a:hover { background:var(--coral-soft); } .gs-results a:last-child { border-bottom:0; }
.spacer { flex:1; }
main { padding:24px; max-width:1180px; width:100%; margin:0 auto; }
.page-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.page-head h1 { margin:0; font-size:24px; }
.grid { display:grid; gap:14px; } .g4 { grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); } .g2 { grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); }
.pad { padding:18px; }
.row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; } .col { display:flex; flex-direction:column; gap:8px; }
.mt { margin-top:14px; }

/* KPI */
.kpi { padding:16px; } .kpi .l { color:var(--muted); font-size:13px; font-weight:600; } .kpi .n { font-size:30px; font-weight:800; margin:4px 0; font-variant-numeric:tabular-nums; }
.delta { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700; padding:2px 8px; border-radius:999px; }
.delta.up { background:rgba(46,158,79,.14); color:var(--ok); } .delta.down { background:rgba(217,58,49,.12); color:var(--danger); } .delta.flat { background:var(--line); color:var(--muted); }
.kpi .sub { font-size:12px; color:var(--muted); margin-top:6px; }

/* attention */
.attn { padding:14px 18px; border-inline-start:5px solid var(--ok); display:flex; flex-direction:column; gap:8px; }
.attn.warn { border-inline-start-color:var(--warn); } .attn.danger { border-inline-start-color:var(--danger); }
.attn a { color:var(--coral); font-weight:600; text-decoration:none; }
.attn-item { display:flex; gap:10px; align-items:flex-start; } .attn-item > span:last-child { flex:1; min-width:0; }
.dot { width:9px; height:9px; border-radius:50%; background:var(--warn); flex:none; margin-top:7px; } .dot.danger { background:var(--danger); } .dot.ok { background:var(--ok); }

/* chips, pills */
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:5px 13px; cursor:pointer; font-weight:600; color:var(--muted); font-size:13px; }
.chip.on { background:var(--coral); border-color:var(--coral); color:#fff; }
.pill { display:inline-block; padding:2px 10px; border-radius:999px; font-size:12px; font-weight:700; background:var(--line); color:var(--muted); }
.pill.open { background:var(--coral-soft); color:var(--coral); } .pill.banned, .pill.suspended, .pill.rejected { background:rgba(217,58,49,.12); color:var(--danger); }
.pill.active, .pill.accepted, .pill.actioned { background:rgba(46,158,79,.14); color:var(--ok); }

/* charts */
.chart { width:100%; height:auto; display:block; } .chart text { fill:var(--muted); font-size:11px; font-family:inherit; }
.chart .grid-line { stroke:var(--line); stroke-width:1; } .chart .bar { fill:var(--coral); } .chart .bar:hover { opacity:.75; }
.chart .line { fill:none; stroke:var(--coral); stroke-width:2.4; stroke-linejoin:round; } .chart .area { fill:var(--coral); opacity:.12; }
.hbar { display:flex; align-items:center; gap:10px; margin:7px 0; } .hbar .name { width:96px; font-size:13px; flex:none; }
.hbar .track { flex:1; height:10px; background:var(--bg); border-radius:999px; overflow:hidden; display:flex; } .hbar .fill { height:100%; background:var(--coral); border-radius:999px; }
.hbar .val { width:92px; text-align:end; font-size:13px; font-variant-numeric:tabular-nums; flex:none; }
.stack { display:flex; height:14px; border-radius:999px; overflow:hidden; background:var(--bg); margin:10px 0; } .stack span { height:100%; }
.legend { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:13px; } .legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-inline-end:6px; }
.meter { height:8px; background:var(--bg); border-radius:999px; overflow:hidden; margin:6px 0 2px; } .meter span { display:block; height:100%; background:var(--ok); border-radius:999px; }
.meter.warn span { background:var(--warn); } .meter.danger span { background:var(--danger); }

/* lists, tables, cards */
.list { display:flex; flex-direction:column; gap:12px; }
.report { padding:16px; } .report.done { opacity:.7; }
.avatar { width:40px; height:40px; border-radius:50%; background:var(--coral-soft); color:var(--coral); display:grid; place-items:center; font-weight:800; overflow:hidden; flex:none; }
.avatar img { width:100%; height:100%; object-fit:cover; } .avatar.lg { width:72px; height:72px; font-size:28px; }
.content { margin:12px 0; padding:12px; border-radius:12px; background:var(--bg); border:1px solid var(--line); white-space:pre-wrap; word-break:break-word; }
.content img, .content video { max-width:100%; max-height:300px; border-radius:10px; display:block; margin-top:8px; } .content audio { width:100%; margin-top:8px; }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
table { width:100%; border-collapse:collapse; } th, td { text-align:start; padding:10px 10px; border-bottom:1px solid var(--line); vertical-align:middle; }
th { color:var(--muted); font-size:12px; font-weight:700; text-transform:uppercase; } tr.link { cursor:pointer; } tr.link:hover td { background:var(--coral-soft); }
.toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px; } .toolbar input, .toolbar select { width:auto; min-width:160px; }
.field { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; } .field label { font-size:13px; font-weight:600; color:var(--muted); }
.counter { text-align:end; font-size:12px; color:var(--muted); }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:10px; } .stat-grid div { background:var(--bg); border-radius:12px; padding:10px 12px; } .stat-grid b { display:block; font-size:20px; font-variant-numeric:tabular-nums; }
.note-item { padding:10px 12px; background:var(--bg); border-radius:12px; margin-bottom:8px; } .note-item .meta { font-size:12px; color:var(--muted); }
.empty { padding:28px; text-align:center; color:var(--muted); }
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:rgba(0,0,0,.86); color:#fff; padding:10px 18px; border-radius:999px; font-weight:600; z-index:50; }

@media (max-width:900px) {
  #v-app { flex-direction:column; } .side { width:100%; height:auto; position:static; flex-direction:row; align-items:center; padding:8px 10px; gap:8px; border-inline-end:0; border-bottom:1px solid var(--line); overflow-x:auto; }
  .side .brand { padding:0 6px; } #nav { flex-direction:row; flex:none; } #nav a { white-space:nowrap; padding:8px 10px; } .side-foot { display:none; }
  .topbar { padding:10px 12px; } main { padding:14px; }
  .hide-m { display:none; }
}
