/* NEW UI: reference stylesheets concatenated in their original load order (globals, operations, workspaces, customer-portal, ui-review, polish, popups). Fonts fall back to the system stack. */
:root { --font-sans: "Geist", ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif; --font-mono: ui-monospace, Menlo, monospace; }

/* ===== globals.css ===== */
:root {
  --stc-blue: #00457c;
  --stc-blue-700: #00355f;
  --stc-blue-100: #dcebf5;
  --stc-blue-50: #eef6fb;
  --stc-olive: #94a545;
  --stc-olive-700: #69792d;
  --install: #ad641f;
  --install-50: #fbf1e7;
  --ink: #17212b;
  --ink-2: #314252;
  --muted: #6b7b88;
  --muted-2: #8d9aa5;
  --line: #d9e1e7;
  --line-soft: #e9eef2;
  --canvas: #f4f6f7;
  --surface: #ffffff;
  --success: #257044;
  --success-soft: #eaf5ee;
  --warning: #8a6215;
  --warning-soft: #fbf3df;
  --danger: #b42318;
  --danger-soft: #fcedeb;
  --info: #175f91;
  --info-soft: #e6f1f8;
  --shadow-sm: 0 1px 3px rgba(23, 33, 43, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 47, 67, 0.08);
  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans), Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(0, 69, 124, 0.22);
  outline-offset: 2px;
}

::selection {
  background: var(--stc-blue-100);
  color: var(--stc-blue-700);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 17px 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 20;
}

.brand-home {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 7px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.stc-logo-wrap {
  display: flex;
  align-items: center;
  width: 112px;
}

.stc-logo-wrap img {
  width: 112px;
  height: auto;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 33px;
  margin: 0 12px;
  background: var(--line);
}

.brand-title {
  display: grid;
  gap: 0;
  line-height: 1.1;
}

.brand-title strong {
  color: var(--stc-blue);
  font-size: 14px;
  letter-spacing: -0.02em;
}

.brand-title small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.sidebar-section-label {
  margin: 23px 12px 8px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
}

.nav-link {
  position: relative;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: #526371;
  font-size: 13px;
  font-weight: 620;
  transition: background 140ms ease, color 140ms ease;
}

.nav-link:hover {
  background: #f4f7f8;
  color: var(--ink);
}

.nav-link.is-active {
  background: var(--stc-blue-50);
  color: var(--stc-blue);
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px -5px;
  width: 3px;
  border-radius: 4px;
  background: var(--stc-blue);
}

.sidebar-spacer {
  flex: 1;
}

.program-card {
  margin: 14px 4px;
  padding: 14px;
  border: 1px solid #cddde8;
  border-radius: var(--radius);
  background: var(--stc-blue-50);
}

.program-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--stc-blue);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.program-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stc-olive);
  box-shadow: 0 0 0 3px rgba(148, 165, 69, 0.17);
}

.program-card > strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.program-card p {
  margin: 4px 0 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.program-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--stc-blue);
  font-size: 11px;
  font-weight: 720;
}

.partner-lockup {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 4px 0;
  border-top: 1px solid var(--line-soft);
}

.partner-logo {
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0.76;
  filter: saturate(0.8);
}

.partner-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-separator {
  width: 1px;
  height: 21px;
  background: var(--line);
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 34px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  z-index: 15;
  backdrop-filter: blur(12px);
}

.topbar-project {
  display: grid;
  line-height: 1.22;
}

.topbar-project strong {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.eyebrow {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-badge,
.live-badge {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 730;
  letter-spacing: 0.03em;
}

.demo-badge {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid #ead8a9;
}

.live-badge {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid #c6e3d1;
}

.live-badge > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.icon-button {
  position: relative;
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--stc-blue);
  border-color: #b8cad7;
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--danger);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 4px;
  padding-left: 11px;
  border-left: 1px solid var(--line);
}

.user-chip > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--stc-blue);
  color: white;
  font-size: 10px;
  font-weight: 780;
}

.user-chip > div {
  display: grid;
  line-height: 1.2;
}

.user-chip strong {
  font-size: 11px;
}

.user-chip small {
  color: var(--muted);
  font-size: 9px;
}

.mobile-brand-row,
.mobile-nav-list {
  display: none;
}

.main-content {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 31px 34px 50px;
}

.page-stack {
  display: grid;
  gap: 20px;
}

.page-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  min-height: 62px;
}

.page-heading-row h1 {
  margin: 4px 0 3px;
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.page-heading-row p {
  max-width: 710px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 710;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--stc-blue);
  border-color: var(--stc-blue);
  color: #fff;
  box-shadow: 0 5px 14px rgba(0, 69, 124, 0.16);
}

.button-primary:hover {
  background: var(--stc-blue-700);
}

.button-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-2);
}

.button-secondary:hover {
  border-color: #b7c8d3;
  color: var(--stc-blue);
}

.source-alert {
  min-height: 62px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 11px 16px;
  border: 1px solid #e4d2a5;
  border-left: 4px solid #c7932b;
  border-radius: 9px;
  background: #fffaf0;
}

.source-alert-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--warning);
}

.source-alert strong {
  font-size: 12px;
}

.source-alert p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.source-alert > a {
  color: var(--warning);
  font-size: 11px;
  font-weight: 740;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  position: relative;
  min-height: 126px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 19px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--stc-blue);
}

.metric-complete::before {
  background: var(--success);
}

.metric-motion::before {
  background: var(--install);
}

.metric-risk::before {
  background: var(--danger);
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--stc-blue-50);
  color: var(--stc-blue);
}

.metric-motion .metric-icon {
  background: var(--install-50);
  color: var(--install);
}

.metric-complete .metric-icon {
  background: var(--success-soft);
  color: var(--success);
}

.metric-risk .metric-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.metric-copy {
  display: grid;
}

.metric-copy > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.metric-copy > strong {
  margin-top: 2px;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-copy > small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.metric-meta {
  position: absolute;
  right: 15px;
  bottom: 12px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #f4f6f7;
  color: var(--muted);
  font-size: 9px;
  font-weight: 690;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.panel-heading > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--stc-blue);
  font-size: 10px;
  font-weight: 730;
}

.panel-count {
  min-width: 28px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  font-weight: 780;
}

.subtle-label {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 670;
}

.dashboard-grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid-primary {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.dashboard-grid-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-flow-panel,
.action-panel,
.region-panel,
.wave-panel,
.integrity-panel {
  padding: 19px;
}

.flow-list {
  display: grid;
  gap: 3px;
}

.flow-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 31px minmax(150px, 1fr) minmax(120px, 1.2fr) 32px;
  align-items: center;
  gap: 10px;
  padding: 5px 7px;
  border-radius: 7px;
}

.flow-row:hover {
  background: #f8fafb;
}

.flow-index {
  width: 27px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--stc-blue-50);
  color: var(--stc-blue);
}

.flow-risk .flow-index {
  background: var(--danger-soft);
  color: var(--danger);
}

.flow-freight .flow-index {
  background: #f1f4e6;
  color: var(--stc-olive-700);
}

.flow-install .flow-index {
  background: var(--install-50);
  color: var(--install);
}

.flow-muted .flow-index {
  background: #f0f2f3;
  color: var(--muted);
}

.flow-copy {
  display: grid;
}

.flow-copy strong {
  font-size: 11px;
}

.flow-copy span {
  color: var(--muted);
  font-size: 9px;
}

.flow-track {
  height: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf1f3;
}

.flow-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--stc-blue);
}

.flow-risk .flow-track span {
  background: var(--danger);
}

.flow-freight .flow-track span {
  background: var(--stc-olive);
}

.flow-install .flow-track span {
  background: var(--install);
}

.flow-muted .flow-track span {
  background: var(--muted-2);
}

.flow-row > b {
  text-align: right;
  font-size: 14px;
}

.flow-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 4px 0;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
}

.flow-footnote svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--stc-blue);
}

.action-list {
  display: grid;
  margin: 0 -5px;
}

.action-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 7px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 6px;
}

.action-row:hover {
  background: #f8fafb;
}

.priority-mark {
  width: 5px;
  height: 33px;
  border-radius: 6px;
  background: var(--muted-2);
}

.priority-critical {
  background: #85180f;
}

.priority-high {
  background: var(--danger);
}

.priority-medium {
  background: #d29324;
}

.priority-low {
  background: var(--stc-blue);
}

.action-copy {
  min-width: 0;
  display: grid;
}

.action-copy > span {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.action-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.action-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-status {
  display: grid;
  justify-items: end;
  gap: 7px;
  color: var(--muted-2);
}

.panel-footer-link {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 11px;
  border-radius: 7px;
  background: #f5f8fa;
  color: var(--stc-blue);
  font-size: 10px;
  font-weight: 730;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 78px 1fr 27px;
  align-items: center;
  gap: 9px;
}

.bar-row > span {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 640;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf1f3;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--stc-blue);
}

.bar-row:nth-child(2) .bar-track span,
.bar-row:nth-child(4) .bar-track span,
.bar-row:nth-child(6) .bar-track span {
  background: #4d7da1;
}

.bar-row b {
  text-align: right;
  font-size: 11px;
}

.wave-chart {
  height: 161px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 9px;
  padding: 10px 5px 0;
  border-bottom: 1px solid var(--line);
}

.wave-column {
  height: 100%;
  display: grid;
  grid-template-rows: 20px 1fr 23px;
  justify-items: center;
  gap: 3px;
}

.wave-column > strong {
  color: var(--ink-2);
  font-size: 10px;
}

.wave-bar-wrap {
  width: min(32px, 70%);
  height: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 5px 5px 0 0;
  background: #eef2f4;
  overflow: hidden;
}

.wave-bar-wrap > span {
  width: 100%;
  min-height: 5px;
  border-radius: 5px 5px 0 0;
  background: var(--install);
}

.wave-column:nth-child(2n) .wave-bar-wrap > span {
  background: #c38145;
}

.wave-column small {
  color: var(--muted);
  font-size: 8px;
}

.wave-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9px;
}

.wave-note svg {
  flex-shrink: 0;
  color: var(--install);
}

.integrity-stat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.integrity-stat > div {
  display: grid;
  justify-items: center;
  padding: 12px 5px;
  border-right: 1px solid var(--line-soft);
}

.integrity-stat > div:last-child {
  border-right: 0;
}

.integrity-stat span {
  color: var(--muted);
  font-size: 8px;
}

.integrity-stat strong {
  margin-top: 2px;
  font-size: 15px;
}

.integrity-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 11px;
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--warning);
}

.integrity-alert svg {
  flex-shrink: 0;
}

.integrity-alert > div {
  display: grid;
}

.integrity-alert strong {
  font-size: 10px;
}

.integrity-alert span {
  margin-top: 2px;
  color: #77663f;
  font-size: 8px;
}

.status-pill {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 730;
  line-height: 1;
  white-space: nowrap;
}

.status-pill.is-compact {
  min-height: 21px;
  padding: 3px 7px;
  font-size: 8px;
}

.status-success {
  background: var(--success-soft);
  border-color: #c9e4d2;
  color: var(--success);
}

.status-info {
  background: var(--info-soft);
  border-color: #c5ddea;
  color: var(--info);
}

.status-danger {
  background: var(--danger-soft);
  border-color: #f0cac5;
  color: var(--danger);
}

.status-warning {
  background: var(--warning-soft);
  border-color: #ead8aa;
  color: var(--warning);
}

.status-neutral {
  background: #f0f3f5;
  border-color: #dce3e8;
  color: #566875;
}

.status-muted {
  background: #f4f5f6;
  border-color: #e6e9eb;
  color: #87939d;
}

.queue-kpi-strip {
  min-height: 64px;
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr)) minmax(170px, auto);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.queue-kpi-strip > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border-right: 1px solid var(--line-soft);
}

.queue-kpi-strip span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.queue-kpi-strip strong {
  font-size: 17px;
}

.queue-kpi-strip .queue-kpi-risk {
  background: #fffafa;
}

.queue-kpi-risk strong {
  color: var(--danger);
}

.queue-kpi-strip > a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  background: var(--stc-blue-50);
  color: var(--stc-blue);
  font-size: 10px;
  font-weight: 720;
}

.queue-panel {
  overflow: hidden;
}

.queue-toolbar {
  min-height: 73px;
  display: grid;
  grid-template-columns: minmax(270px, 1.15fr) minmax(500px, 1.85fr);
  align-items: center;
  gap: 18px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.search-field {
  height: 39px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #cdd7de;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.search-field:focus-within {
  border-color: #7da4c0;
  box-shadow: 0 0 0 3px rgba(0, 69, 124, 0.08);
}

.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.search-field input::placeholder {
  color: #99a4ad;
}

.search-field > button {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.queue-filters {
  min-width: 0;
  display: grid;
  grid-template-columns: auto repeat(3, minmax(120px, 1fr));
  align-items: center;
  gap: 8px;
}

.filter-label,
.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
}

.queue-filters label,
.issue-toolbar > label:not(.search-field) {
  min-width: 0;
}

.queue-filters select,
.sort-control select,
.issue-toolbar select {
  width: 100%;
  height: 37px;
  padding: 0 28px 0 9px;
  border: 1px solid #cdd7de;
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-size: 10px;
  cursor: pointer;
}

.queue-summary-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line-soft);
}

.queue-summary-row > div {
  color: var(--muted);
  font-size: 10px;
}

.queue-summary-row strong {
  color: var(--ink);
  font-size: 11px;
}

.queue-summary-row button {
  margin-left: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--stc-blue);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.queue-summary-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.queue-summary-row .queue-export {
  height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: white;
  color: var(--stc-blue);
}

.sort-control select {
  width: auto;
  height: 31px;
  border-color: var(--line-soft);
}

.table-scroll,
.touchpoint-table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
  color: #72818d;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 10px;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #fbfcfd;
}

.data-table tbody tr.has-exception {
  box-shadow: inset 3px 0 var(--danger);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.store-table {
  min-width: 1160px;
}

.store-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-identity > span {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--stc-blue);
  color: white;
  font-family: var(--font-mono), monospace;
  font-size: 8px;
  font-weight: 700;
}

.store-identity > div,
.data-table td:not(.number-cell) {
  min-width: 0;
}

.store-identity strong,
.data-table td > strong {
  display: block;
  color: var(--ink);
  font-size: 10px;
  white-space: nowrap;
}

.store-identity small,
.data-table td > small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.number-cell {
  text-align: center;
}

.issue-count {
  min-width: 25px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f0f3f5;
  color: var(--muted);
  font-weight: 760;
}

.issue-count.has-issues {
  background: var(--danger-soft);
  color: var(--danger);
}

.next-action-cell {
  max-width: 250px;
}

.next-action-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-open {
  width: 29px;
  height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--stc-blue);
}

.row-open:hover {
  background: var(--stc-blue-50);
}

.pagination-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 17px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
}

.pagination-row > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pagination-row button {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink-2);
  font-size: 9px;
  cursor: pointer;
}

.pagination-row button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.empty-state {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--ink-2);
  font-size: 12px;
}

.empty-state button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--stc-blue);
  font-size: 10px;
  font-weight: 720;
  cursor: pointer;
}

.back-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

.back-link:hover {
  color: var(--stc-blue);
}

.store-hero {
  min-height: 114px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border-top: 3px solid var(--stc-blue);
}

.store-hero-main {
  display: flex;
  align-items: center;
  gap: 15px;
}

.store-number-lockup {
  width: 75px;
  height: 71px;
  display: grid;
  place-content: center;
  justify-items: center;
  border-radius: 10px;
  background: var(--stc-blue);
  color: white;
}

.store-number-lockup span {
  font-family: var(--font-mono), monospace;
  font-size: 9px;
  opacity: 0.74;
}

.store-number-lockup strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.store-hero-copy h1 {
  margin: 3px 0 2px;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.store-hero-copy p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.store-hero-status {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.store-hero-actions {
  display: flex;
  gap: 8px;
}

.store-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.store-summary-grid article {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  gap: 3px 8px;
  padding: 12px 14px;
  border-right: 1px solid var(--line-soft);
}

.store-summary-grid article:last-child {
  border-right: 0;
}

.store-summary-grid svg {
  grid-row: 1 / 3;
  color: var(--stc-blue);
}

.store-summary-grid span:not(.status-pill) {
  color: var(--muted);
  font-size: 8px;
}

.store-summary-grid strong {
  font-size: 11px;
}

.store-operating-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 14px;
}

.operating-position-panel,
.store-issues-panel,
.touchpoint-panel,
.logistics-panel,
.timeline-panel {
  padding: 19px;
}

.operating-action {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-left: 3px solid var(--install);
  background: var(--install-50);
}

.operating-action span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 680;
  text-transform: uppercase;
}

.operating-action strong {
  font-size: 12px;
}

.lifecycle-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 20px 9px 14px;
}

.lifecycle-rail::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--line);
}

.lifecycle-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  z-index: 1;
}

.lifecycle-step > span {
  width: 31px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
}

.lifecycle-step.is-complete > span {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

.lifecycle-step.is-active > span {
  border-color: var(--install);
  color: var(--install);
  box-shadow: 0 0 0 4px rgba(173, 100, 31, 0.09);
}

.lifecycle-step small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
}

.source-notice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 8px;
}

.source-notice svg {
  flex-shrink: 0;
  color: var(--success);
}

.store-issue-list {
  display: grid;
  gap: 8px;
}

.store-issue-row {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.store-issue-row > div {
  min-width: 0;
  display: grid;
}

.store-issue-row > div > span {
  color: var(--muted-2);
  font-size: 8px;
  text-transform: uppercase;
}

.store-issue-row > div > strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-issue-row > div > small {
  color: var(--muted);
  font-size: 8px;
}

.store-issue-row > p {
  grid-column: 2 / 4;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.compact-empty {
  min-height: 105px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--success);
}

.compact-empty strong {
  color: var(--ink-2);
  font-size: 10px;
}

.touchpoint-table {
  min-width: 1000px;
}

.touchpoint-table td:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.touchpoint-code {
  min-width: 39px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--stc-blue-50);
  color: var(--stc-blue);
  font-family: var(--font-mono), monospace;
  font-size: 8px;
  font-weight: 740;
}

.touchpoint-table td:first-child strong {
  font-size: 10px;
}

.condition-check {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f1f3f4;
  color: var(--muted-2);
}

.condition-check.is-complete {
  background: var(--success-soft);
  color: var(--success);
}

.touchpoint-note {
  max-width: 350px;
  color: var(--muted) !important;
  font-size: 9px !important;
}

.store-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.shipment-list {
  display: grid;
  gap: 8px;
}

.shipment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.shipment-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f4e6;
  color: var(--stc-olive-700);
}

.shipment-row > div:nth-child(2) {
  min-width: 0;
  display: grid;
}

.shipment-row > div:nth-child(2) span,
.shipment-row > div:nth-child(2) small {
  color: var(--muted);
  font-size: 8px;
}

.shipment-row > div:nth-child(2) strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logistics-rule {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  background: #f8faf6;
  color: var(--muted);
  font-size: 8px;
}

.logistics-rule svg {
  flex-shrink: 0;
  color: var(--stc-olive-700);
}

.timeline-list {
  display: grid;
}

.timeline-event {
  position: relative;
  min-height: 69px;
  display: grid;
  grid-template-columns: 21px 1fr;
  gap: 9px;
}

.timeline-event:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 0;
  left: 8px;
  width: 1px;
  background: var(--line);
}

.timeline-marker {
  width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--stc-blue-50);
  color: var(--stc-blue);
  z-index: 1;
}

.timeline-warning .timeline-marker {
  background: var(--warning-soft);
  color: var(--warning);
}

.timeline-critical .timeline-marker {
  background: var(--danger-soft);
  color: var(--danger);
}

.timeline-positive .timeline-marker {
  background: var(--success-soft);
  color: var(--success);
}

.timeline-event > div {
  display: grid;
  align-content: start;
}

.timeline-event > div > span {
  color: var(--muted-2);
  font-size: 8px;
}

.timeline-event strong {
  margin-top: 1px;
  font-size: 10px;
}

.timeline-event p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.full-empty {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.full-empty h1 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 23px;
}

.full-empty p {
  margin: 0 0 8px;
  max-width: 460px;
}

.issue-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.issue-kpi-grid article {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.issue-kpi-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.kpi-open,
.kpi-owner {
  background: var(--info-soft);
  color: var(--info);
}

.kpi-critical {
  background: var(--danger-soft);
  color: var(--danger);
}

.kpi-material {
  background: var(--warning-soft);
  color: var(--warning);
}

.kpi-resolved {
  background: var(--success-soft);
  color: var(--success);
}

.issue-kpi-grid article > div {
  display: grid;
}

.issue-kpi-grid article span:not(.issue-kpi-icon) {
  color: var(--muted);
  font-size: 8px;
}

.issue-kpi-grid article strong {
  font-size: 18px;
  line-height: 1.1;
}

.issue-register-panel {
  overflow: hidden;
}

.active-store-filter {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: var(--stc-blue-50);
  color: var(--stc-blue);
  font-size: 10px;
  font-weight: 650;
}

.active-store-filter a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 720;
}

.issue-toolbar {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(130px, 0.6fr));
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.issue-result-count {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 17px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
}

.issue-result-count strong {
  margin-right: 3px;
  color: var(--ink);
}

.issue-card-list {
  display: grid;
  gap: 9px;
  padding: 13px;
  background: #f7f9fa;
}

.issue-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 132px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.issue-card-priority {
  display: flex;
  align-items: center;
  gap: 7px;
}

.issue-card-main {
  min-width: 0;
}

.issue-card-main > span {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.issue-card-main h3 {
  margin: 3px 0 2px;
  font-size: 12px;
  line-height: 1.25;
}

.issue-card-main > p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.issue-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
}

.issue-meta-row > span {
  display: grid;
}

.issue-meta-row small {
  color: var(--muted-2);
  font-size: 7px;
  text-transform: uppercase;
}

.issue-meta-row strong {
  font-size: 9px;
}

.issue-card-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.issue-card-status a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--stc-blue);
  font-size: 9px;
  font-weight: 720;
}

.issue-resolution {
  grid-column: 2 / 4;
  padding: 8px 10px;
  border-left: 3px solid var(--success);
  background: var(--success-soft);
  color: #466354;
  font-size: 8px;
}

.report-source-stamp {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #d4dee5;
  border-left: 4px solid var(--stc-blue);
  border-radius: 8px;
  background: white;
  color: var(--stc-blue);
}

.report-source-stamp > div {
  display: grid;
}

.report-source-stamp strong {
  font-size: 10px;
}

.report-source-stamp span {
  color: var(--muted);
  font-size: 8px;
}

.report-executive-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 12px;
}

.report-executive-grid article {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.report-executive-grid article > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
}

.report-executive-grid article > strong {
  margin-top: 5px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.report-executive-grid article > small,
.report-executive-grid article > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.report-lead-card {
  border-top: 3px solid var(--stc-blue) !important;
}

.report-risk-card {
  border-top: 3px solid var(--danger) !important;
}

.report-risk-card > strong {
  color: var(--danger);
}

.report-progress {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf1f3;
}

.report-progress span {
  display: block;
  height: 100%;
  background: var(--stc-blue);
}

.report-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.report-status-panel,
.report-touchpoint-panel,
.report-control-panel {
  padding: 19px;
}

.report-status-list {
  display: grid;
  gap: 11px;
}

.report-status-list > div {
  display: grid;
  grid-template-columns: 95px 1fr 28px 32px;
  align-items: center;
  gap: 9px;
}

.report-status-list > div > span {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 650;
}

.report-status-track {
  height: 7px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf1f3;
}

.report-status-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--muted-2);
}

.report-tone-info span { background: var(--info); }
.report-tone-install span { background: var(--install); }
.report-tone-success span { background: var(--success); }
.report-tone-danger span { background: var(--danger); }
.report-tone-muted span { background: #aeb7be; }

.report-status-list b {
  text-align: right;
  font-size: 11px;
}

.report-status-list small {
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 9px;
}

.mini-table th {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.mini-table tr:last-child td {
  border-bottom: 0;
}

.report-caveat {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.report-control-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border-left: 4px solid var(--warning);
}

.report-control-icon {
  width: 39px;
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--warning);
}

.report-control-panel h2 {
  margin: 2px 0 1px;
  font-size: 13px;
}

.report-control-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.data-health-strip {
  min-height: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
}

.data-health-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  gap: 1px 9px;
  padding: 12px 15px;
  border-right: 1px solid var(--line-soft);
}

.data-health-strip > div:last-child {
  border-right: 0;
}

.data-health-strip svg {
  grid-row: 1 / 3;
  color: var(--stc-blue);
}

.data-health-strip span {
  color: var(--muted);
  font-size: 8px;
}

.data-health-strip strong {
  font-size: 10px;
}

.source-table-panel {
  padding-top: 17px;
  overflow: hidden;
}

.source-table-panel > .panel-heading {
  padding: 0 18px;
}

.source-table {
  min-width: 980px;
}

.source-type {
  padding: 3px 6px;
  border-radius: 5px;
  background: #f0f3f5;
  color: var(--muted);
  font-family: var(--font-mono), monospace;
  font-size: 8px;
}

.data-lower-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.data-model-panel,
.activation-panel {
  padding: 19px;
}

.record-model {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: stretch;
  gap: 17px;
}

.record-root {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 9px;
  background: var(--stc-blue);
  color: white;
}

.record-root::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 17px;
  height: 1px;
  background: var(--line);
}

.record-root span {
  font-size: 8px;
  opacity: 0.75;
}

.record-root strong {
  font-family: var(--font-mono), monospace;
  font-size: 12px;
}

.record-branches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.record-branches > div {
  display: grid;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--stc-blue);
  background: #fbfcfc;
}

.record-branches > div:nth-child(2),
.record-branches > div:nth-child(4) {
  border-left-color: var(--stc-olive);
}

.record-branches > div:nth-child(3),
.record-branches > div:nth-child(5) {
  border-left-color: var(--install);
}

.record-branches span {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.record-branches strong {
  font-size: 9px;
}

.data-model-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.activation-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activation-list li {
  position: relative;
  min-height: 52px;
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 8px;
}

.activation-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 11px;
  width: 1px;
  background: var(--line);
}

.activation-list li > span {
  width: 23px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--muted-2);
  z-index: 1;
}

.activation-list li.is-complete > span {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

.activation-list li > div {
  display: grid;
  align-content: start;
}

.activation-list strong {
  font-size: 9px;
}

.activation-list small {
  color: var(--muted);
  font-size: 8px;
}

.security-banner {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border: 1px solid #c7dae7;
  border-radius: 10px;
  background: var(--stc-blue-50);
}

.security-banner > div:first-child {
  width: 39px;
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--stc-blue);
  color: white;
}

.security-banner > div:nth-child(2) {
  display: grid;
}

.security-banner strong {
  color: var(--stc-blue-700);
  font-size: 10px;
}

.security-banner p {
  margin: 1px 0 0;
  color: #587183;
  font-size: 8px;
}

.security-banner > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--stc-blue);
  font-size: 9px;
  font-weight: 730;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(500px, 1.1fr);
  background: white;
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(34px, 5vw, 72px);
  overflow: hidden;
  background: var(--stc-blue);
  color: white;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 390px;
  height: 390px;
  border: 55px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.login-stc-logo {
  width: 190px;
  padding: 9px 12px;
  border-radius: 8px;
  background: white;
}

.login-stc-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.login-brand-copy {
  margin-top: clamp(58px, 10vh, 110px);
  max-width: 560px;
}

