/* Regional Situation Report — page-specific overrides on Command Center brand bridge */

body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body header::after {
  display: none;
}

.hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.h-right {
  --hdr-ctrl-h: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ops-filter-field--hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--hdr-ctrl-h);
}

.ops-filter-field--hdr .ops-filter-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

/* Header controls — uniform height */
body .h-right .user-pill,
body .h-right .hdr-btn,
body .h-right .hdr-select,
body .h-right .ops-filter-field--hdr .ops-filter-select,
body .h-right .hdr-refresh {
  box-sizing: border-box;
  height: var(--hdr-ctrl-h);
  min-height: var(--hdr-ctrl-h);
  max-height: var(--hdr-ctrl-h);
  margin: 0;
  line-height: 1;
  font-size: 13px;
}

body .h-right .user-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
}

body .h-right .hdr-select,
body .h-right .ops-filter-field--hdr .ops-filter-select {
  min-width: 118px;
  padding: 0 28px 0 10px;
  vertical-align: middle;
}

body .h-right .hdr-btn {
  padding: 0 12px;
  cursor: pointer;
  flex-shrink: 0;
}

body .h-right .hdr-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  cursor: pointer;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  flex-shrink: 0;
}

body .hdr-refresh:disabled {
  opacity: 0.5;
  cursor: default;
}

/* KPI strip — all groups stay compact in one row (no full-width health stretch) */
body #cc-shell #kpi-strip {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body #cc-shell #kpi-strip .kpi-group {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: 0;
}

body #cc-shell #kpi-strip .kpi-items {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  align-items: flex-start;
}

body #cc-shell #kpi-strip .kpi-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 0 0 auto;
  min-width: 0;
}

body #cc-shell #kpi-strip .kpi-sep {
  width: 1px;
  flex-shrink: 0;
}

body #cc-shell #cc-top-bar {
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.ops-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 26px;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--white);
  flex-wrap: wrap;
}

.ops-status-bar .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line2);
  flex-shrink: 0;
}

.ops-status-bar .status-dot.ok { background: var(--health-green); }
.ops-status-bar .status-dot.warn { background: var(--health-amber); }
.ops-status-bar .status-dot.err { background: var(--health-red); }

.ops-status-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ops-status-actions .hdr-btn {
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  background: var(--white);
  border: 1px solid var(--line2);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
}

.ops-status-actions .hdr-btn.cc-btn--danger {
  border-color: var(--health-red);
  color: var(--health-red);
  background: var(--white);
}

.ops-status-actions .hdr-btn.cc-btn--danger:hover {
  background: var(--jr-red-tint);
}

.ops-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.ops-filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-filter-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.ops-filter-select {
  min-width: 140px;
  padding: 5px 10px;
  font-size: 13px;
}

.ops-report-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 26px 12px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 300;
}

.ops-report-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.region-back-btn {
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  background: var(--white);
  border: 1px solid var(--line2);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 4px 10px;
  cursor: pointer;
}

.region-back-btn:hover {
  border-color: var(--jr-red);
  color: var(--jr-red-dark);
}

.ops-region-wrap.detail-mode .region-summary-table { display: none; }
.ops-region-wrap.detail-mode .ops-region-map-stage { display: none; }

.ops-region-wrap.summary-table-mode .ops-region-map-stage {
  display: none;
}

.ops-region-wrap.summary-table-mode .region-summary-table {
  display: table;
  width: 100%;
}

.ops-region-wrap:not(.detail-mode):not(.summary-table-mode) .region-summary-table {
  display: none;
}

.ops-region-map-stage {
  padding: 8px 16px 20px;
  background: var(--white);
  overflow: visible;
  position: relative;
}

.ops-map-canvas {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.ops-us-map {
  display: block;
  width: 100%;
  height: auto;
  min-height: 360px;
  overflow: visible;
}

.ops-map-labels-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.ops-map-label-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  z-index: 3;
}

.ops-map-state {
  cursor: pointer;
  transition: fill-opacity 0.15s ease, stroke-width 0.15s ease;
}

.ops-map-state:hover {
  fill-opacity: 0.95 !important;
  stroke-width: 1.5;
}

.ops-map-state--active {
  stroke: rgba(0, 0, 0, 0.35);
}

