/* ============================================================
   Mojro Transportation Planner — Tactical View
   Light theme, editorial / Bloomberg-density
   ============================================================ */

:root {
  /* Surfaces */
  --bg:           #F2F0EA;   /* warm off-white page */
  --surface:      #FFFFFF;
  --surface-2:    #FAF8F2;   /* faint warm tint */
  --surface-3:    #EFEBDF;   /* card hover / nested */

  /* Ink */
  --ink:          #18180F;   /* primary text */
  --ink-2:        #5A584D;   /* secondary */
  --ink-3:        #8E8B7E;   /* faint label */
  --ink-4:        #B5B2A4;   /* placeholder */

  /* Hairlines */
  --line:         #E2DED1;
  --line-strong:  #C9C4B3;

  /* Semantic signal */
  --green:        #2F7A4A;
  --green-2:      #1F5A35;
  --green-bg:     #E2EEDE;
  --green-bg-2:   #D2E6CC;

  --amber:        #B0651A;
  --amber-2:      #884C10;
  --amber-bg:     #FAEAD0;
  --amber-bg-2:   #F4DBB0;

  --red:          #C13333;   /* Mojro brand red */
  --red-2:        #6B1A1A;
  --red-bg:       #FDECEA;
  --red-bg-2:     #F8D6D1;

  --purple:       #5A3FB8;
  --purple-2:     #3F2A8A;
  --purple-bg:    #ECE7FA;
  --purple-bg-2:  #DCD2F4;

  --blue:         #2A5FB5;
  --blue-2:       #1B4080;
  --blue-bg:      #E2EAF7;
  --blue-bg-2:    #CDDAEF;

  --teal:         #1F7A78;
  --teal-bg:      #DAEDEC;

  /* Type */
  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans:  'Geist', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* Geometry */
  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 8px;

  --gutter: 1px; /* hairlines between columns */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #root {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  font-variant-numeric: tabular-nums;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ---------- App frame ---------- */
.app {
  display: grid;
  grid-template-rows: 48px 1fr;
  height: 100vh;
  background: var(--bg);
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0;
  height: 48px;
}
.topbar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px 0 18px;
  border-right: 1px solid var(--line);
}
.topbar__brand-mark {
  width: 22px; height: 22px;
  background-image: url('assets/mojro_wordmark.png');
  background-size: contain; background-repeat: no-repeat;
  background-position: left center;
  /* show only the icon — wordmark image starts with icon */
  filter: none;
}
.topbar__brand-text {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  font-feature-settings: 'ss01';
}
.topbar__brand-text .slash { color: var(--ink-3); margin: 0 8px; font-weight: 300; }
.topbar__brand-text .sub { color: var(--ink-2); font-weight: 400; }

.topbar__tabs {
  display: flex; align-items: stretch;
  margin-left: 4px;
}
.topbar__tab {
  padding: 0 16px;
  display: flex; align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.topbar__tab:hover { color: var(--ink); }
.topbar__tab--active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
}
.topbar__tab .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 999px;
}

.topbar__right {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  border-left: 1px solid var(--line);
}
.wave-indicator {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
}
.wave-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47, 122, 74, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 122, 74, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(47, 122, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 122, 74, 0); }
}
.wave-label { color: var(--ink); font-weight: 500; }
.wave-meta { color: var(--ink-3); font-family: var(--font-mono); font-size: 11px; }

.topbar__user {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--purple-bg);
  color: var(--purple-2);
  font-family: var(--font-serif);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* ---------- Main 3-column layout ---------- */
.main {
  display: grid;
  grid-template-columns: 290px 1fr 220px;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.main.overview { grid-template-columns: 290px 1fr; }
.main.focus { grid-template-columns: 1fr; }
.main.focus .triplist, .main.focus .demand { display: none; }
.main.focus .detail { grid-column: 1; }

/* ---------- Left: Trip List ---------- */
.triplist {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.triplist__header {
  padding: 14px 14px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.triplist__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.triplist__sub {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.triplist__filters {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 4px;
}
.filter-chip {
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.filter-chip .n {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
}
.filter-chip:hover { background: var(--line); color: var(--ink); }
.filter-chip--active {
  background: var(--ink);
  color: var(--surface);
}
.filter-chip--active .n { color: rgba(255,255,255,0.7); }

.triplist__scroll {
  flex: 1; overflow-y: auto;
  min-height: 0;
}

.triplist__section-label {
  padding: 10px 14px 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  z-index: 1;
}
.batch-btn {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--green-2);
  background: var(--green-bg);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  text-transform: none;
  letter-spacing: 0;
}
.batch-btn:hover { background: var(--green-bg-2); }

/* Trip card */
.trip-card {
  position: relative;
  padding: 11px 14px 11px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.08s;
}
.trip-card:hover { background: var(--surface-2); }
.trip-card--selected {
  background: var(--surface-3);
}
.trip-card--selected::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--purple);
}
.trip-card__urgency {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
}
.trip-card--selected .trip-card__urgency { left: 3px; }
.urg-red    { background: var(--red); }
.urg-amber  { background: var(--amber); }
.urg-none   { background: transparent; }

.trip-card__row1 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.trip-id {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.trip-card__row2 {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin-bottom: 2px;
  color: var(--ink);
}
.trip-card__row2 .arrow {
  color: var(--ink-3);
  font-weight: 400;
  margin: 0 4px;
}
.trip-card__customer {
  font-size: 11.5px;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.trip-card__chips {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 7px;
}
.trip-card__row4 {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px;
}
.util-mini {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.util-mini__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--green);
  border-radius: 999px;
}
.util-mini__fill.warn  { background: var(--amber); }
.util-mini__fill.over  { background: var(--red); }
.util-mini__fill.low   { background: var(--amber); opacity: 0.7; }
.util-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  min-width: 32px;
  text-align: right;
}
.window-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.window-pill .ic { font-size: 11px; }
.window-pill.red    { color: var(--red); }
.window-pill.amber  { color: var(--amber); }
.window-pill.green  { color: var(--green); }

/* Pills (fleet/status) */
.pill {
  display: inline-flex; align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  white-space: nowrap;
  line-height: 1.5;
}
.pill--green   { background: var(--green-bg);  color: var(--green-2); }
.pill--amber   { background: var(--amber-bg);  color: var(--amber-2); }
.pill--blue    { background: var(--blue-bg);   color: var(--blue-2); }
.pill--red     { background: var(--red-bg);    color: var(--red-2); }
.pill--purple  { background: var(--purple-bg); color: var(--purple-2); }
.pill--teal    { background: var(--teal-bg);   color: var(--teal); }
.pill--grey    { background: var(--surface-3); color: var(--ink-2); }

/* Chips (flags on trip rows) */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px;
  padding: 1px 6px 2px;
  border-radius: var(--r-sm);
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.5;
  border: 1px solid transparent;
}
.chip--red     { background: var(--red-bg);    color: var(--red-2); }
.chip--amber   { background: var(--amber-bg);  color: var(--amber-2); border-style: dashed; border-color: var(--amber); border-width: 1px; }
.chip--blue    { background: var(--blue-bg);   color: var(--blue-2); }
.chip--green   { background: var(--green-bg);  color: var(--green-2); }
.chip--purple  { background: var(--purple-bg); color: var(--purple-2); }
.chip--grey    { background: var(--surface-3); color: var(--ink-2); }

/* ---------- Center: Trip Detail ---------- */
.detail {
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--bg);
  overflow: hidden;
}
.detail__header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 22px 0;
}
.detail__head-row1 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.detail__head-row1 .sep { color: var(--ink-4); }
.detail__head-row1 .id { color: var(--ink); font-weight: 500; }

.detail__head-row2 {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.detail__title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.detail__title .arrow {
  color: var(--ink-3);
  font-weight: 400;
  margin: 0 8px;
}
.detail__actions {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.btn {
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.005em;
  transition: background 0.08s, border-color 0.08s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn--primary {
  background: var(--green);
  color: white;
  border-color: var(--green-2);
  font-weight: 600;
}
.btn--primary:hover { background: var(--green-2); border-color: var(--green-2); }
.btn--danger { color: var(--red-2); }
.btn--ghost { border-color: transparent; }
.btn--icon { padding: 6px 8px; }

.detail__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding-bottom: 12px;
  font-size: 12px;
}
.detail__meta .meta-item {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2);
}
.detail__meta .meta-item .v {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
}
.detail__meta .sep {
  color: var(--ink-4);
  width: 1px; height: 12px; background: var(--line-strong);
}

.detail__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 -22px;
  padding: 0 22px;
  background: var(--surface);
}
.detail__tab {
  padding: 9px 14px 11px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex; align-items: center; gap: 6px;
}
.detail__tab:hover { color: var(--ink); }
.detail__tab--active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
}
.detail__tab .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 3px;
}
.detail__tab--active .num { color: var(--ink); background: var(--surface-3); }

.detail__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 24px;
  min-height: 0;
}

/* Section blocks */
.section {
  margin-bottom: 24px;
}
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}
.section__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-weight: 500;
}
.section__sub {
  font-size: 11.5px;
  color: var(--ink-2);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  padding: 12px 14px;
}
.stat__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}
.stat__value {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
}
.stat__value .unit {
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 2px;
}
.stat__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}
.stat--green .stat__value { color: var(--green-2); }
.stat--amber .stat__value { color: var(--amber-2); }
.stat--red   .stat__value { color: var(--red-2); }

