﻿:root {
  --bpc-port-gore: #02042B;
  --bpc-muddy-waters: #D4AF37;
  --bpc-anzac: #F5C542;
  --bpc-silver-sand: #BBBDC0;
  --bpc-black: #000000;
  --bpc-white: #FFFFFF;
  --login-background: #02042B;
  --login-panel-raised: #0B1138;
  --login-card-surface: #121944;
  --login-border: #1E2A5A;
  --login-gold: #D4AF37;
  --login-gold-highlight: #F5C542;
  --login-text: #F7FAFC;
  --login-muted: #9AA6C4;
  --app-bg: #02042B;
  --app-surface-recessed: rgba(2, 4, 43, 0.74);
  --app-surface-raised: rgba(11, 17, 56, 0.9);
  --app-surface-card: rgba(18, 25, 68, 0.88);
  --app-border-subtle: rgba(30, 42, 90, 0.88);
  --app-border-accent: rgba(212, 175, 55, 0.24);
  --app-lighting-gold: rgba(212, 175, 55, 0.1);
  --app-lighting-navy: rgba(18, 25, 68, 0.46);
  --app-shadow-depth: 0 22px 58px rgba(0, 0, 0, 0.34);
  --theme-primary: #02042B;
  --theme-secondary: #D4AF37;
  --theme-accent: #F5C542;
  --theme-background: #02042B;
  --theme-surface: #000000;
  --theme-text: #FFFFFF;
  --muted-text: #BBBDC0;
  --danger: #F5C542;
  --success: #BBBDC0;
  --warning: #F5C542;
  --border: rgba(255, 255, 255, 0.11);
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.42);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --surface-raised: #02042B;
  --surface-muted: rgba(255, 255, 255, 0.055);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--theme-background);
  color: var(--theme-text);
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--theme-text);
  background: var(--theme-background);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--theme-text);
  background: rgba(255, 255, 255, 0.06);
}

button {
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
}

.link-command {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius-sm);
}

.primary-command {
  border-color: rgba(212, 175, 55, 0.65);
  color: #000000;
  background: linear-gradient(135deg, #F5C542, var(--theme-secondary));
  font-weight: 600;
}

.secondary-command {
  border-color: rgba(212, 175, 55, 0.24);
  color: var(--theme-text);
  background: rgba(2, 4, 43, 0.48);
  font-weight: 600;
}

.danger-command {
  border-color: rgba(255, 77, 109, 0.44);
  color: #FF4D6D;
  background: rgba(255, 77, 109, 0.08);
  font-weight: 600;
}

.page-header,
.command-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.page-header p,
.command-header p {
  max-width: 760px;
  margin: var(--space-2) 0 0;
  color: var(--muted-text);
}

.panel,
.metric-card,
.form-card,
.detail-card,
.placeholder-card {
  border-radius: var(--radius-md);
}

.panel {
  background: var(--surface-raised);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.panel-head {
  gap: var(--space-3);
}

.status-badge,
.priority-badge,
.chip,
.timer-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  white-space: nowrap;
}

.priority-badge {
  padding: 4px 10px;
  border: 1px solid rgba(245, 197, 66, 0.42);
  color: var(--warning);
  background: rgba(245, 197, 66, 0.1);
  font-size: 12px;
  font-weight: 600;
}

.priority-badge.critical,
.status-badge.critical {
  border-color: rgba(245, 197, 66, 0.42);
  color: var(--danger);
  background: rgba(245, 197, 66, 0.1);
}

.status-badge.status-ok {
  border-color: rgba(33, 199, 138, 0.42);
  color: #21C78A;
  background: rgba(33, 199, 138, 0.1);
}

.status-badge.status-warn {
  border-color: rgba(245, 197, 66, 0.42);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.1);
}

.priority-badge.low {
  border-color: rgba(187, 189, 192, 0.36);
  color: var(--muted-text);
  background: rgba(187, 189, 192, 0.08);
}

.data-table,
.table-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
}

.embedded-audit-panel,
.embedded-chat-panel {
  border-color: rgba(212, 175, 55, 0.22);
}

.audit-timeline-list li {
  position: relative;
  padding-left: 18px;
}

.audit-timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--theme-secondary);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.42);
}

.chat-placeholder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-md);
  background: rgba(212, 175, 55, 0.07);
}

.chat-placeholder p {
  margin: 4px 0 0;
  color: var(--muted-text);
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  color: #000000;
  background: var(--theme-secondary);
  font-weight: 700;
}

.incident-workspace {
  align-items: start;
}

.dash-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background:
    radial-gradient(ellipse at 46% 0%, var(--app-lighting-gold), transparent 0 28%, transparent 58%),
    radial-gradient(ellipse at 88% 14%, var(--app-lighting-navy), transparent 0 26%, transparent 50%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 22%, transparent 72%, rgba(0, 0, 0, 0.28)),
    var(--app-bg);
}

.dash-shell::before,
.dash-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.dash-shell::before {
  z-index: -2;
  opacity: 0.16;
  background:
    linear-gradient(rgba(154, 166, 196, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 166, 196, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 24% 34%, rgba(212, 175, 55, 0.12), transparent 0 1px, transparent 2px);
  background-size: 64px 64px, 64px 64px, 11px 11px;
  mask-image: linear-gradient(90deg, transparent 0, black 18%, black 84%, transparent 100%);
}

.dash-shell::after {
  z-index: -1;
  opacity: 0.72;
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(245, 197, 66, 0.028) 31%, transparent 32% 66%, rgba(212, 175, 55, 0.022) 67%, transparent 68%),
    radial-gradient(ellipse at center, transparent 0 58%, rgba(0, 0, 0, 0.42) 100%);
}

.side-rail {
  z-index: 1;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(11, 17, 56, 0.88), rgba(0, 0, 0, 0.92)),
    #000000;
  border-right: 1px solid var(--app-border-accent);
  box-shadow: 18px 0 46px rgba(0, 0, 0, 0.22);
}

.brand-lockup {
  display: grid;
  justify-items: center;
  min-height: 86px;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.brand-logo {
  display: block;
  width: min(224px, 100%);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  align-self: start;
}

.rail-product-lockup {
  position: absolute;
  right: 18px;
  bottom: 24px;
  left: 18px;
  display: grid;
  gap: 5px;
  justify-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.rail-product-lockup strong {
  display: block;
  color: var(--theme-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
}

.rail-product-lockup small {
  display: block;
  max-width: 190px;
  color: var(--theme-secondary);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-lockup small,
.rail-product-lockup small,
.eyebrow,
.metric-card span,
.metric-card small,
.dense-list span,
.dense-list em {
  color: var(--muted-text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 8px;
  color: var(--theme-secondary);
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.2), rgba(2, 4, 43, 0.82));
  font-weight: 700;
}

.brand-mark.large {
  width: 78px;
  height: 78px;
}

.rail-nav {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-bottom: 96px;
}

.rail-nav a {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #FFFFFF;
}

.rail-nav a:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.rail-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(187, 189, 192, 0.35);
  border-radius: 8px;
  background: rgba(187, 189, 192, 0.08);
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 18px var(--success);
}

.workbench {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, auto) minmax(220px, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
  padding: 2px 0 var(--space-2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.topbar-title {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
}

h2 {
  margin-bottom: 0;
  font-size: 16px;
}

.context-switch {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.context-switch span {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card,
.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(2, 4, 43, 0.94), rgba(0, 0, 0, 0.94));
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 128px;
  padding: 18px;
  display: grid;
  gap: 8px;
  overflow: hidden;
  position: relative;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 16px auto;
  width: 72px;
  height: 4px;
  background: var(--theme-accent);
  opacity: 0.65;
}

.metric-card.gold::after {
  background: var(--theme-secondary);
}

.metric-card.critical {
  border-color: rgba(245, 197, 66, 0.46);
}

.metric-card.critical::after {
  background: var(--danger);
}

.metric-card.timer-card {
  border-color: var(--border);
}

.metric-card.timer-card.timer-state-green {
  border-color: rgba(187, 189, 192, 0.42);
}

.metric-card.timer-card.timer-state-green::after {
  background: var(--success);
}

.metric-card.timer-card.timer-state-yellow {
  border-color: rgba(245, 197, 66, 0.48);
}

.metric-card.timer-card.timer-state-yellow::after {
  background: var(--warning);
}

.metric-card.timer-card.timer-state-red {
  border-color: rgba(245, 197, 66, 0.48);
}

.metric-card.timer-card.timer-state-red::after {
  background: var(--danger);
}

.metric-card strong {
  font-size: 22px;
  line-height: 1;
}

.command-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.9fr) minmax(280px, 0.72fr);
  gap: 14px;
  align-items: stretch;
}

.management-layout {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
}

.wide-panel {
  grid-row: span 2;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(245, 197, 66, 0.38);
  border-radius: 999px;
  color: #F5C542;
  background: rgba(245, 197, 66, 0.1);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.gold-chip {
  border-color: rgba(212, 175, 55, 0.48);
  color: #F5C542;
  background: rgba(212, 175, 55, 0.12);
}

.alert-chip {
  border-color: rgba(245, 197, 66, 0.45);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.12);
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  width: max-content;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dense-list em.timer-pill,
.metric-card small.timer-pill {
  color: inherit;
}

.timer-pill.timer-state-green {
  border-color: rgba(187, 189, 192, 0.48);
  color: #BBBDC0;
  background: rgba(187, 189, 192, 0.12);
}

.timer-pill.timer-state-yellow {
  border-color: rgba(245, 197, 66, 0.55);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.13);
}

.timer-pill.timer-state-red {
  border-color: rgba(245, 197, 66, 0.55);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.14);
}

.timer-pill.timer-state-neutral {
  color: var(--muted-text);
  background: rgba(255, 255, 255, 0.055);
}

.timer-detail {
  color: var(--muted-text);
}

.incident-feed,
.dense-list,
.timeline,
.kpi-stack {
  display: grid;
  gap: 10px;
}

.feed-row,
.dense-list li,
.timeline span,
.kpi-stack span {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.feed-row strong,
.dense-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-code {
  color: var(--theme-secondary);
  font-weight: 700;
}

.severity-critical {
  border-left: 4px solid var(--danger);
}

.severity-high {
  border-left: 4px solid var(--warning);
}

.severity-medium {
  border-left: 4px solid var(--theme-accent);
}

.map-visual {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(245, 197, 66, 0.22);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(rgba(245, 197, 66, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 197, 66, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 30% 40%, rgba(212, 175, 55, 0.22), transparent 18%),
    #000000;
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.live-map-panel {
  display: grid;
  gap: 14px;
}

.live-map-canvas {
  position: relative;
  width: 100%;
  min-height: 380px;
  overflow: hidden;
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-route-line {
  fill: none;
  stroke: var(--theme-accent);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(245, 197, 66, 0.72));
}

.map-marker {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.map-marker.site {
  border: 3px solid var(--theme-secondary);
  background: var(--theme-primary);
  box-shadow: 0 0 0 10px rgba(212, 175, 55, 0.12), 0 0 28px rgba(212, 175, 55, 0.85);
}

.map-marker.responder {
  --vehicle-color: #6ee7a8;
  --vehicle-glow: rgba(110, 231, 168, 0.72);
  --vehicle-aura: rgba(110, 231, 168, 0.12);
  width: 46px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.map-marker.responder.on-duty {
  --vehicle-color: #6ee7a8;
  --vehicle-glow: rgba(110, 231, 168, 0.72);
  --vehicle-aura: rgba(110, 231, 168, 0.12);
}

.map-marker.responder.offline {
  --vehicle-color: #8b93a7;
  --vehicle-glow: rgba(139, 147, 167, 0.55);
  --vehicle-aura: rgba(139, 147, 167, 0.1);
}

.map-marker.responder.busy {
  --vehicle-color: #ff4d6d;
  --vehicle-glow: rgba(255, 77, 109, 0.82);
  --vehicle-aura: rgba(255, 77, 109, 0.14);
  animation: liveResponderBusyPulse 0.85s ease-in-out infinite;
}

.map-marker.responder.busy-stale {
  --vehicle-color: #ff9f1c;
  --vehicle-glow: rgba(255, 159, 28, 0.64);
  --vehicle-aura: rgba(255, 159, 28, 0.12);
  animation: liveResponderBusyPulse 1.2s ease-in-out infinite;
}

.map-marker.responder.pending {
  --vehicle-color: #ba9653;
  --vehicle-glow: rgba(186, 150, 83, 0.62);
  --vehicle-aura: rgba(186, 150, 83, 0.12);
}

.map-marker.responder.blocked {
  --vehicle-color: #ff4d6d;
  --vehicle-glow: rgba(255, 77, 109, 0.58);
  --vehicle-aura: rgba(255, 77, 109, 0.1);
}

.responder-car-icon {
  display: block;
  width: 46px;
  height: 34px;
  overflow: visible;
  color: var(--vehicle-color);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.34)) drop-shadow(0 0 10px var(--vehicle-glow));
}

.responder-car-aura {
  fill: var(--vehicle-aura);
}

.responder-car-body {
  fill: currentColor;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.responder-car-window {
  fill: rgba(255, 255, 255, 0.82);
  stroke: rgba(2, 4, 43, 0.35);
  stroke-width: 0.5;
}

.responder-car-light {
  fill: #f8fafc;
}

.responder-car-light.rear {
  fill: rgba(255, 255, 255, 0.72);
}

.responder-car-bumper {
  fill: none;
  stroke: rgba(2, 4, 43, 0.72);
  stroke-linecap: round;
  stroke-width: 2;
}

.responder-car-wheel {
  fill: #050a12;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 1;
}

.responder-car-wheel-core {
  fill: rgba(255, 255, 255, 0.76);
}

@keyframes liveResponderBusyPulse {
  0%, 100% {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--vehicle-glow));
  }

  50% {
    opacity: 0.45;
    filter: drop-shadow(0 0 16px var(--vehicle-glow));
  }
}

.dash-google-overlay-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0;
  cursor: pointer;
}

.dash-google-overlay-marker.responder-vehicle {
  --vehicle-color: #6ee7a8;
  --vehicle-glow: rgba(110, 231, 168, 0.72);
  --vehicle-aura: rgba(110, 231, 168, 0.12);
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.dash-google-overlay-marker.responder-cluster {
  --cluster-color: #6ee7a8;
  color: #05071D;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.dash-google-overlay-marker.responder-cluster:hover,
.dash-google-overlay-marker.responder-cluster:focus-visible {
  transform: translate(-50%, -50%) scale(1.08) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42) !important;
  outline: none;
}

.dash-google-overlay-marker.responder-cluster.state-offline {
  color: #F7FAFC;
}

.responder-cluster-count {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.42), transparent 26%),
    currentColor;
  color: inherit;
}

.dash-google-overlay-marker.responder-cluster .responder-cluster-count {
  background: transparent;
}

.responder-map-popover {
  position: absolute;
  z-index: 60;
  width: min(320px, calc(100% - 24px));
  pointer-events: none;
}

.responder-map-popover[hidden] {
  display: none;
}

.responder-map-popover-card {
  --popover-accent: #6ee7a8;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(187, 189, 192, 0.18);
  border-left: 4px solid var(--popover-accent);
  border-radius: 8px;
  color: #F7FAFC;
  background: rgba(5, 7, 29, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.responder-map-popover-card.state-offline {
  --popover-accent: #8b93a7;
}

.responder-map-popover-card.state-busy {
  --popover-accent: #ff4d6d;
}

.responder-map-popover-card.state-busy-stale {
  --popover-accent: #ff9f1c;
}

.responder-map-popover-card.state-pending {
  --popover-accent: #ba9653;
}

.responder-map-popover-card.state-blocked {
  --popover-accent: #ff4d6d;
}

.responder-map-popover-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.responder-map-popover-card header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responder-map-popover-card header strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.responder-map-popover-card header span {
  flex: 0 0 auto;
  max-width: 46%;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--popover-accent) 42%, transparent);
  border-radius: 999px;
  color: var(--popover-accent);
  background: color-mix(in srgb, var(--popover-accent) 12%, transparent);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responder-map-popover-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.responder-map-popover-card dl div {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.responder-map-popover-card dt {
  color: rgba(187, 189, 192, 0.88);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.responder-map-popover-card dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #F7FAFC;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: right;
}

.responder-map-popover-footer {
  padding-top: 8px;
  border-top: 1px solid rgba(187, 189, 192, 0.14);
}

.responder-map-popover-action {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--theme-accent);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.responder-map-popover-action:hover {
  background: rgba(212, 175, 55, 0.22);
}

.responder-map-popover-note {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(187, 189, 192, 0.14);
  color: rgba(247, 250, 252, 0.78);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.map-marker small {
  position: absolute;
  top: 24px;
  left: 50%;
  width: max-content;
  max-width: 160px;
  padding: 4px 7px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: var(--theme-text);
  background: rgba(0, 0, 0, 0.88);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.map-marker.responder small {
  top: 35px;
  max-width: 220px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.map-empty-state {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
  padding: 12px 14px;
  border: 1px solid rgba(187, 189, 192, 0.22);
  border-radius: 10px;
  color: var(--muted-text);
  background: rgba(2, 4, 43, 0.84);
  font-weight: 700;
}

.map-fallback-note {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  max-width: min(420px, calc(100% - 24px));
  padding: 9px 11px;
  border: 1px solid rgba(245, 197, 66, 0.3);
  border-radius: 8px;
  color: #F7FAFC;
  background: rgba(2, 4, 43, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.map-provider-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 5px 8px;
  border: 1px solid rgba(245, 197, 66, 0.28);
  border-radius: 999px;
  color: #F5C542;
  background: rgba(0, 0, 0, 0.78);
  font-size: 11px;
  font-weight: 600;
}

.tracking-card-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.tracking-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.attention-item-warn strong {
  color: #F5A542;
}

.attention-item-warn em {
  color: #F5A542 !important;
}

.tracking-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(245, 197, 66, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.tracking-card > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(30, 42, 90, 0.62);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.34);
}

.tracking-card span,
.tracking-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted-text);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-card strong {
  display: block;
  min-width: 0;
  margin: 4px 0;
  overflow: hidden;
  color: var(--theme-text);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  white-space: normal;
}

.tracking-card > div:nth-child(2) strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tracking-card .tracking-responder-cell strong,
.responder-name-cell,
.responder-name-text,
.dispatch-active-responder strong,
.assigned-responder-card .dispatch-operator-card-head strong,
.report-table .responder-name-cell,
.responder-grid .responder-name-cell,
.device-grid .responder-name-cell {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.responder-name-cell {
  display: block;
  min-width: 0;
  line-height: 1.25;
}

.responder-name-cell small {
  display: block;
  margin-top: 3px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tracking-card small {
  overflow-wrap: anywhere;
}

.tracking-card div:nth-child(2) small,
.tracking-card div:nth-child(5) small,
.tracking-card div:nth-child(6) small {
  white-space: normal;
}

.site-pin,
.route-node {
  position: absolute;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.site-pin {
  width: 18px;
  height: 18px;
  border: 3px solid var(--theme-secondary);
  background: var(--theme-primary);
  box-shadow: 0 0 0 10px rgba(212, 175, 55, 0.12), 0 0 28px rgba(212, 175, 55, 0.9);
}

.pin-a {
  top: 30%;
  left: 34%;
}

.pin-b {
  top: 66%;
  left: 72%;
}

.responder-trail {
  position: absolute;
  top: 33%;
  left: 35%;
  width: 42%;
  height: 34%;
  border-bottom: 2px solid var(--theme-accent);
  border-right: 2px solid var(--theme-accent);
  border-radius: 0 0 90px 0;
  opacity: 0.85;
}

.route-node {
  width: 11px;
  height: 11px;
  background: var(--theme-accent);
  box-shadow: 0 0 18px var(--theme-accent);
}

.node-a {
  top: 41%;
  left: 48%;
}

.node-b {
  top: 54%;
  left: 62%;
}

.node-c {
  top: 66%;
  left: 72%;
}

.dense-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.dense-list li {
  grid-template-columns: 76px minmax(0, 1fr) auto;
}

.dense-list em {
  font-style: normal;
  justify-self: end;
}

.timeline span,
.kpi-stack span {
  grid-template-columns: 1fr;
}

.operations-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
  gap: 14px;
  margin-top: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.form-grid select,
.form-grid input {
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.toolbar-band {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.table-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr 0.8fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.integration-grid {
  grid-template-columns: 1.2fr 0.6fr 0.6fr 0.9fr;
}

.table-grid > * {
  min-height: 48px;
  padding: 12px;
  background: rgba(9, 14, 29, 0.92);
}

.brand-sample {
  display: grid;
  gap: 12px;
  place-items: start;
}

@media (max-width: 1180px) {
  .ops-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-layout,
  .management-layout,
  .organisation-users-layout,
  .operations-strip {
    grid-template-columns: 1fr;
  }

  .organisation-user-card,
  .organisation-user-card-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dash-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
    height: auto;
  }

  .rail-status {
    position: static;
    margin-top: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .organisation-user-card,
  .organisation-role-form,
  .organisation-user-reset-form {
    grid-template-columns: 1fr;
  }

  .builder-question-head {
    flex-direction: column;
  }

  .builder-question-controls {
    grid-template-columns: 1fr;
  }

  .checklist-version-strip {
    justify-content: flex-start;
  }

  .feed-row,
  .dense-list li,
  .tracking-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .table-grid,
  .integration-grid {
    grid-template-columns: 1fr;
  }
}

textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--theme-text);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.login-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(250px, 0.78fr) minmax(560px, 720px) minmax(250px, 0.78fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(22px, 3vw, 54px);
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 4vw, 54px) clamp(28px, 4vw, 64px) 26px;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(212, 175, 55, 0.12), transparent 0 22%, transparent 44%),
    radial-gradient(ellipse at 10% 48%, rgba(245, 197, 66, 0.1), transparent 0 16%, transparent 34%),
    radial-gradient(ellipse at 92% 54%, rgba(212, 175, 55, 0.08), transparent 0 18%, transparent 40%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 22%, transparent 68%, rgba(0, 0, 0, 0.48)),
    var(--login-background);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.login-shell::before {
  z-index: -2;
  opacity: 0.28;
  background:
    linear-gradient(rgba(154, 166, 196, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 166, 196, 0.055) 1px, transparent 1px),
    linear-gradient(115deg, transparent 0 30%, rgba(212, 175, 55, 0.04) 48%, transparent 66%);
  background-size: 58px 58px, 58px 58px, auto;
  mask-image: linear-gradient(90deg, transparent 0, black 14%, black 86%, transparent 100%);
}

.login-shell::after {
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(245, 197, 66, 0.04) 19%, transparent 20% 58%, rgba(245, 197, 66, 0.032) 59%, transparent 60%),
    radial-gradient(ellipse at center, transparent 0 45%, rgba(0, 0, 0, 0.48) 100%);
  opacity: 0.84;
}

.login-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.map-region {
  position: absolute;
  opacity: 0.34;
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.2));
  background-image: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0 1px, transparent 1.4px);
  background-size: 10px 10px;
  clip-path: polygon(6% 35%, 24% 12%, 48% 16%, 64% 34%, 84% 32%, 94% 52%, 80% 74%, 56% 82%, 35% 72%, 18% 80%, 7% 62%);
}

.map-region-americas {
  left: 11%;
  top: 18%;
  width: 30vw;
  height: 42vh;
}

.map-region-europe {
  right: 27%;
  top: 19%;
  width: 18vw;
  height: 26vh;
  clip-path: polygon(10% 42%, 28% 24%, 46% 26%, 60% 14%, 84% 28%, 76% 50%, 92% 68%, 64% 84%, 44% 70%, 22% 78%);
}

.map-region-asia {
  right: 5%;
  top: 18%;
  width: 32vw;
  height: 54vh;
  clip-path: polygon(3% 28%, 24% 10%, 48% 16%, 70% 9%, 94% 32%, 86% 54%, 96% 73%, 70% 88%, 44% 78%, 24% 88%, 12% 66%);
}

.route-line {
  position: absolute;
  height: 1px;
  transform-origin: left;
  opacity: 0.38;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.58), transparent);
}

.route-line::after {
  content: "";
  position: absolute;
  right: 24%;
  top: -4px;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(245, 197, 66, 0.72);
  border-radius: 999px;
  background: rgba(2, 4, 43, 0.92);
  box-shadow: 0 0 18px rgba(245, 197, 66, 0.36);
}

.route-line-left {
  left: 10%;
  top: 52%;
  width: 22vw;
  transform: rotate(34deg);
}

.route-line-right {
  right: 8%;
  top: 58%;
  width: 25vw;
  transform: rotate(-42deg);
}

.login-panel {
  position: relative;
  grid-column: 2;
  width: min(720px, 100%);
  max-height: calc(100vh - 82px);
  overflow: auto;
  justify-self: center;
  padding: clamp(42px, 4.3vw, 62px);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.78), rgba(11, 17, 56, 0.96)),
    var(--login-panel-raised);
  box-shadow:
    0 42px 110px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(30, 42, 90, 0.72),
    0 0 56px rgba(212, 175, 55, 0.12);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(245, 197, 66, 0.82), transparent) top / 78% 1px no-repeat,
    radial-gradient(ellipse at 50% 0, rgba(245, 197, 66, 0.16), transparent 0 24%, transparent 52%);
}

