:root {
  color-scheme: dark;
  --page: #151e1a;
  --panel: #1d2922;
  --panel-deep: #18231d;
  --edge: #35443a;
  --text: #edf0e7;
  --muted: #a7b9ab;
  --lime: #cee99c;
  --amber: #e3b782;
  --rose: #ffaaa6;
  --ash: #789ca6;
  font-family: "Aptos", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--text); font-size: 16px; line-height: 1.5; }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.topbar { border-bottom: 1px solid var(--edge); background: #17211b; }
.top-inner { max-width: 1256px; margin: auto; min-height: 72px; padding: 12px 24px; display: flex; align-items: center; gap: 38px; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; font-size: 21px; font-weight: 730; letter-spacing: -.04em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
nav, .top-actions { display: flex; align-items: center; gap: 5px; }
nav button, .top-actions button, .text-button { border: 0; background: transparent; padding: 8px 11px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 620; white-space: nowrap; }
nav button:hover, .top-actions button:hover, .text-button:hover { background: #28382c; color: var(--lime); }
nav button[aria-current] { background: #2a3a2d; color: var(--lime); }
.top-actions { margin-left: auto; }
main { max-width: 1256px; padding: 33px 24px 52px; margin: auto; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.1; letter-spacing: -.05em; font-weight: 710; }
h2 { font-size: 18px; font-weight: 660; letter-spacing: -.018em; }
.title-row p { margin-top: 7px; }
.muted { color: var(--muted); font-size: 14px; }
.panel { border: 1px solid var(--edge); border-radius: 16px; background: var(--panel); padding: 23px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pill { border-radius: 20px; padding: 4px 9px; background: #29382e; color: var(--muted); font-size: 13px; font-weight: 620; text-align: center; white-space: nowrap; }
.pill.good { background: #34482d; color: var(--lime); }
.pill.warn { background: #43362a; color: var(--amber); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(255px, 1fr); gap: 16px; }
.hero-figure { color: var(--lime); font-weight: 680; font-size: clamp(45px, 8vw, 80px); line-height: 1; letter-spacing: -.07em; margin: 9px 0 8px; font-variant-numeric: tabular-nums; }
.hero-figure span { font-size: .48em; letter-spacing: -.045em; }
.profiles { margin: 17px 0 10px; display: grid; gap: 13px; }
.profile { display: grid; gap: 5px; }
.profile-title, .profile-details, .row-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-title strong { font-size: 15px; }
.profile-details { color: var(--muted); font-size: 13px; }
.progress { height: 6px; border-radius: 4px; overflow: hidden; display: block; width: 100%; border: 0; background: #35473b; appearance: none; }
.progress::-webkit-progress-bar { background: #35473b; border-radius: 4px; }
.progress::-webkit-progress-value { background: var(--tone, var(--lime)); border-radius: 4px; }
.progress::-moz-progress-bar { background: var(--tone, var(--lime)); border-radius: 4px; }
.tone-0 { --tone: var(--lime); } .tone-1 { --tone: var(--amber); } .tone-2 { --tone: var(--ash); } .tone-3 { --tone: #b4a8d3; }
.text-button { color: var(--lime); padding-left: 0; }
.network-list { margin-top: 8px; }
.network-list > div { padding: 11px 0; border-bottom: 1px solid var(--edge); }
.network-list > div:last-child { border: 0; padding-bottom: 0; }
.network-list strong { font-size: 14px; text-align: right; }
.usage, .cabin, .events { margin-top: 16px; }
canvas { width: 100%; display: block; margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--tone, var(--muted)); }
.air-grid, .trend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.air-metric, .trend { background: var(--panel-deep); border-radius: 10px; padding: 12px; }
.air-metric strong { font-weight: 660; font-size: clamp(20px, 3vw, 30px); display: block; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.air-metric small { font-size: .5em; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.notice { color: var(--amber); padding: 11px 14px; background: #3a3025; border: 1px solid #604c36; border-radius: 9px; margin-bottom: 14px; font-size: 14px; }
.login { max-width: 440px; margin: 30px auto; }
.login h1 { font-size: 31px; margin-bottom: 20px; }
.login form { display: grid; gap: 10px; }
input:not([type=checkbox]), select { color: var(--text); background: var(--panel-deep); border-radius: 7px; padding: 8px; border: 1px solid var(--edge); min-width: 0; }
input[type=checkbox] { accent-color: var(--lime); width: 18px; height: 18px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.primary, .secondary { padding: 9px 13px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 650; }
.primary { background: var(--lime); color: var(--page); }
.secondary { background: #293a2e; border-color: var(--edge); color: var(--text); }
.error { color: var(--rose); min-height: 20px; font-size: 14px; }
.allowance-help { margin-top: 9px; }
.allowance-help summary { color: var(--lime); cursor: pointer; width: fit-content; }
.allowance-help p { margin-top: 6px; max-width: 72ch; }
.settings-row { border-top: 1px solid var(--edge); padding-top: 13px; margin-top: 14px; }
.settings-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) minmax(105px,auto); gap: 10px; align-items: end; margin-top: 11px; }
.settings-fields label:not(.check) { color: var(--muted); display: grid; font-size: 14px; gap: 4px; }
.settings-actions, .form-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.form-actions { padding-top: 16px; }
.event { padding: 11px 0; border-bottom: 1px solid var(--edge); display: grid; grid-template-columns: minmax(110px, 1fr) 3fr; gap: 12px; align-items: start; }
.sms-status { display: flex; justify-content: space-between; margin-top: 15px; }
@media (max-width: 740px) {
  .top-inner { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  nav { order: 3; flex-basis: 100%; }
  main { padding: 22px 14px; }
  .panel { padding: 15px; border-radius: 12px; }
  .overview-grid { grid-template-columns: 1fr; }
  .air-grid, .settings-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
