/* Premium entitlement enhances the existing standard board; it never selects
   the legacy premium layout. Load after standard.css and predictions.css. */

/* New controls are isolated by their prefix. Existing nonpremium controls do
   not match these rules. The admin access controls also work in light mode. */
:where(.premium-tools, .premium-time-popover, .premium-cost-dialog, .premium-rpm-filter, .premium-status, .premium-access-toggle) {
  --premium-surface: #ffffff;
  --premium-canvas: #f5f7fb;
  --premium-ink: #202938;
  --premium-muted: #566377;
  --premium-line: #d7deea;
  --premium-control: #ffffff;
  --premium-accent: #245be6;
  --premium-link: #2458cf;
  --premium-tint: #edf3ff;
  --premium-focus: #245be6;
  --premium-positive: #116c46;
  --premium-negative: #b4233c;
  box-sizing: border-box;
}

html[data-premium="true"][data-theme="dark"] :where(.premium-tools, .premium-time-popover, .premium-cost-dialog, .premium-rpm-filter, .premium-status, .premium-access-toggle) {
  --premium-surface: #202329;
  --premium-canvas: #191c22;
  --premium-ink: #f2f3f5;
  --premium-muted: #b6bdca;
  --premium-line: #454c59;
  --premium-control: #272c35;
  --premium-accent: #316ce3;
  --premium-link: #a5c7ff;
  --premium-tint: #273951;
  --premium-focus: #a5c7ff;
  --premium-positive: #8be1b6;
  --premium-negative: #ffadb8;
}

.premium-tools {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--premium-line);
  background: var(--premium-surface);
  color: var(--premium-ink);
}
.premium-tools[hidden], .premium-rpm-filter[hidden], .premium-time-popover[hidden] { display: none !important; }
.premium-tools > :is(strong, .premium-tools-label) { font-size: 12px; letter-spacing: .025em; }
.premium-tool-button, .premium-access-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--premium-line);
  border-radius: 7px;
  color: var(--premium-ink);
  background: var(--premium-surface);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: none;
}
.premium-tool-button:hover:not(:disabled), .premium-tool-button[aria-expanded="true"],
.premium-access-toggle:hover:not(:disabled) { color: var(--premium-link); background: var(--premium-tint); border-color: var(--premium-link); }
.premium-tool-button svg { flex: 0 0 16px; width: 16px; height: 16px; }
.premium-tool-button:disabled, .premium-access-toggle:disabled { cursor: default; opacity: .55; }
:is(.premium-tools, .premium-time-popover, .premium-cost-dialog, .premium-rpm-filter) :is(button, input, select, summary, a):focus-visible,
.premium-access-toggle:focus-visible { outline: 2px solid var(--premium-focus); outline-offset: 3px; }

.premium-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--premium-line);
  border-radius: 5px;
  background: var(--premium-canvas);
  color: var(--premium-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .04em;
  white-space: nowrap;
}
.premium-status:is(.enabled, .is-premium, [data-enabled="true"]) { background: var(--premium-tint); color: var(--premium-link); border-color: var(--premium-link); }
.premium-access-toggle { min-height: 29px; padding: 5px 8px; font-size: 11px; }

.premium-rpm-filter {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: end;
  gap: 9px 12px;
  margin: 0 16px 12px;
  padding: 11px 14px;
  border: 1px solid var(--premium-line);
  border-radius: 7px;
  color: var(--premium-ink);
  background: var(--premium-canvas);
  font-size: 12px;
}
.premium-rpm-filter > strong { align-self: center; font-size: 12px; margin-right: 4px; }
.premium-rpm-filter label { display: flex; flex-direction: column; gap: 5px; color: var(--premium-muted); font-size: 11px; font-weight: 500; }
.premium-rpm-filter input {
  width: 112px;
  max-width: 100%;
  height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--premium-line);
  border-radius: 5px;
  background: var(--premium-control);
  color: var(--premium-ink);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.premium-rpm-filter button { min-height: 34px; }
.premium-rpm-filter :is(small, [role="status"]) { color: var(--premium-muted); font-size: 11px; line-height: 1.5; }
.premium-rpm-filter [role="alert"] { color: var(--premium-negative); }