.login-brand {
  position: relative;
  justify-content: center;
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom-color: rgba(212, 175, 55, 0.24);
}

.login-brand-logo {
  width: clamp(300px, 30vw, 400px);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.32));
}

.login-brand-divider {
  display: block;
  width: 1px;
  height: 48px;
  background: rgba(212, 175, 55, 0.42);
}

.login-title-group .login-platform-title {
  display: block;
  margin-top: -4px;
  color: var(--login-gold);
  font-size: clamp(17px, 1.25vw, 22px);
  font-weight: 700;
}

.login-brand-copy strong {
  color: var(--login-text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-brand-copy small {
  color: var(--login-muted);
  font-size: 14px;
  font-weight: 600;
}

.login-title-group {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-bottom: 8px;
  text-align: center;
}

.login-title-group h1 {
  color: var(--login-text);
  font-size: clamp(34px, 3.1vw, 46px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.login-title-rule {
  display: block;
  width: 58px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--login-gold-highlight), transparent);
}

.login-title-group p {
  max-width: 440px;
  margin: 0;
  color: var(--login-muted);
  font-size: 15px;
  line-height: 1.5;
}

.login-panel .stack-form {
  gap: 20px;
}

.login-panel .stack-form label {
  gap: 9px;
  color: var(--login-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.login-input-shell {
  position: relative;
  display: block;
}

.login-panel .stack-form input {
  min-height: 62px;
  padding: 0 58px 0 20px;
  border-color: rgba(30, 42, 90, 0.96);
  border-radius: 10px;
  color: var(--login-text);
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.72), rgba(2, 4, 43, 0.86)),
    var(--login-card-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 18px rgba(0, 0, 0, 0.16);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.login-input-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  display: block;
  width: 22px;
  height: 22px;
  overflow: hidden;
  color: transparent;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-input-icon-user::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid var(--login-gold-highlight);
  border-radius: 999px 999px 4px 4px;
  opacity: 0.9;
}

.login-input-icon-user::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 1px;
  width: 6px;
  height: 6px;
  border: 2px solid var(--login-gold-highlight);
  border-radius: 999px;
  background: var(--login-card-surface);
}

.login-input-icon-lock::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 2px;
  height: 13px;
  border: 2px solid var(--login-gold-highlight);
  border-radius: 3px;
}

.login-input-icon-lock::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  width: 8px;
  height: 10px;
  border: 2px solid var(--login-gold-highlight);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.login-panel .stack-form input[data-password-input] {
  padding-right: 104px;
}

.login-password-toggle {
  position: absolute;
  right: 54px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--login-gold-highlight);
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  background: rgba(212, 175, 55, 0.12);
  outline: none;
}

.login-eye-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 999px 999px / 700px 700px 700px 700px;
}

.login-eye-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.login-password-toggle[aria-pressed="true"] .login-eye-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 2px;
  height: 22px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.login-panel .stack-form input:focus {
  border-color: rgba(245, 197, 66, 0.76);
  box-shadow:
    0 0 0 3px rgba(212, 175, 55, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 26px rgba(0, 0, 0, 0.22);
}

.login-panel .stack-form input:-webkit-autofill,
.login-panel .stack-form input:-webkit-autofill:hover,
.login-panel .stack-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--login-text);
  caret-color: var(--login-text);
  box-shadow: 0 0 0 1000px var(--login-card-surface) inset, 0 0 0 3px rgba(212, 175, 55, 0.12);
  transition: background-color 9999s ease-in-out 0s;
}

.login-panel .primary-command {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 14px;
  border: 1px solid rgba(245, 197, 66, 0.5);
  border-radius: 10px;
  color: #070819;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 46%),
    linear-gradient(135deg, var(--login-gold-highlight), var(--login-gold));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 15px 30px rgba(0, 0, 0, 0.3),
    0 8px 22px rgba(212, 175, 55, 0.14);
  font-size: 19px;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.login-panel .primary-command:hover,
.login-panel .primary-command:focus-visible {
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 17px 34px rgba(0, 0, 0, 0.34),
    0 9px 24px rgba(245, 197, 66, 0.18);
}

.login-panel .primary-command:active {
  transform: translateY(1px);
}

.login-panel .alert {
  margin-bottom: 0;
  border-color: rgba(245, 197, 66, 0.44);
  color: var(--login-gold-highlight);
  background: rgba(245, 197, 66, 0.1);
}

.login-security-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 12px;
  padding-top: 26px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--login-muted);
}

.login-security-note > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--login-gold-highlight);
  border-radius: 14px 14px 18px 18px;
  color: transparent;
}

.login-security-note > span::before {
  content: "";
  width: 13px;
  height: 22px;
  border-right: 3px solid var(--login-gold-highlight);
  border-bottom: 3px solid var(--login-gold-highlight);
  transform: rotate(42deg) translate(-2px, -2px);
}

.login-security-note p {
  margin: 0;
}

.login-security-note strong,
.login-security-note small {
  display: block;
}

.login-security-note strong {
  color: var(--login-text);
  font-size: 15px;
}

.login-security-note small {
  margin-top: 4px;
  color: var(--login-muted);
  font-size: 13px;
}

.login-context {
  position: relative;
  display: grid;
  gap: 24px;
  align-self: stretch;
  align-content: center;
  min-width: 0;
  color: var(--login-muted);
}

.login-context-left {
  grid-column: 1;
}

.login-context-right {
  grid-column: 3;
  align-content: start;
  padding-top: clamp(18px, 5vh, 64px);
}

.login-context-heading {
  display: grid;
  gap: 7px;
  padding-left: 18px;
  border-left: 2px solid var(--login-gold-highlight);
  text-transform: uppercase;
}

.login-context-heading strong,
.login-system-card > strong,
.login-live-feed > strong,
.login-threat-card strong {
  color: var(--login-gold-highlight);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-context-heading span {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.login-stat-card,
.login-system-card,
.login-threat-card,
.login-live-feed {
  border: 1px solid rgba(30, 42, 90, 0.9);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.login-stat-card {
  display: grid;
  gap: 5px;
  width: min(210px, 100%);
  padding: 18px 20px;
}

.login-stat-card span,
.login-threat-card span {
  color: var(--login-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-stat-card strong {
  color: var(--login-gold-highlight);
  font-size: 26px;
  line-height: 1;
}

.login-stat-card small {
  color: var(--login-gold);
}

.login-system-card {
  display: grid;
  gap: 0;
  width: min(360px, 100%);
  margin-top: auto;
  padding: 16px 20px 18px;
}

.login-system-card-right {
  justify-self: end;
  margin-top: 0;
  margin-bottom: auto;
}

.login-system-card > strong,
.login-live-feed > strong {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

.login-system-card span,
.login-live-feed span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid rgba(154, 166, 196, 0.12);
}

.login-system-card span:last-child,
.login-live-feed span:last-child {
  border-bottom: 0;
}

.login-system-card small,
.login-live-feed small,
.login-live-feed time {
  color: var(--login-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.login-system-card em {
  color: #6FDA75;
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
}

.login-system-card em::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-radius: 999px;
  background: #6FDA75;
  box-shadow: 0 0 12px rgba(111, 218, 117, 0.45);
}

.login-threat-card {
  justify-self: end;
  display: grid;
  gap: 9px;
  width: min(190px, 100%);
  padding: 18px 20px;
}

.login-threat-card i {
  display: block;
  width: 108px;
  height: 12px;
  background:
    linear-gradient(90deg, var(--login-gold-highlight) 0 12px, transparent 12px 18px, var(--login-gold) 18px 30px, transparent 30px 36px, var(--login-gold) 36px 48px, transparent 48px 54px, rgba(154, 166, 196, 0.18) 54px 66px, transparent 66px 72px, rgba(154, 166, 196, 0.16) 72px 84px, transparent 84px 90px, rgba(154, 166, 196, 0.14) 90px 102px);
}

.login-live-feed {
  justify-self: end;
  width: min(390px, 100%);
  margin-top: auto;
  padding: 16px 20px 18px;
}

.login-live-feed span {
  grid-template-columns: 52px minmax(0, 1fr);
}

.login-live-feed small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
}

.login-footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  padding-top: 22px;
  border-top: 1px solid rgba(154, 166, 196, 0.14);
  color: var(--login-muted);
  font-size: 13px;
}

.login-footer span:first-child {
  color: var(--login-gold);
  text-transform: uppercase;
}

.login-footer span:last-child {
  justify-self: end;
}

.login-footer strong {
  color: #FF4D6D;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .login-context {
    display: none;
  }

  .login-panel {
    grid-column: 1;
  }
}

@media (max-width: 680px) {
  .login-shell {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  .login-panel {
    max-height: none;
    transform: none;
    padding: 24px;
    border-radius: 16px;
  }

  .login-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 26px;
    padding-bottom: 22px;
  }

  .login-brand-logo {
    width: min(340px, 100%);
  }

  .login-brand-divider {
    display: none;
  }

  .login-title-group h1 {
    font-size: 24px;
  }

  .login-panel .stack-form input,
  .login-panel .primary-command {
    min-height: 52px;
  }

  .login-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    font-size: 12px;
  }

  .login-footer span:last-child {
    justify-self: start;
  }
}

.user-strip {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.user-strip span,
.user-strip a {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.topbar-organisation {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 8px;
  min-width: 0;
}

.organisation-badge,
.global-organisation-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 999px;
  background: rgba(11, 17, 56, 0.82);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.global-organisation-selector {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  border-radius: 8px;
  padding: 7px 10px;
}

.global-organisation-selector strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.organisation-badge.muted {
  color: var(--muted);
  border-color: rgba(187, 189, 192, 0.22);
}

.global-organisation-selector.muted {
  border-color: rgba(187, 189, 192, 0.22);
}

.global-organisation-selector span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.global-organisation-selector select {
  width: min(340px, 34vw);
  min-height: 28px;
  padding: 3px 30px 3px 8px;
  border: 0;
  background-color: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.command-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 999px;
  color: #F5C542;
  background: rgba(212, 175, 55, 0.12);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.alert,
.notice,
.empty-state {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 197, 66, 0.45);
  border-radius: 8px;
  color: #F5C542;
  background: rgba(245, 197, 66, 0.12);
}

.notice,
.empty-state {
  border-color: rgba(245, 197, 66, 0.35);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.1);
}

.muted-text {
  color: var(--muted-text);
}

.dispatch-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dispatch-summary-strip {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: var(--space-3);
}

.dispatch-incidents-panel,
.dispatch-offers-panel {
  align-self: start;
}

.dispatch-map-panel {
  margin-bottom: var(--space-3);
}

.dispatch-map-panel .live-map-canvas {
  min-height: clamp(380px, 48vh, 620px);
}

.dispatch-map-panel .tracking-card-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dispatch-map-panel .tracking-card {
  min-width: 0;
}

.dispatch-incident-card {
  gap: 12px;
  padding: 14px;
  border-color: rgba(30, 42, 90, 0.88);
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.62), rgba(2, 4, 43, 0.78)),
    var(--app-surface-recessed);
}

.dispatch-row > a {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.dispatch-incident-link strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-incident-link time {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.candidate-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted-text);
  font-size: 0.82rem;
}

.candidate-strip-label {
  min-width: 112px;
  color: var(--theme-text);
  font-weight: 700;
}

.candidate-chip {
  display: inline-grid;
  grid-template-columns: auto auto auto auto;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(212, 175, 55, 0.07);
}

.candidate-chip em,
.candidate-chip small {
  color: var(--muted-text);
  font-style: normal;
}

.muted-candidate {
  opacity: 0.62;
}

.dispatch-escalation-strip {
  padding-top: 2px;
}

.escalation-chip {
  grid-template-columns: minmax(130px, auto) auto minmax(180px, 1fr);
  border-color: rgba(255, 77, 109, 0.28);
  background: rgba(255, 77, 109, 0.08);
}

.device-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.device-status-ready {
  color: #6ee7a8;
  border-color: rgba(110, 231, 168, 0.28);
  background: rgba(110, 231, 168, 0.08);
}

.device-status-blocked {
  color: #ffb4c2;
  border-color: rgba(255, 77, 109, 0.28);
  background: rgba(255, 77, 109, 0.08);
}

.inline-dispatch-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.78fr) minmax(180px, 1fr) minmax(92px, 0.34fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-dispatch-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
}

.inline-dispatch-form select,
.inline-dispatch-form input {
  min-height: 40px;
  width: 100%;
  min-width: 0;
  padding: 0 10px;
}

.inline-dispatch-form button {
  min-width: 112px;
}

.dispatch-cancel-form {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.incident-cancel-form {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 var(--space-4);
}

.mini-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  align-items: end;
}

.mini-form input,
.mini-form select {
  min-width: 0;
}

.dispatch-offer-list {
  gap: 10px;
}

.dispatch-offer-list.dispatch-offer-list {
  display: grid;
}

.dispatch-offer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border-color: rgba(30, 42, 90, 0.88);
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.58), rgba(2, 4, 43, 0.78)),
    var(--app-surface-recessed);
}

