:root {
  --bg-top: #0067a8;
  --bg-bottom: #001018;
  --panel: rgba(239, 247, 252, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --line: rgba(80, 54, 45, 0.14);
  --text: #2b211d;
  --muted: #596670;
  --accent: #ff8200;
  --accent-deep: #e66d00;
  --accent-blue: #0067a8;
  --accent-blue-deep: #003f5f;
  --accent-gold: #ffd35a;
  --accent-soft: #ffe2bd;
  --ok: #2f6b4f;
  --warn: #9f3b22;
  --offline: #7a7a7a;
  --shadow: 0 18px 38px rgba(67, 31, 24, 0.14);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --mchs-stripe-orange: rgba(255, 130, 0, 0.96);
  --mchs-stripe-blue: rgba(0, 103, 168, 0.94);
  --mchs-stripe-shadow: rgba(0, 0, 0, 0.24);
  --mchs-grid-horizontal: rgba(255, 255, 255, 0.07);
  --mchs-grid-vertical: rgba(255, 255, 255, 0.05);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 2%, rgba(0, 115, 180, 0.62), transparent 34%),
    radial-gradient(circle at 82% 88%, rgba(0, 0, 0, 0.22), transparent 34%),
    linear-gradient(180deg, #006aa6 0%, #003f5f 42%, #001725 72%, #00090d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to top,
      transparent 0,
      transparent 28px,
      var(--mchs-stripe-orange) 28px,
      var(--mchs-stripe-orange) 42px,
      var(--mchs-stripe-blue) 42px,
      var(--mchs-stripe-blue) 50px,
      var(--mchs-stripe-orange) 50px,
      var(--mchs-stripe-orange) 62px,
      transparent 62px,
      transparent 100%
    ),
    linear-gradient(var(--mchs-grid-horizontal) 1px, transparent 1px),
    linear-gradient(90deg, var(--mchs-grid-vertical) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) 0 calc(48px + env(safe-area-inset-bottom));
}

.hidden {
  display: none !important;
}

.hero,
.panel,
.auth-card,
.auth-copy {
  border: 1px solid rgba(99, 73, 58, 0.1);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.auth-shell {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;
}

.auth-copy,
.auth-card,
.hero,
.panel {
  border-radius: var(--radius-xl);
}

.auth-copy {
  padding: 40px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(246, 252, 255, 0.95), rgba(221, 239, 249, 0.88)),
    radial-gradient(circle at 82% 22%, rgba(255, 130, 0, 0.2), transparent 30%);
}

.auth-copy::after {
  content: "";
  position: absolute;
  inset: auto -42px -38px auto;
  width: 220px;
  height: 220px;
  pointer-events: none;
  border: 18px solid rgba(142, 23, 15, 0.08);
  border-radius: 50%;
}

.auth-copy > * {
  position: relative;
  z-index: 1;
}

.auth-brand,
.service-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-brand {
  margin-bottom: 16px;
}

.mchs-emblem-shell {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow:
    0 16px 28px rgba(0, 13, 24, 0.26);
}

.mchs-emblem-shell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mchs-emblem-shell-large {
  width: 128px;
  height: 128px;
}

.brand-title {
  margin: 0;
  color: var(--accent-blue-deep);
  font-size: clamp(1.65rem, 4vw, 3.35rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 0.9;
  text-transform: uppercase;
}

.brand-title-compact {
  color: #f7fbff;
  font-size: clamp(1.35rem, 2.3vw, 2.1rem);
  text-shadow: 0 2px 10px rgba(0, 8, 18, 0.4);
}

.brand-subtitle {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: clamp(1rem, 1.4vw, 1.45rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-subtitle-compact {
  margin-top: 4px;
  color: var(--accent);
  font-size: 0.82rem;
}

.auth-copy h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.8rem, 4.5vw, 4.8rem);
  line-height: 0.94;
}

.auth-copy p {
  max-width: 48ch;
  line-height: 1.7;
  color: var(--muted);
}

.auth-features {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  color: var(--text);
}

.auth-card {
  padding: 28px;
  display: grid;
  gap: 16px;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.94), rgba(247, 238, 228, 0.88));
}

.eyebrow,
.panel-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.auth-card h2,
.hero h1,
.panel-heading h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero {
  display: flex;
  position: relative;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-color: rgba(255, 130, 0, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 20%, rgba(98, 201, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(0, 103, 168, 0.96), rgba(0, 28, 44, 0.96));
  box-shadow: 0 18px 42px rgba(0, 12, 24, 0.22);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -4% -48px 56%;
  height: 90px;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 50%, rgba(255, 122, 0, 0.3), transparent 40%),
    radial-gradient(circle at 54% 48%, rgba(0, 91, 170, 0.2), transparent 42%),
    radial-gradient(circle at 68% 55%, rgba(0, 63, 125, 0.12), transparent 36%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: none;
  color: rgba(245, 251, 255, 0.84);
  font-size: clamp(0.95rem, 1.12vw, 1.08rem);
  line-height: 1.02;
}

.hero .eyebrow {
  margin-bottom: 2px;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
}

.hero-copy {
  display: none;
}

.hero-side {
  display: grid;
  grid-template-columns: auto minmax(150px, 190px);
  gap: 6px;
  align-items: stretch;
}

.hero-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, auto));
  gap: 6px;
  min-width: 0;
}

.status-chip,
.metric-card,
.user-card,
.document-exchange,
.driver-card,
.recent-card,
.mission-card,
.location-card,
.secret-box,
.selected-driver {
  border: 1px solid rgba(96, 72, 54, 0.08);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.status-chip,
.user-card {
  padding: 5px 8px;
  border-radius: 12px;
}

.status-chip {
  border-left: 3px solid var(--accent-blue);
}

.user-card {
  border-left: 3px solid var(--accent);
}

.hero .status-chip,
.hero .user-card {
  background: rgba(245, 251, 255, 0.94);
}

.status-chip span {
  display: block;
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.metric-card span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.status-chip strong {
  display: block;
  margin-top: 1px;
  font-size: 0.82rem;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 0.98rem;
}

.user-card {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: start;
}

.user-card strong {
  font-size: 0.82rem;
  line-height: 1.08;
}

.document-exchange {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
}

.document-exchange-head {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.document-exchange-head span {
  display: block;
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.document-exchange-head strong {
  display: block;
  margin-top: 1px;
  font-size: 0.82rem;
}

.document-upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 130, 0, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 146, 38, 0.95), rgba(242, 106, 0, 0.95));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.document-upload-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.document-list {
  display: grid;
  max-height: 128px;
  gap: 6px;
  overflow: auto;
}

.document-list.empty-state {
  min-height: 34px;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
}

.document-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
}

.document-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.document-link {
  overflow: hidden;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.document-download-button,
.document-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(96, 72, 54, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.document-delete-button {
  color: var(--warn);
}

.settings-toggle {
  width: 100%;
  margin-top: 2px;
  padding: 6px 8px;
  font-size: 0.72rem;
}

.sound-controls {
  display: grid;
  gap: 6px;
}

.app-actions {
  display: grid;
  gap: 6px;
}

.sound-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.sound-toggle {
  width: 100%;
  padding: 9px 10px;
  background: rgba(255, 246, 237, 0.95);
}

.sound-toggle.muted {
  background: rgba(122, 122, 122, 0.1);
  color: var(--muted);
}

.notification-toggle {
  margin-top: 2px;
}

.install-toggle {
  width: 100%;
  padding: 9px 10px;
  background: linear-gradient(180deg, rgba(255, 244, 231, 0.98), rgba(250, 227, 209, 0.96));
}

.install-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}

.install-hint.success {
  color: var(--ok);
}

.settings-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: start;
}

.settings-action-button {
  width: 100%;
}

.security-panel {
  display: grid;
  gap: 16px;
}

.settings-admin-panel {
  margin-top: 4px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 252, 248, 0.72);
  box-shadow: none;
}