/* Utilisation bar (large) */
.util-bar-wrap {
  padding: 14px 16px 18px;
  margin-bottom: 14px;
}
.util-bar {
  position: relative;
  height: 28px;
  background: var(--surface-3);
  border-radius: var(--r-sm);
  overflow: visible;
  margin-bottom: 8px;
}
.util-bar__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: white;
  font-weight: 600;
}
.util-bar__fill.green  { background: var(--green); }
.util-bar__fill.amber  { background: var(--amber); }
.util-bar__fill.red    { background: var(--red); }
.util-bar__threshold {
  position: absolute;
  top: -6px; bottom: -6px;
  width: 1px;
  background: var(--ink-3);
}
.util-bar__threshold-label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.util-bar__axis {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* Orders table */
.orders {
  margin-bottom: 12px;
}
.orders__head {
  display: grid;
  grid-template-columns: 28px 90px 1fr 60px 80px 80px 90px 80px 30px;
  gap: 10px;
  padding: 8px 14px;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.order-row {
  display: grid;
  grid-template-columns: 28px 90px 1fr 60px 80px 80px 90px 80px 30px;
  gap: 10px;
  padding: 10px 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  transition: background 0.08s;
}
.order-row:last-child { border-bottom: none; }
.order-row:hover { background: var(--surface-2); }
.order-row .drag {
  color: var(--ink-4);
  cursor: grab;
  font-family: var(--font-mono);
  font-size: 13px;
  user-select: none;
  text-align: center;
}
.order-row .oid {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
}
.order-row .cust { font-size: 12px; color: var(--ink); }
.order-row .cust-sub { font-size: 10.5px; color: var(--ink-3); }
.order-row .num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  text-align: right;
}
.order-row .x-btn {
  color: var(--ink-3);
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  font-size: 14px;
}
.order-row .x-btn:hover { background: var(--red-bg); color: var(--red-2); }

.add-order-row {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 14px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  gap: 6px;
}
.add-order-row:hover { background: var(--surface-2); color: var(--ink); }

/* Optimisation cards (agent suggestions inside detail) */
.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.opt-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--surface);
  position: relative;
}
.opt-card--purple { border-color: var(--purple-bg-2); background: linear-gradient(to bottom, var(--purple-bg) 0%, var(--surface) 100%); }
.opt-card--green  { border-color: var(--green-bg-2);  background: linear-gradient(to bottom, var(--green-bg) 0%, var(--surface) 100%); }
.opt-card--red    { border-color: var(--red-bg-2);    background: linear-gradient(to bottom, var(--red-bg) 0%, var(--surface) 100%); }

.opt-card__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.opt-card--purple .opt-card__label { color: var(--purple-2); }
.opt-card--green  .opt-card__label { color: var(--green-2); }
.opt-card--red    .opt-card__label { color: var(--red-2); }

.opt-card__title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.opt-card__body {
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 10px;
  line-height: 1.45;
}
.opt-card__body .v { font-family: var(--font-mono); color: var(--ink); font-weight: 500; }
.opt-card__action {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.opt-card--purple .opt-card__action { color: var(--purple-2); border-color: var(--purple); }
.opt-card--green  .opt-card__action { color: var(--green-2);  border-color: var(--green); }
.opt-card--red    .opt-card__action { color: var(--red-2);    border-color: var(--red); }
.opt-card__action:hover { transform: translateY(-1px); }

/* Routing — timeline */
.timeline {
  padding: 16px 18px;
  margin-bottom: 14px;
}
.tl-node {
  display: grid;
  grid-template-columns: 22px 90px 1fr auto;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  padding-bottom: 18px;
}
.tl-node:last-child { padding-bottom: 0; }
.tl-node::before {
  content: ''; position: absolute;
  left: 10px; top: 18px; bottom: -2px;
  width: 1px;
  background: var(--line-strong);
}
.tl-node:last-child::before { display: none; }
.tl-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-top: 4px;
  border: 2px solid white;
  box-shadow: 0 0 0 1.5px var(--ink-3);
  position: relative; z-index: 1;
  background: var(--ink-3);
}
.tl-dot--green { background: var(--green); box-shadow: 0 0 0 1.5px var(--green); }
.tl-dot--amber { background: var(--amber); box-shadow: 0 0 0 1.5px var(--amber); }
.tl-dot--red   { background: var(--red);   box-shadow: 0 0 0 1.5px var(--red); }
.tl-time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  font-weight: 500;
}
.tl-time-sub { font-size: 10.5px; color: var(--ink-3); font-family: var(--font-sans); margin-top: 2px; }
.tl-content { font-size: 12.5px; }
.tl-title { font-weight: 600; margin-bottom: 2px; }
.tl-detail { color: var(--ink-2); font-size: 11.5px; }
.tl-note {
  font-size: 11px;
  color: var(--amber-2);
  background: var(--amber-bg);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  margin-top: 4px;
  display: inline-block;
}
.tl-note.red { color: var(--red-2); background: var(--red-bg); }

/* HOS grid */
.hos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.hos-cell {
  background: var(--surface);
  padding: 12px 14px;
}
.hos-cell--ok { background: linear-gradient(to bottom right, var(--green-bg), var(--surface)); }
.hos-cell--bad { background: linear-gradient(to bottom right, var(--red-bg), var(--surface)); }
.hos-cell__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.hos-cell__value {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}
.hos-cell__sub {
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 2px;
}
.hos-cell--bad .hos-cell__value { color: var(--red-2); }
.hos-cell--ok .hos-cell__value { color: var(--green-2); }

/* Constraint list */
.cx-list {
  padding: 4px 0;
}
.cx-row {
  display: grid;
  grid-template-columns: 24px 200px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.cx-row:last-child { border-bottom: none; }
.cx-status { font-size: 14px; text-align: center; }
.cx-status.pass { color: var(--green); }
.cx-status.warn { color: var(--amber); }
.cx-status.fail { color: var(--red); }
.cx-name { color: var(--ink); font-weight: 500; }
.cx-detail { color: var(--ink-2); font-size: 11.5px; }
.cx-value { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }

/* Fleet option cards */
.fleet-summary {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--purple);
  border-radius: var(--r-md);
  line-height: 1.5;
}

.fleet-cards { display: flex; flex-direction: column; gap: 10px; }
.fleet-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.fleet-card--recommended {
  border-color: var(--green);
  background: linear-gradient(to right, var(--green-bg) 0%, var(--surface) 30%);
}
.fleet-card--unavailable { opacity: 0.55; }
.fleet-card--spot {
  border-color: var(--red-bg-2);
  background: linear-gradient(to right, var(--red-bg) 0%, var(--surface) 40%);
}
.recommended-badge {
  position: absolute; top: 10px; right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: white;
  background: var(--green);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.fleet-card__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.fleet-card__name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.fleet-card__name.strike { text-decoration: line-through; color: var(--ink-3); }
.fleet-card__meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.fleet-card__meta .v {
  color: var(--ink);
  font-family: var(--font-mono);
}
.fleet-card__drivers {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.driver-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  font-size: 11.5px;
}
.driver-chip__avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 600;
}
.driver-chip__name { font-weight: 500; }
.driver-chip__meta { color: var(--ink-3); font-family: var(--font-mono); font-size: 10.5px; }
.driver-chip__badges { display: inline-flex; gap: 3px; }
.driver-chip__badge {
  font-size: 9px;
  font-family: var(--font-mono);
  background: var(--green-bg);
  color: var(--green-2);
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 600;
}
.fleet-card__cta {
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  white-space: nowrap;
}
.fleet-card__cta--primary {
  background: var(--green);
  color: white;
  border-color: var(--green-2);
}
.fleet-card__cta--primary:hover { background: var(--green-2); }
.fleet-card__cta--danger {
  border-color: var(--red);
  color: var(--red-2);
}
.fleet-card__note {
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: 6px;
  font-style: italic;
}
.fleet-card__note.warn { color: var(--amber-2); font-style: normal; }
.fleet-card__note.danger { color: var(--red-2); font-style: normal; font-weight: 500; }

/* Load 3D canvas */
.load-canvas-wrap {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
}
.load-canvas {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex; flex-direction: column; align-items: stretch;
}
.load-canvas__note {
  font-size: 11.5px;
  color: var(--ink-2);
  margin-bottom: 10px;
  padding: 6px 10px;
  background: var(--amber-bg);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--amber);
}
.load-canvas canvas {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface-2);
  border-radius: var(--r-sm);
}
.load-legend {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11px;
}
.load-legend__item { display: flex; align-items: center; gap: 5px; color: var(--ink-2); }
.load-legend__swatch {
  width: 12px; height: 12px; border-radius: 2px;
}

.axle-readouts { display: flex; flex-direction: column; gap: 8px; }
.axle {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 10px 12px;
}
.axle__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.axle__value {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}
.axle__bar {
  height: 3px;
  background: var(--line);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.axle__bar > div { height: 100%; border-radius: 999px; }
.axle--ok    .axle__value { color: var(--green-2); } .axle--ok .axle__bar > div { background: var(--green); }
.axle--warn  .axle__value { color: var(--amber-2); } .axle--warn .axle__bar > div { background: var(--amber); }
.axle--bad   .axle__value { color: var(--red-2); }   .axle--bad .axle__bar > div { background: var(--red); }
.axle__sub { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); margin-top: 2px; }

