/* Hala Billing – Rack design system, v2 of the UI (docs/ui/rack/RACK_BUILD_INSTRUCTIONS.md §1–§3).
   One place for the tokens: use only these values. Light only; no gradients, no dark theme; Excel exports keep their
   own format. Bootstrap 5.3 (vendored) stays for the grid, dialogs and dropdowns, mapped onto the tokens below. */

/* ------------------------------------------------------------------ fonts (self-hosted Barlow and Barlow Condensed, OFL) */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/barlow-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/barlow-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/barlow-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/barlow-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/barlow-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/barlow-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/barlow-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/barlow-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* ------------------------------------------------------------------ tokens */
:root {
  --page: #F1F3F5;
  --panel: #FFFFFF;
  --raised: #F6F8FA;
  --line: #D9DEE4;
  --line-2: #C3CAD2;
  --grid: #E6EAEE;
  --ink: #0D2137;
  --ink-2: #4A5B6D;
  --ink-3: #5B6B7C;
  --rail: #0D2137;
  --rail-deep: #081A2E;
  --rail-text: #B8C5D2;
  --orange: #F26A1B;
  --orange-text: #B8430A;
  --orange-text-hover: #8A3208;
  --orange-soft: #FFA56B;
  --orange-track: #FBD9C4;
  --orange-tint: #FFF1E7;
  --dry: #F26A1B;
  --temp: #2A6FC9;
  --upright: #1D4E89;
  --beam: #F7B48A;
  --in: #0D2137;
  --out: #7C8FA3;
  --band: rgba(13, 33, 55, .045);
  --good: #177245;
  --warn: #946300;
  --warn-icon: #C98A00;
  --crit: #B93A32;
  --good-bg: #E8F3EC;
  --warn-bg: #FBF3DF;
  --crit-bg: #F8E9E8;
  --avatar: #12304F;
  --avatar-line: #33506E;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Barlow", "Arial Narrow", sans-serif;
  --r-panel: 6px; --r-ctl: 4px; --r-well: 6px; --r-pill: 4px; --r-plate: 3px;
  --gap: 24px; --pad-x: 36px; --rail-w: 88px; --topbar-h: 60px; --tabbar-h: 56px;
  --scrim: rgba(13, 33, 55, .55);
  --shadow-tip: 0 8px 24px rgba(13, 33, 55, .16);
  --shadow-dialog: 0 16px 40px rgba(13, 33, 55, .18);
  --ease: 180ms ease-out;
  --orange-hover: #FF8A4A;   /* hover fill of orange buttons (ink text stays ≥ 4.5:1) */
}
@media (max-width: 767.98px) { :root { --gap: 16px; --pad-x: 20px; } }

/* Bootstrap mapped onto the tokens (light) */
[data-bs-theme=light] {
  color-scheme: light;
  --bs-body-bg: var(--page); --bs-body-bg-rgb: 241, 243, 245;
  --bs-body-color: var(--ink); --bs-body-color-rgb: 13, 33, 55;
  --bs-secondary-color: var(--ink-2); --bs-tertiary-color: var(--ink-3);
  --bs-secondary-bg: var(--raised); --bs-tertiary-bg: var(--raised);
  --bs-emphasis-color: var(--ink);
  --bs-border-color: var(--line); --bs-border-color-translucent: var(--line);
  --bs-border-radius: var(--r-ctl); --bs-border-radius-lg: var(--r-panel);
  --bs-link-color: var(--orange-text); --bs-link-color-rgb: 184, 67, 10;
  --bs-link-hover-color: var(--orange-text-hover); --bs-link-hover-color-rgb: 138, 50, 8;
  --bs-primary: var(--orange); --bs-primary-rgb: 242, 106, 27;
  --bs-heading-color: var(--ink);
  --bs-font-sans-serif: var(--font);
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 14px;
  --bs-focus-ring-color: rgba(242, 106, 27, .5);
  --bs-form-valid-color: var(--good); --bs-form-invalid-color: var(--crit); --bs-form-invalid-border-color: var(--crit);
}

/* ------------------------------------------------------------------ base */
html, body { background: var(--page); }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink);
  -webkit-font-smoothing: antialiased; }
a { color: var(--orange-text); }
a:hover { color: var(--orange-text-hover); }
:focus-visible { outline: 2px solid var(--orange) !important; outline-offset: 2px; box-shadow: none; }
::selection { background: var(--orange-track); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); letter-spacing: 0; }
.content h1, .page-title { font-family: var(--cond); font-size: 32px; font-weight: 700; line-height: 1.05; letter-spacing: .005em; margin: 0; }
.content h2 { font-size: 17px; font-weight: 600; margin: 28px 0 12px; }
.content h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
.h5, .h6, h5, h6 { font-size: 14px; font-weight: 600; }
.muted, .text-muted { color: var(--ink-3) !important; }
small, .small { font-size: 13px; }
code { color: var(--orange-text); }
hr { border-color: var(--line); opacity: 1; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.fig, .code { font-family: var(--cond); }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; background: var(--orange); color: var(--ink);
  padding: 10px 16px; border-radius: var(--r-ctl); font-weight: 700; }