.settings-admin-panel .panel-heading {
  margin-bottom: 14px;
}

.command-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  width: min(360px, calc(100vw - 24px));
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(96, 72, 54, 0.12);
  background: rgba(67, 35, 24, 0.96);
  color: #fff7f0;
  box-shadow: 0 22px 44px rgba(39, 20, 12, 0.28);
}

.command-toast strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.command-toast p {
  margin: 0;
  color: rgba(255, 247, 240, 0.9);
  line-height: 1.45;
}

.role-pill {
  display: inline-flex;
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(242, 200, 167, 0.72);
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.user-login {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.1;
}

.dashboard {
  display: grid;
  gap: 20px;
}

.panel {
  padding: 24px;
}

.dispatcher-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(135, 23, 11, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 251, 247, 0.95), rgba(249, 236, 228, 0.88)),
    linear-gradient(135deg, rgba(255, 176, 89, 0.06), transparent);
}

.dispatcher-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, rgba(195, 63, 24, 0.96), rgba(255, 171, 77, 0.86), rgba(195, 63, 24, 0.96));
}

.dispatcher-panel > * {
  position: relative;
  z-index: 1;
}

.dispatcher-panel .panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  align-items: end;
}

.dispatcher-panel .panel-note {
  max-width: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(195, 63, 24, 0.12);
  background: rgba(255, 246, 239, 0.88);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-note {
  margin: 0;
  max-width: 30ch;
  color: var(--muted);
  line-height: 1.5;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  padding: 18px;
  border-radius: var(--radius-lg);
}

.driver-metrics {
  gap: 10px;
  margin-bottom: 12px;
}

.driver-metrics .metric-card {
  min-height: 74px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(247, 237, 229, 0.94));
}

.hero-driver-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 8px;
  width: min(100%, 430px);
  margin-top: 12px;
}

.hero-driver-metrics .metric-card {
  min-height: 0;
  padding: 8px 10px;
  border-radius: 14px;
  box-shadow: none;
}

.hero-driver-metrics .metric-card span {
  font-size: 0.54rem;
  letter-spacing: 0.14em;
}

.hero-driver-metrics .metric-card strong {
  margin-top: 3px;
  font-size: 0.92rem;
}

.metric-card.alert {
  background: linear-gradient(180deg, rgba(255, 237, 229, 0.95), rgba(247, 210, 188, 0.95));
}

.dispatcher-grid {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.board-panel,
.dispatch-form {
  display: grid;
  gap: 12px;
}

.dispatch-form {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: 10px 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(195, 63, 24, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.97), rgba(248, 237, 229, 0.94));
  box-shadow: var(--shadow);
}

.board-panel {
  grid-column: 1;
  grid-row: 1;
  padding: 14px;
  border: 1px solid rgba(195, 63, 24, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.97), rgba(247, 236, 228, 0.93));
  box-shadow: var(--shadow);
}

.board-panel .driver-board {
  grid-template-columns: 1fr;
}

.board-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.board-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.dispatch-form .board-heading {
  grid-column: 1 / -1;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(117, 73, 54, 0.12);
}

.dispatch-form > label {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(117, 73, 54, 0.1);
  background: rgba(255, 248, 242, 0.92);
}

.dispatch-form label span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.dispatch-form > label,
.dispatch-form > .submit-row {
  grid-column: 1;
}

#selectedDriverCard {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
}

#selectedDriverLocation {
  grid-column: 2;
  grid-row: 2;
}

#dispatcherMapCard {
  grid-column: 2;
  grid-row: 3 / span 3;
}

#dispatcherChatCard {
  grid-column: 1;
  grid-row: 3;
}

.dispatch-form > label:nth-of-type(1) {
  grid-row: 4;
}

.dispatch-form > .submit-row {
  grid-row: 5;
  margin: 0;
  padding: 2px 2px 0;
  align-items: center;
}

.log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.driver-board,
.recent-events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.empty-state {
  min-height: 92px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(109, 86, 73, 0.22);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.driver-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 15px 16px;
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.driver-card:hover,
.driver-card:focus-visible {
  transform: translateY(-1px);
}

.driver-card.selected {
  border-color: rgba(188, 62, 36, 0.45);
  box-shadow: 0 18px 40px rgba(143, 57, 29, 0.18);
}

.driver-card.busy {
  background: linear-gradient(180deg, rgba(255, 246, 239, 0.98), rgba(246, 230, 216, 0.94));
}

.driver-card.offline {
  opacity: 0.84;
}

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

.driver-name {
  font-size: 1.05rem;
}

.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(47, 107, 79, 0.12);
  color: var(--ok);
}

.presence-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.presence-pill.offline {
  background: rgba(122, 122, 122, 0.12);
  color: var(--offline);
}

.driver-unit,
.driver-state,
.driver-address,
.driver-meta,
.mission-meta,
.mission-address,
.selected-meta,
.selected-state,
.recent-meta,
.mission-note {
  margin: 0;
}

.driver-unit,
.driver-meta,
.driver-address,
.selected-meta,
.recent-meta,
.mission-meta,
.mission-note {
  color: var(--muted);
}

.driver-state,
.selected-state,
.mission-state,
.recent-state {
  font-weight: 800;
}

.driver-address {
  line-height: 1.45;
}

.selected-driver,
.mission-card,
.location-card {
  padding: 14px;
  border-radius: 16px;
}

.selected-driver strong,
.mission-card strong {
  font-size: 1rem;
}

.selected-driver.ready {
  border-color: rgba(47, 107, 79, 0.2);
}

.mission-card.active {
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255, 247, 239, 0.98), rgba(247, 231, 216, 0.95));
}

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

.mission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mission-nav-button {
  min-width: 180px;
}

.mission-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(188, 62, 36, 0.12);
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-address {
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  line-height: 1.15;
}