.ops-map-card {
  overflow: visible;
}

.ops-map-card-inner--sales {
  width: 220px;
  min-height: 168px;
}

.ops-map-card-line--stack {
  align-items: flex-start;
}

.ops-map-v--stack {
  text-align: left;
  line-height: 1.35;
  font-weight: 400;
  white-space: normal;
}

.ops-sales-deal-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.45;
  white-space: normal;
  max-width: 360px;
}

body #cc-shell .ops-sales-deals-table .col-job .t-code,
body #cc-shell .ops-sales-deals-table .col-job .t-name {
  text-align: left;
}

body #cc-shell .ops-sales-deals-table .col-job .ops-sales-deal-desc {
  max-width: 420px;
}

.ops-sales-deal-cell {
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.4;
  max-width: 220px;
}

.ops-sales-deal-line {
  margin-bottom: 4px;
  white-space: normal;
}

.ops-sales-deal-more {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.ops-sales-tier-total {
  font-weight: 600;
  margin-bottom: 4px;
}

.ops-sales-person-line {
  margin-bottom: 3px;
  white-space: normal;
}

.ops-sales-by-person {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--off-white) 40%, transparent);
}

.ops-sales-by-person-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}

.ops-sales-by-person-name {
  font-weight: 500;
}

.ops-sales-by-person-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.ops-sales-by-person-value {
  font-family: var(--font-mono, "DM Mono", monospace);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.ops-map-card-inner {
  box-sizing: border-box;
  width: 152px;
  min-height: 118px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-family: var(--font);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ops-map-card-inner:hover {
  border-color: var(--jr-red);
  box-shadow: 0 4px 14px rgba(233, 42, 44, 0.18);
}

.ops-map-card-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 16px;
  letter-spacing: 0.4px;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.1;
}

.ops-map-card-line {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.ops-map-k {
  color: var(--jr-darkgray);
  font-weight: 400;
}

.ops-map-v {
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.ops-map-v--neg { color: var(--health-red); }
.ops-map-v--pos { color: var(--health-green); }
.ops-map-v--muted { color: var(--jr-darkgray); }

.ops-map-legend-text {
  font-family: var(--font);
  font-size: 11px;
  fill: var(--jr-darkgray);
}

.ops-map-hint {
  text-align: center;
  font-size: 13px;
  color: var(--jr-darkgray);
  font-weight: 300;
  margin-top: 6px;
}

.ops-map-error {
  padding: 24px;
  text-align: center;
  color: var(--health-red);
  font-size: 15px;
}

.region-summary-table tbody tr.region-row { cursor: pointer; }
.region-summary-table tbody tr.region-row:hover { background: var(--tint); }
.region-summary-table tbody tr.region-row.selected { background: var(--jr-red-tint); }

.region-detail {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.region-detail.open { display: block; }

.region-detail-inner {
  padding: 0;
}

.ops-region-drill-layout {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  padding: 12px 16px 8px;
}

.ops-region-drill-map-host {
  min-height: 0;
}

.ops-region-drill-canvas {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.ops-region-job-pins {
  pointer-events: none;
}

.ops-region-job-pin {
  pointer-events: all;
  cursor: pointer;
}

.ops-region-job-pin-mark {
  fill: var(--jr-red);
  stroke: #fff;
  stroke-width: 2;
  paint-order: stroke fill;
}

.ops-region-job-pin--start .ops-region-job-pin-mark {
  fill: var(--health-amber);
  stroke: #fff;
}

.ops-region-job-pin-label {
  font-family: var(--font);
  font-size: 10px;
  fill: var(--ink);
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 3px;
  paint-order: stroke fill;
  pointer-events: none;
}

.ops-region-drill-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(52vh, 520px);
}

.ops-region-drill-pins {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.ops-region-drill-map-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--jr-darkgray);
  font-family: var(--font);
}

.ops-region-drill-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.ops-map-legend-key {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--jr-darkgray);
  font-family: var(--font);
}

.ops-job-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: 120px;
  pointer-events: auto;
  cursor: pointer;
}

.ops-job-pin-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.ops-job-pin-dot--prod,
.ops-job-pin--prod .ops-job-pin-dot {
  background: var(--jr-red);
}

.ops-job-pin-dot--start,
.ops-job-pin--start .ops-job-pin-dot {
  background: var(--health-amber);
  border-radius: 2px;
  transform: rotate(45deg);
  width: 9px;
  height: 9px;
}

.ops-job-pin-dot--both,
.ops-job-pin--both .ops-job-pin-dot {
  background: var(--jr-red);
  box-shadow: 0 0 0 2px var(--health-amber), 0 1px 4px rgba(0, 0, 0, 0.25);
}

.ops-job-pin-label {
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 4px;
  white-space: nowrap;
}

.ops-map-state--region {
  cursor: default;
}

.ops-zone-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
}