.premium-time-popover {
  position: fixed;
  top: calc(106px / var(--board-zoom, 1));
  right: calc(16px / var(--board-zoom, 1));
  z-index: 10030;
  width: 650px;
  max-width: calc((100vw - 32px) / var(--board-zoom, 1));
  max-height: calc((100dvh - 128px) / var(--board-zoom, 1));
  padding: 22px;
  border: 1px solid var(--premium-line);
  border-radius: 12px;
  color: var(--premium-ink);
  background: var(--premium-surface);
  box-shadow: 0 18px 65px #10182735;
  overflow: auto;
  overscroll-behavior: contain;
  font-family: DatSequel, "Segoe UI", Arial, sans-serif;
}
.premium-time-popover :is(h2, h3) { margin: 0; color: var(--premium-ink); }
.premium-time-popover > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.premium-time-popover > header h2 { font-size: 20px; line-height: 1.3; }
.premium-time-popover > p { color: var(--premium-muted); font-size: 12px; line-height: 1.6; }
.premium-clock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.premium-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 15px 8px 12px;
  border: 1px solid var(--premium-line);
  border-radius: 9px;
  color: var(--premium-ink);
  background: var(--premium-canvas);
  text-align: center;
}
.premium-clock :is(h3, strong) { max-width: 100%; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.premium-clock-face {
  position: relative;
  flex: 0 0 auto;
  width: 90px;
  height: 90px;
  margin: 11px auto 10px;
  border: 1px solid var(--premium-line);
  border-radius: 50%;
  color: var(--premium-muted);
  background: radial-gradient(circle, var(--premium-surface) 61%, transparent 62%), repeating-conic-gradient(from -1deg, var(--premium-muted) 0deg 2deg, var(--premium-surface) 2deg 30deg);
  box-shadow: 0 2px 5px #1018270a;
}
.premium-clock-face::after { content: ""; position: absolute; left: 50%; top: 50%; z-index: 4; width: 7px; height: 7px; border: 2px solid var(--premium-surface); border-radius: 50%; background: var(--premium-link); transform: translate(-50%, -50%); }
.premium-clock-number { position: absolute; z-index: 1; color: var(--premium-muted); font: 9px/1 Arial, sans-serif; }
.premium-clock-number-top { top: 8px; left: 50%; transform: translateX(-50%); }
.premium-clock-number-right { right: 8px; top: 50%; transform: translateY(-50%); }
.premium-clock-number-bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.premium-clock-number-left { left: 8px; top: 50%; transform: translateY(-50%); }
.premium-clock-city { color: var(--premium-muted); font-size: 10px; line-height: 1.5; }
.premium-clock-hour, .premium-clock-minute, .premium-clock-second {
  position: absolute;
  bottom: 50%;
  left: 50%;
  display: block;
  border-radius: 4px;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--rotation, 0deg));
  transition: none;
  animation: none;
}
.premium-clock-hour { z-index: 1; width: 4px; height: 25%; background: var(--premium-ink); }
.premium-clock-minute { z-index: 2; width: 3px; height: 35%; background: var(--premium-ink); }
.premium-clock-second { z-index: 3; width: 1px; height: 39%; background: var(--premium-link); }
.premium-clock-digital { font-size: 14px; line-height: 1.5; font-weight: 700; font-variant-numeric: tabular-nums; }
.premium-clock-date { color: var(--premium-muted); font-size: 10px; line-height: 1.6; }
.premium-clock-zone { margin-top: 5px; color: var(--premium-link); font-size: 11px; font-weight: 600; line-height: 1.5; }
.premium-clock-dst { min-height: 14px; color: var(--premium-muted); font-size: 9px; line-height: 1.5; }

