@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 {
  width: min(520px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 48px));
  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 { display: grid; gap: 14px; padding: 18px; }
.siteSelectorDialogHeader { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.siteSelectorDialogHeader h2 { margin: 0; font-size: 20px; }
.siteSelectorOptions { display: grid; gap: 7px; overflow-y: auto; }
.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; }

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;
}

.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; }
.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-paid: #2f7d59;
  --report-free: #e5ad22;
  --report-failure: #c85c52;
}

.reportChartToggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  background: #eceee9;
}

.reportChartToggle button {
  min-height: 32px;
  padding: 5px 10px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px;
}

.reportChartToggle button[aria-pressed="true"] {
  background: var(--ws-surface) !important;
  color: var(--ws-sidebar) !important;
  box-shadow: 0 1px 3px rgba(18, 54, 40, .18) !important;
  font-weight: 700;
}

.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; }
.reportLegendSwatch { width: 12px; height: 12px; border-radius: 3px; background: var(--report-paid); }
.reportLegendLine { width: 18px; height: 0; border-top: 3px solid; }
.reportLegendLine--free { border-color: var(--report-free); }
.reportLegendLine--failure { border-color: var(--report-failure); }

.reportChart { position: relative; min-height: 300px; padding: 4px 10px 12px; }
.reportChartCanvas { position: relative; width: 100%; }
.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 { 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 { fill: var(--report-paid); opacity: .88; }
.reportChartLine { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.reportChartLine--free { stroke: var(--report-free); }
.reportChartLine--failure { stroke: var(--report-failure); }
.reportChartPoint { stroke: #fff; stroke-width: 1.5; }
.reportChartPoint--free { fill: var(--report-free); }
.reportChartPoint--failure { fill: var(--report-failure); }
.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; }
}