.location-card {
  display: grid;
  gap: 10px;
}

.location-card.empty-state {
  min-height: 110px;
}

.location-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.location-card-header h3 {
  margin: 0;
  font-size: 1rem;
}

.location-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.location-map-frame {
  width: 100%;
  min-height: 210px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.92), rgba(241, 231, 221, 0.92)),
    linear-gradient(135deg, rgba(188, 62, 36, 0.08), transparent);
}

.dispatcher-map-card {
  min-height: 320px;
}

.dispatcher-map-canvas {
  min-height: 300px;
  border: 1px solid rgba(13, 79, 143, 0.18);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.92), rgba(241, 231, 221, 0.92)),
    linear-gradient(135deg, rgba(13, 79, 143, 0.1), transparent);
}

.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.location-warning {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent-deep);
  font-weight: 700;
}

.manual-location-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(188, 62, 36, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(248, 236, 226, 0.96)),
    linear-gradient(135deg, rgba(188, 62, 36, 0.05), transparent);
}

.manual-location-map {
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(117, 73, 54, 0.12);
  background: rgba(255, 252, 247, 0.94);
}

.manual-location-value {
  margin: 0;
  font-weight: 700;
}

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

.status-button-wide {
  grid-column: 1 / -1;
}

.status-button,
.primary-button,
.secondary-button,
.ghost-link,
.table-button {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.status-button,
.primary-button,
.secondary-button,
.table-button {
  border-radius: 18px;
  cursor: pointer;
  font: inherit;
}

.status-button {
  min-height: 88px;
  padding: 16px;
  border: 1px solid rgba(117, 73, 54, 0.12);
  background: linear-gradient(180deg, rgba(255, 250, 244, 1), rgba(248, 232, 217, 0.96));
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
}

.status-button:hover,
.status-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible,
.table-button:hover,
.table-button:focus-visible {
  transform: translateY(-1px);
}

.status-button.current {
  background: linear-gradient(180deg, rgba(236, 86, 57, 0.95), rgba(180, 57, 34, 1));
  color: #fff7ef;
  box-shadow: 0 14px 30px rgba(176, 62, 34, 0.26);
}

.status-button.danger-pending {
  background: linear-gradient(180deg, #8d2e15, #5f1f10);
  color: #fff7ef;
  box-shadow: 0 16px 34px rgba(95, 31, 16, 0.32);
}

.status-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.compact-form,
.dispatch-form,
.security-panel form {
  display: grid;
  gap: 16px;
}

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

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

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(103, 74, 55, 0.14);
  background: rgba(255, 252, 248, 0.94);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(188, 62, 36, 0.2);
  border-color: rgba(188, 62, 36, 0.5);
}

textarea {
  resize: vertical;
  min-height: 92px;
}

.wide {
  grid-column: 1 / -1;
}

.submit-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.primary-button,
.secondary-button,
.table-button {
  padding: 14px 22px;
}

.primary-button {
  border: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff5ee;
  box-shadow: 0 16px 36px rgba(139, 36, 22, 0.28);
}

.secondary-button,
.table-button {
  border: 1px solid rgba(142, 51, 30, 0.18);
  background: rgba(255, 249, 242, 0.9);
  color: var(--accent-deep);
}

.primary-button:disabled,
.secondary-button:disabled,
.table-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.form-status {
  margin: 0;
  color: var(--muted);
}

.form-status.error {
  color: var(--warn);
}

.form-status.success {
  color: var(--ok);
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.ghost-link {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--accent-deep);
  border: 1px solid rgba(142, 51, 30, 0.18);
  background: rgba(255, 249, 242, 0.9);
}

.recent-card {
  padding: 18px;
  border-radius: var(--radius-lg);
}

.recent-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.recent-unit {
  font-size: 1.05rem;
}

.filter-box {
  min-width: min(100%, 320px);
}

.log-table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(108, 83, 67, 0.12);
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 252, 248, 0.9);
}

.log-table th,
.log-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(105, 78, 62, 0.08);
}

.log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 238, 227, 0.97);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.empty-row {
  text-align: center;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-bottom: 18px;
}

.secret-box {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 247, 239, 0.98), rgba(248, 232, 214, 0.94));
}

.secret-label {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
}

.secret-box strong {
  font-size: 1.5rem;
  word-break: break-all;
}

.secret-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.table-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.user-state,
.online-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.user-state::before,
.online-state::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(47, 107, 79, 0.12);
}