.skip-link:focus { left: 12px; top: 12px; color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
.ico { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ shell (§2): navy left rail on desktop and tablet */
.shell { display: flex; min-height: 100vh; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad-x); box-sizing: border-box; }
.shell { align-items: stretch; }
/* the navy rail runs the full page height (min-height 100vh, stretched with the page); its contents stay in view (sticky) */
.rail { flex: none; width: var(--rail-w); background: var(--rail); align-self: stretch; min-height: 100vh; z-index: 1020; }
.rail-inner { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 18px 0; box-sizing: border-box; }
.rail-mark { width: var(--rail-w); padding: 6px 0 18px; text-align: center; text-decoration: none; color: #FFFFFF;
  font-size: 15px; font-weight: 700; letter-spacing: .14em; }
.rail-mark:hover { color: #FFFFFF; }
.rail-mark img { max-width: 64px; max-height: 40px; display: block; margin: 0 auto; }
.main-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: var(--rail-w); padding: 8px 0;
  text-decoration: none; color: var(--rail-text); font-size: 12px; font-weight: 500; line-height: 1.2; }
.rail-tile { width: 44px; height: 44px; border-radius: var(--r-well); display: flex; align-items: center; justify-content: center; }
.rail-item:hover { color: #FFFFFF; }
.rail-item:hover .rail-tile { background: rgba(184, 197, 210, .12); }
.rail-item[aria-current], .rail-item.active { color: #FFFFFF; font-weight: 600; }
.rail-item[aria-current] .rail-tile, .rail-item.active .rail-tile { background: var(--orange); color: var(--rail); }
.rail-item[aria-current] .ico, .rail-item.active .ico { stroke-width: 2; }
.rail-item:focus-visible { outline: none !important; }
.rail-item:focus-visible .rail-tile { outline: 2px solid var(--orange); outline-offset: 2px; }
.rail-item[aria-current]:focus-visible .rail-tile { outline-color: #FFFFFF; }
.rail-end { margin-top: auto; padding-top: 16px; }
.rail .dropdown-menu { margin-left: 8px !important; }

.avatar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--avatar-line); background: var(--avatar); color: #FFFFFF;
  font: 600 14px var(--font); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.avatar:hover { border-color: var(--rail-text); }
.avatar:focus-visible { outline-color: #FFFFFF !important; }
.user-menu { min-width: 220px; }
.user-menu .user-name { display: block; font-weight: 600; color: var(--ink); }
.user-menu .user-role { display: block; font-size: 13px; color: var(--ink-3); }
.user-menu .who { margin: 0; }
.user-menu .who button { width: 100%; text-align: left; }

/* phone top bar (hidden on desktop) */
.topbar { display: none; }
.wordmark { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: #FFFFFF; }
.wordmark:hover { color: #FFFFFF; }
.wordmark-hala { font-size: 18px; font-weight: 700; letter-spacing: .14em; }
.wordmark-sub { font-size: 15px; font-weight: 600; color: var(--orange-soft); }
.brand-logo { max-height: 36px; max-width: 160px; display: block; }

.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* page header (§2): breadcrumb or date, title, then freshness pill and actions on the right */
.shell-head { padding: 0; margin-bottom: var(--gap); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.shell-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shell-head .page-title { font-family: var(--cond); font-size: 32px; font-weight: 700; line-height: 1.05; letter-spacing: .005em; margin: 0; color: var(--ink); }
.shell-head.is-home .page-title { font-size: 40px; }
.shell-head-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; }
.shell-head-bare { align-items: center; }
.fresh-pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--panel); font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.fresh-pill[data-tone=green] .ico { color: var(--good); }
.fresh-pill[data-tone=amber] .ico { color: var(--warn-icon); }
.fresh-pill[data-tone=red] .ico { color: var(--crit); }
.fresh-pill[data-tone=grey] .ico { color: var(--ink-3); }
.fresh-line { display: none; margin: 0; font-size: 14px; color: var(--ink-2); }

/* group sub-navigation: tabs, 3 px orange bar under the active one */
.sub-nav { margin: calc(var(--gap) * -0.5) 0 var(--gap); border-bottom: 1px solid var(--line); }
.sub-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 24px; overflow-x: auto; scrollbar-width: thin; }
.sub-nav a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; color: var(--ink-2); text-decoration: none;
  font-size: 14px; font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sub-nav a:hover { color: var(--ink); }
.sub-nav a[aria-current], .sub-nav a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--orange); }
.sub-nav .nav-sub-row { gap: 4px 18px; border-top: 1px solid var(--line); }
.sub-nav .nav-sub-row a { min-height: 40px; font-size: 13px; }

.content { outline: none; padding: 28px var(--pad-x) 48px; width: 100%; max-width: 1512px; box-sizing: border-box; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin-bottom: var(--gap); }
.page-head-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.page-help { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 72rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--ink-3); --bs-breadcrumb-item-active-color: var(--ink-2);
  margin: 0; font-size: 14px; color: var(--ink-2); }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.shell-date { font-size: 14px; color: var(--ink-2); }

/* phone (< 768 px): top bar, bottom tab bar, no rail */
.tabbar { display: none; }
.tabbar-more { display: none; }
@media (max-width: 767.98px) {
  .shell { display: block; }
  .rail { display: none; }
  .topbar { display: block; position: sticky; top: 0; z-index: 1020; background: var(--rail-deep); }
  .topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--topbar-h); }
  .content { padding-top: 20px; }
  .shell-head .fresh-pill { display: none; }
  .fresh-line { display: block; }
  .shell-head.is-home .page-title { font-size: 30px; }
  .shell-head .page-title { font-size: 28px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: var(--rail); padding: 0 4px env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: var(--tabbar-h); color: var(--rail-text); text-decoration: none; font: 500 12px var(--font); background: none; border: 0; }
  .tabbar [aria-current], .tabbar .active { color: #FFFFFF; font-weight: 600; }
  .tabbar [aria-current] .ico, .tabbar .active .ico { color: var(--orange); stroke-width: 2; }
  .tabbar a:focus-visible, .tabbar button:focus-visible { outline-color: #FFFFFF !important; outline-offset: -4px; }
  .tabbar-more:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 1029;
    background: var(--panel); border-top: 1px solid var(--line); box-shadow: var(--shadow-dialog); padding: 8px var(--pad-x) 12px; }
  .tabbar-more a { display: flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
  .tabbar-more h2 { font-size: 13px; color: var(--ink-3); font-weight: 500; margin: 12px 0 0; }
  .content { padding-bottom: calc(var(--tabbar-h) + 40px); }
}


/* ------------------------------------------------------------------ panels, cards */
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); color: var(--ink); box-shadow: none; }
.panel { padding: 24px; margin-bottom: var(--gap); min-width: 0; }
.card { --bs-card-bg: var(--panel); --bs-card-border-color: var(--line); --bs-card-border-radius: var(--r-panel);
  --bs-card-inner-border-radius: 5px; --bs-card-spacer-y: 20px; --bs-card-spacer-x: 20px; --bs-card-color: var(--ink); }
.panel > h2:first-child, .panel > h3:first-child, .panel-head h2 { margin-top: 0; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.panel-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.panel-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.panel-tools { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; font-size: 13px; color: var(--ink-2); }
.grid-2 { display: flex; flex-wrap: wrap; gap: var(--gap); margin-bottom: var(--gap); }
.grid-2 > .panel { margin-bottom: 0; }
.grid-2 > .wide { flex: 2 1 560px; } .grid-2 > .narrow { flex: 1 1 340px; }
.hero { background: var(--panel); }

/* legend swatches */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.sw-dry { background: var(--dry); } .sw-temp { background: var(--temp); } .sw-in { background: var(--in); }
.sw-out { background: var(--out); } .sw-other { background: var(--ink-3); }

.kpi-sub { font-size: 13px; line-height: 1.45; color: var(--ink-3); }

/* ------------------------------------------------------------------ status badges */
.badge, .status { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); padding: 3px 10px 3px 8px;
  font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.badge .ico, .status .ico { width: 16px; height: 16px; }
.badge-green { background: var(--good-bg); color: var(--good); }
.badge-amber { background: var(--warn-bg); color: var(--warn); }
.badge-red { background: var(--crit-bg); color: var(--crit); }   /* lighter step of --crit: 4.5:1 even on a red row */
.badge-grey { background: var(--raised); color: var(--ink-2); }
.badge-model { background: var(--raised); color: var(--ink); border: 1px solid var(--line, currentColor); }   /* billing model pills: 3PL / 2PL / Transport */
.tag { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-pill); padding: 2px 10px; font-size: 13px;
  font-weight: 500; white-space: nowrap; }
