@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ws-sidebar: #123b2d;
  --ws-sidebar-deep: #0c2d22;
  --ws-sidebar-text: #eef6f1;
  --ws-sidebar-muted: #b7ccc2;
  --ws-accent: #e9a900;
  --ws-accent-hover: #d79b00;
  --ws-canvas: #f7f6f1;
  --ws-surface: #ffffff;
  --ws-surface-soft: #fbfaf7;
  --ws-border: #dedfd9;
  --ws-text: #17201c;
  --ws-muted: #64706a;
  --ws-success: #15803d;
  --ws-danger: #c62828;
  --ws-sidebar-width: 248px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  min-height: 100%;
  background: var(--ws-canvas) !important;
  color: var(--ws-text) !important;
}

body:has(> nav.tabs) {
  padding-left: var(--ws-sidebar-width);
}

body > nav.tabs {
  position: fixed !important;
  inset: 0 auto 0 0;
  z-index: 1000;
  width: var(--ws-sidebar-width);
  height: 100vh;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 8px !important;
  padding: 28px 12px 190px !important;
  overflow-y: auto;
  border: 0 !important;
  background: var(--ws-sidebar) !important;
}

body > nav.tabs::before {
  content: "";
  flex: 0 0 72px;
  width: 188px;
  margin: 0 14px 20px;
  background: url('./assets/washstart-logo-white.png') left center / contain no-repeat;
}

.dashboardSiteContext {
  display: grid;
  gap: 5px;
  margin: 0 0 8px;
  padding: 0 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.dashboardSiteContextLabel {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 10px 5px 12px !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 8px;
  background: rgba(255,255,255,.07) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  box-shadow: none !important;
}

.dashboardSiteContextLabel:not(:disabled):hover {
  border-color: rgba(255,255,255,.36) !important;
  background: rgba(255,255,255,.13) !important;
}

.dashboardSiteContextLabel:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }
.dashboardSiteContextLabel:disabled { cursor: default; opacity: 1; }
.siteContextSelectorIcon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #fff !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboardSiteContextItems { display: grid; gap: 3px; }