.user-state.inactive::before,
.online-state.offline::before {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(159, 59, 34, 0.12);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-button.warn {
  color: var(--warn);
  border-color: rgba(159, 59, 34, 0.22);
}

.fade-in {
  animation: rise 360ms ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .dispatcher-grid,
  .auth-shell,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .dispatcher-panel .panel-heading,
  .dispatch-form {
    grid-template-columns: 1fr;
  }

  .dispatch-form,
  .board-panel {
    grid-column: auto;
    grid-row: auto;
  }

  #selectedDriverCard,
  #selectedDriverLocation,
  #dispatcherMapCard,
  #dispatcherChatCard,
  .dispatch-form > label:nth-of-type(1),
  .dispatch-form > .submit-row {
    grid-column: auto;
    grid-row: auto;
  }

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

@media (max-width: 980px) {
  .driver-board,
  .recent-events,
  .metrics,
  .field-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .submit-row,
  .board-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .hero h1,
  .auth-copy h1 {
    max-width: unset;
  }

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
    padding: calc(14px + env(safe-area-inset-top)) 0 calc(28px + env(safe-area-inset-bottom));
  }

  .auth-shell {
    min-height: auto;
    gap: 14px;
  }

  .auth-card {
    order: -1;
  }

  .auth-copy,
  .auth-card,
  .hero,
  .panel {
    border-radius: 22px;
  }

  .auth-copy,
  .hero,
  .panel {
    padding: 18px;
  }

  .auth-copy h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
    line-height: 0.98;
  }

  .hero h1 {
    font-size: 1.05rem;
    line-height: 1.05;
  }

  .auth-copy p,
  .hero-copy,
  .panel-note {
    max-width: none;
    font-size: 0.94rem;
  }

  .hero {
    margin-bottom: 10px;
    padding: 10px 12px;
    gap: 10px;
  }

  .service-brand {
    align-items: flex-start;
  }

  .mchs-emblem-shell {
    width: 46px;
    height: 46px;
  }

  .mchs-emblem-shell-large {
    width: 88px;
    height: 88px;
  }

  .brand-title {
    font-size: clamp(1.6rem, 9vw, 2.5rem);
  }

  .brand-title-compact {
    font-size: clamp(1.1rem, 6vw, 1.6rem);
  }

  .hero-side,
  .hero-status {
    min-width: 0;
  }

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

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

  .status-chip,
  .user-card,
  .document-exchange,
  .metric-card,
  .driver-card,
  .recent-card,
  .selected-driver,
  .mission-card,
  .location-card,
  .secret-box {
    padding: 14px;
  }

  .status-chip strong,
  .metric-card strong {
    font-size: 1.2rem;
  }

  .driver-topline,
  .mission-header,
  .recent-topline,
  .location-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mission-address {
    font-size: clamp(1.05rem, 5vw, 1.4rem);
  }

  .status-button {
    min-height: 78px;
    padding: 14px 10px;
    font-size: 0.95rem;
  }

  .submit-row > .primary-button,
  .submit-row > .secondary-button,
  .submit-row > .table-button,
  .submit-row > .ghost-link {
    width: 100%;
    justify-content: center;
  }

  .filter-box {
    min-width: 0;
  }

  .log-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .log-table {
    background: transparent;
  }

  .log-table thead {
    display: none;
  }

  .log-table,
  .log-table tbody,
  .log-table tr,
  .log-table td {
    display: block;
    width: 100%;
  }

  .log-table tbody {
    display: grid;
    gap: 12px;
  }

  .log-table tr {
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(96, 72, 54, 0.08);
    background: rgba(255, 252, 247, 0.96);
    box-shadow: var(--shadow);
  }

  .log-table td {
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: minmax(96px, 38%) 1fr;
    gap: 12px;
    align-items: start;
  }

  .log-table td + td {
    margin-top: 10px;
  }

  .log-table td::before {
    content: attr(data-label);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .empty-row {
    display: block !important;
    padding: 0 !important;
    text-align: center;
  }

  .empty-row::before {
    content: none !important;
  }

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

  .table-actions .table-button {
    width: 100%;
    justify-content: center;
  }

  .location-map-frame {
    min-height: 220px;
  }

  .manual-location-map {
    min-height: 260px;
  }
}

@media (max-width: 520px) {
  .command-toast {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .driver-board,
  .recent-events {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .presence-pill,
  .role-pill {
    font-size: 0.7rem;
  }

  .auth-features {
    gap: 8px;
    padding-left: 18px;
  }
}

.device-status {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.15;
  color: var(--muted);
}

.chat-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(96, 72, 54, 0.08);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.chat-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.chat-messages {
  display: grid;
  gap: 10px;
  min-height: 68px;
  max-height: 240px;
  padding-right: 6px;
  overflow-y: auto;
}

.chat-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.chat-row {
  display: flex;
  justify-content: flex-start;
}

.chat-row.self {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: min(100%, 560px);
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 244, 236, 0.96);
  border: 1px solid rgba(135, 23, 11, 0.12);
}

.chat-row.self .chat-bubble {
  background: linear-gradient(180deg, rgba(195, 63, 24, 0.16), rgba(255, 226, 205, 0.88));
}

.chat-sender {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.chat-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.chat-time {
  margin: 6px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.chat-form {
  display: grid;
  gap: 10px;
}

.chat-form input,
.chat-form textarea {
  min-height: 52px;
}

.chat-keyboard-button {
  padding-inline: 16px;
  white-space: nowrap;
}

body.ops-2026 {
  --bg-top: #071520;
  --bg-bottom: #020810;
  --panel: rgba(8, 23, 36, 0.78);
  --panel-strong: rgba(12, 30, 46, 0.92);
  --line: rgba(107, 198, 255, 0.14);
  --text: #ecf4fb;
  --muted: #9db0c1;
  --accent: #ff7a00;
  --accent-deep: #da5f00;
  --accent-blue: #62c9ff;
  --accent-blue-deep: #0a4f76;
  --accent-gold: #ffd35a;
  --accent-soft: rgba(255, 122, 0, 0.14);
  --ok: #59d58f;
  --warn: #ff8f6b;
  --offline: #8fa1b1;
  --shadow: 0 30px 70px rgba(0, 5, 11, 0.42);
  --mchs-stripe-orange: rgba(255, 122, 0, 0.98);
  --mchs-stripe-blue: rgba(13, 101, 153, 0.97);
  --mchs-stripe-shadow: rgba(1, 12, 20, 0.62);
  --mchs-grid-horizontal: rgba(98, 201, 255, 0.06);
  --mchs-grid-vertical: rgba(98, 201, 255, 0.05);
  background:
    radial-gradient(circle at 12% 12%, rgba(24, 104, 165, 0.44), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(255, 122, 0, 0.16), transparent 24%),
    radial-gradient(circle at 74% 92%, rgba(0, 0, 0, 0.26), transparent 28%),
    linear-gradient(180deg, #0a1d2c 0%, #071520 42%, #040b13 72%, #02060d 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body.ops-2026::before {
  background-size: 100% 100%, 34px 34px, 34px 34px;
  opacity: 0.85;
}

body.ops-2026::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 255, 255, 0.08), transparent 18%),
    radial-gradient(circle at 78% 78%, rgba(255, 255, 255, 0.03), transparent 22%);
}

.ops-2026 .page-shell {
  width: min(1440px, calc(100% - 36px));
  padding: calc(20px + env(safe-area-inset-top)) 0 calc(56px + env(safe-area-inset-bottom));
}

.ops-2026 .hero,
.ops-2026 .panel,
.ops-2026 .auth-card,
.ops-2026 .auth-copy {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(9, 24, 38, 0.92), rgba(7, 20, 32, 0.84)),
    radial-gradient(circle at 14% 10%, rgba(98, 201, 255, 0.05), transparent 24%),
    radial-gradient(circle at 88% 86%, rgba(255, 122, 0, 0.04), transparent 22%);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.ops-2026 .auth-shell {
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 18px;
}

.ops-2026 .auth-copy,
.ops-2026 .auth-card,
.ops-2026 .hero,
.ops-2026 .panel {
  border-radius: 30px;
}

.ops-2026 .auth-copy {
  position: relative;
  overflow: hidden;
  padding: 42px;
}

.ops-2026 .auth-copy::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.96), rgba(255, 196, 84, 0.84), rgba(98, 201, 255, 0.8));
}

.ops-2026 .auth-copy::after {
  content: "";
  position: absolute;
  right: -86px;
  bottom: -86px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(98, 201, 255, 0.14);
  box-shadow: inset 0 0 0 18px rgba(255, 122, 0, 0.04);
}

.ops-2026 .auth-brand,
.ops-2026 .service-brand {
  gap: 16px;
  align-items: flex-start;
}

.ops-2026 .mchs-emblem-shell {
  width: 64px;
  height: 64px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(13, 34, 50, 0.9), rgba(6, 18, 28, 0.74));
  border: 1px solid rgba(98, 201, 255, 0.14);
  box-shadow: 0 18px 34px rgba(0, 7, 14, 0.34);
}

.ops-2026 .mchs-emblem-shell-large {
  width: 132px;
  height: 132px;
  border-radius: 30px;
}

