/* ALPHA 1 Wash Operations Hub — IBM Carbon-style theme (Gray 90) with ALPHA 1 lime accent.
   Loaded after the preserved V2.20 stylesheet (style.css) and report-layout.css and overrides them.
   Remove the carbon.css <link> in index.html to return to the V2.20 appearance. */

:root {
  color-scheme: dark;
  /* Carbon Gray 90 tokens */
  --cds-background: #262626;
  --cds-layer-01: #393939;
  --cds-layer-02: #525252;
  --cds-layer-hover-01: #474747;
  --cds-layer-hover-02: #636363;
  --cds-layer-accent-01: #525252;
  --cds-field-01: #393939;
  --cds-field-02: #525252;
  --cds-border-subtle-00: #393939;
  --cds-border-subtle-01: #525252;
  --cds-border-strong-01: #8d8d8d;
  --cds-text-primary: #f4f4f4;
  --cds-text-secondary: #c6c6c6;
  --cds-text-helper: #a8a8a8;
  --cds-text-placeholder: #6f6f6f;
  --cds-focus: #ffffff;
  --cds-shell: #161616;
  --cds-shell-hover: #2c2c2c;
  --cds-shell-active: #393939;
  /* ALPHA 1 accent in place of Carbon blue */
  --accent: #d5f417;
  --accent-hover: #e5ff66;
  --accent-active: #b8d400;
  --on-accent: #161616;

  /* Map the existing app variables onto Carbon tokens */
  --bg: var(--cds-background);
  --panel: var(--cds-layer-01);
  --soft: var(--cds-layer-02);
  --line: var(--cds-border-subtle-01);
  --text: var(--cds-text-primary);
  --ink: var(--cds-text-primary);
  --muted: var(--cds-text-secondary);
  --brand: var(--accent);
  --red: #ff8389;
  --blue: #78a9ff;
  --green: #42be65;
  --orange: #ff832b;
  --purple: #be95ff;
  --sidebar-width: 256px;
  --header-height: 48px;
  --radius: 0;
  --shadow: none;
  --font: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
}

body {
  background: var(--cds-background);
  color: var(--cds-text-primary);
  font: 400 14px/1.43 var(--font);
  letter-spacing: .16px;
}
button, input, select, textarea { font-family: var(--font); letter-spacing: .16px; }