body > nav.tabs .siteContextItem {
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px 0 26px;
  border-radius: 7px;
  color: var(--ws-sidebar-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

body > nav.tabs .siteContextItem::before {
  content: "";
  position: absolute;
  left: 13px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: .65;
}

body > nav.tabs .siteContextItem:hover { background: rgba(255,255,255,.08); color: #fff; }
body > nav.tabs .siteContextItem.active {
  background: rgba(255,255,255,.13);
  color: #fff;
  font-weight: 700;
}

.adminToolsLabel {
  margin: 12px 12px 4px;
  color: rgba(255,255,255,.55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.siteSelectorDialog {
  box-sizing: border-box;
  width: 60vw;
  height: 80vh;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--ws-border);
  border-radius: 12px;
  background: var(--ws-surface);
  color: var(--ws-text);
  box-shadow: 0 24px 64px rgba(10, 35, 26, .3);
}

.siteSelectorDialog::backdrop { background: rgba(10, 35, 26, .55); }
.siteSelectorDialogBody {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  padding: 18px;
  overflow: hidden;
}
.siteSelectorDialogHeader {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.siteSelectorDialogHeader h2 { margin: 0; font-size: 20px; white-space: nowrap; }
.siteSelectorSearch {
  width: 100%;
  min-width: 0;
}
.siteSelectorOptions {
  align-content: start;
  display: grid;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
}
.siteSelectorEmpty { margin: 18px 0; color: var(--ws-text-muted); text-align: center; }
.siteSelectorOption {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px !important;
  border-color: var(--ws-border) !important;
  background: var(--ws-surface-soft) !important;
  color: var(--ws-text) !important;
  text-align: left;
  box-shadow: none !important;
}
.siteSelectorOption:hover { border-color: #9eb2a9 !important; background: #f0f4f1 !important; }
.siteSelectorOption.selected { border-color: var(--ws-accent) !important; background: #fff8dd !important; font-weight: 700; }

@media (max-width: 720px) {
  .siteSelectorDialog { width: calc(100vw - 24px); height: 80vh; }
  .siteSelectorDialogHeader { grid-template-columns: 1fr auto; gap: 10px; }
  .siteSelectorDialogHeader h2 { grid-column: 1; }
  .siteSelectorDialogHeader #closeSiteSelector { grid-column: 2; grid-row: 1; }
  .siteSelectorSearch { grid-column: 1 / -1; grid-row: 2; }
}

body > nav.tabs .tab {
  position: relative;
  min-height: 48px;
  display: flex !important;
  align-items: center;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 8px;
  color: var(--ws-sidebar-text) !important;
  background: transparent !important;
  font-size: 15px !important;
  font-weight: 500;
  text-decoration: none;
}

body > nav.tabs .tab:hover {
  background: rgba(255, 255, 255, 0.09) !important;
}

body > nav.tabs .tab.active {
  color: var(--ws-text) !important;
  background: #fffdf7 !important;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(5, 26, 18, 0.18);
}

body > nav.tabs .tab.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: var(--ws-accent);
}

body > header {
  position: fixed !important;
  left: 0;
  bottom: 0;
  z-index: 1002;
  width: var(--ws-sidebar-width);
  min-height: 152px;
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  padding: 18px 24px 22px !important;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: var(--ws-sidebar-deep) !important;
  color: var(--ws-sidebar-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body > header .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ws-sidebar-text) !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

body > header .brand::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #43d17b;
  box-shadow: 0 0 0 3px rgba(67, 209, 123, 0.12);
}

body > header #authForm {
  width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px !important;
  margin: 0;
  padding: 0;
}

body > header #userBadge {
  min-width: 0 !important;
  color: var(--ws-sidebar-muted) !important;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body > header #authForm input,
body > header #authForm button {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400;
  line-height: 1.2;
}

body > header #authForm input {
  border-color: rgba(255,255,255,.25) !important;
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}

body > header #authForm input::placeholder { color: var(--ws-sidebar-muted); }

body > header #authForm button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.08) !important;
  color: var(--ws-sidebar-text) !important;
}

body > header #authForm button:hover { background: rgba(255,255,255,.15) !important; }

html:not([data-auth-ui]) body > header #authForm,
html:not([data-api-ui]) body > header .brand {
  visibility: hidden;
}

html[data-auth-ui="pending"] #authForm input,
html[data-auth-ui="pending"] #loginBtn,
html[data-auth-ui="pending"] #resetBtn,
html[data-auth-ui="pending"] #logoutBtn,
html[data-auth-ui="signed-in"] #authForm input,
html[data-auth-ui="signed-in"] #loginBtn,
html[data-auth-ui="signed-in"] #resetBtn,
html[data-auth-ui="signed-out"] #logoutBtn {
  display: none !important;
}

html[data-auth-ui="signed-in"] #logoutBtn {
  display: inline-flex !important;
}

body > main,
body > .container,
body > .settingsPage {
  width: 100% !important;
  max-width: 1480px !important;
  margin: 0 auto !important;
  padding: 36px 40px 56px !important;
}

h1, h2, h3, h4 { color: var(--ws-text); letter-spacing: -0.025em; }
h1 { font-weight: 800 !important; }
.muted { color: var(--ws-muted) !important; }

.pageIntro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.pageIntro h1 { margin: 0 0 7px; font-size: clamp(30px, 3vw, 40px); }
.pageIntro p { margin: 0; color: var(--ws-muted); font-size: 15px; }

button,
select,
input,
textarea { font: inherit; }

button,
.controlButton {
  min-height: 38px;
  border: 1px solid var(--ws-border) !important;
  border-radius: 8px !important;
  background: var(--ws-surface) !important;
  color: var(--ws-text) !important;
  box-shadow: none !important;
}