.ops-2026 .brand-title,
.ops-2026 .brand-subtitle,
.ops-2026 .auth-copy h1,
.ops-2026 .auth-card h2,
.ops-2026 .hero h1,
.ops-2026 .panel-heading h2,
.ops-2026 .board-heading h3,
.ops-2026 .location-card-header h3,
.ops-2026 .driver-name,
.ops-2026 .mission-address,
.ops-2026 .recent-unit,
.ops-2026 .selected-driver strong,
.ops-2026 .mission-card strong {
  font-family: "Exo 2", "Segoe UI", sans-serif;
}

.ops-2026 .brand-title {
  color: #f7fbff;
  letter-spacing: 0.08em;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.ops-2026 .brand-title-compact {
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.ops-2026 .brand-subtitle {
  color: #ffb15c;
  letter-spacing: 0.22em;
}

.ops-2026 .auth-copy h1 {
  max-width: 11ch;
  font-size: clamp(3.2rem, 5vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
}

.ops-2026 .auth-copy p,
.ops-2026 .hero-copy,
.ops-2026 .panel-note,
.ops-2026 .auth-hint,
.ops-2026 .driver-meta,
.ops-2026 .driver-address,
.ops-2026 .driver-unit,
.ops-2026 .selected-meta,
.ops-2026 .recent-meta,
.ops-2026 .location-meta,
.ops-2026 .chat-meta,
.ops-2026 .mission-note,
.ops-2026 .mission-meta,
.ops-2026 .table-note,
.ops-2026 .secret-hint,
.ops-2026 .user-login,
.ops-2026 .device-status {
  color: var(--muted);
}

.ops-2026 .auth-features {
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.ops-2026 .auth-features li {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(98, 201, 255, 0.12);
  background: linear-gradient(180deg, rgba(12, 30, 46, 0.76), rgba(9, 23, 35, 0.72));
}

.ops-2026 .auth-features li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9c40, #ff6b00);
  box-shadow: 0 0 0 6px rgba(255, 122, 0, 0.1);
}

.ops-2026 .auth-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  gap: 18px;
}

.ops-2026 .auth-card::before,
.ops-2026 .panel::before,
.ops-2026 .hero::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.98), rgba(98, 201, 255, 0.75));
}

.ops-2026 .hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 12px;
  padding: 18px 20px 20px;
  overflow: hidden;
}

.ops-2026 .hero::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -30px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 122, 0, 0.18), transparent 54%),
    radial-gradient(circle at 32% 28%, rgba(98, 201, 255, 0.14), transparent 46%);
  filter: blur(6px);
  pointer-events: none;
}

.ops-2026 .hero h1 {
  color: #f5fbff;
  font-size: clamp(1.22rem, 2.1vw, 2rem);
  line-height: 1.02;
}

.ops-2026 .hero-copy {
  display: block;
  max-width: 68ch;
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.ops-2026 .hero-driver-metrics {
  margin-top: 12px;
}

.ops-2026 .hero-driver-metrics .metric-card {
  border: 1px solid rgba(98, 201, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(9, 29, 45, 0.96), rgba(6, 19, 30, 0.94)),
    linear-gradient(135deg, rgba(98, 201, 255, 0.05), transparent 42%);
}

.ops-2026 .hero-driver-metrics .metric-card.alert {
  border-color: rgba(255, 122, 0, 0.16);
  background:
    linear-gradient(180deg, rgba(37, 25, 17, 0.96), rgba(18, 15, 13, 0.94)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.12), transparent 44%);
}

.ops-2026 .hero-driver-metrics .metric-card span {
  color: #85a8bf;
}

.ops-2026 .hero-driver-metrics .metric-card strong {
  color: #f5fbff;
  font-family: "JetBrains Mono", monospace;
}

.ops-2026 .hero-ops-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ops-2026 .hero-ops-row .dispatch-hero-chip {
  min-width: 132px;
}

.ops-2026 .hero-side {
  grid-template-columns: minmax(230px, auto) minmax(220px, 1fr);
  gap: 10px;
  align-items: start;
  min-width: min(100%, 805px);
}

.ops-2026 .hero-status {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ops-2026 .dispatch-hero-chip strong {
  font-family: "JetBrains Mono", monospace;
}

.ops-2026 #ribbonConnectionChip strong {
  color: #74f2b5;
  text-shadow: 0 0 22px rgba(116, 242, 181, 0.34);
}

.ops-2026 #ribbonConnectionChip strong::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: #74f2b5;
  box-shadow: 0 0 0 6px rgba(116, 242, 181, 0.1);
}

.ops-2026 #ribbonBusyChip strong {
  color: #ffb15c;
}

.ops-2026 .status-chip,
.ops-2026 .metric-card,
.ops-2026 .user-card,
.ops-2026 .document-exchange,
.ops-2026 .driver-card,
.ops-2026 .recent-card,
.ops-2026 .mission-card,
.ops-2026 .location-card,
.ops-2026 .secret-box,
.ops-2026 .selected-driver,
.ops-2026 .chat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(98, 201, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(14, 33, 49, 0.96), rgba(9, 22, 35, 0.92)),
    linear-gradient(135deg, rgba(98, 201, 255, 0.06), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
}

.ops-2026 .status-chip::after,
.ops-2026 .metric-card::after,
.ops-2026 .user-card::after,
.ops-2026 .document-exchange::after,
.ops-2026 .driver-card::after,
.ops-2026 .recent-card::after,
.ops-2026 .mission-card::after,
.ops-2026 .location-card::after,
.ops-2026 .secret-box::after,
.ops-2026 .selected-driver::after,
.ops-2026 .chat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 36%);
  pointer-events: none;
}

.ops-2026 .status-chip,
.ops-2026 .user-card {
  padding: 10px 12px;
  border-radius: 16px;
}

.ops-2026 .status-chip span,
.ops-2026 .metric-card span,
.ops-2026 .document-exchange-head span,
.ops-2026 .role-pill,
.ops-2026 .presence-pill,
.ops-2026 .panel-kicker,
.ops-2026 .eyebrow,
.ops-2026 .dispatch-form label span,
.ops-2026 .secret-label,
.ops-2026 .log-table th {
  letter-spacing: 0.18em;
}

.ops-2026 .status-chip span,
.ops-2026 .metric-card span,
.ops-2026 .document-exchange-head span,
.ops-2026 .log-table th {
  color: #84a4bc;
}

.ops-2026 .status-chip strong,
.ops-2026 .metric-card strong,
.ops-2026 .document-exchange-head strong,
.ops-2026 #serverTime,
.ops-2026 #syncTime {
  font-family: "JetBrains Mono", monospace;
  color: #f6fbff;
}

.ops-2026 .metric-card {
  min-height: 92px;
  padding: 16px 18px;
  border-radius: 20px;
}

.ops-2026 .metric-card strong {
  font-size: 1.16rem;
}