body #cc-shell {
  overflow: visible;
}

body #cc-shell #zone-b {
  overflow: visible;
}

body #cc-shell .ops-region-wrap .triage-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

body #cc-shell .ops-region-wrap .triage-table-wrap:has(.ops-escalate-drawer) {
  overflow: visible;
}

.triage-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.triage-body.open {
  display: block;
}

.t-code {
  font-family: var(--font);
  font-size: 14px;
  color: var(--jr-red);
  font-weight: 500;
}

.t-name {
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t-mono {
  font-family: var(--font);
  font-size: 14px;
}

.t-muted { color: var(--jr-darkgray); }

.t-flags {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.t-flag {
  display: inline-block;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.t-flag.red {
  background: rgba(233, 42, 44, 0.12);
  color: var(--health-red);
  border: 1px solid rgba(233, 42, 44, 0.28);
}

.t-flag.amber {
  background: rgba(186, 117, 23, 0.12);
  color: var(--health-amber);
  border: 1px solid rgba(186, 117, 23, 0.28);
}

.t-flag.muted {
  background: transparent;
  color: var(--jr-darkgray);
  border: 1px solid var(--line2);
}

.t-sitrep {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.35;
  white-space: normal;
  max-width: 260px;
}

.t-sitrep--missing {
  color: var(--health-red);
  font-weight: 500;
}

/* Expandable portfolio row — situation report drawer */
.ops-triage-row {
  cursor: pointer;
}

.ops-triage-row:hover td {
  background: rgba(0, 0, 0, 0.025);
}

.ops-triage-row--open td {
  background: rgba(233, 42, 44, 0.04);
}

.ops-triage-chevron {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--jr-darkgray);
  transition: transform 0.15s ease;
}

.ops-triage-chevron.open {
  transform: rotate(180deg);
  color: var(--jr-red);
}

.ops-triage-drawer td,
body .triage-table tr.ops-triage-drawer td {
  padding: 0 !important;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  height: auto !important;
  max-height: none !important;
  vertical-align: top;
}

.ops-triage-drawer-inner {
  padding: 14px 16px 18px;
  overflow: visible;
}

.ops-sitrep-report {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.ops-sitrep-report-hdr {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 10px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 18px;
  letter-spacing: 0.4px;
  color: var(--ink);
}

.ops-sitrep-report-meta {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  color: var(--jr-darkgray);
  letter-spacing: 0;
}

.ops-sitrep-report-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 300;
  max-width: none;
}

.ops-sitrep-report-body strong {
  font-weight: 600;
  color: var(--ink);
}

.ops-sitrep-delay {
  background: rgba(233, 42, 44, 0.12);
  color: var(--health-red);
  padding: 0 2px;
  border-radius: 2px;
}

.ops-sitrep-report--missing p,
.ops-sitrep-report--empty p {
  margin: 0;
  font-size: 15px;
}

.ops-sitrep-report--missing p {
  color: var(--health-red);
  font-weight: 500;
}

.ops-sitrep-loading {
  font-family: var(--font);
  font-size: 13px;
  color: var(--jr-darkgray);
  font-style: italic;
}

.tqa {
  font-family: var(--font);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line2);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.tqa.danger {
  color: var(--health-red);
  border-color: rgba(233, 42, 44, 0.35);
}

.tqa.danger:hover {
  background: var(--jr-red-tint);
}

/* Quick Action column — center header + Task button */
body #cc-shell .triage-table th.col-actions,
body #cc-shell .triage-table td.col-actions {
  text-align: center;
}

body #cc-shell .triage-table td.col-actions .t-actions {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ops-red-row {
  background: rgba(233, 42, 44, 0.04);
}