.flag { color: var(--warn); }
.error, b.failed { color: var(--crit); }
p.warn, div.warn, li.warn, label.warn, p.failed, div.failed, li.failed, p.ok {
  border-radius: var(--r-ctl); padding: 12px 16px; border: 1px solid; }
p.warn, div.warn, li.warn, label.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-icon); }
p.failed, div.failed, li.failed { background: var(--crit-bg); color: var(--crit); border-color: var(--crit); }
p.ok { background: var(--good-bg); color: var(--good); border-color: var(--good); }

/* ------------------------------------------------------------------ "needs attention" rows */
.attn { list-style: none; margin: 0; padding: 0; }
.attn-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 20px; align-items: center; gap: 14px; padding: 14px 0;
  border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 44px; }
.attn-row:hover { color: var(--ink); background: var(--raised); }
.attn-well { width: 36px; height: 36px; border-radius: var(--r-well); background: var(--raised); display: flex; align-items: center;
  justify-content: center; color: var(--ink-2); }
.attn-well[data-tone=green] { color: var(--good); } .attn-well[data-tone=amber] { color: var(--warn); }
.attn-well[data-tone=red] { color: var(--crit); }
.attn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.attn-title { font-size: 14px; font-weight: 500; line-height: 1.35; }
.attn-sub { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.attn-row > .ico:last-child { color: var(--ink-3); }

/* ------------------------------------------------------------------ stepper (month close) */
.stepper { list-style: none; margin: 0 0 var(--gap); padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 14px 12px; counter-reset: step; }
.stepper li { display: flex; gap: 12px; align-items: flex-start; position: static; padding: 0; background: none; border: 0; min-height: 0;
  box-shadow: none; color: var(--ink-2); font-size: 14px; font-weight: 400; }
.stepper li::before { counter-increment: step; content: counter(step); position: static; transform: none; flex: none; width: 28px; height: 28px;
  border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--ink-3); box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; }
.stepper li.current { color: var(--ink); background: none; box-shadow: none; }
.stepper li.current::before { background: var(--orange); border-color: var(--orange); color: var(--page); font-weight: 700; }
.stepper li.done::before { content: "✓"; border-color: var(--good); color: var(--good); background: transparent; }
.stepper li.blocked::before { content: "!"; border-color: var(--crit); color: var(--crit); background: transparent; }
.stepper .step-body { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; min-width: 0; }
.stepper .step-name { display: block; font-weight: 500; }
.stepper li.current .step-name { font-weight: 600; }
.stepper .step-state, .stepper small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; font-weight: 400; }
.stepper a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------------ tables */
.content table { width: 100%; background: var(--panel); color: var(--ink); border-collapse: separate; border-spacing: 0; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: var(--gap); overflow: hidden; }
.content table th, .content table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle;
  background: transparent; color: inherit; }
.content table thead th { background: var(--panel); color: var(--ink-3); font-size: 13px; font-weight: 500; position: sticky;
  top: var(--topbar-h); z-index: 2; white-space: nowrap; }
.content table tbody tr { height: 44px; }
.content table tbody tr:hover td, .content table tbody tr:hover th { background: var(--raised); }
.content table tbody tr:last-child td, .content table tbody tr:last-child th { border-bottom: 0; }
.content table.kv th { width: 14rem; color: var(--ink-2); font-weight: 500; position: static; white-space: normal; background: transparent; }
.content table tr.red td, .content table tr.red th, .content table tr.removed td { background: var(--crit-bg) !important; }
.content table tr.warn td, .content table tr.flag td, .content table tr.changed td { background: var(--warn-bg) !important; }
.content table tr.added td { background: var(--good-bg) !important; }
.content table td.diff { font-weight: 600; color: var(--warn); }
.content table td.side-b, .content table th.side-b { border-left: 2px solid var(--line-2); }
td.num, th.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; max-width: 100%; border-radius: var(--r-panel); margin-bottom: var(--gap); max-height: 75vh;
  border: 1px solid var(--line); background: var(--panel); }
.table-wrap > table { margin-bottom: 0; border: 0; border-radius: 0; }
.table-wrap table thead th { top: 0; }
.th-sort { cursor: pointer; user-select: none; }
.th-sort::after { content: " ↕"; color: var(--ink-3); font-size: .75em; }
.th-sort[aria-sort=ascending]::after { content: " ▲"; color: var(--orange-text); }
.th-sort[aria-sort=descending]::after { content: " ▼"; color: var(--orange-text); }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 12px; }
.table-tools .tt-search { width: 280px; max-width: 100%; }
.table-tools .tt-spacer { flex: 1 1 auto; }
.table-tools .tt-count { color: var(--ink-3); font-size: 13px; }
.table-pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-size: 13px; color: var(--ink-2); margin: -12px 0 var(--gap); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; border: 1px solid var(--line-2); background: transparent;
  border-radius: var(--r-pill); padding: 0 14px; font: 500 13px var(--font); color: var(--ink-2); text-decoration: none; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed=true], .chip.active { background: var(--raised); color: var(--ink); border-color: var(--orange); }
.chip .chip-n { opacity: .8; margin-left: 6px; }

/* ------------------------------------------------------------------ empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 32px 16px; color: var(--ink-2); }
.empty-icon { width: 48px; height: 48px; border-radius: var(--r-ctl); background: var(--raised); color: var(--ink-2); display: flex;
  align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
.empty-title { font-weight: 600; color: var(--ink); margin: 0; font-size: 14px; }
.empty-text { margin: 0 auto; max-width: 40rem; font-size: 13px; }
tr.empty-row td { background: var(--panel) !important; }

/* ------------------------------------------------------------------ buttons */
.btn { --bs-btn-font-family: var(--font); --bs-btn-font-weight: 600; --bs-btn-border-radius: var(--r-ctl); --bs-btn-font-size: 14px;
  --bs-btn-padding-x: 18px; --bs-btn-padding-y: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.btn-sm { --bs-btn-padding-x: 14px; --bs-btn-font-size: 13px; --bs-btn-border-radius: var(--r-ctl); min-height: 40px; }
.btn-main { --bs-btn-padding-x: 22px; --bs-btn-font-size: 15px; --bs-btn-border-radius: var(--r-ctl); min-height: 48px; }
.btn-primary, .content button:not(.btn):not(.btn-close):not(.chip):not(.avatar):not(.tabbar-btn):not(.link-btn):not(.tile) {
  --bs-btn-bg: var(--orange); --bs-btn-color: var(--ink); --bs-btn-border-color: var(--orange);
  --bs-btn-hover-bg: var(--orange-hover); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--orange-hover);
  --bs-btn-active-bg: var(--orange); --bs-btn-active-color: var(--ink); --bs-btn-active-border-color: var(--orange);
  --bs-btn-disabled-bg: var(--line-2); --bs-btn-disabled-color: var(--ink-2); --bs-btn-disabled-border-color: var(--line-2);
  --bs-btn-focus-shadow-rgb: 242, 106, 27; --bs-btn-font-weight: 700; }
