:root { --bg:#0f172a; --card:#1e293b; --line:#334155; --text:#e2e8f0; --muted:#94a3b8; --gold:#f59e0b; --red:#ef4444; --green:#22c55e; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:14px/1.5 system-ui,'Segoe UI',sans-serif; }
header { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px 16px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; }
header h1 { font-size:16px; margin:0 12px 0 0; color:var(--gold); }
nav button, .btn { background:#334155; color:var(--text); border:0; border-radius:8px; padding:8px 12px; cursor:pointer; font:inherit; }
nav button.active { background:var(--gold); color:#1b1203; font-weight:700; }
.btn.primary { background:var(--gold); color:#1b1203; font-weight:700; }
.btn.danger { background:var(--red); color:#fff; }
main { padding:16px; max-width:1200px; margin:0 auto; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:14px; }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; }
.stat b { display:block; font-size:22px; color:var(--gold); }
table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; word-break:break-word; }
th { color:var(--muted); font-weight:600; }
input, select, textarea { background:#0b1220; color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px; font:inherit; width:100%; }
label { display:block; margin:8px 0 2px; color:var(--muted); font-size:12px; }
.row { display:flex; gap:8px; flex-wrap:wrap; align-items:end; }
.row > * { flex:1 1 140px; }
.muted { color:var(--muted); } .ok { color:var(--green); } .bad { color:var(--red); }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; padding:12px; }
.modal .box { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; width:min(560px,100%); max-height:92vh; overflow:auto; }
.login { max-width:380px; margin:12vh auto; text-align:center; }
.toast { position:fixed; bottom:16px; right:16px; background:#0b1220; border:1px solid var(--gold); padding:10px 14px; border-radius:10px; }
.scroll { overflow-x:auto; }