/* ---------- Right: Demand sidebar ---------- */
.demand {
  background: var(--surface);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  min-height: 0;
}
.demand__block {
  padding: 14px 14px 16px;
  border-bottom: 1px solid var(--line);
}
.demand__block-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--ink-3);
  margin-bottom: 10px;
}
.wave-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.wave-stat { }
.wave-stat__value {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.wave-stat__value.red { color: var(--red-2); }
.wave-stat__label {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 3px;
}

.day-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.day-cell {
  padding: 7px 4px;
  border-radius: var(--r-sm);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.day-cell .day-label {
  font-size: 9px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  font-family: var(--font-sans);
}
.day-cell .day-val { font-weight: 600; font-size: 12px; }
.day-cell.green  { background: var(--green-bg);  color: var(--green-2); }
.day-cell.amber  { background: var(--amber-bg);  color: var(--amber-2); }
.day-cell.red    { background: var(--red-bg);    color: var(--red-2); }
.day-cell .day-label  { color: inherit; opacity: 0.65; }
.day-cell .gap {
  font-size: 9.5px;
  margin-top: 2px;
  opacity: 0.8;
}

.pool-list, .adj-list { display: flex; flex-direction: column; gap: 6px; }
.pool-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  align-items: center;
}
.pool-item__id {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
}
.pool-item__cust {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1px;
}
.pool-item__meta {
  font-size: 10.5px;
  color: var(--ink-2);
  font-family: var(--font-mono);
}
.pool-item__add {
  font-size: 11px;
  color: var(--green-2);
  background: var(--green-bg);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-weight: 600;
  white-space: nowrap;
}
.pool-item__add:hover { background: var(--green-bg-2); }

.adj-item {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 9px;
  background: var(--surface-2);
}
.adj-item__row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.adj-item__id { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.adj-item__util { font-family: var(--font-mono); font-size: 11px; color: var(--ink); }
.adj-item__bar { height: 3px; background: var(--line); border-radius: 999px; margin-bottom: 6px; overflow: hidden; }
.adj-item__bar > div { height: 100%; background: var(--amber); }
.adj-item__merge {
  font-size: 11px;
  color: var(--purple-2);
  background: var(--purple-bg);
  padding: 3px 7px;
  border-radius: var(--r-sm);
  font-weight: 600;
  width: 100%;
  text-align: center;
  display: block;
}
.adj-item__merge:hover { background: var(--purple-bg-2); }

/* ---------- Bottom: Agent ORA strip ---------- */
.agent {
  grid-column: 1 / -1;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.agent--collapsed { /* height handled by children */ }
.agent__bar {
  height: 40px;
  padding: 0 18px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.agent--expanded .agent__bar { border-bottom-color: var(--line); }
.agent__bar:hover { background: var(--surface-2); }
.agent__icon {
  width: 22px; height: 22px;
  background: var(--purple);
  color: white;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.agent__title {
  font-weight: 600;
  font-size: 13px;
}
.agent__state {
  color: var(--ink-2);
  font-size: 12px;
  display: flex; align-items: center; gap: 6px;
}
.agent__state .sep { color: var(--ink-4); }
.agent__state .ready {
  color: var(--purple-2);
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--purple-bg);
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}
.agent__chev {
  margin-left: auto;
  color: var(--ink-3);
  transition: transform 0.2s;
}
.agent--expanded .agent__chev { transform: rotate(180deg); }

.agent__body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
  max-height: 160px;
}
.agent__col {
  padding: 12px 16px 14px;
  border-right: 1px solid var(--line);
  min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.agent__col:last-child { border-right: none; }
.agent__col-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 4px;
}
.agent__col--observe .agent__col-head { color: var(--blue-2); }
.agent__col--reason  .agent__col-head { color: var(--amber-2); }
.agent__col--act     .agent__col-head { color: var(--green-2); }
.agent__col-head .step-n {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid currentColor;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.agent__col-head .step-divider { flex: 1; height: 1px; background: currentColor; opacity: 0.25; }

.ora-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 9px 11px;
}
.ora-card__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.ora-card__text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}
.ora-card__text .v { font-family: var(--font-mono); font-weight: 500; }
.ora-card--observe { border-left: 2px solid var(--blue); }
.ora-card--reason  { border-left: 2px solid var(--amber); }
.ora-card--act     { border-left: 2px solid var(--green); }
.ora-card--dimmed  { opacity: 0.55; border-left-color: var(--ink-3); }

.ora-action {
  margin-top: 8px;
  width: 100%;
  background: var(--ink);
  color: white;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
}
.ora-action:hover { background: var(--green-2); }
.ora-action .arr { opacity: 0.7; }

.agent__chat {
  grid-column: 1 / -1;
  padding: 8px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.agent__chat-icon { color: var(--purple); font-family: var(--font-serif); font-weight: 700; font-size: 14px; }
.agent__chat input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: var(--r-md);
  font-size: 12px;
  outline: none;
}
.agent__chat input:focus { border-color: var(--purple); background: var(--surface); }
.agent__chat input::placeholder { color: var(--ink-3); font-style: italic; }
.agent__send {
  background: var(--purple);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r-md);
}
.agent__send:hover { background: var(--purple-2); }

.agent-reply {
  grid-column: 1 / -1;
  background: var(--surface-2);
  padding: 10px 18px 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
  display: flex; gap: 10px;
}
.agent-reply .who {
  font-weight: 600;
  color: var(--purple-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 60px;
}

.placeholder__body {
  font-size: 14px;
  max-width: 480px;
  line-height: 1.5;
}

/* ============================================================
   Multi-select bulk action bar (inside trip list)
   ============================================================ */
.triplist__bulk {
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 3;
}
.triplist__bulk-count {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.triplist__bulk-actions { margin-left: auto; display: flex; gap: 4px; }
.triplist__bulk-btn {
  color: white;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
}
.triplist__bulk-btn:hover { background: rgba(255,255,255,0.2); }
.triplist__bulk-btn--primary { background: var(--green); border-color: var(--green-2); }
.triplist__bulk-btn--primary:hover { background: var(--green-2); }

/* Checkbox on trip cards */
.trip-card { padding-left: 30px; }
.trip-card__urgency { left: 0; }
.trip-card--selected .trip-card__urgency { left: 3px; }
.trip-card__check {
  position: absolute;
  left: 9px; top: 14px;
  width: 14px; height: 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  background: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.trip-card__check:hover { border-color: var(--ink-3); }
.trip-card__check.on {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
  font-size: 10px;
  line-height: 1;
}
.trip-card__check.on::after { content: '✓'; }

/* ============================================================
   Wave Overview Board (no trip selected)
   ============================================================ */
.overview {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  padding: 20px 24px 24px;
  min-height: 0;
}
.overview__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.overview__title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.overview__sub {
  font-size: 12px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  margin-top: 4px;
}
.overview__kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.kpi__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.kpi__value {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.kpi__sub {
  font-size: 10.5px;
  color: var(--ink-2);
  margin-top: 4px;
  font-family: var(--font-mono);
}
.kpi--red .kpi__value { color: var(--red-2); }
.kpi--amber .kpi__value { color: var(--amber-2); }
.kpi--green .kpi__value { color: var(--green-2); }

.overview__section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 10px;
  display: flex; align-items: baseline; justify-content: space-between;
}

/* Rich trip table on Overview */
.trips-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.trips-table__head {
  display: grid;
  grid-template-columns: 28px 110px 60px 1.4fr 80px 70px 70px 70px 80px 1.5fr 70px;
  gap: 8px;
  padding: 9px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  align-items: center;
}
.trips-table__head span { text-align: left; }
.trips-table__head .num { text-align: right; }
.trips-row {
  display: grid;
  grid-template-columns: 28px 110px 60px 1.4fr 80px 70px 70px 70px 80px 1.5fr 70px;
  gap: 8px;
  padding: 12px 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.08s;
}
.trips-row:last-child { border-bottom: none; }
.trips-row:hover { background: var(--surface-2); }
.trips-row__urgency {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
}
.trips-row__id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  font-weight: 500;
}
.trips-row__id .sub {
  display: block;
  color: var(--ink-3);
  font-size: 9.5px;
  margin-top: 1px;
}
.trips-row__route {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.trips-row__route .arrow { color: var(--ink-3); font-weight: 400; margin: 0 4px; }
.trips-row__route .cust {
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: 2px;
}
.trips-row__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  text-align: right;
}
.trips-row__num .sub {
  display: block;
  color: var(--ink-3);
  font-size: 10px;
  margin-top: 1px;
}
.trips-row__suggestion {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.4;
}
.trips-row__suggestion .ai {
  width: 18px; height: 18px;
  background: var(--purple);
  color: white;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 9px;
  flex-shrink: 0;
}
.trips-row__suggestion .text { line-height: 1.4; }
.trips-row__action {
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-2);
  background: var(--purple-bg);
  padding: 5px 9px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  text-align: center;
  border: 1px solid transparent;
}
.trips-row__action:hover { background: var(--purple-bg-2); }
.trips-row__check {
  width: 14px; height: 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  background: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trips-row__check.on {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
  font-size: 10px;
}
.trips-row__check.on::after { content: '✓'; }
.trips-row__check:hover { border-color: var(--ink-3); }

/* Overview: pull-up agent strip occupies more space — body taller */
.agent--overview .agent__body { max-height: 280px; }
.agent--overview .ora-card { background: var(--surface); }

/* ============================================================
   Confirm modal
   ============================================================ */
.modal__overlay {
  position: fixed; inset: 0;
  background: rgba(24, 24, 15, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: 8px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.modal__head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.modal__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.modal__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.modal__sub {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 6px;
  line-height: 1.45;
}
.modal__body {
  padding: 14px 20px 18px;
  overflow-y: auto;
  flex: 1;
}
.modal__foot {
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--surface-2);
}

.fleet-pick {
  display: flex; flex-direction: column; gap: 8px;
}
.fleet-pick__opt {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  position: relative;
}
.fleet-pick__opt:hover { border-color: var(--ink-3); background: var(--surface-2); }
.fleet-pick__opt.selected {
  border-color: var(--green);
  background: linear-gradient(to right, var(--green-bg) 0%, var(--surface) 35%);
}
.fleet-pick__opt.disabled {
  opacity: 0.5; cursor: not-allowed;
}
.fleet-pick__radio {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: white;
  flex-shrink: 0;
  position: relative;
}
.fleet-pick__opt.selected .fleet-pick__radio {
  border-color: var(--green);
  background: var(--green);
}
.fleet-pick__opt.selected .fleet-pick__radio::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
}
.fleet-pick__body { flex: 1; min-width: 0; }
.fleet-pick__name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.fleet-pick__meta {
  font-size: 11.5px;
  color: var(--ink-2);
  font-family: var(--font-mono);
}
.fleet-pick__rec {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  background: var(--green);
  color: white;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}

/* ============================================================
   Edit drawer (right-side panel for trip editing)
   ============================================================ */
.drawer__overlay {
  position: fixed; inset: 0;
  background: rgba(24, 24, 15, 0.35);
  z-index: 180;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 460px;
  max-width: 100vw;
  background: var(--surface);
  z-index: 190;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  animation: drawer-in 0.18s ease-out;
}
@keyframes drawer-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.drawer__head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.drawer__title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.drawer__sub {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 3px;
  font-family: var(--font-mono);
}
.drawer__close {
  font-size: 18px;
  color: var(--ink-3);
  padding: 4px 8px;
}
.drawer__close:hover { color: var(--ink); }
.drawer__body {
  flex: 1; overflow-y: auto;
  padding: 16px 20px 24px;
}
.drawer__foot {
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--surface-2);
}

.field {
  margin-bottom: 14px;
}
.field__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 5px;
  display: block;
}
.field__sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  font-style: italic;
}
.input, .select, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 8px 10px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
  font-family: var(--font-sans);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); }
.input.mono { font-family: var(--font-mono); font-size: 12px; }