.login-brand-copy > span {
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.login-brand-copy h1 {
  margin: 11px 0 13px;
  font-size: clamp(38px, 4.6vw, 67px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-brand-copy p {
  max-width: 500px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.login-control-list {
  display: grid;
  gap: 13px;
  margin-top: 34px;
}

.login-control-list > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.login-control-list svg {
  color: #c5d181;
  flex-shrink: 0;
}

.login-control-list span {
  display: grid;
}

.login-control-list strong {
  font-size: 10px;
}

.login-control-list small {
  color: rgba(255, 255, 255, 0.65);
  font-size: 8px;
}

.login-partners {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 44px;
}

.login-partners > div {
  height: 48px;
  min-width: 115px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 7px;
  background: white;
  overflow: hidden;
}

.login-partners img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.login-partners > div:first-child img {
  width: 89px;
  height: 89px;
}

.login-partners > span {
  width: 1px;
  height: 31px;
  background: rgba(255, 255, 255, 0.25);
}

.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #f8fafb;
}

.login-form-wrap {
  width: min(420px, 100%);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-md);
}

.login-form-wrap h2 {
  margin: 5px 0 5px;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.login-form-wrap > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.login-error {
  margin-top: 15px;
  padding: 9px 11px;
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 9px;
}

.login-success {
  margin-top: 15px;
  padding: 9px 11px;
  border-left: 3px solid var(--success);
  background: var(--success-soft);
  color: var(--success);
  font-size: 9px;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 23px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 680;
}

.login-form input {
  height: 42px;
  padding: 0 11px;
  border: 1px solid #cbd6dd;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 11px;
}

.login-form .button {
  width: 100%;
  margin-top: 3px;
}

.auth-text-link {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 11px;
  color: var(--stc-blue);
  font-size: 9px;
  font-weight: 720;
}

.auth-text-link:hover {
  text-decoration: underline;
}

.recovery-confirmation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  margin-top: 21px;
  padding: 14px;
  border: 1px solid #c6e3d1;
  border-radius: 9px;
  background: var(--success-soft);
  color: var(--success);
}

.recovery-confirmation div {
  display: grid;
  gap: 2px;
}

.recovery-confirmation strong {
  font-size: 10px;
}

.recovery-confirmation span {
  color: #4f755d;
  font-size: 9px;
}

.demo-entry-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 11px;
  border: 1px solid #ccdae4;
  border-radius: 8px;
  color: var(--stc-blue);
  font-size: 9px;
  font-weight: 720;
}

.login-help {
  display: block;
  margin-top: 17px;
  color: var(--muted-2);
  font-size: 8px;
  text-align: center;
}

@media (max-width: 1240px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integrity-panel {
    grid-column: 1 / -1;
  }

  .queue-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .store-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .store-summary-grid article:nth-child(3) {
    border-right: 0;
  }

  .store-summary-grid article:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line-soft);
  }

  .report-executive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .issue-card {
    grid-template-columns: 76px minmax(0, 1fr) 118px;
  }
}

@media (max-width: 1050px) {
  .app-shell {
    display: block;
  }

  .sidebar,
  .topbar {
    display: none;
  }

  .workspace {
    min-height: 100vh;
  }

  .mobile-brand-row {
    height: 59px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: white;
  }

  .mobile-brand-row img {
    width: 132px;
    height: auto;
  }

  .mobile-brand-row span {
    color: var(--stc-blue);
    font-size: 10px;
    font-weight: 730;
  }

  .mobile-nav-list {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: white;
    scrollbar-width: none;
  }

  .mobile-nav-list::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav-list .nav-link {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 9px;
    font-size: 9px;
  }

  .mobile-nav-list .nav-link.is-active::before {
    display: none;
  }

  .main-content {
    padding: 25px 21px 42px;
  }

  .dashboard-grid-primary,
  .store-operating-grid,
  .store-lower-grid,
  .report-grid,
  .data-lower-grid {
    grid-template-columns: 1fr;
  }

  .queue-kpi-strip {
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    overflow-x: auto;
  }

  .queue-kpi-strip > a {
    display: none;
  }

  .store-hero {
    grid-template-columns: 1fr auto;
  }

  .store-hero-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .issue-toolbar {
    grid-template-columns: repeat(3, 1fr);
  }

  .issue-toolbar .search-field {
    grid-column: 1 / -1;
  }

  .login-page {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

@media (max-width: 760px) {
  .main-content {
    padding: 20px 14px 36px;
  }

  .page-stack {
    gap: 14px;
  }

  .page-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .button {
    flex: 1;
  }

  .source-alert {
    grid-template-columns: auto 1fr;
  }

  .source-alert > a {
    grid-column: 2;
  }

  .metric-grid,
  .dashboard-grid-secondary,
  .issue-kpi-grid,
  .report-executive-grid,
  .data-health-strip {
    grid-template-columns: 1fr 1fr;
  }

  .integrity-panel {
    grid-column: auto;
  }

  .flow-row {
    grid-template-columns: 31px 1fr 32px;
  }

  .flow-track {
    display: none;
  }

  .queue-filters {
    grid-template-columns: 1fr 1fr;
  }

  .filter-label {
    grid-column: 1 / -1;
  }

  .queue-filters label:last-child {
    grid-column: 1 / -1;
  }

  .queue-summary-row {
    flex-wrap: wrap;
    padding-block: 7px;
  }

  .pagination-row {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 10px;
  }

  .store-hero {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .store-hero-status {
    display: flex;
    flex-wrap: wrap;
  }

  .store-hero-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .store-hero-actions .button {
    flex: 1;
  }

  .store-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .store-summary-grid article,
  .store-summary-grid article:nth-child(3) {
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
  }

  .store-summary-grid article:nth-child(2n) {
    border-right: 0;
  }

  .store-summary-grid article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .issue-card {
    grid-template-columns: 1fr auto;
  }

  .issue-card-priority {
    grid-column: 1;
  }

  .issue-card-main {
    grid-column: 1 / -1;
  }

  .issue-card-status {
    grid-column: 2;
    grid-row: 1;
  }

  .issue-resolution {
    grid-column: 1 / -1;
  }

  .issue-toolbar {
    grid-template-columns: 1fr;
  }

  .issue-toolbar .search-field {
    grid-column: auto;
  }

  .report-control-panel,
  .security-banner {
    grid-template-columns: auto 1fr;
  }

  .report-control-panel .button,
  .security-banner > span {
    grid-column: 2;
    justify-self: start;
  }

  .record-model {
    grid-template-columns: 1fr;
  }

  .record-root {
    min-height: 68px;
  }

  .record-root::after {
    display: none;
  }

  .login-page {
    display: block;
  }

  .login-brand-panel {
    min-height: 390px;
    padding: 27px;
  }

  .login-brand-copy {
    margin-top: 48px;
  }

  .login-control-list {
    display: none;
  }

  .login-partners {
    margin-top: 38px;
    padding-top: 0;
  }

  .login-form-panel {
    padding: 22px 14px 38px;
  }

  .login-form-wrap {
    padding: 27px 23px;
  }
}

@media (max-width: 500px) {
  .mobile-brand-row span {
    display: none;
  }

  .metric-grid,
  .dashboard-grid-secondary,
  .issue-kpi-grid,
  .report-executive-grid,
  .data-health-strip {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 111px;
  }

  .queue-kpi-strip {
    grid-template-columns: repeat(5, 112px);
  }

  .queue-filters {
    grid-template-columns: 1fr;
  }

  .filter-label,
  .queue-filters label:last-child {
    grid-column: auto;
  }

  .store-hero-main {
    align-items: flex-start;
  }

  .store-number-lockup {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
  }

  .store-hero-copy h1 {
    font-size: 21px;
  }

  .store-summary-grid {
    grid-template-columns: 1fr;
  }

  .store-summary-grid article,
  .store-summary-grid article:nth-child(2n),
  .store-summary-grid article:nth-child(3) {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .store-summary-grid article:last-child {
    border-bottom: 0;
  }

  .lifecycle-step small {
    font-size: 7px;
  }

  .issue-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .record-branches {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 350px;
  }

  .login-partners > div {
    min-width: 105px;
  }
}

@media print {
  .sidebar,
  .topbar,
  .mobile-brand-row,
  .mobile-nav-list,
  .print-hidden,
  .heading-actions {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main-content {
    max-width: none;
    padding: 0;
  }

  .panel,
  .report-executive-grid article {
    break-inside: avoid;
    box-shadow: none;
  }

  body {
    background: white;
  }
}


/* Multi-store department workboards */
.department-queue {
  overflow: hidden;
}

.department-queue-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.department-queue-header h2 {
  margin: 4px 0;
}

.department-queue-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.department-queue-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(390px, 100%);
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
}

.department-queue-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(19 85 142 / 10%);
}

.department-queue-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.department-queue-table-wrap {
  overflow-x: auto;
}

.department-queue-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

.department-queue-table th {
  padding: 12px 18px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.department-queue-table td {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.88rem;
}

.department-queue-table tbody tr:hover {
  background: #fafcfe;
}

.department-queue-table td strong,
.department-queue-table td small {
  display: block;
}

.department-queue-table td small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.workstream-stage {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf2f8;
  color: #14527d;
  font-size: 0.75rem;
  font-weight: 750;
}

.workstream-stage.is-complete {
  background: #e8f5ec;
  color: #246b3a;
}

.workstream-stage.is-blocked {
  background: #fff0ec;
  color: #a6402d;
}

.blocked-reason {
  display: flex !important;
  align-items: center;
  gap: 5px;
  color: #a6402d !important;
}

.queue-open-link {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--blue);
}

.queue-open-link:hover {
  border-color: var(--blue);
  background: #f0f6fb;
}

.department-queue-empty {
  padding: 32px !important;
  color: var(--muted);
  text-align: center;
}

.workflow-pilot-note {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 760px) {
  .department-queue-header {
    align-items: stretch;
    flex-direction: column;
  }

  .department-queue-search {
    width: 100%;
  }
}

/* Compact operational editing */
.queue-editing-mode {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 750;
}

.department-queue-table tr.is-editing {
  background: #f5f9fc;
}

.queue-due-date {
  display: flex !important;
  align-items: center;
  gap: 5px;
}

.queue-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.queue-edit-button,
.queue-open-link {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
  color: var(--blue);
  cursor: pointer;
}

.queue-edit-button:hover,
.queue-open-link:hover {
  border-color: var(--blue);
  background: #f0f6fb;
}

.compact-editor-row td {
  padding: 0 !important;
  background: #f5f9fc;
}

.compact-queue-editor {
  padding: 16px 18px 18px;
  border-top: 1px solid #dbe8f1;
  border-bottom: 1px solid #dbe8f1;
}

.compact-editor-grid {
  display: grid;
  grid-template-columns: minmax(155px, 0.8fr) minmax(190px, 1fr) minmax(145px, 0.7fr) minmax(220px, 1.4fr);
  gap: 12px;
}

.compact-editor-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.compact-editor-grid label > span {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-editor-grid label small {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.compact-editor-grid input,
.compact-editor-grid select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
}

.compact-editor-grid input:focus,
.compact-editor-grid select:focus {
  border-color: var(--blue);
  outline: 3px solid rgb(19 85 142 / 10%);
}

.compact-editor-wide {
  grid-column: span 2;
}

.compact-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.compact-editor-help,
.compact-editor-error {
  margin: 0 auto 0 0;
  font-size: 0.76rem;
}

.compact-editor-help {
  color: var(--muted);
}

.compact-editor-error {
  color: #a6402d;
  font-weight: 700;
}

@media (max-width: 1050px) {
  .compact-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .compact-editor-grid {
    grid-template-columns: 1fr;
  }

  .compact-editor-wide {
    grid-column: auto;
  }

  .compact-editor-footer {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .compact-editor-help,
  .compact-editor-error {
    flex-basis: 100%;
  }
}

.order-actions-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.order-actions-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.order-actions-heading h2,
.order-actions-panel.is-read-only h2 {
  margin: 3px 0 0;
  font-size: 1.08rem;
}

.order-actions-heading p,
.order-actions-panel.is-read-only p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.order-actions-panel.is-read-only {
  grid-template-columns: minmax(190px, .45fr) minmax(280px, 1fr);
  align-items: center;
}

.order-action-feedback {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 700;
}

.order-action-feedback.is-success { background: var(--success-soft); color: var(--success); }
.order-action-feedback.is-error { background: #fbecea; color: #a6402d; }

.order-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}

.order-action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.order-action-card[open] { grid-column: span 2; box-shadow: 0 8px 22px rgba(25, 43, 56, .08); }

.order-action-card summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--stc-blue);
  list-style: none;
}

.order-action-card summary::-webkit-details-marker { display: none; }
.order-action-card summary span { display: grid; gap: 2px; }
.order-action-card summary strong { color: var(--ink); font-size: .84rem; }
.order-action-card summary small { color: var(--muted); font-size: .7rem; font-weight: 500; }

.order-action-card > form,
.order-action-card > .compact-issue-actions {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfd;
}

.order-action-card label {
  display: grid;
  gap: 4px;
  color: var(--ink-2);
  font-size: .7rem;
  font-weight: 700;
}

.order-action-card input,
.order-action-card select,
.order-action-card textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 7px 9px;
  font: inherit;
  font-size: .78rem;
}

.order-action-card textarea { resize: vertical; }
.order-action-card .button { justify-self: end; min-height: 34px; padding: 7px 11px; }

.compact-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.compact-issue-actions form {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(180px, 1.2fr) auto;
  align-items: end;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-soft);
}

.compact-issue-actions form:last-child { padding-bottom: 0; border-bottom: 0; }
.compact-issue-actions form > div { display: grid; gap: 2px; }
.compact-issue-actions span { color: var(--muted); font-size: .67rem; }
.compact-issue-actions strong { font-size: .78rem; }

.timeline-event a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: var(--stc-blue);
  font-size: .72rem;
  font-weight: 750;
}

