:root { --bg:#f5f6f8; --card:#fff; --text:#1c1f26; --muted:#6b7280; --line:#e5e7eb;
  --ok:#16a34a; --warn:#d97706; --bad:#dc2626; --accent:#2563eb; }
* { box-sizing:border-box; }
body { margin:0; font:14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--text); padding:16px; }
header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
h1 { font-size:20px; margin:0; } h2 { font-size:15px; margin:0 0 8px; } h3 { margin:0 0 8px; }
.header-actions { display:flex; gap:8px; align-items:center; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:12px 14px; margin-bottom:12px; }
.grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; } .grid .card { margin:0; }
@media (max-width:800px) { .grid { grid-template-columns:1fr; } }
table { width:100%; border-collapse:collapse; } th, td { text-align:left; padding:6px 6px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-weight:500; font-size:12px; } td.num, th.num { text-align:right; }
.muted { color:var(--muted); } .err { color:var(--bad); }
.badge { display:inline-block; font-size:11px; padding:2px 8px; border-radius:999px; background:#e5e7eb; color:#374151; vertical-align:middle; }
.badge.ok { background:#dcfce7; color:#166534; } .badge.warn { background:#fef3c7; color:#92400e; } .badge.bad { background:#fee2e2; color:#991b1b; }
.status-ok { color:var(--ok); } .status-low { color:var(--warn); } .status-empty { color:var(--bad); } .status-draining, .status-disabled { color:var(--muted); }
button { font:inherit; padding:5px 10px; border:1px solid var(--line); border-radius:6px; background:#fff; cursor:pointer; }
button:hover { border-color:#9ca3af; } button.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
button.link { border:none; background:none; color:var(--accent); padding:0; } button.small { padding:2px 6px; font-size:12px; }
input { font:inherit; padding:5px 8px; border:1px solid var(--line); border-radius:6px; }
.inline-form { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:10px; }
.settings { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:8px 16px; align-items:end; }
.settings label { display:flex; flex-direction:column; gap:3px; font-size:12px; color:var(--muted); }
.hidden { display:none; } .row-between { display:flex; justify-content:space-between; align-items:center; }
.row-end { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.kv { display:grid; grid-template-columns:auto 1fr; gap:3px 12px; } .kv div:nth-child(odd) { color:var(--muted); }
.alert { padding:8px 12px; border-radius:6px; margin-bottom:8px; } .alert.bad { background:#fee2e2; color:#991b1b; } .alert.warn { background:#fef3c7; color:#92400e; }
.mono { font-family:ui-monospace, Menlo, monospace; font-size:12px; }
.actions { white-space:nowrap; }
dialog { border:1px solid var(--line); border-radius:8px; padding:16px; max-width:420px; } dialog::backdrop { background:rgba(0,0,0,.3); }
dialog label { display:flex; flex-direction:column; gap:4px; }
body.login { display:flex; align-items:center; justify-content:center; min-height:90vh; } .login-card { width:320px; display:flex; flex-direction:column; gap:8px; }