.content button:not(.btn):not(.btn-close):not(.chip):not(.avatar):not(.tabbar-btn):not(.link-btn):not(.tile) {
  background: var(--orange); color: var(--ink); border: 1px solid var(--orange); border-radius: var(--r-ctl); min-height: 40px;
  padding: 0 16px; font: 700 14px var(--font); cursor: pointer; }
.content button:not(.btn):not(.btn-close):not(.chip):not(.avatar):not(.tabbar-btn):not(.link-btn):not(.tile):hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.content button:disabled { background: var(--line-2) !important; border-color: var(--line-2) !important; color: var(--ink-2) !important; cursor: not-allowed; }
.btn-outline-primary, .btn-outline {
  --bs-btn-color: var(--ink); --bs-btn-bg: transparent; --bs-btn-border-color: var(--line-2);
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--raised); --bs-btn-hover-border-color: var(--ink-3);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: var(--raised); --bs-btn-active-border-color: var(--orange);
  --bs-btn-disabled-color: var(--ink-3); --bs-btn-disabled-border-color: var(--line); font-weight: 500; }
.btn-outline-danger, .content button[value=reject], .content button.danger {
  --bs-btn-color: var(--crit); --bs-btn-bg: transparent; --bs-btn-border-color: var(--crit);
  --bs-btn-hover-color: var(--crit); --bs-btn-hover-bg: var(--crit-bg); --bs-btn-hover-border-color: var(--crit);
  --bs-btn-active-color: var(--crit); --bs-btn-active-bg: var(--crit-bg); }
.content button[value=reject], .content button.danger { background: transparent !important; color: var(--crit) !important; border-color: var(--crit) !important; }
.content button[value=reject]:hover, .content button.danger:hover { background: var(--crit-bg) !important; }
.toast .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }

/* ------------------------------------------------------------------ forms */
.content input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]),
.content select, .content textarea, .form-control, .form-select, .login input {
  min-height: 44px; background-color: var(--panel); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  padding: 0 14px; font: 400 14px var(--font); max-width: 100%; box-sizing: border-box; }
.content textarea, textarea.form-control { padding: 10px 14px; }
.form-select { padding-right: 38px; --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%234A5B6D' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-control-sm { min-height: 40px; }
.form-control-lg { min-height: 52px; font-size: 16px; }
.content input:focus, .content select:focus, .content textarea:focus, .form-control:focus, .form-select:focus, .login input:focus {
  background-color: var(--panel); color: var(--ink); border-color: var(--orange); box-shadow: none; outline: 2px solid var(--orange); outline-offset: 2px; }
.content input::placeholder, .form-control::placeholder { color: var(--ink-3); }
.form-label, .content label { color: var(--ink-2); font-size: 13px; }
.form-check-input { background-color: var(--panel); border-color: var(--line-2); }
.form-check-input:checked { background-color: var(--orange); border-color: var(--orange); }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--crit); font-size: 13px; margin-top: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 0 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-panel); padding: 12px 16px; }
.filters label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
table .filters { background: transparent; border: 0; padding: 0; margin: 0; }
.counts { display: flex; gap: 32px; list-style: none; padding: 0; flex-wrap: wrap; }
.runs { list-style: none; padding: 0; }
.runs li { margin: 4px 0; padding: 8px 12px; border-radius: var(--r-ctl); }

/* selectable tiles (VAS services) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 84px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); text-decoration: none;
  font: 600 14px var(--font); text-align: left; width: 100%; cursor: pointer; }
.tile small { font-weight: 400; color: var(--ink-3); }
.tile:hover { border-color: var(--line-2); background: var(--raised); color: var(--ink); }
.tile.active, .tile[aria-pressed=true] { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); background: var(--orange-tint); color: var(--ink); }
.tile.active::after, .tile[aria-pressed=true]::after { content: "✓"; position: absolute; top: 10px; right: 12px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--orange); color: var(--ink); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ------------------------------------------------------------------ toasts, dialogs, tooltip */
.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 1090; display: flex; flex-direction: column; gap: 8px;
  max-width: min(420px, calc(100vw - 32px)); }
@media (max-width: 767.98px) { .toast-stack { bottom: calc(var(--tabbar-h) + 24px); right: 16px; } }
.toast { --bs-toast-bg: var(--rail); --bs-toast-color: #FFFFFF; --bs-toast-border-color: var(--rail); --bs-toast-border-radius: var(--r-ctl);
  background: var(--rail); color: #FFFFFF; border: 1px solid var(--rail); border-radius: var(--r-ctl); box-shadow: var(--shadow-tip);
  animation: theme-in var(--ease); }