.dispatch-offer-head {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dispatch-offer-head span {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
}

.dispatch-offer-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-device-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.dispatch-device-line span {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dispatch-device-line strong {
  min-width: 0;
  overflow: hidden;
  color: var(--theme-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-device-line-ready {
  border-color: rgba(110, 231, 168, 0.22);
}

.dispatch-device-line-warning {
  border-color: rgba(255, 159, 28, 0.28);
  background: rgba(255, 159, 28, 0.06);
}

.dispatch-offer-actions {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.dispatch-offer-actions form {
  min-width: 0;
}

.dispatch-reject-form,
.dispatch-reassign-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.dispatch-offer-actions input,
.dispatch-offer-actions select {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
}

.client-viewer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: var(--space-4);
  align-items: stretch;
  margin-bottom: var(--space-4);
  padding: 22px;
  border: 1px solid rgba(245, 197, 66, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 25, 68, 0.84), rgba(2, 4, 43, 0.94)),
    var(--app-surface);
}

.client-viewer-hero h2 {
  margin: 0 0 8px;
}

.client-viewer-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-text);
}

.client-delay-panel {
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 16px;
  border: 1px solid rgba(245, 197, 66, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.client-delay-panel span,
.client-rule-list span,
.client-outcome-card span {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.client-delay-panel strong {
  color: var(--theme-secondary);
  font-size: 20px;
}

.client-filter-grid,
.client-viewer-metrics {
  margin-bottom: var(--space-4);
}

.client-viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
  gap: var(--space-4);
  align-items: start;
}

.client-outcome-list {
  display: grid;
  gap: 10px;
}

.client-outcome-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(130px, 0.5fr) minmax(180px, 0.75fr) minmax(110px, 0.35fr);
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(30, 42, 90, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.client-outcome-card div,
.client-rule-list div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.client-outcome-card strong,
.client-rule-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-outcome-card small,
.client-rule-list small,
.client-delay-panel small {
  color: var(--muted-text);
}

.client-rule-list {
  display: grid;
  gap: 10px;
}

.client-rule-list div {
  padding: 12px;
  border: 1px solid rgba(187, 189, 192, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.stack-form,
.form-card {
  display: grid;
  gap: 14px;
}

.form-card {
  margin-top: 14px;
}

.stack-form label,
.inline-field {
  display: grid;
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.stack-form input,
.stack-form select {
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.span-2 {
  grid-column: span 2;
}

.grow-field {
  min-width: min(520px, 100%);
}

.manual-site-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  flex: 1 1 min(920px, 100%);
}

.manual-site-search-input input {
  min-height: 48px;
  width: 100%;
  padding: 0 13px;
}

.manual-site-search-button {
  min-height: 48px;
  align-self: end;
}

.site-search-results {
  position: absolute;
  z-index: 12;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 320px;
  overflow: auto;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(11, 17, 56, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.site-search-results.open {
  display: grid;
}

.site-search-result {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(180px, 1fr) minmax(130px, 0.58fr) minmax(150px, 0.66fr);
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  color: var(--theme-text);
  background: transparent;
  text-align: left;
}

.site-search-result:hover,
.site-search-result:focus {
  background: rgba(212, 175, 55, 0.12);
  outline: none;
}

.site-search-result span,
.site-search-result small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-search-result span {
  color: var(--theme-text);
  font-weight: 700;
}

.site-search-result small {
  color: var(--muted-text);
  font-size: 11px;
}

.site-search-empty {
  padding: 14px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

select option {
  color: var(--theme-text);
  background: #0B1138;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.manual-create-action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-top: 14px;
}

.manual-create-action > .primary-command {
  align-self: flex-end;
}

.responder-picker-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.responder-picker-head h3 {
  margin: 0;
  font-size: 1rem;
}

.dash-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 43, 0.62);
  backdrop-filter: blur(2px);
  animation: dashConfirmFade 0.12s ease-out;
}

@keyframes dashConfirmFade { from { opacity: 0; } to { opacity: 1; } }

.dash-confirm {
  width: min(440px, calc(100vw - 40px));
  background: linear-gradient(180deg, #0e1430, #02042B);
  border: 1px solid var(--accent, #BA9653);
  border-radius: 12px;
  padding: 22px 24px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  color: #f3f4fb;
}

.dash-confirm-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--accent, #BA9653);
}

.dash-confirm-body {
  margin: 0 0 20px;
  line-height: 1.5;
  font-size: 0.95rem;
  color: #d6d9ea;
}

.dash-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dash-confirm-actions .secondary-command,
.dash-confirm-actions .primary-command {
  padding: 8px 16px;
}

.reassign-queue {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.92rem;
  border: 1px solid var(--border, #d8dbe6);
  border-radius: 8px;
  overflow: hidden;
}

.reassign-queue thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9aa3c0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.reassign-queue tbody td {
  padding: 12px;
  border-top: 1px solid var(--border, #d8dbe6);
  vertical-align: top;
}

.reassign-queue tbody td small {
  color: #8b93ad;
}

.reassign-queue tbody td:last-child {
  text-align: right;
  white-space: nowrap;
}

.reassign-queue .primary-command {
  display: inline-block;
  padding: 6px 14px;
  text-decoration: none;
}

.responder-picker-map {
  width: 100%;
  height: 320px;
  border-radius: 10px;
  overflow: hidden;
  margin: 4px 0 12px;
  border: 1px solid var(--border, #d8dbe6);
  background: #0e1430;
  display: flex;
  align-items: center;
  justify-content: center;
}

.responder-picker-map-fallback {
  color: #9aa3c0;
  font-size: 0.9rem;
}

.responder-hidden-note {
  display: block;
  margin-top: 8px;
  color: #6b7280;
}

.responder-suggestion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.responder-pin-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563EB;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  flex: 0 0 auto;
}

.responder-suggestion.chosen > label {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.35);
}

.responder-suggestion.chosen .responder-pin-index {
  background: #16a34a;
}

.responder-eta {
  font-variant-numeric: tabular-nums;
  color: #374151;
}

.responder-suggestion > label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border, #d8dbe6);
  border-radius: 8px;
  cursor: pointer;
}

.responder-suggestion.selectable > label:hover {
  border-color: var(--accent, #BA9653);
}

.responder-suggestion.disabled > label {
  cursor: not-allowed;
  opacity: 0.55;
}

.responder-suggestion-name {
  font-weight: 600;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.responder-suggestion-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.responder-distance {
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
}

.responder-status.ok {
  color: #1a7f37;
}

.responder-status.warn {
  color: #9a6700;
}

.assigned-chip {
  background: var(--accent, #BA9653);
  color: #fff;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

.eligibility-band,
.manual-site-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(187, 189, 192, 0.42);
  border-radius: 8px;
  background: rgba(187, 189, 192, 0.1);
}

.eligibility-band.blocked,
.manual-site-summary.blocked {
  border-color: rgba(245, 197, 66, 0.45);
  background: rgba(245, 197, 66, 0.12);
}

.eligibility-band span,
.eligibility-band small,
.manual-site-summary span,
.manual-site-summary small,
.detail-card span,
.detail-card small {
  display: block;
  color: var(--muted-text);
}

.manual-site-summary strong {
  display: block;
  overflow-wrap: anywhere;
}

.responder-grid {
  grid-template-columns: minmax(190px, 1.2fr) minmax(160px, 0.95fr) minmax(100px, 0.65fr) minmax(120px, 0.75fr) minmax(180px, 1fr) minmax(220px, 1.2fr);
}

.device-grid {
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 0.85fr) minmax(130px, 0.75fr) minmax(170px, 1fr) minmax(160px, 0.9fr) minmax(260px, 1.25fr);
}

.row-actions,
.action-list li {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.row-actions form,
.action-list form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.mobile-access-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.mobile-access-stack small {
  display: block;
  max-width: 100%;
  color: var(--muted-text);
  overflow-wrap: anywhere;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(154, 166, 196, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.availability-available {
  border-color: rgba(33, 199, 138, 0.42);
  color: #21C78A;
  background: rgba(33, 199, 138, 0.08);
}

.availability-unavailable {
  border-color: rgba(255, 77, 109, 0.42);
  color: #FF4D6D;
  background: rgba(255, 77, 109, 0.08);
}

.availability-neutral {
  border-color: rgba(245, 197, 66, 0.4);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.08);
}

.detail-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr) minmax(280px, 0.7fr);
}

.dispatch-layout,
.integration-test-layout {
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
}

.detail-card {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.event-timeline span {
  gap: 7px;
}

.event-timeline em {
  color: var(--muted-text);
  font-style: normal;
}

.evidence-grid {
  display: grid;
  gap: 12px;
}

.evidence-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 12px;
  align-items: stretch;
  border: 1px solid rgba(212, 175, 55, 0.26);
  background: rgba(0, 0, 0, 0.78);
  border-radius: 8px;
  padding: 10px;
}

.evidence-thumb,
.evidence-download {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(187, 189, 192, 0.22);
  border-radius: 6px;
  background: #02042B;
  color: var(--theme-secondary);
  text-decoration: none;
}

.evidence-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.evidence-meta span,
.evidence-meta small {
  color: var(--muted-text);
}

.evidence-meta strong {
  color: var(--theme-text);
  overflow-wrap: anywhere;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
}

.report-filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.report-filter-grid input,
.report-filter-grid select {
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.report-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.audit-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.audit-report-summary .metric-card {
  min-height: 112px;
}

.audit-filter-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  align-items: end;
  background:
    linear-gradient(180deg, rgba(11, 17, 56, 0.92), rgba(2, 4, 43, 0.94)),
    var(--panel);
}

.audit-quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.audit-quick-filters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(187, 189, 192, 0.2);
  border-radius: 999px;
  color: var(--muted-text);
  background: rgba(11, 17, 56, 0.82);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.audit-quick-filters a.active,
.audit-quick-filters a:hover {
  border-color: rgba(212, 175, 55, 0.68);
  color: var(--theme-text);
  background: rgba(212, 175, 55, 0.14);
}

.audit-event-list {
  display: grid;
  gap: 10px;
}

.audit-event-card {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(260px, 2fr) minmax(150px, 0.7fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(30, 42, 90, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.72), rgba(10, 16, 48, 0.78)),
    var(--surface);
}

.audit-event-card.audit-event-grouped {
  border-color: rgba(212, 175, 55, 0.46);
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.1), rgba(10, 16, 48, 0.82)),
    var(--surface);
}

.audit-event-time,
.audit-event-main,
.audit-event-badges,
.audit-event-details dl {
  min-width: 0;
}

.audit-event-time {
  display: grid;
  gap: 4px;
}

.audit-event-time span,
.audit-event-main strong {
  color: var(--theme-text);
  font-weight: 700;
}

.audit-event-time small,
.audit-event-main span,
.audit-event-main small,
.audit-event-details {
  color: var(--muted-text);
}

.audit-event-main {
  display: grid;
  gap: 6px;
}

.audit-event-main > div {
  display: grid;
  gap: 3px;
}

.audit-event-main strong,
.audit-event-main span,
.audit-event-main small {
  overflow-wrap: anywhere;
}

.audit-event-badges {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.gold-chip {
  border-color: rgba(212, 175, 55, 0.56);
  color: var(--theme-secondary);
  background: rgba(212, 175, 55, 0.12);
}

.audit-event-details {
  grid-column: 2 / -1;
  border-top: 1px solid rgba(187, 189, 192, 0.1);
  padding-top: 8px;
}

.audit-event-details summary {
  cursor: pointer;
  color: var(--theme-secondary);
  font-weight: 700;
}

.audit-event-details dl {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 6px 12px;
  margin: 10px 0 0;
}

.audit-event-details dt {
  color: var(--muted-text);
  font-weight: 700;
}

.audit-event-details dd {
  margin: 0;
  color: var(--theme-text);
  overflow-wrap: anywhere;
}

.integration-health-filter {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.integration-health-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 820px) {
  .integration-health-hero {
    grid-template-columns: 1fr;
  }
}

.integration-health-overview,
.service-health-panel {
  min-height: 100%;
}

.integration-health-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.integration-health-summary > div,
.service-health-list > span,
.integration-diagnostic-row,
.integration-notice {
  border: 1px solid rgba(30, 42, 90, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.72), rgba(10, 16, 48, 0.82)),
    var(--surface);
}

.integration-health-summary > div {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
}

.integration-health-summary span,
.service-health-list > span,
.integration-diagnostic-row span,
.integration-diagnostic-row em,
.integration-health-details summary small,
.integration-notice {
  color: var(--muted-text);
}

.integration-health-summary strong {
  color: var(--theme-text);
  font-size: clamp(32px, 3vw, 48px);
  line-height: 1;
}

.integration-health-summary small {
  color: var(--muted-text);
  line-height: 1.35;
}

.service-health-list {
  display: grid;
  gap: 10px;
}

.service-health-list > span {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.service-health-list strong {
  color: var(--theme-text);
}

.service-health-list small {
  overflow-wrap: anywhere;
}

.service-health-list .health-ok {
  border-color: rgba(33, 199, 138, 0.36);
}

.service-health-list .health-warning {
  border-color: rgba(255, 77, 109, 0.5);
}

.integration-health-cards {
  margin-bottom: 16px;
}

.integration-diagnostics-grid,
.integration-operational-grid {
  margin-bottom: 16px;
}

.integration-diagnostic-list {
  display: grid;
  gap: 10px;
}

.integration-diagnostic-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1.6fr) minmax(90px, 0.4fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
}

.integration-diagnostic-row .chip {
  margin-top: 4px;
  justify-self: start;
  grid-column: 1;
}

.integration-diagnostic-row.grouped {
  border-color: rgba(212, 175, 55, 0.46);
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.1), rgba(10, 16, 48, 0.84)),
    var(--surface);
}

.integration-diagnostic-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.integration-diagnostic-row strong,
.integration-diagnostic-row p {
  color: var(--theme-text);
}

.integration-diagnostic-row p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.integration-diagnostic-row em {
  font-style: normal;
  white-space: nowrap;
}

.integration-notice {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-color: rgba(212, 175, 55, 0.44);
  color: var(--theme-secondary);
  font-weight: 600;
}

.integration-health-details {
  margin-top: 16px;
}

.integration-health-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.integration-health-details > summary::-webkit-details-marker {
  display: none;
}

.integration-health-details > summary span {
  color: var(--theme-text);
  font-size: 18px;
  font-weight: 700;
}

.integration-health-details > summary small {
  text-align: right;
}

.integration-health-details[open] > summary {
  margin-bottom: 14px;
}

.integration-readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.integration-readiness-card {
  min-height: 0;
}

.nested-panel {
  background: rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

.report-chart-empty {
  grid-column: 1 / -1;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-schedule-details {
  margin-top: 16px;
}

.report-schedule-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.report-schedule-details > summary::-webkit-details-marker {
  display: none;
}

.report-schedule-details > summary span {
  color: var(--theme-text);
  font-size: 18px;
  font-weight: 700;
}

.report-schedule-details > summary small {
  color: var(--muted-text);
  text-align: right;
}

.report-schedule-details[open] > summary {
  margin-bottom: 14px;
}

.schedule-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.schedule-form label,
.checkbox-field {
  display: grid;
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.schedule-form input,
.schedule-form select {
  min-height: 42px;
  padding: 0 12px;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.schedule-grid {
  grid-template-columns: 1.25fr 0.9fr 0.75fr 0.85fr 0.85fr 0.6fr;
}

.inline-form {
  display: inline-flex;
}

.compact-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.table-wrap,
.compact-table-wrap,
.panel,
.report-table,
.placeholder-grid,
.placeholder-card {
  min-width: 0;
}

.compact-table-wrap table {
  min-width: 100%;
  width: max-content;
  max-width: none;
}

.table-inline-form {
  display: grid;
  grid-template-columns: minmax(78px, 0.45fr) minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 330px;
}

.table-inline-form input {
  min-height: 34px;
  padding: 6px 9px;
}

.table-action-form {
  display: inline-flex;
  margin: 0;
}

.muted-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mini-form.inline-form {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.mini-form.inline-form label {
  flex: 1 1 220px;
  min-width: 0;
  overflow: hidden;
}

.mini-form.inline-form .check-row {
  flex: 0 1 auto;
}

.mini-form.inline-form input,
.mini-form.inline-form select {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.organisation-user-workspace {
  display: grid;
  gap: 14px;
}

.organisation-user-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.organisation-user-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(154, 166, 196, 0.2);
  border-radius: 999px;
  color: var(--muted-text);
  background: rgba(154, 166, 196, 0.06);
  font-weight: 700;
}

.organisation-user-tabs button.active {
  border-color: rgba(245, 197, 66, 0.44);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.11);
}

.organisation-user-tab-panel {
  min-width: 0;
}

.organisation-user-list-panel {
  min-width: 0;
}

.organisation-user-filter-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.organisation-user-filter-form .check-row {
  margin: 0;
}

.organisation-user-search-field {
  display: inline-grid;
  gap: 4px;
  min-width: 240px;
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
}

.organisation-user-directory {
  display: grid;
  gap: 12px;
}

.organisation-user-directory.compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.organisation-user-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(154, 166, 196, 0.16);
  border-radius: 8px;
  background: rgba(10, 16, 48, 0.62);
}

.organisation-user-card.compact {
  align-content: start;
}

.organisation-user-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.organisation-user-card-links {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
}

.organisation-user-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.organisation-user-identity strong {
  color: var(--theme-text);
  overflow-wrap: anywhere;
}

.organisation-user-identity small {
  color: var(--muted-text);
  overflow-wrap: anywhere;
}

.field-label {
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.muted-chip {
  color: var(--muted-text);
  border-color: rgba(154, 166, 196, 0.2);
  background: rgba(154, 166, 196, 0.07);
}

.organisation-user-card-actions {
  min-width: 0;
}

.organisation-user-action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, max-content));
  gap: 8px;
  align-items: start;
}

.organisation-user-inline-action {
  display: inline-flex;
  width: 172px;
  max-width: 100%;
}

.organisation-user-edit-panel,
.organisation-user-reset-panel {
  min-width: 0;
  width: 172px;
  max-width: 100%;
}

.organisation-user-edit-panel summary,
.organisation-user-reset-panel summary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(154, 166, 196, 0.18);
  border-radius: var(--radius-sm);
  color: var(--theme-text);
  background: rgba(154, 166, 196, 0.07);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}

.organisation-user-action-row button,
.organisation-user-action-row summary {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
}

.organisation-user-edit-panel summary::marker,
.organisation-user-reset-panel summary::marker {
  content: "";
}

.organisation-user-edit-panel summary::-webkit-details-marker,
.organisation-user-reset-panel summary::-webkit-details-marker {
  display: none;
}

.organisation-user-inline-action button {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  line-height: 1.15;
  text-align: center;
}

.organisation-user-edit-form,
.organisation-user-create-form,
.organisation-user-reset-form {
  display: grid;
  gap: 12px;
}

.organisation-user-edit-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(154, 166, 196, 0.14);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: end;
}

.organisation-user-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  align-items: end;
}

.organisation-user-create-grid [data-role-link-field][hidden],
.organisation-user-edit-form [data-role-link-field][hidden] {
  display: none !important;
}

.responder-panel-head {
  align-items: end;
}

.responder-search-form {
  display: inline-flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.responder-search-form label {
  display: grid;
  gap: 4px;
  min-width: 260px;
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
}

.fm-office-link-field {
  min-width: min(100%, 260px);
}

.fm-office-search-input {
  width: 100%;
  min-width: 0;
  text-transform: none;
}

.fm-office-search-status {
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
}

.fm-office-table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
  min-width: min(100%, 520px);
}

.fm-office-table-filter {
  display: grid;
  gap: 4px;
  flex: 1 1 310px;
  min-width: min(100%, 260px);
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.fm-office-table-filter input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  text-transform: none;
}

.fm-office-table-empty {
  margin-top: 12px;
}

.organisation-user-create-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.organisation-user-edit-form label,
.organisation-user-create-form label,
.organisation-user-reset-form label {
  display: grid;
  gap: 6px;
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.organisation-user-edit-form input,
.organisation-user-edit-form select,
.organisation-user-create-form input,
.organisation-user-create-form select,
.organisation-user-reset-form input {
  min-width: 0;
  min-height: 38px;
}

.organisation-user-edit-form button,
.organisation-user-reset-form button {
  min-height: 38px;
}

.organisation-user-reset-form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(154, 166, 196, 0.14);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.34);
  grid-template-columns: minmax(180px, 260px) auto;
  align-items: end;
}

.organisation-msl-grid {
  align-items: center;
}

.organisation-msl-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.organisation-msl-grid small {
  display: block;
  margin-top: 3px;
  color: var(--muted-text);
}

.organisation-linked-user-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.organisation-linked-user {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  min-width: 160px;
  padding: 7px 9px;
  border: 1px solid rgba(87, 220, 143, 0.28);
  border-radius: 8px;
  background: rgba(87, 220, 143, 0.08);
  color: var(--text);
  line-height: 1.2;
}

.organisation-linked-user strong,
.organisation-linked-user small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.organisation-linked-user small {
  color: var(--muted-text);
  font-size: 11px;
}

.organisation-linked-user.is-inactive {
  border-color: rgba(154, 166, 196, 0.24);
  background: rgba(154, 166, 196, 0.08);
}

.organisation-msl-responder-grid {
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.9fr) minmax(140px, 0.7fr) minmax(180px, 0.9fr);
}

.organisation-msl-provider-grid {
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr) minmax(90px, 0.4fr);
}

.organisation-msl-vendor-grid {
  grid-template-columns: minmax(260px, 1.1fr) minmax(120px, 0.45fr) minmax(220px, 1fr);
}

.protected-role-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(154, 166, 196, 0.18);
  border-radius: 999px;
  color: var(--muted-text);
  background: rgba(154, 166, 196, 0.07);
  font-size: 12px;
  font-weight: 600;
}

a[href^="/Incident/"] {
  display: block;
  width: max-content;
  max-width: 320px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.access-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: min(620px, 100%);
}

.access-chip {
  display: grid;
  flex: 1 1 min(360px, 100%);
  max-width: min(520px, 100%);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 8px;
  background: rgba(11, 17, 56, 0.62);
}

.access-chip strong {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.access-chip em {
  color: var(--muted);
  font-style: normal;
  justify-self: end;
  white-space: nowrap;
}

.access-chip-actions,
.summary-strip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.access-chip-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.access-chip form {
  display: inline-flex;
  margin: 0;
}

.access-chip button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.admin-organisation-access-list li {
  grid-template-columns: minmax(96px, 0.35fr) minmax(0, 1fr);
  align-items: start;
}

.admin-organisation-access-list li strong {
  white-space: normal;
  line-height: 1.25;
}

.admin-organisation-access-list li em {
  grid-column: 1 / -1;
  justify-self: start;
  white-space: normal;
}

.admin-assignment-form label {
  flex: 1 1 min(320px, 100%);
}

.admin-assignment-form select {
  min-width: min(320px, 100%);
}

.admin-assignment-form .check-row {
  flex: 0 0 auto;
}

.summary-strip {
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.admin-page-header {
  align-items: center;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
}

.admin-page-header h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 2.6vw, 42px);
}

.admin-page-header p {
  color: var(--muted-text);
}

.admin-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.admin-main-stack,
.admin-side-stack {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}

.admin-side-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.admin-panel {
  padding: clamp(22px, 1.8vw, 30px);
}

.admin-panel .panel-head {
  align-items: flex-start;
}

.admin-panel .panel-head h2 {
  font-size: 17px;
}

.admin-access-details,
.admin-section-details {
  display: block;
}

.admin-access-details > summary,
.admin-section-details > summary {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.admin-access-details > summary::-webkit-details-marker,
.admin-section-details > summary::-webkit-details-marker {
  display: none;
}

.admin-access-details > summary span,
.admin-section-details > summary span {
  color: var(--theme-text);
  font-size: 17px;
  font-weight: 700;
}

.admin-access-details > summary small,
.admin-section-details > summary small {
  color: var(--muted-text);
  font-weight: 600;
}

.admin-access-details > summary::after,
.admin-section-details > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 8px;
  color: var(--theme-secondary);
  font-weight: 700;
}

.admin-access-details[open] > summary::after,
.admin-section-details[open] > summary::after {
  content: "-";
}

.admin-section-details > summary {
  margin-bottom: 0;
}

.admin-section-details[open] > summary {
  margin-bottom: var(--space-4);
}

.admin-access-filter-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin: 0 0 var(--space-4);
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.28);
}

.admin-access-filter-form label {
  display: grid;
  flex: 1 1 min(420px, 100%);
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.admin-access-filter-form select {
  min-height: 42px;
  width: 100%;
}

.admin-create-organisation-form,
.admin-assignment-form {
  padding: 16px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.28);
  margin-bottom: 18px;
}

.admin-create-organisation-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(260px, 1fr) auto;
  gap: 14px;
}

.admin-assignment-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
}

.admin-create-organisation-form button,
.admin-assignment-form button {
  min-height: 42px;
  border-color: rgba(212, 175, 55, 0.45);
  color: #000000;
  background: linear-gradient(135deg, #F5C542, var(--theme-secondary));
  font-weight: 700;
}

.admin-panel .compact-table-wrap {
  border: 1px solid rgba(154, 166, 196, 0.12);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.24);
}

.admin-panel table {
  border-collapse: separate;
  border-spacing: 0;
}

.admin-panel th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0B1138;
}

.admin-panel td {
  vertical-align: top;
}

.admin-panel th,
.admin-panel td {
  text-align: left;
}

.admin-panel th:not(:first-child),
.admin-panel td:not(:first-child) {
  text-align: center;
}

.admin-panel td:first-child .table-inline-form {
  text-align: left;
}

.admin-panel td:first-child .table-inline-form input {
  text-align: left;
}

.admin-panel .table-action-form {
  justify-content: center;
}

.admin-panel td small {
  color: var(--muted-text);
  overflow-wrap: anywhere;
}

.admin-section-intro {
  max-width: 920px;
  margin: -4px 0 14px;
  color: var(--muted-text);
  font-size: 14px;
  line-height: 1.45;
}

.admin-access-table {
  min-width: 980px;
}

.admin-access-table th,
.admin-access-table td {
  text-align: left;
}

.admin-access-table th:nth-child(4),
.admin-access-table td:nth-child(4),
.admin-access-table th:nth-child(5),
.admin-access-table td:nth-child(5) {
  text-align: center;
}

.admin-access-table td:nth-child(1) {
  min-width: 250px;
}

.admin-access-table td:nth-child(2) {
  min-width: 180px;
  color: var(--muted-text);
}

.admin-access-table td:nth-child(3) {
  min-width: 180px;
}

.admin-access-actions {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-access-actions form {
  display: inline-flex;
  margin: 0;
}

.admin-access-actions button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.admin-access-manager {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.admin-access-create-card,
.admin-multi-org-card,
.admin-access-card {
  min-width: 0;
  border: 1px solid rgba(154, 166, 196, 0.13);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.34);
}

.admin-access-create-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-user-create-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.28);
}

.admin-user-search-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.28);
}

.admin-user-search-form label {
  display: grid;
  flex: 1 1 min(420px, 100%);
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.admin-user-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: var(--space-3);
}

.admin-user-management-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(154, 166, 196, 0.13);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.34);
}

.admin-user-management-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-user-management-card header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-management-card strong {
  color: var(--theme-text);
  overflow-wrap: anywhere;
}

.admin-user-management-card small {
  color: var(--muted-text);
  overflow-wrap: anywhere;
}

.admin-user-management-meta {
  display: grid;
  gap: 6px;
  color: var(--muted-text);
  font-size: 12px;
}

.admin-user-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(154, 166, 196, 0.12);
}

.admin-user-edit-form label,
.admin-user-password-form label {
  display: grid;
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.admin-user-edit-form input,
.admin-user-edit-form select,
.admin-user-password-form input,
.admin-user-search-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.admin-user-edit-form .check-row {
  display: flex;
  align-items: center;
}

.admin-user-edit-form .check-row input {
  width: 18px;
  min-height: 18px;
}

.admin-user-edit-form button {
  min-height: 38px;
  border-color: rgba(212, 175, 55, 0.45);
  color: #000000;
  background: linear-gradient(135deg, #F5C542, var(--theme-secondary));
  font-weight: 700;
}

.admin-user-management-actions {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(154, 166, 196, 0.12);
}

.admin-user-management-actions form {
  margin: 0;
}

.admin-user-password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-user-password-form button {
  min-height: 38px;
  border-color: rgba(212, 175, 55, 0.45);
  color: #000000;
  background: linear-gradient(135deg, #F5C542, var(--theme-secondary));
  font-weight: 700;
}

.admin-access-create-card > strong,
.admin-multi-org-card strong {
  color: var(--theme-text);
  font-size: 15px;
  font-weight: 700;
}

.admin-user-create-card label,
.admin-access-create-card label {
  display: grid;
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.admin-user-create-card input,
.admin-user-create-card select,
.admin-access-create-card input,
.admin-access-create-card select {
  min-height: 42px;
  width: 100%;
  min-width: 0;
}

.admin-user-create-card .check-row,
.admin-access-create-card .check-row {
  display: flex;
  align-items: center;
}

.admin-user-create-card .check-row input,
.admin-access-create-card .check-row input {
  width: 18px;
  min-height: 18px;
}

.admin-user-create-card button,
.admin-access-create-card button,
.admin-access-card-actions button {
  min-height: 38px;
  border-color: rgba(212, 175, 55, 0.45);
  color: #000000;
  background: linear-gradient(135deg, #F5C542, var(--theme-secondary));
  font-weight: 700;
}

.admin-multi-org-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-multi-org-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted-text);
}

.admin-multi-org-card ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.admin-multi-org-card li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 8px;
  background: rgba(11, 17, 56, 0.58);
}

.admin-multi-org-card li span {
  color: var(--theme-text);
  font-weight: 700;
}

.admin-multi-org-card li em {
  color: var(--theme-secondary);
  font-style: normal;
}

.admin-access-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: var(--space-3);
}

.admin-access-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(170px, 0.7fr);
  gap: 14px;
  padding: 16px;
}

.admin-access-card-user,
.admin-access-card-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-access-card-user span,
.admin-access-card-meta span {
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-access-card-user strong,
.admin-access-card-meta strong {
  min-width: 0;
  color: var(--theme-text);
  overflow-wrap: anywhere;
}

.admin-access-card-user small,
.admin-access-card-meta em {
  color: var(--muted-text);
  font-style: normal;
  overflow-wrap: anywhere;
}

.admin-access-card-status,
.admin-access-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-access-card-actions {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid rgba(154, 166, 196, 0.12);
}

.admin-access-card-actions form {
  display: inline-flex;
  margin: 0;
}

.admin-side-stack .admin-organisation-access-list li {
  min-height: 58px;
}

.admin-multi-org-list li {
  grid-template-columns: minmax(90px, 0.35fr) minmax(0, 1fr);
  align-items: start;
}

.admin-multi-org-list li strong {
  white-space: normal;
}

.admin-multi-org-list li em {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--theme-secondary);
  white-space: normal;
}

