:root { --bg:#f4f6fb; --card:#fff; --ink:#1b2437; --muted:#6b7488; --line:#e3e7ef; --accent:#2f6fe4; --good:#1f9d55; --bad:#d64545; }
* { box-sizing: border-box; }
body { margin:0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--ink); font-size:14px; }
.side { position:fixed; top:0; left:0; bottom:0; width:210px; background:#16203a; color:#cfd6e6; padding:18px 12px; display:flex; flex-direction:column; gap:4px; }
.side .brand { font-weight:700; color:#fff; font-size:16px; margin:0 8px 18px; }
.side a { color:#cfd6e6; text-decoration:none; padding:9px 10px; border-radius:8px; }
.side a:hover { background:#22304f; }
.side a.on { background:var(--accent); color:#fff; }
.side .logout { margin-top:auto; }
.side .logout button { width:100%; background:none; border:1px solid #3a4768; color:#cfd6e6; padding:8px; border-radius:8px; cursor:pointer; }
main { padding:26px 30px; max-width:1300px; }
main.with-side { margin-left:210px; }
h1 { font-size:22px; margin:0 0 18px; }
h2 { font-size:16px; margin:0 0 12px; }
.grid { display:grid; gap:14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom:16px; }
.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.kpi .label { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.kpi .value { font-size:26px; font-weight:700; margin-top:4px; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:7px 8px; border-bottom:1px solid var(--line); font-variant-numeric: tabular-nums; }
th { color:var(--muted); font-weight:600; font-size:12px; }
td.num, th.num { text-align:right; }
.bar { height:8px; background:#e9edf5; border-radius:4px; overflow:hidden; min-width:80px; }
.bar > span { display:block; height:100%; background:var(--accent); }
.bad { color:var(--bad); font-weight:600; }
.good { color:var(--good); font-weight:600; }
.muted { color:var(--muted); }
input, textarea, select { font:inherit; border:1px solid var(--line); border-radius:8px; padding:8px 10px; background:#fff; }
textarea.code { width:100%; min-height:520px; font-family: ui-monospace, Menlo, monospace; font-size:13px; }
button.primary, a.button { background:var(--accent); color:#fff; border:none; border-radius:8px; padding:9px 16px; cursor:pointer; text-decoration:none; display:inline-block; }
button.ghost { background:none; border:1px solid var(--line); border-radius:8px; padding:6px 12px; cursor:pointer; }
.alert { padding:10px 14px; border-radius:8px; margin-bottom:14px; }
.alert.error { background:#fdecec; color:#9b1c1c; }
.alert.ok { background:#e8f7ee; color:#146c3a; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.login { max-width:340px; margin:12vh auto; }
.login input { width:100%; margin-bottom:10px; }
.chart { position:relative; height:260px; }
code, .mono { font-family: ui-monospace, Menlo, monospace; font-size:12px; }