.ops-2026 .metric-card.alert {
  border-color: rgba(255, 122, 0, 0.18);
  background:
    linear-gradient(180deg, rgba(40, 23, 11, 0.96), rgba(20, 14, 11, 0.92)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.12), transparent 48%);
}

.ops-2026 .document-exchange {
  grid-column: 2;
  min-height: 118px;
  border-color: rgba(255, 122, 0, 0.18);
  background:
    linear-gradient(180deg, rgba(10, 29, 44, 0.96), rgba(7, 19, 31, 0.94)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.08), transparent 45%);
}

.ops-2026 .document-upload-button {
  box-shadow: 0 10px 20px rgba(255, 106, 0, 0.14);
}

.ops-2026 .document-item {
  border: 1px solid rgba(98, 201, 255, 0.08);
  background: rgba(5, 18, 30, 0.56);
}

.ops-2026 .document-link {
  color: #f5fbff;
}

.ops-2026 .document-main span,
.ops-2026 .document-list.empty-state {
  color: #91aabe;
}

.ops-2026 .document-download-button,
.ops-2026 .document-delete-button {
  border-color: rgba(98, 201, 255, 0.12);
  background: rgba(13, 34, 50, 0.84);
  color: #d7edff;
}

.ops-2026 .document-delete-button {
  color: #ffb15c;
}

.ops-2026 .role-pill,
.ops-2026 .presence-pill {
  border: 1px solid rgba(98, 201, 255, 0.1);
  background: rgba(10, 35, 52, 0.9);
  color: #9ed9ff;
}

.ops-2026 .presence-pill.offline {
  color: #b9c6d1;
  background: rgba(34, 47, 59, 0.94);
}

.ops-2026 .dashboard {
  gap: 16px;
}

.ops-2026 .panel {
  padding: 22px;
}

.ops-2026 .panel-heading {
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(98, 201, 255, 0.08);
}

.ops-2026 .dispatcher-panel {
  border-color: rgba(98, 201, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(7, 21, 33, 0.98), rgba(6, 18, 29, 0.94)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.05), transparent 40%);
}

.ops-2026 .dispatcher-panel .panel-heading {
  margin-bottom: 14px;
}

.ops-2026 .dispatcher-panel .panel-note {
  max-width: 44ch;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(98, 201, 255, 0.1);
  background: rgba(10, 29, 44, 0.82);
}

.ops-2026 .dispatcher-grid {
  grid-template-columns: minmax(300px, 332px) minmax(0, 1fr);
  gap: 14px;
}

.ops-2026 .board-panel,
.ops-2026 .dispatch-form {
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(98, 201, 255, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(11, 28, 42, 0.98), rgba(8, 22, 34, 0.94)),
    linear-gradient(135deg, rgba(98, 201, 255, 0.05), transparent 44%);
}

.ops-2026 .dispatch-form {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.ops-2026 .dispatch-form .board-heading,
.ops-2026 .board-heading {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(98, 201, 255, 0.08);
}

.ops-2026 .driver-board {
  grid-template-columns: 1fr;
  gap: 12px;
}

.ops-2026 .driver-card {
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
}

.ops-2026 .driver-card:hover,
.ops-2026 .driver-card:focus-visible,
.ops-2026 .recent-card:hover {
  border-color: rgba(98, 201, 255, 0.24);
  box-shadow: 0 24px 50px rgba(0, 7, 14, 0.36);
}

.ops-2026 .driver-card.selected {
  border-color: rgba(255, 122, 0, 0.4);
  box-shadow: 0 28px 58px rgba(0, 7, 14, 0.42);
}

.ops-2026 .driver-card.busy {
  background:
    linear-gradient(180deg, rgba(33, 23, 16, 0.96), rgba(17, 14, 13, 0.92)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.14), transparent 48%);
}

.ops-2026 .driver-name,
.ops-2026 .selected-state,
.ops-2026 .mission-state,
.ops-2026 .recent-state,
.ops-2026 .driver-state {
  color: #f6fbff;
}

.ops-2026 .selected-driver,
.ops-2026 .mission-card,
.ops-2026 .location-card,
.ops-2026 .chat-card {
  border-radius: 22px;
}

.ops-2026 .location-card.empty-state,
.ops-2026 .selected-driver.empty-state,
.ops-2026 .chat-card.empty-state,
.ops-2026 .empty-state {
  border-style: solid;
  background:
    linear-gradient(180deg, rgba(10, 27, 41, 0.9), rgba(7, 20, 31, 0.88)),
    linear-gradient(135deg, rgba(98, 201, 255, 0.05), transparent 46%);
  color: var(--muted);
}

.ops-2026 .mission-card.active {
  background:
    linear-gradient(180deg, rgba(16, 34, 49, 0.98), rgba(10, 24, 37, 0.94)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.08), transparent 50%);
}

.ops-2026 .mission-badge {
  background: rgba(255, 122, 0, 0.14);
  color: #ffb15c;
  border: 1px solid rgba(255, 122, 0, 0.14);
}

.ops-2026 .mission-address {
  font-size: clamp(1.32rem, 2.8vw, 2rem);
  color: #f8fbff;
}

.ops-2026 .location-map-frame,
.ops-2026 .manual-location-map,
.ops-2026 .dispatcher-map-canvas {
  border: 1px solid rgba(98, 201, 255, 0.12);
  border-radius: 20px;
  background: rgba(5, 16, 25, 0.9);
}

.ops-2026 .location-warning {
  color: #ffb15c;
}

.ops-2026 .quick-grid {
  gap: 10px;
}

.ops-2026 .status-button {
  min-height: 94px;
  border: 1px solid rgba(98, 201, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(11, 28, 42, 0.98), rgba(8, 20, 31, 0.94)),
    linear-gradient(135deg, rgba(98, 201, 255, 0.05), transparent 40%);
  color: #eef6fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ops-2026 .status-button.current {
  border-color: rgba(255, 158, 46, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 168, 52, 0.98), rgba(255, 121, 0, 0.96)),
    linear-gradient(135deg, rgba(255, 236, 201, 0.3), transparent 42%);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 196, 122, 0.22) inset,
    0 18px 42px rgba(255, 122, 0, 0.28);
}

.ops-2026 .status-button.danger-pending {
  background: linear-gradient(180deg, rgba(160, 48, 16, 0.96), rgba(92, 22, 12, 0.96));
}

.ops-2026 label span,
.ops-2026 .form-status,
.ops-2026 .chat-time,
.ops-2026 .chat-sender {
  color: var(--muted);
}

.ops-2026 input,
.ops-2026 select,
.ops-2026 textarea {
  border: 1px solid rgba(98, 201, 255, 0.12);
  background: rgba(7, 20, 31, 0.9);
  color: #f6fbff;
}

.ops-2026 input::placeholder,
.ops-2026 textarea::placeholder {
  color: #6d8496;
}