@media (max-width: 1180px) {
  .admin-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-side-stack,
  .admin-access-manager,
  .admin-user-create-card,
  .admin-create-organisation-form,
  .admin-assignment-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .admin-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-page-header {
    align-items: flex-start;
  }

  .admin-access-card-grid,
  .admin-access-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .audit-report-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .audit-event-details dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

.report-grid,
.split-panels {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.report-grid,
.split-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bar-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) minmax(120px, 1fr) 52px;
  gap: 10px;
  align-items: center;
  color: var(--muted-text);
}

.bar-row span,
.bar-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row strong {
  justify-self: end;
  color: var(--theme-text);
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--theme-secondary), var(--theme-accent));
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chart-series {
  display: grid;
  gap: 8px;
}

.spark-bars {
  display: flex;
  height: 150px;
  align-items: end;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(245, 197, 66, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
}

.spark-bars span {
  position: relative;
  flex: 1;
  min-width: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--theme-accent), var(--theme-secondary));
}

.spark-bars span em {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--theme-text);
  white-space: nowrap;
  pointer-events: none;
}

.spark-labels {
  display: flex;
  gap: 6px;
  padding: 4px 12px 0;
}

.spark-labels span {
  flex: 1;
  min-width: 8px;
  font-size: 10px;
  color: var(--muted-text);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-chart-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-chart-columns h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.placeholder-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
}

.placeholder-card span,
.placeholder-card small,
.placeholder-card li,
.placeholder-card p {
  color: var(--muted-text);
}

.placeholder-card p,
.placeholder-card ul {
  margin: 0;
}

.placeholder-card ul {
  padding-left: 18px;
}

.report-table {
  margin-top: 10px;
  overflow-x: auto;
}

.report-table > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.placeholder-card,
.placeholder-card li,
.placeholder-card p,
.placeholder-card small,
.placeholder-card strong,
.table-grid > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.report-table-incidents {
  grid-template-columns: 1.1fr 0.9fr 0.7fr 0.85fr 0.8fr 1fr 1fr 1fr 0.55fr 0.55fr 0.9fr;
}

.report-table-dispatch,
.report-table-responder {
  grid-template-columns: 1fr 1fr 0.75fr 0.75fr 0.9fr;
}

.report-table-alarms {
  grid-template-columns: 0.9fr 0.9fr 0.9fr 0.7fr 0.75fr;
}

.report-table-push {
  grid-template-columns: 0.9fr 0.55fr 0.7fr 1.4fr 0.75fr;
}

.report-table-push > *:nth-child(5n+4) {
  font-size: 11px;
  overflow-wrap: anywhere;
  word-break: break-all;
  color: var(--muted-text);
}

.report-table-audit {
  grid-template-columns: 0.9fr 0.85fr 1.1fr 0.9fr 0.75fr 1.15fr 0.7fr;
}

.report-table-msl {
  grid-template-columns: 1fr 0.75fr 0.55fr 0.65fr 0.65fr 0.9fr;
}

.report-table-occurrence {
  grid-template-columns: 1fr 0.75fr 1.1fr 0.9fr;
}

.report-empty-summary,
.historic-empty-panel {
  margin-top: 14px;
}

.report-actions a.secondary-command,
.compact-link-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  white-space: nowrap;
}

.compact-link-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.historic-review-panels {
  align-items: start;
}

.table-scroll-wrapper {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}

.table-scroll-wrapper > .table-grid > strong {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #08102e;
}

.historic-case-table,
.historic-dispatch-table,
.historic-evidence-table {
  width: 100%;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.historic-case-table {
  grid-template-columns:
    minmax(245px, 1fr)
    minmax(135px, 0.7fr)
    minmax(190px, 0.95fr)
    minmax(220px, 1fr)
    minmax(135px, 0.7fr)
    minmax(185px, 0.9fr)
    minmax(110px, 0.55fr)
    minmax(150px, 0.75fr)
    minmax(135px, 0.7fr);
}

.historic-dispatch-table {
  grid-template-columns:
    minmax(245px, 1fr)
    minmax(220px, 1fr)
    minmax(140px, 0.75fr)
    minmax(130px, 0.7fr)
    minmax(175px, 0.95fr)
    minmax(135px, 0.75fr);
}

.historic-evidence-table {
  grid-template-columns:
    minmax(245px, 1fr)
    minmax(280px, 1.35fr)
    minmax(175px, 0.95fr)
    minmax(175px, 0.95fr)
    minmax(125px, 0.65fr);
}

.historic-case-table > *,
.historic-dispatch-table > *,
.historic-evidence-table > * {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.historic-case-table > *:has(.compact-link-button),
.historic-dispatch-table > *:has(.compact-link-button),
.historic-evidence-table > *:has(.compact-link-button) {
  display: flex;
  align-items: center;
  overflow: visible;
  padding: 8px 12px;
}

.historic-case-table span,
.historic-dispatch-table span,
.historic-evidence-table span {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.historic-case-table a:not(.compact-link-button),
.historic-dispatch-table a:not(.compact-link-button),
.historic-evidence-table a:not(.compact-link-button),
.historic-case-table small,
.historic-dispatch-table small,
.historic-evidence-table small,
.historic-case-table .status-badge,
.historic-dispatch-table .status-badge,
.historic-evidence-table .status-badge {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.historic-case-table small,
.historic-dispatch-table small,
.historic-evidence-table small {
  color: var(--muted-text);
}

.historic-case-table .status-badge,
.historic-dispatch-table .status-badge,
.historic-evidence-table .status-badge {
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 26px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.historic-case-table .compact-link-button,
.historic-dispatch-table .compact-link-button,
.historic-evidence-table .compact-link-button {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 34px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.historic-incident-cell {
  gap: 3px;
}

.historic-incident-reference {
  display: block;
  min-width: 0;
  color: #FFFFFF;
  font-weight: 700;
  line-height: 1.18;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.historic-incident-sequence {
  display: block;
  min-width: 0;
  color: var(--muted-text);
  font-weight: 600;
  line-height: 1.18;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mono {
  font-family: "Cascadia Mono", "Segoe UI Mono", monospace;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .detail-layout,
  .dispatch-layout,
  .integration-test-layout,
  .report-grid,
  .split-panels {
    grid-template-columns: 1fr;
  }

  .eligibility-band,
  .manual-site-summary,
  .dispatch-summary-strip,
  .audit-filter-grid,
  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .audit-report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-site-search {
    grid-template-columns: 1fr;
  }

  .audit-event-card {
    grid-template-columns: 1fr;
  }

  .audit-event-badges {
    justify-content: flex-start;
  }

  .audit-event-details {
    grid-column: auto;
  }

  .integration-health-hero,
  .integration-health-summary,
  .integration-diagnostic-row,
  .integration-readiness-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .integration-health-details > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .integration-health-details > summary small {
    text-align: left;
  }

  .report-schedule-details > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-schedule-details > summary small {
    text-align: left;
  }

  .client-viewer-hero,
  .client-viewer-layout,
  .client-outcome-card {
    grid-template-columns: 1fr;
  }

  .placeholder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dispatch-row > a,
  .dispatch-offer-head,
  .dispatch-offer-actions,
  .dispatch-device-line,
  .inline-dispatch-form,
  .dispatch-reject-form,
  .dispatch-reassign-form,
  .mini-form {
    grid-template-columns: 1fr;
  }

  .dispatch-incident-link strong,
  .dispatch-offer-head strong,
  .client-outcome-card strong,
  .client-rule-list strong,
  .site-search-result span,
  .site-search-result small {
    white-space: normal;
  }

  .responder-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .evidence-card {
    grid-template-columns: 1fr;
  }

  .report-table {
    grid-template-columns: 1fr;
  }

  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr 1fr 42px;
  }

  .candidate-chip {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

/* Dash UI modernization refinement layer */
.workbench {
  padding: clamp(18px, 2vw, 30px);
}

.content-frame {
  display: grid;
  gap: var(--space-4);
  position: relative;
}

.topbar {
  padding: 2px 0 var(--space-2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.topbar h1 {
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 700;
}

.panel,
.metric-card,
.detail-card,
.dispatch-row,
.feed-row,
.dense-list li,
.timeline span,
.tracking-card,
.placeholder-card,
.evidence-card,
.report-filter-grid {
  border-radius: var(--radius-md);
}

.panel {
  padding: clamp(16px, 1.4vw, 22px);
  border-color: var(--app-border-subtle);
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.8), rgba(11, 17, 56, 0.92)),
    var(--app-surface-raised);
  box-shadow: var(--app-shadow-depth);
}

.panel-head {
  min-height: 34px;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.panel-head h2 {
  font-size: 15px;
  font-weight: 700;
}

.metric-card,
.detail-card,
.dispatch-row,
.feed-row,
.dense-list li,
.timeline span,
.tracking-card,
.placeholder-card,
.evidence-card,
.report-filter-grid,
.chat-placeholder,
.data-table,
.table-grid {
  border-color: var(--app-border-subtle);
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.58), rgba(2, 4, 43, 0.72)),
    var(--app-surface-recessed);
}

.metric-card,
.detail-card,
.placeholder-card,
.evidence-card {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.table-grid {
  background: rgba(30, 42, 90, 0.74);
}

.table-grid > * {
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.68), rgba(2, 4, 43, 0.84)),
    var(--app-surface-recessed);
}

.form-grid input,
.form-grid select,
.report-filter-grid input,
.report-filter-grid select,
.schedule-form input,
.schedule-form select,
.stack-form input,
.stack-form select,
textarea {
  border-color: var(--app-border-subtle);
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.52), rgba(2, 4, 43, 0.82)),
    var(--app-surface-recessed);
}

.form-grid input:focus,
.form-grid select:focus,
.report-filter-grid input:focus,
.report-filter-grid select:focus,
.schedule-form input:focus,
.schedule-form select:focus,
.stack-form input:focus,
.stack-form select:focus,
textarea:focus {
  border-color: rgba(245, 197, 66, 0.62);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
  outline: none;
}

/* System Engineer settings pages */
.settings-command-page {
  display: grid;
  gap: 18px;
}

.settings-page-header {
  align-items: end;
  padding-bottom: 6px;
}

.settings-command-actions,
.settings-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.settings-status-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-status-card {
  min-height: 116px;
  padding: 18px;
}

.settings-status-card span {
  color: var(--muted-text);
}

.settings-status-card strong {
  font-size: clamp(24px, 2.5vw, 34px);
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 16px;
  align-items: start;
}

.settings-layout-wide {
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.55fr);
}

.settings-main-panel,
.settings-side-panel {
  display: grid;
  gap: 16px;
}

.settings-form {
  display: grid;
  gap: 18px;
}

.settings-form-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(2, 4, 43, 0.42), rgba(2, 4, 43, 0.68));
}

.settings-form-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-form-grid.compact {
  grid-template-columns: minmax(180px, 0.7fr) minmax(180px, 0.7fr) minmax(0, 1fr) minmax(0, 1fr);
}

.settings-form-grid label,
.settings-stack-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
}

.settings-form-grid input,
.settings-form-grid select,
.settings-stack-form input {
  min-height: 46px;
  width: 100%;
  padding: 0 13px;
}

.settings-checkbox {
  min-height: 46px;
  align-content: center;
  padding: 0 12px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(2, 4, 43, 0.38);
  color: var(--text);
}

.settings-stack-form {
  display: grid;
  gap: 12px;
}

.settings-note,
.settings-empty,
.settings-test-result,
.settings-issue-row,
.settings-run-row {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--radius-md);
  background: rgba(2, 4, 43, 0.48);
}

.settings-note strong,
.settings-empty strong,
.settings-test-result strong,
.settings-issue-row strong,
.settings-run-row strong {
  color: var(--text);
}

.settings-note span,
.settings-empty span,
.settings-test-result span,
.settings-test-result small,
.settings-issue-row small,
.settings-run-row small,
.settings-run-row em {
  color: var(--muted-text);
  font-style: normal;
  line-height: 1.45;
}

.settings-empty.success,
.settings-test-result.success {
  border-color: rgba(33, 199, 138, 0.3);
  background: rgba(33, 199, 138, 0.08);
}

.settings-test-result.failed {
  border-color: rgba(255, 77, 109, 0.32);
  background: rgba(255, 77, 109, 0.08);
}

.settings-collapsible {
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--radius-md);
  background: rgba(2, 4, 43, 0.42);
}

.settings-collapsible + .settings-collapsible {
  margin-top: 10px;
}

.settings-collapsible summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  list-style-position: inside;
}

.settings-collapsible summary small {
  color: var(--muted-text);
  font-weight: 600;
}

.settings-probe-list {
  display: grid;
  gap: 1px;
  padding: 0 12px 12px;
}

.settings-probe-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.22fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid rgba(212, 175, 55, 0.08);
}

.settings-probe-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.settings-probe-copy strong {
  color: var(--text);
}

.settings-probe-copy code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 12px;
}

.settings-probe-copy small,
.settings-probe-result small {
  color: var(--muted-text);
}

.settings-probe-result {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.settings-inline-action {
  display: flex;
  justify-content: flex-end;
}

.settings-state-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(212, 175, 55, 0.34);
  border-radius: 999px;
  color: var(--text);
  background: rgba(212, 175, 55, 0.12);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.settings-state-chip.neutral {
  border-color: rgba(187, 189, 192, 0.2);
  color: var(--muted-text);
  background: rgba(187, 189, 192, 0.08);
}

.settings-state-chip.status-ok {
  border-color: rgba(33, 199, 138, 0.42);
  color: #21C78A;
  background: rgba(33, 199, 138, 0.12);
}

.settings-state-chip.status-slow,
.settings-state-chip.status-warn {
  border-color: rgba(245, 197, 66, 0.46);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.14);
}

.settings-state-chip.status-crit,
.settings-state-chip.status-error {
  border-color: rgba(255, 77, 109, 0.46);
  color: #FF4D6D;
  background: rgba(255, 77, 109, 0.12);
}

.settings-issue-list,
.settings-run-list {
  display: grid;
  gap: 10px;
}

.settings-run-row em {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .settings-layout,
  .settings-layout-wide,
  .settings-status-grid,
  .settings-status-grid-three {
    grid-template-columns: 1fr;
  }

  .settings-form-grid,
  .settings-form-grid.compact {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .settings-page-header,
  .settings-command-actions,
  .settings-form-actions {
    align-items: stretch;
  }

  .settings-form-grid,
  .settings-form-grid.compact,
  .settings-probe-row {
    grid-template-columns: 1fr;
  }
}

.ops-grid {
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.metric-card {
  min-height: 124px;
  padding: var(--space-5);
}

.metric-card span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: clamp(28px, 2.6vw, 42px);
}

.metric-card small {
  line-height: 1.35;
}

.command-layout {
  gap: var(--space-4);
}

.command-centre-layout {
  grid-template-columns: minmax(420px, 1.28fr) minmax(360px, 0.95fr) minmax(280px, 0.72fr);
  align-items: start;
}

.command-centre-layout .feed-panel {
  grid-row: span 2;
}

.command-panel-head {
  align-items: center;
}

.feed-row {
  grid-template-columns: 124px minmax(0, 1fr) auto auto auto;
  min-height: 64px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.055);
}

.feed-row:hover,
.dense-list li:hover {
  border-color: rgba(212, 175, 55, 0.34);
  background: rgba(212, 175, 55, 0.07);
}

.feed-row strong {
  font-size: 15px;
}

.feed-row time.timer-pill {
  justify-self: end;
}

.status-badge {
  border-color: rgba(212, 175, 55, 0.4);
}

.map-panel {
  align-self: stretch;
}

.map-panel .live-map-panel {
  height: 100%;
}

.map-panel .live-map-canvas,
.map-visual {
  min-height: clamp(360px, 42vh, 560px);
}

.dense-list li {
  min-height: 54px;
  padding: 12px 14px;
}

.dense-list strong {
  font-size: 14px;
}

.incident-workspace {
  grid-template-columns: minmax(480px, 1.2fr) minmax(360px, 0.92fr) minmax(300px, 0.76fr);
}

.incident-summary-panel {
  grid-row: span 2;
}

.incident-summary-card {
  padding: var(--space-5);
  border-color: rgba(212, 175, 55, 0.28);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.1), rgba(255, 255, 255, 0.04));
}

.incident-summary-card strong {
  font-size: clamp(20px, 1.5vw, 26px);
  line-height: 1.25;
}

.responder-assignment-panel,
.sop-actions-panel,
.evidence-panel,
.embedded-audit-panel,
.embedded-chat-panel {
  min-height: 220px;
}

.action-list li {
  justify-content: space-between;
}

.action-list form button,
.filter-form button {
  min-height: 34px;
}

.evidence-grid {
  gap: var(--space-4);
}

.evidence-card {
  grid-template-columns: 148px minmax(0, 1fr);
  padding: var(--space-3);
}

.evidence-thumb,
.evidence-download {
  min-height: 128px;
}

.embedded-audit-panel .dense-list li,
.embedded-chat-panel .chat-placeholder {
  background: rgba(0, 0, 0, 0.38);
}

.form-builder-panel {
  margin-bottom: var(--space-4);
}

.builder-meta-strip {
  align-items: end;
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  background: rgba(212, 175, 55, 0.06);
}

.checklist-create-panel {
  margin-bottom: var(--space-4);
}

.checklist-editor-panel .panel-head {
  align-items: flex-start;
}

.checklist-editor-panel .panel-head h2 {
  margin-bottom: 4px;
}

.checklist-editor-panel .panel-head small {
  color: var(--muted-text);
}

.checklist-version-strip {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.builder-active-field {
  align-self: end;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 42px;
}

.builder-active-field input {
  width: 18px;
  min-height: 18px;
}

.builder-question-list {
  display: grid;
  gap: var(--space-4);
}

.builder-question-card {
  position: relative;
  padding: var(--space-5);
  border-color: rgba(212, 175, 55, 0.2);
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.72), rgba(10, 16, 48, 0.86)),
    rgba(0, 0, 0, 0.42);
}

.builder-question-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: var(--theme-secondary);
}

.builder-question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.builder-question-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.builder-question-head span {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.builder-question-head strong {
  color: var(--theme-text);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.builder-question-controls {
  grid-template-columns: minmax(90px, 0.38fr) repeat(2, minmax(180px, 1fr));
  margin-bottom: var(--space-4);
}

.builder-question-body {
  display: grid;
  gap: var(--space-3);
}

.builder-question-body label {
  display: grid;
  gap: 7px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
}

.builder-question-card textarea {
  min-height: 92px;
}

.builder-actions {
  align-items: center;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.builder-actions .muted-text {
  color: var(--muted-text);
  font-size: 13px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-3);
  padding: 10px 16px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(2, 4, 43, 0.72), rgba(0, 0, 0, 0.82));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.dashboard-hero h2 {
  margin-bottom: 0;
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 700;
  line-height: 1.1;
}

/* The long descriptive paragraph under hero titles eats vertical space on every
   page; the eyebrow + title already say what the page is. Hide it site-wide. */
.dashboard-hero > div > p:last-child {
  display: none;
}

.hero-signal {
  display: grid;
  min-width: 240px;
  gap: var(--space-2);
  align-content: center;
  padding: var(--space-4);
  border: 1px solid rgba(245, 197, 66, 0.26);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
}

.hero-signal span {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-signal strong {
  font-size: clamp(24px, 2vw, 36px);
  line-height: 1;
}

.hero-signal small {
  color: var(--muted-text);
}

.report-scope-signal {
  min-width: 210px;
  padding: var(--space-3);
  border-color: rgba(154, 166, 196, 0.14);
  background: rgba(10, 16, 48, 0.36);
  box-shadow: none;
}

.report-scope-signal strong {
  font-size: 18px;
  line-height: 1.15;
}

.report-scope-signal span,
.report-scope-signal small {
  font-size: 11px;
}

.hero-signal.timer-state-red {
  border-color: rgba(245, 197, 66, 0.48);
}

.hero-signal.timer-state-yellow {
  border-color: rgba(245, 197, 66, 0.48);
}

.hero-signal.timer-state-green {
  border-color: rgba(187, 189, 192, 0.42);
}

.priority-metrics {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.dashboard-command-layout {
  grid-template-columns: minmax(460px, 1.18fr) minmax(360px, 0.9fr) minmax(320px, 0.74fr);
}

.secondary-details {
  margin-top: var(--space-4);
}

.secondary-details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.secondary-details > summary::-webkit-details-marker {
  display: none;
}

.secondary-details > summary::after {
  content: "Expand";
  padding: 5px 10px;
  border: 1px solid rgba(245, 197, 66, 0.28);
  border-radius: 999px;
  color: #F5C542;
  background: rgba(245, 197, 66, 0.1);
  font-size: 12px;
}

.secondary-details[open] > summary::after {
  content: "Collapse";
}

.secondary-details > summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted-text);
  font-weight: 600;
}

.secondary-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.executive-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.72fr) minmax(300px, 0.72fr);
  align-items: start;
}

.hero-action-stack {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.management-overview-layout {
  gap: var(--space-4);
}

.management-summary-card {
  min-height: 0;
}

.management-summary-card .kpi-stack {
  gap: 8px;
}

.management-summary-card .kpi-stack span {
  min-height: 40px;
  padding: 9px 10px;
  color: var(--muted-text);
}

.management-summary-card .kpi-stack strong {
  color: var(--theme-text);
}

.management-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: var(--space-4);
  align-items: start;
}

.management-position-panel {
  grid-column: 1 / -1;
}

.management-position-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.management-position-grid > div {
  display: grid;
  gap: 6px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid rgba(154, 166, 196, 0.16);
  border-radius: 8px;
  background: rgba(10, 16, 48, 0.56);
}