button:hover,
.controlButton:hover { background: #f0efe9 !important; }

#applyBtn,
#addSiteBtn,
.primaryButton,
button.primary {
  border-color: var(--ws-accent) !important;
  background: var(--ws-accent) !important;
  color: #171b18 !important;
  font-weight: 700;
}

#applyBtn:hover,
#addSiteBtn:hover,
.primaryButton:hover,
button.primary:hover { background: var(--ws-accent-hover) !important; }

input,
select,
textarea {
  border-color: #cfd3ce !important;
  border-radius: 8px !important;
  background: var(--ws-surface) !important;
  color: var(--ws-text) !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(233, 169, 0, 0.18);
  border-color: var(--ws-accent) !important;
}

input.presetLocked,
input[aria-readonly="true"] {
  background: #ebece8 !important;
  color: #7b827d !important;
  cursor: pointer;
}

.tableWrap,
.panel,
.summaryCard,
.card,
.toolsCard,
.settingsCard,
.historyCard,
.statCard,
.timeframeSummary,
.windcaveAccountsPanel,
.routingDiagnosticsPanel {
  border-color: var(--ws-border) !important;
  border-radius: 10px !important;
  background: var(--ws-surface) !important;
  box-shadow: 0 1px 2px rgba(16, 36, 27, 0.04) !important;
}

.tableWrap {
  overflow: auto !important;
  border: 1px solid var(--ws-border);
}

table { background: var(--ws-surface) !important; }
th {
  border-color: var(--ws-border) !important;
  background: #f3f4f0 !important;
  color: #55615b !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
}
td { border-color: #e7e8e3 !important; }
tbody tr:hover td { background: #fbfaf6 !important; }

.badge,
.statusBadge {
  border-color: var(--ws-border) !important;
  background: #f5f6f3 !important;
}

.online { color: var(--ws-success) !important; }
.offline { color: var(--ws-danger) !important; }

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px !important;
  margin-bottom: 18px !important;
}

#reportMain > .toolbar { align-items: flex-end; }

.filterDropdown { position: relative; display: inline-flex; }
.filterChip { border-radius: 999px !important; background: var(--ws-surface) !important; }
.filterMenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1001;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  background: var(--ws-surface);
  box-shadow: 0 12px 30px rgba(17, 24, 39, .14);
}
.filterMenu[hidden] { display: none; }
.filterMenu button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0 !important;
  text-align: left;
  background: transparent !important;
  font-size: 14px;
  font-weight: 400;
}
.filterMenu button:hover,
.filterMenu button.active { background: #f0efe9 !important; }
.filterMenu button.active { font-weight: 700; }
.deviceSearchInput {
  min-width: 220px;
  max-width: min(420px, 100%);
  flex: 1 1 240px;
  min-height: 40px;
}
.deviceSortSelect { min-width: 170px; min-height: 40px; }
html[data-site-scoped-devices="true"] th.siteColumn,
html[data-site-scoped-devices="true"] #tbody td.siteColumn { display: none !important; }

.reportDownloadMenu {
  position: relative;
  align-self: flex-end;
  margin-left: auto;
}
.reportDownloadMenu[open] { z-index: 40; }
.reportDownloadMenu > summary {
  width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  background: var(--ws-surface);
  color: var(--ws-text);
  cursor: pointer;
  user-select: none;
}
.reportDownloadMenu > summary::-webkit-details-marker { display: none; }
.reportDownloadMenu > summary:hover { background: #f0efe9; }
.reportDownloadMenu > summary:focus-visible {
  outline: 3px solid rgba(233, 169, 0, 0.25);
  border-color: var(--ws-accent);
}
.reportDownloadMenu > summary svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reportDownloadMenuList {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 50;
  width: 210px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--ws-border);
  border-radius: 10px;
  background: var(--ws-surface);
  box-shadow: 0 14px 30px rgba(16, 36, 27, 0.16);
}
.reportDownloadMenuList button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 0 !important;
  text-align: left;
  background: transparent !important;
}
.reportDownloadMenuList button:hover { background: #f1f2ed !important; }
.reportDownloadMenuList strong { font-size: 13px; }
.reportDownloadMenuList span { color: var(--ws-muted); font-size: 13px; }

#tbody td.price { overflow: hidden; }
#tbody .cycleCellStack,
#tbody .cycleChips { width: 100%; min-width: 0; }
#tbody .cycleChip {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
#tbody .cycleChipName {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
}
#tbody .cycleChipPrice { flex: 0 0 auto; }