.ops-2026 input:focus,
.ops-2026 select:focus,
.ops-2026 textarea:focus {
  outline: 2px solid rgba(98, 201, 255, 0.12);
  border-color: rgba(98, 201, 255, 0.4);
  box-shadow: 0 0 0 6px rgba(98, 201, 255, 0.08);
}

.ops-2026 .primary-button,
.ops-2026 .secondary-button,
.ops-2026 .table-button,
.ops-2026 .ghost-link {
  border-radius: 18px;
}

.ops-2026 .primary-button {
  border: 0;
  background: linear-gradient(180deg, #ff8a1f, #e26300);
  color: #fff;
  box-shadow: 0 18px 40px rgba(154, 67, 6, 0.34);
}

.ops-2026 .secondary-button,
.ops-2026 .table-button,
.ops-2026 .ghost-link {
  border: 1px solid rgba(98, 201, 255, 0.12);
  background: rgba(10, 28, 42, 0.92);
  color: #f0f7fc;
}

.ops-2026 .primary-button:hover,
.ops-2026 .secondary-button:hover,
.ops-2026 .table-button:hover,
.ops-2026 .ghost-link:hover,
.ops-2026 .status-button:hover {
  transform: translateY(-2px);
}

.ops-2026 .command-toast {
  border: 1px solid rgba(255, 122, 0, 0.18);
  background:
    linear-gradient(180deg, rgba(17, 37, 53, 0.98), rgba(8, 20, 31, 0.96)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.14), transparent 42%);
  color: #f8fbff;
}

.ops-2026 .command-toast strong {
  font-family: "Exo 2", "Segoe UI", sans-serif;
}

.ops-2026 .chat-bubble {
  border-radius: 16px;
  background: rgba(10, 28, 42, 0.94);
  border: 1px solid rgba(98, 201, 255, 0.12);
  color: #f1f8fd;
}

.ops-2026 .chat-row.self .chat-bubble {
  background:
    linear-gradient(180deg, rgba(48, 32, 20, 0.94), rgba(25, 18, 16, 0.92)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.14), transparent 42%);
  border-color: rgba(255, 122, 0, 0.14);
}

.ops-2026 .chat-sender {
  color: #ffb15c;
}

.ops-2026 .log-table-wrap {
  border: 1px solid rgba(98, 201, 255, 0.1);
  background: rgba(6, 17, 26, 0.7);
}

.ops-2026 .log-table {
  background: rgba(7, 20, 31, 0.94);
}

.ops-2026 .log-table th {
  background: rgba(11, 28, 42, 0.98);
}

.ops-2026 .log-table th,
.ops-2026 .log-table td {
  border-bottom-color: rgba(98, 201, 255, 0.08);
}

.ops-2026 .log-table td {
  color: #eaf3fb;
}

.ops-2026 .secret-box {
  background:
    linear-gradient(180deg, rgba(18, 34, 49, 0.96), rgba(10, 23, 35, 0.92)),
    linear-gradient(135deg, rgba(255, 122, 0, 0.08), transparent 40%);
}

.ops-2026 .secret-box strong {
  color: #fff3e7;
}

.ops-2026 .settings-admin-panel {
  margin-top: 10px;
  padding: 18px;
  background: rgba(5, 17, 27, 0.48);
  border-radius: 24px;
  border: 1px solid rgba(98, 201, 255, 0.08);
}

.ops-2026 .user-state,
.ops-2026 .online-state {
  color: #f0f7fc;
}

.ops-2026 .user-state::before,
.ops-2026 .online-state::before {
  box-shadow: 0 0 0 6px rgba(89, 213, 143, 0.12);
}

.ops-2026 .user-state.inactive::before,
.ops-2026 .online-state.offline::before {
  box-shadow: 0 0 0 6px rgba(255, 143, 107, 0.1);
}

.ops-2026 ::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.ops-2026 ::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.88), rgba(98, 201, 255, 0.78));
  background-clip: padding-box;
}

.ops-2026 ::-webkit-scrollbar-track {
  background: rgba(8, 23, 36, 0.7);
}

