: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; }
.board { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; padding:26px 14px 14px; background:#16203a; border-radius:12px; }
.bottle { position:relative; display:flex; flex-direction:column-reverse; gap:2px; width:36px; padding:3px; border:2px solid #cfd6e6; border-top:none; border-radius:0 0 16px 16px; background:rgba(255,255,255,.05); }
.bottle .u { height:22px; border-radius:4px; position:relative; }
.bottle .u.empty { background:transparent; }
.bottle .u.hidden { background-image:repeating-linear-gradient(45deg, rgba(0,0,0,.35) 0 4px, transparent 4px 8px); }
.bottle .u.hidden::after { content:"?"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:13px; text-shadow:0 1px 2px #000; }
.bottle.ice { border-color:#9fe3ff; box-shadow:inset 0 0 0 3px rgba(159,227,255,.45); }
.bottle.locked { border-style:dashed; opacity:.85; }
.bottle .badge { position:absolute; top:-20px; left:-6px; right:-6px; text-align:center; font-size:10px; color:#fff; white-space:nowrap; }
.previews { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width: 1000px) { .previews { grid-template-columns:1fr; } }
