﻿:root {
  --ink: #17202a;
  --muted: #607080;
  --line: #d9e1e8;
  --surface: #ffffff;
  --page: #f4f7f9;
  --blue: #1769e0;
  --green: #17804d;
  --amber: #a45f00;
  --red: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, Segoe UI, system-ui, sans-serif;
}

.app-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 30px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.app-nav nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.ops-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.ops-header,
.ops-layout,
.data-grid,
.metric-grid {
  display: grid;
  gap: 16px;
}

.ops-header {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: 18px; }

.ops-actions {
  display: flex;
  gap: 12px;
}

.primary-action,
.icon-button {
  height: 42px;
  border: 0;
  font-weight: 900;
}

.primary-action {
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
}

.icon-button {
  width: 42px;
  background: #e7eef7;
  color: var(--blue);
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.metric,
.map-panel,
.side-panel,
.table-wrap,
.incident-list {
  background: var(--surface);
  border: 1px solid var(--line);
}

.metric {
  padding: 18px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 34px;
}

.metric.danger strong { color: var(--red); }

.ops-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  margin-top: 16px;
}

.map-panel,
.side-panel {
  min-height: 430px;
}

.map-toolbar {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.map-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.map-canvas {
  position: relative;
  height: 376px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(23, 105, 224, .08) 1px, transparent 1px),
    linear-gradient(rgba(23, 105, 224, .08) 1px, transparent 1px),
    #eaf1f5;
  background-size: 46px 46px;
}

.route-line {
  position: absolute;
  inset: 34% 18% 38% 22%;
  border-top: 4px solid rgba(23, 105, 224, .65);
  transform: rotate(-10deg);
}

.driver-pin {
  position: absolute;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(23, 32, 42, .2);
}

.side-panel {
  padding: 18px;
}

.driver-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.driver-row span {
  display: block;
  color: var(--muted);
}

.driver-row b {
  color: var(--green);
}

.data-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, .7fr);
  margin-top: 16px;
  align-items: start;
}

.table-wrap,
.incident-list {
  margin-top: 12px;
  overflow: hidden;
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: inline-block;
  padding: 4px 8px;
  font-weight: 900;
  color: var(--blue);
  background: #e7eef7;
}