.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 2px;
  background: var(--surface-2);
  gap: 2px;
}
.seg__btn {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 3px;
  color: var(--ink-2);
  font-weight: 500;
}
.seg__btn:hover { color: var(--ink); }
.seg__btn.on {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.note-warn {
  font-size: 11.5px;
  color: var(--amber-2);
  background: var(--amber-bg);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border-left: 2px solid var(--amber);
  margin-top: 6px;
}

/* Last-changed pill */
.changed-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple-2);
  background: var(--purple-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.changed-pill .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--purple);
}
.trip-card__changed-pill {
  position: absolute;
  top: 8px; right: 10px;
}

/* Edit pencil button on trip card */
.trip-card__edit {
  position: absolute;
  right: 8px; bottom: 8px;
  width: 22px; height: 22px;
  border-radius: 3px;
  color: var(--ink-3);
  font-size: 12px;
  display: none;
  align-items: center; justify-content: center;
}
.trip-card:hover .trip-card__edit { display: flex; }
.trip-card__edit:hover { background: var(--surface-3); color: var(--ink); }

/* Larger detail header for max'd mode */
.main.focus .detail__scroll { padding-left: 40px; padding-right: 40px; }
.main.focus .detail__header { padding-left: 40px; padding-right: 40px; }
.main.focus .detail__tabs { padding-left: 40px; padding-right: 40px; }

/* Cross-trip agent overview footer */
.agent__col-head .agent-link {
  margin-left: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: currentColor;
  background: rgba(255,255,255,0.4);
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: none;
  letter-spacing: 0;
}

/* Placeholder for non-tactical views */
.placeholder {
  display: flex; align-items: center; justify-content: center;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  color: var(--ink-3);
  padding: 60px;
  text-align: center;
}
.placeholder__title {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--ink);
  font-weight: 600;
}
.placeholder__body {
  font-size: 14px;
  max-width: 480px;
  line-height: 1.5;
}


/* ============================================================
   Strategic Horizon — 5-day forward plan
   ============================================================ */
.strategic {
  height: 100%;
  overflow-y: auto;
  background: var(--bg);
  padding: 18px 24px 28px;
}

/* Head */
.s-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.s-head__left { min-width: 0; }
.s-head__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.s-head__title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.s-head__title .dim { color: var(--ink-3); font-weight: 400; }
.s-head__sub {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 6px;
  line-height: 1.5;
}
.s-head__sub-strong { color: var(--ink); font-weight: 600; font-family: var(--font-mono); font-size: 12px; }
.s-head__right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* KPI strip — denser variant of overview kpis */
.s-kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.s-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 13px 12px;
}
.s-kpi__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 5px;
}
.s-kpi__value {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 6px;
}
.s-kpi__sub {
  font-size: 10.5px;
  color: var(--ink-2);
  margin-top: 5px;
  font-family: var(--font-mono);
}
.s-kpi--red    .s-kpi__value { color: var(--red-2); }
.s-kpi--amber  .s-kpi__value { color: var(--amber-2); }
.s-kpi--green  .s-kpi__value { color: var(--green-2); }
.s-kpi__trend {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

/* Section frame */
.s-section { margin-bottom: 24px; }
.s-section__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}
.s-section__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin-bottom: 2px;
}
.s-section__sub {
  font-size: 11.5px;
  color: var(--ink-2);
  display: flex; gap: 14px; align-items: center;
  flex-wrap: wrap;
}
.s-section__sub-r {
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: right;
}
.s-section__sub-mono { font-family: var(--font-mono); color: var(--ink-2); }

/* Legend */
.s-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-2); }
.s-legend-sw { width: 12px; height: 10px; border-radius: 2px; display: inline-block; }
.s-legend-sw--priv { background: var(--green); }
.s-legend-sw--ded  { background: var(--amber); }
.s-legend-sw--mkt  { background: var(--blue); }
.s-legend-sw--unc  { background: var(--red); }
.s-legend-sw--head { background: var(--surface-3); border: 1px solid var(--line-strong); }

/* ============================================================
   Capacity grid
   ============================================================ */
.s-grid-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.s-grid {
  display: grid;
  /* lane name | 5 days | total */
  grid-template-columns: 220px repeat(5, 1fr) 130px;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.s-grid__corner,
.s-grid__col-head,
.s-grid__row-head,
.s-grid__row-total {
  background: var(--surface-2);
  padding: 10px 12px;
}
.s-grid__corner {
  display: flex; flex-direction: column; justify-content: flex-end;
}
.s-grid__corner-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.s-grid__corner-sub {
  font-size: 10.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.s-grid__col-head {
  text-align: center;
  display: flex; flex-direction: column; gap: 2px;
  border-bottom: 1px solid var(--line);
}
.s-grid__dow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.s-grid__date {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.s-grid__col-totals {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 4px;
  display: flex; justify-content: center; align-items: center; gap: 6px;
}
.s-grid__col-totals--bad { color: var(--red-2); font-weight: 600; }
.s-grid__col-gap {
  background: var(--red);
  color: white;
  font-size: 10px;
  padding: 0 5px;
  border-radius: 2px;
  font-weight: 600;
}
.s-grid__col-head--total {
  background: var(--ink);
  color: white;
}
.s-grid__col-head--total .s-grid__dow,
.s-grid__col-head--total .s-grid__date,
.s-grid__col-head--total .s-grid__col-totals { color: white; }
.s-grid__col-head--total .s-grid__dow { opacity: 0.7; }

.s-grid__row-head {
  display: flex; flex-direction: column; justify-content: center;
  background: var(--surface);
}
.s-grid__lane {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.s-grid__lane .arr { color: var(--ink-3); font-weight: 400; margin: 0 4px; }
.s-grid__lane-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.s-grid__row-total {
  background: var(--surface-2);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
}
.s-grid__row-total-main {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.s-grid__row-total-gap {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--red-2);
  background: var(--red-bg);
  padding: 1px 6px;
  border-radius: 2px;
  margin-top: 3px;
  font-weight: 600;
}
.s-grid__row-total--bad .s-grid__row-total-main { color: var(--red-2); }

/* Cells */
.s-cell {
  background: var(--surface);
  padding: 8px 10px 9px;
  display: flex; flex-direction: column;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  min-height: 56px;
  transition: filter 0.08s, transform 0.08s;
  position: relative;
}
.s-cell:hover { filter: brightness(0.97); }
.s-cell--selected {
  outline: 2px solid var(--purple);
  outline-offset: -2px;
  z-index: 1;
}
.s-cell--empty   { background: var(--surface-2); }
.s-cell--ok      { background: var(--surface); }
.s-cell--tight   { background: linear-gradient(to bottom, var(--amber-bg) 0%, var(--surface) 100%); }
.s-cell--amber   { background: linear-gradient(to bottom, var(--amber-bg-2) 0%, var(--amber-bg) 100%); }
.s-cell--red     { background: linear-gradient(to bottom, var(--red-bg-2) 0%, var(--red-bg) 100%); }

.s-cell__head {
  display: flex; align-items: baseline; gap: 4px;
}
.s-cell__loads {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.s-cell__sep { color: var(--ink-3); font-family: var(--font-mono); font-size: 12px; }
.s-cell__cap {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}
.s-cell--red .s-cell__loads { color: var(--red-2); }
.s-cell--amber .s-cell__loads { color: var(--amber-2); }
.s-cell--empty .s-cell__loads { color: var(--ink-3); }
.s-cell__gap {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--red);
  color: white;
  padding: 1px 5px;
  border-radius: 2px;
}

.s-cell__bar {
  height: 5px;
  display: flex;
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface-3);
}
.s-cell__seg { display: block; height: 100%; }
.s-cell__seg--priv { background: var(--green); }
.s-cell__seg--ded  { background: var(--amber); }
.s-cell__seg--mkt  { background: var(--blue); }
.s-cell__seg--unc  { background: var(--red); }
.s-cell__seg--head { background: transparent; }

/* Selected-cell detail panel — appears below the grid */
.s-cell-detail {
  background: var(--surface);
  border: 1px solid var(--purple);
  border-radius: var(--r-md);
  padding: 14px 16px 14px;
  box-shadow: 0 2px 12px rgba(90, 63, 184, 0.08);
}
.s-cell-detail__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.s-cell-detail__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple-2);
  margin-bottom: 2px;
}
.s-cell-detail__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.s-cell-detail__gap { color: var(--red-2); font-family: var(--font-mono); font-size: 14px; margin-left: 6px; }
.s-cell-detail__close {
  font-size: 18px;
  color: var(--ink-3);
  padding: 0 6px;
  line-height: 1;
}
.s-cell-detail__close:hover { color: var(--ink); }

.s-cell-detail__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.s-cell-detail__stat {
  background: var(--surface);
  padding: 9px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.s-cell-detail__stat-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.s-cell-detail__stat-val {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.s-cell-detail__rec {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
  padding: 10px 12px;
  background: var(--red-bg);
  border-left: 2px solid var(--red);
  border-radius: var(--r-sm);
  color: var(--ink);
}
.s-cell-detail__rec--ok { background: var(--green-bg); border-left-color: var(--green); }
.s-cell-detail__rec-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: white;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 700;
}
.s-cell-detail__rec-btn {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--red-2);
  background: var(--surface);
  border: 1px solid var(--red);
  padding: 5px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.s-cell-detail__rec-btn:hover { background: var(--red-bg-2); }

/* ============================================================
   Two-column row: pre-tender + cost variance
   ============================================================ */
.s-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

/* Pre-tender cards */
.s-pt-list { display: flex; flex-direction: column; gap: 10px; }
.s-pt {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 14px 16px 14px;
}
.s-pt--red    { border-left-color: var(--red); }
.s-pt--amber  { border-left-color: var(--amber); }

.s-pt__head {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.s-pt__lane {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.s-pt__day {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 2px;
}
.s-pt__surfaced {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.s-pt__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.s-pt__body {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 12px;
}
.s-pt__body .v { font-family: var(--font-mono); color: var(--ink); font-weight: 500; }

.s-pt__math {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.s-pt__math-cell {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  min-width: 90px;
  display: flex; flex-direction: column; gap: 2px;
}
.s-pt__math-cell--now {
  background: var(--green-bg);
  border-color: var(--green-bg-2);
}
.s-pt__math-cell--risk {
  background: var(--red-bg);
  border-color: var(--red-bg-2);
}
.s-pt__math-cell--save {
  background: var(--ink);
  border-color: var(--ink);
  margin-left: auto;
}
.s-pt__math-cell--save .s-pt__math-label { color: rgba(255,255,255,0.7); }
.s-pt__math-cell--save .s-pt__math-val   { color: white; }
.s-pt__math-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.s-pt__math-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.s-pt__math-cell--now .s-pt__math-val { color: var(--green-2); }
.s-pt__math-cell--risk .s-pt__math-val { color: var(--red-2); }
.s-pt__math-arr {
  align-self: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

.s-pt__actions { display: flex; gap: 8px; }

/* ============================================================
   Cost variance attribution
   ============================================================ */
.s-var {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px 18px;
}
.s-var__top {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.s-var__top-cell {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 0;
}
.s-var__top-cell--var {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 6px 12px;
}
.s-var__top-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.s-var__top-val {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.s-var__top-val--red { color: var(--red-2); }
.s-var__top-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--red-2);
  margin-top: 1px;
}
.s-var__top-sep {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-3);
}

.s-var__bars {
  display: flex; flex-direction: column;
  gap: 12px;
}
.s-var__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.s-var__row-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px;
}
.s-var__row-label { color: var(--ink); font-weight: 500; }
.s-var__row-amt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--red-2);
}
.s-var__row-amt--save { color: var(--green-2); }

.s-var__row-bar {
  position: relative;
  height: 10px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.s-var__row-axis {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: var(--ink-3);
  opacity: 0.4;
}
.s-var__row-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--red);
  border-radius: 2px;
}
.s-var__row-fill--red    { background: var(--red); }
.s-var__row-fill--amber  { background: var(--amber); }
.s-var__row-fill--green,
.s-var__row-fill--save   { background: var(--green); }

.s-var__row-detail {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.4;
}

.s-var__foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 16px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.s-var__foot-cell {
  background: var(--surface-2);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.s-var__foot-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.s-var__foot-val {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}
.s-var__foot-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-2);
}

/* ============================================================
   Stale orders table
   ============================================================ */
.s-stale {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.s-stale__head,
.s-stale__row {
  display: grid;
  grid-template-columns: 14px 90px 1.2fr 1fr 70px 70px 70px 60px 1.5fr 1.6fr 80px;
  gap: 10px;
  padding: 9px 14px;
  align-items: center;
}
.s-stale__head {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.s-stale__head .num { text-align: right; }
.s-stale__row {
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.08s;
}
.s-stale__row:hover { background: var(--surface-2); }
.s-stale__row:last-child { border-bottom: none; }

.s-stale__risk {
  width: 8px; height: 8px; border-radius: 50%;
}
.s-stale__risk--red   { background: var(--red); }
.s-stale__risk--amber { background: var(--amber); }
.s-stale__risk--green { background: var(--green); }

.s-stale__id { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink); }
.s-stale__cust { font-size: 12px; color: var(--ink); font-weight: 500; }
.s-stale__dest { font-size: 11.5px; color: var(--ink-2); }
.s-stale__ship { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }
.s-stale__days { text-align: right; }
.s-stale__days-val { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.s-stale__days-val--red   { color: var(--red-2); }
.s-stale__days-val--amber { color: var(--amber-2); }
.s-stale__days-val--green { color: var(--green-2); }
.s-stale__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 1px;
}
.s-stale__inpool { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }
.s-stale__reason { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.s-stale__suggest {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ink-2);
  line-height: 1.4;
}
.s-stale__ai {
  width: 18px; height: 18px;
  background: var(--purple);
  color: white;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 9px;
  flex-shrink: 0;
}
.s-stale__act {
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-2);
  background: var(--purple-bg);
  padding: 5px 9px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  text-align: center;
}
.s-stale__act:hover { background: var(--purple-bg-2); }

.s-stale__row .num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  text-align: right;
}