@media (max-width: 1180px) {
  .ops-2026 .auth-shell,
  .ops-2026 .dispatcher-grid,
  .ops-2026 .admin-grid {
    grid-template-columns: 1fr;
  }

  .ops-2026 .dispatch-form {
    grid-template-columns: 1fr;
  }

  .ops-2026 #selectedDriverCard,
  .ops-2026 #selectedDriverLocation,
  .ops-2026 #dispatcherMapCard,
  .ops-2026 #dispatcherChatCard,
  .ops-2026 .dispatch-form > label:nth-of-type(1),
  .ops-2026 .dispatch-form > .submit-row {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 980px) {
  .ops-2026 .hero {
    grid-template-columns: 1fr;
  }

  .ops-2026 .hero-side,
  .ops-2026 .hero-status,
  .ops-2026 .metrics,
  .ops-2026 .field-grid,
  .ops-2026 .compact-grid {
    grid-template-columns: 1fr;
  }

  .ops-2026 .document-exchange {
    grid-column: auto;
  }

  .ops-2026 .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ops-2026 .page-shell {
    width: min(100%, calc(100% - 20px));
    padding: calc(14px + env(safe-area-inset-top)) 0 calc(34px + env(safe-area-inset-bottom));
  }

  .ops-2026 .auth-copy,
  .ops-2026 .auth-card,
  .ops-2026 .hero,
  .ops-2026 .panel {
    border-radius: 24px;
  }

  .ops-2026 .auth-copy,
  .ops-2026 .auth-card,
  .ops-2026 .hero,
  .ops-2026 .panel {
    padding: 18px;
  }

  .document-item {
    grid-template-columns: 1fr;
  }

  .document-actions {
    justify-content: flex-start;
  }

  .ops-2026 .auth-copy h1 {
    max-width: none;
    font-size: clamp(2.4rem, 9vw, 3.5rem);
  }

  .ops-2026 .hero h1 {
    font-size: 1.12rem;
  }

  .ops-2026 .service-brand {
    align-items: flex-start;
  }

  .ops-2026 .mchs-emblem-shell {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .ops-2026 .mchs-emblem-shell-large {
    width: 96px;
    height: 96px;
    border-radius: 24px;
  }

  .ops-2026 .driver-board,
  .ops-2026 .recent-events,
  .ops-2026 .quick-grid {
    grid-template-columns: 1fr;
  }

  .ops-2026 .log-table tr {
    background: rgba(10, 26, 39, 0.96);
    border-color: rgba(98, 201, 255, 0.12);
  }

  .ops-2026 .log-table td::before {
    color: #84a4bc;
  }
}

/* Command-center 2026 second pass: focus, timeline, map legend and settings drawer. */
.ops-2026 .command-ribbon {
  display: grid;
  grid-template-columns: 0.75fr 0.75fr 0.75fr 1.6fr 1.6fr;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid rgba(98, 201, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(7, 22, 34, 0.96), rgba(4, 14, 22, 0.92)),
    repeating-linear-gradient(90deg, rgba(98, 201, 255, 0.04) 0 1px, transparent 1px 42px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.ops-2026 .ribbon-cell {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(98, 201, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ops-2026 .ribbon-cell span {
  display: block;
  margin-bottom: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7da0b6;
}

.ops-2026 .ribbon-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Exo 2", sans-serif;
  color: #f5fbff;
}

.ops-2026 .ribbon-cell.live strong {
  color: #74f2b5;
  text-shadow: 0 0 22px rgba(116, 242, 181, 0.34);
}

.ops-2026 .ribbon-cell.live strong::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: #74f2b5;
  box-shadow: 0 0 0 6px rgba(116, 242, 181, 0.1);
}

.ops-2026 .ribbon-cell.alert strong {
  color: #ffb15c;
}

.ops-2026 .command-focus {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border-color: rgba(255, 122, 0, 0.18);
}

.ops-2026 .command-focus::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #ff7a00, #0d73bd);
}

.ops-2026 .focus-topline,
.ops-2026 .mission-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ops-2026 .focus-status {
  padding: 7px 10px;
  border: 1px solid rgba(255, 122, 0, 0.2);
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.12);
  color: #ffb15c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-2026 .focus-status.online {
  border-color: rgba(116, 242, 181, 0.2);
  background: rgba(116, 242, 181, 0.1);
  color: #74f2b5;
}

.ops-2026 .focus-status.offline {
  border-color: rgba(255, 143, 107, 0.18);
  background: rgba(255, 143, 107, 0.1);
  color: #ffb08a;
}

.ops-2026 .focus-address {
  display: block;
  margin-top: 8px;
  font-family: "Exo 2", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 2.2rem);
  line-height: 1.05;
  color: #fff9f1;
}

.ops-2026 .focus-grid,
.ops-2026 .mission-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.ops-2026 .focus-grid span,
.ops-2026 .mission-data-grid span {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(98, 201, 255, 0.09);
  border-radius: 16px;
  background: rgba(5, 16, 25, 0.42);
  color: #e7f3fb;
}

.ops-2026 .focus-grid b,
.ops-2026 .mission-data-grid b {
  display: block;
  margin-bottom: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7da0b6;
}

.ops-2026 .command-progress {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.ops-2026 .command-progress span {
  position: relative;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid rgba(98, 201, 255, 0.1);
  border-radius: 12px;
  background: rgba(98, 201, 255, 0.05);
  color: #8aa9bd;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-2026 .command-progress span.done {
  border-color: rgba(116, 242, 181, 0.16);
  background: rgba(116, 242, 181, 0.09);
  color: #a9ffd3;
}

.ops-2026 .command-progress span.active {
  border-color: rgba(255, 122, 0, 0.36);
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.26), rgba(255, 122, 0, 0.1));
  color: #fff2e6;
  box-shadow: 0 0 24px rgba(255, 122, 0, 0.18);
}

.ops-2026 .map-legend {
  position: absolute;
  right: 18px;
  bottom: 58px;
  z-index: 450;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 36px);
  padding: 8px;
  border: 1px solid rgba(98, 201, 255, 0.14);
  border-radius: 14px;
  background: rgba(4, 14, 22, 0.82);
  backdrop-filter: blur(12px);
}

.ops-2026 .dispatcher-map-card {
  position: relative;
}

.ops-2026 .map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dcecf6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
}

.ops-2026 .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #62c9ff;
  box-shadow: 0 0 0 4px rgba(98, 201, 255, 0.13);
}

.ops-2026 .legend-dot.selected {
  background: #ff7a00;
  box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.15);
}

.ops-2026 .legend-dot.destination {
  border-radius: 3px;
  background: #ffd089;
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(255, 208, 137, 0.12);
}

.ops-2026 .ops-map-marker {
  border: 0;
  background: transparent;
}

.ops-2026 .ops-map-marker span {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #0d73bd;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), 0 0 0 8px rgba(13, 115, 189, 0.18);
}

.ops-2026 .ops-map-marker-destination span {
  border-radius: 7px 7px 7px 0;
  background: #ff8a1f;
  transform: rotate(-45deg);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), 0 0 0 8px rgba(255, 122, 0, 0.16);
}

.ops-2026 .ops-map-marker.selected span {
  background: #ff7a00;
  box-shadow: 0 0 0 9px rgba(255, 122, 0, 0.2), 0 0 34px rgba(255, 122, 0, 0.44);
}

.ops-2026 .events-timeline {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ops-2026 .timeline-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(98, 201, 255, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(11, 29, 44, 0.96), rgba(6, 18, 28, 0.94)),
    linear-gradient(135deg, rgba(98, 201, 255, 0.05), transparent 44%);
}

.ops-2026 .timeline-item time {
  font-family: "JetBrains Mono", monospace;
  color: #9ab5c8;
}

.ops-2026 .timeline-state {
  display: inline-block;
  margin-bottom: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.13);
  color: #ffb15c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-2026 .timeline-item strong {
  display: block;
  color: #f8fbff;
}

.ops-2026 .timeline-item p,
.ops-2026 .timeline-item small {
  display: block;
  margin: 5px 0 0;
  color: #9ab5c8;
}

.ops-2026 .log-panel .log-table-wrap {
  display: none;
}

.ops-2026 .settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(8px);
}

.ops-2026 #settingsPanel.security-panel {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 900;
  width: min(560px, calc(100vw - 32px));
  overflow: auto;
  margin: 0;
  transform-origin: right center;
  animation: drawer-in 180ms ease-out both;
}

.ops-2026.settings-drawer-open {
  overflow: hidden;
}

.ops-alert-pulse::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 700;
  pointer-events: none;
  border: 2px solid rgba(255, 122, 0, 0.58);
  box-shadow: inset 0 0 90px rgba(255, 122, 0, 0.12);
  animation: alert-frame 900ms ease-out 2;
}

@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes alert-frame {
  from {
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (max-width: 1040px) {
  .ops-2026 .command-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-2026 .ribbon-cell.wide {
    grid-column: span 2;
  }

  .ops-2026 .command-progress {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ops-2026 .command-ribbon {
    grid-template-columns: 1fr;
  }

  .ops-2026 .ribbon-cell.wide {
    grid-column: auto;
  }

  .ops-2026 .focus-grid,
  .ops-2026 .mission-data-grid {
    grid-template-columns: 1fr;
  }

  .ops-2026 .timeline-item {
    grid-template-columns: 1fr;
  }

  .ops-2026 .map-legend {
    position: static;
    margin-top: 10px;
  }

  .ops-2026 #settingsPanel.security-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(82vh, 720px);
    border-radius: 28px;
    animation-name: drawer-up;
  }
}

@keyframes drawer-up {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