@media (max-width: 980px) {
  .order-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-action-card[open] { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .order-actions-heading,
  .order-actions-panel.is-read-only { display: grid; grid-template-columns: 1fr; }
  .order-action-grid { grid-template-columns: 1fr; }
  .order-action-card[open] { grid-column: auto; }
  .compact-form-row,
  .compact-issue-actions form { grid-template-columns: 1fr; }
  .order-action-card .button { justify-self: stretch; }
}


/* Program scope: the sidebar switcher, row-level open buttons and the settings picker. */
.program-card-switcher select { width: 100%; min-height: 34px; padding: 0 8px; border: 1px solid #cddde8; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; }
.inline-form { display: inline; }
.link-button { padding: 0; border: 0; background: none; color: var(--stc-blue); font: inherit; text-align: left; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.settings-program { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border: 1px solid #cddde8; border-radius: var(--radius); background: var(--stc-blue-50); }
.settings-program select { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; }
.settings-program small { color: var(--muted); }
tr.is-selected td { background: var(--stc-blue-50); }

/* Location page: main column + notes pane, work order table, touchpoint tiles, proof pop-up. */
.loc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.loc-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.loc-main > .loc-panel { grid-template-columns: minmax(0, 1fr); }
/* The notes pane narrows the main column, so the summary strip always stacks its stats above the actions. */
.loc-main .loc-strip, .loc-main .loc-strip:has(.quick-actions) { grid-template-columns: minmax(0, 1fr); }
.loc-main .loc-strip .quick-actions { flex-wrap: wrap; justify-content: flex-start; }
.loc-notes-pane { position: sticky; top: 60px; display: grid; align-content: start; gap: 9px; max-height: calc(100vh - 76px); overflow: auto; padding: 16px; }
.loc-notes-pane > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.loc-notes-pane h2 { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 16px; }
.loc-notes-pane h3 { margin: 6px 0 0; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.loc-notes-pane h3.is-internal { color: var(--stc-blue); }
.loc-notes-pane h3.is-external { color: var(--stc-olive-700); }
.loc-notes-pane .notes-list article { padding: 9px 11px; }
.loc-notes-pane .notes-list article p { font-size: 12px; }
@media (max-width: 1180px) {
  .loc-layout { grid-template-columns: minmax(0, 1fr); }
  .loc-notes-pane { position: static; max-height: none; }
}

.wo-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
.wo-table .wo-col-order { width: 22%; }
.wo-table .wo-col-date { width: 16%; }
.wo-table .wo-col-status { width: 15%; }
.wo-table .wo-col-lift { width: 9%; }
.wo-table .wo-col-materials { width: 11%; }
.wo-table .wo-col-freight { width: 11%; }
.wo-table .wo-col-proof { width: 16%; }
/* Header: a tinted band so it reads as the column labels for every group below. */
.wo-table thead th { padding: 6px 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f3f6f9; color: #5b6f80; font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.wo-table thead th:first-child { padding-left: 9px; border-left: 1px solid var(--line); border-top-left-radius: 8px; }
.wo-table thead th:last-child { border-right: 1px solid var(--line); border-top-right-radius: 8px; }
/* Service level group: a full-width bar in the level's colour (palette shared with the pills), darker left edge. */
.wo-table tr.wo-group-row th { height: 27px; padding: 4px 10px 4px 12px; border: 0; box-shadow: inset 4px 0 0 currentColor; font-size: 11.5px; letter-spacing: 0.02em; text-align: left; }
.wo-table tr.wo-group-row th strong { font-weight: 800; }
.wo-table tbody + tbody tr.wo-group-row th { border-top: 6px solid var(--surface, #fff); }
.wo-group-count { float: right; margin-top: 1px; color: inherit; font-size: 10.5px; font-weight: 650; opacity: 0.8; }
/* Rows: one compact line each. */
.wo-table td { overflow: hidden; height: 31px; padding: 3px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap; }
.wo-table td strong { font-size: 12px; }
.wo-table td.wo-order-cell { text-overflow: ellipsis; }
.wo-parent { margin-left: 6px; color: var(--muted); font-size: 10.5px; }
.wo-parent.is-return { color: #9a5418; }
.wo-muted { color: var(--muted); }
.wo-table tr.wo-line td:first-child { padding-left: 6px; border-left: 3px solid transparent; }
.wo-table tr.wo-line:hover td { background: var(--stc-blue-50); }
.wo-table tr.is-blocked td { background: #fdf4f3; }
.wo-table tr.is-blocked td:first-child { border-left-color: var(--danger); }
.wo-table .chip { min-height: 18px; padding: 0 7px; font-size: 10px; white-space: nowrap; }
.wo-tone { display: inline-flex; align-items: center; gap: 5px; overflow: hidden; max-width: 100%; color: var(--ink-2); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.wo-tone i { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #9aa8b4; }
.wo-tone.is-success i { background: #3f8f4f; }
.wo-tone.is-info i { background: #2f6fae; }
.wo-tone.is-warning i { background: #c98a12; }
.wo-tone.is-danger i { background: #c0392b; }
.wo-tone.is-muted { color: var(--muted); font-weight: 500; }
.wo-tone.is-muted i { background: #cfd8df; }
.wo-table tr.wo-visits-row td { height: auto; padding: 0 6px 3px 9px; white-space: normal; }
.wo-table tr.wo-line:has(+ tr.wo-visits-row) td { height: 26px; padding-bottom: 0; }
/* An order and its visit links read as one block. */
.wo-table tr.wo-line:has(+ tr.wo-visits-row) td { border-bottom-color: transparent; }
.wo-table tr.wo-visits-row td { border-left: 3px solid transparent; }
.wo-table tr.is-blocked + tr.wo-visits-row td { border-left-color: var(--danger); background: #fdf4f3; }
.wo-visit-links { display: flex; flex-wrap: wrap; gap: 4px; }
.wo-visit-links a { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; min-height: 18px; line-height: 1.2; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 11px; }
.wo-visit-links a:hover { border-color: #9fbcd4; background: var(--stc-blue-50); }
.wo-visit-links .chip { min-height: 14px; padding: 0 5px; font-size: 9.5px; }
.wo-proof-button { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border: 1px solid #c9d5df; border-radius: 7px; background: #fff; color: var(--stc-blue); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.wo-proof-button svg + svg, .wo-proof-button svg:not(:first-child) { margin-left: 4px; }
.wo-proof-button:hover { border-color: #9fbcd4; background: var(--stc-blue-50); }
.wo-proof-none { color: var(--muted); font-size: 11px; white-space: nowrap; }

.tp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.tp-tile { display: grid; align-content: start; gap: 4px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.tp-tile header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tp-tile strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tp-tile small { color: var(--muted); font-size: 11px; }
.tp-tile .chip { min-height: 18px; padding: 0 7px; font-size: 10px; }
.tp-tile.is-success { border-color: #cfe3cf; }
.tp-bar { height: 4px; overflow: hidden; border-radius: 999px; background: #e6edf2; }
.tp-bar span { display: block; height: 100%; background: var(--stc-olive); }

.proof-visit-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.proof-visit-tabs button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.proof-visit-tabs button span { margin-left: 4px; color: var(--muted); font-weight: 600; }
.proof-visit-tabs button.is-active { border-color: var(--stc-blue); background: var(--stc-blue); color: #fff; }
.proof-visit-tabs button.is-active span { color: rgba(255, 255, 255, 0.8); }
.proof-quick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.proof-quick h3 { margin: 0 0 8px; font-size: 13px; }
.proof-quick h3 span { color: var(--muted); font-weight: 600; }
.proof-quick .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.proof-signoff-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; }
.proof-signoff-line .chip { min-height: 18px; padding: 0 7px; font-size: 10px; text-transform: capitalize; }
.proof-sheet { display: grid; gap: 6px; margin-bottom: 10px; }
.proof-sheet iframe, .proof-sheet img { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: 8px; background: #f5f7f9; object-fit: contain; }
.proof-waived { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: #fff7e6; font-size: 12px; }
@media (max-width: 900px) { .proof-quick { grid-template-columns: minmax(0, 1fr); } }

/* ---- Location page redesign (visual only; scoped to .loc-page) ---- */
/* Header: shorter, the store code as a compact badge, status blocks aligned to it. */
.loc-page .loc-hero { padding: 12px 16px; }
.loc-page .loc-hero [class*="locationCode"] { min-width: 64px; padding: 7px 10px; border-radius: 9px; }
.loc-page .loc-hero [class*="locationCode"] span { font-size: 9.5px; }
.loc-page .loc-hero [class*="locationCode"] strong { font-size: 17px; }
.loc-page .loc-title { font-size: 20px; }
.loc-page .loc-hero p { font-size: 11.5px; }
.loc-page .loc-hero-status { gap: 8px; }
.loc-page .loc-hero-status .loc-status-block { min-width: 132px; padding: 6px 10px; gap: 2px; }

/* Tabs: an underline bar that never wraps; scrolls sideways on narrow screens. */
.loc-page .loc-tabs { flex-wrap: nowrap; gap: 2px; overflow-x: auto; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--bg, #eef2f6); box-shadow: none; scrollbar-width: none; }
.loc-page .loc-tabs::-webkit-scrollbar { display: none; }
.loc-page .loc-tabs button { flex: 0 0 auto; margin-bottom: -1px; padding: 9px 8px 8px; gap: 5px; font-size: 11.5px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #4d6377; white-space: nowrap; }
.loc-page .loc-tabs button:hover { background: transparent; color: var(--stc-blue); }
.loc-page .loc-tabs button.is-active { border-bottom-color: var(--stc-blue); background: transparent; color: var(--stc-blue); box-shadow: none; }
.loc-page .loc-tabs button span, .loc-page .loc-tabs button.is-active span { background: #e2e8ee; color: #3d5266; }
.loc-page .loc-tabs button.is-active span { background: var(--stc-blue); color: #fff; }

/* Section headings: one consistent size; descriptions as a single muted line. */
.loc-page .panel-heading { min-height: 0; align-items: center; margin-bottom: 10px; }
.loc-page .panel-heading .eyebrow { font-size: 9.5px; }
.loc-page .panel-heading h2 { font-size: 15px; }
.loc-page .panel-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.loc-page .panel-heading > div:last-child:not(:first-child) { flex: 0 0 auto; }
.loc-page .panel-heading .button { min-height: 30px; padding: 0 11px; font-size: 12px; white-space: nowrap; }
.loc-page [class*="section"] { padding: 16px; }
/* Counts are information, not alarms; red only where something is open. */
.loc-page .panel-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: #e6ecf1; color: #3d5266; font-size: 10.5px; }
.loc-page .panel-count.is-alert { background: var(--danger-soft); color: var(--danger); }
/* Empty states: neutral, quiet. */
.loc-page .compact-empty { min-height: 72px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; }

/* Overview summary: six stats in one bar, actions on their own row. */
.loc-page .loc-strip, .loc-page .loc-strip:has(.quick-actions) { gap: 0; padding: 0; overflow: hidden; }
.loc-page .loc-strip-stats { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.4fr 1fr 1fr; gap: 0; }
.loc-page .loc-strip-stats > * { min-width: 0; padding: 10px 9px; gap: 0 7px; border: 0; border-right: 1px solid var(--line-soft); border-radius: 0; background: #fff; }
.loc-page .loc-strip-stats > *:last-child { border-right: 0; }
.loc-page .loc-strip-stats strong { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.loc-page .loc-strip-stats span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-page .loc-strip .quick-actions { gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line-soft); background: #f8fafc; }
.loc-page .loc-strip .quick-actions button, .loc-page .loc-strip .quick-actions a { min-height: 30px; padding: 5px 10px; }

/* Touchpoints tab: one divided list instead of boxed cards; quiet controls. */
.loc-page .tp-manage { gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
/* Code | name | status | Save | Remove: the name form is flattened into the row so Save sits beside Remove. */
.loc-page .tp-manage-row > form:first-of-type { display: contents; }
.loc-page .tp-manage-row > .tp-chip { order: 1; }
.loc-page .tp-manage-row input[name="description"], .loc-page .tp-manage-row > strong { order: 2; }
.loc-page .tp-manage-row > .chip { order: 3; }
.loc-page .tp-manage-row > form:first-of-type button { order: 4; }
.loc-page .tp-manage-row > form:last-of-type, .loc-page .tp-manage-row > span:last-child { order: 5; }
.loc-page .tp-manage-row { grid-template-columns: 80px minmax(0, 1fr) auto auto auto; gap: 8px; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; box-shadow: none; }
.loc-page .tp-manage-row:last-child { border-bottom: 0; }
.loc-page .tp-manage-row:hover { background: #f8fbfd; }
.loc-page .tp-manage-row input { min-height: 28px; border-color: transparent; background: transparent; font-size: 12.5px; }
.loc-page .tp-manage-row input:hover { border-color: var(--line); background: #fff; }
.loc-page .tp-manage-row input:focus { border-color: #9fbcd4; background: #fff; outline: none; }
.loc-page .tp-manage-row .button { min-height: 26px; padding: 0 9px; border-color: transparent; background: transparent; color: var(--stc-blue); font-size: 11.5px; }
.loc-page .tp-manage-row .button:hover { border-color: var(--line); background: #fff; }
.loc-page .tp-manage-row .chip { min-height: 20px; padding: 1px 8px; font-size: 10.5px; }

/* Inventory: compact rows, numbers right-aligned, quieter pack list and link. */
.loc-page .inv-table th { height: 32px; padding: 0 10px; font-size: 9.5px; }
.loc-page .inv-table td { padding: 6px 10px; font-size: 12px; }
.loc-page .inv-table td:nth-child(3), .loc-page .inv-table td:nth-child(4), .loc-page .inv-table th:nth-child(3), .loc-page .inv-table th:nth-child(4) { text-align: right; }
.loc-page .inv-table td:nth-child(5) { color: var(--muted); font-size: 11px; white-space: nowrap; }
.loc-page .inv-table td:nth-child(6) a { color: var(--stc-blue); font-size: 11.5px; font-weight: 700; white-space: nowrap; }

/* Evidence: actions as a compact row, denser photos. */
.loc-page .order-actions-panel { padding: 12px 16px; }
.loc-page .order-actions-heading { margin-bottom: 8px; }
.loc-page .order-actions-heading h2 { font-size: 15px; }
.loc-page .order-action-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.loc-page .order-action-grid .modal-trigger-card { width: auto; min-height: 32px; padding: 5px 11px; }
.loc-page .order-action-grid .modal-trigger-card small { display: none; }
.loc-page .order-action-grid .modal-trigger-card strong { font-size: 12px; }
.loc-page .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }

/* Notes pane heading. */
.loc-page .loc-notes-pane > header { align-items: center; }
.loc-page .loc-notes-pane h2 { margin: 0; font-size: 15px; }
.loc-page .loc-notes-pane > header .button, .loc-page .loc-notes-pane > header button { min-height: 28px; padding: 0 10px; font-size: 12px; }

/* Location Work Orders tab: service level tabs above the table. */
.wo-level-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 10px; padding: 3px; border-radius: 9px; background: #edf1f5; }
.wo-level-tabs button { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; min-height: 27px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: #4d6377; font: inherit; font-size: 11px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.wo-level-tabs button:hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); }
.wo-level-tabs button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 40, 64, 0.12); }
.wo-level-tabs button span { min-width: 18px; padding: 0 5px; border-radius: 999px; background: #dfe6ec; color: #3d5266; font-size: 10px; text-align: center; }
.wo-level-tabs button.is-active span { background: var(--stc-blue); color: #fff; }
.wo-level-tabs i.wo-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Location work orders, redesign: one framed table with its toolbar, readiness grouped, quiet empties. */
.wo-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.wo-shell .table-scroll { border: 0; border-radius: 0; }
.wo-shell .wo-level-tabs { margin: 0; padding: 5px 6px; border-bottom: 1px solid var(--line); border-radius: 0; background: #f6f8fa; }
.wo-shell .wo-table thead th, .wo-shell .wo-table thead th:first-child, .wo-shell .wo-table thead th:last-child { border-top: 0; border-right: 0; border-left: 0; border-radius: 0; }
.wo-shell .wo-table thead th:first-child { padding-left: 9px; }
.wo-table tr.wo-head-group th { height: 18px; padding: 5px 8px 0; border-bottom: 0; }
.wo-table tr.wo-head-group th.wo-readiness { padding-bottom: 2px; border-bottom: 1px solid #cdd8e2; color: #34526d; text-align: center; }
.wo-table { font-variant-numeric: tabular-nums; }
.wo-table tr.wo-line { cursor: pointer; }
.wo-table tr.is-blocked td { background: transparent; }
.wo-table tr.wo-line.is-blocked:hover td, .wo-table tr.wo-line:hover td { background: var(--stc-blue-50); }
.wo-parent, .wo-parent.is-return { color: var(--muted); }
.wo-empty { color: #a3b0bb; }
.wo-tone.is-neutral i { background: #b3bfc9; }
.wo-proof-button { padding: 0; border: 0; background: transparent; color: var(--stc-blue); font-size: 11px; font-weight: 650; }
.wo-proof-button:hover { border: 0; background: transparent; text-decoration: underline; }
.wo-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 7px; padding-left: 2px; }
.wo-legend .wo-tone { color: var(--muted); font-size: 10.5px; font-weight: 600; }

/* ---- Work Orders page (register) redesign ---- */
.wor-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.wor-head h1 { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 22px; }
.wor-head .panel-count, .wor-page .panel-count { min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; background: #e6ecf1; color: #3d5266; font-size: 11px; }
.wor-shell { padding: 0; overflow: visible; }
.wor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f6f8fa; border-radius: var(--radius) var(--radius) 0 0; }
.wor-toolbar input, .wor-toolbar select { min-height: 30px; padding: 0 8px; border: 1px solid #cdd8e2; border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.wor-toolbar select { max-width: 122px; }
.wor-search { display: inline-flex; flex: 1 1 160px; align-items: center; gap: 6px; min-width: 140px; padding-left: 8px; border: 1px solid #cdd8e2; border-radius: 7px; background: #fff; color: var(--muted); }
.wor-search input { flex: 1; min-width: 0; border: 0; padding-left: 0; }
/* Date range (owner 2026-11-16): two clear From / To boxes, roomy and easy to type in or click */
.wor-dates { display: inline-flex; align-items: center; gap: 6px; }
.wor-date { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px; border: 1.5px solid #b9c8d6; border-radius: 9px; background: #fff; color: #3d5266; cursor: text; transition: border-color .15s, box-shadow .15s; }
.wor-date:hover { border-color: var(--stc-blue, #1f4f88); }
.wor-date:focus-within { border-color: var(--stc-blue, #1f4f88); box-shadow: 0 0 0 3px rgba(31,79,136,.18); }
.wor-date svg { flex: none; color: var(--stc-blue, #1f4f88); cursor: pointer; }
.wor-date-k { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5d6b7a; cursor: pointer; }
.wor-toolbar .wor-date input { width: 132px; min-height: 32px; border: 0; padding: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.wor-date input:focus { outline: none; }
.wor-date input::-webkit-datetime-edit-fields-wrapper { padding: 2px 0; }
.wor-date input::-webkit-datetime-edit-month-field:focus, .wor-date input::-webkit-datetime-edit-day-field:focus,
.wor-date input::-webkit-datetime-edit-year-field:focus { background: #dce8f5; color: var(--ink); border-radius: 4px; }
.wor-date input::-webkit-calendar-picker-indicator { display: none; }
.wor-date-sep { color: #8a99a8; font-weight: 700; }
.wor-toolbar .button { min-height: 30px; padding: 0 14px; font-size: 12px; }
.wor-clear { color: var(--stc-blue); font-size: 12px; font-weight: 700; }
.wor-scroll { overflow: visible; }
.wor-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.wor-c-order { width: 16%; } .wor-c-status { width: 11.85%; } .wor-c-level { width: 11.1%; } .wor-c-loc { width: 11.1%; } .wor-c-date { width: 7.5%; }
.wor-c-tp { width: 16.8%; } .wor-c-issues { width: 3.4%; } .wor-c-prog { width: 10.5%; } .wor-c-proof { width: 4.25%; }
.wor-table td:last-child { padding: 0; text-align: center; }
/* Header stays under the top bar while scrolling 80+ orders. */
.wor-table thead th { position: sticky; top: var(--wor-sticky-top, 52px); z-index: 3; height: 32px; padding: 0 6px; border-bottom: 1px solid var(--line); background: #f3f6f9; color: #5b6f80; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.wor-table td { overflow: hidden; height: 36px; padding: 4px 6px; border-bottom: 1px solid var(--line-soft); text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.wor-table td a { color: var(--stc-blue); font-weight: 650; }
.wor-table td strong { color: var(--ink); font-size: 12.5px; }
.wor-table td:first-child { border-left: 3px solid transparent; }
.wor-table tbody tr { cursor: pointer; }
.wor-table tbody tr:hover td { background: var(--stc-blue-50); }
.wor-table tbody tr.is-blocked td:first-child { border-left-color: var(--danger); }
.wor-table .chip { min-height: 19px; padding: 0 7px; font-size: 10px; }
.wor-table td.wor-date, .wor-level { font-size: 11.5px; }
.wor-num { text-align: right; }
.wor-muted { color: var(--muted); font-weight: 500; }
.wor-parent { margin-left: 6px; font-size: 11px; }
.wor-level { display: inline-flex; align-items: center; gap: 6px; overflow: hidden; max-width: 100%; color: var(--ink-2); font-weight: 650; text-overflow: ellipsis; }
.wor-level i.wo-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.wor-issues { color: var(--danger); }
.wor-open { display: inline-flex; opacity: 0; color: var(--stc-blue); transition: opacity 0.12s; }
.wor-table tbody tr:hover .wor-open, .wor-open:focus-visible { opacity: 1; }
/* Narrow screens: keep every column readable and let the table scroll sideways instead of truncating. */
@media (max-width: 1240px) {
  .wor-scroll { overflow-x: auto; }
  .wor-table { min-width: 1120px; }
  .wor-table thead th { top: 0; }
}
/* Work Orders touchpoint cell: the count in its own lane, chips in a tidy block beside it (same chip colours). */
.wor-table .tp-chips { position: relative; display: flex; flex-wrap: wrap; align-content: center; gap: 2px; max-width: none; padding-left: 24px; white-space: normal; }
.wor-table .tp-chips .tp-count { position: absolute; top: 1px; left: 0; width: 22px; font-size: 11px; }
.wor-table .tp-chip { min-height: 15px; padding: 0 3px; font-size: 9px; font-weight: 700; letter-spacing: 0; line-height: 15px; }
/* Work Orders register: sortable headers and the Clear action (filters apply as you type or pick). */
.wor-sort { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.wor-sort svg { opacity: 0.45; }
.wor-sort:hover, .wor-sort.is-on { color: var(--stc-blue); }
.wor-sort.is-on svg { opacity: 1; }
.wor-num .wor-sort { flex-direction: row-reverse; }
button.wor-clear { padding: 0 4px; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; color: var(--stc-blue); }
.simple-empty button.wor-clear { margin-top: 4px; }
/* Location: store number over "City, ST zip", two compact lines inside the existing 36px row. */
.wor-table td.wor-loc { line-height: 1.15; }
.wor-table td.wor-loc a { display: block; }
.wor-table td.wor-loc small { display: block; overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
/* Issues header: the column stays narrow; its label and sort arrow extend left into the empty end of the Touchpoints header. */
.wor-table thead th.wor-num { overflow: visible; direction: rtl; }
.wor-table thead th.wor-num .wor-sort { direction: ltr; }
/* Work Orders Proof column: compact icon + count trigger for the sign-off and photo pop-up. */
.wor-table td.wor-proof { padding-right: 4px; padding-left: 4px; }
.wo-proof-button.is-compact { display: inline-grid; justify-items: start; gap: 1px; font-size: 10.5px; line-height: 1.15; }
.wo-proof-button.is-compact span { display: inline-flex; align-items: center; gap: 3px; }
.wo-proof-button.is-compact svg:not(:first-child) { margin-left: 0; }
.wo-proof-button.is-compact:hover { text-decoration: none; color: var(--navy-800, #0b2440); }

/* ---- Work order page redesign (scoped to .wo-page) ---- */
/* Header: one band: number and title with a single status, then one line of facts. */
.wo-page .wo-head { gap: 8px; padding: 12px 16px; }
.wo-page .wo-head-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.wo-page .wo-head-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wo-page .wo-head-number { color: var(--navy-800, #0b2440); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.wo-page .wo-head-id .loc-title { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 17px; }
.wo-page .wo-head-parent { color: var(--muted); font-size: 12px; font-weight: 600; }
.wo-page .wo-head-parent:hover { color: var(--stc-blue); }
.wo-page .wo-head-id p { display: flex; align-items: center; gap: 5px; margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.wo-page .wo-head-id p a { color: var(--stc-blue); font-weight: 700; }
.wo-page .wo-facts-line { gap: 0; padding-top: 7px; }
.wo-page .wo-facts-line > div { padding: 0 14px; border-left: 1px solid var(--line-soft); }
.wo-page .wo-facts-line > div:first-child { padding-left: 0; border-left: 0; }
.wo-page .wo-facts-line dt { font-size: 9.5px; }
.wo-page .wo-facts-line dd { font-size: 12.5px; }

/* Counts are information, not alarms; empty states are quiet. */
.wo-page .panel-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: #e6ecf1; color: #3d5266; font-size: 10.5px; }
.wo-page .compact-empty { min-height: 64px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; }

/* Tasks: quiet rows; the status saves on change and Override is a link. */
.wo-page .installation-task-row { padding: 5px 0; }
.wo-page .installation-task-row em { display: inline-block; margin: 2px 0 0; padding: 0 6px; border-radius: 999px; background: #fdf1df; color: #8a5600; font-size: 10.5px; }
.wo-page .compact-action-control select { min-height: 28px; padding: 3px 6px; font-size: 12px; }
.wo-page .override-trigger { padding: 2px 4px; border: 0; background: transparent; color: var(--stc-blue); font-size: 11.5px; font-weight: 700; }
.wo-page .override-trigger:hover { background: transparent; text-decoration: underline; }
.wo-page .override-trigger svg { display: none; }

/* Visits: one line of marks with the actions beside them. */
.wo-page .wo-visit-marks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.wo-page .wo-visit-marks li { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.wo-page .wo-visit-marks li.is-ok { color: #1f6a3c; font-weight: 650; }
.wo-page .wo-visit-marks li.is-missing { color: var(--danger); }
.wo-page .wo-visit-marks small { color: var(--muted); font-size: 11px; font-weight: 500; }
.wo-page .wo-visit-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 8px; }

/* Materials: one card, three parts. */
.wo-page .wo-materials { display: grid; gap: 14px; padding: 16px; }
.wo-page .wo-materials-part { padding: 0; }
.wo-page .wo-materials-part h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 14px; }
.wo-page .wo-materials-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.wo-page .wo-materials-pair > .wo-materials-part + .wo-materials-part { padding-left: 14px; border-left: 1px solid var(--line-soft); }
@media (max-width: 760px) { .wo-page .wo-materials-pair { grid-template-columns: 1fr; } .wo-page .wo-materials-pair > .wo-materials-part + .wo-materials-part { padding-left: 0; border-left: 0; } }

/* History: one column, date and source beside each event. */
.wo-page .work-order-chronology { grid-template-columns: minmax(0, 1fr); max-height: none; }
.wo-page .work-order-chronology-event { grid-template-columns: 116px minmax(0, 1fr); gap: 12px; min-height: 0; padding: 8px 0; }
.wo-page .chronology-event-meta { flex-direction: column; align-items: flex-start; gap: 3px; }
.wo-page .chronology-event-meta span { color: var(--ink-2); font-size: 12px; font-weight: 700; }
.wo-page .chronology-event-meta strong { font-size: 10px; }
.wo-page .work-order-chronology-event h3 { margin: 0; font-size: 13px; }
.wo-page .work-order-chronology-event.event-critical h3 { color: var(--danger); }
.wo-page .wo-facts-line .wo-tp { flex: 0 1 auto; min-width: 0; }
.wo-page .wo-facts-line .wo-tp .tp-chips { flex-wrap: wrap; }

/* Closeout tab: a sign-off sheet whose day matched no visit, with the PM's attach control. */
.signoff-unattached-note { margin: 2px 0 0; color: #8a5600; font-size: 12px; }
.signoff-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; grid-column: 1 / -1; }
.signoff-attach form { display: flex; align-items: center; gap: 6px; }
.signoff-attach select { min-height: 30px; padding: 3px 6px; font-size: 12px; }
.signoff-attach .chip { text-transform: none; }

/* ---- Work order Visits tab: one row per visit with a check-in to check-out track ---- */
.wo-head-count { color: var(--muted); font-size: 12px; font-weight: 600; }
.wo-visit-row, .wo-dispatch-row { display: grid; grid-template-columns: minmax(180px, 1.15fr) minmax(0, 2.4fr) minmax(150px, auto); gap: 16px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-soft, #e7edf1); }
.wo-visit-id { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.wo-visit-id > div { min-width: 0; }
.wo-visit-id a { color: var(--stc-blue); font-size: 13.5px; font-weight: 700; }
.wo-visit-id a:hover { text-decoration: underline; }
.wo-visit-id small, .wo-dispatch-id small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.wo-visit-seq { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #eef3f7; color: #3d5266; font-size: 11px; font-weight: 700; }
.wo-visit-track { display: flex; margin: 0; padding: 0; list-style: none; }
.wo-visit-track li { position: relative; flex: 1; min-width: 0; color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.wo-visit-track li::before { content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: #dde5eb; }
.wo-visit-track li:first-child::before { display: none; }
.wo-visit-track li > span { position: relative; z-index: 1; display: block; width: 14px; height: 14px; margin: 0 auto 4px; border: 2px solid #c3cfd8; border-radius: 50%; background: #fff; }
.wo-visit-track li small { display: block; margin-top: 1px; color: inherit; font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-visit-track li.is-ok { color: var(--success); }
.wo-visit-track li.is-ok > span { border-color: var(--success); background: var(--success); }
.wo-visit-track li.is-ok::before, .wo-visit-track li.is-ok + li::before { background: #9cc8ad; }
.wo-visit-track li.is-miss { color: var(--danger); }
.wo-visit-track li.is-miss > span { border-color: var(--danger); }
.wo-visit-track li.is-now { color: var(--stc-blue); }
.wo-visit-track li.is-now > span { border-color: var(--stc-blue); box-shadow: 0 0 0 3px #e3edf6; }
.wo-visit-side { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.wo-visit-side form { margin: 0; }
.wo-visit-side .button { min-height: 30px; padding: 4px 12px; font-size: 12.5px; }
.wo-dispatch-id strong { color: var(--ink, #0b2440); font-size: 13px; }
.wo-dispatch-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12px; }
.wo-dispatch-links > span { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2, #33475b); }
.wo-dispatch-links a, .wo-dispatch-recipients > summary { display: inline-flex; align-items: center; gap: 4px; color: var(--stc-blue); font-weight: 700; cursor: pointer; }
.wo-dispatch-recipients > summary { list-style: none; }
.wo-dispatch-recipients > summary::-webkit-details-marker { display: none; }
.wo-dispatch-recipients[open] { flex-basis: 100%; order: 5; }
.wo-dispatch-recipients[open] > summary { margin-bottom: 6px; }
.wo-dispatch-lock { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
@media (max-width: 900px) {
  .wo-visit-row, .wo-dispatch-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .wo-visit-side { justify-content: flex-start; }
}

/* Visits tab: each visit expands into the PM's actions for it. */
.wo-visit { border-top: 1px solid var(--line-soft, #e7edf1); }
.wo-visit > summary { list-style: none; cursor: pointer; }
.wo-visit > summary::-webkit-details-marker { display: none; }
.wo-visit > .wo-visit-row { grid-template-columns: 16px minmax(170px, 1.15fr) minmax(0, 2.4fr) minmax(150px, auto); border-top: 0; }
.wo-visit > summary:hover .wo-visit-chevron { color: var(--stc-blue); }
.wo-visit-chevron { color: var(--muted); transition: transform 0.15s ease; }
.wo-visit[open] .wo-visit-chevron { transform: rotate(90deg); color: var(--stc-blue); }
.wo-visit-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.wo-visit-buttons form { margin: 0; }
.wo-visit-buttons .button { min-height: 30px; padding: 4px 11px; font-size: 12.5px; }
.wo-visit-link { display: inline-flex; align-items: center; gap: 5px; padding: 3px 2px; border: 0; background: transparent; color: var(--stc-blue); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.wo-visit-link:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .wo-visit > .wo-visit-row { grid-template-columns: 16px minmax(0, 1fr); }
  .wo-visit > .wo-visit-row > .wo-visit-track, .wo-visit > .wo-visit-row > .wo-visit-side { grid-column: 2; }
}

/* ---- Visit page: one header band with the Visits tab track, two columns, compact photos (scoped to .visit-page) ---- */
.visit-page .wo-head-id .loc-title { flex-wrap: wrap; }
.visit-page .visit-note { margin: 0; padding-top: 6px; color: var(--ink-2); font-size: 12.5px; }
.visit-page .visit-track-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.visit-page .visit-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.visit-page .visit-cols > .panel, .visit-page .visit-side-stack > .panel { min-width: 0; }
.visit-page .visit-side-stack { display: grid; gap: 14px; min-width: 0; }
.visit-page .panel-heading h2 { font-size: 15px; }
.visit-page .visit-tp-table td { font-size: 12.5px; }
.visit-page .visit-tp-bar { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.visit-page .visit-tp-bar i { display: block; width: 46px; height: 4px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.visit-page .visit-tp-bar b { display: block; height: 100%; background: var(--success); }
.visit-page .visit-muted { margin: 0; color: var(--muted); font-size: 12.5px; }
.visit-page .visit-sheets { display: grid; gap: 8px; }
.visit-page .visit-sheet { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 9px; }
.visit-page .visit-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.visit-page .visit-sheet-top strong { font-size: 13px; }
.visit-page .visit-sheet-top small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.visit-page .visit-sheet-top .chip { text-transform: capitalize; }
.visit-page .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; margin-top: 0; }
.visit-page .gallery-tile { grid-template-rows: 78px auto; border-radius: 7px; }
.visit-page .gallery-tile img { height: 78px; }
.visit-page .gallery-caption { padding: 4px 6px; }
.visit-page .gallery-caption strong { font-size: 11px; }
.visit-page .gallery-caption small { display: none; }
@media (max-width: 1000px) {
  .visit-page .visit-cols, .visit-page .visit-track-row { grid-template-columns: minmax(0, 1fr); }
  .visit-page .visit-track-row .wo-visit-side { justify-content: flex-start; }
}

/* ---- Closeout page: queue tabs over one register-style table (scoped to .co-page) ---- */
.co-page .co-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
/* /stores/<key> when that key is in more than one program: pick the store. */
.store-choice { display: grid; gap: 8px; padding: 14px; }
.store-choice a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.store-choice a:hover { background: var(--stc-blue-50); }
.store-choice a > span { display: grid; min-width: 0; }
.store-choice a small { color: var(--muted); font-size: 12px; }
.store-choice-program { color: var(--stc-blue); font-size: 12.5px; font-weight: 700; text-align: right; }
@media (max-width: 640px) { .store-choice a { grid-template-columns: auto minmax(0, 1fr) auto; } .store-choice-program { grid-column: 2; text-align: left; } }
.co-page .co-title h1 { margin: 0; font-size: 22px; }
.co-page .co-title h1 span, .ev-page .ev-head h1 span { margin-left: 8px; color: var(--muted); font-size: 15px; font-weight: 600; }
.co-page .co-title p { margin: 0; max-width: 80ch; color: var(--muted); font-size: 12.5px; }
/* Register panels clip their corners with overflow: clip, not hidden: hidden would make the panel the sticky
   header's scroll box, so the header's 52px offset would push it down over the first row. */
.co-page .co-board { padding: 0; overflow: clip; }
.co-page .installation-queue-tabs { border-top: 0; }
.co-page .installation-queue-tabs a span.co-attention { background: var(--warning-soft); color: var(--warning); }
.co-page .co-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
.co-page .co-help p { margin: 0; color: var(--muted); font-size: 12.5px; }
.co-page .co-help nav { display: flex; gap: 6px; }
.co-page .co-help nav a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.co-page .co-help nav a.is-active { border-color: var(--stc-blue); color: var(--stc-blue); }
.co-page .co-c-order { width: 21%; } .co-page .co-c-store { width: 15%; } .co-page .co-c-prog { width: 13%; } .co-page .co-c-date { width: 9%; }
.co-page .co-c-last { width: auto; } .co-page .co-c-proof { width: 13%; } .co-page .co-c-open { width: 34px; }
.co-page .co-sub { margin-left: 6px; font-size: 11.5px; }
.co-page .co-table td.co-last { white-space: normal; }
.co-page .co-holds { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; }
.co-page .co-next { color: var(--stc-blue); font-weight: 650; }
.co-page .co-table .chip { min-height: 19px; padding: 0 8px; font-size: 10.5px; }
.co-page .simple-empty { padding: 26px 14px; color: var(--muted); text-align: center; }
@media (max-width: 1240px) { .co-page .co-table { min-width: 900px; } }

/* ---- Issues page: register-style table, filter chips, Log issue and update pop-ups (scoped to .iss-page) ---- */
.iss-page .iss-page-body { display: grid; gap: 12px; }
.iss-page .iss-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.iss-page .iss-head h1 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 22px; }
.iss-page .iss-head h1 span { color: var(--muted); font-size: 15px; font-weight: 600; }
.iss-page .iss-board { padding: 0; overflow: clip; }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f3f6f9; }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-bar select { min-height: 30px; padding: 0 8px; border: 1px solid #cdd8e2; border-radius: 7px; background: #fff; font-size: 12.5px; }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 12px; font-weight: 650; cursor: pointer; }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-chips button b { color: var(--muted); font-variant-numeric: tabular-nums; }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-chips button.is-attention b { color: var(--danger); }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-chips button[aria-pressed="true"] { border-color: var(--stc-blue); background: var(--stc-blue-50); color: var(--stc-blue); }
.iss-page .iss-table td { height: 46px; }
.iss-page .iss-table td small { display: block; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; }
.iss-page .iss-table td:last-child { padding: 4px 6px; text-align: left; }
.iss-page .iss-c-num { width: 10%; } .iss-page .iss-c-title { width: 27%; } .iss-page .iss-c-wo { width: 15%; } .iss-page .iss-c-tp { width: 8%; }
.iss-page .iss-c-type { width: 11%; } .iss-page .iss-c-who { width: 15%; } .iss-page .iss-c-status { width: 14%; }
.iss-page .iss-alert { color: var(--danger) !important; font-weight: 650; }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 16px; color: var(--muted); text-align: center; }
:is(.iss-page, .ev-page, .prg-page, .prj-page, .cus-page) .iss-empty strong { color: var(--ink); font-size: 15px; }
.iss-message { margin: 0; padding: 8px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.iss-message.is-success { background: var(--success-soft); color: var(--success); }
.iss-message.is-danger { background: var(--danger-soft); color: var(--danger); }
.iss-resolve { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
@media (max-width: 1240px) { .iss-page .iss-table { min-width: 1000px; } }

/* ---- Home: what's late or stuck, grouped by what to do, beside today and the next 14 days (scoped to .home-page) ---- */
.home-page .home-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.home-page .home-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 22px; }
.home-page .home-head h1 span { color: var(--muted); font-size: 14px; font-weight: 600; }
.home-page .home-links { display: flex; flex-wrap: wrap; gap: 8px; }
.home-page .home-links a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 650; }
.home-page .home-links a:hover { border-color: var(--stc-blue); color: var(--stc-blue); }
.home-page .home-links a b { color: var(--muted); font-variant-numeric: tabular-nums; }
.home-page .home-links a.is-attention b { color: var(--warning); }
.home-page .home-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.home-page .home-panel { min-width: 0; padding: 0; overflow: hidden; }
.home-page .home-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.home-page .home-panel-head h2 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 15px; }
.home-page .home-panel-head h2 span { color: var(--danger); font-size: 13px; font-variant-numeric: tabular-nums; }
.home-page .home-panel-head small { color: var(--muted); font-size: 12px; }
.home-page .home-group { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; padding: 8px 14px 6px; border-bottom: 1px solid var(--line-soft); background: #f3f6f9; }
.home-page .home-group strong { color: var(--ink-2); font-size: 12px; }
.home-page .home-group strong em { margin-left: 4px; color: var(--muted); font-style: normal; font-weight: 600; }
.home-page .home-group span { color: var(--stc-blue); font-size: 11.5px; font-weight: 650; }
.home-page .home-table td { height: 44px; }
.home-page .home-table td:last-child { padding: 4px 8px; text-align: left; }
.home-page .home-c-order { width: 21%; } .home-page .home-c-store { width: 20%; } .home-page .home-c-date { width: 14%; } .home-page .home-c-late { width: 24%; } .home-page .home-c-status { width: 21%; }
.home-page .home-sub { display: block; overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; }
.home-page .home-late { color: var(--danger); font-weight: 650; }
.home-page .home-today { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--stc-blue-50); color: var(--muted); font-size: 12.5px; }
.home-page .home-today strong { color: var(--ink-2); }
.home-page .home-day { display: grid; grid-template-columns: 78px minmax(0, 1fr); border-bottom: 1px solid var(--line-soft); }
.home-page .home-day > div { padding: 10px 0 10px 14px; }
.home-page .home-day b { display: block; font-size: 12.5px; }
.home-page .home-day small { color: var(--muted); font-size: 11.5px; }
.home-page .home-day-list { display: grid; gap: 2px; margin: 0; padding: 6px 12px 6px 0; list-style: none; }
.home-page .home-today .home-day-list { padding: 6px 0 0; }
.home-page .home-day-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 12.5px; }
.home-page .home-day-list li a { flex: none; color: var(--stc-blue); font-weight: 650; }
.home-page .home-day-list li span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.home-page .home-quiet { margin: 0; padding: 10px 14px; color: var(--muted); font-size: 12px; }
.home-page .home-quiet a { color: var(--stc-blue); font-weight: 650; }
@media (max-width: 1100px) { .home-page .home-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .home-page .home-panel { overflow-x: auto; } .home-page .home-table { min-width: 620px; } }

/* ---- Field Evidence: one row per sign-off sheet, flags for review and photos still in Jotform (scoped to .ev-page; chips shared with Issues) ---- */
.ev-page .ev-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ev-page .ev-head h1 { margin: 0; font-size: 22px; }
.ev-page .ev-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.ev-page .ev-head p b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ev-page .ev-board { padding: 0; overflow: clip; }
.ev-page .ev-c-order { width: 20%; } .ev-page .ev-c-store { width: 15%; } .ev-page .ev-c-date { width: 10%; } .ev-page .ev-c-tech { width: 13%; }
.ev-page .ev-c-photos { width: 14%; } .ev-page .ev-c-review { width: 10%; } .ev-page .ev-c-open { width: 18%; }
.ev-page .ev-sub { margin-left: 6px; font-size: 11.5px; }
.ev-page .ev-flag { margin-left: 6px; color: var(--danger); font-size: 11px; font-weight: 650; }
.ev-page .ev-jotform { color: var(--warning); font-weight: 650; }
.ev-page .ev-table tbody tr.is-review td:first-child { border-left-color: var(--warning); }
.ev-page .ev-table td.ev-open { padding: 4px 8px; text-align: left; }
.ev-page .ev-open .button { min-height: 26px; margin-right: 8px; padding: 0 9px; font-size: 12px; }
.ev-page .ev-open a:not(.button) { font-size: 12px; }
@media (max-width: 1240px) { .ev-page .ev-table { min-width: 1000px; } }

/* ---- Reporting: led by work orders, then service levels, billing, proof and stores (scoped to .rep-page) ---- */
.rep-page .rep-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rep-page .rep-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 22px; }
.rep-page .rep-head h1 span { color: var(--muted); font-size: 14px; font-weight: 600; }
.rep-page .rep-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.rep-page .rep-tiles { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 12px; }
.rep-page .rep-tiles article { display: grid; align-content: start; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rep-page .rep-tiles span { color: var(--muted); font-size: 12px; font-weight: 600; }
.rep-page .rep-tiles strong { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rep-page .rep-tiles strong small { margin-left: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.rep-page .rep-tiles article > small { color: var(--muted); font-size: 12px; }
.rep-page .rep-tiles a { color: var(--stc-blue); font-size: 12px; font-weight: 650; }
.rep-page .rep-tiles .is-lead strong { color: var(--success); }
.rep-page .rep-tiles .is-alert strong { color: var(--danger); }
.rep-page .rep-progress { height: 6px; overflow: hidden; border-radius: 3px; background: #e6ecf1; }
.rep-page .rep-progress i { display: block; height: 100%; background: #4c9a68; }
.rep-page .rep-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.rep-page .rep-side { display: grid; gap: 14px; min-width: 0; }
.rep-page .rep-panel { min-width: 0; padding: 0; overflow: hidden; }
.rep-page .rep-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rep-page .rep-panel-head h2 { margin: 0; font-size: 15px; }
.rep-page .rep-panel-head small { color: var(--muted); font-size: 12px; }
.rep-page .rep-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rep-page .rep-table th { height: 30px; padding: 0 10px; border-bottom: 1px solid var(--line); color: #5b6f80; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.rep-page .rep-table td { height: 34px; padding: 0 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.rep-page .rep-table tr:last-child td { border-bottom: 0; }
.rep-page .rep-table td small { margin-left: 6px; color: var(--muted); }
.rep-page .rep-n { text-align: right !important; font-variant-numeric: tabular-nums; }
.rep-page .rep-zero { color: #a3b0bb; }
.rep-page .rep-alert { color: var(--danger); font-weight: 650; }
.rep-page .rep-total td { background: #f3f6f9; font-weight: 700; }
.rep-page .rep-stack { display: flex; width: 120px; height: 8px; overflow: hidden; border-radius: 4px; background: #e6ecf1; }
.rep-page .rep-stack.is-large { width: 100%; height: 14px; }
.rep-page .rep-stack i { display: block; height: 100%; }
.rep-page .rep-done { background: #4c9a68; }
.rep-page .rep-field { background: #4f8fc0; }
.rep-page .rep-wait { background: #a9b6c1; }
.rep-page .rep-goback { background: #d0574c; }
.rep-page .rep-held { background: #d9a441; }
.rep-page .rep-billed { background: var(--stc-blue); }
.rep-page .rep-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11.5px; }
.rep-page .rep-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rep-page .rep-legend i, .rep-page .rep-billing dt i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.rep-page .rep-billing { display: grid; gap: 12px; padding: 14px; }
.rep-page .rep-billing dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 0; font-size: 12.5px; }
.rep-page .rep-billing dt { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.rep-page .rep-billing dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.rep-page .rep-billing a, .rep-page .rep-mini a, .rep-page .rep-control a { color: var(--stc-blue); font-size: 12px; font-weight: 650; }
.rep-page .rep-mini { display: grid; gap: 6px; padding: 12px 14px; color: var(--ink-2); font-size: 12.5px; }
.rep-page .rep-mini b { font-variant-numeric: tabular-nums; }
.rep-page .rep-control { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-2); font-size: 12.5px; }
@media (max-width: 1100px) { .rep-page .rep-cols { grid-template-columns: minmax(0, 1fr); } .rep-page .rep-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rep-page .rep-tiles { grid-template-columns: minmax(0, 1fr); } }
@media print { .rep-page .rep-cols { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }

/* ---- Programs: one row per program, live filters (scoped to .prg-page; chips shared with Issues) ---- */
.prg-page .prg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.prg-page .prg-head h1 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 22px; }
.prg-page .prg-head h1 span { color: var(--muted); font-size: 14px; font-weight: 600; }
.prg-page .prg-board { padding: 0; overflow: clip; }
.prg-page .iss-bar select { min-height: 30px; padding: 0 8px; border: 1px solid #cdd8e2; border-radius: 7px; background: #fff; font-size: 12.5px; }
.prg-page .prg-table td { height: 46px; }
.prg-page .prg-table td small { display: block; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; }
.prg-page .prg-table td:last-child { padding: 0; text-align: center; }
.prg-page .prg-table tbody tr.is-viewing td:first-child { border-left-color: var(--stc-blue); }
.prg-page .prg-table .link-button { padding: 0; border: 0; background: none; color: var(--stc-blue); font: inherit; cursor: pointer; }
.prg-page .prg-table .link-button strong { color: var(--stc-blue); }
:is(.prg-page, .prj-page, .cus-page) .prg-cap { text-transform: capitalize; }
.prg-page .prg-c-name { width: 25%; } .prg-page .prg-c-customer { width: 16%; } .prg-page .prg-c-dates { width: 15%; } .prg-page .prg-c-num { width: 7%; }
.prg-page .prg-c-done { width: 13%; } .prg-page .prg-c-health { width: 11%; } .prg-page .prg-c-open { width: 36px; }
:is(.prg-page, .prj-page, .cus-page) .prg-done { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
:is(.prg-page, .prj-page, .cus-page) .prg-bar { display: block; flex: none; width: 56px; height: 5px; overflow: hidden; border-radius: 3px; background: #e6ecf1; }
:is(.prg-page, .prj-page, .cus-page) .prg-bar i { display: block; height: 100%; background: #4c9a68; }
:is(.prg-page, .prj-page, .cus-page) .prg-late { color: var(--danger); }
:is(.prg-page, .cus-page) .prg-hint { margin: 0; padding: 8px 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11.5px; }
@media (max-width: 1240px) { .prg-page .prg-table { min-width: 1000px; } }

/* ---- Projects: grouped by program, a baseline row per program (scoped to .prj-page; done bar shared with Programs) ---- */
.prj-page .prj-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.prj-page .prj-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 22px; }
.prj-page .prj-head h1 span { color: var(--muted); font-size: 14px; font-weight: 600; }
.prj-page .prj-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.prj-page .prj-board { padding: 0; overflow: clip; }
.prj-page .prj-table td { height: 44px; }
.prj-page .prj-table td small { display: block; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; }
.prj-page .prj-table td:last-child { padding: 4px 8px; text-align: left; }
.prj-page .prj-table tr.prj-group td { height: 34px; border-bottom: 1px solid var(--line); background: var(--stc-blue-50); color: var(--muted); font-size: 12px; cursor: default; }
.prj-page .prj-table tr.prj-group td strong { margin-right: 8px; color: var(--ink); font-size: 12.5px; }
.prj-page .prj-table tbody tr.prj-group:hover td { background: var(--stc-blue-50); }
.prj-page .prj-indent { padding-left: 24px !important; }
.prj-page .prj-acts .modal-trigger-link { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; font-size: 12px; }
.prj-page .prj-c-name { width: 28%; } .prj-page .prj-c-dates { width: 17%; } .prj-page .prj-c-num { width: 8%; } .prj-page .prj-c-done { width: 15%; } .prj-page .prj-c-status { width: 9%; } .prj-page .prj-c-acts { width: 15%; }
@media (max-width: 1240px) { .prj-page .prj-table { min-width: 900px; } }

/* ---- Customers: one row per customer that bills STC (scoped to .cus-page; done bar and hint shared with Programs) ---- */
.cus-page .cus-head h1 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 22px; }
.cus-page .cus-head h1 span { color: var(--muted); font-size: 14px; font-weight: 600; }
.cus-page .cus-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.cus-page .cus-board { padding: 0; overflow: clip; }
.cus-page .cus-table td { height: 46px; }
.cus-page .cus-table td small { display: block; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; }
.cus-page .cus-inactive { margin-left: 8px; }
.cus-page .cus-c-name { width: 32%; } .cus-page .cus-c-num { width: 9%; } .cus-page .cus-c-done { width: 20%; } .cus-page .cus-c-logo { width: 160px; } .cus-page .cus-c-open { width: 36px; }
.cus-page .cus-logo { display: flex; gap: 10px; align-items: center; }
.cus-page .cus-logo img { max-width: 72px; max-height: 28px; object-fit: contain; }
/* Customers → Logos pop-up */
.logo-list { gap: 14px; }
.logo-row { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.logo-row-head { display: flex; gap: 8px; align-items: baseline; }
.logo-row-head small { color: var(--muted); font-size: 11.5px; }
.logo-row-body { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.logo-thumb { display: inline-grid; place-items: center; width: 120px; height: 52px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; }
.logo-thumb.has-logo { border-style: solid; background: #fff; }
.logo-thumb img { max-width: 108px; max-height: 44px; object-fit: contain; }
.logo-row-actions { display: flex; gap: 12px; align-items: center; }
.modal-form .logo-row-actions label.button { display: inline-flex; flex-direction: row; gap: 6px; align-items: center; cursor: pointer; }
.logo-link { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.logo-link span { display: flex; gap: 6px; }
.logo-link input { flex: 1; min-width: 0; }
@media (max-width: 760px) { .cus-page .cus-table { min-width: 640px; } .cus-page .wor-scroll { overflow-x: auto; } }

/* Screen-reader-only labels are absolutely positioned; inside a table that scrolls sideways they must stay
   in its scroll box, or on a phone they sit past the screen edge and make the whole page scroll sideways. */
.table-scroll, .touchpoint-table-scroll, .wor-scroll { position: relative; }
/* Work order Overview columns: let their single track shrink to the screen instead of growing to the widest panel. */
.wo-overview-main, .wo-overview-side { grid-template-columns: minmax(0, 1fr); }

/* Bulk load on Create work order: template pop-up, review queue and the created list. */
.bulk-alert { margin: 0; padding: 9px 12px; border: 1px solid #f0b8b0; border-radius: 8px; background: #fbe7e4; color: #a31f15; font-size: 12.5px; font-weight: 600; }
.bulk-muted { color: var(--muted); font-size: 12px; }
.bulk-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.bulk-gets { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: #f3f6f9; color: var(--ink-2); font-size: 12.5px; }
.bulk-gets strong { color: var(--ink); }
.bulk-gets ul { margin: 0; padding-left: 18px; }
.bulk-gets a { color: var(--stc-blue); font-weight: 650; }

.bulk-review { display: grid; gap: 12px; }
.bulk-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bulk-table { --wor-sticky-top: 52px; }
.bulk-table .bulk-c-row { width: 52px; }
.bulk-table .bulk-c-num { width: 13%; }
.bulk-table .bulk-c-store { width: 27%; }
.bulk-table .bulk-c-when { width: 18%; }
.bulk-table .bulk-c-acts { width: 112px; }
.bulk-table td .bulk-ok + small { white-space: normal; }
.bulk-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border: 1px solid #b7dcc4; border-radius: 999px; background: #e2f3e8; color: #1f6a3c; font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.bulk-job { margin: 0; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.bulk-seg { display: inline-flex; margin-left: 8px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; vertical-align: middle; }
.bulk-seg button { border: 0; padding: 2px 8px; background: #fff; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.bulk-seg button.on { background: var(--stc-blue); color: #fff; }
.bulk-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.bulk-field legend { padding: 0 0 4px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.bulk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk-chips button { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.bulk-chips button.on { border-color: var(--stc-blue); background: var(--stc-blue); color: #fff; }
.bulk-times { display: grid; gap: 4px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.bulk-times div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bulk-prefill { display: flex !important; align-items: center; gap: 7px; margin-right: auto; color: var(--muted) !important; font-weight: 600 !important; }
.bulk-table td { height: 46px; }
.bulk-table td small { display: block; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; }
.bulk-table tr.bulk-bad td { background: #fffafa; }
.bulk-table tr.bulk-bad td:first-child { border-left-color: #c2410c; }
.bulk-table td:last-child.bulk-acts { padding: 0 8px; text-align: right; }
.bulk-acts .modal-trigger-link + .modal-trigger-link { margin-left: 10px; }
.bulk-ok { color: #1f6a3c; font-weight: 700; }
.bulk-problem { margin: 0; color: #a31f15; font-size: 12px; font-weight: 600; line-height: 1.3; white-space: normal; }
.bulk-table tr.bulk-editing td { height: auto; padding: 12px 10px; vertical-align: top; white-space: normal; background: #f8fbfd; }
.bulk-editor { gap: 10px; }
.bulk-edit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.bulk-edit-grid .bulk-span { grid-column: span 2; }
.bulk-edit-acts { display: flex; justify-content: flex-end; gap: 8px; }
.bulk-review-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.bulk-review-foot p { flex: 1 1 320px; margin: 0; color: var(--muted); font-size: 12px; }
.bulk-created { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid #b7dcc4; border-radius: 12px; background: #e2f3e8; color: var(--ink-2); font-size: 12.5px; }
.bulk-created strong { color: #1f6a3c; }
.bulk-created-list { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.bulk-created-list a { color: var(--stc-blue); font-weight: 700; }
@media (max-width: 720px) {
  .bulk-three, .bulk-edit-grid, .bulk-times div { grid-template-columns: minmax(0, 1fr); }
  .bulk-edit-grid .bulk-span { grid-column: auto; }
}

/* Work Order Templates: tabs, named task templates, type defaults and the checklist editor. */
.wot-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.wot-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.wot-tabs a span { min-width: 20px; padding: 0 6px; border-radius: 999px; background: #eef2f5; color: var(--muted); font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.wot-tabs a.is-active { border-bottom-color: var(--stc-blue); color: var(--stc-blue); }
.wot-tabs a.is-active span { background: var(--stc-blue-50); color: var(--stc-blue); }
/* Name chip menu (View as, Sign out) and the amber "View as" preview bar */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary svg { color: var(--muted); }
.user-menu-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; display: grid; gap: 2px; width: 270px; max-width: calc(100vw - 32px); padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(15, 42, 68, 0.16); }
.user-menu-panel form { display: contents; }
.user-menu-label { padding: 6px 8px 2px; color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.user-menu-opt { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.user-menu-opt:hover { background: var(--stc-blue-50); }
.user-menu-opt.is-on { background: var(--stc-blue-50); color: var(--stc-blue); font-weight: 700; }
.user-menu-opt small { color: var(--muted); font-size: 11.5px; }
.user-menu-panel hr { margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
.user-menu-switch { margin: 6px 0 2px; padding: 8px 10px; border: 0; border-radius: 7px; background: var(--stc-blue); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.user-menu-switch:hover { filter: brightness(1.1); }
.user-menu-switch:disabled { opacity: 0.6; cursor: wait; }
.user-menu.is-compact { margin-left: auto; }
.user-menu.is-compact .user-chip { padding: 2px; border: 0; background: none; }
.user-menu.is-compact .user-chip div, .user-menu.is-compact .user-chip > svg { display: none; }
/* The narrow-screen header styles its own spans (white, hidden on phones); the menu keeps its own text. */
.mobile-brand-row .user-menu span { display: revert; color: inherit; font-size: inherit; font-weight: inherit; }
.mobile-brand-row .user-menu .user-chip > span { display: grid; color: #fff; font-size: 11px; font-weight: 800; }
.mobile-brand-row .user-menu .user-menu-label { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.view-as-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 18px; border-bottom: 1px solid #ecdcae; background: #fbf3df; color: #7d5508; font-size: 13px; font-weight: 600; }
.view-as-bar span { display: inline-flex; align-items: center; gap: 6px; }
.view-as-bar button { border: 0; background: none; color: var(--stc-blue); font: inherit; font-weight: 800; cursor: pointer; }
.wot-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.wot-fieldset:disabled .button, .wot-fieldset:disabled .modal-trigger-link, .wot-fieldset:disabled select, .wot-fieldset:disabled input { opacity: 0.55; cursor: not-allowed; }
.wot-readonly { margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f3f6f9; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.wot-copied { margin: 0; padding: 9px 12px; border: 1px solid #b7dcc4; border-radius: 8px; background: #e2f3e8; color: #1f6a3c; font-size: 12.5px; font-weight: 600; }
.tt-board { padding: 16px 18px; }
.tt-board .panel-heading p { max-width: 760px; margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.tt-list { display: grid; }
.tt-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 16px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line-soft); }
.tt-main { display: grid; gap: 3px; min-width: 0; }
.tt-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tt-name strong { color: var(--ink); font-size: 13px; }
.tt-tag { padding: 0 7px; border-radius: 999px; background: var(--stc-blue-50); color: var(--stc-blue); font-size: 10.5px; font-weight: 700; line-height: 18px; }
.tt-preview { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tt-count { color: var(--ink-2); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-count small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.tt-acts { display: flex; gap: 12px; align-items: center; min-width: 190px; white-space: nowrap; }
.tt-acts form { display: contents; }
.tt-edit { gap: 12px; }
.tt-inline { display: flex; gap: 8px; align-items: flex-end; }
.tt-inline label, .tt-inline > input { flex: 1; min-width: 0; }
.tt-steps { display: grid; gap: 6px; margin: 0; padding-left: 20px; }
.tt-steps li { display: flex; gap: 8px; align-items: center; }
.tt-steps li .tt-inline { flex: 1; }
/* The table sits in its own scroll box, so its header sticks to the box's top. */
.tt-defaults { --wor-sticky-top: 0px; min-width: 0; }
.tt-defaults td { height: 44px; }
.tt-defaults tbody tr { cursor: default; }
.tt-defaults td:last-child { padding: 4px 8px; text-align: left; }
.tt-defaults select { width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font: inherit; font-size: 12.5px; }
.tt-rule { color: var(--muted); }
.checklist-reach { margin: 6px 0 0; padding: 7px 10px; border: 1px solid #ecdcae; border-radius: 8px; background: #fbf3df; color: #7d5508; font-size: 12px; font-weight: 600; }
.checklist-card.is-wide { grid-column: 1 / -1; }
.checklist-types-head { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding-top: 6px; }
.checklist-types-head h3 { margin: 0; font-size: 14px; }
.checklist-types-head h3 small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.checklist-types-head p { grid-column: 1; margin: 0; color: var(--muted); font-size: 12px; }
.checklist-types-head > button { grid-column: 2; grid-row: 1 / span 2; }
.checklist-type-acts { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.checklist-type-acts form { display: contents; }
.modal-form .checklist-numbered { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 500; }
.modal-form .checklist-numbered input { width: auto; min-height: 0; }
.checklist-card h3 small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
@media (max-width: 860px) {
  .tt-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .tt-acts { grid-column: 1 / -1; min-width: 0; }
  .panel .checklist-grid { grid-template-columns: minmax(0, 1fr); }
  .checklist-step { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .checklist-step form:first-of-type { flex-wrap: wrap; }
  .checklist-step form:first-of-type input[type="text"], .checklist-add input[type="text"] { flex-basis: 100%; }
  .checklist-add { flex-wrap: wrap; }
  /* Type defaults: one card per type instead of a sideways-scrolling table. */
  .tt-board .table-scroll { overflow: visible; }
  .tt-defaults, .tt-defaults tbody, .tt-defaults tr, .tt-defaults td { display: block; width: auto; }
  .tt-defaults thead { display: none; }
  .tt-defaults tr { padding: 10px 2px; border-top: 1px solid var(--line-soft); }
  .tt-defaults td, .tt-defaults td:last-child { height: auto; padding: 3px 0; border: 0; white-space: normal; }
  .tt-defaults td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
}

/* ===== operations.css ===== */
.operations-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 14px;
}

/* Installation Management operating cockpit */
.installation-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.installation-kpis article { display:grid; grid-template-columns:auto 1fr; gap:2px 10px; align-items:center; min-height:78px; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.installation-kpis svg { grid-row:1 / 3; color:var(--stc-blue); }
.installation-kpis span { color:var(--muted); font-size:.76rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.installation-kpis strong { font-size:1.05rem; line-height:1.25; text-transform:capitalize; }
.installation-cockpit-header { display:grid; grid-template-columns:minmax(280px,1.2fr) auto minmax(260px,.8fr); gap:22px; align-items:center; padding:22px; }
.installation-cockpit-header h1 { margin:4px 0; font-size:clamp(1.7rem,3vw,2.5rem); }
.installation-cockpit-header p { display:flex; align-items:center; gap:6px; margin:0; color:var(--muted); }
.installation-header-statuses { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.installation-next-control { padding:14px 16px; border-left:3px solid var(--stc-blue); background:var(--stc-blue-50); border-radius:0 10px 10px 0; }
.installation-next-control span,.installation-next-control small { display:block; color:var(--muted); font-size:.75rem; }
.installation-next-control strong { display:block; margin:3px 0; }
.installation-status { display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:4px 8px; border-radius:999px; background:#edf2f7; color:#344054; font-size:.7rem; font-weight:800; text-transform:capitalize; white-space:nowrap; }
.installation-status.status-complete,.installation-status.status-passed,.installation-status.status-ready,.installation-status.status-confirmed { background:#e7f7ee; color:#177348; }
.installation-status.status-blocked,.installation-status.status-failed,.installation-status.status-high { background:#fff0ed; color:#b42318; }
.installation-status.status-in-progress,.installation-status.status-scheduled { background:#fff7df; color:#8a5b00; }
.installation-main-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(300px,.75fr); gap:14px; }
.installation-task-panel,.compact-control-panel,.requirements-panel,.billing-gate-panel { padding:18px; }
.installation-task-list { display:grid; margin-top:12px; }
.installation-task-row { display:grid; grid-template-columns:32px minmax(0,1fr) auto minmax(180px,auto); gap:10px; align-items:center; padding:10px 0; border-top:1px solid var(--line); }
.installation-task-row:first-child { border-top:0; }
.installation-task-row small,.installation-task-row strong,.installation-task-row em { display:block; }
.installation-task-row small { color:var(--muted); font-size:.7rem; text-transform:capitalize; }
.installation-task-row small.task-visit, .installation-task-row small.task-done-group { text-transform:none; }
.installation-task-row em { margin-top:2px; color:#8a5b00; font-size:.68rem; font-style:normal; }
.task-check { display:grid; place-items:center; width:27px; height:27px; border:1px solid var(--line); border-radius:50%; color:var(--muted); font-size:.68rem; }
.task-check.is-complete { border-color:#8fd1ac; background:#e7f7ee; color:#177348; }
.compact-action-control,.attendance-actions,.requirement-status-form { display:flex; gap:6px; }
.compact-action-control select,.requirement-status-form select,.requirement-task-list select,.billing-check-grid select { min-width:112px; padding:6px 7px; border:1px solid var(--line); border-radius:7px; background:var(--surface); font:inherit; font-size:.73rem; }
.compact-action-control button,.attendance-actions button,.requirement-status-form button,.requirement-task-list button,.billing-check-grid button { padding:6px 9px; border:0; border-radius:7px; background:#163a5f; color:#fff; font:inherit; font-size:.72rem; font-weight:800; cursor:pointer; }
.installation-side-stack { display:grid; align-content:start; gap:14px; }
.compact-control-panel header { margin-bottom:12px; }
.compact-control-panel h2 { display:flex; align-items:center; gap:7px; margin:3px 0 0; font-size:1rem; }
.visit-control { display:grid; gap:9px; }
.visit-control small,.visit-control p { color:var(--muted); font-size:.73rem; }
.visit-control p { display:flex; align-items:center; gap:6px; margin:0; }
.attendance-facts { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; }
.attendance-facts span { padding:7px; border-radius:7px; background:var(--stc-blue-50); color:var(--muted); font-size:.67rem; }
.attendance-actions { flex-wrap:wrap; }
.dispatch-row,.support-row { display:flex; gap:9px; align-items:center; padding:9px 0; border-top:1px solid var(--line); }
.dispatch-row>div,.support-row>div { flex:1; }
.dispatch-row small,.support-row small { display:block; color:var(--muted); font-size:.7rem; }
.button-full { width:100%; justify-content:center; margin-top:10px; }
.control-disclaimer { display:block; margin-top:9px; color:var(--muted); line-height:1.4; }
.requirement-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.requirement-card { padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--stc-blue-50); }
.requirement-card>header { display:flex; justify-content:space-between; gap:10px; }
.requirement-card h3 { margin:2px 0 0; font-size:.95rem; }
.requirement-card header small { color:var(--muted); font-size:.68rem; text-transform:uppercase; }
.requirement-card dl { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:12px 0; }
.requirement-card dl div { min-width:0; }
.requirement-card dt { color:var(--muted); font-size:.64rem; text-transform:uppercase; }
.requirement-card dd { margin:2px 0 0; font-size:.75rem; font-weight:700; overflow-wrap:anywhere; text-transform:capitalize; }
.requirement-status-form { margin-bottom:10px; }
.requirement-task-list { display:grid; }
.requirement-task-list form { display:grid; grid-template-columns:24px minmax(0,1fr) auto auto auto; gap:6px; align-items:center; padding:6px 0; border-top:1px solid var(--line); }
.requirement-task-list form>span:first-of-type { display:grid; place-items:center; width:21px; height:21px; border-radius:50%; background:#e6ebef; font-size:.63rem; }
.requirement-task-list form>span.is-complete { background:#dff4e8; color:#177348; }
.requirement-task-list strong { font-size:.73rem; }
.installation-support-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.pack-list-control { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; padding:9px 0; border-top:1px solid var(--line); }
.pack-list-control small { display:block; color:var(--muted); font-size:.7rem; }
.pack-list-control>div:last-child { grid-column:1 / -1; display:flex; gap:12px; }
.pack-list-control a { display:inline-flex; align-items:center; gap:4px; color:var(--stc-blue); font-size:.73rem; font-weight:800; }
.billing-check-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
.billing-check-grid form { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto auto; gap:8px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:9px; }
.billing-check-grid small { display:block; color:var(--muted); font-size:.68rem; }
.operating-boundary { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; padding:16px; border-left:4px solid var(--stc-blue); }
.operating-boundary p { margin:3px 0 0; color:var(--muted); font-size:.8rem; }
.store-work-orders-panel { padding:18px; }
.store-work-order-links { display:grid; gap:7px; }
.store-work-order-links>a { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:9px; }
.store-work-order-links small { display:block; color:var(--muted); font-size:.7rem; }
.store-work-order-links span { display:flex; align-items:center; gap:5px; color:var(--stc-blue); font-size:.72rem; font-weight:800; }
.compact-create-panel { max-width:980px; padding:20px; }
.compact-create-panel>header { display:flex; gap:10px; align-items:center; margin-bottom:18px; }
.compact-create-panel h2 { margin:2px 0 0; font-size:1.1rem; }
.compact-create-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.compact-create-form label { display:grid; gap:6px; color:var(--muted); font-size:.72rem; font-weight:800; }
.compact-create-form input,.compact-create-form select { min-height:40px; padding:9px 11px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); font:inherit; }
.compact-create-form small { font-weight:500; line-height:1.45; }
.form-span { grid-column:1 / -1; }
.form-submit-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding-top:4px; }
.form-submit-row p { max-width:600px; margin:0; color:var(--muted); font-size:.72rem; }
.compact-empty-copy { color:var(--muted); font-size:.8rem; }
.installation-queue-controls { align-items:end; gap:18px; }
.installation-filter-form { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.installation-filter-form label { display:flex; align-items:center; gap:6px; min-width:250px; padding:0 9px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.installation-filter-form input { width:100%; min-height:34px; border:0; outline:0; background:transparent; font:inherit; font-size:.75rem; }
.installation-filter-form select,.installation-filter-form button { min-height:36px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); font:inherit; font-size:.72rem; font-weight:750; }
.installation-filter-form button { border-color:var(--stc-blue); background:var(--stc-blue); color:#fff; cursor:pointer; }
.installation-filter-form>a { align-self:center; color:var(--stc-blue); font-size:.72rem; font-weight:800; }
.installation-queue-tabs { display:flex; flex-wrap:wrap; gap:6px; padding:10px 14px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--stc-blue-50); }
.installation-queue-tabs a { display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border:1px solid transparent; border-radius:8px; color:var(--muted); font-size:.72rem; font-weight:800; }
.installation-queue-tabs a span { display:grid; place-items:center; min-width:20px; height:20px; padding:0 5px; border-radius:999px; background:#e4eaf0; color:var(--ink); font-size:.65rem; }
.installation-queue-tabs a.is-active { border-color:#afc6da; background:var(--surface); color:var(--stc-blue); box-shadow:0 1px 2px rgb(15 35 55 / 6%); }
.installation-compact-queue { display:grid; }
.installation-compact-row { display:grid; grid-template-columns:minmax(160px,1fr) minmax(120px,.75fr) minmax(125px,.7fr) minmax(145px,.85fr) minmax(200px,1.3fr) 30px; gap:12px; align-items:center; min-height:70px; padding:10px 14px; border-bottom:1px solid var(--line); }
.installation-compact-row:last-child { border-bottom:0; }
.installation-compact-row.is-exception { box-shadow:inset 3px 0 #d97706; background:linear-gradient(90deg,#fff9ed 0,transparent 24%); }
.installation-compact-row>div { min-width:0; }
.installation-compact-row strong,.installation-compact-row small,.installation-compact-row .queue-field-label { display:block; overflow:hidden; text-overflow:ellipsis; }
.installation-compact-row strong { font-size:.75rem; white-space:nowrap; }
.installation-compact-row small { margin-top:2px; color:var(--muted); font-size:.67rem; white-space:nowrap; }
.installation-compact-row .queue-field-label { margin-bottom:3px; color:var(--muted-2); font-size:.59rem; font-weight:800; letter-spacing:.045em; text-transform:uppercase; }
.installation-compact-row .queue-exception-copy { color:#9a5700; }
.installation-compact-row .queue-open-link { justify-self:end; }
.installation-queue-empty { display:grid; justify-items:center; gap:5px; padding:28px; color:var(--muted); text-align:center; }
.installation-queue-empty p { margin:0; font-size:.75rem; }
.installation-queue-empty a { color:var(--stc-blue); font-size:.75rem; font-weight:800; }
.work-order-chronology-panel { padding:18px; }
.work-order-chronology-panel .panel-heading h2 { display:flex; align-items:center; gap:7px; }
.work-order-chronology-panel .panel-heading p { margin:3px 0 0; color:var(--muted); font-size:.72rem; }
.work-order-chronology { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:22px; max-height:480px; margin-top:12px; overflow:auto; }
.work-order-chronology-event { position:relative; display:grid; grid-template-columns:12px minmax(0,1fr); gap:8px; min-height:74px; padding:8px 0; border-top:1px solid var(--line); }
.work-order-chronology-event>i { width:9px; height:9px; margin-top:5px; border:2px solid #fff; border-radius:50%; background:var(--stc-blue); box-shadow:0 0 0 1px var(--stc-blue); }
.work-order-chronology-event.event-positive>i { background:#177348; box-shadow:0 0 0 1px #177348; }
.work-order-chronology-event.event-warning>i { background:#d97706; box-shadow:0 0 0 1px #d97706; }
.work-order-chronology-event.event-critical>i { background:#b42318; box-shadow:0 0 0 1px #b42318; }
.chronology-event-meta { display:flex; align-items:center; gap:7px; }
.chronology-event-meta span { color:var(--muted); font-size:.63rem; }
.chronology-event-meta strong { padding:2px 5px; border-radius:999px; background:#edf2f7; color:#344054; font-size:.58rem; text-transform:uppercase; }
.work-order-chronology-event h3 { margin:3px 0 1px; font-size:.77rem; }
.work-order-chronology-event p { margin:0; color:var(--muted); font-size:.68rem; line-height:1.4; }
.print-pack-list { max-width:900px; margin:30px auto; padding:28px; color:#172b3a; font-family:Arial,sans-serif; }
.print-pack-list header { display:flex; justify-content:space-between; align-items:start; padding-bottom:18px; border-bottom:3px solid #163a5f; }
.print-pack-list header h1 { margin:4px 0; }
.print-pack-list header small { display:block; }
.print-pack-list section { display:grid; grid-template-columns:repeat(2,1fr); gap:4px 30px; margin:18px 0; }
.print-pack-list section p { margin:0; }
.print-pack-list table { width:100%; border-collapse:collapse; }
.print-pack-list th,.print-pack-list td { padding:8px; border:1px solid #ccd5dc; text-align:left; }
.print-pack-list footer { margin-top:20px; color:#667085; font-size:.8rem; }
@media (max-width:1100px) { .installation-cockpit-header { grid-template-columns:1fr auto; } .installation-next-control { grid-column:1 / -1; } .installation-main-grid { grid-template-columns:1fr; } .installation-side-stack { grid-template-columns:repeat(2,minmax(0,1fr)); } .installation-support-grid { grid-template-columns:1fr 1fr; } .installation-compact-row { grid-template-columns:1fr .75fr .75fr 1.2fr 30px; } .installation-compact-row>div:nth-child(4) { display:none; } }
@media (max-width:760px) { .installation-kpis,.requirement-grid,.installation-support-grid,.billing-check-grid,.installation-side-stack,.work-order-chronology { grid-template-columns:1fr; } .installation-cockpit-header { grid-template-columns:1fr; } .installation-header-statuses { justify-content:flex-start; } .installation-task-row { grid-template-columns:30px 1fr auto; } .compact-action-control { grid-column:2 / -1; } .requirement-card dl { grid-template-columns:1fr 1fr; } .requirement-task-list form,.billing-check-grid form { grid-template-columns:24px minmax(0,1fr) auto; } .requirement-task-list select,.billing-check-grid select { grid-column:2; } .requirement-task-list button,.billing-check-grid button { grid-column:3; } .installation-queue-controls { align-items:start; } .installation-filter-form { justify-content:flex-start; } .installation-filter-form label { flex:1 1 100%; min-width:0; } .installation-queue-tabs { flex-wrap:nowrap; overflow-x:auto; } .installation-queue-tabs a { flex:0 0 auto; } .installation-compact-row { grid-template-columns:minmax(0,1fr) auto; gap:7px; padding:12px 14px; } .installation-compact-row>div { grid-column:1; } .installation-compact-row>div:nth-child(2),.installation-compact-row>div:nth-child(4) { display:none; } .installation-compact-row .queue-open-link { grid-column:2; grid-row:1 / 4; } }
@media print { .app-sidebar,.app-header,.mobile-nav,.back-link,.print-pack-list~* { display:none!important; } .print-pack-list { margin:0; padding:0; max-width:none; } }

.operations-summary {
  grid-column: 1 / -1;
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr) auto;
  align-items: center;
  gap: 25px;
  padding: 20px;
  border-top: 3px solid var(--stc-blue);
}

.operations-summary-copy h2,
.control-tower-banner h2 {
  margin: 3px 0 4px;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.operations-summary-copy p,
.control-tower-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.operations-progress {
  display: grid;
  gap: 7px;
}

.operations-progress > div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.operations-progress > div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--stc-blue);
  transition: width 240ms ease;
}

.operations-progress strong {
  color: var(--muted);
  font-size: 9px;
}

.work-list-panel,
.control-rules,
.operations-matrix {
  padding: 19px;
}

.operations-panel-heading {
  min-height: 48px;
}

.work-task-list {
  display: grid;
  gap: 8px;
}

.work-task {
  min-height: 94px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(145px, auto) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}

.work-task:hover {
  border-color: #c8d7e1;
  background: #fbfcfd;
}

.work-task-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--warning-soft);
  color: var(--warning);
}

.work-task-icon.is-complete {
  background: var(--success-soft);
  color: var(--success);
}

.work-task-icon.is-blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

.work-task-main,
.work-task-meta {
  display: grid;
}

.work-task-main > span {
  color: var(--stc-blue);
  font-size: 8px;
  font-weight: 740;
  text-transform: uppercase;
}

.work-task-main strong {
  font-size: 11px;
}

.work-task-main p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.work-task-meta {
  justify-items: end;
  gap: 5px;
}

.work-task-meta span {
  color: var(--muted);
  font-size: 8px;
}

.work-task-meta b {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f2f5f6;
  color: var(--ink-2);
  font-size: 8px;
}

.work-task > a {
  color: var(--stc-blue);
}

.control-rule-list {
  display: grid;
  gap: 9px;
}

.control-rule-list > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f9fa;
  color: var(--stc-blue);
}

.control-rule-list svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.control-rule-list span {
  display: grid;
}

.control-rule-list strong {
  color: var(--ink);
  font-size: 10px;
}

.control-rule-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.control-tower-banner {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px;
  border-left: 4px solid var(--install);
}

.operations-matrix-scroll {
  overflow-x: auto;
}

.operations-table {
  min-width: 880px;
}

.operations-table td:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.operations-lane-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--stc-blue-50);
  color: var(--stc-blue);
}

.operation-status {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 730;
}

.operations-next-action {
  max-width: 330px;
}

.operations-table td a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--stc-blue);
  font-weight: 720;
}

.cockpit {
  overflow: hidden;
  border-top: 3px solid var(--install);
}

.cockpit-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.cockpit-header h2 {
  margin: 3px 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.cockpit-header p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.cockpit-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cockpit-progress {
  display: grid;
  grid-template-columns: auto 95px;
  align-items: center;
  gap: 8px;
}

.cockpit-progress > span {
  color: var(--stc-blue);
  font-size: 12px;
  font-weight: 780;
}

.cockpit-progress > div {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.cockpit-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--stc-blue);
  transition: width 240ms ease;
}

.cockpit-next-action {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  background: var(--install-50);
}

.cockpit-next-action span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 720;
  text-transform: uppercase;
}

.cockpit-next-action strong {
  color: var(--install);
  font-size: 11px;
}

.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cockpit-step {
  min-width: 0;
  padding: 18px 20px 20px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfc;
}

.cockpit-step:nth-child(2n) {
  border-right: 0;
}

.cockpit-step.is-enabled,
.cockpit-step:first-child {
  background: white;
}

.cockpit-closeout,
.cockpit-history {
  grid-column: 1 / -1;
  border-right: 0;
}

.cockpit-history {
  border-bottom: 0;
}

.cockpit-step-heading {
  min-height: 43px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cockpit-step-heading > span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--stc-blue);
  color: white;
  font-size: 9px;
  font-weight: 780;
}

.cockpit-step-heading > div {
  display: grid;
}

.cockpit-step-heading small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cockpit-step-heading h3 {
  margin: 1px 0 0;
  font-size: 13px;
}

.readiness-checklist {
  display: grid;
  gap: 6px;
  margin: 3px 0 12px;
  padding: 0;
  border: 0;
}

.readiness-checklist label {
  display: grid;
  grid-template-columns: 0 auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  cursor: pointer;
}

.readiness-checklist label.is-failed {
  border-color: #efcbc6;
  background: var(--danger-soft);
  cursor: not-allowed;
}

.readiness-checklist input {
  width: 0;
  height: 0;
  opacity: 0;
}

.readiness-checklist label > span {
  width: 23px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--success-soft);
  color: var(--success);
}

.readiness-checklist .is-failed > span {
  background: white;
  color: var(--danger);
}

.readiness-checklist label > div {
  display: grid;
}

.readiness-checklist strong {
  font-size: 9px;
}

.readiness-checklist small {
  color: var(--danger);
  font-size: 8px;
}

.cockpit-action {
  width: 100%;
}

.cockpit-empty-action {
  min-height: 244px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: var(--warning);
}

.cockpit-empty-action strong {
  margin-top: 9px;
  color: var(--ink);
  font-size: 11px;
}

.cockpit-empty-action p {
  max-width: 360px;
  margin: 4px 0 13px;
  color: var(--muted);
  font-size: 9px;
}

.issue-control-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.issue-form-status,
.issue-form-wide {
  grid-column: 1 / -1;
}

.issue-form-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 8px;
}

.issue-control-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 680;
}

.issue-control-form input,
.issue-control-form select,
.schedule-control input {
  width: 100%;
  height: 35px;
  padding: 0 9px;
  border: 1px solid #cdd7de;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 9px;
}

.recovery-stack {
  display: grid;
  gap: 8px;
  margin-top: 3px;
}

.recovery-record {
  min-height: 67px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.recovery-record > span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--stc-blue-50);
  color: var(--stc-blue);
}

.recovery-record > div:nth-child(2) {
  display: grid;
}

.recovery-record strong {
  font-size: 9px;
}

.recovery-record small {
  color: var(--muted);
  font-size: 8px;
}

.recovery-record > button,
.schedule-control button {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: var(--stc-blue);
  color: white;
  font-size: 8px;
  font-weight: 720;
  cursor: pointer;
}

.recovery-record.is-complete > svg {
  color: var(--success);
}

.schedule-control {
  width: 132px;
  display: grid;
  gap: 4px;
}

.schedule-control input {
  height: 28px;
}

.schedule-control button {
  justify-content: center;
}

.field-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin: 3px 0 12px;
}

.field-checklist > div {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border-radius: 7px;
  background: #f5f7f8;
}

.field-checklist > div > span {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: white;
  color: var(--success);
}

.field-checklist strong {
  font-size: 8px;
}

.closeout-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 5px 0 13px;
}

.closeout-rail > div {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  gap: 2px 8px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.closeout-rail > div > span {
  grid-row: 1 / 3;
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f3f4;
  color: var(--muted);
}

.closeout-rail > div.is-complete > span {
  background: var(--success-soft);
  color: var(--success);
}

.closeout-rail strong {
  font-size: 9px;
}

.closeout-rail small {
  color: var(--muted);
  font-size: 8px;
}

.closeout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.button:disabled,
.recovery-record button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.cockpit-timeline {
  max-height: 340px;
  display: grid;
  gap: 0;
  overflow-y: auto;
  padding: 3px 0 0 4px;
}

.cockpit-event {
  position: relative;
  min-height: 62px;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 9px;
}

.cockpit-event::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: -2px;
  left: 4px;
  width: 1px;
  background: var(--line);
}

.cockpit-event:last-child::before {
  display: none;
}

.cockpit-event > i {
  position: relative;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--stc-blue);
  box-shadow: 0 0 0 1px var(--stc-blue);
  z-index: 1;
}

.cockpit-event.event-positive > i {
  background: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.cockpit-event.event-warning > i {
  background: var(--warning);
  box-shadow: 0 0 0 1px var(--warning);
}

.cockpit-event > div {
  display: grid;
  align-content: start;
}

.cockpit-event span {
  color: var(--muted-2);
  font-size: 8px;
}

.cockpit-event strong {
  font-size: 9px;
}

.cockpit-event p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 8px;
}

@media (max-width: 1240px) {
  .operations-page-grid {
    grid-template-columns: 1fr;
  }

  .operations-summary,
  .control-rules {
    grid-column: auto;
  }
}

@media (max-width: 1050px) {
  .cockpit-grid {
    grid-template-columns: 1fr;
  }

  .cockpit-step,
  .cockpit-step:nth-child(2n),
  .cockpit-closeout,
  .cockpit-history {
    grid-column: auto;
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .compact-create-form { grid-template-columns:1fr; }
  .form-submit-row { align-items:stretch; flex-direction:column; }
  .operations-summary {
    grid-template-columns: 1fr auto;
  }

  .operations-summary .operations-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .work-task {
    grid-template-columns: auto 1fr auto;
  }

  .work-task-meta {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-items: start;
  }

  .cockpit-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .cockpit-header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 500px) {
  .operations-summary {
    grid-template-columns: 1fr;
  }

  .operations-summary .button {
    width: 100%;
  }

  .operations-summary .operations-progress {
    grid-column: auto;
    grid-row: auto;
  }

  .work-task-meta {
    grid-column: 1 / -1;
  }

  .issue-control-form,
  .field-checklist,
  .closeout-rail {
    grid-template-columns: 1fr;
  }

  .issue-form-status,
  .issue-form-wide {
    grid-column: auto;
  }

  .closeout-actions {
    flex-direction: column;
  }

  .cockpit-header-actions,
  .cockpit-progress {
    width: 100%;
  }

  .cockpit-progress {
    grid-template-columns: auto 1fr;
  }
}

/* ===== workspaces.css ===== */
.sidebar { overflow-y: auto; }
.sidebar .sidebar-nav { flex: 0 0 auto; }
.sidebar .nav-link { min-height: 34px; font-size: 11px; }
.sidebar-spacer { min-height: 8px; }
.nav-group { display: grid; gap: 2px; }
.nav-group + .nav-group { margin-top: 13px; }
.nav-group-label { padding: 0 12px 4px; color: #83919a; font-size: 7px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }

.workspace-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px; border-top: 3px solid var(--stc-blue); }
.workspace-intro h1, .department-hero h1, .partner-hero h1 { margin: 4px 0 6px; color: var(--ink); font-size: clamp(21px, 2.4vw, 30px); letter-spacing: -.035em; }
.workspace-intro p, .department-hero p, .partner-hero p { max-width: 740px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.workspace-card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.workspace-card { min-height: 190px; display: flex; flex-direction: column; padding: 18px; border-top: 3px solid var(--workspace-accent, var(--stc-blue)); color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.workspace-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(21, 50, 68, .1); }
.workspace-card-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 19px; border-radius: 10px; background: color-mix(in srgb, var(--workspace-accent, var(--stc-blue)) 10%, white); color: var(--workspace-accent, var(--stc-blue)); }
.operation-error { grid-column: 1 / -1; padding: 11px 13px; border: 1px solid #e7b7b2; border-radius: 8px; background: #fff4f2; color: #8b2821; font-size: 9px; font-weight: 680; }
.workspace-card h2 { margin: 5px 0 2px; font-size: 16px; }
.workspace-card p { margin: 0; color: var(--muted); font-size: 9px; }
.workspace-card footer { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 18px; }
.workspace-card footer strong { color: var(--workspace-accent, var(--stc-blue)); font-size: 10px; }
.workspace-card footer span { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 8px; font-weight: 720; }
.workspace-warehouse { --workspace-accent: #176896; }
.workspace-freight { --workspace-accent: #657338; }
.workspace-installation { --workspace-accent: #c56b22; }
.workspace-command { --workspace-accent: #00457c; }
.workspace-partner { --workspace-accent: #6f5b9d; }
.handoff-summary { display: grid; grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr); align-items: center; gap: 20px; padding: 20px 24px; }
.handoff-summary h2 { margin: 4px 0 0; font-size: 15px; }
.handoff-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 9px; }
.handoff-flow > span { display: grid; padding: 10px; border-radius: 8px; background: #f4f7f8; color: var(--ink); font-size: 9px; font-weight: 760; }
.handoff-flow small { margin-top: 2px; color: var(--muted); font-size: 7px; font-weight: 500; }
.handoff-flow > svg { color: #9aa8b0; width: 14px; }

.department-page { --department-accent: var(--stc-blue); }
.department-warehouse { --department-accent: #176896; }
.department-freight { --department-accent: #657338; }
.department-installation { --department-accent: #c56b22; }
.department-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: 22px; border-left: 4px solid var(--department-accent); }
.department-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--department-accent) 10%, white); color: var(--department-accent); }
.department-owner { display: grid; gap: 3px; min-width: 190px; padding: 12px; border-radius: 8px; background: #f5f7f8; }
.department-owner span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.department-owner strong { font-size: 9px; }
.department-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 14px; }
.department-work { padding: 20px; }
.department-work > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.department-work h2, .handoff-contract h2, .partner-update h2 { margin: 4px 0 0; font-size: 15px; }
.department-progress { padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--department-accent) 10%, white); color: var(--department-accent); font-size: 8px; font-weight: 780; }
.department-step-list { display: grid; margin: 4px 0 18px; }
.department-step { min-height: 72px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line-soft); opacity: .55; }
.department-step > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #cfd8dd; color: #87949c; }
.department-step > div { display: grid; gap: 3px; }
.department-step strong { font-size: 10px; }
.department-step small { color: var(--muted); font-size: 8px; }
.department-step b { color: var(--danger); font-size: 8px; }
.department-step.is-current, .department-step.is-complete { opacity: 1; }
.department-step.is-current > span { border-color: var(--department-accent); color: var(--department-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--department-accent) 8%, white); }
.department-step.is-complete > span { border-color: var(--department-accent); background: var(--department-accent); color: white; }
.department-action { width: 100%; justify-content: center; background: var(--department-accent); }
.department-context { align-content: start; }
.handoff-contract { padding: 18px; border-top: 3px solid var(--department-accent); }
.handoff-contract p { margin: 10px 0 16px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.handoff-contract a { display: inline-flex; align-items: center; gap: 5px; color: var(--department-accent); font-size: 8px; font-weight: 740; }
.source-evidence { display: flex; gap: 11px; padding: 17px; color: var(--department-accent); }
.source-evidence div { display: grid; gap: 4px; }
.source-evidence strong { color: var(--ink); font-size: 9px; }
.source-evidence p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }

.partner-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; border-left: 4px solid #6f5b9d; }
.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.partner-status-card { display: grid; gap: 5px; min-height: 120px; padding: 17px; }
.partner-status-card > svg { margin-bottom: 8px; color: #6f5b9d; }
.partner-status-card span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.partner-status-card strong { font-size: 11px; }
.partner-update { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px; }
.partner-update p { max-width: 660px; margin: 7px 0 0; color: var(--muted); font-size: 9px; }
.partner-actions { display: flex; gap: 8px; }

@media (max-width: 1180px) { .workspace-card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .workspace-intro, .partner-update { align-items: flex-start; flex-direction: column; }
  .workspace-card-grid { grid-template-columns: repeat(2, 1fr); }
  .handoff-summary, .department-layout { grid-template-columns: 1fr; }
  .department-hero { grid-template-columns: auto minmax(0, 1fr); }
  .department-owner { grid-column: 1 / -1; }
  .partner-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .workspace-card-grid { grid-template-columns: 1fr; }
  .handoff-flow { grid-template-columns: 1fr; }
  .handoff-flow > svg { transform: rotate(90deg); justify-self: center; }
  .partner-actions { width: 100%; flex-direction: column; }
}
@media (max-height: 850px) and (min-width: 861px) {
  /* Short laptop screens: keep the program switcher, drop the detail line and partner logos, tighten the nav. */
  .partner-lockup, .program-card p { display: none; }
  .program-card { margin: 10px 4px 6px; padding: 10px 12px; }
  .nav-link { min-height: 36px; }
  .nav-group { margin-top: 6px; }
}

.selected-program-bar { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto; align-items: center; gap: 14px; padding: 14px 18px; }
.selected-program-bar > div { display: grid; gap: 2px; }
.selected-program-bar strong { font-size: 10px; }
.selected-program-bar span:not(.eyebrow) { color: var(--muted); font-size: 7px; }
.selected-program-bar > svg { color: #9aa8b0; }
.selected-program-bar > a { color: var(--stc-blue); font-size: 8px; font-weight: 760; }
.workspace-card-grid-internal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.program-selector-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; }
.program-selector-intro h1 { margin: 5px 0 8px; font-size: clamp(22px, 3vw, 34px); }
.program-selector-intro p { max-width: 720px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.customer-account-badge { display: grid; gap: 3px; min-width: 190px; padding: 14px; border-radius: 9px; background: #f2f6f8; }
.customer-account-badge span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.customer-account-badge strong { font-size: 13px; }
.program-selector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.program-select-card { display: grid; min-height: 230px; padding: 20px; border-top: 4px solid var(--stc-blue); }
.program-select-card h2 { margin: 6px 0 4px; font-size: 17px; }
.program-select-card p { margin: 0; color: var(--muted); font-size: 9px; }
.program-select-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.program-select-card dt { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.program-select-card dd { margin: 3px 0 0; font-size: 9px; font-weight: 720; }
.program-select-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.program-select-card footer > span { color: #3c7b43; font-size: 8px; font-weight: 760; text-transform: capitalize; }
.login-platform-note { padding: 12px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: rgba(255,255,255,.78); font-size: 9px; }
@media (max-width: 980px) {
  .workspace-card-grid-internal, .program-selector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selected-program-bar { grid-template-columns: 1fr; }
  .selected-program-bar > svg { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 560px) {
  .workspace-card-grid-internal, .program-selector-grid { grid-template-columns: 1fr; }
  .program-selector-intro { align-items: flex-start; flex-direction: column; }
}


/* ===== customer-portal.css ===== */
.customer-portal-hero, .customer-program-hero { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px; border-left:4px solid var(--stc-blue); }
.customer-portal-hero h1, .customer-program-hero h1 { margin:4px 0 6px; font-size:clamp(22px,3vw,32px); letter-spacing:-.035em; }
.customer-portal-hero p, .customer-program-hero p { display:flex; align-items:center; gap:6px; max-width:720px; margin:0; color:var(--muted); font-size:10px; }
.customer-safe-badge { display:grid; grid-template-columns:auto 1fr; column-gap:8px; min-width:210px; padding:12px 14px; border-radius:9px; background:var(--stc-blue-50); color:var(--stc-blue); }
.customer-safe-badge svg { grid-row:1/3; align-self:center; }.customer-safe-badge span { font-size:7px; text-transform:uppercase; }.customer-safe-badge strong { font-size:10px; }
.customer-program-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.customer-program-card { display:grid; gap:18px; min-height:300px; padding:20px; border-top:4px solid var(--stc-blue); }
.customer-program-card-head { display:flex; justify-content:space-between; color:var(--muted); font-size:8px; text-transform:uppercase; }.customer-program-status { color:var(--success); font-weight:760; }
.customer-program-card h2 { margin:5px 0 4px; font-size:18px; }.customer-program-card p { margin:0; color:var(--muted); font-size:9px; }
.customer-program-metrics { display:grid; gap:8px; margin:0; }.customer-program-metrics div { display:grid; grid-template-columns:20px 1fr auto; align-items:center; gap:6px; }.customer-program-metrics svg { color:var(--stc-blue); }.customer-program-metrics dt { color:var(--muted); font-size:8px; }.customer-program-metrics dd { margin:0; font-size:9px; font-weight:720; }
.customer-empty-state { display:grid; place-items:center; gap:8px; min-height:240px; text-align:center; }.customer-empty-state h2,.customer-empty-state p { margin:0; }.customer-empty-state p { color:var(--muted); }
.customer-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }.customer-kpi-grid article { display:grid; grid-template-columns:auto 1fr; gap:3px 8px; min-height:86px; padding:14px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }.customer-kpi-grid svg { grid-row:1/3; align-self:center; color:var(--stc-blue); }.customer-kpi-grid span { color:var(--muted); font-size:8px; text-transform:uppercase; }.customer-kpi-grid strong { font-size:16px; text-transform:capitalize; }.customer-kpi-grid .is-risk svg { color:var(--danger); }
.customer-site-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
.customer-record-panel { padding:18px; }.customer-table-scroll { overflow-x:auto; }.customer-record-table { min-width:760px; }.customer-record-table td:first-child { display:grid; }.customer-record-table td small { color:var(--muted); }.customer-record-table td:last-child a { display:inline-flex; align-items:center; gap:4px; color:var(--stc-blue); font-size:8px; font-weight:760; white-space:nowrap; }
.customer-work-order-list { display:grid; }.customer-work-order-list > a { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:16px; padding:12px 4px; border-bottom:1px solid var(--line-soft); }.customer-work-order-list > a:last-child { border-bottom:0; }.customer-work-order-list > a > div { display:grid; gap:2px; }.customer-work-order-list span,.customer-work-order-list small { color:var(--muted); font-size:8px; }.customer-work-order-list > a > div:nth-child(2) { justify-items:end; }
.customer-work-order-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.customer-compact-list { display:grid; }.customer-compact-list > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line-soft); }.customer-compact-list > div > div { display:grid; gap:2px; }.customer-compact-list span,.customer-compact-list p { color:var(--muted); font-size:8px; }.customer-compact-list p { margin:10px 0 0; }
.customer-issue-list { display:grid; gap:8px; }.customer-issue-list article { display:grid; grid-template-columns:1fr auto; gap:5px 12px; padding:12px; border:1px solid var(--line-soft); border-radius:8px; }.customer-issue-list article > div { display:grid; gap:2px; }.customer-issue-list span,.customer-issue-list p { color:var(--muted); font-size:8px; }.customer-issue-list p { grid-column:1/-1; margin:0; }
.customer-proof-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; margin-top:12px; }.customer-proof-grid a { display:grid; gap:4px; color:var(--ink); text-decoration:none; }.customer-proof-grid img,.customer-proof-file { width:100%; aspect-ratio:4/3; object-fit:cover; border:1px solid var(--line-soft); border-radius:8px; background:var(--stc-blue-50); }.customer-proof-file { display:grid; place-items:center; color:var(--stc-blue); }.customer-proof-grid small { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }.customer-proof-empty { margin:12px 0 0; color:var(--muted); font-size:8px; }
.customer-readonly-note { margin:0; padding:10px 12px; border-radius:8px; background:var(--stc-blue-50); color:var(--stc-blue); font-size:8px; }
@media (max-width:980px) { .customer-program-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.customer-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) { .customer-portal-hero,.customer-program-hero { align-items:flex-start; flex-direction:column; }.customer-safe-badge { width:100%; }.customer-program-grid,.customer-work-order-grid,.customer-site-kpis { grid-template-columns:1fr; }.customer-work-order-list > a { grid-template-columns:1fr auto; }.customer-work-order-list > a > div:nth-child(2) { justify-items:start; }.customer-work-order-list > a > svg { display:none; } }
@media (max-width:480px) { .customer-kpi-grid { grid-template-columns:1fr; } }

/* ===== ui-review.css ===== */
/* Styles for the 2026-10-17 UI review changes. Reuses the platform tokens from globals.css. */

.chip { display:inline-flex; align-items:center; justify-content:center; width:fit-content; min-height:22px; padding:3px 8px; border:1px solid transparent; border-radius:999px; font-size:9px; font-weight:730; line-height:1; white-space:nowrap; }
.chip-success { background:var(--success-soft); border-color:#c9e4d2; color:var(--success); }
.chip-info { background:var(--info-soft); border-color:#c5ddea; color:var(--info); }
.chip-warning { background:var(--warning-soft); border-color:#efd9a8; color:#8a5b00; }
.chip-danger { background:var(--danger-soft); border-color:#f1c2bc; color:var(--danger); }
.chip-neutral { background:#f1f4f6; border-color:#dde3e8; color:#44525e; }
.chip-muted { background:#f5f6f7; border-color:#e6e9ec; color:var(--muted); }
.chip-lg { min-height:30px; padding:6px 13px; font-size:12px; }
.chip-flag { margin-left:4px; font-size:8px; }

/* Home */
.home-date { display:inline-flex; align-items:center; gap:8px; padding:9px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); font-size:14px; font-weight:700; color:var(--ink); }
.home-date svg { color:var(--stc-blue); }
.home-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.home-cards a { display:grid; grid-template-columns:auto 1fr auto; grid-template-rows:auto auto auto; gap:2px 12px; align-items:center; min-height:84px; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:var(--shadow-sm); }
.home-cards a svg { grid-column:1; grid-row:1 / 4; color:var(--stc-blue); }
.home-cards a span { grid-column:2; grid-row:1; color:var(--muted); font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.home-cards a strong { grid-column:2; grid-row:2; font-size:1.5rem; line-height:1.1; }
.home-cards a small { grid-column:3; grid-row:1 / 4; align-self:center; color:var(--stc-blue); font-size:.72rem; font-weight:800; white-space:nowrap; }
.home-cards a.is-active { border-color:var(--stc-blue); box-shadow:inset 0 0 0 1px var(--stc-blue); }
.home-cards a.is-overdue svg { color:var(--danger); }
.home-cards a.is-overdue strong { color:var(--danger); }
.home-cards a .card-date { grid-column:2; grid-row:3; color:var(--muted-2); font-size:.7rem; font-style:normal; font-weight:650; }

/* Locations queue */
.queue-kpi-strip.kpi-six { grid-template-columns:repeat(6,minmax(96px,1fr)) minmax(150px,auto); }
.queue-kpi-strip .queue-kpi-goback { background:#fffafa; }
.queue-kpi-strip .queue-kpi-goback strong { color:var(--danger); }
.queue-kpi-strip .queue-kpi-goback span { color:var(--danger); }
.cell-stack { display:grid; gap:3px; }
.cell-stack small { color:var(--muted); font-size:9px; }

/* Location detail */
.loc-hero-status { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.loc-hero-status .loc-status-block { display:grid; gap:4px; padding:9px 13px; border:1px solid var(--line); border-radius:10px; background:#fff; min-width:150px; }
.loc-hero-status .loc-status-block small { color:var(--muted); font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.05em; }
.loc-hero-status .loc-status-block .status-main { font-size:16px; font-weight:800; color:var(--ink); }
.loc-tabs { position:sticky; top:70px; z-index:8; display:flex; gap:4px; flex-wrap:wrap; padding:6px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.96); backdrop-filter:blur(8px); }
.loc-tabs button { display:inline-flex; align-items:center; gap:7px; padding:9px 13px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--muted); font:inherit; font-size:12px; font-weight:750; cursor:pointer; }
.loc-tabs button:hover { background:var(--stc-blue-50); color:var(--stc-blue); }
.loc-tabs button.is-active { background:var(--stc-blue); border-color:var(--stc-blue); color:#fff; box-shadow:var(--shadow-sm); }
.loc-tabs button span { display:grid; place-items:center; min-width:19px; height:19px; padding:0 5px; border-radius:999px; background:#e4eaf0; color:var(--ink); font-size:10px; }
.loc-tabs button.is-active span { background:rgba(255,255,255,.22); color:#fff; }
.loc-panel { display:grid; gap:14px; }
.loc-panel[hidden] { display:none; }
.quick-actions { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.quick-actions button, .quick-actions a { display:grid; justify-items:start; gap:4px; padding:12px 14px; border:1px solid var(--line); border-radius:11px; background:var(--surface); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.quick-actions button:hover, .quick-actions a:hover { border-color:#adc8db; background:var(--stc-blue-50); }
.quick-actions svg { color:var(--stc-blue); }
.quick-actions strong { font-size:12px; }
.quick-actions small { color:var(--muted); font-size:10px; }
.wo-rows { display:grid; gap:10px; }
.wo-row { display:grid; grid-template-columns:minmax(170px,1.1fr) repeat(5,minmax(96px,.8fr)) minmax(90px,.6fr) 28px; gap:12px; align-items:center; padding:12px 14px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.wo-row:hover { border-color:#adc8db; background:var(--stc-blue-50); }
.wo-row.is-blocked { box-shadow:inset 3px 0 var(--danger); }
.wo-row > div { display:grid; gap:3px; min-width:0; }
.wo-row .wo-label { color:var(--muted-2); font-size:9px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.wo-row strong { font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wo-row small { color:var(--muted); font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wo-row .issue-count { min-width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:#eef2f5; font-weight:800; font-size:12px; }
.wo-row .issue-count.has-issues { background:var(--danger-soft); color:var(--danger); }
.wo-row .row-open { justify-self:end; color:var(--stc-blue); }
.touchpoint-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; }
.touchpoint-grid article { display:grid; grid-template-columns:auto 1fr auto; gap:3px 10px; align-items:center; padding:11px 13px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.touchpoint-grid .touchpoint-code { grid-row:1 / 3; min-width:52px; padding:8px 6px; border-radius:8px; background:var(--stc-blue-50); color:var(--stc-blue); font-size:11px; font-weight:800; text-align:center; }
.touchpoint-grid strong { font-size:12px; }
.touchpoint-grid small { color:var(--muted); font-size:10px; }
.touchpoint-grid .chip { grid-row:1 / 3; }
.notes-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.notes-list { display:grid; gap:8px; }
.notes-list article { display:grid; gap:3px; padding:11px 13px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.notes-list article span { color:var(--muted); font-size:10px; }
.notes-list article p { margin:0; color:var(--ink-2); font-size:12px; white-space:pre-wrap; }
.notes-list.is-external article { border-left:3px solid var(--stc-olive); }
.notes-list.is-internal article { border-left:3px solid var(--stc-blue); }
.loc-summary { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.loc-summary article { display:grid; gap:5px; padding:13px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.loc-summary svg { color:var(--stc-blue); }
.loc-summary span { font-size:10px; color:var(--muted); text-transform:uppercase; font-weight:750; }
.loc-summary strong { font-size:14px; }

/* Work orders register */
.register-filters { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.register-filters label { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; font-weight:700; }
.register-filters input, .register-filters select { min-height:34px; padding:0 9px; border:1px solid var(--line); border-radius:8px; background:#fff; font:inherit; font-size:12px; }
.register-filters input[type="search"], .register-filters input[type="text"] { min-width:220px; }
.register-filters .date-range { display:inline-flex; align-items:center; gap:6px; padding:3px 8px; border:1px dashed var(--line); border-radius:9px; }
.register-filters .date-range span { color:var(--muted); font-size:11px; }
.register-filters button { min-height:34px; padding:0 14px; border:0; border-radius:8px; background:var(--stc-blue); color:#fff; font:inherit; font-size:12px; font-weight:750; cursor:pointer; }
.register-filters a { color:var(--stc-blue); font-size:12px; font-weight:750; }

/* Programs */
.health-bar { display:grid; gap:4px; min-width:150px; }
.health-bar .track { height:8px; overflow:hidden; border-radius:4px; background:#edf1f3; }
.health-bar .track span { display:block; height:100%; border-radius:inherit; }
.health-bar.tone-success .track span { background:var(--success); }
.health-bar.tone-warning .track span { background:#d97706; }
.health-bar.tone-danger .track span { background:var(--danger); }
.health-bar small { color:var(--muted); font-size:9px; }
.toggle-group { display:inline-flex; gap:4px; padding:3px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.toggle-group a { padding:6px 12px; border-radius:7px; color:var(--muted); font-size:12px; font-weight:750; }
.toggle-group a.is-active { background:var(--stc-blue); color:#fff; }
.simple-empty { display:grid; gap:6px; padding:28px; border:1px dashed var(--line); border-radius:12px; color:var(--muted); text-align:center; }
.simple-empty strong { color:var(--ink); }
.model-chain { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:12px; color:var(--muted); }
.model-chain span { padding:5px 9px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font-weight:700; }

/* Login customer logo */
.login-customer-logo { display:grid; justify-items:center; gap:6px; margin-bottom:18px; }
.login-customer-logo img { max-height:72px; width:auto; }
.login-customer-logo span { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.login-form-panel .login-form-stack { display:grid; justify-items:center; }

@media (max-width:1200px) { .home-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .loc-summary { grid-template-columns:repeat(3,minmax(0,1fr)); } .quick-actions { grid-template-columns:repeat(3,minmax(0,1fr)); } .wo-row { grid-template-columns:repeat(4,minmax(0,1fr)); } .wo-row .row-open { grid-column:4; } .queue-kpi-strip.kpi-six { grid-template-columns:repeat(3,minmax(96px,1fr)); } }
@media (max-width:760px) { .home-cards, .notes-columns, .quick-actions { grid-template-columns:1fr; } .loc-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } .wo-row { grid-template-columns:repeat(2,minmax(0,1fr)); } .wo-row .row-open { grid-column:2; } .loc-tabs { position:static; } }

/* ===== Design pass 2026-10-18: readable tables, clearer hierarchy, less wasted space ===== */
.main-content { padding: 20px 26px 40px; }
.page-stack { gap: 16px; }
.page-heading-row { min-height: 0; }
.page-heading-row h1 { font-size: clamp(22px, 2vw, 28px); }
.page-heading-row p { font-size: 13px; }
.eyebrow { font-size: 11px; }
.panel-heading h2 { font-size: 16px; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

/* Tables: bigger type, zebra rows, sticky header, exceptions tinted */
.data-table th { height: 40px; padding: 0 12px; font-size: 10.5px; letter-spacing: .06em; position: sticky; top: 0; z-index: 2; }
.data-table td { padding: 11px 12px; font-size: 13px; color: var(--ink); }
.data-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.data-table td strong { font-size: 13px; }
.data-table tbody tr:nth-child(even) td { background: #fafbfc; }
.data-table tbody tr:hover td { background: var(--stc-blue-50); }
.data-table tbody tr.has-exception td { background: #fff6f4; }
.data-table tbody tr.has-exception { box-shadow: inset 4px 0 var(--danger); }
.data-table .row-open { color: var(--stc-blue); }
.store-identity strong { font-size: 13px; }
.store-identity span { font-size: 10px; }
.next-action-cell strong { font-size: 12.5px; }
.next-action-cell small { font-size: 11px; }
.issue-count { min-width: 26px; height: 26px; font-size: 12px; }

/* Status chips and pills */
.status-pill { min-height: 24px; padding: 4px 10px; font-size: 11px; }
.status-pill.is-compact { min-height: 22px; font-size: 10.5px; }
.chip { min-height: 24px; padding: 4px 10px; font-size: 11px; }
.chip-flag { min-height: 18px; padding: 2px 7px; font-size: 9.5px; }

/* KPI strips */
.queue-kpi-strip { min-height: 72px; }
.queue-kpi-strip > div { flex-direction: column; gap: 2px; }
.queue-kpi-strip span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.queue-kpi-strip strong { font-size: 22px; }
.queue-kpi-strip > a { font-size: 12px; }
.installation-kpis strong { font-size: 1.35rem; }
.installation-kpis span { font-size: .7rem; }

/* Filters and toolbars */
.queue-filters select, .search-field input, .sort-control select { font-size: 13px; }
.filter-label { font-size: 12px; }
.queue-summary-row { font-size: 13px; }
.pagination-row { font-size: 12px; }
.register-filters input, .register-filters select { font-size: 13px; }
.register-filters label { font-size: 12px; }

/* Compact queue rows (PM Cockpit, Closeout) */
.installation-compact-row strong { font-size: .86rem; }
.installation-compact-row small { font-size: .74rem; }
.installation-compact-row .queue-field-label { font-size: .64rem; }
.installation-queue-tabs a { font-size: .8rem; }
.workstream-stage { font-size: 11px; }

/* Location page */
.wo-row strong { font-size: 14px; }
.wo-row small { font-size: 11px; }
.wo-row .wo-label { font-size: 10px; }
.loc-summary strong { font-size: 17px; }
.loc-summary span { font-size: 10.5px; }
.loc-tabs button { font-size: 13px; }
.quick-actions strong { font-size: 13px; }
.quick-actions small { font-size: 11px; }
.touchpoint-grid strong { font-size: 13px; }
.notes-list article p { font-size: 13px; }
.notes-list article span { font-size: 11px; }
.cell-stack small { font-size: 11px; }

/* ===== Design pass: register table, locations list, location hero ===== */
.data-table td.nowrap { white-space: nowrap; }
.data-table td.muted-cell { color: var(--muted); font-size: 12px; }
.register-table td { padding: 8px 10px; }
.register-table td small { margin-top: 1px; }
.register-count small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.installation-queue-controls { gap: 12px; }
.register-filters input[type="search"] { min-width: 170px; }
.register-filters select { max-width: 150px; }
.home-cards a.is-overdue { background: #fff7f6; border-color: #f1c2bc; }
.home-cards a.is-overdue.is-active { box-shadow: inset 0 0 0 1px var(--danger); border-color: var(--danger); }

.loc-hero { padding: 14px 18px; }
.loc-title { margin: 0 0 2px; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; white-space: nowrap; }
.loc-hero p { font-size: 12px; }
.loc-hero-status .loc-status-block { min-width: 140px; padding: 7px 11px; }
.loc-hero-status .loc-status-block .status-main { font-size: 14px; }
.loc-strip { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 14px; }
.loc-strip-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.loc-strip-stats > * { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; min-width: 118px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; text-align: left; }
.loc-strip-stats button { cursor: pointer; }
.loc-strip-stats button:hover { border-color: #adc8db; background: var(--stc-blue-50); }
.loc-strip-stats svg { grid-row: 1 / 3; color: var(--stc-blue); }
.loc-strip-stats span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; font-weight: 750; letter-spacing: .04em; }
.loc-strip-stats strong { font-size: 14px; line-height: 1.15; }
.loc-strip-stats .is-alert { border-color: #f1c2bc; background: #fff6f4; }
.loc-strip-stats .is-alert strong, .loc-strip-stats .is-alert svg { color: var(--danger); }
.loc-strip .quick-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.loc-strip .quick-actions button, .loc-strip .quick-actions a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 9px; }
.loc-strip .quick-actions strong { font-size: 12px; white-space: nowrap; }
@media (max-width: 1200px) { .loc-strip { grid-template-columns: 1fr; } .loc-strip .quick-actions { justify-content: flex-start; } .loc-title { white-space: normal; } }

/* ===== Design pass 2: fit registers without horizontal scroll ===== */
.register-header { display: grid; grid-template-columns: 1fr; gap: 10px; }
.register-header .register-filters { width: 100%; }
.register-table td { font-size: 12.5px; padding: 8px 9px; }
.register-table td small { font-size: 10.5px; }
.store-table { min-width: 0; }
.store-table td { padding: 8px 9px; font-size: 12.5px; }
.store-table td small { font-size: 10.5px; }
.next-action-cell strong { white-space: normal; font-size: 12px; line-height: 1.25; }
.loc-tabs button { padding: 8px 11px; font-size: 12.5px; }
.loc-tabs { gap: 2px; }

/* ===== Design pass 3: work order detail ===== */
.wo-hero-identity { display: flex; align-items: center; gap: 16px; }
.wo-hero-identity p { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.wo-hero-identity p a { color: var(--stc-blue); font-weight: 700; }
.wo-number { display: grid; gap: 2px; min-width: 120px; padding: 10px 14px; border-radius: 12px; background: var(--stc-blue); color: #fff; }
.wo-number span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.wo-number strong { font-size: 20px; letter-spacing: -0.01em; }
.loc-tabs button.is-alert { color: var(--danger); }
.loc-tabs button.is-alert span { background: var(--danger-soft); color: var(--danger); }
.loc-tabs button.is-alert.is-active { background: var(--danger); border-color: var(--danger); color: #fff; }
.loc-tabs button.is-alert.is-active span { background: rgba(255,255,255,.25); color: #fff; }
.fact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; margin: 10px 0 0; }
.fact-list div { display: grid; gap: 1px; }
.fact-list dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.fact-list dd { margin: 0; font-size: 13px; font-weight: 650; text-transform: capitalize; }
.installation-task-row strong { font-size: 13px; }
.installation-task-row small { font-size: 11px; }
.compact-action-control select, .compact-action-control button { font-size: 12px; }
.store-work-order-links strong { font-size: 13px; }
.store-work-order-links small { font-size: 11px; }
.visit-control strong { font-size: 13px; }
.visit-control small, .attendance-facts span { font-size: 11px; }
.support-row strong, .pack-list-control strong { font-size: 13px; }
.support-row small, .pack-list-control small { font-size: 11px; }
.work-order-chronology-event h3 { font-size: 13px; }
.work-order-chronology-event p { font-size: 12px; }
.next-action-cell { max-width: 220px; }
@media (max-width: 900px) { .fact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wo-tasks-stack { display: grid; gap: 14px; }
.installation-task-row { grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; }
.installation-task-row > div:nth-child(2) strong { white-space: normal; }
.home-cards a span, .home-cards a strong, .home-cards a .card-date { text-align: left; }

/* ===== Work order header, tabs and mobile nav fixes ===== */
.wo-hero { display: grid; gap: 12px; padding: 14px 18px; }
.wo-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wo-hero-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.wo-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.wo-facts div { display: grid; gap: 1px; }
.wo-facts dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.wo-facts dd { margin: 0; font-size: 13px; font-weight: 700; text-transform: capitalize; }
.wo-facts dd.is-danger { color: var(--danger); }
.loc-strip .installation-next-control { min-width: 240px; }
@media (max-width: 1100px) { .loc-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; } .loc-tabs button { flex: 0 0 auto; } .wo-hero-status { justify-content: flex-start; } }
@media (max-width: 1050px) { .mobile-nav-list .nav-group { display: contents; } .mobile-nav-list .nav-link { flex: 0 0 auto; white-space: nowrap; } }
.loc-strip { grid-template-columns: minmax(0, 1.9fr) minmax(230px, .8fr); }

/* ===== Touchpoint chips, closeout tab, photo gallery ===== */
.tp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; max-width: 230px; }
.tp-count { margin-right: 3px; font-size: 12px; color: var(--muted); }
.tp-count.is-complete { color: var(--success); }
.tp-chip { display: inline-flex; align-items: center; min-height: 18px; padding: 1px 6px; border: 1px solid transparent; border-radius: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.tp-success { background: var(--success-soft); border-color: #c9e4d2; color: var(--success); }
.tp-info { background: var(--info-soft); border-color: #c5ddea; color: var(--info); }
.tp-danger { background: var(--danger-soft); border-color: #f1c2bc; color: var(--danger); }
.tp-neutral { background: #f1f4f6; border-color: #dde3e8; color: #44525e; }
.tp-muted, .tp-warning { background: #f5f6f7; border-color: #e6e9ec; color: var(--muted); }
.tp-none { color: var(--muted); font-size: 11px; }
.wo-facts dd .tp-chips { max-width: none; }
.wo-facts dd .tp-chip { text-transform: none; }

.signoff-rows { display: grid; gap: 8px; }
.signoff-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.signoff-row > div:first-child { display: grid; gap: 2px; }
.signoff-row strong { font-size: 13px; }
.signoff-row small { color: var(--muted); font-size: 11px; }
.signoff-row .chip { text-transform: capitalize; }
.signoff-decisions { display: flex; gap: 6px; align-items: center; }
.signoff-decisions form { display: flex; gap: 6px; align-items: center; }
.signoff-decisions input { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; width: 150px; }
.review-history { margin-top: 12px; }
.review-history summary { display: inline-flex; align-items: center; gap: 6px; color: var(--stc-blue); font-size: 12px; font-weight: 750; cursor: pointer; }

.gallery-panel { padding: 16px 18px; }
.gallery-head { align-items: center; flex-wrap: wrap; gap: 10px; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gallery-filters button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.gallery-filters button span { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e4eaf0; color: var(--ink); font-size: 10px; }
.gallery-filters button.is-active { background: var(--stc-blue); border-color: var(--stc-blue); color: #fff; }
.gallery-filters button.is-active span { background: rgba(255,255,255,.25); color: #fff; }
.gallery-filters select { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.gallery-tile { position: relative; display: grid; grid-template-rows: 130px auto; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.gallery-tile:hover { border-color: var(--stc-blue); box-shadow: var(--shadow-sm); }
.gallery-tile img { width: 100%; height: 130px; object-fit: cover; display: block; background: #eef2f5; }
.gallery-missing { display: grid; place-items: center; gap: 6px; height: 100%; min-height: 130px; color: var(--muted); background: #eef2f5; font-size: 12px; }
.gallery-status { position: absolute; top: 6px; left: 6px; text-transform: capitalize; }
.gallery-caption { display: grid; gap: 1px; padding: 7px 9px; }
.gallery-caption strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-caption small { color: var(--muted); font-size: 10.5px; }
.gallery-more { margin-top: 12px; }
.gallery-lightbox { width: min(1100px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 30px 80px rgb(0 0 0 / 35%); }
.gallery-lightbox::backdrop { background: rgb(10 25 40 / 70%); }
.gallery-lightbox-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 420px; }
.gallery-lightbox-image { position: relative; display: grid; place-items: center; background: #0f1b26; min-height: 420px; }
.gallery-lightbox-image img { max-width: 100%; max-height: 86vh; object-fit: contain; display: block; }
.gallery-lightbox-image .gallery-missing { background: transparent; color: #fff; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: rgb(255 255 255 / 85%); color: var(--ink); cursor: pointer; }
.gallery-nav.is-prev { left: 12px; }
.gallery-nav.is-next { right: 12px; }
.gallery-lightbox-side { position: relative; display: grid; align-content: start; gap: 10px; padding: 20px 18px; }
.gallery-lightbox-side h3 { margin: 0; font-size: 17px; }
.gallery-lightbox-side p { margin: 0; color: var(--muted); font-size: 12px; }
.gallery-lightbox-side .chip { text-transform: capitalize; }
.gallery-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; }
.gallery-decisions { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.gallery-decisions form { display: flex; gap: 6px; align-items: center; }
.gallery-decisions input { flex: 1; min-width: 0; min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; }
.gallery-review { color: var(--ink-2); }
@media (max-width: 900px) { .gallery-lightbox-body { grid-template-columns: 1fr; } .signoff-row { grid-template-columns: 1fr; } }
.wo-facts .wo-tp { flex: 1 1 280px; }
.wo-facts .wo-tp .tp-chips { display: flex; }
.data-table .tp-chips { flex-wrap: nowrap; max-width: none; gap: 2px; }
.data-table .tp-chip { padding: 1px 4px; font-size: 9px; }
.data-table .tp-count { font-size: 11px; margin-right: 2px; }
.register-table td, .store-table td { padding: 7px 8px; font-size: 12px; }
.register-table th, .store-table th { padding: 0 8px; }
.register-table .tp-chips { max-width: 190px; overflow: hidden; }
.register-table td.nowrap small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.register-table td, .store-table td { font-size: 11.5px; }
.loc-tabs button { padding: 7px 9px; font-size: 12px; gap: 5px; }
.loc-tabs button span { min-width: 17px; height: 17px; font-size: 9.5px; }
.register-table td, .register-table th { padding-left: 6px; padding-right: 6px; }
.register-table .tp-chips { max-width: 150px; }
/* Panels must never widen the page: tables scroll inside their panel instead. */
.page-stack > * { min-width: 0; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.register-table td:nth-child(2), .register-table td:nth-child(4) { white-space: normal; }
.register-table .tp-chips { max-width: 130px; }
.register-table { table-layout: fixed; width: 100%; }
.register-table td { overflow: hidden; text-overflow: ellipsis; }
.register-table .chip-flag { display: block; width: fit-content; margin: 3px 0 0; }

/* ===== Work order page v3: two-column overview ===== */
.wo-overview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.wo-overview-main, .wo-overview-side { display: grid; gap: 14px; min-width: 0; }
.wo-next { display: grid; gap: 14px; padding: 16px 18px; border-left: 4px solid var(--stc-blue); }
.wo-next.is-blocked { border-left-color: var(--danger); background: linear-gradient(90deg, #fff6f4 0, #fff 40%); }
.wo-next-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.wo-next-head h2 { margin: 3px 0 2px; font-size: 18px; }
.wo-next-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.wo-progress-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; gap: 14px; align-items: end; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.wo-progress > div:first-child { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.wo-progress span { color: var(--muted); font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.wo-progress strong { font-size: 13px; }
.wo-progress-track { height: 6px; border-radius: 4px; background: #edf1f3; overflow: hidden; }
.wo-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--stc-blue); }
.wo-progress-track span.is-done { background: var(--success); }
.installation-task-panel > .wo-progress { margin: 4px 0 8px; }
.wo-mini-stat { display: grid; gap: 4px; justify-items: start; }
.wo-mini-stat > span:first-child { color: var(--muted); font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.wo-mini-stat strong { font-size: 18px; line-height: 1; }
.wo-mini-stat strong.is-danger { color: var(--danger); }
.tp-table td { padding: 8px 10px; }
.tp-table td .tp-chip { font-size: 10.5px; padding: 2px 7px; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; color: var(--stc-blue); font-size: 12px; font-weight: 750; }
.wo-side-list { display: grid; gap: 6px; }
.wo-side-list > a, .wo-side-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.wo-side-list > a:hover { border-color: #adc8db; background: var(--stc-blue-50); }
.wo-side-list a > div { display: grid; gap: 1px; min-width: 0; }
.wo-side-list strong { font-size: 13px; }
.wo-side-list small { color: var(--muted); font-size: 11px; text-transform: capitalize; }
.wo-side-list .chip { text-transform: capitalize; }
.wo-side-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 10px 0 0; }
.wo-side-facts div { display: grid; gap: 1px; }
.wo-side-facts dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.wo-side-facts dd { margin: 0; font-size: 12.5px; font-weight: 650; text-transform: capitalize; }
.wo-side-facts dd.is-danger { color: var(--danger); }
.wo-visit-list { display: grid; gap: 10px; }
.wo-visit { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.wo-visit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wo-visit-head > div { display: grid; gap: 2px; }
.wo-visit-head strong { font-size: 14px; }
.wo-visit-head small { color: var(--muted); font-size: 11.5px; }
.wo-visit-crew { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); }
.wo-visit-crew span { display: inline-flex; align-items: center; gap: 5px; }
.wo-visit-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.wo-visit-facts div { padding: 7px 10px; border-radius: 8px; background: #f6f8fa; }
.wo-visit-facts dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.wo-visit-facts dd { margin: 1px 0 0; font-size: 12.5px; font-weight: 650; }
.wo-visit-facts dd.is-ok { color: var(--success); }
.wo-visit-actions { display: flex; flex-wrap: wrap; gap: 6px; }
/* Visit closeout proof: sign-off sheet + completion photos */
.visit-proof { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, minmax(150px, 190px)); gap: 12px; align-items: stretch; padding: 16px 18px; border-left: 4px solid var(--danger); }
.visit-proof.is-complete { border-left-color: var(--success); }
.visit-proof h2 { margin: 2px 0 4px; font-size: 17px; }
.visit-proof p { margin: 0; color: var(--muted); font-size: 12.5px; }
.visit-proof > a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-content: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit; }
.visit-proof > a svg { grid-row: span 2; align-self: center; }
.visit-proof > a span { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.visit-proof > a strong { font-size: 16px; }
.visit-proof > a.is-ok { background: var(--success-soft); color: var(--success); }
.visit-proof > a.is-missing { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 760px) { .visit-proof { grid-template-columns: 1fr; } }
/* Closeout: visits missing proof */
.installation-kpis.is-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.closeout-gap-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.closeout-gap-filters p { margin: 0; color: var(--muted); font-size: 12.5px; }
.closeout-gap-filters nav { display: flex; gap: 6px; }
.closeout-gap-filters a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .72rem; font-weight: 800; }
.closeout-gap-filters a span { color: var(--ink); }
.closeout-gap-filters a.is-active { border-color: #afc6da; background: var(--stc-blue-50); color: var(--stc-blue); }
@media (max-width: 1100px) { .installation-kpis.is-five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .installation-kpis.is-five { grid-template-columns: 1fr 1fr; } }
.wo-visit-actions .button { min-height: 32px; padding: 0 12px; font-size: 12px; }
@media (max-width: 1100px) { .wo-overview { grid-template-columns: 1fr; } .wo-progress-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .wo-progress-row, .wo-visit-facts, .wo-side-facts { grid-template-columns: 1fr; } .wo-next-head { flex-direction: column; } }
.task-phase { margin: 12px 0 2px; padding: 4px 8px; border-radius: 6px; background: #f2f5f8; color: var(--stc-blue); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.installation-task-list > div:first-child .task-phase { margin-top: 2px; }
.task-select { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; font-weight: 700; background: #fff; }
.task-select.is-complete { background: var(--success-soft); border-color: #c9e4d2; color: var(--success); }
.task-select.is-in-progress, .task-select.is-ready { background: var(--info-soft); border-color: #c5ddea; color: var(--info); }
.task-select.is-blocked { background: var(--danger-soft); border-color: #f1c2bc; color: var(--danger); }
.task-select.is-skipped { background: #f5f6f7; color: var(--muted); }
.installation-task-row { padding: 7px 0; }
.installation-task-row em { font-size: 10.5px; }

/* ===== Installer touchpoint tasks ===== */
.it-list { display: grid; gap: 8px; margin-top: 10px; }
.it-touchpoint { border: 1px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; }
.it-touchpoint.tone-success { border-color: #c9e4d2; }
.it-touchpoint.tone-danger { border-color: #f1c2bc; box-shadow: inset 4px 0 var(--danger); }
.it-touchpoint-head { display: grid; grid-template-columns: 18px auto minmax(0, 1fr) 170px auto; gap: 10px; align-items: center; width: 100%; padding: 11px 14px; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.it-touchpoint-head:hover { background: var(--stc-blue-50); }
.it-touchpoint-head strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it-touchpoint-head .tp-chip { font-size: 10.5px; padding: 2px 7px; }
.it-touchpoint-progress, .tp-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.it-touchpoint-progress small, .tp-progress small { color: var(--muted); font-size: 11px; font-weight: 700; }
.it-touchpoint-body { display: grid; gap: 4px; padding: 4px 14px 12px 42px; border-top: 1px solid var(--line-soft); background: #fbfcfd; }
.it-steps-label { display: flex; align-items: center; gap: 6px; margin: 8px 0 2px; color: var(--stc-blue); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.it-step { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.it-step:last-of-type { border-bottom: 0; }
.it-step-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: #eef2f5; color: var(--muted); font-size: 11px; font-weight: 800; }
.it-step.is-complete .it-step-num { background: var(--success-soft); color: var(--success); }
.it-step.is-incomplete .it-step-num { background: var(--danger-soft); color: var(--danger); }
.it-step-label { display: grid; gap: 1px; }
.it-step-label strong { font-size: 13px; }
.it-step-label em { display: inline-flex; align-items: center; gap: 4px; color: #8a5b00; font-size: 10.5px; font-style: normal; font-weight: 700; }
.it-step-label small { color: var(--muted); font-size: 10.5px; }
.it-step-label small.is-danger { color: var(--danger); font-weight: 700; }
.it-step-form { display: flex; align-items: center; gap: 6px; }
.it-step-form input { min-height: 30px; width: 170px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; }
.it-step-form .button { min-height: 30px; padding: 0 12px; font-size: 12px; }
.it-step-form .button:disabled { opacity: .45; cursor: default; }
.it-complete-all { margin-top: 8px; }
.it-complete-all .button { min-height: 32px; font-size: 12px; }
.it-scope { margin-top: 12px; }
.it-scope-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; margin: 10px 0 12px; }
.it-scope-grid label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.it-scope-grid strong { color: var(--ink); }
.wo-site-tasks > .panel { margin-top: 10px; box-shadow: none; }
.tp-manage { display: grid; gap: 8px; }
.tp-manage-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tp-manage-row .tp-chip { justify-self: start; font-size: 11px; padding: 3px 8px; }
.tp-manage-row form { display: flex; gap: 6px; align-items: center; }
.tp-manage-row input { min-height: 32px; width: 100%; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12.5px; }
.tp-manage-row .button { min-height: 32px; padding: 0 12px; font-size: 12px; }
.tp-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding: 12px; border: 1px dashed #adc8db; border-radius: 10px; background: var(--stc-blue-50); }
.tp-add label { display: grid; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tp-add select, .tp-add input { min-height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; background: #fff; }
.tp-add input { min-width: 240px; }
.checklist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.checklist-card { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.checklist-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.checklist-card h3 { margin: 0; font-size: 14px; }
.checklist-step { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.checklist-step form { display: flex; gap: 6px; align-items: center; }
.checklist-step input[type="text"], .checklist-add input[type="text"] { min-height: 30px; flex: 1; min-width: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 12.5px; }
.checklist-step label, .checklist-add label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.checklist-step .button, .checklist-add .button, .checklist-card header .button { min-height: 30px; padding: 0 10px; font-size: 11.5px; }
.checklist-add { display: flex; gap: 6px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.checklist-uses { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .it-touchpoint-head { grid-template-columns: 18px auto minmax(0, 1fr); } .it-touchpoint-progress, .it-touchpoint-head > .chip { grid-column: 2 / -1; } .it-step { grid-template-columns: 26px 1fr; } .it-step-form { grid-column: 2; flex-wrap: wrap; } .tp-manage-row { grid-template-columns: 1fr; } }

/* ===== polish.css ===== */
/* Design polish layer (2026-10-18): use the full width, tighten spacing, add contrast and color.
   Loaded last; only overrides presentation. */

:root {
  --canvas: #e9eef3;
  --line: #d3dce4;
  --line-soft: #e4eaf0;
  --navy-900: #0b2440;
  --navy-800: #0f2f52;
  --navy-700: #00457c;
  --head-tint: #e4ecf4;
  --zebra: #f6f9fb;
  --hover: #e8f2fb;
  --shadow-sm: 0 1px 2px rgba(15, 40, 64, 0.07), 0 2px 8px rgba(15, 40, 64, 0.04);
}

body, html { background: var(--canvas); }

/* ---------- Shell: navy sidebar, slim top bar, full-width content ---------- */
.app-shell { grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { padding: 14px 12px 12px; background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%); border-right: 0; color: #dbe6f0; }
.brand-home { min-height: 46px; padding: 0 4px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); flex-wrap: wrap; row-gap: 8px; }
.stc-logo-wrap { width: auto; padding: 6px 10px; border-radius: 8px; background: #fff; }
.stc-logo-wrap img { width: 150px; }
.brand-divider { margin: 0 10px; background: rgba(255, 255, 255, 0.2); }
.brand-title strong { color: #fff; font-size: 13px; }
.brand-title small { color: #9fb6cb; }
.nav-group-label { color: #7f9cb8 !important; font-size: 9.5px; letter-spacing: 0.12em; }
.sidebar-nav { gap: 1px; }
.nav-link { min-height: 34px; padding: 0 10px; gap: 10px; color: #c3d4e3; font-size: 12.5px; font-weight: 600; }
.nav-link svg { color: #8fb0cc; }
.nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-link:hover svg { color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.nav-link.is-active svg { color: #c8dc6e; }
.nav-link.is-active::before { inset: 7px auto 7px -12px; width: 4px; background: var(--stc-olive); }
.program-card { margin: 10px 2px; padding: 11px 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.07); }
.program-card-head { color: #c8dc6e; margin-bottom: 5px; }
.program-card > strong { color: #fff; font-size: 12.5px; }
.program-card p { color: #a9bfd3; font-size: 10.5px; margin: 3px 0 8px; }
.program-card a { color: #fff; }
.partner-lockup { gap: 8px; padding: 10px 2px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.partner-logo { opacity: 1; filter: none; padding: 3px 6px; border-radius: 6px; background: #fff; height: 34px; }
.partner-separator { background: rgba(255, 255, 255, 0.2); }

.topbar { min-height: 52px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(15, 40, 64, 0.03), 0 2px 6px rgba(15, 40, 64, 0.04); }
.topbar-project .eyebrow { font-size: 9.5px; }
.topbar-project strong { font-size: 13px; color: var(--navy-800); }
.main-content { max-width: none; padding: 14px 18px 26px; }
.page-stack { gap: 12px; }

/* ---------- Typography and page headings ---------- */
.page-heading-row { align-items: center; gap: 16px; }
.page-heading-row h1 { margin: 1px 0 1px; color: var(--navy-800); font-size: clamp(21px, 1.7vw, 25px); }
.page-heading-row p { font-size: 12.5px; }
.eyebrow { color: #56789a; letter-spacing: 0.09em; }
.panel-heading h2, .compact-control-panel h2, .panel h2 { color: var(--navy-800); }

/* ---------- Panels: crisper edges, light depth ---------- */
.panel { border-color: var(--line); box-shadow: var(--shadow-sm); }
.compact-control-panel { padding: 14px 16px; }
.compact-control-panel > header, .panel > .panel-heading:first-child { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); }

/* ---------- Buttons ---------- */
.button-primary { background: linear-gradient(180deg, #0a5592 0%, var(--navy-700) 100%); border-color: var(--navy-700); box-shadow: 0 1px 2px rgba(0, 53, 95, 0.25); }
.button-primary:hover { background: linear-gradient(180deg, #0b5fa3 0%, #00508f 100%); }
.button-secondary { border-color: #c6d3de; background: #fff; }
.button-secondary:hover { background: var(--hover); border-color: #9fbcd4; }

/* ---------- Tables: navy-tinted header, zebra, strong hover ---------- */
.data-table th { background: var(--head-tint); color: #34526d; border-bottom: 1px solid #c9d6e2; font-weight: 800; }
.data-table tbody tr:nth-child(even) td { background: var(--zebra); }
.data-table tbody tr:hover td { background: var(--hover); }
.data-table tbody tr.has-exception td { background: #fdf1ef; }
.data-table tbody tr.has-exception:hover td { background: #fbe6e2; }
.data-table td strong { color: var(--ink); }
.data-table a strong { color: var(--navy-700); }
.queue-panel, .table-scroll { border-radius: var(--radius); }
.queue-toolbar { padding: 10px 14px; background: #f7fafc; border-bottom: 1px solid var(--line-soft); }
.queue-summary-row { padding: 7px 14px; }
.pagination-row { padding: 8px 14px; background: #f7fafc; border-top: 1px solid var(--line-soft); }

/* ---------- KPI strips: color-coded tiles ---------- */
.queue-kpi-strip { min-height: 64px; border: 0; background: transparent; box-shadow: none; gap: 8px; overflow: visible; }
.queue-kpi-strip > div, .queue-kpi-strip > a { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); border-top: 3px solid #9fb2c3; }
.queue-kpi-strip > div:nth-child(1) { border-top-color: #8a9aa8; }
.queue-kpi-strip > div:nth-child(2) { border-top-color: #2f7fbf; }
.queue-kpi-strip > div:nth-child(2) strong { color: #1f6aa5; }
.queue-kpi-strip > div:nth-child(3) { border-top-color: #c58a19; }
.queue-kpi-strip > div:nth-child(3) strong { color: #9a6a10; }
.queue-kpi-strip > div:nth-child(4) { border-top-color: var(--success); }
.queue-kpi-strip > div:nth-child(4) strong { color: var(--success); }
.queue-kpi-strip .queue-kpi-goback, .queue-kpi-strip .queue-kpi-risk { border-top-color: var(--danger); background: #fff6f4; }
.queue-kpi-strip > a { border-top-color: var(--navy-700); background: var(--stc-blue-50); justify-content: center; }
.installation-kpis { gap: 8px; }
.installation-kpis article { min-height: 64px; padding: 10px 14px; border-radius: 10px; border-left: 4px solid var(--navy-700); box-shadow: var(--shadow-sm); }
.installation-kpis article:nth-child(2) { border-left-color: #2f7fbf; }
.installation-kpis article:nth-child(3) { border-left-color: var(--danger); }
.installation-kpis article:nth-child(4) { border-left-color: var(--success); }
.metric-card { min-height: 0; padding: 14px; }

/* ---------- Home schedule cards ---------- */
.home-cards { gap: 10px; }
.home-cards a { min-height: 72px; padding: 11px 14px; border-left: 4px solid #2f7fbf; }
.home-cards a.is-overdue { border-left-color: var(--danger); }
.home-cards a.is-active { background: #f1f7fd; box-shadow: inset 0 0 0 1px var(--navy-700), var(--shadow-sm); }
.home-cards a.is-overdue.is-active { background: #fdf1ef; box-shadow: inset 0 0 0 1px var(--danger), var(--shadow-sm); }
.home-date { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.home-date svg { color: #c8dc6e; }

/* ---------- Tabs: tinted rail, navy active ---------- */
.loc-tabs { top: 52px; padding: 5px; background: #dfe7ef; border-color: #ccd8e3; box-shadow: none; }
.loc-tabs button { color: #3f5b74; }
.loc-tabs button:hover { background: rgba(255, 255, 255, 0.7); color: var(--navy-700); }
.loc-tabs button.is-active { background: var(--navy-800); border-color: var(--navy-800); box-shadow: 0 1px 3px rgba(11, 36, 64, 0.35); }
.loc-tabs button span { background: rgba(255, 255, 255, 0.75); }
.installation-queue-tabs { background: #e4ecf4; }

/* ---------- Location and work order heroes ---------- */
.loc-hero, .wo-hero { background: linear-gradient(90deg, #fff 0%, #fff 55%, #f2f7fb 100%); border-left: 4px solid var(--navy-700); }
.wo-number, [class*="locationCode"] { background: linear-gradient(160deg, #0a5592 0%, var(--navy-800) 100%); box-shadow: 0 2px 6px rgba(11, 36, 64, 0.25); }
.wo-facts { padding-top: 8px; }
.wo-facts dd { color: var(--navy-800); }
.loc-hero-status .loc-status-block { background: #fff; border-color: #cbd8e4; }
.loc-strip { background: #fff; }
.loc-strip-stats > * { background: #f7fafc; }
.wo-next { background: linear-gradient(90deg, #f1f7fd 0, #fff 45%); }
.wo-next.is-blocked { background: linear-gradient(90deg, #fdeeeb 0, #fff 45%); }
.wo-side-list > a, .wo-side-list > div, .wo-visit, .it-touchpoint, .signoff-row, .tp-manage-row, .wo-row { box-shadow: 0 1px 2px rgba(15, 40, 64, 0.05); }
.it-touchpoint-head { background: #f8fbfd; }
.it-touchpoint.tone-success .it-touchpoint-head { background: #f1f9f4; }
.it-touchpoint.tone-info .it-touchpoint-head { background: #eef6fc; }
.it-touchpoint.tone-danger .it-touchpoint-head { background: #fdf2f0; }
.task-phase { background: var(--head-tint); color: var(--navy-800); }

/* ---------- Chips: a little more saturation for scanability ---------- */
.chip-success, .status-success { background: #e2f3e8; border-color: #b7dcc4; color: #1f6a3c; }
.chip-info, .status-info { background: #e1eef9; border-color: #b4d1ea; color: #155a8c; }
.chip-warning, .status-warning { background: #fbf0d6; border-color: #eccf8c; color: #7d5508; }
.chip-danger, .status-danger { background: #fbe7e4; border-color: #f0b8b0; color: #a31f15; }
.chip-neutral, .status-neutral { background: #eef2f5; border-color: #d3dce4; color: #3d4f5f; }

/* ---------- Filters ---------- */
.register-header { background: #f7fafc; border-bottom: 1px solid var(--line-soft); }
.search-field, .queue-filters select, .register-filters input, .register-filters select, .sort-control select { border-color: #c9d5df; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 1fr; }
  .mobile-brand-row { background: var(--navy-800); }
  .mobile-brand-row span { color: #fff; }
  .mobile-nav-list { background: var(--navy-900); }
  .mobile-nav-list .nav-link { color: #c3d4e3; }
  .loc-tabs { top: 0; }
}

/* Locations table: fixed columns so the whole row fits; flags and chips wrap in place. */
.store-table { table-layout: fixed; width: 100%; min-width: 980px; }
.store-table th:nth-child(1) { width: 7%; }
.store-table th:nth-child(2) { width: 11%; }
.store-table th:nth-child(3) { width: 9%; }
.store-table th:nth-child(4) { width: 10%; }
.store-table th:nth-child(5) { width: 11%; }
.store-table th:nth-child(6) { width: 12%; }
.store-table th:nth-child(7) { width: 17%; }
.store-table th:nth-child(8) { width: 5%; }
.store-table th:nth-child(9) { width: 15%; }
.store-table th:nth-child(10) { width: 3%; }
.store-table td { overflow: hidden; text-overflow: ellipsis; }
.store-table td:nth-child(6) { white-space: normal; }
.store-table td:nth-child(6) .chip-flag { margin: 2px 2px 0 0; }
.store-table .tp-chips { flex-wrap: wrap; row-gap: 2px; }
.store-table .next-action-cell strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Work Orders register: count and filters share one row; chips wrap within the row height. */
.register-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 10px 14px; }
.register-header > div:first-child .eyebrow { display: none; }
.register-header h2.register-count { margin: 0; font-size: 20px; color: var(--navy-800); white-space: nowrap; }
.register-header .register-filters { width: auto; flex: 1; justify-content: flex-end; gap: 6px; }
.register-filters input[type="search"] { min-width: 150px; width: 170px; }
.register-filters select { max-width: 138px; }
.register-filters .date-range { padding: 2px 6px; background: #fff; }
.register-filters .date-range input { border: 0; min-height: 30px; padding: 0 4px; }
.register-table .tp-chips { flex-wrap: wrap; row-gap: 2px; max-width: none; overflow: visible; }

/* Location page strip: counts left, all five quick actions in one row on the right. */
.loc-strip:has(.quick-actions) { grid-template-columns: minmax(0, 1fr) auto; }
.loc-strip .quick-actions { flex-wrap: nowrap; }
.loc-strip .quick-actions button, .loc-strip .quick-actions a { padding: 7px 10px; background: #fff; border-color: #c9d5df; }
.loc-strip .quick-actions button:hover, .loc-strip .quick-actions a:hover { background: var(--hover); border-color: #9fbcd4; }
@media (max-width: 1280px) { .loc-strip:has(.quick-actions) { grid-template-columns: 1fr; } .loc-strip .quick-actions { flex-wrap: wrap; justify-content: flex-start; } }
@media (max-width: 1050px) { .mobile-brand-row img { padding: 4px 7px; border-radius: 6px; background: #fff; } }

/* Work order Tasks tab: installer tasks (left) and STC PM tasks (right) side by side. */
.wo-tasks-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.wo-tasks-col { display: grid; gap: 14px; min-width: 0; }
.wo-tasks-split .panel-heading p { margin-top: 2px; font-size: 11.5px; }
.wo-tasks-split .panel-count { white-space: nowrap; flex-shrink: 0; }
.wo-tasks-split .it-touchpoint-head { grid-template-columns: 16px auto minmax(0, 1fr) minmax(70px, 110px) auto; gap: 8px; padding: 9px 12px; }
.wo-tasks-split .it-touchpoint-body { padding: 4px 12px 10px 34px; }
.wo-tasks-split .it-step { gap: 8px; padding: 5px 0; }
.wo-tasks-split .it-step-form input { width: 130px; }
.wo-tasks-split .installation-task-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; }
.wo-tasks-split .task-phase { margin-top: 8px; }
.wo-tasks-split .task-check { width: 26px; height: 26px; font-size: 10.5px; }
.installation-task-row .compact-action-control { position: relative; align-items: center; }
.installation-task-row .compact-action-control select { min-width: 104px; }
@media (max-width: 1200px) { .wo-tasks-split { grid-template-columns: 1fr; } }

/* Work order Field work tab: a row of cards in the order the work happens (Before the visits, each visit, After the
   visits), Touchpoints under them on the same columns (subgrid). Each card opens its detail in a pop-up (.fw-pop).
   Colour says who does the work: gray STC internal, orange the installer on site, blue the touchpoint scope. */
:root {
  --k-int-bg: #e7ebef; --k-int-line: #c6ced6; --k-int-ink: #44515e;
  --k-fld-bg: #fdf3e8; --k-fld-line: #efc9a2; --k-fld-ink: #ad641f;
  --k-scope-bg: #eef5fb; --k-scope-line: #c5d9ea; --k-scope-ink: #175f91;
}
.wo-frame { container: woframe / inline-size; display: grid; gap: 10px; min-width: 0; }
.fw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.fw-summary { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--muted); font-size: 13px; }
.fw-summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.fw-head .modal-trigger-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; }
.fw-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 12px; }
.fw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fw-swatch { width: 13px; height: 13px; border: 1px solid; border-radius: 4px; }
.fw-swatch.k-int { background: var(--k-int-bg); border-color: var(--k-int-line); }
.fw-swatch.k-fld { background: var(--k-fld-bg); border-color: var(--k-fld-line); }
.fw-swatch.k-scope { background: var(--k-scope-bg); border-color: var(--k-scope-line); }
.fw-scroll { overflow-x: auto; padding: 2px 2px 6px; }
.fw-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(185px, 340px)); gap: 12px; align-items: stretch; }
/* A card: the whole card is its pop-up trigger (.fw-card-hit, laid over it); the next-step button sits above it. */
.fw-card { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.fw-card:hover { box-shadow: 0 4px 14px rgba(0, 40, 70, 0.12); }
.fw-card:has(.fw-card-hit:focus-visible) { outline: 2px solid var(--stc-blue); outline-offset: 2px; }
.fw-card-hit { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.fw-card-hit:focus-visible { outline: none; }
.fw-card-action { position: relative; z-index: 2; }
.fw-card.k-int { background: var(--k-int-bg); border-color: var(--k-int-line); }
.fw-card.k-fld { background: var(--k-fld-bg); border-color: var(--k-fld-line); }
.fw-card.k-int:hover { border-color: var(--k-int-ink); }
.fw-card.k-fld:hover { border-color: var(--k-fld-ink); }
.fw-card.k-scope:hover { border-color: var(--k-scope-ink); }
/* The visit at work: a white face and a solid orange top edge, so it stands out from the other visits. */
.fw-card.k-fld.is-now { background: var(--surface); border-color: var(--k-fld-ink); box-shadow: inset 0 4px 0 var(--k-fld-ink), 0 4px 14px rgba(173, 100, 31, 0.14); }
@media (prefers-reduced-motion: reduce) { .fw-card { transition: none; } }
.fw-card-top { display: grid; gap: 3px; min-width: 0; }
.fw-card-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fw-card-kicker > span:first-child { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.k-int .fw-card-kicker > span:first-child { color: var(--k-int-ink); }
.k-fld .fw-card-kicker > span:first-child { color: var(--k-fld-ink); }
.fw-card-kicker .chip { font-size: 11px; }
.fw-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; line-height: 1.25; }
.fw-card-top > small { color: var(--muted); font-size: 12px; }
.k-fld .wo-visit-seq { background: var(--k-fld-ink); color: #fff; }
.fw-card-mid { display: grid; gap: 12px; align-content: start; min-width: 0; }
.fw-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding-top: 8px; border-top: 1px solid var(--line-soft, #e7edf1); }
.k-int .fw-card-foot { border-top-color: var(--k-int-line); }
.k-fld .fw-card-foot { border-top-color: var(--k-fld-line); }
.fw-card-foot small { color: var(--muted); font-size: 12px; }
.fw-card-open { color: var(--stc-blue); font-size: 12px; font-weight: 700; }
.fw-card-foot .button { min-height: 30px; padding: 4px 12px; font-size: 12.5px; }
.fw-card-foot form { margin: 0; }
.fw-card-foot .chip-warning { white-space: normal; text-align: right; }
/* A visit's five marks, check-in to check-out. */
.fw-marks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin: 0; padding: 0; list-style: none; }
.fw-marks li { display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 10px; line-height: 1.15; text-align: center; }
.fw-marks i { display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 10px; font-style: normal; font-weight: 800; }
.fw-marks .is-ok i { border-color: var(--success); background: var(--success); color: #fff; }
.fw-marks .is-now i { border-color: var(--info); background: var(--info-soft); }
.fw-marks .is-miss i { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.fw-counts { display: grid; gap: 6px; align-content: start; }
.fw-count { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; align-items: center; font-size: 12.5px; }
.fw-count b { font-family: var(--font-mono), monospace; font-size: 12px; font-variant-numeric: tabular-nums; }
.fw-count b.is-done { color: var(--success); }
.fw-count.is-muted { color: var(--muted); }
.fw-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }
.fw-dot.k-int { background: var(--k-int-ink); }
.fw-dot.k-fld { background: var(--k-fld-ink); }
.fw-dot.k-scope { background: var(--k-scope-ink); }
.fw-bar { grid-column: 1 / -1; height: 4px; border-radius: 3px; background: rgba(120, 130, 140, 0.18); overflow: hidden; }
.fw-bar i { display: block; height: 100%; }
.fw-bar.k-int i { background: var(--k-int-ink); }
.fw-bar.k-fld i { background: var(--k-fld-ink); }
.fw-bar i.is-done { background: var(--success); }
.fw-tasklist { display: grid; gap: 6px; align-content: start; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.fw-tasklist li { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 7px; align-items: start; }
.fw-tasklist i { display: grid; place-items: center; width: 15px; height: 15px; margin-top: 1px; border: 1.5px solid var(--k-int-line); border-radius: 50%; background: var(--surface); color: #fff; }
.fw-tasklist .is-done i { border-color: var(--success); background: var(--success); }
.fw-tasklist .is-skipped { color: var(--muted); text-decoration: line-through; }
.fw-tasklist .is-more { display: block; color: var(--muted); }
/* Touchpoints: one card across the grid, its columns on the same tracks as the cards above. */
.fw-card.fw-tp { grid-column: 1 / -1; grid-template-columns: subgrid; grid-template-rows: none; gap: 0; padding: 0; overflow: hidden; border-color: var(--k-scope-line); background: var(--surface); }
.fw-tp-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding: 7px 0; border-top: 1px solid var(--line-soft, #e7edf1); font-size: 12.5px; }
.fw-tp-row > div { min-width: 0; padding: 0 14px; }
.fw-tp-row.is-head { padding: 10px 0; border-top: 0; border-bottom: 1px solid var(--k-scope-line); background: var(--k-scope-bg); color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.fw-tp-row.is-head + .fw-tp-row { border-top: 0; }
.fw-tp-title { display: flex; align-items: center; gap: 8px; color: var(--k-scope-ink); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.fw-tp-name { display: flex; align-items: center; gap: 8px; }
.fw-tp-name small { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.fw-tp-visit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fw-tp-done { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 5px; background: var(--success-soft); color: var(--success); font-family: var(--font-mono), monospace; font-size: 11.5px; font-weight: 700; }
.fw-tp-todo { padding: 2px 6px; border: 1px dashed var(--line); border-radius: 5px; color: var(--muted); font-family: var(--font-mono), monospace; font-size: 11.5px; font-weight: 700; }
.fw-tp-none { color: var(--line); }
.fw-tp-empty { grid-column: 1 / -1; padding: 12px 14px; color: var(--muted); font-size: 12.5px; }
.fw-tp-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; padding: 9px 14px; border-top: 1px solid var(--line-soft, #e7edf1); }
.fw-tp-foot small { color: var(--muted); font-size: 12px; }
/* Narrow: one column in time order; touchpoint rows list each visit's share with its V1, V2 label. */
@container woframe (max-width: 720px) {
  .fw-grid { grid-template-columns: minmax(0, 1fr); }
  .fw-card.fw-tp { display: block; }
  .fw-tp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
  .fw-tp-row.is-head > div:not(:first-child) { display: none; }
  .fw-tp-row > .fw-tp-name { flex: 1 1 100%; }
  .fw-tp-row > div { padding-right: 0; }
  .fw-tp-visit:has(.fw-tp-none) { display: none; }
  .fw-tp-visit::before { content: attr(data-v); color: var(--muted); font-family: var(--font-mono), monospace; font-size: 10px; font-weight: 700; }
}
/* Pop-ups: a card's full detail and its actions. Sections are tinted by who does the work. */
.fw-pop { container: wocol / inline-size; display: grid; gap: 12px; }
.fw-pop-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.fw-pop-bar small { color: var(--muted); font-size: 12.5px; }
.fw-pop-bar .modal-trigger-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.fw-pop .it-list { border: 1px solid var(--k-scope-line); border-radius: 10px; overflow: hidden; }
.wo-visit-body { container: wocol / inline-size; display: grid; gap: 12px; }
.wo-visit-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wo-visit-bar small { flex: 1 1 220px; min-width: 0; color: var(--muted); font-size: 12.5px; }
.wo-visit-bar-next form { margin: 0; }
.wo-visit-body .visit-facts { width: 100%; margin: 0; }
.wo-visit-body .visit-actions { margin: 0; }
.wo-visit-work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.wo-visit-part { min-width: 0; border: 1px solid var(--line-soft, #e7edf1); border-radius: 10px; }
.wo-visit-part > header { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-bottom: 1px solid var(--line-soft, #e7edf1); border-radius: 10px 10px 0 0; background: #f7f9fb; }
.wo-visit-part > header h4 { margin: 0; font-size: 13px; }
.wo-visit-part > header .chip { font-size: 11px; }
.wo-visit-part > header small { margin-left: auto; color: var(--muted); font-size: 12px; }
.wo-visit-part > header .modal-trigger-link { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12px; }
.wo-visit-part.k-int { border-color: var(--k-int-line); }
.wo-visit-part.k-int > header { border-color: var(--k-int-line); background: var(--k-int-bg); }
.wo-visit-part.k-int > header h4 { color: var(--k-int-ink); }
.wo-visit-part.k-fld { border-color: var(--k-fld-line); }
.wo-visit-part.k-fld > header { border-color: var(--k-fld-line); background: var(--k-fld-bg); }
.wo-visit-part.k-fld > header h4 { color: var(--k-fld-ink); }
.wo-visit-part.k-scope { border-color: var(--k-scope-line); }
.wo-visit-part.k-scope > header { border-color: var(--k-scope-line); background: var(--k-scope-bg); }
.wo-visit-part.k-scope > header h4 { color: var(--k-scope-ink); }
.wo-visit-part .wo-frame-tasks .installation-task-row { padding: 6px 12px; }
.wo-visit-part .wo-frame-tasks > .wo-task-group:first-child > div:first-child > .installation-task-row { border-top: 0; }
.wo-visit-part .wo-dispatch-inline { margin: 2px 12px 8px 46px; }
/* Pop-ups render outside the page, so task Override links need the page's link look. */
.app-modal-content .override-trigger { padding: 2px 4px; border: 0; background: transparent; color: var(--stc-blue); font-size: 11.5px; font-weight: 700; }
.app-modal-content .override-trigger:hover { background: transparent; text-decoration: underline; }
.app-modal-content .override-trigger svg { display: none; }
/* Touchpoint tasks on a visit: done here (green steps), then what is still open or carried to the visit. */
.vt-list { display: grid; }
.vt-group { padding: 6px 12px; border-top: 1px solid var(--line-soft, #e7edf1); background: #fbfcfd; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.vt-list > .vt-group:first-child { border-top: 0; }
.vt-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 7px 12px; border-top: 1px solid var(--line-soft, #e7edf1); font-size: 13px; }
.vt-line > .tp-chip { justify-self: start; max-width: 100%; }
.vt-steps { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.vt-step { padding: 2px 7px; border-radius: 5px; background: var(--success-soft); color: var(--success); font-size: 11.5px; }
.vt-step.is-open { background: #eef2f5; color: var(--muted); }
.vt-count { color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vt-open { display: grid; gap: 2px; padding: 8px 12px; border-top: 1px solid var(--line-soft, #e7edf1); }
.vt-open-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.vt-open-head small { color: var(--muted); font-size: 12px; }
.vt-empty, .vt-note { margin: 0; padding: 8px 12px; border-top: 1px solid var(--line-soft, #e7edf1); color: var(--muted); font-size: 12.5px; }
.vt-list > .vt-empty:first-child { border-top: 0; }
@container wocol (max-width: 520px) {
  .vt-line { grid-template-columns: minmax(0, 1fr) auto; }
  .vt-line > .vt-steps { grid-column: 1 / -1; grid-row: 2; }
  .wo-visit-part .wo-dispatch-inline { margin-left: 12px; }
}
/* Notes beside every work order tab when there is room; below the tab's content otherwise. */
.wo-page { container: wopage / inline-size; }
.loc-tabs-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.loc-tabs-main { min-width: 0; }
.wo-notes { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.wo-notes-head { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line-soft, #e7edf1); }
.wo-notes-head strong { font-size: 14px; }
.wo-notes-add { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 0; border: 0; background: transparent; color: var(--stc-blue); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.wo-notes-add:hover { text-decoration: underline; }
.wo-notes-add svg { width: 14px; height: 14px; }
.wo-notes-body.loc-notes-pane { position: static; max-height: none; overflow: visible; padding: 10px 16px 14px; border: 0; box-shadow: none; }
.wo-notes-more { color: var(--stc-blue); font-size: 12px; font-weight: 700; }
@container wopage (min-width: 1140px) {
  .loc-tabs-split { grid-template-columns: minmax(0, 1fr) 300px; }
  .wo-notes { position: sticky; top: 106px; display: flex; flex-direction: column; max-height: calc(100vh - 120px); }
  .wo-notes-body.loc-notes-pane { overflow: auto; }
}
/* A visit's facts table in workflow order, then one row of actions. */
.wo-visit-side { flex-wrap: nowrap; }
.visit-facts { width: calc(100% - 25px); margin: 0 0 0 25px; border-collapse: collapse; font-size: 12.5px; }
.visit-facts th { width: 92px; padding: 6px 12px 6px 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; vertical-align: top; white-space: nowrap; }
.visit-facts td { padding: 5px 0; vertical-align: top; }
.visit-facts tr + tr > * { border-top: 1px solid var(--line-soft, #e7edf1); }
.visit-facts .chip { font-size: 11px; }
.visit-facts .button { min-height: 26px; padding: 2px 10px; font-size: 12px; }
.visit-facts form { display: inline; margin: 0; }
.fact-ok { display: inline-flex; align-items: center; gap: 5px; }
.fact-ok svg { color: var(--success); }
.fact-miss { display: inline-flex; align-items: center; gap: 5px; color: var(--danger); font-weight: 700; }
.fact-none { color: var(--muted); }
.fact-sheet { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.fact-sheet + .fact-sheet { margin-top: 6px; }
.fact-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 10px; vertical-align: middle; }
.visit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 0 25px; }
.visit-actions form { margin: 0; }
.visit-actions .button { min-height: 30px; padding: 4px 11px; font-size: 12.5px; }
@container wocol (max-width: 600px) {
  .fw-pop .it-touchpoint-body.has-photos { grid-template-columns: minmax(0, 1fr); }
}
@container wocol (max-width: 520px) {
  .visit-facts th { width: 80px; }
}
@container wocol (max-width: 360px) {
  .wo-frame-tasks .installation-task-row { grid-template-columns: 24px minmax(0, 1fr); }
  .wo-frame-tasks .installation-task-row > :last-child { grid-column: 2; }
}
/* Touchpoints and tasks in a pop-up: plain lines divided by hairlines, no card per row. */
.fw-pop .it-list { gap: 0; margin-top: 0; }
.fw-pop .it-touchpoint { border: 0; border-top: 1px solid var(--line-soft, #e7edf1); border-radius: 0; }
.fw-pop .it-touchpoint:first-child { border-top: 0; }
.fw-pop .it-touchpoint.tone-success .it-touchpoint-head, .fw-pop .it-touchpoint.tone-info .it-touchpoint-head { background: transparent; }
.fw-pop .it-touchpoint .it-touchpoint-head:hover { background: var(--stc-blue-50); }
.fw-pop .it-touchpoint-head { padding: 8px 16px; }
.fw-pop .it-list > .compact-empty { margin: 0; border: 0; }
.wo-frame-tasks { margin-top: 0; }
.wo-frame-tasks .installation-task-row { padding: 6px 16px; border-top: 1px solid var(--line-soft, #e7edf1); }
/* Task groups: a heading row (visit or phase) with its count, then the tasks. */
.wo-task-group-head { display: flex; align-items: baseline; gap: 8px; padding: 6px 16px; border-top: 1px solid var(--line-soft, #e7edf1); background: #f7f9fb; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.wo-frame-tasks > .wo-task-group:first-child > .wo-task-group-head { border-top: 0; }
.wo-task-group-head small { font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.wo-task-group-head b { margin-left: auto; font-weight: 700; }
.wo-frame-tasks .installation-task-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; }
.fw-pop .task-check { width: 24px; height: 24px; font-size: 12px; }
.task-check.is-skipped { color: var(--muted); background: #f5f6f7; }
.wo-frame-tasks > .compact-empty { margin: 0; border: 0; }
.wo-task-fold { border-top: 1px dashed var(--line); }
.wo-frame-tasks > .wo-task-fold:first-child { border-top: 0; }
.wo-task-fold > summary { display: flex; align-items: flex-start; gap: 8px; padding: 8px 16px; color: var(--muted); font-size: 12px; cursor: pointer; list-style: none; }
.wo-task-fold > summary::-webkit-details-marker { display: none; }
.wo-task-fold > summary strong { color: var(--ink-2, #33475b); }
.wo-task-fold-chev { flex: none; margin-top: 1px; transition: transform 0.15s ease; }
.wo-task-fold[open] .wo-task-fold-chev { transform: rotate(90deg); }
.wo-task-fold[open] > summary { border-bottom: 1px solid var(--line-soft, #e7edf1); }
.wo-task-fold .installation-task-row { background: #fafbfc; }
.it-touchpoint-photos { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.it-touchpoint-head:has(.it-touchpoint-photos) { grid-template-columns: 18px auto minmax(0, 1fr) auto 170px auto; }
.it-touchpoint-body.has-photos { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 4px 18px; align-items: start; }
.it-touchpoint-steps, .it-touchpoint-gallery { display: grid; gap: 4px; min-width: 0; }
.it-touchpoint-gallery .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 88px)); gap: 6px; }
.it-touchpoint-gallery .gallery-caption small { display: none; }
.it-touchpoint-gallery .gallery-tile { grid-template-rows: 62px auto; border-radius: 7px; }
.it-touchpoint-gallery .gallery-tile img { height: 62px; }
.it-touchpoint-gallery .gallery-caption { padding: 3px 6px; font-size: 10.5px; }
.it-touchpoint-gallery .photo-group-title { margin: 4px 0; font-size: 11.5px; }
.it-other-photos { border-top: 1px solid var(--line-soft, #e7edf1); }
.it-other-photos > summary { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer; list-style: none; }
.it-other-photos > summary::-webkit-details-marker { display: none; }
.it-other-photos > summary small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.it-other-photos[open] > summary svg { transform: rotate(90deg); }
.it-other-photos > :not(summary) { padding: 0 14px 12px 42px; }
.wo-dispatch-inline { margin: 2px 16px 8px 50px; padding: 10px 12px; border: 1px solid var(--line-soft, #e7edf1); border-radius: 9px; background: #f7f9fb; }
.wo-dispatch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wo-dispatch-head h3 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 13px; }
.wo-dispatch-inline .wo-dispatch-row:first-of-type { margin-top: 6px; }
/* In the checklist column: package and status on one line, its recipients and links below. */
.wo-dispatch-inline .wo-dispatch-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
.wo-dispatch-inline .wo-dispatch-detail { grid-column: 1 / -1; grid-row: 2; }
@media (max-width: 900px) {
  .it-touchpoint-head:has(.it-touchpoint-photos) { grid-template-columns: 18px auto minmax(0, 1fr); }
  .it-touchpoint-photos { grid-column: 2 / -1; }
  .it-touchpoint-body.has-photos { grid-template-columns: minmax(0, 1fr); }
  .wo-dispatch-inline { margin-left: 10px; }
  .it-other-photos > :not(summary) { padding-left: 14px; }
}

/* Service level accents: same work order layout, colour tells audit/survey and site readiness apart. */
.wo-hero.svc-survey { border-left-color: #6b4fa3; background: linear-gradient(90deg, #fff 0%, #fff 55%, #f5f2fb 100%); }
.wo-hero.svc-survey .wo-number { background: linear-gradient(160deg, #7a5cb4 0%, #4a3478 100%); box-shadow: 0 2px 6px rgba(74, 52, 120, 0.28); }
.wo-hero.svc-readiness { border-left-color: #0f7a6c; background: linear-gradient(90deg, #fff 0%, #fff 55%, #eff8f6 100%); }
.wo-hero.svc-readiness .wo-number { background: linear-gradient(160deg, #149484 0%, #0b5a50 100%); box-shadow: 0 2px 6px rgba(11, 90, 80, 0.28); }
.compact-control-panel .panel-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; }

/* Service level pills: one color per level, matching the work order hero accents. */
.level-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.level-install { background: #e3eefa; border-color: #b7d0ea; color: #0b4f8a; }
.level-audit { background: #efe9fa; border-color: #d3c4ef; color: #553a8f; }
.level-site-survey { background: #fbeee2; border-color: #efd0b4; color: #8a4b12; }
.level-site-readiness { background: #e2f4f1; border-color: #b4e0d8; color: #0b6458; }
.level-maintenance { background: #fdf1df; border-color: #f0d3a3; color: #8a5600; }
.level-storage-handling, .level-shipment { background: #eef1f4; border-color: #d5dce3; color: #4a5866; }
.level-3d-scan, .level-vinyl { background: #fbe9f1; border-color: #f0c4d8; color: #8e2c5c; }
/* Lineage under the work order number: returns point back to their original order. */
.wo-lineage { color: var(--muted); }
.wo-lineage.is-return { color: #8a5600; font-weight: 700; }
.wo-row .wo-lineage { text-transform: none; letter-spacing: 0; }
.register-table .wo-lineage, .data-table td .wo-lineage { display: block; white-space: normal; line-height: 1.25; }

/* Admin-editable colors for statuses, service levels and types (lib/vocabulary-model.ts). */
.chip.vc-gray, .level-pill.vc-gray, .status-pill.vc-gray, .vc-swatch.vc-gray, .wo-band.vc-gray, .wo-dot.vc-gray { background: #eef1f4; border-color: #d5dce3; color: #4a5866; }
.chip.vc-blue, .level-pill.vc-blue, .status-pill.vc-blue, .vc-swatch.vc-blue, .wo-band.vc-blue, .wo-dot.vc-blue { background: #e3eefa; border-color: #b7d0ea; color: #0b4f8a; }
.chip.vc-green, .level-pill.vc-green, .status-pill.vc-green, .vc-swatch.vc-green, .wo-band.vc-green, .wo-dot.vc-green { background: #e2f3e8; border-color: #b7dcc4; color: #1f6a3c; }
.chip.vc-amber, .level-pill.vc-amber, .status-pill.vc-amber, .vc-swatch.vc-amber, .wo-band.vc-amber, .wo-dot.vc-amber { background: #fdf1df; border-color: #f0d3a3; color: #8a5600; }
.chip.vc-red, .level-pill.vc-red, .status-pill.vc-red, .vc-swatch.vc-red, .wo-band.vc-red, .wo-dot.vc-red { background: #fbe7e4; border-color: #f0b8b0; color: #a31f15; }
.chip.vc-purple, .level-pill.vc-purple, .status-pill.vc-purple, .vc-swatch.vc-purple, .wo-band.vc-purple, .wo-dot.vc-purple { background: #efe9fa; border-color: #d3c4ef; color: #553a8f; }
.chip.vc-orange, .level-pill.vc-orange, .status-pill.vc-orange, .vc-swatch.vc-orange, .wo-band.vc-orange, .wo-dot.vc-orange { background: #fbeee2; border-color: #efd0b4; color: #8a4b12; }
.chip.vc-teal, .level-pill.vc-teal, .status-pill.vc-teal, .vc-swatch.vc-teal, .wo-band.vc-teal, .wo-dot.vc-teal { background: #e2f4f1; border-color: #b4e0d8; color: #0b6458; }
.chip.vc-pink, .level-pill.vc-pink, .status-pill.vc-pink, .vc-swatch.vc-pink, .wo-band.vc-pink, .wo-dot.vc-pink { background: #fbe9f1; border-color: #f0c4d8; color: #8e2c5c; }

/* Admin & Data -> Types, levels & statuses */
.vocab-panel { padding-bottom: 8px; }
.vocab-head, .vocab-row { display: grid; grid-template-columns: 170px minmax(140px, 1fr) 110px 80px 80px 90px; gap: 10px; align-items: center; padding: 8px 18px; }
.vocab-head.has-customer, .vocab-row.has-customer { grid-template-columns: 170px minmax(140px, 1fr) minmax(140px, 1fr) 110px 80px 80px 90px; }
.vocab-head.has-parent, .vocab-row.has-parent { grid-template-columns: 170px minmax(140px, 1fr) 110px 150px 80px 80px 90px; }
.vocab-head.template-head, .vocab-row.template-row { grid-template-columns: minmax(200px, 1.4fr) 140px 90px 100px 80px 90px; }
.vocab-head { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.vocab-row { border-bottom: 1px solid var(--line); }
.vocab-row:last-child { border-bottom: 0; }
.vocab-row input:not([type=checkbox]), .vocab-row select { width: 100%; min-height: 32px; }
.vocab-row .level-pill { justify-self: start; }
.vocab-shown { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.vocab-row .button { min-height: 32px; padding: 0 12px; font-size: 12px; }
@media (max-width: 900px) { .vocab-head { display: none; } .vocab-row, .vocab-row.has-customer, .vocab-row.has-parent, .vocab-row.template-row { grid-template-columns: 1fr 1fr; } }

/* Billing checks the database evaluates on its own. */
.billing-check-grid .billing-auto { color: var(--muted, #64748b); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* Work order billing steps (Mark submitted / billed, admin override and exclude). */
.billing-steps { display: grid; gap: 8px; margin-bottom: 12px; }
.billing-steps p { margin: 0; }
.billing-step-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Work order facts: lift status chip with its Update link. */
.wo-facts .wo-lift dd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===== popups.css ===== */
/* Pop-up windows (components/modal.tsx) and shared photo viewer (components/photo-viewer.tsx). */

.app-modal { width: min(560px, 94vw); max-height: 90vh; padding: 0; border: 0; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / 32%); overflow: hidden; }
.app-modal-sm { width: min(420px, 94vw); }
.app-modal-lg { width: min(780px, 94vw); }
.app-modal-xl { width: min(1180px, 96vw); }
.app-modal::backdrop { background: rgb(10 25 40 / 62%); backdrop-filter: blur(2px); }
.app-modal[open] { animation: app-modal-in .14s ease-out; }
@keyframes app-modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.app-modal-body { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: 90vh; }
.app-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #f3f7fb, #fff); }
.app-modal-head h2 { margin: 2px 0 0; font-size: 17px; color: var(--navy-800, var(--ink)); }
.app-modal-close { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.app-modal-close:hover { background: var(--hover, #e8f2fb); }
.app-modal-content { display: grid; gap: 12px; padding: 16px 18px 18px; overflow: auto; }
.app-modal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

/* Forms inside pop-ups share the compact field look of the old inline cards. */
.modal-form { display: grid; gap: 10px; }
.modal-form label { display: grid; gap: 4px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.modal-form input:not([type="checkbox"]):not([type="radio"]), .modal-form select, .modal-form textarea { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus { outline: 2px solid #9fbcd4; outline-offset: 0; border-color: #6f9cc2; }
.modal-form textarea { resize: vertical; }
.modal-form .control-disclaimer, .modal-form .checklist-uses { margin: 0; color: var(--muted); font-size: 11.5px; }
.modal-form .it-scope-grid { margin: 0; }
.app-modal .compact-issue-actions form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.app-modal .compact-issue-actions form > div { display: grid; gap: 2px; }
.app-modal .compact-issue-actions span { color: var(--muted); font-size: 11px; }
.app-modal .compact-issue-actions input { min-height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12.5px; }

/* Triggers */
.modal-trigger-card { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface, #fff); color: var(--stc-blue); font: inherit; text-align: left; cursor: pointer; }
.modal-trigger-card:hover { border-color: #9fbcd4; background: var(--hover, #e8f2fb); }
.modal-trigger-card span { display: grid; gap: 2px; }
.modal-trigger-card strong { color: var(--ink); font-size: 13px; }
.modal-trigger-card small { color: var(--muted); font-size: 11px; font-weight: 500; }
.modal-trigger-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--stc-blue); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.modal-trigger-link:hover { text-decoration: underline; }
.override-trigger { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--navy-800, var(--stc-blue)); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.override-trigger:hover { background: var(--hover, #e8f2fb); }
.button-compact { min-height: 28px; padding: 3px 9px; font-size: 12px; gap: 5px; }
.order-action-grid .modal-trigger-card { min-height: 60px; }

/* Work order overview: visits open a quick view. */
.wo-side-list > .wo-side-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 40, 64, 0.05); }
.wo-side-list > .wo-side-item:hover { border-color: #adc8db; background: var(--stc-blue-50, #eef5fb); }
.wo-side-item > div { display: grid; gap: 1px; min-width: 0; }
.wo-side-item strong { font-size: 13px; }
.wo-side-item small { color: var(--muted); font-size: 11px; }
.app-modal .wo-visit { box-shadow: none; }

/* Sign-off rows with a photo preview button */
.signoff-row-actions { display: flex; gap: 6px; align-items: center; }
.signoff-link-row { display: flex; align-items: stretch; gap: 8px; }
.signoff-link-row > a { flex: 1; min-width: 0; }
.signoff-link-row > .button { align-self: center; }
.tp-add-row, .tp-history-row { display: flex; justify-content: flex-start; margin-top: 12px; }

/* Photo viewer grid headings and keyboard hint */
.photo-group + .photo-group { margin-top: 14px; }
.photo-group-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--navy-800, var(--stc-blue)); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.photo-group-title span { padding: 1px 7px; border-radius: 999px; background: var(--head-tint, #e4ecf4); color: var(--ink-2); font-size: 11px; letter-spacing: 0; }
.gallery-keys { color: var(--muted); font-size: 11px; }
.gallery-lightbox-side .auth-text-link { display: inline-flex; align-items: center; gap: 4px; }
.app-modal .gallery-grid { margin-top: 0; }

@media (max-width: 760px) {
  .app-modal .compact-issue-actions form { grid-template-columns: 1fr; }
  .app-modal-foot { justify-content: stretch; }
  .app-modal-foot .button { flex: 1; }
}

/* Projects: location picker and row actions */
.project-row-actions { display: inline-flex; gap: 6px; }
.project-direct-row td { background: var(--head-tint, #f4f7fa); }
.project-picker-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.project-picker-controls select { width: auto !important; }
.modal-form .project-picker-search { display: flex; flex: 1 1 220px; align-items: center; gap: 6px; color: var(--muted); }
.project-picker-list { max-height: min(52vh, 460px); overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
.modal-form .project-picker-row { display: grid; grid-template-columns: auto minmax(110px, auto) 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line-soft); color: var(--ink); font-size: 12.5px; font-weight: 400; cursor: pointer; }
.modal-form .project-picker-row[hidden] { display: none; }
.project-picker-row:hover { background: var(--stc-blue-50, #eef5fb); }
.project-picker-row span, .project-picker-row small { color: var(--muted); }
.project-picker-row small { font-size: 11px; text-align: right; }
.project-picker-list .compact-empty-copy { padding: 12px; }
@media (max-width: 760px) {
  .modal-form .project-picker-row { grid-template-columns: auto 1fr; }
  .project-picker-row span, .project-picker-row small { grid-column: 2; text-align: left; }
}

/* Work order: store band pinned above the tabs once the header scrolls away (owner, 2026-11-09). The wrapper takes the
   tabs' sticky spot so the band and tabs stay together. */
.wo-page .wo-stick { position: sticky; top: 52px; z-index: 8; display: grid; gap: 6px; }
.wo-page .wo-stick .loc-tabs { position: static; }
.wo-stickstore { display: none; flex-wrap: wrap; gap: 4px 22px; align-items: baseline; justify-content: center; padding: 6px 16px; border: 1px solid rgba(0, 69, 124, .18); border-radius: 12px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.wo-stick.is-stuck .wo-stickstore { display: flex; }
.wo-stickstore div { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.wo-stickstore b { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6b7b88); }
.wo-stickstore span { font-size: 13px; font-weight: 700; color: #00457c; overflow-wrap: anywhere; }
@media (max-width: 1050px) { .wo-page .wo-stick { top: 0; } }
@media (max-width: 600px) { .wo-stickstore { gap: 2px 14px; padding: 5px 10px; } .wo-stickstore span { font-size: 12px; } .wo-stickstore .wo-ss-addr { display: none; } }

/* Report view link under Work order facts (meeting 2026-11-12) */
.wo-report-link { margin: 12px 0 0; }
.wo-report-link .button { width: 100%; justify-content: center; }
.wo-report-frame .rp-frame { margin-top: 12px; }
/* Typeable dates (meeting 2026-11-12): no calendar-icon step; click the box and type the date (mm/dd/yyyy). */
input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
input[type="date"] { cursor: text; }
input[type="date"]:focus { outline: 2px solid #f26b1d; outline-offset: 1px; }

/* Production address pill on the local demo (owner 2026-11-13; new-ui.js shell). Quiet, centered, browser-address look. */
.nui-domain{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 14px;border-radius:999px;background:#f2f6fb;border:1px solid #d5dee8;color:#0f2f52;font-size:12.5px;line-height:1;white-space:nowrap;flex:none}
.nui-domain b{font-weight:600;letter-spacing:.01em}
.nui-domain svg{color:#1a7f44;flex:none}
.mobile-brand-row{position:relative}
.mobile-brand-row .nui-domain{height:28px;padding:0 12px;font-size:12px;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.22);color:#e6eef7;margin-left:auto;margin-right:-4px}
.mobile-brand-row .nui-domain svg{color:#7fd1a0}
@media (max-width:380px){.mobile-brand-row .nui-domain{display:none}}
.mobile-brand-row .nui-domain + .user-menu{margin-left:0}
