:root { color-scheme: light dark; --bg: #f6f7f9; --fg: #1b1f24; --card: #fff; --line: #d8dde3; --accent: #2457c5; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171b; --fg: #e6e9ed; --card: #1d2227; --line: #2f363d; --accent: #7aa2f7; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.7 system-ui, "Vazirmatn", Tahoma, sans-serif; }
header.top { display: flex; gap: 1.5rem; align-items: center; padding: .6rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line); }
header.top .brand { font-weight: 700; }
nav a { margin-inline-end: 1rem; color: var(--accent); text-decoration: none; }
nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
main { max-width: 72rem; margin: 1.5rem auto; padding: 0 1.2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; }
code, pre, .ltr { direction: ltr; unicode-bidi: embed; font-family: ui-monospace, monospace; }
footer.bottom { max-width: 72rem; margin: 2rem auto; padding: 0 1.2rem; color: #7b8590; font-size: 13px; }
form.logout { margin-inline-start: auto; display: flex; gap: .6rem; align-items: center; }
form.logout .who { color: #7b8590; direction: ltr; }
button { font: inherit; padding: .35rem 1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; }
.login { max-width: 26rem; margin: 3rem auto; }
.login label { display: block; margin: .8rem 0; }
.login input { display: block; width: 100%; margin-top: .25rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
.error { color: #c0392b; }
.hint { color: #7b8590; font-size: 13px; }
.card + .card { margin-top: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; }
.filters label { display: flex; flex-direction: column; font-size: 13px; }
.filters select, .filters input { padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
table.usage { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
table.usage th, table.usage td { padding: .3rem .6rem; border-bottom: 1px solid var(--line); text-align: start; }
table.usage td.num { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }
meter { width: 7rem; height: .8rem; }
.win { margin-bottom: 1rem; }
.win h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.win .meta { color: #7b8590; font-size: 13px; }
.badge { display: inline-block; padding: 0 .5rem; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.badge.warn { border-color: #c98a00; color: #c98a00; }
.badge.crit { border-color: #c0392b; color: #c0392b; }
.warnbox { border: 1px solid #c98a00; border-radius: 6px; padding: .4rem .8rem; margin: .6rem 0; color: #c98a00; }
.bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: .8rem 0; }
.bar progress { width: 100%; height: 1rem; accent-color: var(--accent); }
.bar.warn progress { accent-color: #c98a00; }
.bar.crit progress { accent-color: #c0392b; }
.bar.unknown progress { opacity: .35; }
.bar .num { font-weight: 700; }
table.shares { border-collapse: collapse; width: 100%; margin-top: .4rem; }
table.shares th, table.shares td { text-align: start; padding: .2rem .6rem; border-bottom: 1px solid var(--line); }
.stale { color: #c0392b; font-weight: 700; }
