:root {
  color-scheme: light;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color: #101b37;
  background: #f1f4f9;
  --ink: #101b37;
  --muted: #516078;
  --line: #e0e6f0;
  --brand: #305ed1;
  --shadow: 0 2px 4px #182e5710;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #527ef5; outline-offset: 2px; }
h1, h2, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar { background: #111e3b; color: #f7f9ff; }
.topbar-inner { min-height: 64px; margin: 0 auto; max-width: 1760px; padding: 0 clamp(16px, 3.15vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 690; font-size: 1.06rem; letter-spacing: -.025em; }
.brand-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #3866e4; flex-shrink: 0; }
.brand-icon::before { content: ""; width: 20px; height: 23px; background: #f1f6ff; clip-path: polygon(52% 2%, 90% 2%, 63% 41%, 86% 41%, 31% 98%, 44% 55%, 12% 55%); }
.account { display: flex; align-items: center; gap: 15px; }
.username { color: #bdc9e2; font-size: .875rem; overflow-wrap: anywhere; }
.top-button { color: #e8efff; border: 1px solid #506183; background: transparent; padding: 7px 12px; border-radius: 7px; font-size: .875rem; }
.top-button:hover { background: #283d66; }
.workspace { max-width: 1760px; margin: 0 auto; padding: 33px clamp(16px, 3.15vw, 56px) 35px; }
.overview { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
h1 { font-size: clamp(1.85rem, 4.2vw, 2.48rem); font-weight: 740; line-height: 1.1; letter-spacing: -.045em; }
.last-update { color: var(--muted); margin-top: 9px; font-size: .9rem; font-variant-numeric: tabular-nums; }
.source-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.mode-label { color: #465675; background: #e7edf8; border: 1px solid #d9e2f3; border-radius: 6px; padding: 6px 10px; font-size: .875rem; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; font-size: .875rem; padding: 3px 7px; font-weight: 625; white-space: nowrap; }
.source-status .badge { padding: 6px 10px; }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: block; }
.good { background: #e7f6ee; color: #196342; }
.bad { background: #fce8eb; color: #a32642; }
.lost { background: #efe8f8; color: #663888; }
.warn { background: #fff1d9; color: #825107; }
.neutral { background: #edf0f6; color: #535f74; }
.active { background: #e7efff; color: #284dba; }
.alert { background: #fff2d9; border: 1px solid #f0d898; color: #64440f; padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; font-size: .9rem; }
.summary { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 11px; margin-bottom: 22px; }
.metric { min-width: 0; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); background: #fff; padding: 12px 13px 11px; border-top: 3px solid var(--metric, #7c8eac); }
.metric-label { font-size: .875rem; color: #435472; line-height: 1.18; }
.metric-value { margin-top: 6px; font-size: 1.85rem; line-height: 1.05; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.055em; }
.metric.total { --metric: #4465b6; }
.metric.online, .metric.operative { --metric: #3d9b6d; }
.metric.offline { --metric: #9467b6; }
.metric.inoperative { --metric: #ca5c70; }
.metric.charging { --metric: #577df5; }
.metric.stale { --metric: #d09333; }
.station-panel { min-width: 0; background: #fff; border: 1px solid #dce4f0; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px 0; }
.panel-title { display: flex; align-items: center; gap: 10px; }
h2 { font-size: 1.13rem; font-weight: 700; letter-spacing: -.025em; }
.row-count { font-size: .875rem; border-radius: 5px; padding: 3px 7px; background: #eef2fa; color: #4b5f85; white-space: nowrap; }
.quiet-button { border: none; border-radius: 5px; background: transparent; color: #2b54b5; padding: 7px 8px; font-size: .875rem; font-weight: 650; }
.quiet-button:hover { background: #edf2ff; }
.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; padding: 8px 16px 14px; }
.filters input[type="search"], .filters select { background: #f9fbff; border: 1px solid #dce4f0; border-radius: 7px; min-height: 38px; color: #273d63; font-size: .875rem; }
.filters select { appearance: none; width: 100%; padding: 0 28px 0 10px; cursor: pointer; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 12px; top: 14px; width: 6px; height: 6px; border-right: 2px solid #627498; border-bottom: 2px solid #627498; transform: rotate(45deg); pointer-events: none; }
.search { position: relative; flex: 1 1 220px; max-width: 310px; }
.search input { width: 100%; padding: 0 10px 0 35px; }
.search-icon { position: absolute; top: 12px; left: 12px; border: 1.7px solid #627498; border-radius: 50%; width: 11px; height: 11px; pointer-events: none; }
.search-icon::after { content: ""; position: absolute; top: 8px; left: 7px; width: 5px; height: 1.5px; background: #627498; transform: rotate(45deg); }
.toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: #34486c; cursor: pointer; position: relative; padding: 7px 0; }
.toggle input { position: absolute; opacity: 0; width: 33px; height: 20px; margin: 0; }
.track { width: 33px; height: 19px; border-radius: 20px; background: #d2dcec; position: relative; pointer-events: none; }
.track::after { content: ""; position: absolute; width: 13px; height: 13px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #13274e33; }
.toggle input:checked + .track { background: var(--brand); }
.toggle input:checked + .track::after { transform: translateX(14px); }
.toggle input:focus-visible + .track { outline: 3px solid #527ef5; outline-offset: 2px; }
.table-scroll { overflow: auto; max-height: max(360px, calc(100svh - 355px)); border-top: 1px solid var(--line); scrollbar-color: #bdc9dc #f2f5fa; }
table { border-spacing: 0; text-align: left; min-width: 1190px; width: 100%; font-size: .875rem; }
th, td { padding: 7px 7px; }
th:first-child, td:first-child { padding-left: 15px; }
th:last-child, td:last-child { padding-right: 15px; }
thead th { position: sticky; top: 0; z-index: 1; background: #eaf0fa; color: #3c517a; border-bottom: 1px solid #d6e0ef; vertical-align: bottom; line-height: 1.15; }
thead th:first-child { left: 0; z-index: 2; }
thead button { background: transparent; color: inherit; border: none; padding: 2px 2px 4px; font-weight: 650; text-align: left; width: 100%; }
thead button:hover, th[aria-sort] button { color: #234cb2; text-decoration: underline; text-underline-offset: 4px; }
td { height: 41px; border-bottom: 1px solid #e7ecf4; vertical-align: middle; font-variant-numeric: tabular-nums; }
.station-row:nth-of-type(odd) { background: #fbfcff; }
.station-row:hover, .station-row.open { background: #eef4ff; }
.station-row > td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 #e7ecf4; }
.station-row:nth-of-type(odd) > td:first-child { background: #fbfcff; }
.station-row:hover > td:first-child, .station-row.open > td:first-child { background: #eef4ff; }
.station-button { display: flex; gap: 7px; align-items: center; color: #243e77; font-weight: 700; background: transparent; border: none; padding: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.expand-icon { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #d2dcf0; background: #fff; border-radius: 4px; color: #4260a4; line-height: 1; }
.metric-reading, .table-time { white-space: nowrap; }
.poll-time small { display: block; font-size: .78rem; white-space: nowrap; }
.metric-reading + .metric-reading { margin-left: 5px; }
.reading-unit { color: #4e6188; padding: 0 3px; background: #e9eef8; margin-right: 3px; border-radius: 3px; font-size: .78rem; }
.missing { color: #65738b; }
.stale-date { color: #865711; font-weight: 650; }
.detail-cell { background: #f6f8fe; padding: 14px 18px !important; }
.details-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; width: min(100%, 1150px); }
.detail-block { background: white; border-radius: 7px; border: 1px solid #dce5f3; padding: 10px 11px; }
.detail-block h3 { margin: 0 0 7px; font-size: .9rem; }
.detail-block ul { list-style: none; margin: 0; padding: 0; color: #3d5277; }
.detail-block li + li { margin-top: 5px; }
.table-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 10px 16px; color: #556784; font-size: .8125rem; }
.empty { height: 110px; text-align: center; color: var(--muted); }
.diagnostic-dialog { color: var(--ink); width: min(640px, calc(100% - 28px)); border: 1px solid #dce4f0; border-radius: 12px; padding: 20px; }
.diagnostic-dialog::backdrop { background: #111e3b66; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
#diagnostic-content p + p { margin-top: 10px; }
.login-page { background: #eaf0fb; }
.login-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(290px, .9fr) 1.1fr; }
.login-brand { display: flex; flex-direction: column; justify-content: space-between; padding: 34px clamp(28px, 6vw, 85px); overflow: hidden; color: #f7f9ff; background: radial-gradient(ellipse at 75% 68%, #254273, #121f3b 72%); }
.login-brand p { max-width: 340px; padding-bottom: 10px; font-size: clamp(1.65rem, 3.1vw, 3rem); line-height: 1.1; letter-spacing: -.045em; font-weight: 700; }
.charger-art { height: 250px; align-self: center; aspect-ratio: 1; display: grid; align-items: center; justify-items: center; position: relative; }
.charger-art span { grid-area: 1 / 1; border-radius: 50%; width: 100%; aspect-ratio: 1; border: 1px solid #8aa5ff45; }
.charger-art span:nth-child(2) { width: 79%; border-color: #8aa5ff68; }
.charger-art span:nth-child(3) { width: 57%; border-color: #8aa5ff90; }
.charger-art::after { content: ""; position: absolute; width: 90px; height: 118px; background: #b3c5ff; clip-path: polygon(53% 0, 94% 0, 64% 42%, 92% 42%, 27% 100%, 42% 57%, 10% 57%); }
.login-main { display: grid; place-items: center; padding: 26px; }
.login-card { width: min(100%, 410px); border: 1px solid #dce5f6; border-radius: 16px; padding: clamp(23px, 4vw, 37px); background: #fff; box-shadow: 0 14px 45px #192c5810; }
.login-card h1 { font-size: 1.9rem; }
.login-card > p { color: var(--muted); margin: 9px 0 23px; }
.login-card label { display: grid; gap: 7px; margin-bottom: 15px; font-size: .9rem; font-weight: 620; }
.login-card input { padding: 10px; min-height: 42px; border-radius: 7px; border: 1px solid #cdd9ed; background: #f9fbff; color: var(--ink); }
.submit-button { width: 100%; min-height: 43px; color: white; border: 0; border-radius: 7px; background: #305bd4; font-weight: 675; margin-top: 5px; }
.submit-button:hover { background: #254cb9; }
.submit-button:disabled { opacity: .65; }
.form-error { color: #a32642; margin-bottom: 9px; font-size: .9rem; }
@media (max-width: 950px) { .summary { grid-template-columns: repeat(4, minmax(0, 1fr)); } .toggle { margin-left: 0; } }
@media (max-width: 610px) {
  .workspace { padding-top: 24px; }
  .username { display: none; }
  .brand { gap: 8px; font-size: .9rem; }
  .brand-icon { width: 29px; height: 29px; }
  .account { gap: 6px; }
  .top-button { padding-inline: 7px; }
  .summary { gap: 7px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { padding: 8px; }
  .metric-value { font-size: 1.5rem; }
  .metric.stale { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .metric.stale .metric-value { margin-top: 0; }
  .search { flex-basis: 100%; max-width: none; }
  .table-scroll { max-height: 65svh; }
  .login-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { padding: 17px 21px; }
  .login-brand p, .charger-art { display: none; }
}