/* Toast (strategic-local) */
.s-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  z-index: 120;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  max-width: 640px;
  text-align: center;
}

/* Tighter at narrow widths */
@media (max-width: 1400px) {
  .s-two-col { grid-template-columns: 1fr; }
  .s-kpis { grid-template-columns: repeat(3, 1fr); }
}


/* ============================================================
   Tactical refresh — cross-wave overview, last-wave list,
   trip back button, ORA wave-attribution
   ============================================================ */

/* ----- Trip list eyebrow (left panel) ----- */
.triplist__eyebrow {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.triplist__eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.15);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ----- Detail panel back button ----- */
.detail__back {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px 9px 4px 7px;
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center;
  margin-right: 10px;
  transition: background 0.08s, color 0.08s;
}
.detail__back:hover {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* ----- Wave badge (small chip used in overview rows + ora cards) ----- */
.wave-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

/* ----- Status pill — additions for blue / grey ----- */
.pill--blue {
  background: var(--blue-bg, #DEE9FB);
  color: var(--blue-2, #0B5BD3);
}
.pill--grey {
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

/* ----- Overview filter bar ----- */
.ov-filters {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ov-filters__left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ov-filter {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ov-filter__label { color: var(--ink-3); }
.ov-filter__select,
.ov-filter__input {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  min-width: 110px;
  cursor: pointer;
}
.ov-filter__input { min-width: 130px; cursor: text; }
.ov-filter__select:hover { border-color: var(--line-strong); }
.ov-filter__select:focus,
.ov-filter__input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}
.ov-filters__clear {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  background: transparent;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.ov-filters__clear:hover { color: var(--ink); }
.ov-filters__count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.overview__sub-em { color: var(--red-2); font-weight: 600; }

/* ----- Cross-wave overview table — extra columns for Wave + Status ----- */
.trips-table--cross .trips-table__head,
.trips-table--cross .trips-row {
  grid-template-columns: 28px 28px 100px 50px 100px 1.4fr 80px 60px 80px 60px 100px 1.5fr 90px;
  gap: 9px;
}

.trips-row--readonly {
  background: var(--surface-2);
  cursor: default;
  opacity: 0.78;
}
.trips-row--readonly:hover { background: var(--surface-2); }
.trips-row--readonly .trips-row__id { color: var(--ink-2); }
.trips-row--readonly .trips-row__route { color: var(--ink-2); }

/* ----- ORA card — wave-attribution pill in header ----- */
.ora-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.ora-card__head .ora-card__label { margin-bottom: 0; }
.ora-card__wave {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(255,255,255,0.55);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.ora-card--observe .ora-card__wave { background: rgba(11, 91, 211, 0.1); color: var(--blue-2, #0B5BD3); border-color: rgba(11, 91, 211, 0.2); }
.ora-card--reason  .ora-card__wave { background: rgba(90, 63, 184, 0.1); color: var(--purple-2); border-color: rgba(90, 63, 184, 0.2); }
.ora-card--act     .ora-card__wave { background: rgba(35, 134, 54, 0.1); color: var(--green-2); border-color: rgba(35, 134, 54, 0.2); }

/* Agent bar wave chip (signals from W5 / W6 / W7) */
.agent__wave-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  border: 1px solid var(--line);
}


/* ============================================================
   Tactical detail v2 — cost-to-serve, route map, load-planner,
   trip actions (hold/cancel/split), edit drawer tabs + orders.
   ============================================================ */

/* ---------- Cost-to-serve pill on Fleet cards ---------- */
.fleet-card__head { flex-wrap: wrap; }
.c2s-pill {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  line-height: 1.05;
  margin-left: auto;
}
.c2s-pill__label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.c2s-pill__value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 1px 0 0;
}
.c2s-pill__delta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
}
.c2s-pill--red    { background: var(--red-bg);   border-color: var(--red-bg-2); }
.c2s-pill--red    .c2s-pill__value { color: var(--red-2); }
.c2s-pill--red    .c2s-pill__delta { color: var(--red-2); font-weight: 600; }
.c2s-pill--amber  { background: var(--amber-bg); border-color: var(--amber-bg-2); }
.c2s-pill--amber  .c2s-pill__value { color: var(--amber-2); }
.c2s-pill--green  { background: var(--green-bg); border-color: var(--green-bg-2); }
.c2s-pill--green  .c2s-pill__value { color: var(--green-2); }

.fleet-summary {
  display: flex; flex-direction: column; gap: 10px;
}
.fleet-summary__econ {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.fleet-summary__econ > span {
  display: inline-flex; flex-direction: column; gap: 1px;
}
.fleet-summary__econ .lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.fleet-summary__econ .val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Route map ---------- */
.route-map-card { padding: 6px; }
.route-map {
  position: relative;
  background: white;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.route-map__svg {
  display: block;
  background: #FAFAF5;
}
.route-map__legend {
  display: flex; gap: 16px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--ink-2);
}
.rml-item { display: inline-flex; align-items: center; gap: 6px; }
.rml-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.map-empty {
  padding: 40px;
  color: var(--ink-3);
  text-align: center;
  font-style: italic;
  font-size: 12px;
}

/* ---------- 3D Load View action band ---------- */
.lv-action-band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.lv-action-band__title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}
.lv-action-band__sub {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.lv-action-band__right { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.status-dot--amber {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(232, 167, 60, 0.2);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
.status-dot--green {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.18);
}

/* Tab badge on detail tab nav (for LP-pending indicator) */
.detail__tab-badge {
  margin-left: 6px;
  font-size: 8px;
  vertical-align: middle;
}
.detail__tab-badge--amber {
  color: var(--amber);
}

/* ---------- Load planner picker (in the send modal) ---------- */
.lp-pick { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lp-pick__opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  background: var(--surface);
}
.lp-pick__opt:hover { border-color: var(--line-strong); }
.lp-pick__opt.selected {
  border-color: var(--ink);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--ink);
}
.lp-pick__opt.offline { opacity: 0.55; cursor: not-allowed; }
.lp-pick__opt input { margin: 0; }
.lp-pick__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.lp-pick__main {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
}
.lp-pick__name { font-size: 13px; font-weight: 600; }
.lp-pick__sub { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }
.lp-pick__dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.lp-pick__dot.on  { background: var(--green); }
.lp-pick__dot.off { background: var(--ink-3); }

.modal--narrow { max-width: 540px; }
.modal--wide   { max-width: 880px; }
.modal--danger .modal__head { background: linear-gradient(to bottom, var(--red-bg) 0%, transparent 100%); }
.modal__eyebrow--danger { color: var(--red-2); font-weight: 700; }
.modal__title .mono,
.modal__sub .mono,
.mono { font-family: var(--font-mono); }
.modal__sub .v { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }

/* ---------- Reason list (used by Hold/Cancel modals) ---------- */
.reason-list { display: flex; flex-direction: column; gap: 6px; }
.reason-list__opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
}
.reason-list__opt:hover { border-color: var(--line-strong); }
.reason-list__opt.selected {
  border-color: var(--ink);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--ink);
}
.reason-list__opt input { margin: 0; }
.reason-list__main { display: flex; flex-direction: column; gap: 2px; }
.reason-list__lbl  { font-size: 13px; font-weight: 600; }
.reason-list__hint { font-size: 11px; color: var(--ink-3); }

.seg--block { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.seg--block .seg__btn { padding: 9px 10px; }

/* ---------- Cancel modal impact rows ---------- */
.cancel-impact {
  display: flex; flex-direction: column; gap: 1px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--line);
}
.cancel-impact__row {
  background: var(--surface);
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.cancel-impact__icon {
  width: 22px; height: 22px;
  border-radius: 4px;
  background: var(--red-bg);
  color: var(--red-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.cancel-impact__val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}

.check-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.check-row__item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }

.ack-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 11px;
  background: var(--red-bg);
  border-left: 2px solid var(--red);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  color: var(--ink);
  line-height: 1.45;
  cursor: pointer;
}

/* ---------- Split modal ---------- */
.split-preview {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 16px;
}
.split-preview__arrow {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--ink-3);
}
.split-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.split-card--new {
  background: var(--purple-bg);
  border-color: var(--purple-bg-2);
  border-style: dashed;
}
.split-card__head {
  display: flex; align-items: baseline; justify-content: space-between;
}
.split-card__id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.split-card__count { font-size: 11px; color: var(--ink-2); }

.split-card__util { display: flex; align-items: center; gap: 10px; }
.split-card__util-num { display: flex; align-items: baseline; gap: 4px; }
.split-card__util-val {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.util-red { color: var(--red-2); }
.util-amber { color: var(--amber-2); }
.util-green { color: var(--green-2); }
.util-fill-red { background: var(--red); }
.util-fill-amber { background: var(--amber); }
.util-fill-green { background: var(--green); }
.split-card__util-lbl {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.split-card__bar {
  flex: 1; height: 6px; background: var(--surface-3); border-radius: 3px;
  position: relative; overflow: hidden;
}
.split-card__bar-fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  background: var(--green);
}
.split-card__bar-tick {
  position: absolute; top: -2px; bottom: -2px;
  width: 1px; background: var(--ink-2);
  opacity: 0.6;
}
.split-card__stats {
  display: flex; gap: 12px;
  flex-wrap: wrap;
}
.split-card__stats > span { display: inline-flex; flex-direction: column; gap: 1px; }
.split-card__stats .lbl { font-family: var(--font-mono); font-size: 9px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.split-card__stats .val { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.split-card__orders { display: flex; gap: 4px; flex-wrap: wrap; }
.split-card__pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 2px;
}
.split-card--new .split-card__pill { background: rgba(255,255,255,0.6); }
.split-card__empty { font-size: 11px; color: var(--ink-3); font-style: italic; }

.split-picker {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 14px;
}
.split-picker__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.split-picker__list { display: flex; flex-direction: column; }
.split-picker__row {
  display: grid;
  grid-template-columns: 22px 90px 1fr 80px 100px 90px 60px;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: var(--surface);
}
.split-picker__row:last-child { border-bottom: none; }
.split-picker__row:hover { background: var(--surface-2); }
.split-picker__row.moving { background: var(--purple-bg); }
.split-picker__row.moving:hover { background: var(--purple-bg-2); }
.split-picker__row input { margin: 0; }
.split-picker__id { font-family: var(--font-mono); font-weight: 600; }
.split-picker__sku { color: var(--ink-2); }
.split-picker__num { font-family: var(--font-mono); text-align: right; }
.split-picker__arrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
}
.split-picker__arrow.on { color: var(--purple-2); font-weight: 600; }

.split-errs {
  margin-bottom: 12px;
  padding: 9px 11px;
  background: var(--red-bg);
  border-left: 2px solid var(--red);
  border-radius: var(--r-sm);
}
.split-errs__row {
  font-size: 12px;
  color: var(--red-2);
  font-weight: 500;
  margin-bottom: 2px;
}
.split-errs__row:last-child { margin-bottom: 0; }

/* Agent-impact panel (reused by all three trip-action modals) */
.agent-impact {
  display: flex; gap: 10px; padding: 10px 12px;
  background: var(--purple-bg);
  border: 1px solid var(--purple-bg-2);
  border-radius: var(--r-md);
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: 10px;
}
.agent-impact__icon {
  width: 22px; height: 22px;
  background: var(--purple);
  color: white;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.agent-impact__label { color: var(--purple-2); font-weight: 600; margin-right: 4px; }
.agent-impact .v { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }

.btn--warning {
  background: var(--amber);
  color: white;
  border-color: var(--amber-2);
}
.btn--warning:hover:not(:disabled) { background: var(--amber-2); }
.btn--warning:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Edit drawer — tabs + wide layout ---------- */
.drawer--wide { max-width: 720px; width: 100%; }
.drawer__tabs {
  display: flex; gap: 4px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.drawer__tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 12px 10px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
  background: transparent;
}
.drawer__tab .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  background: var(--surface-3);
  border-radius: 2px;
  padding: 1px 5px;
}
.drawer__tab--active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.drawer__tab--active .num { background: var(--ink); color: white; }
.drawer__tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple);
  color: white;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 5px;
  margin-left: 4px;
}

/* ---------- Orders & drops tab ---------- */
.orders-drops { display: flex; flex-direction: column; gap: 14px; }
.orders-drops__switcher {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-bg-2);
  border-radius: var(--r-sm);
  font-size: 11.5px;
}
.orders-drops__switcher-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber-2);
  font-weight: 600;
  margin-right: 4px;
}
.orders-drops__switcher-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}
.orders-drops__switcher-btn.on {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.orders-drops__summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.orders-drops__summary-card {
  background: var(--surface);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.orders-drops__summary-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.orders-drops__summary-val {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.orders-drops__summary-sub {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--ink-2);
}

.orders-drops__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.orders-drops__col {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  display: flex; flex-direction: column;
  min-height: 0;
  max-height: 360px;
}
.orders-drops__col-head {
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  display: flex; flex-direction: column;
  gap: 2px;
}
.orders-drops__col-sub {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.orders-drops__list {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
}
.orders-drops__drop {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  align-items: center;
}
.orders-drops__drop:last-child { border-bottom: none; }
.orders-drops__drop.moving { background: var(--purple-bg); }
.orders-drops__drop.adding { background: var(--green-bg); border-left: 2px solid var(--green); }
.orders-drops__drop.is-added { opacity: 0.55; }
.orders-drops__drop-id { font-family: var(--font-mono); font-weight: 600; font-size: 11.5px; }
.orders-drops__drop-cust { font-size: 12px; color: var(--ink); margin-top: 1px; }
.orders-drops__drop-meta { font-size: 10.5px; color: var(--ink-3); font-family: var(--font-mono); margin-top: 1px; }
.orders-drops__select {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
}
.orders-drops__add {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: var(--green-bg);
  color: var(--green-2);
  border: 1px solid var(--green-bg-2);
}
.orders-drops__add:hover { background: var(--green-bg-2); }
.orders-drops__add.added {
  background: var(--surface-3);
  color: var(--ink-3);
}
.orders-drops__undo {
  font-size: 11px;
  color: var(--ink-3);
  padding: 4px 8px;
  border-radius: var(--r-sm);
}
.orders-drops__undo:hover { background: var(--surface-2); color: var(--ink); }
.orders-drops__moving {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--purple-2);
  font-weight: 500;
}
.orders-drops__drop-action {
  display: flex; align-items: center; gap: 6px;
}
.orders-drops__added-divider {
  padding: 6px 12px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-2);
  font-weight: 600;
}
.orders-drops__empty {
  padding: 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-3);
  font-style: italic;
}

