:root {
  --bg: #0f1115; --panel: #181b22; --line: #2a2f3a; --text: #e8eaf0;
  --muted: #9aa3b2; --accent: #6ea8fe; --ok: #4cc38a; --bad: #f2555a; --warn: #f5c518;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.hidden { display: none !important; }
header { display: flex; align-items: center; gap: 20px; padding: 12px 20px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); }
.brand { font-weight: 700; }
header nav { display: flex; gap: 4px; flex: 1; }
header nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; }
header nav a.active, header nav a:hover { color: var(--text); background: var(--panel); }
.freshness { color: var(--muted); font-size: 13px; }
.banner { padding: 8px 20px; background: #2a2413; color: var(--warn); font-size: 14px; }
main { max-width: 880px; margin: 0 auto; padding: 20px; }
h2 { margin: 28px 0 12px; font-size: 17px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; }
.tile .num { font-size: 30px; font-weight: 700; }
.tile span:last-child { color: var(--muted); font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 10px 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.small { font-size: 13px; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.pill { font-size: 12px; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.bad { color: var(--bad); border-color: var(--bad); }
button { background: var(--accent); color: #0b0d12; border: 0; border-radius: 8px;
  padding: 7px 14px; font-weight: 600; cursor: pointer; }
button.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.meter { height: 6px; background: var(--line); border-radius: 99px; margin: 10px 0 6px; overflow: hidden; }
.meter > div { height: 100%; background: var(--accent); border-radius: 99px; }
.login { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.login .card { width: 320px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.login input { background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 10px 12px; }
.error { color: var(--bad); font-size: 13px; min-height: 1em; margin: 0; }
.vault { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.vault-nav { display: flex; flex-direction: column; gap: 2px; }
.vault-nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.vault-nav a.active, .vault-nav a:hover { color: var(--text); background: var(--panel); }
.note { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; }
.note a { color: var(--accent); }
.note code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
@media (max-width: 700px) { .vault { grid-template-columns: 1fr; } }