.management-position-grid span {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.management-position-grid strong {
  color: var(--theme-text);
  font-size: clamp(26px, 2.2vw, 36px);
  line-height: 1;
}

.management-position-grid small {
  color: var(--muted-text);
  line-height: 1.35;
}

.management-portfolio-panel {
  min-width: 0;
}

.management-actions-panel {
  grid-column: 1 / -1;
}

.management-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.management-action-list .command-link {
  justify-content: center;
}

.incident-command {
  display: grid;
  grid-template-columns: minmax(520px, 1.1fr) minmax(360px, 0.8fr);
  gap: var(--space-4);
  align-items: start;
}

.incident-section {
  min-height: 0;
}

.incident-summary-section,
.incident-section.map-panel,
.sop-actions-panel,
.evidence-panel,
.incident-history-details,
.embedded-audit-panel,
.embedded-chat-panel {
  grid-column: 1 / -1;
}

.location-summary-card {
  margin-top: var(--space-4);
  margin-bottom: 0;
}

.incident-section.map-panel {
  display: grid;
  gap: var(--space-4);
  align-self: start;
}

.incident-section.map-panel .live-map-panel {
  height: auto;
}

.incident-section.map-panel .location-summary-card {
  margin-top: 0;
}

.inline-details {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-details summary {
  cursor: pointer;
  color: #F5C542;
  font-weight: 700;
}

.inline-details .compact-panel {
  margin-top: var(--space-3);
  box-shadow: none;
}

.danger-chip {
  border-color: rgba(245, 197, 66, 0.45);
  color: #F5C542;
  background: rgba(245, 197, 66, 0.12);
}

.incident-history-details .secondary-dashboard-grid {
  grid-template-columns: minmax(0, 1fr);
}

.incident-command .detail-card,
.incident-command .detail-card :where(span, strong, small),
.incident-history-details,
.incident-history-details :where(summary, span, strong, small, em, li),
.sop-actions-panel .inline-details :where(span, strong, small, em, li),
.dispatch-detail-hero,
.dispatch-detail-meta,
.dispatch-detail-meta span,
.dispatch-detail-side-panel,
.dispatch-detail-side-panel :where(span, strong, small, code, th, td, dt, dd),
.dispatch-detail-lower-grid,
.dispatch-detail-lower-grid :where(span, strong, small, em, li) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.incident-history-details .dense-list li,
.sop-actions-panel .inline-details .dense-list li,
.dispatch-detail-lower-grid .dense-list li {
  grid-template-columns: minmax(52px, 0.35fr) minmax(0, 1fr) minmax(96px, 0.65fr);
  align-items: start;
}

.incident-history-details .dense-list strong,
.incident-history-details .dense-list em,
.sop-actions-panel .inline-details .dense-list strong,
.sop-actions-panel .inline-details .dense-list em,
.dispatch-detail-lower-grid .dense-list strong,
.dispatch-detail-lower-grid .dense-list em {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.incident-history-details .dense-list em,
.sop-actions-panel .inline-details .dense-list em,
.dispatch-detail-lower-grid .dense-list em {
  justify-self: stretch;
  text-align: right;
}

.device-grid {
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 0.85fr) minmax(130px, 0.75fr) minmax(170px, 1fr) minmax(160px, 0.9fr) minmax(260px, 1.25fr);
}

/* Live Operations command-centre cleanup */
.live-ops-command-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-3);
  padding: 10px 18px;
  border: 1px solid rgba(30, 42, 90, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(11, 17, 56, 0.86), rgba(2, 4, 43, 0.92)),
    var(--app-surface-raised);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.live-ops-command-header h1 {
  margin: 0;
  color: var(--theme-text);
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.1;
  letter-spacing: 0;
}

.live-ops-command-header p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted-text);
  line-height: 1.45;
}

.live-ops-command-header .eyebrow {
  margin: 0 0 8px;
  color: var(--theme-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-ops-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  align-items: center;
  min-width: min(440px, 100%);
}

.live-ops-scope-form label {
  display: grid;
  gap: 5px;
  min-width: 230px;
}

.live-ops-scope-form span {
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-ops-scope-form select {
  min-height: 38px;
  border-color: rgba(212, 175, 55, 0.28);
  background: rgba(2, 4, 43, 0.72);
}

.live-ops-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 176px));
  gap: var(--space-2);
  margin-bottom: 0;
  align-items: center;
}

/* Compact KPIs live in the header band — drop the redundant "View →" caption
   (each card is already a link) so the band stays a single tidy row. */
.live-ops-command-header .live-ops-kpi small {
  display: none;
}

.live-ops-kpi {
  position: relative;
  min-width: 0;
  min-height: 62px;
  padding: 9px 14px;
  border: 1px solid rgba(30, 42, 90, 0.86);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 17, 56, 0.84), rgba(2, 4, 43, 0.92)),
    var(--app-surface-recessed);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.live-ops-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(187, 189, 192, 0.45);
}