.ops-red-row:hover {
  background: rgba(233, 42, 44, 0.08);
}

.ops-empty-row {
  padding: 14px 26px !important;
  color: var(--jr-darkgray);
  font-size: 14px;
  font-style: italic;
  text-align: left !important;
}

/* GM trend column — variance-trend style arrows */
.triage-table th.col-gm-trend,
.triage-table td.col-gm-trend {
  text-align: center;
  min-width: 48px;
  width: 48px;
  padding: 4px;
  vertical-align: middle;
}

.triage-table td.col-gm-trend .t-up {
  color: var(--health-green);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.triage-table td.col-gm-trend .t-down {
  color: var(--health-red);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.triage-table td.col-gm-trend .t-flat {
  color: var(--jr-darkgray);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* Progress bar (% Done) */
.ops-pct-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 76px;
  max-width: 110px;
}

.ops-pct-label {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  color: var(--ink);
  line-height: 1;
}

.ops-pct-bar {
  height: 7px;
  background: var(--jr-lightgray, #e6e6e6);
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
}

.ops-pct-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}

body #cc-shell .triage-table .col-pct {
  width: 9%;
  text-align: right;
  vertical-align: middle;
}

body #cc-shell .triage-table .col-schedule {
  width: 8%;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

body #cc-shell .triage-table td.col-schedule {
  font-size: 13px;
}

body #cc-shell .triage-table .col-start,
body #cc-shell .triage-table td.col-start {
  white-space: nowrap;
}

.region-band-hdr {
  margin-top: 0;
}

/* Operational sections (starts, pre-cons) — neutral grey band, not triage green/yellow */
body #cc-shell .ops-band-hdr {
  background: var(--jr-lightgray, #e6e6e6);
  color: var(--ink);
  border-bottom: 1px solid var(--line2);
}

body #cc-shell .ops-band-hdr:hover {
  filter: none;
}

body #cc-shell .ops-band-hdr .triage-label,
body #cc-shell .ops-band-hdr .triage-sub,
body #cc-shell .ops-band-hdr .triage-count {
  color: var(--ink);
}

body #cc-shell .ops-starts-band .triage-count,
body #cc-shell .ops-precon-band .triage-count {
  background: var(--white);
  border: 1px solid var(--line2);
  color: var(--ink);
}

/* New starts table — even column widths, centered under headers */
body #cc-shell .ops-starts-band .triage-table {
  table-layout: fixed;
  width: 100%;
}

body #cc-shell .ops-starts-band .triage-table th,
body #cc-shell .ops-starts-band .triage-table td {
  text-align: center;
  vertical-align: middle;
  padding: 10px 6px;
}

body #cc-shell .ops-starts-band .triage-table .col-num       { width: 4%; }
body #cc-shell .ops-starts-band .triage-table .col-job       { width: 17%; }
body #cc-shell .ops-starts-band .triage-table .col-start     { width: 7%; }
body #cc-shell .ops-starts-band .triage-table .col-pex       { width: 8%; }
body #cc-shell .ops-starts-band .triage-table .col-pm        { width: 8%; }
body #cc-shell .ops-starts-band .triage-table .col-super     { width: 8%; }
body #cc-shell .ops-starts-band .triage-table .col-foreman   { width: 10%; }
body #cc-shell .ops-starts-band .triage-table .col-why       { width: 9%; }
body #cc-shell .ops-starts-band .triage-table .col-hours     { width: 8%; }
body #cc-shell .ops-starts-band .triage-table .col-cal-days  { width: 7%; }
body #cc-shell .ops-starts-band .triage-table .col-actions   { width: 14%; }

body #cc-shell .ops-starts-band .triage-table .col-job .t-code,
body #cc-shell .ops-starts-band .triage-table .col-job .t-name {
  text-align: center;
}

@media (min-width: 769px) {
  body #cc-shell .ops-starts-band .triage-table th.col-job,
  body #cc-shell .ops-starts-band .triage-table td.col-job,
  body #cc-shell .ops-starts-band .triage-table .col-job .t-code,
  body #cc-shell .ops-starts-band .triage-table .col-job .t-name {
    text-align: left;
  }
}