/* Focus: Carbon 2px inset white */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
a:focus-visible, summary:focus-visible, .scroll:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cds-focus);
  outline-offset: -2px;
}
.login-layout :focus-visible { outline-color: var(--cds-focus); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--cds-text-primary); letter-spacing: 0; }
h2 { font-size: 28px; line-height: 36px; font-weight: 400; margin: 0; }
h3 { font-size: 20px; line-height: 28px; font-weight: 400; }
h4 { font-size: 16px; line-height: 24px; font-weight: 600; }
.workspace-content section > h3 { font-size: 20px; font-weight: 400; }
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: .32px; text-transform: none; color: var(--cds-text-secondary); }
.page-context { font-size: 14px; letter-spacing: .16px; margin-bottom: 8px; }
.page-heading { margin-bottom: 24px; }
small, .muted { color: var(--cds-text-secondary); }
a { color: #78a9ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Buttons (Carbon: square, left-aligned text) ---------- */
button {
  border-radius: 0;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  color: var(--cds-text-primary);
  background: transparent;
  border: 1px solid var(--cds-text-primary);   /* Carbon tertiary */
  transition: background 70ms cubic-bezier(0,0,.38,.9), color 70ms, border-color 70ms;
}
button:hover:not(:disabled) { background: var(--cds-text-primary); color: #161616; border-color: var(--cds-text-primary); }
button:active:not(:disabled) { background: #c6c6c6; border-color: #c6c6c6; color: #161616; }
button.primary, .login .primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
button.primary:hover:not(:disabled), .login .primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
button.primary:active:not(:disabled) { background: var(--accent-active); border-color: var(--accent-active); }
button.primary:focus-visible { outline-color: var(--cds-focus); box-shadow: inset 0 0 0 3px #161616; }
button.danger { background: #da1e28; border-color: #da1e28; color: #fff; }
button:disabled { opacity: 1; color: #8d8d8d; border-color: #6f6f6f; background: transparent; }
button.primary:disabled { background: #6f6f6f; border-color: #6f6f6f; color: #a8a8a8; }
td button { min-height: 32px; padding: 0 12px; font-size: 14px; }

/* ---------- UI shell header ---------- */
.masthead { background: var(--cds-shell); border-bottom: 1px solid var(--cds-border-subtle-00); }
.header-inner { min-height: var(--header-height); padding: 0; gap: 0; max-width: none; }
.brand { gap: 0; }
.brand-logo { width: var(--sidebar-width); height: var(--header-height); background: #000; justify-content: flex-start; padding-left: 16px; }
.brand img { width: auto; height: 40px; max-height: 40px; }
.brand-caption { border-left: 1px solid var(--cds-border-subtle-00); padding: 0 16px; display: flex; align-items: baseline; gap: 12px; height: var(--header-height); align-items: center; }
.brand-caption span { font-size: 14px; font-weight: 600; letter-spacing: .1px; line-height: 20px; color: var(--cds-text-primary); }
.brand-caption small { font-size: 12px; font-weight: 400; letter-spacing: .32px; color: var(--cds-text-secondary); }
#identity { align-self: stretch; gap: 0; }
#identity button {
  height: var(--header-height); min-height: var(--header-height);
  border: 0; border-left: 1px solid var(--cds-border-subtle-00);
  padding: 0 16px; color: var(--cds-text-secondary); background: transparent;
}
#identity button:hover:not(:disabled) { background: var(--cds-shell-hover); color: var(--cds-text-primary); }

/* ---------- Side nav ---------- */
.workspace { min-height: calc(100vh - var(--header-height) - 41px); max-width: none; }
.sidebar { background: var(--cds-shell); border-right: 1px solid var(--cds-border-subtle-00); padding: 16px 0; gap: 16px; }
.sidebar-heading { padding: 0 16px 16px; border-bottom: 1px solid var(--cds-border-subtle-00); }
.company-heading .company-name strong { font-size: 16px; font-weight: 600; line-height: 22px; }
.company-heading .company-name small { font-size: 12px; letter-spacing: .32px; }
.workspace-mark { width: 32px; height: 32px; border-radius: 0; background: var(--cds-layer-01); color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.company-heading .branding-link { border-radius: 0; min-height: 32px; padding: 0 12px; font-size: 12px; letter-spacing: .32px; color: var(--cds-text-secondary); border-color: var(--cds-border-strong-01); }
.side-label { padding: 0 16px; margin: 0; font-size: 12px; font-weight: 400; letter-spacing: .32px; color: var(--cds-text-helper); }
nav { gap: 0; }
.nav-link {
  border: 0; border-radius: 0; min-height: 40px; padding: 0 16px; gap: 12px;
  font-size: 14px; font-weight: 600; letter-spacing: .16px; color: var(--cds-text-secondary);
  box-shadow: none;
}
.nav-icon { width: 16px; height: 16px; }
.nav-link:hover:not(:disabled) { background: var(--cds-shell-hover); color: var(--cds-text-primary); }
.nav-link.active, .nav-link.active:hover:not(:disabled) {
  background: var(--cds-shell-active); color: var(--cds-text-primary); font-weight: 600; border: 0;
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-bottom { border-top: 1px solid var(--cds-border-subtle-00); padding: 16px 16px 0; font-size: 12px; letter-spacing: .32px; color: var(--cds-text-helper); }

/* ---------- Content area & tiles ---------- */
.workspace-content { padding: 24px 32px 48px; max-width: 1584px; --panel-gap: 16px; --panel-padding: 16px; }
@media (min-width: 1056px) { .workspace-content { --panel-padding: 24px; } }
section, .panel, .workspace-content section {
  background: var(--cds-layer-01);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.workspace-content > p.muted { font-size: 12px; letter-spacing: .32px; color: var(--cds-text-helper); margin: -4px 0 16px; }

/* Inline notification (Carbon low-contrast info) */
.notice {
  border: 0; border-left: 3px solid #4589ff; border-radius: 0;
  background: var(--cds-layer-01); color: var(--cds-text-primary);
  padding: 15px 16px 15px 13px; font-size: 14px;
}
.notice:empty { display: none; }
.login .notice { background: var(--cds-layer-02); }

/* ---------- Data tables ---------- */
.scroll { border: 0; border-radius: 0; }
table { white-space: nowrap; }
th, td { border-bottom: 1px solid var(--cds-border-subtle-01); padding: 0 16px; height: 48px; }
th {
  background: var(--cds-layer-accent-01); color: var(--cds-text-primary);
  font-size: 14px; font-weight: 600; letter-spacing: .16px; text-transform: none;
  border-bottom: 0;
}
td { font-size: 14px; color: var(--cds-text-secondary); padding-top: 8px; padding-bottom: 8px; }
td strong, td .fleet-id strong { color: var(--cds-text-primary); font-weight: 400; }
td > strong { font-weight: 600; }
tbody tr, tbody tr:nth-child(even) { background: var(--cds-layer-01); }
tbody tr:hover { background: var(--cds-layer-hover-01); }
tbody tr:last-child td { border-bottom: 1px solid var(--cds-border-subtle-01); }
.workspace-content .empty-cell { color: var(--cds-text-helper); padding: 32px 16px; }
.fleet-id strong { font-size: 14px; }
.fleet-id small { font-size: 12px; letter-spacing: .32px; color: var(--cds-text-helper); }
.activity-log-panel th { font-size: 12px; letter-spacing: .32px; }

/* ---------- Tags & status colours ---------- */
.log-fn { font-weight: 600; padding: 0; border: 0; border-radius: 0; font-size: 14px; }
.log-fn.red { color: var(--red); font-weight: 600; }
.log-fn.blue { color: var(--blue); }
.log-fn.green, .log-fn.rinse-green { color: var(--green); }
.log-mode, .state, .status-pill {
  border-radius: 24px; border: 0; padding: 0 8px; min-height: 24px;
  font-size: 12px; font-weight: 400; letter-spacing: .32px; line-height: 24px; box-shadow: none;
}
.log-mode.purple { background: #491d8b; color: #e8daff; }
.log-mode.orange { background: #5e2900; color: #ffd9be; }
.log-mode.muted { background: #4d5358; color: #dde1e6; }
.state.green, .status-pill.approved { background: #044317; color: #a7f0ba; }
.state.orange, .status-pill.pending { background: #5e2900; color: #ffd9be; }
.state.muted, .status-pill.neutral { background: #4d5358; color: #dde1e6; }
.green { color: var(--green); }
.blue { color: var(--blue); }
.orange { color: var(--orange); }
.red { color: var(--red); }
.purple { color: var(--purple); }

/* ---------- Forms (Carbon fields: filled, bottom border) ---------- */
label { font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: .32px; color: var(--cds-text-secondary); margin: 0 0 24px; }
input, select, textarea, form[data-management] textarea, #wash textarea {
  background: var(--cds-field-02);
  color: var(--cds-text-primary);
  border: 0; border-bottom: 1px solid var(--cds-border-strong-01);
  border-radius: 0;
  min-height: 40px; padding: 0 16px;
  font-size: 14px;
}
textarea, form[data-management] textarea { padding: 11px 16px; }
label input:not([type=checkbox]), label select, label textarea { margin-top: 8px; }
input::placeholder, textarea::placeholder { color: var(--cds-text-placeholder); }
input:disabled, select:disabled, textarea:disabled { color: #8d8d8d; border-bottom-color: transparent; cursor: not-allowed; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 48px;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxNicgaGVpZ2h0PScxNicgdmlld0JveD0nMCAwIDE2IDE2Jz48cGF0aCBmaWxsPScjZjRmNGY0JyBkPSdNOCAxMUwzIDZsLjctLjdMOCA5LjZsNC4zLTQuMy43Ljd6Jy8+PC9zdmc+");
  background-repeat: no-repeat; background-position: right 16px center;
}
input[type=date] { color-scheme: dark; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; border-radius: 0; }
fieldset { background: transparent; border: 0; border-top: 1px solid var(--cds-border-subtle-01); border-radius: 0; padding: 16px 0 0; margin: 24px 0; }
legend { font-size: 14px; font-weight: 600; color: var(--cds-text-primary); padding: 0 8px 0 0; }
.account-editor legend { font-size: 16px; }
form[data-management] [role=status]:not(:empty) { color: #ff8389; font-size: 12px; letter-spacing: .32px; margin: 8px 0 0; }
.directory-panel td form label { margin: 0 0 8px; }
.directory-panel td form { padding: 8px 0; }

/* Report filters sit on the page like a Carbon toolbar */
.report-date-bar { background: var(--cds-layer-01); border: 0; border-radius: 0; }
#report-filters :is(select, input, button) { height: 40px; min-height: 40px; }
#report-filters label { margin: 0; }

/* ---------- Summary tiles ---------- */
.wash-stat, .fleet-metric {
  background: var(--cds-layer-02); border: 0; border-radius: 0; padding: 16px;
}
.wash-stat-label { font-size: 14px; font-weight: 400; color: var(--cds-text-secondary); letter-spacing: .16px; }
.wash-stat strong { font-size: 32px; line-height: 40px; font-weight: 300; letter-spacing: 0; }
.wash-stat-grid .wash-stat:first-child { border-inline-start: 3px solid var(--accent); }
.evidence-metrics { background: var(--cds-border-subtle-01); border: 0; border-radius: 0; gap: 1px; }
.evidence-metrics .wash-stat { background: var(--cds-layer-02); }
.evidence-metrics strong { font-size: 20px; line-height: 28px; font-weight: 400; }
.function-totals .wash-stat span { font-weight: 600; }
.wash-mode-card, .wash-mode-card--purple, .wash-mode-card--orange {
  background: var(--cds-layer-02); border: 0; border-top: 3px solid var(--mode-color); border-radius: 0;
  --mode-divider: #6f6f6f;
}
.wash-mode-card--purple { --mode-color: #a56eff; }
.wash-mode-card--orange { --mode-color: var(--orange); }
.wash-mode-card h4 .log-mode { background: transparent; padding: 0; font-size: 20px; font-weight: 400; line-height: 28px; border-radius: 0; }
.wash-mode-card h4 .log-mode.purple { color: var(--purple); }
.wash-mode-card h4 .log-mode.orange { color: var(--orange); }
.wash-mode-duration > span { font-size: 14px; font-weight: 400; color: var(--cds-text-secondary); }
.wash-mode-duration strong { font-size: 32px; line-height: 40px; font-weight: 300; }
.wash-mode-steps .log-fn { font-size: 12px; letter-spacing: .32px; font-weight: 600; }
.wash-mode-steps strong { font-size: 16px; font-weight: 400; }
.wash-overview .report-quality { border-bottom: 1px solid var(--cds-border-subtle-01); color: var(--cds-text-secondary); font-size: 14px; }
.report-quality [role=status] { color: #f1c21b; }
.panel-note { border-top: 1px solid var(--cds-border-subtle-01); color: var(--cds-text-helper); font-size: 12px; letter-spacing: .32px; }
.directory-panel > [data-reveal] + div:not([hidden]) { border-block: 1px solid var(--cds-border-subtle-01); padding-block: 16px; }
details > summary { color: var(--cds-text-primary); }
.account-editor > .directory-actions { border-top: 1px solid var(--cds-border-subtle-01); }

/* ---------- Login ---------- */
.login-layout { --login-accent: var(--accent); max-width: 1056px; margin: 64px auto; gap: 32px; }
.login-intro .eyebrow { color: var(--accent); }
.login-intro h1 { font-size: 42px; line-height: 50px; font-weight: 300; letter-spacing: 0; }
.login-intro > p { font-size: 16px; line-height: 24px; color: var(--cds-text-secondary); }
.login-features > div { font-weight: 400; font-size: 14px; }
.login { border-top: 0; border-radius: 0; padding: 32px; background: var(--cds-layer-01); }
.login h2 { font-size: 28px; line-height: 36px; font-weight: 400; margin: 8px 0 24px; }
.login .primary { min-height: 48px; }
.login a { color: #78a9ff; }
.login hr { border-top-color: var(--cds-border-subtle-01); }

/* ---------- Footer ---------- */
footer { background: var(--cds-shell); border-top: 1px solid var(--cds-border-subtle-00); padding: 12px 16px; font-size: 12px; font-weight: 400; letter-spacing: .32px; color: var(--cds-text-helper); }
footer > span:first-child { color: var(--cds-text-secondary); font-weight: 400; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --sidebar-width: 224px; --header-height: 48px; }
  .workspace-content { padding: 24px 24px 40px; }
}
@media (max-width: 760px) {
  .header-inner { min-height: var(--header-height); padding: 0; flex-wrap: nowrap; }
  .brand-logo { width: auto; height: var(--header-height); padding: 0 12px; }
  .brand img { width: auto; height: 36px; }
  .brand-caption { padding: 0 12px; }
  .brand-caption small { display: none; }
  .sidebar { padding: 0; border-bottom: 1px solid var(--cds-border-subtle-00); }
  .sidebar .company-heading { padding: 12px 16px; margin: 0; }
  nav { gap: 0; padding: 0; }
  .nav-link { min-height: 40px; padding: 0 16px; font-size: 14px; }
  .nav-link.active, .nav-link.active:hover:not(:disabled) { box-shadow: inset 0 -3px 0 var(--accent); }
  .workspace-content { padding: 16px 16px 32px; }
  h2 { font-size: 24px; line-height: 32px; }
  .wash-stat strong, .wash-mode-duration strong { font-size: 28px; line-height: 36px; }
  .login-intro h1 { font-size: 32px; line-height: 40px; }
  .login { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

/* Fine-tuning */
.account-editor fieldset { padding: 16px 0 0; }
.directory-panel tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 760px) { .company-heading .branding-link { max-width: 140px; } }

/* ---------- Bolder treatment (Owner request, Dec 2, 2026) ---------- */
h2 { font-size: 32px; line-height: 40px; font-weight: 600; }
h3, .workspace-content section > h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
.page-context { color: var(--cds-text-secondary); font-weight: 600; }
.brand-caption span { font-size: 16px; font-weight: 700; }
.nav-link { font-weight: 600; color: #e0e0e0; }
.nav-link.active, .nav-link.active:hover:not(:disabled) { color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.company-heading .company-name strong { font-weight: 700; }
button { font-weight: 600; }
th { font-weight: 700; }
td > strong, td .fleet-id strong { font-weight: 600; color: var(--cds-text-primary); }
label { font-weight: 600; color: #e0e0e0; }
legend, .account-editor legend { font-weight: 700; }
.wash-stat-label, .wash-mode-duration > span { font-weight: 600; color: #e0e0e0; }
.wash-stat strong, .wash-mode-duration strong { font-size: 36px; line-height: 44px; font-weight: 600; }
.evidence-metrics strong, .wash-mode-steps strong { font-weight: 600; }
.function-totals .wash-stat span, .wash-mode-steps .log-fn { font-weight: 700; }
.wash-stat-grid .wash-stat:first-child { border-inline-start-width: 4px; }
.wash-mode-card, .wash-mode-card--purple, .wash-mode-card--orange { border-top-width: 4px; }
.wash-mode-card h4 .log-mode { font-weight: 700; }
.log-mode, .state, .status-pill { font-weight: 600; }
.workspace-content section > h3, .directory-panel > h3 { padding-left: 12px; border-left: 4px solid var(--accent); }
.login-intro h1 { font-weight: 600; }
.login h2 { font-weight: 600; }
.notice { font-weight: 600; border-left-width: 4px; }
@media (max-width: 760px) {
  h2 { font-size: 26px; line-height: 34px; }
  .wash-stat strong, .wash-mode-duration strong { font-size: 30px; line-height: 38px; }
  .nav-link.active, .nav-link.active:hover:not(:disabled) { box-shadow: inset 0 -4px 0 var(--accent); }
}

/* ---------- Completed Jobs ---------- */
.job-filter-form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 16px; align-items: end; max-width: none; }
.job-filter-form label { margin: 0; min-width: 0; }
.job-filter-form :is(input, select, button) { height: 40px; min-height: 40px; width: 100%; }
.job-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.job-stat-grid .wash-stat strong { font-size: 30px; line-height: 38px; }
.unit-list { display: flex; flex-wrap: wrap; gap: 4px; max-width: 240px; white-space: normal; }
.unit-tag { display: inline-flex; gap: 6px; align-items: baseline; background: var(--cds-layer-02); color: var(--cds-text-primary);
  border-radius: 24px; padding: 0 10px; line-height: 24px; font-size: 12px; font-weight: 600; }
.unit-tag small { color: var(--cds-text-secondary); font-weight: 400; font-size: 11px; }
.job-address { white-space: normal; min-width: 140px; max-width: 220px; }
.job-cost { color: var(--accent); font-size: 16px; }
.jobs-panel td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.pricing-form { max-width: none; }
.pricing-form .account-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
@container (max-width: 1000px) {
  .job-filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .job-stat-grid, .pricing-form .account-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 520px) {
  .job-filter-form, .job-stat-grid, .pricing-form .account-fields { grid-template-columns: 1fr; }
}
.unit-tag { white-space: nowrap; }
.unit-list { max-width: 260px; }
.soap-lines { display: grid; grid-template-columns: auto auto auto; gap: 2px 12px; align-items: baseline; white-space: nowrap; font-size: 13px; }
.soap-lines .log-fn { font-size: 12px; }
.soap-lines span:nth-child(3n) { color: var(--cds-text-secondary); }
.job-stat-grid .wash-stat { justify-content: flex-start; }
.jobs-panel td:last-child { white-space: nowrap; }
.jobs-panel table { white-space: normal; }
.jobs-panel th, .jobs-panel td { padding-left: 12px; padding-right: 12px; }
.jobs-panel .fleet-id small { white-space: normal; }
.job-address { min-width: 110px; max-width: 170px; }
.unit-list { max-width: 190px; }

/* ---------- Overview period tabs ---------- */
.period-tabs { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--cds-border-strong-01); width: fit-content; }
.period-tabs button { border: 0; min-height: 40px; padding: 0 20px; background: transparent; color: var(--cds-text-secondary); font-weight: 600; }
.period-tabs button + button { border-left: 1px solid var(--cds-border-strong-01); }
.period-tabs button.active, .period-tabs button.active:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); }
.period-tabs button:hover:not(:disabled):not(.active) { background: var(--cds-layer-hover-01); color: var(--cds-text-primary); }

/* ---------- Job graph ---------- */
.job-graph { display: grid; gap: 8px; }
.graph-frame { position: relative; background: #1f1f1f; padding: 8px 4px 0; }
.job-graph-svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.g-plot { fill: #161616; }
.g-grid { stroke: #393939; stroke-width: 1; }
.g-grid-v { stroke-dasharray: 2 4; }
.g-label { fill: #c6c6c6; font-size: 12px; }
.g-axis { fill: #f4f4f4; font-size: 13px; font-weight: 600; }
.g-empty { fill: #a8a8a8; font-size: 15px; font-weight: 600; }
.g-mode { opacity: .85; }
.g-mode-label { fill: #161616; font-size: 11px; font-weight: 700; }
.g-step { fill: none; stroke-width: 2.5; stroke-linejoin: miter; }
.g-step-fill { opacity: .12; }
.g-pressure { fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.g-crosshair { stroke: #f4f4f4; stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.graph-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; font-weight: 600; color: var(--cds-text-secondary); }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-item i { display: inline-block; width: 18px; height: 3px; }
.legend-step i { height: 10px; width: 14px; }
.legend-band i { height: 10px; width: 18px; }
.sw-pump { background: #f1c21b; } .sw-line { background: #3ddbd9; } .sw-STEP_1 { background: #ff8389; }
.sw-STEP_2 { background: #78a9ff; } .sw-RINSE { background: #42be65; } .sw-POLISH_SAFE { background: #a56eff; }
.sw-POLISH_AGGRESSIVE { background: #ff832b; }
.graph-tip { position: absolute; top: 12px; display: grid; gap: 2px; padding: 8px 12px; background: #f4f4f4; color: #161616;
  font-size: 12px; pointer-events: none; min-width: 140px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.graph-tip span { font-weight: 600; }
.tx-pump { color: #8e6a00; } .tx-line { color: #007d79; } .tx-STEP_1 { color: #da1e28; } .tx-STEP_2 { color: #0043ce; }
.tx-RINSE { color: #198038; } .tx-POLISH_SAFE { color: #6929c4; } .tx-POLISH_AGGRESSIVE { color: #ba4e00; }

/* ---------- Job sheet ---------- */
.job-sheet { display: grid; gap: 16px; }
.job-sheet h4 { margin: 8px 0 0; font-size: 16px; font-weight: 700; }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.sheet-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--cds-border-subtle-01); padding-bottom: 12px; }
.sheet-header h3 { margin: 2px 0; font-size: 24px; border: 0; padding: 0; }
.sheet-header p { margin: 0; }
.sheet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--cds-border-subtle-01); }
.sheet-field { background: var(--cds-layer-02); padding: 12px 16px; display: grid; gap: 4px; min-width: 0; }
.sheet-field span { font-size: 12px; color: var(--cds-text-secondary); letter-spacing: .32px; }
.sheet-field strong { font-size: 15px; overflow-wrap: anywhere; }
.sheet-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sheet-total { background: var(--cds-layer-02); padding: 16px; display: grid; gap: 10px; align-content: start; }
.sheet-total > span { font-weight: 700; font-size: 16px; }
.sheet-total small { display: block; color: var(--cds-text-secondary); font-size: 12px; }
.sheet-total strong { font-size: 18px; }
.sheet-grand { border-top: 4px solid var(--accent); }
.sheet-grand strong.job-cost { font-size: 22px; }
@container (max-width: 900px) { .sheet-grid, .sheet-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 480px) { .sheet-grid, .sheet-totals { grid-template-columns: 1fr; } }

/* ---------- Notifications ---------- */
#identity { position: relative; }
.notify { position: relative; display: flex; align-items: stretch; }
#notify-toggle { display: inline-flex; align-items: center; gap: 8px; height: var(--header-height); min-height: var(--header-height);
  border: 0; border-left: 1px solid var(--cds-border-subtle-00); padding: 0 16px; background: transparent; color: var(--cds-text-secondary); }
#notify-toggle:hover:not(:disabled) { background: var(--cds-shell-hover); color: var(--cds-text-primary); }
.notify-count { background: var(--accent); color: var(--on-accent); border-radius: 12px; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.notify-panel { position: absolute; right: 0; top: 100%; width: min(380px, 92vw); max-height: 70vh; overflow: auto; z-index: 30;
  background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-01); box-shadow: 0 6px 18px rgba(0,0,0,.5); padding: 8px 0; }
.notify-panel h4 { margin: 4px 16px 8px; font-size: 14px; }
.notify-panel p { margin: 8px 16px; }
.notify-item { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--cds-border-subtle-01);
  padding: 10px 16px; min-height: 0; background: transparent; color: var(--cds-text-primary); font-weight: 400; white-space: normal; }
.notify-item strong { font-weight: 600; }
.notify-item span, .notify-item small { color: var(--cds-text-secondary); font-size: 12px; }
.notify-item.unread { border-left: 4px solid var(--accent); background: rgba(213,244,23,.06); }
.notify-item:hover:not(:disabled) { background: var(--cds-layer-hover-01); color: var(--cds-text-primary); }
@media (max-width: 760px) { #notify-toggle span { display: none; } #notify-toggle { padding: 0 12px; } }

/* ---------- Print: job sheet only, on white paper ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000 !important; }
  .masthead, .sidebar, footer, .no-print, .page-context, .workspace-content > p.muted, .page-heading, .notice { display: none !important; }
  .workspace { display: block; min-height: 0; }
  .workspace-content { padding: 0; max-width: none; }
  .workspace-content section, .job-sheet { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .job-sheet * { color: #000 !important; }
  .sheet-field, .sheet-total { background: #f2f2f2 !important; }
  .sheet-grid { background: #ccc !important; }
  .graph-frame { background: #fff !important; }
  .g-plot { fill: #fff; } .g-grid { stroke: #ccc; } .g-label, .g-axis { fill: #000; }
  th { background: #e0e0e0 !important; } tbody tr { background: #fff !important; }
  .job-sheet { break-inside: auto; } .job-graph, .sheet-totals { break-inside: avoid; }
}
.graph-tip[hidden] { display: none; }
#identity .notify-item { height: auto; min-height: 0; padding: 10px 16px; border: 0; border-top: 1px solid var(--cds-border-subtle-01);
  color: var(--cds-text-primary); text-align: left; }
#identity .notify-item.unread { border-left: 4px solid var(--accent); padding-left: 12px; }
#identity .notify-item:hover:not(:disabled) { background: var(--cds-layer-hover-01); color: var(--cds-text-primary); }

/* ---------- Login ---------- */
.login-help { margin: 8px 0 0; font-size: 12px; letter-spacing: .32px; color: var(--cds-text-helper); }
.login-help:empty { display: none; }
.staff-link { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--cds-border-subtle-01); text-align: right; }
.link-button, .link-button:hover:not(:disabled) { border: 0; background: transparent; min-height: 0; padding: 0; color: var(--cds-text-helper);
  font-size: 12px; font-weight: 400; letter-spacing: .32px; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover:not(:disabled) { color: var(--cds-text-primary); }
.directory-panel > h4 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 16px; font-weight: 700; }
tbody tr:has(button[data-job-sheet]) { cursor: pointer; }
tbody tr:has(button[data-job-sheet]):hover { background: var(--cds-layer-hover-01); }

/* ---------- Live Jobs ---------- */
.live-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.live-summary p { margin: 4px 0 0; max-width: 72ch; }
.live-counts { display: grid; grid-template-columns: auto auto; gap: 2px 10px; align-items: baseline; }
.live-counts strong { font-size: 32px; font-weight: 700; line-height: 1; text-align: right; }
.live-counts span { color: var(--cds-text-secondary); font-size: 14px; text-transform: uppercase; letter-spacing: .32px; }
.live-list { display: grid; gap: 24px; }
.live-card { background: var(--cds-layer-01); border-top: 4px solid var(--accent); padding: 20px 24px; display: grid; gap: 16px; container-type: inline-size; }
.live-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.live-head h3 { margin: 2px 0 4px; font-size: 22px; font-weight: 700; border: 0; padding: 0; }
.live-head small { color: var(--cds-text-secondary); font-size: 13px; letter-spacing: .32px; }
.live-head p { margin: 0; }
.live-status { display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 8px; padding: 8px 14px; background: var(--cds-layer-02); }
.live-status small { grid-column: 1 / -1; }
.live-status strong { font-size: 15px; text-transform: uppercase; letter-spacing: .5px; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: #8d8d8d; }
.live-status.live .live-dot { background: #42be65; box-shadow: 0 0 0 0 rgba(66,190,101,.6); animation: live-pulse 1.6s infinite; }
.live-status.live strong { color: #42be65; }
.live-status.stale .live-dot { background: #f1c21b; }
.live-status.stale strong { color: #f1c21b; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(66,190,101,.6); } 70% { box-shadow: 0 0 0 10px rgba(66,190,101,0); } 100% { box-shadow: 0 0 0 0 rgba(66,190,101,0); } }
@media (prefers-reduced-motion: reduce) { .live-status.live .live-dot { animation: none; } }
.live-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--cds-border-subtle-01); }
.live-tiles.is-stale .live-tile strong { opacity: .55; }
.live-tile { background: var(--cds-layer-02); padding: 14px 16px; display: grid; gap: 6px; min-width: 0; }
.live-tile span { font-size: 12px; color: var(--cds-text-secondary); letter-spacing: .32px; text-transform: uppercase; }
.live-tile strong { font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.live-tile strong .log-fn { font-size: 24px; font-weight: 700; }
.live-tile .log-fn.idle { color: var(--cds-text-secondary); }
.tile-pump strong { color: #f1c21b; }
.tile-line strong { color: #3ddbd9; }
.live-units summary { cursor: pointer; font-weight: 600; }
.live-units ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.live-units li { background: var(--cds-layer-02); padding: 6px 10px; }
@container (max-width: 760px) { .live-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .live-tile strong { font-size: 20px; } }

/* ---------- System records (equipment details, manufacturer service) ---------- */
.system-detail { display: grid; gap: 16px; container-type: inline-size; }
.system-detail > h4 { margin: 8px 0 0; font-size: 18px; font-weight: 700; }
.system-detail .sheet-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@container (max-width: 1000px) { .system-detail .sheet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 640px) { .system-detail .sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 420px) { .system-detail .sheet-grid { grid-template-columns: 1fr; } }
.service-list { display: grid; gap: 16px; }
.service-record { background: var(--cds-layer-01); border-left: 4px solid var(--accent); padding: 16px 20px; display: grid; gap: 8px; }
.service-record header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.service-record h4 { margin: 2px 0 0; font-size: 18px; font-weight: 700; }
.service-record h5 { margin: 6px 0 0; font-size: 14px; font-weight: 700; letter-spacing: .32px; }
.service-record small { color: var(--cds-text-secondary); font-size: 13px; }
.service-record p { margin: 0; }
.service-details { white-space: pre-wrap; }
.service-tags { display: flex; gap: 8px; align-items: center; }
.parts-fieldset { border: 1px solid var(--cds-border-subtle-01); padding: 12px 16px 16px; display: grid; gap: 10px; }
.parts-fieldset legend { font-weight: 700; padding: 0 6px; }
.parts-rows { display: grid; gap: 8px; }
.part-row { display: grid; grid-template-columns: 1.1fr 2fr .5fr 1fr 1.2fr; gap: 8px; align-items: end; }
@container (max-width: 760px) { .part-row { grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--cds-border-subtle-01); padding-bottom: 8px; } }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
label.check input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
form[data-management^="system-"] { display: grid; gap: 12px; background: var(--cds-layer-01); padding: 16px 20px; }
form[data-management^="system-"] h4 { margin: 0; font-size: 18px; font-weight: 700; }
form[data-management^="system-"] textarea { width: 100%; }
tbody tr:has(button[data-system]), tbody tr:has(button[data-system-serial]) { cursor: pointer; }
tbody tr:has(button[data-system]):hover, tbody tr:has(button[data-system-serial]):hover { background: var(--cds-layer-hover-01); }
.code-field { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: end; }
.code-field label { min-width: 0; }
.code-field small { grid-column: 1 / -1; font-size: 12px; }
.code-field small.red { color: var(--red); }