.toast .toast-body { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.toast .toast-body .ico { color: #FFFFFF; }   /* on --rail: icon plus message, both white */
.toast-error .toast-body .ico { color: var(--orange-soft); }
.toast-error { border-color: var(--crit); }
.modal { --bs-modal-bg: var(--panel); --bs-modal-color: var(--ink); --bs-modal-border-color: var(--line); --bs-modal-border-radius: var(--r-panel);
  --bs-modal-inner-border-radius: 5px; --bs-modal-header-border-color: var(--line); --bs-modal-footer-border-color: var(--line); --bs-modal-box-shadow: none; }
.modal-backdrop { --bs-backdrop-bg: #0D2137; --bs-backdrop-opacity: .55; }
.modal.fade .modal-dialog { transition: transform var(--ease); }
.dropdown-menu { --bs-dropdown-bg: var(--raised); --bs-dropdown-border-color: var(--line-2); --bs-dropdown-border-radius: var(--r-ctl);
  --bs-dropdown-link-color: var(--ink); --bs-dropdown-link-hover-bg: var(--panel); --bs-dropdown-link-hover-color: var(--ink);
  --bs-dropdown-link-active-bg: var(--panel); --bs-dropdown-divider-bg: var(--line-2); --bs-dropdown-color: var(--ink); box-shadow: var(--shadow-tip); }
.tip { position: absolute; z-index: 30; pointer-events: none; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  padding: 10px 14px; box-shadow: var(--shadow-tip); display: flex; flex-direction: column; gap: 4px; min-width: 140px; font-size: 13px; color: var(--ink-2); }
.tip[hidden] { display: none; }
.tip-value { color: var(--ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes theme-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ charts */
.chart { margin: 0; position: relative; min-width: 0; }
.chart-scroll { overflow-x: auto; position: relative; }
.chart svg { display: block; width: 100%; height: auto; font-family: inherit; }
.chart-cap { display: flex; justify-content: flex-end; margin-top: 8px; }
.link-btn { background: none; border: 0; padding: 0 4px; min-height: 32px; color: var(--orange-text); font: 500 13px var(--font); cursor: pointer; }
.link-btn:hover { color: var(--orange-text-hover); text-decoration: underline; }
.chart-table[hidden] { display: none; }
.chart-table { margin-top: 12px; max-height: 320px; }
.chart [data-tip] { cursor: crosshair; }
.chart [data-tip]:focus { outline: none; }
.chart [data-tip]:focus-visible { outline: 2px solid var(--orange); }
.bar-track { height: 10px; border-radius: 2px; background: var(--orange-track); overflow: hidden; }
.bar-fill { height: 10px; border-radius: 2px; background: var(--orange); }
.split { display: flex; gap: 2px; align-items: center; }
.split > span { display: block; height: 8px; }
.split > span:last-child { border-radius: 0 4px 4px 0; }
.split .seg-dry { background: var(--dry); } .split .seg-temp { background: var(--temp); }

/* ------------------------------------------------------------------ Bootstrap pieces kept by Phase 8 pages */
.nav-tabs { --bs-nav-tabs-border-color: var(--line); --bs-nav-tabs-link-active-color: var(--ink); --bs-nav-tabs-link-active-bg: var(--raised);
  --bs-nav-tabs-link-active-border-color: var(--line) var(--line) var(--raised); --bs-nav-tabs-link-hover-border-color: transparent;
  --bs-nav-tabs-border-radius: var(--r-well); --bs-nav-link-color: var(--ink-2); --bs-nav-link-hover-color: var(--ink);
  margin-bottom: var(--gap); flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.nav-tabs .nav-link { white-space: nowrap; min-height: 44px; display: flex; align-items: center; }
.nav-tabs .nav-link.active { font-weight: 600; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 767.98px) { .compare { grid-template-columns: 1fr; } }
.card-side { border-top: 2px solid var(--line-2); }
.card-side.side-b { border-top-color: var(--orange); }
.capture { max-width: 560px; margin: 0 auto; }
.capture-step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; margin-bottom: 16px; }
.capture-step h2 { margin-top: 0; font-size: 16px; }
.capture-step .step-no { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: var(--ink);
  align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-right: 8px; }
.capture-step h2 { font-family: var(--cond); font-size: 22px; font-weight: 700; }
.sticky-submit .btn-primary { width: 100%; }
/* Rack step 4: Operations and Data pages */
.panel .filter-row:last-child { margin-bottom: 0; }
.flag-words { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.pallet-table td, .pallet-table th { white-space: nowrap; }
.big-qty { display: flex; align-items: center; gap: 12px; }
.content input.big-input { font-family: var(--cond); font-size: 44px; font-weight: 600; min-height: 72px; width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.big-unit { font-size: 16px; font-weight: 600; color: var(--ink-2); min-width: 4.5rem; }
.btn-xl { font-size: 16px; min-height: 56px; padding: 0 22px; border-radius: var(--r-ctl); font-weight: 600; }
.capture-cta { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 20px; min-height: 88px; }
.vas-card .thumb { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-well); background: var(--raised); flex: 0 0 96px;
  display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px; text-align: center; }
.vas-card .card-body { display: flex; gap: 16px; }
.vas-card .vas-main { flex: 1 1 auto; min-width: 0; }
.vas-card .vas-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.vas-card .vas-actions button { min-height: 44px; min-width: 96px; }
.bulk-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding: 12px 16px;
  background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r-ctl); margin-bottom: 12px; }
.review-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.review-list dt { color: var(--ink-2); font-weight: 500; }
.review-list dd { margin: 0; }
.exc-group summary { cursor: pointer; padding: 10px 0; font-weight: 600; min-height: 44px; }

/* ------------------------------------------------------------------ login */
.content-public { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 20px; box-sizing: border-box; }
.login { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 32px 28px;
  display: flex; flex-direction: column; gap: 18px; box-sizing: border-box; }
.login-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.login-brand img { max-height: 44px; max-width: 200px; }
.login h1 { font-family: var(--cond); font-size: 28px; font-weight: 700; margin: 0; }
.login .login-help { margin: 0; color: var(--ink-2); font-size: 14px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 400; }
.login input { font-size: 15px; }
.login .btn-block { width: 100%; }
.login .or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.login .or::before, .login .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login .error { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: var(--r-ctl);
  background: var(--crit-bg); }

/* ------------------------------------------------------------------ Home (Rack §5) */
.desk-only { display: block; } .phone-only { display: none; }
@media (max-width: 767.98px) { .desk-only { display: none !important; } .phone-only { display: block; } }
.home-rack .rack-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 32px; margin-bottom: 18px; }
.rack-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; min-width: 0; max-width: 760px; }
.rack-fig .fig-hero { flex: none; }
.rack-fig .rack-sentence { flex: 1 1 260px; min-width: 0; }
.rack-sentence { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.rack-scroll { overflow-x: auto; min-width: 0; }
.home-rack .chart { margin: 0; }
.home-priced h2, .close-check h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.home-priced .fig-sar { margin: 18px 0 6px; overflow-wrap: anywhere; }
.home-priced .coverage, .home-priced .bar-track { margin-top: 18px; }
.cov-note { margin: 10px 0 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.cov-note b { color: var(--ink); font-weight: 600; }
.priced-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.hero-note { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--ink-2); }
.hero-note b { color: var(--ink); font-weight: 600; }
.hero-note .ico { color: var(--good); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.close-check .stepper { margin: 16px 0 8px; }
.more-checks summary { padding: 12px 0; color: var(--orange-text); font-weight: 500; cursor: pointer; }
.clients-table .split { min-width: 120px; }
.clients-table td { vertical-align: middle; }
.clients-table td:first-child, .clients-table .client-key { white-space: nowrap; }
.client-key { font-family: var(--cond); font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.client-key:hover { color: var(--orange-text-hover); text-decoration: underline; }
.home-vas-card { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.status-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; margin: 0 0 16px; }
.status-list dt { font-size: 13px; color: var(--ink-2); font-weight: 400; }
.status-list dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.capture-cta { min-height: 64px; font-size: 18px; gap: 10px; display: inline-flex; align-items: center; justify-content: center; }
/* phone Home (rack_home_phone.png) */
.home-priced-phone { margin-bottom: var(--gap); }
.fig-phone { font-family: var(--cond); font-size: clamp(40px, 15vw, 62px); font-weight: 700; line-height: 1; margin: 0 0 6px; color: var(--ink);
  overflow-wrap: anywhere; }
.home-priced-phone .bar-track { margin-top: 14px; }
.home-priced-phone .btn { min-height: 52px; }
@media (max-width: 767.98px) {
  .home-rack .fig-hero { font-size: 44px; }
  .home-rack .rack-sentence { font-size: 14px; }
}

/* ------------------------------------------------------------------ motion, print */
@media (prefers-reduced-motion: reduce) {
  .toast, .modal.fade .modal-dialog { animation: none; transition: none; }
}
@media print {
  .topbar, .sub-nav, .tabbar, .tabbar-more, .table-tools, .table-pager, .toast-stack { display: none !important; }
}

/* status badge icons: drawn from the same stroke set (check / alert / cross / info) so markup stays "icon + word" */
.badge::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--badge-ico) center / 16px 16px no-repeat; mask: var(--badge-ico) center / 16px 16px no-repeat; }
.badge-green { --badge-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.5 3 3 5-6'/%3E%3C/svg%3E"); }
.badge-amber { --badge-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 2.8 19.5h18.4z'/%3E%3Cpath d='M12 10v4.5M12 17v.4'/%3E%3C/svg%3E"); }
.badge-red { --badge-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6'/%3E%3C/svg%3E"); }
.badge-grey { --badge-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.6v.4'/%3E%3C/svg%3E"); }

/* split rows (largest clients, dry / temperature) */
.split-rows { display: flex; flex-direction: column; gap: 2px; }
.split-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 68px; align-items: center; gap: 12px; min-height: 34px; font-size: 13px; }
.split-label { font-weight: 500; font-variant-numeric: tabular-nums; }
.split-n { text-align: right; color: var(--ink-2); }

/* ------------------------------------------------------------------ billing pages (step 3) */
.customer-head .cust-title { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.customer-head .cust-title h2 { font-size: 16px; font-weight: 600; }
.cust-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; margin: 0;
  border-top: 1px solid var(--line); padding-top: 16px; }
.cust-facts dt { font-size: 13px; font-weight: 400; color: var(--ink-2); margin-bottom: 4px; }
.cust-facts dd { margin: 0; font-size: 14px; }
.check-list { border-top: 1px solid var(--line); }
.check-row { grid-template-columns: 36px minmax(0, 1fr) auto auto; cursor: default; }
.check-row:hover { background: none; }
.check-row .attn-sub details { margin-top: 4px; }
.check-row .check-fix { justify-self: end; }
.preview-order { margin-top: 18px; }
.preview-order h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.compare-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--gap); }
@media (max-width: 767.98px) { .check-row { grid-template-columns: 36px minmax(0, 1fr); } .check-row .check-fix { grid-column: 2; justify-self: start; } }

/* ------------------------------------------------------------------ dates: shown as 13 Nov 2026 (theme.js), never mm/dd/yyyy */
.date-wrap { position: relative; display: inline-block; max-width: 100%; }
.date-wrap input[type="date"].date-enh { color: transparent; }
.date-wrap input[type="date"].date-enh::-webkit-datetime-edit { color: transparent; }
.date-wrap .date-show { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-wrap .date-show.empty { color: var(--ink-3); }
.date-fmt { font-size: 12px; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; align-items: end; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.form-grid input:not([type="checkbox"]):not([type="radio"]), .form-grid select { width: 100%; }
.form-grid label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ phones: the page itself never scrolls sideways (step 4) */
@media (max-width: 767.98px) {
  .panel { padding: 16px; }
  .panel > table, .panel > form > table, .panel > section > table, .table-scroll { display: block; overflow-x: auto; max-width: 100%; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { max-width: 100%; }
  .cust-facts { grid-template-columns: 1fr; }
  .nav-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
  .nav-tabs .nav-link { white-space: nowrap; }
  .filters { display: flex; flex-wrap: wrap; gap: 8px 12px; }
  .filters label { max-width: 100%; }
  .page-actions { flex-wrap: wrap; }
  pre, code { white-space: pre-wrap; word-break: break-word; }
}

/* ------------------------------------------------------------------ grouped, collapsed tables (month close exclusions and check items) */
.group-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.group { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.group > summary { min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 8px 16px; cursor: pointer; }
.group > summary .group-head { font-weight: 500; color: var(--ink); }
.group > summary .group-n { color: var(--ink-2); }
.group .table-wrap { margin: 0 12px 12px; max-height: 420px; }
.check-items { margin: -4px 0 8px 50px; }
.h-sub { font-size: 16px; font-weight: 600; margin-top: 16px; }
@media (max-width: 767.98px) { .check-items { margin-left: 0; } }

/* ------------------------------------------------------------------ step 4: filter row, sticky bulk bars, groups */
.pagination { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: var(--gap);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px 20px; }
.filter-row > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); min-width: 0; max-width: 100%; }
.filter-row > label.check { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.filter-row input:not([type="checkbox"]), .filter-row select { min-height: 44px; max-width: 100%; }
.sticky-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  background: var(--raised); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
.exc-group { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 12px; }
.exc-group > summary { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px; cursor: pointer; }
.exc-group > summary .group-head { font-weight: 600; color: var(--ink); }
.exc-group > summary .group-n { color: var(--ink-2); }
.exc-group .table-wrap { margin: 0 12px 12px; }
@media (max-width: 767.98px) {
  .filter-row { padding: 12px; }
  .filter-row > label { flex: 1 1 140px; }
  .filter-row input:not([type="checkbox"]), .filter-row select { width: 100%; }
  .sticky-bar { bottom: calc(var(--tabbar-h) + 8px); }
  .sticky-bar input:not([type="checkbox"]) { width: 100%; }
  .sticky-bar > label { flex: 1 1 100%; }
}

/* ------------------------------------------------------------------ step 4: VAS capture (phone first) and approval cards */
.photo-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.photo-input:focus-visible + .photo-btn { outline: 2px solid var(--orange); outline-offset: 2px; }
.photo-preview { margin-bottom: 12px; }
.photo-preview img { display: block; max-width: 100%; max-height: 240px; border-radius: 12px; border: 1px solid var(--line-2); object-fit: cover; }
.sticky-submit { position: sticky; bottom: 0; z-index: 6; background: var(--page); padding: 12px 0; }
.vas-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.vas-cards .vas-card { margin: 0; display: flex; gap: 16px; align-items: flex-start; }
.vas-card .thumb { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 12px; object-fit: cover; background: var(--raised);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ink-3); }
.vas-card .vas-main { flex: 1 1 auto; min-width: 0; }
.vas-card .vas-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.vas-card .vas-actions .btn { min-height: 44px; }
@media (max-width: 767.98px) {
  .sticky-submit { bottom: var(--tabbar-h); }
  .vas-card .thumb { flex-basis: 64px; width: 64px; height: 64px; }
}

/* ------------------------------------------------------------------ step 5: Admin pages */
.row-edit > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.row-edit > summary::-webkit-details-marker { display: none; }
.row-edit[open] > summary { border-color: var(--orange); }
.row-edit-body { display: grid; gap: 16px; margin-top: 12px; padding: 16px; background: var(--raised); border: 1px solid var(--line-2);
  border-radius: var(--r-ctl); min-width: min(560px, 80vw); }
.wh-checks { border: 0; margin: 0; padding: 0; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.wh-checks legend { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; float: none; width: auto; }
.wh-checks label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-size: 14px; }
.form-grid .span-all { grid-column: 1 / -1; }
.logo-preview { max-height: 48px; background: var(--raised); padding: 6px; border-radius: 10px; }
.attn-row:has(> form) { grid-template-columns: 36px minmax(0, 1fr) auto; }
.attn-row > form { margin: 0; }
@media (max-width: 767.98px) {
  .attn-row:has(> form) { grid-template-columns: 36px minmax(0, 1fr); }
  .attn-row > form { grid-column: 2; }
  .row-edit-body { min-width: 0; }
}

/* ------------------------------------------------------------------ step 5: accessibility pass */
/* tinted rows (red / amber / green at 14%): muted text and links one step lighter so they keep 4.5:1 */
.content table tr.red .muted, .content table tr.flag .muted, .content table tr.warn .muted, .content table tr.changed .muted,
.content table tr.added .muted, .content table tr.removed .muted { color: var(--ink-2) !important; }
.content table tr.red a:not(.btn), .content table tr.flag a:not(.btn), .content table tr.warn a:not(.btn),
.content table tr.added a:not(.btn), .content table tr.changed a:not(.btn) { color: var(--orange-text-hover); }
/* the focus ring is never hidden, also on summary toggles and custom controls */
summary:focus-visible, [tabindex]:focus-visible, .tile:focus-visible, .chip:focus-visible { outline: 2px solid var(--orange) !important; outline-offset: 2px; }
/* reduced motion: nothing moves, nothing slides */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/* phones: tables not yet in a .table-wrap scroll inside themselves; form rows wrap (no page wider than 390 px) */
@media (max-width: 767.98px) {
  .content table:not(.table-wrap > table) { display: block; overflow-x: auto; max-width: 100%; }
  .filters label { flex-wrap: wrap; max-width: 100%; min-width: 0; }
  .filters input:not([type="checkbox"]):not([type="radio"]), .filters select { min-width: 0; flex: 1 1 120px; width: auto; }
  .content form { max-width: 100%; }
  .content pre, .content code { white-space: pre-wrap; word-break: break-word; }
}
@media (max-width: 767.98px) {
  .sub-nav ul { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-width: 100%; }
  .sub-nav li { flex: 0 0 auto; }
}
.row-edit:not([open]) > .row-edit-body { display: none; }

/* ------------------------------------------------------------------ final clean-up */
/* phones: absolutely positioned text (visually-hidden labels in Change buttons and table headers) stays inside the
   scrolling table; without a positioned box there it escaped and widened the page (Users 576 px, D365 items 866 px) */
.table-wrap, .content table, .row-edit > summary { position: relative; }
/* phones: Users and D365 items stack one card per row, so an open Change panel takes the full width under its row */
@media (max-width: 767.98px) {
  .table-wrap:has(.table-stack) { max-height: none; overflow: visible; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .content .table-stack tbody tr { height: auto; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .content .table-stack tbody td { border: 0; padding: 4px 0; overflow-wrap: anywhere; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--ink-3); }
  .table-stack td:empty { display: none; }
  .table-stack .td-edit { padding-top: 8px; }
  .table-stack .row-edit-body { min-width: 0; }
  .table-stack .row-edit-body.form-grid, .table-stack .row-edit-body .form-grid { grid-template-columns: minmax(0, 1fr); }
}
/* VAS entry and bulk upload, in the capture components */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.att-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.att-card img { display: block; width: 100%; height: 140px; object-fit: cover; border-radius: 10px; margin-bottom: 4px; }
.att-card .att-name { overflow-wrap: anywhere; }
.inline-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.inline-row > .form-control { flex: 1 1 220px; min-width: 0; width: auto; }
.capture-step .vas-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ================================================================== Rack components (§3), used through _theme.html */
/* buttons: outline and danger */
.btn-outline { --bs-btn-bg: var(--panel); --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line-2);
  --bs-btn-hover-bg: var(--raised); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--ink-3);
  --bs-btn-active-bg: var(--raised); --bs-btn-active-color: var(--ink); --bs-btn-active-border-color: var(--ink-3); }
.btn-outline-danger { --bs-btn-bg: var(--panel); --bs-btn-color: var(--crit); --bs-btn-border-color: var(--crit);
  --bs-btn-hover-bg: var(--crit-bg); --bs-btn-hover-color: var(--crit); --bs-btn-hover-border-color: var(--crit); }
.btn:disabled, .btn.disabled { opacity: .45; }

/* panels: 6 px, 24 px padding, no shadow; h2 17/600 with a 14 px help line */
.panel { padding: 24px; }
.panel-head h2 { font-size: 17px; font-weight: 600; }
.panel-help { font-size: 14px; }
.panel-rack { padding: 28px 28px 20px; }

/* stat tile */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.stat-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-panel);
  background: var(--panel); min-width: 0; color: var(--ink); text-decoration: none; }
a.stat-tile:hover { border-color: var(--line-2); color: var(--ink); }
.stat-label { font-size: 12.5px; color: var(--ink-2); }
.stat-value { font-family: var(--cond); font-size: 30px; font-weight: 700; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; line-height: 1.35; color: var(--ink-3); }
@media (max-width: 767.98px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* figures */
.fig-hero { font-family: var(--cond); font-size: clamp(44px, 9vw, 72px); font-weight: 700; line-height: .9; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.fig-sar { font-family: var(--cond); font-size: 68px; font-weight: 700; line-height: 1; color: var(--ink); }
.fig-sar .unit { font-family: var(--font); font-size: 18px; font-weight: 600; color: var(--ink-2); margin-right: 8px; }
.fig-2 { font-family: var(--cond); font-size: 26px; font-weight: 600; color: var(--ink); }

/* status: an icon plus a word; as a pill with the 10 % background */
.status-word { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.status-word.good { color: var(--good); } .status-word.warn { color: var(--warn); } .status-word.crit { color: var(--crit); }
.status-word.warn .ico { color: var(--warn-icon); }
.status-word.muted { color: var(--ink-3); }

/* owner tag */
.owner-tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2);
  border-radius: var(--r-ctl); padding: 3px 8px; white-space: nowrap; line-height: 1.3; }

/* checklist ("Before October can close") */
.checklist { list-style: none; margin: 0; padding: 0; }
.check-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.check-box { width: 20px; height: 20px; border: 2px solid var(--line-2); border-radius: var(--r-ctl); box-sizing: border-box; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; color: #FFFFFF; }
.check-item.passed .check-box { background: var(--good); border-color: var(--good); }
.check-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-title { font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; line-height: 1.35; }
a.check-title:hover { color: var(--orange-text); text-decoration: underline; }
.check-item.passed .check-title { color: var(--ink-2); }
.check-note { font-size: 13px; color: var(--ink-3); line-height: 1.4; }

/* stepper: a row of boxes (min 104 px, wrap) – current navy, done white with a tick, future white */
.stepper { display: flex; flex-wrap: wrap; gap: 8px; grid-template-columns: none; }
.stepper li { flex: 1 1 104px; min-width: 104px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); background: var(--panel); color: var(--ink-2); font-size: 14px; box-sizing: border-box; }
.stepper li::before { width: auto; height: auto; border: 0; border-radius: 0; background: none; font-family: var(--cond);
  font-size: 20px; font-weight: 600; color: var(--ink-3); display: inline; }
.stepper .step-body { padding-top: 0; }
.stepper li.current { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.stepper li.current::before { background: none; color: var(--orange); font-weight: 700; }
.stepper li.current .step-state { color: var(--rail-text); }
.stepper li.done { color: var(--ink); }
.stepper li.done::before { content: "✓"; color: var(--good); font-family: var(--font); font-size: 16px; font-weight: 700; }
.stepper li.blocked::before { content: "!"; color: var(--crit); background: none; }

/* segmented control */
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-ctl); overflow: hidden; background: var(--panel); }
.segmented > a, .segmented > button { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 0; background: transparent;
  color: var(--ink-2); font: 500 14px var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; }
.segmented > [aria-pressed=true], .segmented > [aria-current] { background: var(--ink); color: #FFFFFF; font-weight: 600; }
.segmented > :focus-visible { outline-offset: -4px; }

/* tables (§3): white, 13 px headers, 44 px rows, hover --raised, codes 600, numbers right and tabular */
.content table { background: var(--panel); }
.content table thead th { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.content table td, .content table th { border-top: 1px solid var(--line); }
.content table tbody tr:hover > td, .content table tbody tr:hover > th { background: var(--raised); }
.content table .code, .client-key { font-weight: 600; }
.content table td.num, .content table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* forms: 44 px inputs, label above 13/600 */
.form-label, .content label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form-control, .form-select, .content input:not([type=checkbox]):not([type=radio]):not([type=file]), .content select { min-height: 44px; background-color: var(--panel); border-color: var(--line-2); border-radius: var(--r-ctl); color: var(--ink); }
.content input[readonly], .form-control[readonly] { background: var(--raised); }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--crit); font-size: 13px; margin-top: 4px; }
.qty-input { font-family: var(--cond); font-size: 44px; font-weight: 700; min-height: 64px !important; }

/* dialog: white, radius 6, shadow, scrim */
.modal { --bs-modal-bg: var(--panel); --bs-modal-color: var(--ink); --bs-modal-border-color: var(--line); --bs-modal-border-radius: var(--r-panel);
  --bs-modal-box-shadow: var(--shadow-dialog); }
.modal-content { box-shadow: var(--shadow-dialog); }
.dropdown-menu { --bs-dropdown-bg: var(--panel); --bs-dropdown-border-color: var(--line); --bs-dropdown-border-radius: var(--r-ctl);
  --bs-dropdown-link-hover-bg: var(--raised); --bs-dropdown-link-active-bg: var(--raised); }

/* tooltip: value first in bold, label second */
.tip-value { font-weight: 700; }

/* empty state: icon in a 48 px --raised well */
.empty-icon { border-radius: var(--r-well); }

/* chart figures */
.rack-scroll { overflow-x: auto; }
.legend .swatch { border-radius: 2px; width: 14px; height: 14px; }

/* login (§2): white 400 px panel on --page */
.login { border-radius: var(--r-panel); }
.login .wordmark-hala { color: var(--ink); }
.login .wordmark-sub { color: var(--orange-text); }
.login .btn-primary { --bs-btn-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .toast, .dropdown-menu, .modal.fade .modal-dialog { animation: none !important; transition: none !important; }
}

/* Home fixes (John, 17 Nov): rack codes underlined on hover/focus only; close panel the wider one; phone title */
.chart a.bay-code, .chart a.bay-code text { text-decoration: none; }
.chart a.bay-code:hover, .chart a.bay-code:focus-visible, .chart a.bay-code:hover text, .chart a.bay-code:focus-visible text { text-decoration: underline; }
.home-close-row > .close-check { flex: 1.15 1 420px; }
.home-close-row > .home-clients { flex: 1 1 380px; }
.close-check .stepper { flex-wrap: nowrap; gap: 6px; overflow-x: auto; }
.close-check .stepper li { flex: 1 1 0; min-width: 0; padding: 10px 8px; gap: 6px; white-space: nowrap; }
.clients-table, .content table.clients-table { border: 0; border-radius: 0; }
.content table.clients-table thead th { position: static; border-top: 0; }
@media (max-width: 767.98px) { .desk-inline { display: none; } }

/* ---- Rack step 3: Billing pages ---- */
.customer-head .cust-title h2.cust-code { font-family: var(--cond); font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.page-tabs { margin: 0 0 var(--gap); }
.total-row th, .total-row td { border-top: 2px solid var(--ink) !important; font-weight: 700; }
.content td.code, .content .code { font-weight: 600; }
.status-word.crit, .status-word.warn { margin-bottom: 12px; }
/* long warn / crit messages wrap (no page overflow at 390 px); the icon keeps its size */
.status-word.crit, .status-word.warn { white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.status-word .ico, .status-word svg { flex-shrink: 0; }
.rc-form .form-actions { display: flex; align-items: flex-end; }
.content tr.warn > td { background: var(--orange-tint); }
.content tr.changed > td.diff { font-weight: 600; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
/* month close checklist rows: 20 px square (pass filled --good, fail --crit), result word, owner tag, Fix */
.check-row { grid-template-columns: 20px minmax(0, 1fr) auto auto auto; gap: 12px; }
.check-row .check-box { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border: 2px solid var(--line-2); border-radius: 4px; color: #FFFFFF; font-weight: 700; font-size: 13px; }
.check-row .check-box.is-pass { background: var(--good); border-color: var(--good); }
.check-row .check-box.is-fail { border-color: var(--crit); color: var(--crit); }
.check-row[data-status="pass"] .attn-title { color: var(--ink-2); }
@media (max-width: 767.98px) {
  .check-row { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .check-row .owner-tag, .check-row .check-fix { grid-column: 2 / -1; justify-self: start; }
}
.content td.nowrap { white-space: nowrap; }

/* step 5: a filter row inside a panel takes the panel's box, not a second one */
.panel .filter-row { background: none; border: 0; border-radius: 0; padding: 0; }

/* Billing → Documents: the whole page of rows (no inner scroll box); Priced visible at 1440 px (John 18 Nov) */
.table-wrap.table-full { max-height: none; overflow-x: auto; overflow-y: visible; }
.doc-table td, .doc-table th { padding-left: 8px; padding-right: 8px; }
.doc-table td.clip { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Documents: "How LFS records it" and the indicative ⓘ – a dotted underline, the text is in the title tooltip */
.help { cursor: help; text-decoration: underline dotted; white-space: nowrap; }