body #cc-shell .ops-starts-band .triage-table .t-actions {
  display: flex;
  justify-content: center;
  align-items: center;
}

body #cc-shell .ops-starts-band .triage-table td.col-why .t-flag {
  display: inline-block;
}

/* Sales pipeline — By Sales Team grouping */
body #cc-shell .ops-sales-hdr-sold {
  background: rgba(31, 77, 15, 0.14);
  color: var(--ink);
  border-bottom: 1px solid rgba(31, 77, 15, 0.28);
}

body #cc-shell .ops-sales-hdr-forecast {
  background: rgba(239, 159, 39, 0.16);
  color: var(--ink);
  border-bottom: 1px solid rgba(239, 159, 39, 0.32);
}

body #cc-shell .ops-sales-hdr-warm {
  background: rgba(26, 101, 204, 0.1);
  color: var(--ink);
  border-bottom: 1px solid rgba(26, 101, 204, 0.24);
}

body #cc-shell .ops-sales-deals-table .col-job,
body #cc-shell .ops-sales-deals-table .col-job .t-name {
  text-align: left;
}

body #cc-shell .ops-region-wrap.sales-pipeline-mode .region-summary-table .col-pm,
body #cc-shell .ops-region-wrap.sales-pipeline-mode .region-summary-table .col-pct,
body #cc-shell .ops-region-wrap.sales-pipeline-mode .region-summary-table .col-report,
body #cc-shell .ops-region-wrap.sales-pipeline-mode .region-summary-table .col-gm {
  white-space: nowrap;
}

/* Task drawer — span full table width */
body #cc-shell .ops-escalate-drawer td {
  width: 100%;
}

body #cc-shell .ops-escalate-drawer-inner,
body #cc-shell .ops-escalate-drawer-inner .ops-escalate-inline,
body #cc-shell .ops-escalate-inline-slot .ops-escalate-inline {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.job-links {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.job-link {
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  padding: 4px 9px;
  background: var(--white);
  font-family: var(--font);
}

.job-link:hover {
  border-color: var(--jr-red);
  color: var(--jr-red-dark);
}

.sitrep-cell {
  white-space: normal;
  font-weight: 300;
  line-height: 1.45;
  max-width: 360px;
}

.cc-date-stale { color: var(--health-red); font-weight: 500; }

.tracker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  padding: 0 26px 16px;
}

.tracker-chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
}

.tracker-chip.complete {
  border-color: var(--health-green);
  background: #f3f8f0;
}

.tracker-chip.missed {
  border-color: var(--health-red);
  background: var(--jr-red-tint);
}

.tracker-chip a {
  color: var(--jr-red-dark);
  font-weight: 500;
}

.empty-note {
  padding: 12px 26px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
}

.num-pos { color: var(--health-green); font-weight: 500; }
.num-neg { color: var(--health-red); font-weight: 500; }

/* ── Report type scale: +2px on shared brand / bridge surfaces ── */
body #cc-shell.cc {
  font-size: 14px;
}

body .logo-text { font-size: 18px; }
body .logo-sub { font-size: 13px; }
body .hdr-btn,
body .hdr-select,
body .user-pill { font-size: 13px; }

body .kpi-group-label { font-size: 11px; }
body .kpi-value { font-size: 28px; }
body .kpi-label { font-size: 12px; }
body .kpi-sub { font-size: 12px; }

body #zone-b-label { font-size: 15px; }

body .triage-label { font-size: 15px; }
body .triage-sub { font-size: 13px; }
body .triage-count { font-size: 13px; }

body .triage-table { font-size: 13px; }
body .triage-table th { font-size: 11px; }

body .cc-footer { font-size: 12px; }
body .cc-section__title { font-size: 15px; }
body .cc-section__hint { font-size: 13px; }

.ops-escalate-inline .ops-escalate-title { font-size: 18px; }
.ops-escalate-inline .modal-lbl { font-size: 12px; }
.ops-escalate-inline .modal-inp { font-size: 15px; }
.ops-escalate-inline .modal-cancel,
.ops-escalate-inline .modal-submit { font-size: 13px; }
.ops-task-form-msg { font-size: 14px; }
.ops-task-owner-name { font-size: 15px; }
.ops-task-owner-email { font-size: 13px; }
.ops-task-owner-empty { font-size: 13px; }