a.live-ops-kpi {
  display: grid;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.live-ops-kpi:hover {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

a.live-ops-kpi small {
  font-size: 11px;
  color: var(--muted-text);
  opacity: 0;
  transition: opacity 0.15s;
}

a.live-ops-kpi:hover small {
  opacity: 1;
}

.live-ops-kpi.attention,
.live-ops-kpi.gold {
  border-color: rgba(212, 175, 55, 0.42);
}

.live-ops-kpi.attention::before,
.live-ops-kpi.gold::before {
  background: var(--theme-secondary);
}

.live-ops-kpi.timer-state-red::before {
  background: #FF4D6D;
}

.live-ops-kpi.timer-state-yellow::before {
  background: var(--theme-accent);
}

.live-ops-kpi span,
.live-ops-kpi small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-ops-kpi span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-ops-kpi strong {
  display: block;
  margin-top: 2px;
  color: var(--theme-text);
  font-size: clamp(20px, 1.5vw, 26px);
  line-height: 1.05;
  letter-spacing: 0;
}

.live-ops-kpi small {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
}

.live-ops-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.live-ops-map-panel {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(30, 42, 90, 0.86);
  background: rgba(2, 4, 43, 0.66);
}

.live-ops-map-panel .live-map-canvas {
  min-height: clamp(520px, 68vh, 820px);
}

.live-ops-map-panel .tracking-card-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: var(--space-3);
  background: rgba(2, 4, 43, 0.44);
}

.live-ops-under-map {
  display: grid;
  grid-template-columns: minmax(380px, 1.2fr) minmax(320px, 0.8fr);
  gap: var(--space-4);
  align-items: stretch;
  min-width: 0;
}

.live-ops-feed-panel,
.live-ops-dispatch-watch,
.live-ops-snapshot-panel {
  min-width: 0;
  border: 1px solid rgba(30, 42, 90, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(11, 17, 56, 0.78), rgba(2, 4, 43, 0.9)),
    var(--app-surface-recessed);
}

.live-ops-incident-feed {
  gap: var(--space-3);
}

.live-ops-incident-feed .feed-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  padding: 13px 14px;
  border-color: rgba(30, 42, 90, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.live-ops-incident-feed .feed-row .feed-code,
.live-ops-incident-feed .feed-row strong,
.live-ops-incident-feed .feed-row small,
.live-ops-incident-feed .feed-row .status-badge,
.live-ops-incident-feed .feed-row .timer-pill {
  grid-column: auto;
}

.live-ops-incident-feed .feed-row .feed-code {
  grid-column: 1 / -1;
  color: var(--theme-secondary);
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.live-ops-incident-feed .feed-row strong {
  grid-column: 1 / -1;
  white-space: nowrap;
}

.live-ops-incident-feed .feed-row small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-ops-incident-feed .feed-row .timer-pill {
  justify-self: end;
}

.live-ops-empty-state {
  display: grid;
  gap: 5px;
  margin: 0;
  min-height: 112px;
  align-content: center;
  border-color: rgba(30, 42, 90, 0.9);
  color: var(--theme-text);
  background:
    linear-gradient(180deg, rgba(11, 17, 56, 0.72), rgba(2, 4, 43, 0.82)),
    var(--app-surface-recessed);
}

.live-ops-empty-state strong {
  font-size: 14px;
  line-height: 1.35;
}

.live-ops-empty-state span {
  color: var(--muted-text);
  font-size: 13px;
  font-weight: 700;
}

.dense-list li.live-ops-empty-row {
  min-height: 84px;
  border-color: rgba(30, 42, 90, 0.9);
  background:
    linear-gradient(180deg, rgba(11, 17, 56, 0.7), rgba(2, 4, 43, 0.82)),
    var(--app-surface-recessed);
}

.dense-list li.live-ops-empty-row strong {
  white-space: normal;
}

.dense-list li.live-ops-empty-row em {
  color: var(--muted-text);
  white-space: nowrap;
}

.live-ops-snapshot-panel {
  padding-bottom: 0;
}

.live-ops-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.live-ops-no-network-list {
  margin-top: var(--space-3);
}

.compact-panel-head {
  margin-bottom: var(--space-2);
}

.compact-panel-head h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.live-ops-snapshot-grid span {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(30, 42, 90, 0.84);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.58);
}

.live-ops-snapshot-grid small,
.live-ops-snapshot-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-ops-snapshot-grid small {
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-ops-snapshot-grid strong {
  margin-top: 6px;
  color: var(--theme-text);
  font-size: 17px;
  line-height: 1.1;
}

.live-ops-secondary-details {
  margin-top: var(--space-3);
}

.live-ops-secondary-details > summary {
  padding-block: 2px;
}

.live-ops-secondary-details .secondary-dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.live-ops-secondary-details .dense-list {
  gap: 8px;
}

.live-ops-secondary-details .dense-list li {
  grid-template-columns: minmax(62px, 0.45fr) minmax(0, 1fr);
  min-height: 56px;
  padding: 10px 12px;
  align-items: start;
}

.live-ops-secondary-details .dense-list li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.live-ops-secondary-details .dense-list li > strong {
  white-space: normal;
  line-height: 1.25;
}

.live-ops-secondary-details .dense-list li > em {
  grid-column: 1 / -1;
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
}

.live-ops-secondary-details .dense-list li > em.availability-available {
  color: #21C78A;
  font-weight: 700;
}

.live-ops-secondary-details .dense-list li > em.availability-unavailable {
  color: #FF4D6D;
  font-weight: 700;
}

.live-ops-secondary-details .dense-list li > em.availability-neutral {
  color: var(--theme-secondary);
  font-weight: 700;
}

@media (max-width: 1360px) {
  .live-ops-main-grid {
    grid-template-columns: 1fr;
  }

  .live-ops-under-map {
    grid-template-columns: minmax(360px, 1.15fr) minmax(300px, 0.85fr);
  }

  .live-ops-map-panel .tracking-card-list,
  .live-ops-secondary-details .secondary-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .live-ops-command-header {
    grid-template-columns: 1fr;
  }

  .live-ops-header-actions {
    justify-content: flex-start;
  }

  .live-ops-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-ops-main-grid {
    grid-template-columns: 1fr;
  }

  .live-ops-under-map {
    grid-template-columns: 1fr;
  }

  .live-ops-map-panel .live-map-canvas {
    min-height: 430px;
  }
}

@media (max-width: 760px) {
  .live-ops-kpi-strip,
  .live-ops-under-map,
  .live-ops-map-panel .tracking-card-list,
  .live-ops-secondary-details .secondary-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .live-ops-command-header {
    padding: 15px;
  }

  .live-ops-scope-form,
  .live-ops-scope-form label {
    width: 100%;
  }

  .live-ops-map-panel .live-map-canvas {
    min-height: 360px;
  }

  .live-ops-incident-feed .feed-row {
    grid-template-columns: 1fr;
  }

  .live-ops-incident-feed .feed-row .timer-pill {
    justify-self: start;
  }
}

@media (max-width: 1320px) {
  .command-centre-layout,
  .incident-workspace,
  .dashboard-command-layout,
  .management-overview-grid,
  .executive-layout,
  .incident-command {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  }

  .command-centre-layout .feed-panel,
  .incident-summary-panel {
    grid-row: auto;
  }
}

@media (max-width: 980px) {
  .command-centre-layout,
  .incident-workspace,
  .dashboard-command-layout,
  .management-overview-grid,
  .executive-layout,
  .incident-command,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .priority-metrics,
  .management-position-grid,
  .secondary-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .feed-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .feed-row time.timer-pill {
    justify-self: start;
  }

  .evidence-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .workbench {
    padding: 16px;
  }

  .side-rail {
    padding: 16px;
  }

  .rail-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rail-nav a {
    padding: 10px 12px;
  }

  .user-strip {
    width: 100%;
    justify-content: space-between;
  }

  .panel {
    padding: 14px;
  }

  .metric-card {
    min-height: 112px;
  }
}
.app-download-shell {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  overflow: auto;
}

.app-download-panel {
  width: min(720px, 100%);
  min-height: min(720px, calc(100vh - 120px));
  max-height: none;
  overflow: visible;
  grid-column: 1;
}

.app-download-brand {
  margin-bottom: 26px;
}

.app-download-title {
  margin-bottom: 28px;
}

.support-panel {
  width: min(720px, 100%);
  min-height: min(720px, calc(100vh - 120px));
  max-height: none;
  overflow: visible;
  grid-column: 1;
}

.download-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.download-card,
.download-documents {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(18, 25, 68, 0.72), rgba(2, 4, 43, 0.88)),
    var(--login-card-surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.download-card h2,
.download-documents h2 {
  margin: 0 0 8px;
  color: var(--login-text);
  font-size: 18px;
  font-weight: 700;
}

.download-card p,
.download-documents p {
  margin: 0;
  color: var(--login-muted);
  line-height: 1.5;
}

.download-platform-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(245, 197, 66, 0.56);
  border-radius: var(--radius-sm);
  color: #070819;
  background: linear-gradient(135deg, var(--login-gold-highlight), var(--login-gold));
  font-weight: 600;
}

.download-command,
.document-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
}

.download-card .download-command {
  width: 100%;
}

.download-documents {
  margin-top: var(--space-4);
}

.document-link-grid,
.download-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.document-link-grid .document-link {
  min-height: 36px;
  font-size: 13px;
}

.download-footer-actions {
  justify-content: center;
  margin-top: var(--space-5);
}

.support-request-form {
  display: grid;
  gap: var(--space-4);
}

.support-request-form label {
  display: grid;
  gap: 8px;
  color: var(--login-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.support-request-form input,
.support-request-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(187, 189, 192, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(2, 4, 43, 0.78);
  color: var(--login-text);
  font: inherit;
  padding: 12px 14px;
  outline: none;
}

.support-request-form textarea {
  min-height: 132px;
  resize: vertical;
}

.support-request-form input:focus,
.support-request-form textarea:focus {
  border-color: rgba(245, 197, 66, 0.86);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.12);
}

.app-download-page-footer {
  align-self: end;
}

@media (max-width: 760px) {
  .app-download-shell {
    align-items: start;
  }

  .download-card-grid {
    grid-template-columns: 1fr;
  }

  .download-command,
  .document-link,
  .download-footer-actions .document-link {
    width: 100%;
  }
}

/* 2026 command-centre visual refresh */
:root {
  --dash-bg-deep: #02042B;
  --dash-bg-ink: #05071D;
  --dash-panel: rgba(13, 18, 54, 0.84);
  --dash-panel-strong: rgba(18, 25, 68, 0.94);
  --dash-panel-soft: rgba(255, 255, 255, 0.045);
  --dash-line: rgba(187, 189, 192, 0.14);
  --dash-line-strong: rgba(212, 175, 55, 0.34);
  --dash-gold-soft: rgba(212, 175, 55, 0.12);
  --dash-focus: rgba(245, 197, 66, 0.2);
  --dash-shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.28);
  --dash-shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.36);
}

html {
  background: var(--dash-bg-deep);
}

body {
  background:
    linear-gradient(180deg, #02042B 0%, #05071D 58%, #02042B 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.dash-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 220px),
    linear-gradient(135deg, rgba(212, 175, 55, 0.05), transparent 34%),
    var(--dash-bg-deep);
}

.dash-shell::before {
  opacity: 0.22;
  background:
    linear-gradient(rgba(187, 189, 192, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(187, 189, 192, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent 0, black 20%, black 86%, transparent 100%);
}

.dash-shell::after {
  display: none;
}

.side-rail {
  padding: 20px 14px;
  border-right: 1px solid rgba(212, 175, 55, 0.18);
  background:
    linear-gradient(180deg, rgba(7, 10, 35, 0.98), rgba(0, 0, 0, 0.94)),
    #000000;
  box-shadow: 14px 0 40px rgba(0, 0, 0, 0.28);
}

.brand-lockup {
  min-height: 76px;
  padding-bottom: 16px;
  border-bottom-color: rgba(212, 175, 55, 0.18);
}

.brand-logo {
  width: min(198px, 100%);
}

.rail-nav {
  gap: 6px;
  margin-top: 18px;
}

.rail-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.rail-nav a::before {
  content: "";
  position: absolute;
  left: 6px;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: transparent;
}

.rail-nav a:hover,
.rail-nav a[aria-current="page"] {
  border-color: rgba(212, 175, 55, 0.26);
  color: #FFFFFF;
  background: rgba(212, 175, 55, 0.1);
  transform: translateX(2px);
}

.rail-nav a[aria-current="page"]::before {
  background: var(--theme-secondary);
}

.rail-product-lockup {
  border-top-color: rgba(212, 175, 55, 0.18);
}

.workbench {
  padding: clamp(18px, 2.4vw, 34px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 12px;
  padding: 12px 16px;
  border: 1px solid rgba(187, 189, 192, 0.1);
  border-radius: 8px;
  background: rgba(2, 4, 43, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.topbar h1,
.live-ops-command-header h1 {
  color: #FFFFFF;
  font-weight: 700;
}

.topbar .eyebrow,
.live-ops-command-header .eyebrow,
.dashboard-hero .eyebrow,
.settings-page-header .eyebrow {
  color: var(--theme-secondary);
}

.organisation-badge,
.global-organisation-selector,
.user-strip {
  border-color: rgba(187, 189, 192, 0.16);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.global-organisation-selector select,
.topbar select {
  background-color: rgba(2, 4, 43, 0.78);
}

.topbar .global-organisation-selector {
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topbar .global-organisation-selector span {
  margin: 0 0 4px;
  color: var(--theme-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.topbar .global-organisation-selector strong {
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

.topbar .global-organisation-selector select {
  width: auto;
  min-width: 140px;
  min-height: 0;
  padding: 0 24px 0 0;
  border: 0;
  background-color: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

.content-frame {
  gap: 18px;
}

.panel,
.metric-card,
.form-card,
.detail-card,
.placeholder-card,
.tracking-card,
.dispatch-incident-card,
.dispatch-offer-card,
.client-outcome-card,
.client-rule-list div,
.download-card,
.download-documents {
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--dash-panel);
  box-shadow: var(--dash-shadow-soft);
}

.panel {
  padding: clamp(16px, 1.5vw, 22px);
}

.panel-head {
  min-height: 40px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom-color: rgba(187, 189, 192, 0.12);
}

.panel-head h2,
.panel-head h3 {
  color: #FFFFFF;
  font-weight: 700;
}

.metric-card,
.live-ops-kpi {
  min-height: 108px;
  border-color: rgba(187, 189, 192, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(13, 18, 54, 0.88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.metric-card::after {
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 3px;
  border-radius: 999px;
}

.metric-card strong,
.live-ops-kpi strong {
  color: #FFFFFF;
  font-weight: 700;
}

.metric-card span,
.metric-card small,
.live-ops-kpi span,
.live-ops-kpi small {
  color: rgba(187, 189, 192, 0.9);
}

.live-ops-command-header,
.client-viewer-hero,
.dashboard-hero,
.page-header,
.command-header {
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.018)),
    rgba(13, 18, 54, 0.82);
  box-shadow: var(--dash-shadow-soft);
}

.live-ops-command-header,
.dashboard-hero,
.client-viewer-hero {
  padding: clamp(18px, 2vw, 26px);
}

.live-ops-main-grid {
  gap: 18px;
}

.live-ops-map-panel,
.dispatch-map-panel,
.map-panel .live-map-panel {
  border-color: rgba(212, 175, 55, 0.22);
  background: rgba(5, 7, 29, 0.86);
  box-shadow: var(--dash-shadow-lift);
}

.live-map-canvas,
.map-visual {
  border-radius: 8px;
  background:
    linear-gradient(rgba(187, 189, 192, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(187, 189, 192, 0.04) 1px, transparent 1px),
    #05071D;
  background-size: 46px 46px;
}

.tracking-card-list {
  gap: 10px;
}

.tracking-card {
  border-color: rgba(187, 189, 192, 0.13);
  box-shadow: none;
}

.tracking-card > div,
.live-ops-snapshot-grid span,
.manual-site-summary,
.site-search-result,
.dense-list li,
.feed-row {
  border-color: rgba(187, 189, 192, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.dispatch-incident-card,
.dispatch-offer-card,
.client-outcome-card {
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.dispatch-incident-card:hover,
.dispatch-offer-card:hover,
.client-outcome-card:hover,
.site-search-result:hover {
  border-color: rgba(212, 175, 55, 0.34);
  background-color: rgba(212, 175, 55, 0.06);
  transform: translateY(-1px);
}

.chip,
.status-badge,
.priority-badge,
.timer-pill {
  min-height: 28px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chip {
  border-color: rgba(212, 175, 55, 0.34);
  background: rgba(212, 175, 55, 0.12);
}

button,
.primary-command,
.secondary-command,
.danger-command,
.link-command,
.command-link,
.download-command,
.document-link {
  border-radius: 8px;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

button:hover,
.primary-command:hover,
.secondary-command:hover,
.danger-command:hover,
.link-command:hover,
.command-link:hover,
.download-command:hover,
.document-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.primary-command,
.download-command {
  border-color: rgba(245, 197, 66, 0.7);
  background: linear-gradient(180deg, #F5C542, #D4AF37);
  color: #02042B;
}

.secondary-command,
.document-link,
.command-link {
  border-color: rgba(212, 175, 55, 0.24);
  background: rgba(255, 255, 255, 0.055);
  color: #FFFFFF;
}

.danger-command {
  color: #FF8AA0;
  border-color: rgba(255, 77, 109, 0.34);
  background: rgba(255, 77, 109, 0.08);
}

input,
select,
textarea,
.form-grid input,
.form-grid select,
.report-filter-grid input,
.report-filter-grid select,
.schedule-form input,
.schedule-form select,
.stack-form input,
.stack-form select,
.support-request-form input,
.support-request-form textarea {
  min-height: 40px;
  border-color: rgba(187, 189, 192, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(2, 4, 43, 0.78);
  color: #FFFFFF;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(245, 197, 66, 0.68);
  box-shadow: 0 0 0 4px var(--dash-focus);
  outline: none;
}

.data-table,
.table-grid,
.table-wrap {
  border-color: rgba(187, 189, 192, 0.14);
  border-radius: 8px;
  background: rgba(5, 7, 29, 0.72);
  box-shadow: var(--dash-shadow-soft);
}

.table-grid > *,
.table-wrap table tr {
  border-color: rgba(187, 189, 192, 0.1);
}

.table-grid > *:not(:first-child):hover,
.table-wrap table tbody tr:hover {
  background: rgba(212, 175, 55, 0.055);
}

.notice,
.alert,
.empty-state,
.live-ops-empty-state {
  border-radius: 8px;
  border-color: rgba(212, 175, 55, 0.22);
  background: rgba(212, 175, 55, 0.08);
}

.alert {
  border-color: rgba(255, 77, 109, 0.28);
  background: rgba(255, 77, 109, 0.08);
}

@media (max-width: 1040px) {
  .topbar {
    position: static;
    margin-inline: 0;
  }
}

/* Dark navy refinement pass */
:root {
  --dash-bg-deep: #02042B;
  --dash-bg-ink: #010216;
  --dash-bg-panel: #070B2D;
  --dash-bg-panel-2: #0A1038;
  --dash-bg-field: #050824;
  --dash-line: rgba(112, 124, 168, 0.18);
  --dash-line-strong: rgba(212, 175, 55, 0.28);
  --dash-text-soft: rgba(255, 255, 255, 0.78);
  --dash-muted-soft: rgba(187, 189, 192, 0.72);
  --dash-gold-soft: rgba(212, 175, 55, 0.1);
  --dash-shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.34);
  --dash-shadow-lift: 0 26px 68px rgba(0, 0, 0, 0.46);
}

body {
  background: #010216;
}

.dash-shell {
  background:
    linear-gradient(180deg, rgba(7, 11, 45, 0.94) 0%, rgba(1, 2, 22, 0.98) 44%, #010216 100%),
    #010216;
}

.dash-shell::before {
  opacity: 0.12;
  background:
    linear-gradient(rgba(112, 124, 168, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 124, 168, 0.04) 1px, transparent 1px);
  background-size: 88px 88px;
}

.side-rail {
  border-right-color: rgba(212, 175, 55, 0.16);
  background:
    linear-gradient(180deg, #050824 0%, #02031A 100%),
    #02031A;
}

.brand-lockup,
.rail-product-lockup {
  border-color: rgba(112, 124, 168, 0.16);
}

.rail-nav a {
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
}

.rail-nav a:hover,
.rail-nav a[aria-current="page"] {
  border-color: rgba(212, 175, 55, 0.22);
  background: rgba(212, 175, 55, 0.08);
}

.topbar {
  border-color: rgba(112, 124, 168, 0.14);
  background: rgba(3, 5, 29, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.organisation-badge,
.global-organisation-selector,
.user-strip {
  border-color: rgba(112, 124, 168, 0.16);
  background: rgba(7, 11, 45, 0.92);
}

.panel,
.metric-card,
.form-card,
.detail-card,
.placeholder-card,
.tracking-card,
.dispatch-incident-card,
.dispatch-offer-card,
.client-outcome-card,
.client-rule-list div,
.download-card,
.download-documents,
.live-ops-command-header,
.client-viewer-hero,
.dashboard-hero,
.page-header,
.command-header,
.live-ops-feed-panel,
.live-ops-dispatch-watch,
.live-ops-snapshot-panel {
  border-color: rgba(112, 124, 168, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 16, 56, 0.96), rgba(5, 8, 36, 0.98)),
    #070B2D;
  box-shadow: var(--dash-shadow-soft);
}

.panel-head {
  border-bottom-color: rgba(112, 124, 168, 0.14);
}

.metric-card,
.live-ops-kpi,
.settings-status-card {
  border-color: rgba(112, 124, 168, 0.15);
  background:
    linear-gradient(180deg, rgba(13, 20, 70, 0.98), rgba(5, 8, 36, 0.98)),
    #070B2D;
}

.metric-card::after {
  opacity: 0.78;
}

.live-ops-map-panel,
.dispatch-map-panel,
.map-panel .live-map-panel,
.live-map-canvas,
.map-visual {
  border-color: rgba(212, 175, 55, 0.18);
  background:
    linear-gradient(rgba(112, 124, 168, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 124, 168, 0.035) 1px, transparent 1px),
    #02031A;
  background-size: 56px 56px;
}

.tracking-card > div,
.live-ops-snapshot-grid span,
.manual-site-summary,
.site-search-result,
.dense-list li,
.feed-row,
.table-grid > * {
  border-color: rgba(112, 124, 168, 0.14);
  background: rgba(3, 5, 29, 0.72);
}

.data-table,
.table-grid,
.table-wrap {
  border-color: rgba(112, 124, 168, 0.16);
  background: #03051D;
}

.table-wrap table thead,
.table-grid > *:first-child {
  background: rgba(10, 16, 56, 0.96);
}

input,
select,
textarea,
.form-grid input,
.form-grid select,
.report-filter-grid input,
.report-filter-grid select,
.schedule-form input,
.schedule-form select,
.stack-form input,
.stack-form select,
.support-request-form input,
.support-request-form textarea {
  border-color: rgba(112, 124, 168, 0.22);
  background: #050824;
}

.secondary-command,
.document-link,
.command-link,
button {
  border-color: rgba(112, 124, 168, 0.22);
  background: #070B2D;
}

.primary-command,
.download-command {
  color: #02031A;
  background: linear-gradient(180deg, #F5C542, #D4AF37);
}

.chip,
.status-badge,
.priority-badge,
.timer-pill {
  box-shadow: none;
}

.notice,
.empty-state,
.live-ops-empty-state {
  border-color: rgba(212, 175, 55, 0.2);
  background: rgba(212, 175, 55, 0.07);
}

.alert {
  border-color: rgba(255, 77, 109, 0.22);
  background: rgba(255, 77, 109, 0.07);
}

/* Login dark navy refinement */
.login-shell {
  grid-template-columns: minmax(220px, 0.7fr) minmax(480px, 620px) minmax(220px, 0.7fr);
  background:
    linear-gradient(180deg, rgba(7, 11, 45, 0.94) 0%, rgba(1, 2, 22, 0.99) 52%, #010216 100%),
    #010216;
}

.login-shell::before {
  opacity: 0.12;
  background:
    linear-gradient(rgba(112, 124, 168, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 124, 168, 0.04) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(90deg, transparent 0, black 20%, black 82%, transparent 100%);
}

.login-shell::after {
  opacity: 0.54;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(212, 175, 55, 0.06), transparent 0 28%, transparent 60%),
    radial-gradient(ellipse at center, transparent 0 48%, rgba(0, 0, 0, 0.58) 100%);
}

.map-region,
.route-line {
  opacity: 0.1;
  filter: none;
}

.map-region {
  background-image: radial-gradient(circle, rgba(112, 124, 168, 0.34) 0 1px, transparent 1.4px);
}

.route-line {
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.28), transparent);
}

.login-panel {
  width: min(620px, 100%);
  padding: clamp(34px, 4vw, 52px);
  border: 1px solid rgba(112, 124, 168, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 16, 56, 0.98), rgba(5, 8, 36, 0.99)),
    #070B2D;
  box-shadow:
    0 34px 92px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(212, 175, 55, 0.08);
}

.login-panel::before {
  background:
    linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.66), transparent) top / 56% 1px no-repeat;
}

.login-brand {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom-color: rgba(112, 124, 168, 0.14);
}

.login-brand-logo {
  width: clamp(260px, 28vw, 360px);
  filter: none;
}

.login-title-group {
  gap: 12px;
}

.login-title-group h1 {
  font-size: clamp(30px, 2.6vw, 40px);
}

.login-title-group .login-platform-title {
  color: #D4AF37;
  font-size: clamp(15px, 1.1vw, 19px);
}

.login-title-rule {
  width: 44px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

.login-title-group p {
  color: rgba(187, 189, 192, 0.74);
}

.login-panel .stack-form {
  gap: 18px;
}

.login-panel .stack-form label {
  color: rgba(187, 189, 192, 0.76);
}

.login-panel .stack-form input {
  min-height: 56px;
  border-color: rgba(112, 124, 168, 0.22);
  border-radius: 8px;
  background: #050824;
  box-shadow: none;
}

.login-panel .stack-form input:focus {
  border-color: rgba(245, 197, 66, 0.62);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.13);
}

.login-panel .stack-form input:-webkit-autofill,
.login-panel .stack-form input:-webkit-autofill:hover,
.login-panel .stack-form input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px #050824 inset, 0 0 0 4px rgba(212, 175, 55, 0.13);
}

.login-input-icon-user::before,
.login-input-icon-user::after,
.login-input-icon-lock::before,
.login-input-icon-lock::after {
  border-color: rgba(212, 175, 55, 0.88);
}

.login-input-icon-user::after {
  background: #050824;
}

.login-panel .stack-form input[data-password-input] {
  padding-right: 96px;
}

.login-password-toggle {
  color: rgba(212, 175, 55, 0.88);
}

.login-panel .login-password-toggle,
.login-panel .login-password-toggle:hover,
.login-panel .login-password-toggle:focus,
.login-panel .login-password-toggle:focus-visible,
.login-panel .login-password-toggle:active {
  right: 54px;
  top: 50%;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  transform: translateY(-50%);
  box-shadow: none;
}

.login-panel .login-password-toggle:hover,
.login-panel .login-password-toggle:active {
  background: transparent;
}

.login-panel .login-password-toggle:focus-visible {
  background: transparent;
  outline: 2px solid rgba(212, 175, 55, 0.42);
  outline-offset: 2px;
}

.login-panel .primary-command {
  min-height: 58px;
  border-radius: 8px;
  color: #02031A;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  font-size: 17px;
}

.login-security-note {
  margin-top: 8px;
  padding-top: 20px;
  border-top-color: rgba(112, 124, 168, 0.14);
}

.login-security-note > span {
  width: 40px;
  height: 40px;
  border-color: rgba(212, 175, 55, 0.82);
  border-radius: 8px;
}

.login-security-note > span::before {
  border-color: rgba(212, 175, 55, 0.92);
}

.login-security-note strong {
  color: rgba(255, 255, 255, 0.9);
}

.login-security-note small {
  color: rgba(187, 189, 192, 0.72);
}

.login-system-card {
  border-color: rgba(112, 124, 168, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 16, 56, 0.84), rgba(5, 8, 36, 0.92)),
    #070B2D;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

.login-system-card > strong,
.login-live-feed > strong {
  color: #D4AF37;
  border-bottom-color: rgba(112, 124, 168, 0.14);
}

.login-system-card span {
  border-bottom-color: rgba(112, 124, 168, 0.12);
}

.login-system-card small,
.login-live-feed small,
.login-live-feed time,
.login-footer {
  color: rgba(187, 189, 192, 0.7);
}

.login-footer {
  border-top-color: rgba(112, 124, 168, 0.14);
}

.login-footer span:first-child {
  color: #D4AF37;
}

/* Dispatch active queue and details */
.page-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: var(--space-4);
}

.page-actions-row form {
  margin-left: auto;
}

.dispatch-command-header {
  align-items: center;
}

.dispatch-live-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(110, 231, 168, 0.28);
  border-radius: 999px;
  color: #6EE7A8;
  background: rgba(110, 231, 168, 0.1);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.dispatch-live-status[data-state="connecting"],
.dispatch-live-status[data-state="refreshing"],
.dispatch-live-status[data-state="pending"] {
  border-color: rgba(255, 159, 28, 0.38);
  color: #FF9F1C;
  background: rgba(255, 159, 28, 0.12);
}

.dispatch-live-status[data-state="fallback"],
.dispatch-live-status[data-state="unavailable"] {
  border-color: rgba(255, 77, 109, 0.36);
  color: #FF4D6D;
  background: rgba(255, 77, 109, 0.1);
}

.dispatch-active-panel {
  overflow: hidden;
}

.dispatch-active-list {
  display: grid;
  gap: 8px;
}

.dispatch-active-list-head,
.dispatch-active-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(170px, 0.88fr) minmax(120px, 0.58fr) minmax(145px, 0.7fr) minmax(145px, 0.7fr) minmax(110px, 0.52fr) minmax(82px, 0.36fr);
  gap: 12px;
  align-items: center;
}

.dispatch-active-list-head {
  padding: 0 14px 6px;
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dispatch-active-row {
  padding: 14px;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(13, 18, 54, 0.82);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.dispatch-active-row:hover {
  border-color: rgba(212, 175, 55, 0.34);
  background-color: rgba(212, 175, 55, 0.06);
  transform: translateY(-1px);
}

.dispatch-active-row > div,
.dispatch-active-site,
.dispatch-active-responder,
.dispatch-timer-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dispatch-active-row strong,
.dispatch-active-row span,
.dispatch-active-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-active-site > span {
  color: var(--theme-secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dispatch-active-site strong,
.dispatch-active-responder strong {
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1.22;
  white-space: nowrap;
}

.dispatch-active-responder strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dispatch-active-row small,
.dispatch-timer-cell small {
  color: var(--muted-text);
  font-size: 11px;
  line-height: 1.25;
}

.dispatch-timer-cell .timer-pill {
  width: 100%;
  min-width: 0;
}

.dispatch-detail-hero {
  grid-template-columns: minmax(0, 1fr) minmax(460px, 0.62fr);
}

.dispatch-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-3);
}

.dispatch-detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 999px;
  color: var(--muted-text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 600;
}

.dispatch-detail-timer-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dispatch-detail-timer-pair .hero-signal {
  min-width: 0;
}

.dispatch-detail-metrics {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  margin-bottom: var(--space-4);
}

.dispatch-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: var(--space-4);
  align-items: start;
}

.dispatch-detail-map-panel {
  padding: 0;
  overflow: hidden;
}

.dispatch-detail-map-panel .live-map-canvas {
  min-height: clamp(480px, 62vh, 760px);
}

.dispatch-detail-map-panel .tracking-card-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  padding: var(--space-3);
}

.dispatch-detail-side-panel {
  align-self: stretch;
}

.dispatch-operator-stack {
  display: grid;
  gap: 10px;
  margin-bottom: var(--space-4);
}

.dispatch-operator-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(5, 7, 29, 0.76);
}

.dispatch-operator-card-head {
  display: grid;
  gap: 4px;
}

.dispatch-operator-card-head span {
  color: var(--theme-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dispatch-operator-card-head strong {
  color: #FFFFFF;
  font-size: 18px;
  line-height: 1.2;
}

.dispatch-operator-status-line,
.dispatch-telemetry-chips,
.dispatch-alternative-chips,
.dispatch-alternative-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.dispatch-operator-status-line > span:not(.status-badge),
.dispatch-telemetry-chips > span,
.dispatch-alternative-meta > span,
.distance-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 999px;
  color: rgba(187, 189, 192, 0.9);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 600;
}

.dispatch-operator-card small {
  color: var(--muted-text);
  line-height: 1.45;
}

.assigned-responder-card {
  gap: 12px;
}

.dispatch-assigned-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dispatch-assigned-header .dispatch-operator-card-head {
  min-width: 0;
}

.dispatch-assigned-header .dispatch-operator-card-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-assigned-header .status-badge {
  flex: 0 0 auto;
  margin-top: 2px;
}

.dispatch-responder-route {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dispatch-route-primary {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dispatch-route-primary span,
.dispatch-responder-telemetry dt,
.dispatch-assigned-location span {
  display: block;
  color: var(--muted-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dispatch-route-primary strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #FFFFFF;
  font-size: 20px;
  line-height: 1.05;
  text-overflow: ellipsis;
}

.dispatch-route-primary small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.dispatch-responder-telemetry {
  display: grid;
  gap: 6px;
  margin: 0;
}

.dispatch-responder-telemetry div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.dispatch-responder-telemetry dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.dispatch-assigned-location {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(187, 189, 192, 0.1);
  border-radius: 8px;
  background: rgba(3, 5, 22, 0.42);
}

.dispatch-assigned-location code {
  min-width: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.site-geofence-card {
  gap: 12px;
}

.dispatch-site-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dispatch-site-header .dispatch-operator-card-head {
  min-width: 0;
}

.dispatch-site-header .dispatch-operator-card-head strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
}

.dispatch-site-code {
  flex: 0 0 auto;
  max-width: 42%;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(187, 189, 192, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-site-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  background: rgba(3, 5, 22, 0.34);
}

.dispatch-site-table th,
.dispatch-site-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(187, 189, 192, 0.1);
  vertical-align: top;
}

.dispatch-site-table tr:last-child th,
.dispatch-site-table tr:last-child td {
  border-bottom: 0;
}

.dispatch-site-table th {
  width: 112px;
  color: var(--muted-text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
}

.dispatch-site-table td {
  min-width: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dispatch-site-table td strong {
  color: #FFFFFF;
  font-size: 14px;
}

.dispatch-site-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
}

.dispatch-site-instruction-row td {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.dispatch-site-geofence {
  padding: 11px;
  border: 1px solid rgba(255, 159, 28, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 159, 28, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(3, 5, 22, 0.42);
}

.dispatch-site-geofence > span,
.dispatch-site-targets span,
.dispatch-site-instructions span {
  display: block;
  color: var(--muted-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dispatch-site-geofence strong {
  display: block;
  margin-top: 5px;
  color: #FFFFFF;
  font-size: 22px;
  line-height: 1;
}

.dispatch-site-geofence strong span {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.dispatch-site-geofence small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}

.dispatch-site-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dispatch-site-targets > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dispatch-site-targets strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #FFFFFF;
  font-size: 17px;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.dispatch-site-instructions {
  padding: 9px 10px;
  border-left: 3px solid rgba(110, 231, 168, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.dispatch-site-instructions p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  line-height: 1.45;
}

.dispatch-operator-kv {
  display: grid;
  gap: 8px;
  margin: 0;
}

.dispatch-operator-kv div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.dispatch-operator-kv dt {
  color: var(--muted-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dispatch-operator-kv dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.dispatch-assigned-header .dispatch-operator-card-head strong,
.dispatch-site-header .dispatch-operator-card-head strong,
.dispatch-route-primary strong,
.dispatch-responder-telemetry dd,
.dispatch-site-targets strong,
.dispatch-operator-kv dd {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dispatch-alternative-head {
  margin-top: 2px;
}

.dispatch-alternative-list {
  display: grid;
  gap: 10px;
}

.dispatch-alternative-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  background: rgba(3, 5, 22, 0.34);
}

.dispatch-alternative-table th,
.dispatch-alternative-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(187, 189, 192, 0.1);
  vertical-align: middle;
}

.dispatch-alternative-table tr:last-child td {
  border-bottom: 0;
}

.dispatch-alternative-table th {
  color: var(--muted-text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
}

.dispatch-alternative-table td {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.dispatch-alternative-table td:first-child {
  color: #FFFFFF;
}

.dispatch-alternative-table form {
  display: flex;
  justify-content: flex-end;
}

.dispatch-alternative-table button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.dispatch-alternative-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.dispatch-alternative-card > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.dispatch-alternative-card strong {
  min-width: 0;
  overflow: hidden;
  color: #FFFFFF;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-alternative-card small {
  color: var(--muted-text);
  font-size: 12px;
}

.dispatch-alternative-card form {
  display: flex;
  justify-content: flex-end;
}

.dispatch-detail-lower-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(300px, 0.78fr) minmax(300px, 0.78fr);
  gap: var(--space-4);
  align-items: start;
  margin-top: var(--space-4);
}

.dispatch-evidence-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.dispatch-form-submissions {
  margin-top: var(--space-3);
}

.dispatch-form-submissions .compact-panel {
  padding: var(--space-3);
  border: 1px solid rgba(187, 189, 192, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.dispatch-escalation-head {
  margin-top: var(--space-4);
}

.timer-pill.timer-state-green {
  border-color: rgba(110, 231, 168, 0.38);
  color: #6EE7A8;
  background: rgba(110, 231, 168, 0.1);
}

.timer-pill.timer-state-yellow {
  border-color: rgba(255, 159, 28, 0.48);
  color: #FF9F1C;
  background: rgba(255, 159, 28, 0.12);
}

.timer-pill.timer-state-red {
  border-color: rgba(255, 77, 109, 0.5);
  color: #FF4D6D;
  background: rgba(255, 77, 109, 0.12);
}

.metric-card.timer-card.timer-state-green,
.hero-signal.timer-state-green {
  border-color: rgba(110, 231, 168, 0.34);
}

.metric-card.timer-card.timer-state-yellow,
.hero-signal.timer-state-yellow {
  border-color: rgba(255, 159, 28, 0.42);
}

.metric-card.timer-card.timer-state-red,
.hero-signal.timer-state-red {
  border-color: rgba(255, 77, 109, 0.42);
}

.hero-signal.timer-state-green strong {
  color: #6EE7A8;
}

.hero-signal.timer-state-yellow strong {
  color: #FF9F1C;
}

.hero-signal.timer-state-red strong {
  color: #FF4D6D;
}

@media (max-width: 1280px) {
  .dispatch-active-list-head {
    display: none;
  }

  .dispatch-active-row {
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.75fr) repeat(2, minmax(140px, 0.7fr));
  }

  .dispatch-active-row > div:nth-child(3),
  .dispatch-active-row > div:nth-child(6),
  .dispatch-active-row > div:nth-child(7) {
    grid-column: span 1;
  }

  .dispatch-detail-hero,
  .dispatch-detail-grid,
  .dispatch-detail-lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .page-actions-row,
  .page-actions-row form {
    align-items: stretch;
    width: 100%;
  }

  .page-actions-row > *,
  .page-actions-row form button {
    width: 100%;
  }

  .dispatch-active-row,
  .dispatch-detail-timer-pair,
  .dispatch-responder-route,
  .dispatch-site-targets,
  .dispatch-detail-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .dispatch-active-site strong,
  .dispatch-active-responder strong {
    white-space: normal;
  }

  .dispatch-site-header {
    display: grid;
  }

  .dispatch-site-code {
    max-width: 100%;
    justify-self: start;
  }

  .dispatch-alternative-table {
    display: block;
    overflow-x: auto;
  }
}

.organisation-user-action-row .organisation-user-edit-panel summary,
.organisation-user-action-row .organisation-user-reset-panel summary,
.organisation-user-action-row .organisation-user-inline-action button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 190px !important;
  min-width: 190px !important;
  max-width: 190px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

.organisation-user-card .organisation-user-action-row {
  grid-template-columns: repeat(auto-fit, 190px) !important;
}

.organisation-user-card .organisation-user-inline-action {
  width: 190px !important;
  max-width: 190px !important;
  margin: 0 !important;
}

.organisation-user-card button.organisation-user-action-button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 190px !important;
  min-width: 190px !important;
  max-width: 190px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: none !important;
  white-space: nowrap !important;
  border-radius: 8px !important;
}

.organisation-user-action-panels {
  margin-top: 10px;
}

.organisation-user-toggle-panel[hidden] {
  display: none !important;
}

/* Shared side rail collapse/expand. Expanded keeps the full rail; collapsed slides the rail off-canvas with a slim handle. */
@media (min-width: 761px) {
  .dash-shell {
    transition: grid-template-columns 220ms ease;
  }

  .side-rail {
    width: 248px;
    overflow: hidden;
    transform: translateX(0);
    transition: transform 220ms ease, border-color 180ms ease, box-shadow 180ms ease;
    will-change: transform;
  }

  .side-rail-pin-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    display: inline-grid;
    place-items: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid rgba(125, 139, 184, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(3, 5, 25, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
  }

  .side-rail-pin-toggle:hover,
  .side-rail-pin-toggle:focus-visible {
    border-color: rgba(245, 197, 66, 0.38);
    color: #FFFFFF;
    background: rgba(245, 197, 66, 0.12);
    outline: none;
  }

  .side-rail-pin-toggle span {
    position: relative;
    display: block;
    width: 14px;
    height: 14px;
  }

  .side-rail-pin-toggle span::before,
  .side-rail-pin-toggle span::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: currentColor;
    border-radius: 999px;
  }

  .side-rail-pin-toggle span::before {
    top: 1px;
    width: 12px;
    height: 8px;
    border: 2px solid currentColor;
    border-bottom: 0;
    background: transparent;
    border-radius: 6px 6px 2px 2px;
  }

  .side-rail-pin-toggle span::after {
    top: 8px;
    width: 2px;
    height: 7px;
  }

  .dash-shell[data-side-rail-expanded="false"] {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .dash-shell[data-side-rail-expanded="false"] .side-rail {
    z-index: 60;
    border-right-color: rgba(125, 139, 184, 0.16);
    box-shadow: 18px 0 44px rgba(0, 0, 0, 0.18);
    transform: translateX(-192px);
  }

  .dash-shell[data-side-rail-expanded="false"] .side-rail-pin-toggle {
    right: 12px;
    border-color: rgba(245, 197, 66, 0.22);
    background: rgba(5, 8, 36, 0.9);
  }

  .dash-shell[data-side-rail-expanded="false"] .side-rail-pin-toggle span::before {
    top: 2px;
    width: 14px;
    height: 2px;
    border: 0;
    background: currentColor;
    box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
  }

  .dash-shell[data-side-rail-expanded="false"] .side-rail-pin-toggle span::after {
    display: none;
  }

  .dash-shell[data-side-rail-expanded="false"] .brand-lockup,
  .dash-shell[data-side-rail-expanded="false"] .rail-nav,
  .dash-shell[data-side-rail-expanded="false"] .rail-product-lockup {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: opacity 140ms ease, transform 160ms ease;
  }

  .dash-shell[data-side-rail-expanded="false"] .side-rail::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    width: 22px;
    height: 62px;
    transform: translateY(-50%);
    border: 1px solid rgba(245, 197, 66, 0.22);
    border-radius: 999px;
    background:
      linear-gradient(rgba(245, 197, 66, 0.58), rgba(245, 197, 66, 0.58)) center 18px / 10px 2px no-repeat,
      linear-gradient(rgba(245, 197, 66, 0.42), rgba(245, 197, 66, 0.42)) center 30px / 10px 2px no-repeat,
      linear-gradient(rgba(245, 197, 66, 0.58), rgba(245, 197, 66, 0.58)) center 42px / 10px 2px no-repeat,
      rgba(5, 8, 36, 0.88);
    box-shadow: 0 0 24px rgba(245, 197, 66, 0.08);
    pointer-events: none;
  }
}

@media (max-width: 760px) {
  .side-rail-pin-toggle {
    display: none;
  }
}

/* Live Operations visual prototype - scoped to the home page classes only. */
.live-ops-command-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 18px;
  border: 1px solid rgba(125, 139, 184, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018) 48%, rgba(110, 231, 168, 0.035)),
    rgba(4, 7, 31, 0.82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(130%);
}

.live-ops-command-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 197, 66, 0.64), rgba(110, 231, 168, 0.48), transparent);
  opacity: 0.9;
}

.live-ops-command-header::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(120px, 18vw);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(245, 197, 66, 0.86));
}

.live-ops-command-header > div {
  position: relative;
  z-index: 1;
}

.live-ops-command-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #F5C542;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.live-ops-command-header .eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #6EE7A8;
  box-shadow: 0 0 18px rgba(110, 231, 168, 0.82);
}

.live-ops-command-header h1 {
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 700;
  line-height: 1.1;
}

.live-ops-command-header p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 7px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.live-ops-kpi-strip {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.live-ops-kpi {
  --tile-accent: #8B93A7;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 62px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--tile-accent) 28%, rgba(125, 139, 184, 0.18));
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--tile-accent) 13%, transparent), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(5, 8, 36, 0.86);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px) saturate(130%);
}

.live-ops-kpi[data-summary-card="activeResponders"] {
  --tile-accent: #6EE7A8;
}

.live-ops-kpi[data-summary-card="offDutyResponders"] {
  --tile-accent: #8B93A7;
}

.live-ops-kpi[data-summary-card="offDutyResponders"].attention {
  --tile-accent: #FF9F1C;
}

.live-ops-kpi[data-summary-card="activeDispatches"] {
  --tile-accent: #7AA8FF;
}

.live-ops-kpi[data-summary-card="slaBreached"] {
  --tile-accent: #6EE7A8;
}

.live-ops-kpi[data-summary-card="slaBreached"].timer-state-red {
  --tile-accent: #FF4D6D;
}

.live-ops-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--tile-accent) 22%, transparent), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 28%);
  opacity: 0.86;
  pointer-events: none;
}

.live-ops-kpi::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--tile-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--tile-accent) 82%, transparent);
}

.live-ops-kpi span,
.live-ops-kpi strong,
.live-ops-kpi small {
  position: relative;
  z-index: 1;
}

.live-ops-kpi span {
  max-width: calc(100% - 20px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  white-space: normal;
  text-overflow: clip;
}

.live-ops-kpi strong {
  margin-top: 2px;
  color: #FFFFFF;
  font-size: clamp(18px, 1.4vw, 24px);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.live-ops-kpi small {
  color: color-mix(in srgb, var(--tile-accent) 54%, #C7D2FE);
}

.live-ops-map-panel {
  position: relative;
  isolation: isolate;
  padding: 12px;
  border: 1px solid rgba(125, 139, 184, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.016)),
    rgba(3, 5, 25, 0.9);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px) saturate(130%);
}

.live-ops-map-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 168, 255, 0.5), rgba(245, 197, 66, 0.42), transparent);
  pointer-events: none;
}

.live-ops-map-panel .live-map-panel {
  position: relative;
  z-index: 1;
  gap: 12px;
}

.live-ops-map-panel .panel-head {
  min-height: 38px;
  margin: 0;
  padding: 0 2px 10px;
  border-bottom: 1px solid rgba(125, 139, 184, 0.12);
}

.live-ops-map-panel .panel-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-ops-map-panel .panel-head h2::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid rgba(110, 231, 168, 0.75);
  border-radius: 999px;
  background: rgba(110, 231, 168, 0.24);
  box-shadow: 0 0 16px rgba(110, 231, 168, 0.5);
}

.live-ops-map-panel .live-map-canvas {
  height: calc(100vh - 360px);
  min-height: 340px;
  max-height: 1400px;
  border: 1px solid rgba(125, 139, 184, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(125, 139, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 139, 184, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(122, 168, 255, 0.06), transparent 58%),
    #020414;
  background-size: 54px 54px, 54px 54px, auto, auto;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 -46px 80px rgba(0, 0, 0, 0.22);
}

.live-ops-map-panel .map-provider-chip {
  right: 12px;
  bottom: 12px;
  border-color: rgba(125, 139, 184, 0.22);
  color: rgba(226, 232, 240, 0.78);
  background: rgba(3, 5, 25, 0.74);
  backdrop-filter: blur(12px);
}

.live-ops-map-panel .map-fallback-note,
.live-ops-map-panel .map-empty-state {
  border-color: rgba(125, 139, 184, 0.18);
  background: rgba(3, 5, 25, 0.76);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.live-ops-map-panel .responder-map-popover {
  width: min(340px, calc(100% - 24px));
}

.live-ops-map-panel .responder-map-popover-card {
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(226, 232, 240, 0.13);
  border-top: 3px solid var(--popover-accent);
  border-left: 1px solid rgba(226, 232, 240, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--popover-accent) 12%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(4, 7, 31, 0.86);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px) saturate(140%);
}

.live-ops-map-panel .responder-map-popover-card header {
  align-items: center;
}

.live-ops-map-panel .responder-map-popover-card header strong {
  font-size: 15px;
  font-weight: 700;
}

.live-ops-map-panel .responder-map-popover-card header span {
  border-color: color-mix(in srgb, var(--popover-accent) 48%, transparent);
  color: var(--popover-accent);
  background: color-mix(in srgb, var(--popover-accent) 14%, transparent);
  font-weight: 700;
}

.live-ops-map-panel .responder-map-popover-card dl {
  gap: 7px;
}

.live-ops-map-panel .responder-map-popover-card dl div {
  grid-template-columns: 112px minmax(0, 1fr);
  padding-top: 7px;
  border-top: 1px solid rgba(226, 232, 240, 0.08);
}

.live-ops-map-panel .responder-map-popover-card dl div:first-child {
  padding-top: 0;
  border-top: 0;
}

.live-ops-map-panel .responder-map-popover-card dt {
  color: rgba(226, 232, 240, 0.58);
}

.live-ops-map-panel .responder-map-popover-card dd {
  color: rgba(255, 255, 255, 0.92);
}

.live-ops-map-panel .responder-map-popover-note {
  color: rgba(226, 232, 240, 0.72);
}

.live-ops-map-panel .map-marker.site {
  border-color: #F5C542;
  background: rgba(3, 5, 25, 0.92);
  box-shadow: 0 0 0 9px rgba(245, 197, 66, 0.14), 0 0 28px rgba(245, 197, 66, 0.72);
}

.live-ops-map-panel .dash-google-overlay-marker.responder-cluster:hover,
.live-ops-map-panel .dash-google-overlay-marker.responder-cluster:focus-visible {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.44) !important;
}

@media (max-width: 1080px) {
  .live-ops-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-ops-map-panel .live-map-canvas {
    min-height: 500px;
  }
}

@media (max-width: 760px) {
  .live-ops-command-header {
    padding: 16px;
  }

  .live-ops-kpi-strip {
    grid-template-columns: 1fr;
  }

  .live-ops-kpi {
    min-height: 84px;
  }

  .live-ops-map-panel {
    padding: 10px;
  }

  .live-ops-map-panel .live-map-canvas {
    min-height: 420px;
  }
}

/* Live Operations topbar prototype. Uses :has() so the shared layout changes only on the home page. */
.dash-shell:has(.live-ops-command-header) .topbar {
  --live-ops-session-indicator: #00E676;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, auto) minmax(240px, 0.8fr);
  gap: 12px;
  align-items: center;
  min-height: 64px;
  margin: 0 0 10px;
  padding: 10px 16px;
  border: 1px solid rgba(125, 139, 184, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 25, 0.82);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(140%);
}

.dash-shell[data-live-ops-idle-state="warning"]:has(.live-ops-command-header) .topbar {
  --live-ops-session-indicator: #FF9F1C;
}

.dash-shell[data-live-ops-idle-state="critical"]:has(.live-ops-command-header) .topbar,
.dash-shell[data-live-ops-idle-state="locked"]:has(.live-ops-command-header) .topbar {
  --live-ops-session-indicator: #FF4D6D;
}

.dash-shell:has(.live-ops-command-header) .topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 168, 0.48), rgba(122, 168, 255, 0.42), transparent);
  pointer-events: none;
}

.dash-shell:has(.live-ops-command-header) .topbar-title h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.dash-shell:has(.live-ops-command-header) .topbar-title h1::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--live-ops-session-indicator) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--live-ops-session-indicator) 30%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--live-ops-session-indicator) 68%, transparent);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.dash-shell:has(.live-ops-command-header) .topbar-organisation {
  justify-content: center;
  min-width: 0;
}

.dash-shell:has(.live-ops-command-header) .topbar .global-organisation-selector {
  display: grid;
  grid-template-columns: auto minmax(120px, auto);
  gap: 10px;
  align-items: center;
  max-width: min(520px, 100%);
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid rgba(125, 139, 184, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(5, 8, 36, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.dash-shell:has(.live-ops-command-header) .topbar .global-organisation-selector::before {
  content: "Org";
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(122, 168, 255, 0.24);
  border-radius: 999px;
  color: #7AA8FF;
  background: rgba(122, 168, 255, 0.09);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.dash-shell:has(.live-ops-command-header) .topbar .global-organisation-selector span {
  display: none;
}

.dash-shell:has(.live-ops-command-header) .topbar .global-organisation-selector strong,
.dash-shell:has(.live-ops-command-header) .topbar .global-organisation-selector select {
  min-width: 0;
  max-width: 320px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-shell:has(.live-ops-command-header) .topbar .global-organisation-selector select {
  width: 100%;
  min-height: 30px;
  padding: 0 26px 0 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dash-shell:has(.live-ops-command-header) .topbar .global-organisation-selector.muted {
  opacity: 0.72;
}

.dash-shell:has(.live-ops-command-header) .user-strip {
  justify-self: end;
  display: grid;
  grid-template-columns: 34px minmax(120px, auto) auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 5px 6px 5px 6px;
  border: 1px solid rgba(125, 139, 184, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(5, 8, 36, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.dash-shell:has(.live-ops-command-header) .user-strip::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--live-ops-session-indicator) 72%, transparent);
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--live-ops-session-indicator) 58%, transparent), rgba(122, 168, 255, 0.1)),
    rgba(3, 5, 25, 0.88);
  box-shadow: 0 0 24px color-mix(in srgb, var(--live-ops-session-indicator) 54%, transparent);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.dash-shell:has(.live-ops-command-header) .user-strip span {
  min-width: 0;
  max-width: min(260px, 22vw);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-shell:has(.live-ops-command-header) .user-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 77, 109, 0.2);
  border-radius: 8px;
  color: #FF8FA3;
  background: rgba(255, 77, 109, 0.08);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.dash-shell:has(.live-ops-command-header) .user-strip a:hover {
  border-color: rgba(255, 77, 109, 0.36);
  color: #FFFFFF;
  background: rgba(255, 77, 109, 0.16);
}

@media (max-width: 1180px) {
  .dash-shell:has(.live-ops-command-header) .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  }

  .dash-shell:has(.live-ops-command-header) .topbar-organisation {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: start;
  }

  .dash-shell:has(.live-ops-command-header) .user-strip {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 760px) {
  .dash-shell:has(.live-ops-command-header) .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dash-shell:has(.live-ops-command-header) .topbar-organisation,
  .dash-shell:has(.live-ops-command-header) .user-strip {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
  }

  .dash-shell:has(.live-ops-command-header) .topbar .global-organisation-selector {
    max-width: none;
  }

  .dash-shell:has(.live-ops-command-header) .user-strip {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .dash-shell:has(.live-ops-command-header) .user-strip span {
    max-width: none;
  }
}

/* Login operational console refresh. Scoped to Login.cshtml only. */
.login-shell {
  --login-console-bg: #020414;
  --login-console-panel: rgba(5, 8, 36, 0.8);
  --login-console-line: rgba(125, 139, 184, 0.18);
  --login-console-muted: rgba(226, 232, 240, 0.68);
  --login-console-green: #00E676;
  --login-console-blue: #7AA8FF;
  --login-console-gold: #F5C542;
  grid-template-columns: minmax(220px, 0.72fr) minmax(460px, 600px) minmax(240px, 0.72fr);
  gap: clamp(24px, 4vw, 62px);
  align-items: center;
  padding: clamp(28px, 4vw, 56px);
  background:
    linear-gradient(180deg, rgba(3, 5, 29, 0.96) 0%, rgba(1, 3, 18, 0.99) 58%, #01020E 100%),
    var(--login-console-bg);
}

.login-shell::before {
  opacity: 0.2;
  background:
    linear-gradient(rgba(125, 139, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 139, 184, 0.045) 1px, transparent 1px),
    linear-gradient(120deg, transparent 0 42%, rgba(122, 168, 255, 0.035) 42.5%, transparent 43% 64%, rgba(245, 197, 66, 0.03) 64.5%, transparent 65%);
  background-size: 72px 72px, 72px 72px, auto;
  mask-image: linear-gradient(90deg, transparent 0, black 16%, black 86%, transparent 100%);
}

.login-shell::after {
  opacity: 0.72;
  background:
    linear-gradient(145deg, transparent 0 24%, rgba(0, 230, 118, 0.032) 24.4%, transparent 25% 66%, rgba(122, 168, 255, 0.03) 66.4%, transparent 67%),
    radial-gradient(ellipse at center, transparent 0 52%, rgba(0, 0, 0, 0.58) 100%);
}

.login-atmosphere {
  opacity: 0.9;
}

.map-region {
  opacity: 0.16;
  filter: none;
  background-image: radial-gradient(circle, rgba(122, 168, 255, 0.42) 0 1px, transparent 1.4px);
  background-size: 12px 12px;
}

.route-line {
  opacity: 0.3;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.34), rgba(245, 197, 66, 0.32), transparent);
}

.route-line::after {
  border-color: rgba(0, 230, 118, 0.66);
  background: rgba(2, 4, 20, 0.94);
  box-shadow: 0 0 18px rgba(0, 230, 118, 0.32);
}

.login-panel {
  width: min(600px, 100%);
  padding: clamp(32px, 4vw, 50px);
  border: 1px solid var(--login-console-line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018) 48%, rgba(0, 230, 118, 0.035)),
    var(--login-console-panel);
  box-shadow:
    0 34px 96px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(245, 197, 66, 0.055);
  backdrop-filter: blur(18px) saturate(135%);
}

.login-panel::before {
  background:
    linear-gradient(90deg, transparent, rgba(245, 197, 66, 0.62), rgba(0, 230, 118, 0.48), transparent) top / 70% 1px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 28%);
}

.login-brand {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom-color: rgba(125, 139, 184, 0.14);
}

.login-brand-logo {
  width: clamp(252px, 28vw, 342px);
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.32));
}

.login-title-group {
  gap: 10px;
  margin-bottom: 4px;
}

.login-title-group h1 {
  color: #FFFFFF;
  font-size: clamp(30px, 2.45vw, 38px);
  font-weight: 700;
}

.login-title-group .login-platform-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(245, 197, 66, 0.95);
  font-size: clamp(14px, 1vw, 17px);
  font-weight: 700;
}

.login-title-group .login-platform-title::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid rgba(0, 230, 118, 0.72);
  border-radius: 999px;
  background: rgba(0, 230, 118, 0.26);
  box-shadow: 0 0 18px rgba(0, 230, 118, 0.58);
}