.userActionMenu { position: relative; display: inline-block; text-align: left; }
.userActionMenu[open] { z-index: 20; }
.userActionMenu > summary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 8px 12px;
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  background: var(--ws-surface);
  color: var(--ws-text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.userActionMenu > summary::-webkit-details-marker { display: none; }
.userActionMenu > summary::after { content: "⌄"; margin-left: 8px; color: var(--ws-muted); }
.userActionMenuList {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--ws-border);
  border-radius: 10px;
  background: var(--ws-surface);
  box-shadow: 0 14px 30px rgba(16, 36, 27, 0.16);
}
.userActionMenuList button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0 !important;
  text-align: left;
  background: transparent !important;
}
.userActionMenuList button:hover { background: #f1f2ed !important; }
.userActionMenuList .dangerAction { color: var(--ws-danger) !important; }
td.actions:has(.userActionMenu) { overflow: visible !important; white-space: nowrap; }

table:has(#usersTbody) { table-layout: fixed; }
table:has(#usersTbody) th:nth-child(1),
table:has(#usersTbody) td:nth-child(1) { width: 12%; }
table:has(#usersTbody) th:nth-child(2),
table:has(#usersTbody) td:nth-child(2) { width: 25%; }
table:has(#usersTbody) th:nth-child(3),
table:has(#usersTbody) td:nth-child(3) { width: 14%; }
table:has(#usersTbody) th:nth-child(4),
table:has(#usersTbody) td:nth-child(4) { width: 10%; }
table:has(#usersTbody) th:nth-child(5),
table:has(#usersTbody) td:nth-child(5) { width: 26%; }
table:has(#usersTbody) th:nth-child(6),
table:has(#usersTbody) td:nth-child(6) { width: 13%; }
#usersTbody td {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal !important;
}

.devicePagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--ws-border);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--ws-surface);
  color: var(--ws-muted);
  font-size: 13px;
}

.devicePaginationControls { display: flex; gap: 6px; }
.devicePagination button { min-width: 36px; min-height: 34px; padding: 4px 10px; }
.devicePagination button.active {
  border-color: var(--ws-accent) !important;
  background: #fff4cf !important;
  font-weight: 700;
}

.devicePagination button:disabled { opacity: .45; cursor: not-allowed; }

.summaryGrid { gap: 14px !important; }
.summaryCard { padding: 16px !important; }
.summaryCard .value { font-size: 26px !important; }
.summaryCardHelp {
  margin-top: 8px;
  color: var(--ws-muted);
  font-size: 11px;
  line-height: 1.35;
}
.reportOperationalIssuesHelp {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ws-border);
  font-size: 12px;
}
.panelHeader { background: #f7f7f3 !important; border-color: var(--ws-border) !important; }

.reportRangeField select { min-width: 160px; }

.reportChartHeader { flex-wrap: wrap; }
.reportChartHeader > div:first-child { display: grid; gap: 3px; }
.reportChartPanel {
  --report-cycles: #2f7d59;
  --report-value: #3f7f9f;
  --report-free: #e5ad22;
}

.reportChartLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 12px 18px 0;
  color: var(--ws-muted);
  font-size: 12px;
}

.reportChartLegend span { display: inline-flex; align-items: center; gap: 6px; }
.reportChartLegend span[hidden] { display: none; }
.reportLegendSwatch { width: 12px; height: 12px; border-radius: 3px; }
.reportLegendSwatch--cycles { background: var(--report-cycles); }
.reportLegendSwatch--value { background: var(--report-value); }
.reportLegendLine { width: 18px; height: 0; border-top: 3px solid; }
.reportLegendLine--free { border-color: var(--report-free); }

.reportChart { position: relative; min-height: 300px; padding: 4px 10px 12px; }
.reportChartCanvas { position: relative; width: 100%; }
.reportChartData {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.reportChart svg { display: block; width: 100%; height: auto; overflow: visible; }
.reportChartGrid { stroke: #dfe3dd; stroke-width: 1; }
.reportChartAxis { stroke: #89918c; stroke-width: 1.2; }
.reportChartAxisLabel,
.reportChartXAxisLabel,
.reportChartYAxisLabel { fill: #69736e; font: 11px ui-sans-serif, system-ui, sans-serif; }
.reportChartAxisTitle { fill: #53615b; font: 600 12px ui-sans-serif, system-ui, sans-serif; }
.reportChartBar { opacity: .9; }
.reportChartBar--cycles { fill: var(--report-cycles); }
.reportChartBar--value { fill: var(--report-value); }
.reportChartLine { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.reportChartLine--free { stroke: var(--report-free); }
.reportChartPoint { stroke: #fff; stroke-width: 1.5; }
.reportChartPoint--free { fill: var(--report-free); }
.reportChartHit { fill: transparent; outline: none; cursor: crosshair; }
.reportChartHit:focus { fill: rgba(47, 125, 89, .08); }

.reportChartTooltip {
  position: absolute;
  z-index: 5;
  max-width: 320px;
  transform: translateY(-100%);
  pointer-events: none;
  padding: 8px 10px;
  border-radius: 7px;
  background: #153d2f;
  color: #fff;
  box-shadow: 0 5px 18px rgba(18, 54, 40, .24);
  font-size: 12px;
  line-height: 1.4;
}

.reportChartEmpty { display: grid; min-height: 260px; place-items: center; }

@media (max-width: 720px) {
  .reportChart { min-width: 700px; }
  .reportChartPanel { overflow-x: auto; }
}

.settingsTabs,
[role="tablist"],
.siteTabs {
  border-color: var(--ws-border) !important;
}

[role="tab"][aria-selected="true"],
.siteTab.active,
.settingsTab.active {
  border-color: var(--ws-accent) !important;
  color: var(--ws-text) !important;
}

#siteVersionBadge { color: #89918c !important; }

#mobileNavToggle { display: none; }

@media (max-width: 960px) {
  body:has(> nav.tabs) { padding-left: 0; }

  body > header {
    position: static !important;
    width: 100%;
    min-height: 0;
    padding: 12px 16px !important;
    border: 0 !important;
  }

  body > header #authForm { flex-direction: row; flex-wrap: wrap; }
  body > header #authForm input,
  body > header #authForm button { width: auto; flex: 1 1 140px; }

  body > nav.tabs {
    position: sticky !important;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px 12px !important;
    overflow: visible;
    background: var(--ws-sidebar) !important;
  }

  body > nav.tabs::before {
    flex: 0 0 112px;
    width: 112px;
    height: 44px;
    margin: 0 8px 0 0;
  }

  #mobileNavToggle {
    margin-left: auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border-color: rgba(255,255,255,.28) !important;
    background: rgba(255,255,255,.1) !important;
    color: var(--ws-sidebar-text) !important;
  }

  #mobileNavToggle span:first-child {
    color: var(--ws-sidebar-muted);
    font-size: 12px;
    font-weight: 500;
  }

  #mobileNavToggle strong { font-size: 14px; }

  body > nav.tabs .tab { display: none !important; }

  body > nav.tabs .dashboardSiteContext {
    flex: 1 0 100%;
    margin: 0;
    padding: 8px 0 0;
    border: 0;
  }

  body > nav.tabs:not(.mobileOpen) .dashboardSiteContextItems,
  body > nav.tabs:not(.mobileOpen) .adminToolsLabel { display: none !important; }

  body > nav.tabs.mobileOpen .dashboardSiteContext {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.16);
  }

  body > nav.tabs.mobileOpen .tab {
    flex: 1 0 100%;
    min-height: 44px;
    display: flex !important;
    padding: 0 14px !important;
    box-shadow: none;
  }

  body > nav.tabs.mobileOpen .siteContextItem { display: flex !important; }
  body > nav.tabs.mobileOpen .adminToolsLabel { display: block !important; flex: 1 0 100%; }

  body > nav.tabs.mobileOpen .tab:first-of-type { margin-top: 8px; }

  body > main,
  body > .container,
  body > .settingsPage { padding: 24px 16px 40px !important; }

  body > .container .tableWrap,
  body > main .tableWrap,
  body:not(:has(> nav.tabs)) > .container .tableWrap {
    overflow: visible !important;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  #tbody,
  #tbody tr { display: grid; }

  #tbody {
    gap: 12px;
    background: transparent;
  }

  table:has(#tbody) {
    display: block;
    background: transparent !important;
  }

  table:has(#tbody) thead { display: none; }

  #tbody tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--ws-border);
    border-radius: 10px;
    background: var(--ws-surface);
    box-shadow: 0 1px 2px rgba(16, 36, 27, 0.04);
  }

  #tbody td {
    width: auto !important;
    min-width: 0 !important;
    min-height: 66px;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px !important;
    border: 0 !important;
    border-bottom: 1px solid #e7e8e3 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  #tbody td:nth-child(odd) { border-right: 1px solid #e7e8e3 !important; }
  #tbody td:nth-child(3) { grid-column: 1 / -1; }
  #tbody td:nth-child(8) {
    grid-column: 1 / -1;
    min-height: 54px;
    align-items: stretch;
    border-bottom: 0 !important;
    border-right: 0 !important;
  }

  #tbody td::before {
    color: var(--ws-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  #tbody td:nth-child(1)::before { content: "Site"; }
  #tbody td:nth-child(2)::before { content: "Machine"; }
  #tbody td:nth-child(3)::before { content: "Cycles"; }
  #tbody td:nth-child(4)::before { content: "Device ID"; }
  #tbody td:nth-child(5)::before { content: "Status"; }
  #tbody td:nth-child(6)::before { content: "24h uptime"; }
  #tbody td:nth-child(7)::before { content: "QR links"; }
  #tbody td:nth-child(8)::before { content: "Actions"; }

  #tbody td:only-child {
    grid-column: 1 / -1;
    min-height: 54px;
    border: 0 !important;
  }

  #tbody td:only-child::before { content: none; }

  #tbody .cycleCellStack { width: 100%; }
  #tbody .cycleChip { max-width: 100%; }
  #tbody td:nth-child(8) > * { width: 100%; }

  .devicePagination { align-items: flex-start; flex-direction: column; }
  .devicePaginationControls { max-width: 100%; overflow-x: auto; }
}
.machineProfileFilterIndicator { border-color: #86efac; background: #f0fdf4; color: #166534; font-weight: 700; }

.reportTypeField select { min-width: 130px; }
#groupByField[hidden],
[data-detail-report][hidden],
#summaryReportPanel[hidden] { display: none !important; }
.summaryReportPanel .panelHeader > div { display: grid; gap: 3px; }
.summaryReportContent { display: grid; gap: 22px; padding: 20px; }
.summaryReportColumns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.summaryReportSection {
  overflow: hidden;
  border: 1px solid var(--ws-border);
  border-radius: 10px;
  background: var(--ws-surface);
}
.summaryReportSection h3 {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ws-border);
  background: #eef5f1;
  font-size: 16px;
}
.summaryReportMetrics { margin: 0; padding: 4px 18px 10px; }
.summaryReportMetrics > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--ws-border);
}
.summaryReportMetrics > div:last-child { border-bottom: 0; }
.summaryReportMetrics dt { color: var(--ws-muted); }
.summaryReportMetrics dt small {
  display: block;
  max-width: 390px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
}
.summaryReportMetrics dd { margin: 0; font-weight: 700; text-align: right; }
.summaryPaymentBreakdownBody { display: grid; gap: 18px; padding-bottom: 22px; }
.summaryPaymentBreakdown table { margin: 0; }
.summaryPaymentBrandSwatch {
  width: 11px;
  height: 11px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 3px;
  background: var(--summary-payment-color);
}
.summaryPaymentBrandChart {
  width: min(300px, calc(100% - 40px));
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--summary-payment-chart);
  box-shadow: inset 0 0 0 1px rgba(16, 36, 27, .08);
}
.summaryReportFreeStartsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 18px;
}
.summaryReportFreeStartsGrid > div { padding: 8px 18px; text-align: center; }
.summaryReportFreeStartsGrid > div + div { border-left: 1px solid var(--ws-border); }
.summaryReportFreeStartsGrid dt { color: var(--ws-muted); }
.summaryReportFreeStartsGrid dd {
  margin: 5px 0 0;
  color: var(--report-cycles, #2f7d59);
  font-size: 28px;
  font-weight: 800;
}
.summaryReportTableWrap { overflow-x: auto; }
.summaryReportLocations table { margin: 0; }

@media (max-width: 900px) {
  .summaryReportColumns { grid-template-columns: 1fr; }
  .summaryReportFreeStartsGrid { grid-template-columns: 1fr; }
  .summaryReportFreeStartsGrid > div + div { border-top: 1px solid var(--ws-border); border-left: 0; }
}