dialog.premium-cost-dialog {
  width: 850px;
  max-width: calc((100vw - 32px) / var(--board-zoom, 1));
  max-height: calc((100dvh - 32px) / var(--board-zoom, 1));
  margin: auto;
  padding: 28px;
  border: 1px solid var(--premium-line);
  border-radius: 12px;
  background: var(--premium-surface);
  color: var(--premium-ink);
  box-shadow: 0 22px 80px #10182745;
  overflow: auto;
  overscroll-behavior: contain;
  font-family: DatSequel, "Segoe UI", Arial, sans-serif;
}
:is(.premium-time-popover, .premium-cost-dialog)::backdrop { background: #090d17a6; }
.premium-cost-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.premium-cost-heading :is(h2, h3) { margin: 0; color: var(--premium-ink); font-size: 23px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.premium-cost-heading button { flex: 0 0 auto; }
.premium-cost-load { margin: 0 0 18px; padding: 11px 13px; border: 1px solid var(--premium-line); border-radius: 6px; color: var(--premium-ink); background: var(--premium-canvas); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.premium-cost-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.premium-cost-summary > * { min-width: 0; margin: 0; padding: 17px 15px; border: 1px solid var(--premium-line); border-radius: 8px; background: var(--premium-canvas); }
.premium-cost-summary :is(small, dt, span, .premium-cost-label) { display: block; color: var(--premium-muted); font-size: 11px; font-weight: 500; line-height: 1.5; }
.premium-cost-summary :is(strong, dd, output) { display: block; margin: 8px 0 0; color: var(--premium-ink); font-size: 25px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.premium-cost-summary > :last-child { border-color: var(--premium-link); background: var(--premium-tint); }
.premium-cost-summary > :last-child :is(strong, dd, output) { color: var(--premium-link); }
.premium-cost-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.premium-cost-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; color: var(--premium-ink); font-size: 12px; font-weight: 500; line-height: 1.5; }
.premium-cost-field label { color: var(--premium-ink); }
.premium-cost-field :is(input, select) { width: 100%; min-width: 0; height: 42px; margin: 0; padding: 9px 11px; border: 1px solid var(--premium-line); border-radius: 6px; color: var(--premium-ink); background: var(--premium-control); font: inherit; font-size: 14px; font-weight: 400; line-height: 1.4; font-variant-numeric: tabular-nums; }
.premium-cost-field input::placeholder { color: var(--premium-muted); opacity: 1; }
.premium-cost-field :is(small, .premium-cost-hint) { color: var(--premium-muted); font-size: 10px; font-weight: 400; }
.premium-cost-field input:focus { border-color: var(--premium-link); box-shadow: 0 0 0 1px var(--premium-link); }
.premium-cost-field input[aria-invalid="true"] { border-color: var(--premium-negative); }
.premium-cost-result { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--premium-line); }
.premium-cost-result h3 { margin: 0 0 10px; color: var(--premium-ink); font-size: 14px; }
.premium-cost-line { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid var(--premium-line); color: var(--premium-muted); font-size: 12px; line-height: 1.5; }
.premium-cost-line :is(strong, dd, output) { margin: 0; color: var(--premium-ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.premium-cost-summary > .premium-cost-line { display: block; padding: 17px 15px; }
.premium-cost-summary > .premium-cost-line strong { margin-top: 8px; font-size: 25px; line-height: 1.25; text-align: left; white-space: normal; }
.premium-cost-note { margin: 14px 0; color: var(--premium-muted); font-size: 11px; line-height: 1.65; }
.premium-cost-error { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--premium-negative); border-radius: 5px; color: var(--premium-negative); background: var(--premium-canvas); font-size: 12px; line-height: 1.6; }
.premium-cost-error:empty { display: none; }
.premium-cost-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--premium-line); }
.premium-cost-actions button { min-height: 38px; padding: 8px 16px; }
.premium-cost-dialog :is([data-negative="true"], .is-negative) { color: var(--premium-negative); }

/* All dark board overrides are screen-only so paper output remains white. */
@media screen {
  html[data-premium="true"][data-theme="dark"],
  html[data-premium="true"][data-theme="dark"] #app-shell {
    color-scheme: dark;
    --surface: #202329;
    --surface-alt: #2d3541;
    --canvas: #191c22;
    --subtle: #2b3039;
    --ink: #f2f3f5;
    --muted: #b6bdca;
    --line: #414854;
    --border: #606979;
    --navy: #15181d;
    --blue: #316ce3;
    --primary: #a5c7ff;
    --blue-dark: #245ccd;
    --blue-pale: #273951;
    --link: #a5c7ff;
    --green: #8be1b6;
    --control: #252a33;
    --stripe: #262b33;
    --hover: #303c50;
    --shadow: 0 8px 28px #0005;
    color: var(--ink);
    background-color: var(--surface);
  }
  html[data-premium="true"][data-theme="dark"] body { color: var(--ink); background: var(--surface); }
  html[data-premium="true"][data-theme="dark"] :is(#app-shell, dialog, .date-parity-calendar, .dat-sort-menu) { scrollbar-color: #657082 #202329; }
  html[data-premium="true"][data-theme="dark"] :is(input, select, textarea) { color-scheme: dark; color: var(--ink); background-color: var(--control); border-color: var(--border); }
  html[data-premium="true"][data-theme="dark"] :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
  html[data-premium="true"][data-theme="dark"] :is(input, select, textarea):disabled { color: #a5adbb; background-color: #2b3039; }
  html[data-premium="true"][data-theme="dark"] :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--blue); }
  html[data-premium="true"][data-theme="dark"] :is(button, input, select, textarea, summary, a):focus-visible { outline-color: var(--link); }
  html[data-premium="true"][data-theme="dark"] #app-shell .sidebar.dat-sidebar { color: var(--ink); background: var(--navy); }
  html[data-premium="true"][data-theme="dark"] #app-shell .dat-sidebar :is(#nav-search, #nav-users):is(.active, :hover) { color: var(--ink); background: #2d323d; }
  html[data-premium="true"][data-theme="dark"] #app-shell .dat-sidebar #nav-search:not(.active):not(:hover) { background: transparent; }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.search-tabs-bar, .saved-search-tab) { background-color: var(--subtle); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.saved-search-tab.selected, .saved-search-button.selected, .draft-search-tab.selected) { color: var(--ink); background-color: var(--surface); border-bottom-color: var(--blue); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.search-tab-actions button, .search-tab-actions .search-tab-close, .new-search-button) { color: var(--muted); }
  html[data-premium="true"][data-theme="dark"] #app-shell .search-tab-actions button:hover { color: var(--ink); background-color: var(--hover); }
  html[data-premium="true"][data-theme="dark"] #app-shell #search-form::before { border-color: var(--line); background: var(--canvas); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.search-card input, .search-card select, .equipment-toggle, .pickup-dates, .company-input-wrap) { border-color: var(--border); }
  html[data-premium="true"][data-theme="dark"] #app-shell .equipment-control:not(.equipment-editing) .equipment-toggle { border-color: var(--border); }
  html[data-premium="true"][data-theme="dark"] #app-shell .location-field .input-icon-wrap:has(.location-chips:not([hidden])) { border-color: var(--border); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.location-field .input-icon-wrap:focus-within, .company-input-wrap:focus-within) { outline-color: var(--link); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.lane-swap, #standard-search-actions > summary, .equipment-toggle > span:last-child) { color: var(--link); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.filter-popover, .standard-search-popover, .equipment-picker, .suggestions) { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: 0 8px 26px #0007; }
  html[data-premium="true"][data-theme="dark"] #app-shell .dat-filter-menu .filter-popover { color: var(--ink); background: var(--surface); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.selection-chip, .equipment-chip) { color: #dce8ff; border-color: #536986; background: #2c3c52; }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.results-card, .results-controls, .results-heading, .results-toolbar, .loads-table thead, .loads-table th) { color: var(--ink); background-color: var(--surface); border-color: var(--line); }
  html[data-premium="true"][data-theme="dark"] #app-shell .loads-table tbody > tr:nth-child(odd) { background-color: var(--surface); }
  html[data-premium="true"][data-theme="dark"] #app-shell .loads-table tbody > tr:nth-child(even) { background-color: var(--stripe); }
  html[data-premium="true"][data-theme="dark"] #app-shell .loads-table tbody > tr:is(.selected, :hover, :focus-within) { background-color: var(--hover); }
  html[data-premium="true"][data-theme="dark"] #app-shell .loads-table tbody > tr.load-detail-row { background-color: var(--surface); }
  html[data-premium="true"][data-theme="dark"] #app-shell .loads-table th { color: var(--muted); }
  html[data-premium="true"][data-theme="dark"] #app-shell .loads-table td:not(:last-child) { background-image: linear-gradient(var(--line), var(--line)); }
  html[data-premium="true"][data-theme="dark"] #app-shell .loads-table :is(td:nth-child(3), td:nth-child(8), td:nth-child(9), .load-detail-row > td) { background-image: none; }
  html[data-premium="true"][data-theme="dark"] #app-shell .standard-row-select { border-color: var(--muted); }
  html[data-premium="true"][data-theme="dark"] #app-shell .standard-row-select[aria-pressed="true"] { border-color: var(--link); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.inline-load-details, .drawer-content, .users-create-card, .users-table-card) { color: var(--ink); background-color: var(--surface); border-color: var(--line); }
  html[data-premium="true"][data-theme="dark"] #app-shell :is(.detail-lane::before, .users-table th, .users-table td) { border-color: var(--line); }
  html[data-premium="true"][data-theme="dark"] #app-shell .detail-rating { color: #edc77a; }
  html[data-premium="true"][data-theme="dark"] #app-shell .detail-broker-column .detail-mark-menu > summary { color: var(--link); border-color: var(--link); }
  html[data-premium="true"][data-theme="dark"] #app-shell .inline-detail-topbar .sz-print-launch { color: var(--link); border-color: var(--link); }
  html[data-premium="true"][data-theme="dark"] #app-shell .inline-detail-topbar .sz-print-launch:hover { color: var(--link); background: var(--blue-pale); }
  html[data-premium="true"][data-theme="dark"] :is(.modal, .load-drawer, .login-history-dialog) { color: var(--ink); background: var(--surface); border-color: var(--line); }
  html[data-premium="true"][data-theme="dark"] :is(.modal h2, .modal h3, .login-history-dialog h2) { color: var(--ink); }
  html[data-premium="true"][data-theme="dark"] :is(.modal > p, .modal .field, .login-history-dialog p) { color: var(--muted); }
  html[data-premium="true"][data-theme="dark"] .date-parity-calendar { color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px #0008; }
  html[data-premium="true"][data-theme="dark"] :is(.date-parity-cell, .date-parity-period, .date-parity-nav) { color: var(--ink); }
  html[data-premium="true"][data-theme="dark"] :is(.date-parity-weekdays, .date-parity-month-label, .date-parity-period-label) { color: var(--muted); }
  html[data-premium="true"][data-theme="dark"] :is(.date-parity-cell, .date-parity-nav):disabled { color: #788394; }
  html[data-premium="true"][data-theme="dark"] :is(.date-parity-cell, .date-parity-nav, .date-parity-period):hover:not(:disabled) { background: var(--hover); }
  html[data-premium="true"][data-theme="dark"] .date-parity-cell.date-parity-in-range { background: var(--blue-pale); }
  html[data-premium="true"][data-theme="dark"] .date-parity-cell.date-parity-selected { color: #fff; background: var(--blue); }
  html[data-premium="true"][data-theme="dark"] .date-parity-cell.date-parity-today:not(.date-parity-selected) { box-shadow: inset 0 0 0 1px var(--link); }
  html[data-premium="true"][data-theme="dark"] .dat-sort-menu { border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 8px 26px #0007; }
  html[data-premium="true"][data-theme="dark"] .dat-sort-option:is(:hover, :focus-visible) { background: var(--hover); }
  html[data-premium="true"][data-theme="dark"] .dat-sort-option.selected { background: var(--blue-pale); }
  html[data-premium="true"][data-theme="dark"] .dat-sort-check { color: var(--link); }
  html[data-premium="true"][data-theme="dark"] dialog.sz-print-dialog { color-scheme: dark; color: var(--ink); background: var(--surface); }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog .sz-print-sheet { color: var(--ink); background: var(--canvas); border-color: var(--line); }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog :is(.sz-print-header h2, .sz-print-section-title, .sz-print-route strong, .sz-print-definition dd, .sz-print-credit dt) { color: var(--ink); }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog :is(.sz-print-definition dt, .sz-print-close) { color: var(--muted); }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog :is(.sz-print-email, .sz-print-review-count) { color: var(--link); }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog .sz-print-stars { color: #727b8b; }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog .sz-print-stars-fill { color: #edc77a; }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog .sz-print-button { color: var(--ink); background: var(--control); border-color: var(--border); }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog .sz-print-confirm { color: #fff; background: var(--blue); border-color: var(--blue); }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog .sz-print-confirm:hover { background: var(--blue-dark); }
  html[data-premium="true"][data-theme="dark"] .sz-print-dialog :is(.sz-print-close, .sz-print-back):hover { color: var(--ink); background: var(--hover); }
}

@media (max-width: 700px) {
  .premium-tools { justify-content: flex-start; gap: 7px; padding: 9px 12px; }
  .premium-time-popover { padding: 16px; }
  .premium-clock-grid { gap: 9px; }
  .premium-clock { padding: 12px 6px; }
  dialog.premium-cost-dialog { padding: 20px; }
  .premium-cost-summary { gap: 8px; }
  .premium-cost-summary > * { padding: 13px 10px; }
  .premium-cost-summary :is(strong, dd, output) { font-size: 21px; }
  .premium-cost-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .premium-rpm-filter { margin-inline: 12px; }
}
@media (max-width: 480px) {
  .premium-tools > :is(strong, .premium-tools-label) { flex-basis: 100%; }
  .premium-time-popover { padding: 14px; }
  .premium-clock-grid { grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); }
  dialog.premium-cost-dialog { padding: 18px; }
  .premium-cost-heading :is(h2, h3) { font-size: 20px; }
  .premium-cost-summary { grid-template-columns: 1fr; }
  .premium-cost-summary > * { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
  .premium-cost-summary > .premium-cost-line { display: flex; padding: 13px 10px; }
  .premium-cost-summary :is(strong, dd, output) { margin: 0; font-size: 22px; }
  .premium-cost-summary > .premium-cost-line strong { margin: 0; font-size: 22px; }
  .premium-cost-fields { gap: 14px 10px; }
  .premium-cost-line { gap: 12px; }
  .premium-rpm-filter > strong { flex-basis: 100%; }
  .premium-rpm-filter label { flex: 1 1 100px; }
  .premium-rpm-filter input { width: 100%; }
}
@media print {
  .premium-tools, .premium-rpm-filter, .premium-time-popover, .premium-cost-dialog { display: none !important; }
}

/* MOBILE_PRESENTATION_START */
/* Phone/tablet presentation. Desktop rules and saved desktop zoom are preserved. */
.mobile-header, .mobile-filter-toggle, .loads-table .mobile-contact { display:none; }
:root[data-board-layout] #app-shell .search-refresh-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:0 14px 10px; }
:root[data-board-layout] #app-shell .search-refresh-controls[hidden] { display:none; }
:root[data-board-layout] #app-shell .search-refresh-controls #refresh-search { position:static; display:inline-flex; width:auto; height:36px; min-height:36px; min-width:90px; margin:0; padding:6px 12px; font-size:12px; border:1px solid var(--line); border-radius:8px; }
:root[data-board-layout] #app-shell .search-refresh-controls #refresh-search::before { display:none; }
:root[data-board-layout] #app-shell .search-refresh-controls #auto-refresh-search { display:inline-flex; align-items:center; gap:8px; min-height:36px; padding:6px 12px; border:1px solid var(--line); border-radius:20px; color:var(--ink); background:var(--subtle); font-size:12px; }
:root[data-board-layout] #app-shell .search-refresh-controls #auto-refresh-search[aria-pressed="true"] { color:var(--link); background:var(--blue-pale); border-color:var(--link); }
:root[data-board-layout] #app-shell .search-refresh-controls #auto-refresh-search::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--muted); }
:root[data-board-layout] #app-shell .search-refresh-controls #auto-refresh-search[aria-pressed="true"]::before { background:var(--link); }
@media screen and (max-width:850px) {
  html { zoom:1!important; --board-zoom:1!important; }
  html, body { width:100%; min-width:0; margin:0; }
  body { -webkit-text-size-adjust:100%; }
  input, select, textarea { font-size:16px!important; }
  button, a, summary { touch-action:manipulation; }
  .auth-screen { display:block; min-height:100dvh; }
  .auth-story { min-height:0; padding:20px 24px; }
  .auth-brand { margin:0; }
  .auth-brand img { width:44px; height:44px; }
  .auth-story-content { padding:22px 0 0; }
  .auth-story h1 { font-size:30px; line-height:1.15; margin:8px 0; }
  .auth-story p, .auth-footnote, .auth-brand-rule { display:none; }
  .auth-panel { padding:26px 24px 36px; }
  .auth-card { width:100%; max-width:460px; margin:auto; }
  .auth-card form { margin-top:22px; }
  .auth-card label { font-size:14px; }
  .auth-card input, .auth-card button { min-height:48px; }
  .auth-card .remember-me { min-height:44px; font-size:14px; }
  .auth-card .remember-me input { min-height:24px; width:24px; height:24px; }
  .auth-note { font-size:12px; }
  :root[data-board-layout] {
    #app-shell { display:flex; flex-direction:column; width:100%; height:100dvh; min-height:0; overflow:hidden; }
    #app-shell[hidden] { display:none; }
    #app-shell .mobile-header { display:flex; flex:none; align-items:center; justify-content:space-between; min-height:56px; padding:6px 14px; padding-top:max(6px,env(safe-area-inset-top)); background:var(--navy,#192129); color:#fff; border-bottom:1px solid #3b4854; gap:12px; }
    #app-shell .mobile-header strong { font-size:17px; }
    #app-shell .mobile-header strong span { display:block; font-size:10px; font-weight:400; color:#c8d3e0; letter-spacing:1px; text-transform:uppercase; }
    #app-shell .mobile-header button { min-width:64px; min-height:44px; padding:8px 14px; border:1px solid #68788c; border-radius:8px; color:#fff; background:transparent; font-size:14px; }
    #app-shell .sidebar { display:none; position:absolute; top:64px; left:0; right:0; z-index:10050; width:100%; height:auto; max-height:calc(100dvh - 76px); overflow-y:auto; padding:12px; box-shadow:0 12px 30px #0005; }
    #app-shell.mobile-nav-open .sidebar { display:flex; flex-direction:column; gap:6px; }
    #app-shell .sidebar-brand, #app-shell .dat-sidebar-item:disabled, #app-shell .desktop-download { display:none; }
    #app-shell .dat-sidebar-navigation { display:flex; width:100%; flex:none; padding:0; margin:0; }
    #app-shell .dat-sidebar-item { width:100%; min-height:48px; height:auto; padding:10px 14px; font-size:14px; border-radius:6px; }
    #app-shell .dat-sidebar-item .dat-sidebar-label { display:block; }
    #app-shell .sidebar .dat-sidebar-icon { display:inline-flex; width:24px; height:24px; }
    #app-shell .sidebar-bottom { width:100%; margin:0; padding:0; }
    #app-shell .app-sidebar-utilities { display:block!important; }
    #app-shell .topbar { display:block!important; }
    #app-shell .topbar { width:100%; padding:10px; height:auto; }
    #app-shell .topbar-actions { width:100%; display:flex; gap:10px; flex-wrap:wrap; }
    #app-shell .topbar :is(button,select) { min-height:44px; font-size:14px; }
    #app-shell .zoom-controls { display:none; }
    #app-shell .account-menu { width:100%; min-height:52px; padding:4px 10px; }
    #app-shell .account-details { display:block; }
    #app-shell .account-menu .icon-button { width:48px; height:48px; }
    #app-shell .account-menu #logout { width:auto; min-width:80px; font-size:0; }
    #app-shell .account-menu #logout::before { content:'Sign out'; font-size:14px; }
    #app-shell .main-shell { width:100%; min-width:0; min-height:0; height:auto; flex:1; overflow:hidden; }
    #app-shell .page-content { padding:0; width:100%; min-width:0; max-width:none; }
    #app-shell #search-panel { height:100%; min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:auto; padding-bottom:env(safe-area-inset-bottom); }
    #app-shell .search-tabs-bar { width:100%; min-width:0; height:60px; min-height:60px; overflow:hidden; display:flex; gap:0; }
    #app-shell .saved-searches { flex:1 1 auto; width:auto; min-width:0; height:60px; max-height:none; min-height:60px; overflow:auto; flex-wrap:nowrap; order:0; }
    #app-shell .saved-search-tab { flex:0 0 250px; height:60px; }
    #app-shell .saved-search-tab .saved-search-button { height:58px; min-height:58px; min-width:0; padding:6px 10px; }
    #app-shell .saved-search-copy strong { font-size:13px!important; max-width:150px!important; line-height:18px; }
    #app-shell .search-tab-actions { padding:0; gap:0; }
    #app-shell .search-tab-actions button, #app-shell #saved-searches .search-tab-actions .search-tab-bell { min-width:36px; width:36px; height:48px; }
    #app-shell #draft-search-tab { min-width:0; flex:1 1 auto; height:60px; }
    #app-shell .new-search-button { flex:0 0 46px; width:46px; height:48px; margin:6px 4px; }
    #app-shell .search-card { margin:8px 10px!important; padding:0!important; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
    #app-shell .mobile-filter-toggle { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:48px; padding:10px 14px; border:0; border-radius:9px; background:var(--surface); color:var(--link); font-size:14px; font-weight:600; text-align:left; }
    #app-shell .mobile-filter-toggle::after { content:'−'; font-size:20px; }
    #app-shell .mobile-filter-toggle[aria-expanded="false"]::after { content:'+'; }
    #app-shell .mobile-filters-collapsed #search-form { display:none; }
    #app-shell .mobile-filters-collapsed ~ .premium-rpm-filter { display:none!important; }
    #app-shell #search-form { padding:12px; }
    #app-shell #search-form::before { display:none; }
    #app-shell #search-form .search-top-grid { display:grid; grid-template-columns:minmax(0,1fr) 78px; gap:20px 10px; height:auto; padding-top:32px; }
    #app-shell #search-form .search-top-grid .location-field { margin:0; }
    #app-shell #search-form .lane-swap { position:absolute; top:-8px; right:0; width:48px; height:40px; min-height:40px; }
    #app-shell #search-form .lane-swap { font-size:0!important; }
    #app-shell #search-form .lane-swap::before { content:'⇄'; font-size:24px; }
    #app-shell #search-form .search-equipment-grid { display:grid; grid-template-columns:1fr 1fr; height:auto; gap:20px 10px; margin-top:20px; }
    #app-shell #search-form .equipment-field { grid-column:1 / -1; }
    #app-shell #search-form .search-bottom-grid { display:grid; grid-template-columns:minmax(0,1fr) 48px; height:auto; gap:20px 10px; margin-top:20px; }
    #app-shell #search-form .search-bottom-grid > .field { grid-column:1 / -1; grid-row:auto; }
    #app-shell #search-form .pickup-dates { grid-column:1 / -1; grid-row:auto; min-width:0; width:100%; height:48px; }
    #app-shell #search-form .search-submit { grid-column:1; grid-row:auto; min-width:0; width:100%; height:48px; font-size:15px; }
    #app-shell #search-form .search-bottom-grid > #standard-search-actions { grid-column:2; grid-row:auto; height:48px; }
    #app-shell #standard-search-actions > summary { position:static; width:48px; height:48px; }
    #app-shell .search-card :is(input,select,.equipment-toggle) { min-height:48px; height:48px; font-size:16px; }
    #app-shell .equipment-control, #app-shell .equipment-control .equipment-toggle { min-height:48px!important; height:auto!important; }
    #app-shell .search-card .field-caption, #app-shell #equipment-label, #app-shell .search-card .label-row label { visibility:visible!important; display:inline; font-size:12px; background:var(--surface); }
    #app-shell .search-card .pickup-dates input { min-width:0; padding:0 6px; }
    #app-shell .clear-input { width:36px; height:44px; font-size:0!important; }
    #app-shell .clear-input::before { content:'×'; font-size:22px; }
    #app-shell .filter-menu-bar { display:flex; flex-wrap:wrap; padding:12px 0 0; margin:0; gap:8px; }
    #app-shell .filter-menu { position:relative; flex:1 1 calc(50% - 8px); min-width:0; }
    #app-shell .filter-menu > summary { min-height:44px; height:auto; padding:8px; font-size:12px; white-space:normal; border:1px solid var(--line); border-radius:6px; }
    #app-shell .filter-popover, #app-shell .equipment-picker, #app-shell .standard-search-popover { position:fixed!important; inset:auto 10px 10px!important; width:auto!important; min-width:0!important; max-width:none!important; max-height:calc(100dvh - 90px); overflow-y:auto; overscroll-behavior:contain; padding:16px; z-index:10030; box-shadow:0 0 0 100vmax #0005,0 -8px 40px #0003; border-radius:14px; }
    #app-shell .filter-popover :is(button,summary), #app-shell .equipment-picker button { min-height:44px; font-size:14px; }
    #app-shell .equipment-options { max-height:38dvh; }
    #app-shell .equipment-option { min-height:44px; font-size:14px; }
    #app-shell .suggestions { max-width:100%; width:100%; min-width:0; max-height:40dvh; overflow:auto; }
    #app-shell .suggestion-option, #app-shell [role="option"] { min-height:44px; white-space:normal; }
    #app-shell .results-card { flex:1 0 auto; min-width:0; margin:0; border:0; border-radius:0; }
    #app-shell .results-controls { padding:0 12px; }
    #app-shell .results-heading { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 0; }
    #app-shell .results-heading > div:first-of-type { padding-left:0; margin-left:0; }
    #app-shell .search-refresh-controls { padding:0 0 8px; }
    #app-shell .search-refresh-controls :is(#refresh-search,#auto-refresh-search) { min-height:44px; height:44px; }
    #app-shell .results-heading > div { min-width:0; flex:1 1 auto; }
    #app-shell .results-title-row { display:flex; flex-wrap:wrap; gap:8px; }
    #app-shell .results-title-row h2 { font-size:15px; }
    #app-shell #result-subtitle { font-size:12px; line-height:18px; }
    #app-shell .results-heading #refresh-search { position:static; flex:0 0 44px; min-width:44px; height:44px; margin:0; }
    #app-shell .results-heading > div:first-of-type { flex:1; }
    #app-shell #sort-results-trigger { min-height:44px; }
    #app-shell .sort-label { margin-left:auto; min-width:0; }
    #app-shell #sort-results { width:auto; max-width:100%; min-height:44px; font-size:14px!important; }
    #app-shell .table-tabs { display:flex; min-height:44px; flex-wrap:wrap; gap:8px; }
    #app-shell .table-tab { min-height:44px; font-size:13px; white-space:normal; }
    #app-shell .results-toolbar, #app-shell .table-tools { min-width:0; width:100%; flex-wrap:wrap; padding:0; }
    #app-shell .table-filter { width:100%; min-width:0; }
    #app-shell .result-actions { width:100%; flex-wrap:wrap; margin:0; }
    #app-shell .result-actions button { min-height:44px; }
    #app-shell .result-selection-toolbar { flex-wrap:wrap; min-height:44px; gap:8px; padding:8px 12px; }
    #app-shell .result-selection-toolbar button { min-height:44px; font-size:12px; }
    #app-shell #results-table-wrap { flex:none; width:100%; height:65dvh; min-height:300px; max-height:none; overflow:auto; scrollbar-gutter:auto; padding:8px; background:var(--canvas); }
    #app-shell #search-panel:has(.mobile-filters-collapsed) { overflow:hidden; }
    #app-shell #search-panel:has(.mobile-filters-collapsed) .results-card { flex:1; min-height:0; }
    #app-shell #search-panel:has(.mobile-filters-collapsed) #results-table-wrap { flex:1; height:auto; min-height:100px; }
    #app-shell .loads-table { display:block; width:100%; min-width:0; max-width:none; table-layout:auto; border:0; }
    #app-shell .loads-table thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); }
    #app-shell #loads-body { display:block; width:100%; }
    #app-shell #loads-body > tr:not(.virtual-spacer):not(.load-detail-row):not(.similar-results-separator) { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 12px; width:100%; padding:14px; border:1px solid var(--line); border-bottom:10px solid var(--canvas); border-radius:12px; background:var(--surface); color:var(--ink); }
    #app-shell #loads-body > tr.selected { border-color:var(--link); border-bottom-color:var(--canvas); }
    #app-shell #loads-body > tr > td { display:block; width:auto; min-width:0; max-width:none; height:auto; padding:0; border:0; text-align:left; font-size:14px; line-height:20px; white-space:normal; overflow-wrap:anywhere; }
    #app-shell #loads-body > tr > td::after { display:none; }
    #app-shell #loads-body > tr > td[data-mobile-label]::before { content:attr(data-mobile-label); display:block; color:var(--muted); font-size:10px; line-height:15px; font-weight:400; letter-spacing:.3px; }
    #app-shell #loads-body .age-cell { grid-column:1; grid-row:1; display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
    #app-shell #loads-body .age-cell::before { flex-basis:100%; }
    #app-shell .loads-table .standard-row-select { width:28px!important; height:28px!important; min-width:28px!important; min-height:28px!important; margin:0; }
    #app-shell #loads-body .rate-cell { grid-column:2; grid-row:1; text-align:right; }
    #app-shell .rate-main { display:block; width:auto; font-size:23px!important; line-height:28px; }
    #app-shell .rate-secondary { display:block; font-size:12px!important; }
    #app-shell .rate-factoring-slot { display:none; }
    #app-shell #loads-body :is(.origin-cell,.destination-cell,.lane-cell) { grid-column:1 / -1; }
    #app-shell #loads-body .origin-cell { grid-row:2; }
    #app-shell #loads-body .destination-cell { grid-row:3; }
    #app-shell .location-copy strong { display:block; white-space:normal; overflow:visible; max-width:none; font-size:17px!important; line-height:23px; }
    #app-shell .location-copy small:empty { display:none; }
    #app-shell .destination-route { display:flex; gap:7px; }
    #app-shell .destination-route svg { flex:0 0 18px; }
    #app-shell .lane-copy { flex-wrap:wrap; }
    #app-shell #loads-body .trip-cell { grid-column:1; grid-row:4; }
    #app-shell #loads-body .pickup-cell { grid-column:2; grid-row:4; }
    #app-shell #loads-body .equipment-cell { grid-column:1 / -1; grid-row:5; }
    #app-shell .standard-equipment { display:flex; gap:12px; font-size:14px; }
    #app-shell .standard-equipment > span:last-child { display:flex; gap:8px; flex-wrap:wrap; }
    #app-shell .standard-equipment :is(strong,small) { font-size:12px; line-height:20px; }
    #app-shell #loads-body .company-cell { grid-column:1 / -1; grid-row:6; }
    #app-shell .broker-main { font-size:14px; white-space:normal; overflow:visible; max-width:none; }
    #app-shell #loads-body .contact-cell { grid-column:1 / -1; grid-row:7; }
    #app-shell .contact-content { display:flex; gap:8px; width:100%; }
    #app-shell .loads-table .contact-value.contact-launch-action { display:flex; align-items:center; min-height:44px; height:auto; flex:1; min-width:0; padding:8px 10px; background:var(--blue-pale); color:var(--link); border-radius:7px; font-size:14px; white-space:normal; }
    #app-shell .loads-table .contact-email-action:not([hidden]) { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border-radius:7px; background:var(--blue-pale); color:var(--link); }
    #app-shell #loads-body .deadhead-cell { grid-column:1; grid-row:8; }
    #app-shell #loads-body .destination-deadhead-cell { grid-column:2; grid-row:8; }
    #app-shell #loads-body .credit-cell { grid-column:1; grid-row:9; font-size:11px; }
    #app-shell #loads-body .credit-cell span { display:inline; margin-right:6px; font-size:11px; }
    #app-shell #loads-body .more-cell { grid-column:2; grid-row:9; align-self:end; }
    #app-shell .row-open { display:block; width:100%; min-height:44px; border:1px solid var(--link); border-radius:7px; color:var(--link); font-size:0; background:transparent; }
    #app-shell .row-open::before { content:'Details'; font-size:14px; font-weight:600; }
    #app-shell .row-open[aria-expanded="true"]::before { content:'Close details'; }
    #app-shell .virtual-spacer { display:block; }
    #app-shell #loads-body > .virtual-spacer > td { display:block; height:var(--virtual-height)!important; padding:0!important; border:0!important; }
    #app-shell #loads-body > .load-detail-row { display:block; width:100%; }
    #app-shell #loads-body > .load-detail-row > td { display:block; width:100%; padding:0 0 10px; }
    #app-shell .inline-load-details { width:100%; min-width:0; border:1px solid var(--link); border-radius:10px; }
    #app-shell .inline-detail-topbar, #app-shell .inline-detail-topbar:has(.sz-print-launch) { position:static; display:flex; justify-content:flex-end; flex-wrap:wrap; height:auto; min-height:52px; gap:8px; padding:8px; }
    #app-shell .inline-detail-topbar :is(button,.icon-button) { min-height:44px!important; height:44px!important; min-width:44px; font-size:13px; }
    #app-shell .inline-detail-topbar [data-detail-field="close-load-details"] { font-size:0; }
    #app-shell .inline-detail-topbar [data-detail-field="close-load-details"]::before { content:'×'; font-size:25px; }
    #app-shell .inline-detail-content { display:flex; flex-direction:column; padding:14px; gap:20px; min-width:0; }
    #app-shell .inline-load-details .detail-headline { margin:0!important; min-height:0!important; width:100%; }
    #app-shell .detail-headline h2 { font-size:18px; line-height:25px; }
    #app-shell .inline-detail-content > * { width:100%; min-width:0; max-width:none; margin:0; }
    #app-shell .detail-rate-column { order:-1; }
    #app-shell .detail-headline { order:-2; }
    #app-shell .detail-specs { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #app-shell .detail-lane, #app-shell .detail-specs, #app-shell .detail-contact-section { font-size:14px; }
    #app-shell .detail-contact-value { min-height:44px; padding-block:10px; }
    #app-shell .detail-mark-menu > summary, #app-shell .detail-dispatch-actions button { min-height:44px; height:auto; font-size:13px; }
    #app-shell .detail-mark-actions { position:static; width:100%; }
    #app-shell .detail-mark-actions button { width:100%; }
    #app-shell .similar-results-separator { display:block; }
    #app-shell .similar-section-bar { display:flex; flex-wrap:wrap; padding:12px; gap:8px; }
    #app-shell .results-footer { gap:2px 8px; padding:8px 12px; font-size:10px; line-height:16px; }
    #app-shell .results-footer button { min-height:44px; }
    #app-shell .workspace-footer { display:none; }
    #app-shell #users-panel { overflow:auto; height:100%; padding:16px 12px; }
    #app-shell .page-heading { flex-wrap:wrap; gap:8px; }
    #app-shell .page-heading h1 { font-size:26px; }
    #app-shell .create-user-grid { grid-template-columns:minmax(0,1fr); }
    #app-shell #users-panel :is(input,select,button) { min-height:44px; }
    #app-shell .users-table-wrap { overflow:visible; }
    #app-shell #users-panel .users-table { display:block; min-width:0; width:100%; }
    #app-shell .users-table thead { display:none; }
    #app-shell .users-table tbody { display:block; }
    #app-shell .users-table tbody tr { display:grid; grid-template-columns:minmax(0,1fr); padding:14px; border-bottom:1px solid var(--line); }
    #app-shell .users-table tbody td { display:block; width:100%; min-width:0!important; padding:7px 0; white-space:normal; overflow-wrap:anywhere; }
    #app-shell .users-table td[data-mobile-label]::before { content:attr(data-mobile-label); display:block; font-size:11px; color:var(--muted); margin-bottom:3px; }
    #app-shell .user-actions { display:flex; flex-wrap:wrap; gap:8px; }
    #app-shell .premium-tools-host { margin:0 10px; }
    #app-shell .premium-rpm-filter { margin:8px 10px; flex-wrap:wrap; padding:12px; }
    #app-shell .premium-rpm-filter label { flex:1 1 110px; min-width:0; }
    #app-shell .premium-rpm-filter input { width:100%; min-height:44px; }
    #app-shell .premium-rpm-filter button { min-height:44px; }
    #app-shell .premium-rpm-separator { display:none; }
    #app-shell .premium-tools-host button { min-height:44px; }
  }
  .date-parity-calendar { left:10px!important; right:10px!important; top:auto!important; bottom:10px!important; width:auto!important; max-width:none!important; max-height:calc(100dvh - 20px); overflow:auto; }
  .date-parity-calendar button { min-height:40px; }
  .premium-time-popover { z-index:10060; top:70px; max-height:calc(100dvh - 84px); }
  .modal, dialog.sz-print-dialog { width:calc(100vw - 20px); max-width:calc(100vw - 20px); max-height:calc(100dvh - 20px); margin:auto; }
  .modal-content { padding:28px 18px 20px; }
  .modal :is(input,select,button) { min-height:44px; }
  .modal .icon-button { min-width:44px; }
  .toast-region { left:12px; right:12px; bottom:max(12px,env(safe-area-inset-bottom)); max-width:none; }
  .toast { width:100%; max-width:none; font-size:13px; }
}
@media screen and (max-width:850px) and (max-height:500px) {
  .auth-story { display:none; }
  :root[data-board-layout] #app-shell .mobile-header { min-height:48px; }
  :root[data-board-layout] #app-shell #search-panel:has(.mobile-filters-collapsed) { overflow-y:auto; }
  :root[data-board-layout] #app-shell #search-panel:has(.mobile-filters-collapsed) .results-card { flex:none; min-height:0; }
  :root[data-board-layout] #app-shell #search-panel:has(.mobile-filters-collapsed) #results-table-wrap { flex:none; height:calc(100dvh - 64px); min-height:220px; }
}

/* MOBILE_PRESENTATION_END */

/* ACCOUNT_LIFECYCLE_START: also applies to the mobile account cards. */
.users-table .account-first-use { min-width: 145px; white-space: normal; }
.users-table .account-first-use .account-secondary,
.users-table .account-billing .account-secondary { line-height: 1.45; white-space: normal; }
.users-table .account-renew-payment { min-height: 44px; min-width: 44px; white-space: normal; }
.users-table .account-reminder-attention { font-weight: 700; color: var(--danger, #b42318); }
#account-payment-help { line-height: 1.5; }
/* ACCOUNT_LIFECYCLE_END */