.login-title-rule {
  width: 52px;
  background: linear-gradient(90deg, transparent, var(--login-console-gold), var(--login-console-green), transparent);
}

.login-title-group p {
  color: var(--login-console-muted);
  font-size: 14px;
}

.login-panel .stack-form {
  gap: 16px;
}

.login-panel .stack-form label {
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-panel .stack-form input {
  min-height: 54px;
  border-color: rgba(125, 139, 184, 0.2);
  border-radius: 8px;
  color: #FFFFFF;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(2, 4, 20, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.login-panel .stack-form input:focus {
  border-color: rgba(0, 230, 118, 0.52);
  box-shadow:
    0 0 0 4px rgba(0, 230, 118, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-panel .stack-form input:-webkit-autofill,
.login-panel .stack-form input:-webkit-autofill:hover,
.login-panel .stack-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #FFFFFF;
  caret-color: #FFFFFF;
  box-shadow: 0 0 0 1000px #050824 inset, 0 0 0 4px rgba(0, 230, 118, 0.11);
}

.login-input-icon-user::before,
.login-input-icon-user::after {
  border-color: rgba(122, 168, 255, 0.92);
}

.login-input-icon-lock::before,
.login-input-icon-lock::after {
  border-color: rgba(245, 197, 66, 0.9);
}

.login-input-icon-user::after {
  background: #050824;
}

.login-password-toggle {
  color: rgba(245, 197, 66, 0.92);
}

.login-panel .login-password-toggle:focus-visible {
  outline-color: rgba(0, 230, 118, 0.42);
}

.login-panel .primary-command {
  min-height: 58px;
  margin-top: 8px;
  border-color: rgba(245, 197, 66, 0.44);
  border-radius: 8px;
  color: #020414;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 44%),
    linear-gradient(135deg, #F5C542, #D4AF37 72%, #B89424);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(245, 197, 66, 0.12);
  font-size: 16px;
  font-weight: 700;
}

.login-panel .primary-command:hover,
.login-panel .primary-command:focus-visible {
  filter: brightness(1.05);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.38),
    0 0 30px rgba(245, 197, 66, 0.16);
}

.login-security-note {
  margin-top: 6px;
  padding-top: 18px;
  border-top-color: rgba(125, 139, 184, 0.14);
}

.login-security-note > span {
  width: 40px;
  height: 40px;
  border-color: rgba(0, 230, 118, 0.48);
  border-radius: 8px;
  background: rgba(0, 230, 118, 0.08);
}

.login-security-note > span::before {
  border-color: rgba(0, 230, 118, 0.9);
}

.login-security-note strong {
  color: rgba(255, 255, 255, 0.92);
}

.login-security-note small {
  color: var(--login-console-muted);
}

.login-system-card {
  border-color: rgba(125, 139, 184, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.074), rgba(255, 255, 255, 0.018)),
    rgba(5, 8, 36, 0.72);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px) saturate(130%);
}

.login-system-card > strong {
  color: rgba(245, 197, 66, 0.95);
  border-bottom-color: rgba(125, 139, 184, 0.14);
}

.login-system-card span {
  border-bottom-color: rgba(125, 139, 184, 0.12);
}

.login-system-card small {
  color: var(--login-console-muted);
}

.login-system-card em {
  color: var(--login-console-green);
  font-weight: 700;
}

.login-system-card em::after {
  background: var(--login-console-green);
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.54);
}

.login-footer {
  border-top-color: rgba(125, 139, 184, 0.14);
  color: rgba(226, 232, 240, 0.62);
}

.login-footer span:first-child {
  color: rgba(0, 230, 118, 0.86);
}

.login-footer strong {
  color: #FF8FA3;
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .login-shell {
    padding: 16px;
  }

  .login-panel {
    padding: 24px;
  }
}

/* Global app operational console refresh. Scoped to authenticated Dash shell pages. */
body.dash-shell {
  --app-console-bg: #020414;
  --app-console-bg-2: #050824;
  --app-console-panel: rgba(7, 11, 45, 0.78);
  --app-console-panel-strong: rgba(10, 16, 56, 0.92);
  --app-console-panel-soft: rgba(255, 255, 255, 0.045);
  --app-console-line: rgba(125, 139, 184, 0.18);
  --app-console-line-strong: rgba(245, 197, 66, 0.34);
  --app-console-text: rgba(255, 255, 255, 0.94);
  --app-console-muted: rgba(226, 232, 240, 0.68);
  --app-console-green: #00E676;
  --app-console-blue: #7AA8FF;
  --app-console-gold: #F5C542;
  --app-console-red: #FF4D6D;
  --app-console-amber: #FF9F1C;
  --app-console-shadow: 0 22px 56px rgba(0, 0, 0, 0.36);
  --app-console-shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.24);
  min-height: 100vh;
  color: var(--app-console-text);
  background:
    linear-gradient(rgba(125, 139, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 139, 184, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(6, 10, 38, 0.98), #020414 46%, #01020E);
  background-size: 72px 72px, 72px 72px, auto;
}

body.dash-shell::before {
  opacity: 0.2;
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(0, 230, 118, 0.035) 31%, transparent 32% 66%, rgba(245, 197, 66, 0.035) 67%, transparent 68%),
    linear-gradient(180deg, rgba(122, 168, 255, 0.035), transparent 260px);
  background-size: auto;
  mask-image: linear-gradient(90deg, transparent 0, black 16%, black 88%, transparent 100%);
}

body.dash-shell::after {
  display: block;
  opacity: 0.5;
  background:
    linear-gradient(180deg, transparent 0 62%, rgba(0, 0, 0, 0.44) 100%),
    radial-gradient(ellipse at center, transparent 0 58%, rgba(0, 0, 0, 0.36) 100%);
}

body.dash-shell .workbench {
  padding: 10px 14px;
}

body.dash-shell .content-frame {
  min-width: 0;
}

body.dash-shell .side-rail {
  border-right-color: rgba(125, 139, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(8, 12, 43, 0.96), rgba(1, 2, 14, 0.98)),
    #020414;
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(130%);
}

body.dash-shell .brand-lockup,
body.dash-shell .rail-product-lockup {
  border-color: rgba(125, 139, 184, 0.16);
}

body.dash-shell .brand-logo {
  width: min(210px, 100%);
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.26));
}

body.dash-shell .rail-product-lockup strong {
  color: #FFFFFF;
}