.orders-drops__map {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.orders-drops__map-head {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.orders-drops__map-title { font-size: 12px; font-weight: 600; }
.orders-drops__map-sub { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; font-family: var(--font-mono); }
.orders-drops__map-frame { padding: 6px; }


/* ============================================================
   Agent Policy tab
   ============================================================ */
.policy {
  height: 100%;
  overflow-y: auto;
  background: var(--bg);
  padding: 18px 24px 28px;
}

/* ---------- Header ---------- */
.pol-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.pol-head__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.pol-head__title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.pol-head__sub {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 6px;
}
.pol-head__sub .v { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }
.pol-head__sub .mono { font-family: var(--font-mono); }
.pol-head__right { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- KPIs ---------- */
.pol-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.pk {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.pk__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 5px;
}
.pk__value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.pk__sub {
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 5px;
  font-family: var(--font-mono);
}
.pk--green .pk__value { color: var(--green-2); }
.pk--amber .pk__value { color: var(--amber-2); }
.pk--red   .pk__value { color: var(--red-2); }

/* ---------- Governance + heatmap row ---------- */
.pol-top-row {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

/* Governance score card */
.gov-score {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.gov-score__eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.gov-score__title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: -0.005em;
}
.gov-score__body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 12px;
}
.gov-score__ring {
  position: relative;
  flex-shrink: 0;
}
.gov-score__num {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.gov-score__val {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.gov-score__lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin-top: 4px;
}
.gov-score__bands {
  flex: 1;
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.gov-band {
  display: flex; flex-direction: column; gap: 2px;
}
.gov-band__row1 { display: flex; justify-content: space-between; align-items: baseline; }
.gov-band__label { font-size: 11px; color: var(--ink-2); }
.gov-band__val   { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink); }
.gov-band__bar {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.gov-band__bar span {
  display: block; height: 100%;
  background: var(--ink-2);
}
.gov-band--green .gov-band__bar span { background: var(--green); }
.gov-band--green .gov-band__val      { color: var(--green-2); }
.gov-band--amber .gov-band__bar span { background: var(--amber); }
.gov-band--amber .gov-band__val      { color: var(--amber-2); }
.gov-band--red   .gov-band__bar span { background: var(--red); }
.gov-band--red   .gov-band__val      { color: var(--red-2); }
.gov-band__sub { font-size: 10px; color: var(--ink-3); font-family: var(--font-mono); margin-top: 1px; }

/* Heatmap */
.heatmap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.heatmap__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 12px;
  gap: 12px;
}
.heatmap__eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.heatmap__title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: -0.005em;
}
.heatmap__sub {
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
}
.heatmap__sub .mono { font-family: var(--font-mono); color: var(--ink-2); }

.heatmap__grid {
  display: grid;
  grid-template-columns: 180px repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.heatmap__corner {
  background: var(--surface-2);
}
.heatmap__col-head {
  background: var(--surface-2);
  padding: 8px 10px;
  text-align: center;
}
.heatmap__col-label {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
}
.heatmap__col-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1px;
}
.heatmap__col-head--auto     .heatmap__col-label { color: var(--green-2); }
.heatmap__col-head--notify   .heatmap__col-label { color: var(--blue-2, #0B5BD3); }
.heatmap__col-head--approval .heatmap__col-label { color: var(--amber-2); }
.heatmap__col-head--human    .heatmap__col-label { color: var(--red-2); }

.heatmap__row-head {
  background: var(--surface);
  padding: 9px 12px;
  display: flex; align-items: center; gap: 9px;
}
.heatmap__row-icon {
  font-size: 16px;
  color: var(--ink-2);
}
.heatmap__row-label {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
}
.heatmap__row-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
  margin-top: 1px;
}

.heatmap__cell {
  background: var(--surface);
  padding: 10px;
  display: flex; flex-direction: column; gap: 2px;
  align-items: center; justify-content: center;
  cursor: pointer;
  text-align: center;
  min-height: 64px;
  position: relative;
}
.heatmap__cell:hover { filter: brightness(0.96); }
.heatmap__cell--selected {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  z-index: 1;
}
.heatmap__cell--auto      { background: color-mix(in srgb, var(--green) calc(var(--intensity, 0) * 38%), var(--surface)); }
.heatmap__cell--notify    { background: color-mix(in srgb, var(--blue, #4D8FE6) calc(var(--intensity, 0) * 38%), var(--surface)); }
.heatmap__cell--approval  { background: color-mix(in srgb, var(--amber) calc(var(--intensity, 0) * 42%), var(--surface)); }
.heatmap__cell--human     { background: color-mix(in srgb, var(--red) calc(var(--intensity, 0) * 42%), var(--surface)); }
.heatmap__cell--empty {
  background: repeating-linear-gradient(
    45deg, transparent 0 4px,
    var(--surface-3) 4px 5px
  ) !important;
  cursor: default;
}
.heatmap__cell--empty:hover { filter: none; }
.heatmap__cell-count {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.heatmap__cell-trig {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.heatmap__cell-empty {
  font-family: var(--font-mono);
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------- Section frame ---------- */
.pol-section { margin-bottom: 22px; }
.pol-section__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}
.pol-section__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.pol-section__sub {
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: 2px;
}
.pol-section__filters {
  display: flex; align-items: center; gap: 10px;
}
.show-paused {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
}

/* ---------- Filter chip groups ---------- */
.pol-chips {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.pol-chips__group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pol-chips__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  min-width: 56px;
}
.filter-chip--band-auto.filter-chip--active     { background: var(--green); color: white; }
.filter-chip--band-notify.filter-chip--active   { background: var(--blue, #2D6CC0); color: white; }
.filter-chip--band-approval.filter-chip--active { background: var(--amber); color: var(--ink); }
.filter-chip--band-human.filter-chip--active    { background: var(--red); color: white; }

/* ---------- Rule card ---------- */
.rules-list { display: flex; flex-direction: column; gap: 8px; }

.rule {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  overflow: hidden;
}
.rule--paused { opacity: 0.62; }

.rule__bar { width: 4px; flex-shrink: 0; background: var(--line-strong); position: relative; }
.rule__band-dot {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 100%;
}
.rule__band-dot--auto     { background: var(--green); }
.rule__band-dot--notify   { background: var(--blue, #4D8FE6); }
.rule__band-dot--approval { background: var(--amber); }
.rule__band-dot--human    { background: var(--red); }

.rule__main {
  flex: 1;
  padding: 12px 16px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.rule__head {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rule__family { color: var(--ink-2); font-weight: 600; }
.rule__sep { color: var(--line-strong); }
.rule__id { color: var(--ink-3); }
.rule__head-right { margin-left: auto; }

.rule__name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

.rule__logic {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  display: flex; flex-direction: column; gap: 4px;
}
.rule__logic-row {
  display: flex; gap: 10px;
  font-size: 12px;
  line-height: 1.45;
}
.rule__logic-kw {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: 2px;
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: 1px;
}
.rule__logic-kw--then { background: var(--ink); color: white; }
.rule__logic-text { color: var(--ink); flex: 1; }

.rule__stats {
  display: flex; gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.rule__stat { display: inline-flex; flex-direction: column; gap: 1px; }
.rule__stat-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.rule__stat-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.rule__stat-val--red { color: var(--red-2); }
.rule__stat--actions {
  margin-left: auto;
  flex-direction: row !important;
  gap: 10px;
  align-items: center;
}

.rule__toggle {
  width: 32px; height: 18px;
  border-radius: 9px;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.12s;
  flex-shrink: 0;
}
.rule__toggle.on { background: var(--green); }
.rule__toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: white;
  border-radius: 50%;
  transition: left 0.12s;
}
.rule__toggle.on .rule__toggle-knob { left: 16px; }

.rule__view {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--purple-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rule__view:hover { color: var(--ink); }

.rules-empty {
  padding: 32px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  font-style: italic;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
}

/* ---------- Band selector (segmented) ---------- */
.band-seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px;
}
.band-seg__btn {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.band-seg__btn:hover { color: var(--ink); }
.band-seg__btn.on {
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  color: var(--ink);
}
.band-seg__btn--auto.on     { color: var(--green-2); background: var(--green-bg); border: 1px solid var(--green-bg-2); padding: 2px 6px; }
.band-seg__btn--notify.on   { color: var(--blue-2, #0B5BD3); background: var(--blue-bg, #DEE9FB); border: 1px solid var(--blue-bg-2, #B7CDF1); padding: 2px 6px; }
.band-seg__btn--approval.on { color: var(--amber-2); background: var(--amber-bg); border: 1px solid var(--amber-bg-2); padding: 2px 6px; }
.band-seg__btn--human.on    { color: var(--red-2); background: var(--red-bg); border: 1px solid var(--red-bg-2); padding: 2px 6px; }

/* ---------- Audit log ---------- */
.audit {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.audit__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  gap: 16px;
  flex-wrap: wrap;
}
.audit__title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.audit__sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}
.audit__filters {
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap;
}

.audit__table {
  display: flex; flex-direction: column;
}
.audit__row {
  display: grid;
  grid-template-columns: 110px 80px 1.4fr 130px 1.6fr 80px 130px;
  gap: 12px;
  padding: 9px 16px;
  align-items: center;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.audit__row:last-child { border-bottom: none; }
.audit__row:not(.audit__row--head):hover { background: var(--surface-2); }
.audit__row--head {
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.audit__row--head .num { text-align: right; }
.audit__ts { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.audit__trip { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.audit__rule { font-size: 12px; color: var(--ink); line-height: 1.3; }
.audit__rule-id { display: block; font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-3); letter-spacing: 0.04em; margin-top: 1px; }
.audit__action { font-size: 11.5px; color: var(--ink-2); }
.audit__latency { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); text-align: right; }
.audit__override {
  font-size: 11.5px;
  color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
}
.audit__avatar {
  width: 18px; height: 18px;
  background: var(--ink); color: white;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}
.audit__empty {
  padding: 32px;
  text-align: center;
  color: var(--ink-3);
  font-style: italic;
}

/* extra pill kinds used in audit outcome column */
.pill--green { background: var(--green-bg); color: var(--green-2); }
.pill--amber { background: var(--amber-bg); color: var(--amber-2); }
.pill--red   { background: var(--red-bg);   color: var(--red-2); }

/* ---------- Toast ---------- */
.pol-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  z-index: 120;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

/* Narrow viewport tweaks */
@media (max-width: 1400px) {
  .pol-top-row { grid-template-columns: 1fr; }
  .pol-kpis    { grid-template-columns: repeat(2, 1fr); }
  .audit__row  { grid-template-columns: 100px 70px 1.2fr 110px 1.4fr 70px 110px; gap: 8px; }
}


/* ============================================================
   Multi-DC scope selector + Today tab
   ============================================================ */

/* ---------- DC scope selector ---------- */
.dc-scope {
  position: relative;
  margin-right: 14px;
}
.dc-scope__btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 10px 5px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.08s, border-color 0.08s;
}
.dc-scope__btn:hover { border-color: var(--line-strong); }
.dc-scope__btn.open { background: var(--ink); color: white; border-color: var(--ink); }
.dc-scope__icon {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.dc-scope__btn.open .dc-scope__icon { background: rgba(255,255,255,0.15); color: white; }
.dc-scope__main { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; align-items: flex-start; }
.dc-scope__eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.dc-scope__btn.open .dc-scope__eyebrow { color: rgba(255,255,255,0.6); }
.dc-scope__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.dc-scope__btn.open .dc-scope__label { color: white; }
.dc-scope__chev {
  font-size: 10px;
  color: var(--ink-3);
  margin-left: 2px;
}
.dc-scope__btn.open .dc-scope__chev { color: rgba(255,255,255,0.6); }

.dc-scope__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 280px;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  z-index: 200;
  overflow: hidden;
}
.dc-scope__menu-section { padding: 8px 6px; }
.dc-scope__menu-section + .dc-scope__menu-section { border-top: 1px solid var(--line); }
.dc-scope__menu-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  padding: 0 8px 6px;
}
.dc-scope__opt {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  width: 100%;
  text-align: left;
  background: transparent;
}
.dc-scope__opt:hover { background: var(--surface-2); }
.dc-scope__opt.on   { background: var(--ink); color: white; }
.dc-scope__opt-name {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.dc-scope__opt-primary {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--purple);
  color: white;
  padding: 1px 5px;
  border-radius: 2px;
}
.dc-scope__opt.on .dc-scope__opt-primary { background: rgba(255,255,255,0.18); }
.dc-scope__opt-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
}
.dc-scope__opt.on .dc-scope__opt-meta { color: rgba(255,255,255,0.6); }

/* DC chip used in overview row + on trip cards */
.dc-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.dc-chip--chi { background: #E3EBF6; color: #1D4B92; border-color: #B7CDF1; }
.dc-chip--dal { background: #F6E5E5; color: #8A2A2A; border-color: #E1B5B5; }
.dc-chip--atl { background: #E0EFE5; color: #1F5A35; border-color: #B3D6BE; }

/* Overview grid with extra DC column */
.trips-table--cross.trips-table--withdc .trips-table__head,
.trips-table--cross.trips-table--withdc .trips-row {
  grid-template-columns: 28px 28px 100px 56px 50px 100px 1.3fr 80px 60px 80px 60px 100px 1.3fr 90px;
  gap: 8px;
}

/* ============================================================
   Today tab
   ============================================================ */
.today {
  height: 100%;
  overflow-y: auto;
  background: var(--bg);
  padding: 18px 24px 28px;
}

/* ----- Hero ----- */
.td-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.td-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.td-hero__pulse {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.18);
  animation: pulse-dot 2s ease-in-out infinite;
}
.td-hero__date {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.05;
}
.td-hero__one-liner {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 740px;
}
.td-hero__big {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.td-hero__strong { color: var(--ink); font-weight: 600; font-family: var(--font-mono); font-size: 13px; }
.td-hero__delta {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 6px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
}
.td-hero__right { display: flex; gap: 6px; flex-shrink: 0; }

/* ----- KPI strip ----- */
.td-kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.tdk {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 13px 12px;
}
.tdk__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 5px;
}
.tdk__value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.tdk__sub {
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 5px;
  font-family: var(--font-mono);
}
.tdk--red   .tdk__value { color: var(--red-2); }
.tdk--amber .tdk__value { color: var(--amber-2); }
.tdk--green .tdk__value { color: var(--green-2); }

/* ----- Section frame ----- */
.td-section { margin-bottom: 22px; }
.td-section__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 10px;
}
.td-section__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.td-section__sub {
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: 2px;
}

/* ----- DC pulse grid ----- */
.td-dc-grid {
  display: grid;
  gap: 12px;
}
.dc-pulse {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.dc-pulse--green { border-top: 2px solid var(--green); }
.dc-pulse--amber { border-top: 2px solid var(--amber); }
.dc-pulse--red   { border-top: 2px solid var(--red); }

.dc-pulse__head {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.dc-pulse__name-row { display: inline-flex; align-items: center; gap: 8px; }
.dc-pulse__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.dc-pulse__dot--green { background: var(--green); box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.18); }
.dc-pulse__dot--amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(232, 167, 60, 0.2); }
.dc-pulse__dot--red   { background: var(--red);   box-shadow: 0 0 0 3px rgba(193, 51, 51, 0.18); }
.dc-pulse__name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.dc-pulse__primary {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--purple);
  color: white;
  padding: 1px 5px;
  border-radius: 2px;
}
.dc-pulse__region {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dc-pulse__hero {
  display: flex; align-items: baseline; gap: 6px;
}
.dc-pulse__hero-num {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.dc-pulse__hero-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dc-pulse__breakdown {
  display: flex; gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-2);
}
.dc-pulse__b-item .v {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  margin-right: 2px;
}
.dc-pulse__b-item--amber .v { color: var(--amber-2); }

.dc-pulse__risks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.dc-pulse__risk {
  background: var(--surface);
  padding: 7px 10px;
  display: flex; flex-direction: column; gap: 1px;
  align-items: flex-start;
}
.dc-pulse__risk-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-2);
}
.dc-pulse__risk-lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dc-pulse__risk--red   .dc-pulse__risk-val { color: var(--red-2); }
.dc-pulse__risk--amber .dc-pulse__risk-val { color: var(--amber-2); }

.dc-pulse__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}
.dc-pulse__util { display: inline-flex; align-items: center; gap: 8px; }
.dc-pulse__util-lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dc-pulse__util-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.dc-pulse__open {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--purple-2);
  background: transparent;
  padding: 2px 6px;
}
.dc-pulse__open:hover { color: var(--ink); }

.dc-pulse__status {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  border-left: 2px solid var(--line-strong);
}
.dc-pulse__status--green { background: var(--green-bg); border-left-color: var(--green); }
.dc-pulse__status--amber { background: var(--amber-bg); border-left-color: var(--amber); }
.dc-pulse__status--red   { background: var(--red-bg);   border-left-color: var(--red); }
.dc-pulse__status-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--ink);
}

/* ----- Two-col: Wave health + Variance ----- */
.td-two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.wave-health, .var-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.wave-health__head, .var-panel__head {
  margin-bottom: 12px;
}
.wave-health__title, .var-panel__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.wave-health__sub, .var-panel__sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.wave-health__strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.wh-wave {
  padding: 10px 8px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  display: flex; flex-direction: column; gap: 4px;
  border-top: 2px solid var(--line-strong);
}
.wh-wave--good  { border-top-color: var(--green); }
.wh-wave--mixed { border-top-color: var(--amber); }
.wh-wave--live  { border-top-color: var(--purple); background: var(--purple-bg); }
.wh-wave__bar { display: none; }
.wh-wave__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.wh-wave--live .wh-wave__label { color: var(--purple-2); }
.wh-wave__nums { display: flex; flex-direction: column; gap: 2px; }
.wh-wave__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex; align-items: baseline; gap: 3px;
  color: var(--ink);
}
.wh-wave__num .lbl {
  font-size: 8.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wh-wave__num--amber { color: var(--amber-2); }
.wh-wave__dur {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}
.wh-wave__live {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wh-wave__live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 3px rgba(90, 63, 184, 0.18);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

/* Variance panel */
.var-panel__list { display: flex; flex-direction: column; gap: 8px; }
.var-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--line-strong);
}
.var-row--good    { border-left-color: var(--green); }
.var-row--caution { border-left-color: var(--amber); }
.var-row--bad     { border-left-color: var(--red); }
.var-row__arrow {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--surface);
  color: var(--ink-3);
}
.var-row--good .var-row__arrow    { background: var(--green-bg); color: var(--green-2); }
.var-row--caution .var-row__arrow { background: var(--amber-bg); color: var(--amber-2); }
.var-row--bad .var-row__arrow     { background: var(--red-bg);   color: var(--red-2); }
.var-row__line1 {
  display: flex; justify-content: space-between; align-items: baseline;
}
.var-row__label { font-size: 12px; color: var(--ink); font-weight: 500; }
.var-row__nums { display: inline-flex; gap: 6px; align-items: baseline; }
.var-row__today {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.var-row__yest {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
}
.var-row__sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.4;
}

/* ----- On the clock table ----- */
.otc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.otc__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.otc__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.otc__sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.otc__table { display: flex; flex-direction: column; }
.otc__row {
  display: grid;
  grid-template-columns: 8px 90px 50px 1fr 1fr 100px 70px 100px 1.4fr 70px;
  gap: 10px;
  padding: 9px 14px;
  align-items: center;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.08s;
}
.otc__row:last-child { border-bottom: none; }
.otc__row:not(.otc__row--head):hover { background: var(--surface-2); }
.otc__row--head {
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  cursor: default;
}
.otc__row--head:hover { background: var(--surface); }
.otc__row--head .num { text-align: right; }
.otc__risk {
  width: 8px; height: 32px;
  border-radius: 2px;
}
.otc__risk--red   { background: var(--red); }
.otc__risk--amber { background: var(--amber); }
.otc__risk--green { background: var(--green); }

.otc__trip { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.otc__dc { font-family: var(--font-mono); font-size: 10px; color: var(--ink-2); letter-spacing: 0.04em; }
.otc__dest { font-size: 12px; color: var(--ink); font-weight: 500; }
.otc__cust { font-size: 11.5px; color: var(--ink-2); }
.otc__deadline { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.otc__hrs { text-align: right; }
.otc__hrs-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.otc__hrs-val--red { color: var(--red-2); }
.otc__hrs-val--amber { color: var(--amber-2); }
.otc__hrs-val--green { color: var(--green-2); }
.otc__note {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 11px; color: var(--ink-2); line-height: 1.4;
}
.otc__ai {
  width: 18px; height: 18px;
  background: var(--purple);
  color: white;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 9px;
  flex-shrink: 0;
}
.otc__open {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--purple-2);
  padding: 4px 8px;
  background: var(--purple-bg);
  border-radius: 3px;
}
.otc__open:hover { background: var(--purple-bg-2); }
.otc__empty {
  padding: 28px;
  text-align: center;
  color: var(--ink-3);
  font-style: italic;
  font-size: 12px;
}

/* ----- Agent stream ----- */
.stream {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stream__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.stream__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.stream__sub {
  font-size: 11.5px;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 6px;
}
.stream__live {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--purple-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stream__live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 3px rgba(90, 63, 184, 0.18);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.stream__list { display: flex; flex-direction: column; }
.stream-row {
  display: grid;
  grid-template-columns: 60px 38px 90px 110px 1fr 70px;
  gap: 10px;
  padding: 7px 16px;
  align-items: center;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line);
}
.stream-row:last-child { border-bottom: none; }
.stream-row__ts { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.stream-row__dc { font-family: var(--font-mono); font-size: 10px; color: var(--ink-2); }
.stream-row__trip { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.stream-row__kind {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-align: center;
}
.stream-row__text { color: var(--ink-2); }
.stream-row__$ {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--green-2);
  text-align: right;
}

/* Narrow viewport */
@media (max-width: 1400px) {
  .td-kpis    { grid-template-columns: repeat(3, 1fr); }
  .td-two-col { grid-template-columns: 1fr; }
  .td-dc-grid { grid-template-columns: 1fr !important; }
  .otc__row   { grid-template-columns: 8px 80px 40px 1fr 1fr 90px 60px 90px 1fr 60px; gap: 6px; font-size: 11px; }
  .stream-row { grid-template-columns: 50px 32px 80px 100px 1fr 60px; gap: 6px; }
}