.status.inprogress { color: var(--green); background: #e7f4ed; }
.status.completed { color: var(--green); background: #e7f4ed; }
.status.cancelled { color: var(--red); background: #fdebea; }

.incident {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.incident span {
  float: right;
  color: var(--amber);
  font-weight: 900;
}

.incident p {
  margin: 8px 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .ops-header,
  .ops-layout,
  .data-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .app-nav {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .app-nav nav {
    flex-wrap: wrap;
  }
}

.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #eef3f7 0%, #f8fbfd 48%, #e7eef7 100%); }
.login-shell { width: min(480px, calc(100% - 32px)); }
.login-panel { background: #fff; border: 1px solid var(--line); padding: 34px; box-shadow: 0 24px 60px rgba(23, 32, 42, .13); }
.login-panel form { display: grid; gap: 10px; margin-top: 18px; }
.login-panel input, .stack-form input, .stack-form select, .route-builder input, .route-builder select { height: 44px; border: 1px solid var(--line); padding: 0 12px; width: 100%; }
.secondary-action { height: 42px; border: 1px solid #b8c9da; background: #f7fbff; color: var(--blue); font-weight: 900; padding: 0 12px; cursor: pointer; }
.secondary-action:hover, .secondary-action.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.login-button { width: 100%; margin-top: 8px; }
.login-hint, .validation { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.logout-form { margin: 0; }
.logout-form button, .actions-cell button, .incident button { border: 1px solid var(--line); background: #fff; height: 34px; padding: 0 10px; font-weight: 700; }
.session-chip, .notice { background: #fff; border: 1px solid var(--line); padding: 10px 14px; font-weight: 700; }
.stack-form { display: grid; gap: 10px; margin-top: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-row:has(input:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workbench { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); padding: 18px; }
.route-builder { display: grid; gap: 14px; margin-top: 12px; }
.route-builder-controls { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto; gap: 10px; }
.route-builder-controls-wide { grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) minmax(180px, 1fr) auto auto; }
.pending-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; align-items: start; }
.pending-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: start; min-height: 112px; border: 1px solid var(--line); padding: 10px; background: #fff; }
.pending-card:hover { border-color: #b8c9da; background: #f7fbff; }
.pending-card input { grid-row: 1 / 5; margin-top: 3px; }
.pending-card span { color: var(--blue); font-size: 12px; font-weight: 900; }
.pending-card strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-card em { color: var(--muted); font-style: normal; font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pending-card small { color: var(--muted); font-size: 11px; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.actions-cell form { margin: 0; }

@media (max-width: 760px) {
  .route-builder-controls { grid-template-columns: 1fr; }
}

.panel-subtitle { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }


.scroll-box {
  overflow: auto;
  scrollbar-width: thin;
}

.pending-scroll {
  max-height: 340px;
  padding-right: 4px;
}

.routes-scroll {
  max-height: 360px;
}

.orders-scroll {
  max-height: 420px;
}

.incidents-scroll {
  max-height: 360px;
}

.table-wrap.scroll-box {
  overflow: auto;
}

.table-wrap.scroll-box thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

.ops-board {
  min-height: 430px;
  display: flex;
  flex-direction: column;
}

.ops-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.ops-lane {
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.ops-lane span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ops-lane strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.lane-live strong { color: var(--green); }
.lane-assigned strong { color: var(--blue); }
.lane-done strong { color: var(--muted); }

.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.route-focus {
  border: 1px solid var(--line);
  padding: 14px;
  background: #fff;
}

.route-focus-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.route-focus-head span,
.route-focus-metrics span,
.route-card span {
  color: var(--muted);
}

.progress-rail {
  height: 10px;
  margin: 16px 0 12px;
  background: #e8eef3;
}

.progress-rail span {
  display: block;
  height: 100%;
  background: var(--green);
}

.route-focus-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  font-size: 13px;
}

.driver-stack {
  max-height: 160px;
  border: 1px solid var(--line);
  background: #fff;
}

.driver-row.compact {
  padding: 10px 12px;
}

.route-cards {
  max-height: 150px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.route-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-card.inprogress { border-left-color: var(--green); }
.route-card.assigned { border-left-color: var(--blue); }
.route-card.completed { border-left-color: var(--muted); opacity: .82; }

@media (max-width: 760px) {
  .operations-grid,
  .ops-lanes,
  .route-focus-metrics {
    grid-template-columns: 1fr;
  }
}

.live-board {
  min-height: 610px;
}

.map-toolbar-live {
  height: auto;
  min-height: 58px;
  gap: 16px;
  align-items: center;
}

.map-toolbar-live > div:first-child {
  display: grid;
  gap: 2px;
}

.map-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.map-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.legend-dot.live { background: var(--green); }
.legend-dot.assigned { background: var(--blue); }
.legend-dot.depot { background: var(--ink); }
.legend-dot.driver { background: var(--amber); }

.live-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 492px;
}

.ops-map-wrap {
  position: relative;
  min-height: 492px;
  overflow: hidden;
  background: #eaf1f5;
}

.ops-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 492px;
}

.ops-map .leaflet-control-attribution {
  font-size: 10px;
}

.map-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.map-floating-card {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 450;
  width: min(340px, calc(100% - 32px));
  padding: 12px 14px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  box-shadow: 0 14px 26px rgba(23, 32, 42, .16);
}

.map-floating-card span,
.map-floating-card small {
  display: block;
  color: var(--muted);
}

.map-floating-card strong {
  display: block;
  margin: 2px 0;
  font-size: 30px;
}

.map-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fff;
}

.map-side-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.map-side-head.secondary {
  border-top: 1px solid var(--line);
}

.map-side-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-route-list {
  display: grid;
  gap: 8px;
  max-height: 250px;
  padding: 12px;
}

.map-route-button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  background: #fff;
  color: var(--ink);
}

.map-route-button:hover,
.map-route-button.active {
  background: #f7fbff;
  border-color: #b8c9da;
}

.map-route-button.active {
  box-shadow: inset 0 0 0 2px rgba(23, 105, 224, .12);
}

.map-route-button.inprogress { border-left-color: var(--green); }
.map-route-button.assigned { border-left-color: var(--blue); }
.map-route-button.completed { border-left-color: var(--muted); opacity: .86; }
.map-route-button.cancelled { border-left-color: var(--red); }

.map-route-button strong,
.map-route-button b,
.map-route-button small {
  display: block;
}

.map-route-button small {
  color: var(--muted);
  font-size: 12px;
}

.mini-progress {
  grid-column: 1 / 3;
  height: 5px;
  overflow: hidden;
  background: #e8eef3;
}

.mini-progress em {
  display: block;
  height: 100%;
  background: var(--green);
}

.map-driver-list {
  max-height: 188px;
  border: 0;
}

.driver-map-marker {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--amber);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 12px 22px rgba(23, 32, 42, .28);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  position: relative;
}

.driver-map-marker small {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #17202a;
  color: #fff;
  font-size: 10px;
}

.driver-map-marker.on-route {
  background: var(--green);
}

@media (max-width: 1180px) {
  .live-map-layout {
    grid-template-columns: 1fr;
  }

  .map-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .map-toolbar-live {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }

  .ops-map-wrap,
  .ops-map {
    min-height: 420px;
  }
}

.login-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--ink);
}

.login-brand img {
  width: 172px;
  height: 172px;
  object-fit: contain;
}

.map-empty-list {
  padding: 14px;
  border: 1px dashed var(--line);
  background: #f8fafc;
}

.map-empty-list strong,
.map-empty-list span {
  display: block;
}

.map-empty-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.geo-preset {
  color: var(--ink);
}

@media (max-width: 760px) {
  .route-builder-controls-wide {
    grid-template-columns: 1fr;
  }
}


.users-scroll {
  max-height: 280px;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.user-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.user-card strong,
.user-card span,
.user-card b,
.user-card small {
  display: block;
}

.user-card span,
.user-card small {
  color: var(--muted);
  font-size: 12px;
}

.location-paste {
  border-color: #b8c9da;
  background: #f7fbff;
}

.location-paste:focus {
  outline: 2px solid rgba(23, 105, 224, .22);
  border-color: var(--blue);
}




.geo-pick-button {
  width: 100%;
}

.ops-map.map-picking {
  cursor: crosshair;
}

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

.section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.deliveries-scroll {
  max-height: 330px;
}

.delivery-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding-right: 4px;
}

.delivery-evidence-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  background: #fff;
}

.delivery-evidence-card.warning {
  border-left-color: var(--amber);
  background: #fffaf2;
}

.delivery-evidence-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.delivery-evidence-head strong,
.delivery-evidence-head span,
.delivery-evidence-head b {
  display: block;
}

.delivery-evidence-head span,
.delivery-meta span,
.delivery-evidence-card p {
  color: var(--muted);
  font-size: 12px;
}

.delivery-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 13px;
}

.delivery-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-evidence-card p {
  min-height: 32px;
  margin: 0;
  line-height: 1.35;
}

.delivery-focus-button {
  height: 34px;
  border: 1px solid #b8c9da;
  background: #f7fbff;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.delivery-focus-button:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.empty-panel {
  padding: 14px;
  border: 1px dashed var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-weight: 900;
}

.alert-strip {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  max-height: 230px;
  margin-top: 12px;
  padding-right: 4px;
}

.alert-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  background: #fff;
}

.alert-card b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.alert-card strong,
.alert-card span,
.alert-card small {
  display: block;
}

.alert-card span,
.alert-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.alert-card.critical { border-left-color: var(--red); background: #fff6f5; }
.alert-card.high { border-left-color: var(--amber); background: #fffaf2; }
.alert-card.medium { border-left-color: var(--blue); }
.alert-card.calm { border-left-color: var(--green); }

.people-shell .workbench {
  margin-top: 0;
}

.people-metrics {
  margin-bottom: 16px;
}

.people-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.people-directory {
  min-width: 0;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.person-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  background: #fff;
}

.person-card.disabled,
.user-card.disabled {
  opacity: .68;
  border-left-color: var(--muted);
}

.person-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.person-main strong,
.person-main span,
.person-main small,
.person-meta span {
  display: block;
}

.person-main span,
.person-main small,
.person-meta span {
  color: var(--muted);
  font-size: 12px;
}

.person-main b {
  color: var(--green);
}

.person-meta {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.inline-form {
  display: flex;
  gap: 8px;
  margin: 0;
}

.inline-form select {
  min-width: 0;
  flex: 1;
  height: 36px;
  border: 1px solid var(--line);
  padding: 0 8px;
}

.inline-form button {
  min-height: 36px;
  border: 1px solid #b8c9da;
  background: #f7fbff;
  color: var(--blue);
  font-weight: 900;
  padding: 0 10px;
}

.people-actions {
  min-height: auto;
}

@media (max-width: 980px) {
  .people-layout {
    grid-template-columns: 1fr;
  }
}

.ops-dispatch-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
}

.history-shell .workbench {
  margin-top: 16px;
}

.history-deliveries {
  max-height: 430px;
}

.history-table {
  max-height: 460px;
}


.brand span {
  font-size: 20px;
  letter-spacing: 0;
}
.login-brand small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-panel h1 {
  text-align: center;
  font-size: 28px;
}

.login-panel label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-panel input:focus {
  outline: 3px solid rgba(23, 105, 224, .16);
  border-color: var(--blue);
}

.table-link {
  color: var(--blue);
  text-decoration: none;
}

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

.route-back {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.audit-list {
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.audit-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  background: #fff;
}

.audit-card span,
.audit-card small,
.audit-card p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.evidence-photo {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.evidence-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 10px;
  background: #e7eef7;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.evidence-open:hover {
  color: var(--ink);
  background: #dfe9f5;
}

.evidence-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.evidence-media-head strong {
  color: var(--ink);
  font-size: 12px;
}

.evidence-missing {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 10px;
  background: #f7fafc;
  color: var(--muted);
  border: 1px dashed var(--line);
  font-weight: 700;
}

.signature-image {
  width: 100%;
  height: 96px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.notification-center {
  position: relative;
}

.notification-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.notification-badge {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
}

.notification-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
  width: min(380px, 92vw);
  max-height: 520px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(23, 32, 42, .16);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.notification-head button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.notification-list {
  max-height: 440px;
  overflow-y: auto;
}

.notification-item {
  display: block;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.notification-item:hover {
  background: #f5f8fb;
}

.notification-item strong,
.notification-item span {
  display: block;
}

.notification-item small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.notification-item.is-unread {
  border-left: 4px solid var(--blue);
}

.notification-severity-critical,
.notification-severity-high {
  color: var(--red);
}

.notification-severity-medium {
  color: var(--amber);
}

.notification-severity-success {
  color: var(--green);
}

.notification-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.notification-toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.notification-toast {
  width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  background: #17202a;
  color: #fff;
  box-shadow: 0 16px 36px rgba(23, 32, 42, .22);
}

.notification-toast strong,
.notification-toast span {
  display: block;
}

.notification-toast span {
  margin-top: 4px;
  color: #dbe6ef;
}

@media (max-width: 760px) {
  .app-nav {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .app-nav nav {
    flex-wrap: wrap;
  }

  .notification-menu {
    left: 0;
    right: auto;
  }
}
.alert-ack-button {
  margin-top: 10px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  padding: 0 10px;
}

.alert-ack-button:disabled {
  opacity: .55;
}
.report-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.report-shell .workbench,
.route-report-shell .route-print-document {
  position: relative;
}

.report-brand,
.print-letterhead {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.report-brand img,
.print-letterhead img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.report-brand strong,
.print-letterhead strong {
  display: block;
  font-size: 28px;
}

.report-brand span,
.print-letterhead span,
.print-letterhead small {
  display: block;
  color: var(--muted);
}

.route-print-document {
  overflow: hidden;
  margin-top: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  background: #fff;
}

.print-watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: .045;
}

.print-watermark img {
  width: min(520px, 70%);
}

.report-summary-band {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.report-summary-band div {
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.report-summary-band span,
.report-summary-band strong {
  display: block;
}

.report-summary-band span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-summary-band strong {
  margin-top: 4px;
  font-size: 18px;
}

.report-section {
  position: relative;
  margin-top: 22px;
}

.print-table th,
.print-table td {
  padding: 10px 12px;
  font-size: 13px;
  vertical-align: top;
}

.print-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .report-summary-band,
  .report-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-nav,
  .no-print,
  .ops-header.no-print,
  .notification-toast-region {
    display: none !important;
  }

  main,
  .ops-shell,
  .route-report-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .route-print-document,
  .report-print-panel {
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  .scroll-box {
    max-height: none !important;
    overflow: visible !important;
  }

  .print-watermark {
    opacity: .06;
  }

  .report-summary-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .print-table th,
  .print-table td,
  th,
  td {
    border-color: #cfd8df;
  }
}

.compact-report {
  padding: 14px;
}

.report-metric-grid .metric {
  padding: 12px 14px;
}

.report-metric-grid .metric strong {
  font-size: 28px;
}

.report-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.compact-evidence {
  gap: 8px;
  padding: 10px;
}

.compact-list {
  gap: 8px;
}

.compact-print-document {
  padding: 22px;
}

.compact-letterhead {
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.compact-letterhead img {
  width: 58px;
  height: 58px;
}

.compact-letterhead strong {
  font-size: 24px;
}

.compact-summary-band {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.compact-summary-band div {
  padding: 9px 10px;
}

.compact-summary-band strong {
  font-size: 15px;
}

.compact-print-table th,
.compact-print-table td {
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.25;
}

.route-report-shell .report-section {
  margin-top: 16px;
}

.route-report-shell .report-section h2 {
  font-size: 15px;
  margin-bottom: 8px;
}

@page {
  size: letter;
  margin: 12mm;
}

@media print {
  .compact-print-document {
    padding: 0;
  }

  .compact-letterhead img {
    width: 52px;
    height: 52px;
  }

  .compact-summary-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .compact-summary-band div {
    padding: 6px 8px;
  }

  .compact-summary-band strong {
    font-size: 13px;
  }

  .compact-print-table th,
  .compact-print-table td {
    padding: 5px 6px;
    font-size: 10.5px;
  }

  .print-footer {
    font-size: 10px;
  }
}

.health-shell {
  max-width: 1400px;
}

.health-hero {
  display: grid;
  grid-template-columns: minmax(260px, .45fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.health-hero > div:first-child {
  display: grid;
  gap: 4px;
}

.health-hero span,
.health-hero small,
.health-card span,
.health-card p,
.health-incident span {
  color: var(--muted);
}

.health-hero strong {
  font-size: 42px;
}

.health-hero.healthy strong { color: var(--green); }
.health-hero.warning strong { color: var(--amber); }
.health-hero.critical strong { color: var(--red); }

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

.health-pulse-grid article,
.health-card,
.health-incident {
  border: 1px solid var(--line);
  background: #f8fafc;
}

.health-pulse-grid article {
  padding: 12px;
}

.health-pulse-grid b {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.health-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-left: 5px solid var(--muted);
}

.health-card.healthy,
.health-incident.healthy {
  border-left-color: var(--green);
}

.health-card.warning,
.health-incident.warning {
  border-left-color: var(--amber);
  background: #fffaf2;
}

.health-card.critical,
.health-incident.critical {
  border-left-color: var(--red);
  background: #fff6f5;
}

.health-card.neutral {
  border-left-color: var(--muted);
}

.health-card strong,
.health-card b,
.health-card span,
.health-card p {
  display: block;
}

.health-card strong {
  font-size: 22px;
}

.health-card b {
  width: fit-content;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
}

.health-card p {
  margin: 0;
  line-height: 1.35;
}

.health-incident-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.health-incident {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-left: 5px solid var(--muted);
}

.health-incident b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .health-hero,
  .health-pulse-grid {
    grid-template-columns: 1fr;
  }
}

.health-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.health-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 102px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
  background: #fff;
}

.health-action-card.warning { border-left-color: var(--amber); }
.health-action-card.critical { border-left-color: var(--red); }
.health-action-card.healthy { border-left-color: var(--green); }

.health-action-card span {
  display: block;
  font-weight: 800;
}

.health-action-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.health-action-card form {
  flex: 0 0 auto;
}

.health-control-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 16px;
  margin-top: 16px;
}

.health-mini-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.health-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
  background: #fff;
}

.health-mini-row.warning { border-left-color: var(--amber); background: #fffaf2; }
.health-mini-row.critical { border-left-color: var(--red); background: #fff6f5; }

.health-mini-row strong,
.health-mini-row span,
.health-mini-row small {
  display: block;
}

.health-mini-row span,
.health-mini-row small {
  color: var(--muted);
  line-height: 1.35;
}

.health-mini-row small {
  margin-top: 4px;
}

.health-incident {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.health-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.health-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

.health-table th,
.health-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

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

.health-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 1000px) {
  .health-control-layout,
  .health-action-card,
  .health-mini-row,
  .health-incident {
    grid-template-columns: 1fr;
  }

  .health-action-card,
  .health-mini-row {
    align-items: stretch;
  }
}

.settings-shell {
  max-width: 1180px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.settings-grid .workbench {
  display: grid;
  gap: 10px;
  align-content: start;
}

.settings-grid label {
  font-weight: 700;
  color: var(--ink);
}

.settings-grid input[type="number"],
.settings-grid input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.audit-timeline {
  position: relative;
}

.audit-timeline .audit-card {
  border-left: 4px solid var(--brand);
}

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

.security-shell {
  max-width: 1280px;
}

.security-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
  gap: 16px;
  margin-top: 18px;
}

@media (max-width: 1000px) {
  .security-layout {
    grid-template-columns: 1fr;
  }
}

.observability-shell {
  max-width: 1320px;
}

.observability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

@media (max-width: 1000px) {
  .observability-grid {
    grid-template-columns: 1fr;
  }
}

.driver-control-shell {
  max-width: 1380px;
}

.driver-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.driver-control-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
  background: #fff;
}

.driver-control-card.healthy { border-left-color: var(--green); }
.driver-control-card.warning { border-left-color: var(--amber); }
.driver-control-card.critical { border-left-color: var(--red); background: #fff8f7; }

.driver-control-head,
.driver-control-actions,
.driver-route-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.driver-control-head strong,
.driver-control-head span,
.driver-route-line span,
.driver-route-line strong,
.driver-route-line a {
  display: block;
}

.driver-control-head span,
.driver-route-line span,
.driver-control-kpis small {
  color: var(--muted);
}

.driver-control-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.driver-control-kpis > span {
  display: grid;
  gap: 2px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.driver-control-kpis strong {
  font-size: 18px;
}

.driver-control-actions {
  justify-content: flex-start;
}

.driver-control-actions form {
  margin: 0;
}

@media (max-width: 720px) {
  .driver-control-kpis {
    grid-template-columns: 1fr;
  }

  .driver-control-head,
  .driver-control-actions,
  .driver-route-line {
    align-items: stretch;
    flex-direction: column;
  }
}

.pilot-shell {
  max-width: 1380px;
}

.pilot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 16px;
  margin-top: 18px;
}

.pilot-check-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.pilot-phase-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.pilot-phase-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.pilot-phase-list b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
}

.pilot-phase-list strong,
.pilot-phase-list span {
  display: block;
}

.pilot-phase-list span {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 1000px) {
  .pilot-layout {
    grid-template-columns: 1fr;
  }
}