body.dash-shell .rail-product-lockup small {
  color: rgba(245, 197, 66, 0.86);
}

body.dash-shell .rail-nav a {
  min-height: 42px;
  border-color: transparent;
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.76);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

body.dash-shell .rail-nav a:hover,
body.dash-shell .rail-nav a:focus-visible,
body.dash-shell .rail-nav a[aria-current="page"] {
  border-color: rgba(122, 168, 255, 0.24);
  color: #FFFFFF;
  background:
    linear-gradient(90deg, rgba(0, 230, 118, 0.09), rgba(122, 168, 255, 0.06)),
    rgba(255, 255, 255, 0.045);
  transform: translateX(2px);
  outline: none;
}

body.dash-shell .rail-nav a::before {
  background: transparent;
}

body.dash-shell .rail-nav a:hover::before,
body.dash-shell .rail-nav a:focus-visible::before,
body.dash-shell .rail-nav a[aria-current="page"]::before {
  background: rgba(0, 230, 118, 0.56);
}

body.dash-shell .side-rail-pin-toggle {
  border-color: rgba(125, 139, 184, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(5, 8, 36, 0.88);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

body.dash-shell .side-rail-pin-toggle:hover,
body.dash-shell .side-rail-pin-toggle:focus-visible {
  border-color: rgba(0, 230, 118, 0.44);
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.1);
}

body.dash-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-template-columns: minmax(180px, 0.82fr) minmax(260px, auto) minmax(240px, 0.82fr);
  gap: 12px;
  align-items: center;
  min-height: 64px;
  margin: 0 0 12px;
  padding: 10px 16px;
  border: 1px solid var(--app-console-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 25, 0.82);
  box-shadow: var(--app-console-shadow-soft);
  backdrop-filter: blur(18px) saturate(140%);
}

body.dash-shell .topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.38), rgba(122, 168, 255, 0.32), transparent);
  pointer-events: none;
}

body.dash-shell .topbar-title h1 {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(17px, 1.3vw, 22px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dash-shell .topbar-organisation {
  justify-content: center;
  min-width: 0;
}

body.dash-shell .global-organisation-selector,
body.dash-shell .user-strip {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--app-console-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.068), rgba(255, 255, 255, 0.018)),
    rgba(5, 8, 36, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body.dash-shell .global-organisation-selector {
  display: grid;
  grid-template-columns: auto minmax(120px, auto);
  gap: 10px;
  align-items: center;
  max-width: min(520px, 100%);
  padding: 6px 12px;
}

body.dash-shell .global-organisation-selector::before {
  content: "Org";
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid rgba(122, 168, 255, 0.24);
  border-radius: 999px;
  color: var(--app-console-blue);
  background: rgba(122, 168, 255, 0.09);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.dash-shell .global-organisation-selector span {
  display: none;
}

body.dash-shell .global-organisation-selector strong,
body.dash-shell .global-organisation-selector select {
  min-width: 0;
  max-width: 320px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dash-shell .global-organisation-selector select {
  width: 100%;
  min-height: 30px;
  padding: 0 26px 0 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.dash-shell .global-organisation-selector.muted {
  opacity: 0.72;
}

body.dash-shell .user-strip {
  justify-self: end;
  display: grid;
  grid-template-columns: 30px minmax(110px, auto) auto;
  gap: 9px;
  align-items: center;
  max-width: 100%;
  padding: 5px 6px;
}

body.dash-shell .user-strip::before {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 230, 118, 0.68);
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(145deg, rgba(0, 230, 118, 0.58), rgba(122, 168, 255, 0.1)),
    rgba(3, 5, 25, 0.88);
  box-shadow: 0 0 22px rgba(0, 230, 118, 0.46);
}

body.dash-shell[data-live-ops-idle-state="warning"] .user-strip::before {
  border-color: rgba(255, 159, 28, 0.68);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(145deg, rgba(255, 159, 28, 0.62), rgba(245, 197, 66, 0.12)),
    rgba(3, 5, 25, 0.88);
  box-shadow: 0 0 22px rgba(255, 159, 28, 0.4);
}

body.dash-shell[data-live-ops-idle-state="critical"] .user-strip::before,
body.dash-shell[data-live-ops-idle-state="locked"] .user-strip::before {
  border-color: rgba(255, 77, 109, 0.68);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.26), transparent 28%),
    linear-gradient(145deg, rgba(255, 77, 109, 0.62), rgba(255, 143, 163, 0.1)),
    rgba(3, 5, 25, 0.88);
  box-shadow: 0 0 22px rgba(255, 77, 109, 0.4);
}

body.dash-shell .user-strip span {
  min-width: 0;
  max-width: min(260px, 22vw);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dash-shell .user-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 77, 109, 0.2);
  border-radius: 8px;
  color: #FF8FA3;
  background: rgba(255, 77, 109, 0.08);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

body.dash-shell .user-strip a:hover,
body.dash-shell .user-strip a:focus-visible {
  border-color: rgba(255, 77, 109, 0.36);
  color: #FFFFFF;
  background: rgba(255, 77, 109, 0.16);
  outline: none;
}

body.dash-shell :where(.page-header, .command-header, .dashboard-hero, .client-viewer-hero, .integration-health-hero, .live-ops-command-header, .settings-page-header) {
  border: 1px solid var(--app-console-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.018) 48%, rgba(0, 230, 118, 0.026)),
    rgba(5, 8, 36, 0.76);
  box-shadow: var(--app-console-shadow-soft);
  backdrop-filter: blur(16px) saturate(132%);
}

body.dash-shell :where(.page-header, .command-header, .dashboard-hero, .client-viewer-hero, .integration-health-hero, .settings-page-header) {
  padding: clamp(16px, 2vw, 24px);
}

body.dash-shell :where(.page-header, .command-header, .dashboard-hero, .client-viewer-hero, .integration-health-hero, .live-ops-command-header, .settings-page-header) h1,
body.dash-shell :where(.page-header, .command-header, .dashboard-hero, .client-viewer-hero, .integration-health-hero, .live-ops-command-header, .settings-page-header) h2 {
  color: #FFFFFF;
  letter-spacing: 0;
}

body.dash-shell :where(.page-header, .command-header, .dashboard-hero, .client-viewer-hero, .integration-health-hero, .live-ops-command-header, .settings-page-header) p {
  color: var(--app-console-muted);
}

body.dash-shell :where(.eyebrow, .muted-note, .panel-muted, small) {
  color: var(--app-console-muted);
  letter-spacing: 0;
}

body.dash-shell :where(.panel, .metric-card, .form-card, .detail-card, .placeholder-card, .tracking-card, .dispatch-incident-card, .dispatch-offer-card, .client-outcome-card, .download-card, .download-documents, .admin-user-management-card, .admin-access-card, .admin-multi-org-card, .admin-access-create-card, .admin-user-create-card, .organisation-user-card, .checklist-version-card, .integration-card, .evidence-card, .compact-panel, .nested-panel, .settings-test-result, .settings-note, .service-health-list > span, .integration-diagnostic-row, .integration-readiness-card) {
  border: 1px solid var(--app-console-line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.018)),
    var(--app-console-panel);
  box-shadow: var(--app-console-shadow-soft);
}

body.dash-shell :where(.panel, .metric-card, .form-card, .detail-card, .placeholder-card, .tracking-card, .dispatch-incident-card, .dispatch-offer-card, .client-outcome-card, .admin-user-management-card, .admin-access-card, .admin-multi-org-card, .admin-access-create-card, .admin-user-create-card, .organisation-user-card, .checklist-version-card, .integration-card, .evidence-card, .compact-panel, .nested-panel) {
  backdrop-filter: blur(12px) saturate(128%);
}

body.dash-shell :where(.metric-card, .live-ops-kpi, .settings-status-card) {
  background:
    linear-gradient(180deg, rgba(13, 20, 70, 0.94), rgba(5, 8, 36, 0.96)),
    var(--app-console-bg-2);
}

body.dash-shell .metric-card::after {
  height: 3px;
  opacity: 0.86;
  background: linear-gradient(90deg, var(--app-console-green), var(--app-console-blue));
}

body.dash-shell .metric-card.gold::after {
  background: linear-gradient(90deg, var(--app-console-gold), #D4AF37);
}

body.dash-shell .metric-card.critical::after,
body.dash-shell .metric-card.timer-card.timer-state-red::after {
  background: linear-gradient(90deg, var(--app-console-red), #FF8FA3);
}

body.dash-shell .metric-card strong {
  color: #FFFFFF;
}

body.dash-shell .metric-card span,
body.dash-shell .metric-card small,
body.dash-shell .dense-list span,
body.dash-shell .dense-list em {
  color: var(--app-console-muted);
}

body.dash-shell .panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(125, 139, 184, 0.14);
}

body.dash-shell .panel-head h2,
body.dash-shell .panel-head h3 {
  color: #FFFFFF;
  letter-spacing: 0;
}

body.dash-shell :where(.feed-row, .dense-list li, .timeline span, .kpi-stack span, .tracking-card > div, .live-ops-snapshot-grid span, .manual-site-summary, .site-search-result, .dispatch-active-row, .admin-user-management-meta, .admin-access-card-meta, .admin-access-card-status, .integration-diagnostic-row, .settings-form-section, .builder-question-card, .table-grid > *) {
  border-color: rgba(125, 139, 184, 0.14);
  border-radius: 8px;
  background: rgba(3, 5, 25, 0.58);
}

body.dash-shell :where(.feed-row, .dense-list li, .tracking-card > div, .site-search-result, .dispatch-incident-card, .dispatch-offer-card, .client-outcome-card, .admin-user-management-card, .admin-access-card, .evidence-card) {
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

body.dash-shell :where(.feed-row, .dense-list li, .tracking-card > div, .site-search-result, .dispatch-incident-card, .dispatch-offer-card, .client-outcome-card, .admin-user-management-card, .admin-access-card, .evidence-card):hover {
  border-color: rgba(245, 197, 66, 0.28);
  background-color: rgba(245, 197, 66, 0.055);
  transform: translateY(-1px);
}

body.dash-shell :where(.table-wrap, .data-table, .table-grid, .report-table) {
  border: 1px solid rgba(125, 139, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 5, 25, 0.72);
  box-shadow: var(--app-console-shadow-soft);
  overflow: hidden;
}

body.dash-shell .table-wrap table {
  width: 100%;
  border-collapse: collapse;
  color: var(--app-console-text);
}

body.dash-shell :where(.table-wrap table thead, .table-grid > *:first-child) {
  background: rgba(10, 16, 56, 0.94);
}

body.dash-shell :where(.table-wrap th, .table-wrap td) {
  border-color: rgba(125, 139, 184, 0.12);
}

body.dash-shell :where(.table-wrap th, .table-grid > *:first-child) {
  color: rgba(226, 232, 240, 0.82);
  font-weight: 700;
  letter-spacing: 0;
}

body.dash-shell :where(.table-wrap tbody tr, .table-grid > *:not(:first-child)) {
  transition: background-color 140ms ease;
}

body.dash-shell :where(.table-wrap tbody tr:hover, .table-grid > *:not(:first-child):hover) {
  background: rgba(245, 197, 66, 0.055);
}

body.dash-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  min-height: 40px;
  border-color: rgba(125, 139, 184, 0.2);
  border-radius: 8px;
  color: #FFFFFF;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(2, 4, 20, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.038);
}

body.dash-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea):focus {
  border-color: rgba(0, 230, 118, 0.5);
  box-shadow:
    0 0 0 4px rgba(0, 230, 118, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  outline: none;
}

body.dash-shell :where(input, textarea)::placeholder {
  color: rgba(226, 232, 240, 0.42);
}

body.dash-shell select option {
  color: #FFFFFF;
  background: #050824;
}

body.dash-shell :where(label, .inline-field, .checkbox-field, .check-row) {
  color: rgba(226, 232, 240, 0.78);
}

body.dash-shell :where(button:not(.side-rail-pin-toggle), .primary-command, .secondary-command, .danger-command, .link-command, .command-link, .download-command, .document-link) {
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

body.dash-shell :where(button:not(.side-rail-pin-toggle), .primary-command, .secondary-command, .danger-command, .link-command, .command-link, .download-command, .document-link):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

body.dash-shell :where(button:not(.side-rail-pin-toggle), .secondary-command, .document-link, .command-link, .link-command) {
  border-color: rgba(125, 139, 184, 0.2);
  color: #FFFFFF;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(7, 11, 45, 0.88);
}

body.dash-shell :where(.primary-command, .download-command) {
  border-color: rgba(245, 197, 66, 0.58);
  color: #020414;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 44%),
    linear-gradient(135deg, #F5C542, #D4AF37 72%, #B89424);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

body.dash-shell :where(.danger-command) {
  border-color: rgba(255, 77, 109, 0.34);
  color: #FF8FA3;
  background: rgba(255, 77, 109, 0.08);
}

body.dash-shell :where(.chip, .status-badge, .priority-badge, .timer-pill) {
  min-height: 28px;
  border-radius: 999px;
  border-color: rgba(122, 168, 255, 0.22);
  color: rgba(226, 232, 240, 0.84);
  background: rgba(122, 168, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dash-shell :where(.gold-chip, .priority-badge, .timer-pill.timer-state-yellow) {
  border-color: rgba(245, 197, 66, 0.38);
  color: var(--app-console-gold);
  background: rgba(245, 197, 66, 0.1);
}

body.dash-shell :where(.success-chip, .status-badge.status-ok, .timer-pill.timer-state-green) {
  border-color: rgba(0, 230, 118, 0.36);
  color: var(--app-console-green);
  background: rgba(0, 230, 118, 0.09);
}

body.dash-shell :where(.danger-chip, .alert-chip, .status-badge.critical, .priority-badge.critical, .timer-pill.timer-state-red) {
  border-color: rgba(255, 77, 109, 0.36);
  color: #FF8FA3;
  background: rgba(255, 77, 109, 0.09);
}

body.dash-shell :where(.notice, .empty-state, .live-ops-empty-state, .integration-notice, .settings-note) {
  border: 1px solid rgba(245, 197, 66, 0.24);
  border-radius: 8px;
  color: rgba(255, 244, 214, 0.9);
  background: rgba(245, 197, 66, 0.08);
}

body.dash-shell :where(.alert, .validation-summary-errors) {
  border: 1px solid rgba(255, 77, 109, 0.28);
  border-radius: 8px;
  color: #FFB1C0;
  background: rgba(255, 77, 109, 0.08);
}

body.dash-shell :where(a:not(.brand-lockup):not(.rail-nav a):not(.user-strip a):not(.primary-command):not(.secondary-command):not(.danger-command):not(.document-link):not(.command-link)) {
  color: rgba(122, 168, 255, 0.92);
}

body.dash-shell :where(a:not(.brand-lockup):not(.rail-nav a):not(.user-strip a):hover) {
  color: #FFFFFF;
}

body.dash-shell :where(.live-map-canvas, .map-visual) {
  border: 1px solid rgba(245, 197, 66, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(125, 139, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 139, 184, 0.035) 1px, transparent 1px),
    rgba(2, 4, 20, 0.92);
  background-size: 56px 56px;
}

body.dash-shell :where(.map-provider-chip, .hero-signal, .context-switch, .toolbar-band, .report-filter-grid, .settings-form-actions, .form-actions, .download-footer-actions) {
  border-color: rgba(125, 139, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 5, 25, 0.56);
}

body.dash-shell :where(.health-ok) {
  border-color: rgba(0, 230, 118, 0.28);
}

body.dash-shell :where(.health-warning, .settings-test-result.failed) {
  border-color: rgba(255, 159, 28, 0.32);
}

/* Evidence review cards: keep media and metadata separated without covering the image. */
body.dash-shell .evidence-panel .evidence-grid {
  grid-template-columns: 1fr;
  justify-items: stretch;
  align-items: start;
}

body.dash-shell .evidence-panel .dispatch-evidence-grid {
  grid-template-columns: 1fr;
}

body.dash-shell .evidence-panel .evidence-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  width: 100%;
  max-width: none;
  gap: 14px;
  align-items: stretch;
  position: relative;
  overflow: visible;
  isolation: isolate;
}

body.dash-shell .evidence-panel .evidence-thumb {
  grid-column: 1;
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  padding: 8px;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 43, 0.86);
}

body.dash-shell .evidence-panel .evidence-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  image-orientation: from-image;
}

body.dash-shell .evidence-panel .evidence-thumb.evidence-thumb-rotate-portrait {
  aspect-ratio: 3 / 4;
}

body.dash-shell .evidence-panel .evidence-thumb.evidence-thumb-rotate-portrait img {
  width: 133.333%;
  height: 75%;
  max-width: none;
  transform: rotate(90deg);
  transform-origin: center;
}

body.dash-shell .evidence-panel .evidence-download {
  grid-column: 1;
  width: 100%;
  min-height: 120px;
  padding: 14px;
  text-align: center;
}

body.dash-shell .evidence-panel .evidence-meta {
  position: relative;
  z-index: 0;
  grid-column: 2;
  grid-row: auto;
  align-self: start;
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 2px 0 2px 2px;
  overflow-wrap: anywhere;
}

body.dash-shell .evidence-panel .evidence-meta small {
  font-weight: 400;
  line-height: 1.36;
}

body.dash-shell .evidence-panel .evidence-meta .evidence-meta-label {
  color: #E5E7EB;
  font-weight: 600;
}

body.dash-shell .evidence-panel .evidence-watermark-details {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

body.dash-shell .evidence-panel .evidence-watermark-details summary {
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.78rem;
}

body.dash-shell .evidence-panel .evidence-watermark-details small {
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  body.dash-shell .evidence-panel .evidence-grid,
  body.dash-shell .evidence-panel .dispatch-evidence-grid {
    grid-template-columns: 1fr;
  }

  body.dash-shell .evidence-panel .evidence-card {
    grid-template-columns: 1fr;
    max-width: none;
  }

  body.dash-shell .evidence-panel .evidence-thumb,
  body.dash-shell .evidence-panel .evidence-download,
  body.dash-shell .evidence-panel .evidence-meta {
    grid-column: 1;
    grid-row: auto;
  }

  body.dash-shell .evidence-panel .evidence-meta {
    padding: 10px 2px 0;
  }
}

@media (max-width: 1180px) {
  body.dash-shell .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  }

  body.dash-shell .topbar-organisation {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: start;
  }

  body.dash-shell .user-strip {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 760px) {
  body.dash-shell .workbench {
    padding: 14px;
  }

  body.dash-shell .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    margin-inline: 0;
  }

  body.dash-shell .topbar-title h1 {
    white-space: normal;
  }

  body.dash-shell .topbar-organisation,
  body.dash-shell .user-strip {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
  }

  body.dash-shell .global-organisation-selector {
    max-width: none;
  }

  body.dash-shell .user-strip {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  body.dash-shell .user-strip span {
    max-width: none;
  }

  body.dash-shell :where(.page-header, .command-header, .dashboard-hero, .client-viewer-hero, .integration-health-hero, .settings-page-header) {
    padding: 14px;
  }
}

/* ============================================================================
   LIVE OPS — fill viewport, no scroll, no wasted gaps (2026-07-03)
   Flex chain through EVERY nesting level so the map canvas grows to fill:
   content-frame > live-ops-main-grid > live-ops-map-panel > live-map-panel > canvas.
   Scoped via :has() so only Live Operations becomes fixed-height; other pages
   keep normal scrolling.
   ========================================================================== */
.content-frame:has(.live-ops-main-grid) {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 104px);
  overflow: hidden;
}

.content-frame:has(.live-ops-main-grid) .live-ops-main-grid,
.content-frame:has(.live-ops-main-grid) .live-ops-map-panel,
.content-frame:has(.live-ops-main-grid) .live-map-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-frame:has(.live-ops-main-grid) .live-map-canvas {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

/* The tracking-card side list is hidden on the NOC live map; ensure the hidden
   attribute wins so it doesn't reserve an empty strip below the map. */
.content-frame:has(.live-ops-main-grid) .tracking-card-list[hidden] {
  display: none;
}

/* ============================================================================
   DISPATCH — merge the 5 stat cards into the title band (2026-07-03)
   Same pattern as Live Operations: title left, compact stats right.
   ========================================================================== */
.dispatch-command-header {
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  align-items: center;
}

.dispatch-command-header .dispatch-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin: 0;
}

.dispatch-command-header .dispatch-summary-strip .metric-card {
  min-height: 58px;
  padding: 8px 12px;
  gap: 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dispatch-command-header .dispatch-summary-strip .metric-card span {
  font-size: 9px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.15;
}

.dispatch-command-header .dispatch-summary-strip .metric-card strong {
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1;
}

.dispatch-command-header .dispatch-summary-strip .metric-card small {
  font-size: 9px;
  opacity: 0.7;
  line-height: 1.1;
}

.dispatch-command-header .dispatch-live-status {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
}

/* ============================================================================
   SITE-WIDE — compact stat strips merged into hero bands (2026-07-03)
   .hero-metrics is a priority-metrics strip that now lives inside .dashboard-hero
   (title left, stats right). Cards match the compact Live-Ops / Dispatch look.
   ========================================================================== */
.dashboard-hero .hero-metrics {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  gap: 8px;
  margin: 0;
}

.dashboard-hero .hero-metrics .metric-card {
  min-height: 58px;
  padding: 8px 12px;
  gap: 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-hero .hero-metrics .metric-card span {
  font-size: 9px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.15;
}

.dashboard-hero .hero-metrics .metric-card strong {
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1;
}

.dashboard-hero .hero-metrics .metric-card small {
  font-size: 9px;
  opacity: 0.7;
  line-height: 1.1;
}

/* Dispatch History keeps its single "Incidents" signal in the hero — compact it. */
.dashboard-hero .hero-signal {
  min-width: 0;
  gap: 0;
  padding: 6px 14px;
  justify-self: end;
}

.dashboard-hero .hero-signal span {
  font-size: 9px;
  letter-spacing: 0.03em;
}

.dashboard-hero .hero-signal strong {
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1.05;
}

.dashboard-hero .hero-signal small {
  font-size: 9px;
  opacity: 0.7;
}

/* ============================================================================
   SEARCHABLE DROPDOWNS (2026-07-03) — styling for the JS combobox overlay.
   ========================================================================== */
.ss-combo {
  position: relative;
  display: block;
}

/* Native select stays in the DOM (form source of truth) but is visually removed. */
.ss-native.ss-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.ss-input {
  width: 100%;
  min-height: 38px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--theme-text);
  background: rgba(255, 255, 255, 0.06)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23BBBDC0' stroke-width='1.5'/></svg>")
    no-repeat right 10px center;
  cursor: text;
}

.ss-input:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.55);
}

.ss-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--app-border-subtle);
  border-radius: var(--radius-sm);
  background: #0B1138;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  scrollbar-width: thin;
}

.ss-item {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--theme-text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-item:hover,
.ss-item.ss-active {
  background: rgba(212, 175, 55, 0.16);
}

.ss-item.ss-selected {
  color: var(--theme-secondary);
}

.ss-none {
  padding: 7px 10px;
  font-size: 12px;
  color: var(--muted-text);
}