@media (max-width: 900px) {
  .ops-report-meta { flex-direction: column; }
  .ops-status-actions { margin-left: 0; width: 100%; }
  body .kpi-value { font-size: 24px; }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 24px;
    background: #f5f4f0;
  }

  header {
    height: 52px;
    background: #fff;
    border-bottom: none;
    position: relative;
    overflow: hidden;
  }

  header::before {
    content: '';
    position: absolute;
    right: 72px;
    top: -8px;
    width: 56px;
    height: 64px;
    background: linear-gradient(135deg, rgba(233, 42, 44, 0.12) 0%, rgba(167, 31, 35, 0.06) 100%);
    transform: skewX(-26deg);
    pointer-events: none;
    z-index: 0;
  }

  .hdr-inner {
    padding: 0 14px;
    gap: 10px;
    position: relative;
    z-index: 1;
  }

  .logo { gap: 10px; }
  .logo-divider { display: none; }
  .logo-sub { display: none; }
  body .logo-text { font-size: 16px; letter-spacing: -0.2px; text-transform: none; }

  .h-right {
    --hdr-ctrl-h: 36px;
    gap: 6px;
  }

  #nav-select { display: none; }

  #user-email-display { display: none; }

  body .h-right .user-pill {
    width: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 8px;
    justify-content: center;
  }

  body .h-right .hdr-refresh {
    width: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 8px;
    font-size: 0;
  }

  body .h-right .hdr-refresh::before {
    content: '↺';
    font-size: 16px;
    line-height: 1;
  }

  body .h-right .ops-filter-field--hdr .ops-filter-select {
    min-width: 96px;
    max-width: 118px;
    font-size: 11px;
    padding: 0 24px 0 8px;
  }

  #cc-shell {
    margin: 0;
    border: none;
    border-radius: 0;
    max-width: none;
  }

  #cc-top-bar {
    top: 52px;
    border-top: none;
    background: #fff;
  }

  body #cc-shell #kpi-strip {
    padding: 10px 14px;
    gap: 0;
    border-bottom: 1px solid #ececec;
    scrollbar-width: none;
  }

  body #cc-shell #kpi-strip::-webkit-scrollbar { display: none; }

  body #cc-shell #kpi-strip .kpi-group {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 0;
  }

  body #cc-shell #kpi-strip .kpi-group-label { display: none; }

  body #cc-shell #kpi-strip .kpi-items {
    gap: 0;
  }

  body #cc-shell #kpi-strip .kpi-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 14px;
    min-width: 56px;
  }

  body #cc-shell #kpi-strip .kpi-item:first-child { padding-left: 0; }

  body #cc-shell #kpi-strip .kpi-value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
  }

  body #cc-shell #kpi-strip .kpi-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-top: 2px;
  }

  body #cc-shell #kpi-strip .kpi-sub { display: none; }

  body #cc-shell #kpi-strip .kpi-sep {
    margin: 4px 14px 4px 0;
    height: 32px;
    align-self: center;
  }

  .ops-status-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .ops-status-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ops-status-actions .hdr-btn {
    flex: 1 1 auto;
    min-height: 36px;
    font-size: 12px;
  }

  #zone-b-label {
    padding: 16px 14px 10px;
    margin-top: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    gap: 8px;
  }

  .ops-report-meta {
    padding: 0 14px 10px;
    font-size: 12px;
  }

  .ops-zone-label {
    padding: 16px 14px 8px;
    font-size: 11px;
  }

  .region-detail-inner {
    padding: 0;
  }

  #btn-region-back {
    margin: 10px 14px 0;
    width: calc(100% - 28px);
    min-height: 36px;
  }

  .ops-starts-band .triage-band,
  .region-wrap .triage-band {
    margin-left: 14px;
    margin-right: 14px;
  }

  .ops-triage-drawer td,
  .ops-escalate-drawer td {
    padding: 0 !important;
  }

  .ops-triage-drawer-inner,
  .ops-escalate-drawer-inner {
    padding: 12px 14px;
  }
}
