/* ==========================================================================
   Yirra Systems // Canopy (`YS-ENG-CANOPY-002 v1.5`)
   4D Living Battlespace COP, MIL-STD-2525D & Mission Planning Tactical Styles
   Strict Compliance with `/docs/gcs-design-system.md` §2:
   - Surfaces: #0a0c10 window | #14171c shade | #0e1014 shadeDark | #1c2027 hover
   - Hairlines: #2a2f38 1px solid | #3d434e strong focus
   - Typography: Inter single family, `tabular-nums` (`tnum` 1) everywhere
   - Shape: 2-4px radii, ZERO rounded pills, ZERO gradients, ZERO drop shadows
   - Flush 1px corner brackets; #00f2fe cyan strictly for CONTROL / active selection
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('./fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('./fonts/Inter-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('./fonts/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('./fonts/Inter-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --window: #0a0c10;
  --shade: #14171c;
  --shade-dark: #0e1014;
  --shade-light: #1c2027;

  --line: #2a2f38;
  --line-strong: #3d434e;

  --text: #e6e8eb;
  --text-muted: #8b919a;
  --text-dim: #555b66;
  --ink: #0a0c10;

  --cyan: #00f2fe;
  --cyan-soft: rgba(0, 242, 254, 0.10);
  --green: #5ad27a;
  --green-soft: rgba(90, 210, 122, 0.10);
  --amber: #ffb020;
  --amber-soft: rgba(255, 176, 32, 0.10);
  --red: #ff4d4d;
  --red-soft: rgba(255, 77, 77, 0.12);
  --red-deep: #8f1d1d;

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --hud-bg: #b30a0c10;
  --hud-line: #59e6e8eb;
  --hud-line-soft: #26e6e8eb;
  --scrim: #a6000000;

  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;

  --yirra-hold-ms: 1500ms;
  --yirra-slide-threshold: 0.92;
  --yirra-sheet-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --topbar-h: 50px;
  --bottombar-h: 54px;
  --left-w: 356px;
  --right-w: 384px;
  --hud-left-inset: 0px;
  --hud-right-inset: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--window);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12.5px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* Custom thin tactical scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--window);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--line-strong);
}

/* ── Flush 1px Corner Brackets (`gcs-design-system.md` §2.7) ─────────────── */

.bracket-box {
  position: relative;
}
.bracket-box::before,
.bracket-box::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 2;
}
.bracket-box::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--text-muted);
  border-left: 1px solid var(--text-muted);
}
.bracket-box::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid var(--text-muted);
  border-right: 1px solid var(--text-muted);
}
.bracket-box.is-active::before,
.bracket-box.is-active::after {
  border-color: var(--cyan);
}
.bracket-box.is-warn::before,
.bracket-box.is-warn::after {
  border-color: var(--amber);
}
.bracket-box.is-danger::before,
.bracket-box.is-danger::after {
  border-color: var(--red);
}

/* ── Top Tactical Command Bar ────────────────────────────────────────────── */

.canopy-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) 1fr var(--bottombar-h);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--window);
  overflow: hidden;
}

.top-cmd-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  max-width: 100%;
  background: var(--shade);
  border-bottom: 1px solid var(--line);
  z-index: 25;
  min-width: 0;
  overflow: hidden;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-mark-sm {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-title-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

/* Brand rule: ALWAYS "Yirra Systems" in Title Case, Inter SemiBold, default tracking */
.brand-yirra {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.brand-product {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
}

.brand-doc-id {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.ao-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.micro-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mode-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mode-tab {
  height: 30px;
  padding: 0 10px;
  white-space: nowrap;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 120ms linear, color 120ms linear, background-color 120ms linear;
}
.mode-tab:hover {
  background: var(--shade-light);
  color: var(--text);
}
.mode-tab.active {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: var(--cyan);
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Tactical Bracketed Badges & Buttons (No rounded pills!) ─────────────── */

.tac-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.tac-badge.ok {
  border-color: var(--green);
  color: var(--green);
}
.tac-badge.control {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-soft);
}
.tac-badge.caution {
  border-color: var(--amber);
  color: var(--amber);
}
.tac-badge.danger {
  border-color: var(--red);
  color: var(--red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  background: var(--shade);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 100ms linear, border-color 100ms linear, color 100ms linear;
}
.btn:hover:not(:disabled) {
  background: var(--shade-light);
  border-color: var(--line-strong);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-xs {
  height: 23px;
  padding: 0 7px;
  font-size: 10px;
}
.btn-block {
  width: 100%;
}
.btn-control {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-soft);
}
.btn-control:hover:not(:disabled) {
  background: rgba(0, 242, 254, 0.18);
}
.btn-ok {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}
.btn-caution {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
}
.btn-danger {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}
.btn-toggle.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-soft);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="datetime-local"],
select,
textarea {
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  padding: 4px 7px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-strong);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 15px;
  background: var(--cyan);
  border: 1px solid var(--ink);
  border-radius: 2px;
}

/* ── Main 3-Column Battlespace Workspace Grid ────────────────────────────── */

.workspace-grid {
  display: grid;
  grid-template-columns: var(--left-w) 1fr var(--right-w);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.left-panel,
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: var(--window);
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.left-panel {
  border-right: 1px solid var(--line);
}

.right-panel {
  border-left: 1px solid var(--line);
}

.tac-card {
  background: var(--shade);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 9px 10px;
}

.card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text);
}

.card-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ── Stat Grids & Form Rows ──────────────────────────────────────────────── */

.stat-strip-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}

.stat-cell {
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 5px 6px;
}
.stat-cell .lbl {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-cell .val {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 1px;
  color: var(--text);
}
.stat-cell .val.cyan { color: var(--cyan); }
.stat-cell .val.red { color: var(--red); }
.stat-cell .val.amber { color: var(--amber); }
.stat-cell .val.green { color: var(--green); }

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 7px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.form-field label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-field input,
.form-field select {
  width: 100%;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 7px;
}

/* ── Entity Roster & List Items ──────────────────────────────────────────── */

.entity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
}

.entity-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.entity-row:hover {
  background: var(--shade-light);
}
.entity-row.selected {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}
.entity-row .ent-desig {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}
.entity-row .ent-meta {
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Center 3D Battlespace Viewport ──────────────────────────────────────── */

.center-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--window);
  overflow: hidden;
}

#globe-webgl-canvas,
#globe-hud-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#globe-hud-canvas {
  z-index: 2;
}

.viewport-top-hud {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
}

.viewport-tool-banner {
  position: absolute;
  top: 46px;
  left: 14px;
  z-index: 5;
  padding: 4px 9px;
  background: rgba(10, 12, 16, 0.88);
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.viewport-bottom-hud {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.geodesy-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 4px 10px;
  background: rgba(10, 12, 16, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 10px;
  color: var(--text);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.geodesy-bar > span {
  white-space: nowrap;
  flex-shrink: 0;
}
.geodesy-bar span b {
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

/* ── Live Sky Node ISR Video PIP & Raycast Target Pinning ────────────────── */

.isr-canvas-wrap {
  position: relative;
  width: 100%;
  height: 186px;
  background: #06080b;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: crosshair;
}

#isr-pip-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.isr-pip-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #06080b;
  z-index: 2;
}

.isr-canvas-wrap.is-live #isr-pip-canvas {
  visibility: hidden;
}

.isr-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Elevation & RF Shadow Profile Chart ─────────────────────────────────── */

.profile-canvas-wrap {
  width: 100%;
  height: 142px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

#elevation-profile-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Asset Dossier Card ──────────────────────────────────────────────────── */

.dossier-top {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.dossier-sym-box {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.conf-track {
  width: 100%;
  height: 6px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin: 4px 0 8px;
}
.conf-fill {
  height: 100%;
  background: var(--cyan);
}

.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  padding: 6px 7px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.kv-item .k {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kv-item .v {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
}

.chipout-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.chipout-thumb {
  height: 56px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}
.chipout-thumb canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.chipout-tag {
  position: absolute;
  bottom: 2px;
  left: 3px;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--text);
  background: rgba(10, 12, 16, 0.78);
  padding: 0 3px;
}

.similar-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  max-height: 145px;
  overflow-y: auto;
}
.similar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  cursor: pointer;
}
.similar-row:hover {
  border-color: var(--cyan);
}
.similar-row.selected {
  border-color: var(--cyan);
  border-left: 2px solid var(--cyan);
  background: rgba(0, 242, 254, 0.12);
}

.cot-pre {
  margin: 5px 0 0;
  padding: 6px;
  max-height: 96px;
  overflow: auto;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Bottom 4D Living Map Time Slider & Layer Bar ────────────────────────── */

.bottom-4d-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  min-width: 0;
  overflow: hidden;
  background: var(--shade);
  border-top: 1px solid var(--line);
  z-index: 20;
}

.time-scrubber-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 280px;
  max-width: 660px;
}

.time-scrubber-group > .btn,
.time-scrubber-group > .tac-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.scrubber-track-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.scrubber-ticks {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.scrubber-ticks > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.scrubber-ticks > span:last-child {
  flex-shrink: 0;
}

.layer-bar-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
}

/* ── Tactical Modal & Toast Notification ─────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 12, 16, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 410px;
  background: var(--shade);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.toast-banner {
  position: fixed;
  bottom: 106px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 85;
  padding: 7px 14px;
  background: rgba(14, 16, 20, 0.96);
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  max-width: min(560px, calc(100vw - 40px));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

@media (max-width: 1280px) {
  :root {
    --left-w: 310px;
    --right-w: 332px;
  }
}

/* ==========================================================================
   Esoteric Sci-Fi Full-Bleed Entry Gate (`#canopy-login-gate`)
   Restrained obsidian glass over live `canopy-hero.mp4`, sparse hairlines,
   slow orbital astrolabe geometry — zero clutter, zero neon clichés.
   ========================================================================== */

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #05070a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 460ms cubic-bezier(0.16, 1, 0.3, 1), visibility 460ms ease;
}

.login-gate.is-exiting {
  opacity: 0;
  pointer-events: none;
}

.login-gate.hidden {
  display: none;
}

.login-gate-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-gate-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.40) contrast(1.14) saturate(0.78);
  transform: scale(1.02);
}

.login-gate-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(7, 10, 15, 0.32) 0%, rgba(5, 7, 10, 0.82) 62%, rgba(4, 6, 9, 0.96) 100%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.65) 0%, rgba(5, 7, 10, 0.08) 28%, rgba(5, 7, 10, 0.14) 72%, rgba(5, 7, 10, 0.78) 100%);
}

.login-gate-astrolabe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(88vmin, 840px);
  height: min(88vmin, 840px);
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

.astrolabe-outer {
  transform-origin: 450px 450px;
  animation: canopyOrbitCW 160s linear infinite;
}

.astrolabe-inner {
  transform-origin: 450px 450px;
  animation: canopyOrbitCCW 220s linear infinite;
}

@keyframes canopyOrbitCW {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes canopyOrbitCCW {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.login-gate-frame {
  position: absolute;
  inset: 22px;
  pointer-events: none;
}

.gate-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(230, 232, 235, 0.24);
  border-style: solid;
  border-width: 0;
}

.gate-corner.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.gate-corner.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.gate-corner.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.gate-corner.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.login-gate-perimeter {
  position: absolute;
  left: 44px;
  right: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  font-size: 11px;
  color: rgba(230, 232, 235, 0.48);
  font-variant-numeric: tabular-nums;
}

.login-gate-perimeter.top { top: 34px; }
.login-gate-perimeter.bottom { bottom: 34px; }

.gate-brand {
  font-size: 13px;
  font-weight: 600;
  color: rgba(230, 232, 235, 0.82);
  letter-spacing: 0;
}

.gate-coord,
.gate-meta {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
}

.gate-video-btn {
  background: transparent;
  border: 1px solid rgba(230, 232, 235, 0.16);
  border-radius: 2px;
  color: rgba(230, 232, 235, 0.54);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.gate-video-btn:hover {
  color: #e6e8eb;
  border-color: rgba(230, 232, 235, 0.42);
}

.login-monolith {
  position: relative;
  z-index: 3;
  width: min(372px, calc(100vw - 48px));
  padding: 40px 34px 32px;
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(230, 232, 235, 0.09);
  border-radius: 2px;
}

.mono-corner {
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: rgba(0, 242, 254, 0.55);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}

.mono-corner.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.mono-corner.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.mono-corner.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.mono-corner.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.monolith-sigil {
  text-align: center;
  margin-bottom: 30px;
}

.monolith-mark {
  width: 38px;
  height: 38px;
  display: block;
  margin: 0 auto 18px;
  opacity: 0.92;
}

.monolith-title {
  margin: 0;
  padding-left: 0.44em;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.44em;
  color: #e6e8eb;
}

.monolith-cipher {
  margin: 10px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: rgba(139, 145, 154, 0.78);
  text-transform: uppercase;
}

.gate-status {
  margin-bottom: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 176, 32, 0.42);
  background: rgba(255, 176, 32, 0.06);
  color: rgba(255, 198, 92, 0.92);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}

.gate-status.is-neutral {
  border-color: rgba(230, 232, 235, 0.16);
  background: rgba(230, 232, 235, 0.04);
  color: rgba(230, 232, 235, 0.72);
}

.gate-error {
  margin-bottom: 16px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 77, 77, 0.6);
  background: rgba(255, 77, 77, 0.08);
  color: #ff7a7a;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-align: center;
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}

.gate-error.is-lockout {
  border-color: rgba(255, 77, 77, 0.78);
  background: rgba(255, 77, 77, 0.12);
  color: #ff8c8c;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gate-mfa-header {
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(230, 232, 235, 0.08);
}

.gate-mfa-prompt {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(0, 242, 254, 0.85);
}

.gate-mfa-identity {
  margin: 6px 0 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(139, 145, 154, 0.78);
}

.monolith-field input.gate-totp-input {
  height: 44px;
  padding: 0 12px 0 18px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.36em;
  font-variant-numeric: tabular-nums;
  color: #e6e8eb;
}

.monolith-field input.gate-totp-input::placeholder {
  letter-spacing: 0.36em;
  color: rgba(85, 91, 102, 0.72);
}

.monolith-field input.gate-totp-input.is-recovery {
  padding: 0 12px;
  font-size: 13.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.monolith-field input.gate-totp-input.is-recovery::placeholder {
  letter-spacing: 0.16em;
}

.gate-mfa-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: -4px;
}

.gate-mfa-actions .monolith-link {
  padding: 4px 2px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.monolith-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.monolith-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.monolith-field label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(139, 145, 154, 0.82);
  text-transform: uppercase;
}

.monolith-field input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: rgba(10, 12, 16, 0.65);
  border: 1px solid rgba(230, 232, 235, 0.14);
  border-radius: 2px;
  color: #e6e8eb;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.monolith-field input::placeholder {
  color: rgba(85, 91, 102, 0.85);
}

.monolith-field input:focus {
  border-color: rgba(0, 242, 254, 0.75);
  background: rgba(10, 12, 16, 0.88);
}

.monolith-submit {
  margin-top: 6px;
  height: 40px;
  width: 100%;
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.55);
  border-radius: 2px;
  color: #00f2fe;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.monolith-submit:hover {
  background: rgba(0, 242, 254, 0.14);
  border-color: #00f2fe;
  color: #e6e8eb;
}

.monolith-submit:disabled {
  opacity: 0.5;
  cursor: wait;
}

.monolith-observer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(230, 232, 235, 0.08);
  text-align: center;
}

.monolith-link {
  background: none;
  border: 0;
  padding: 4px 8px;
  color: rgba(139, 145, 154, 0.78);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 160ms ease;
}

.monolith-link:hover {
  color: #e6e8eb;
}

@media (prefers-reduced-motion: reduce) {
  .astrolabe-outer,
  .astrolabe-inner {
    animation: none;
  }
}

@media (max-width: 640px) {
  .login-gate-frame { inset: 12px; }
  .login-gate-perimeter { left: 22px; right: 22px; }
  .login-gate-perimeter.top { top: 20px; }
  .login-gate-perimeter.bottom { bottom: 20px; }
  .gate-coord, .gate-meta { display: none; }
  .login-monolith { padding: 32px 24px 26px; }
}

/* ============================================================================
   MAPLIBRE GL JS GLOBAL 3D VIEWPORT & MIL-STD-2525D MARKERS
   ============================================================================ */

.maplibre-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #0a0c10;
}

.maplibre-viewport.maplibre-dark-vector .maplibregl-canvas {
  filter: invert(0.92) hue-rotate(188deg) saturate(0.72) contrast(1.08) brightness(0.86);
}

/* The top-right capability rail owns the 0–165px band, so MapLibre's zoom /
   compass column starts clear below it (never overlaps at 1280x800 or 1440x900). */
.maplibre-viewport .maplibregl-ctrl-top-right {
  top: 150px;
  right: 10px;
}

.maplibre-viewport .maplibregl-ctrl-bottom-right {
  bottom: 42px;
  right: 10px;
}

.maplibre-viewport .maplibregl-ctrl-group {
  background: rgba(10, 12, 16, 0.86);
  border: 1px solid var(--line, #2a2f38);
  border-radius: 2px;
  box-shadow: none;
}

.maplibre-viewport .maplibregl-ctrl-group button {
  background-color: transparent;
  border-color: var(--line, #2a2f38);
}

.maplibre-viewport .maplibregl-ctrl-group button span.maplibregl-ctrl-icon {
  filter: invert(0.88);
}

.maplibre-viewport .maplibregl-ctrl-scale {
  background: rgba(10, 12, 16, 0.82);
  border-color: rgba(0, 242, 254, 0.55);
  color: var(--text, #e6e8eb);
  font-family: inherit;
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.maplibre-viewport .maplibregl-ctrl-attrib {
  background: rgba(10, 12, 16, 0.72);
  color: var(--text-muted, #8b919a);
  font-size: 9px;
}

.maplibre-viewport .maplibregl-ctrl-attrib a {
  color: var(--text-muted, #8b919a);
}

.canopy-ml-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  will-change: transform;
  opacity: 1 !important;
}

.canopy-ml-marker:hover {
  z-index: 25;
}

.canopy-ml-marker:hover .canopy-ml-sym {
  transform: scale(1.1);
}

.canopy-ml-marker.is-selected {
  z-index: 40;
}

.canopy-ml-marker.is-paired {
  z-index: 35;
}

.canopy-ml-marker.is-paired .canopy-ml-sym::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1.5px dashed #00f2fe;
  border-radius: 3px;
  background: rgba(0, 242, 254, 0.06);
  pointer-events: none;
}

.canopy-ml-marker.is-paired .canopy-ml-badge {
  border-color: #00f2fe;
  color: #00f2fe;
}

/* ── EMCON / RF Silence Stealth Aircraft Styling (No Emissive Rings) ──────── */
.canopy-ml-marker.is-emcon .canopy-ml-sym {
  filter: grayscale(1) brightness(0.75) opacity(0.72) !important;
  transform: scale(0.96);
}

.canopy-ml-marker.is-emcon .canopy-ml-sym::before,
.canopy-ml-marker.is-emcon .canopy-ml-sym::after {
  display: none !important;
  animation: none !important;
}

.canopy-ml-marker.is-emcon .canopy-ml-badge {
  background: rgba(18, 21, 26, 0.88) !important;
  border: 1px dashed #6b7280 !important;
  color: #9ca3af !important;
  box-shadow: none;
}

.uav-emcon-banner {
  background: rgba(55, 65, 81, 0.35);
  border: 1px dashed #9ca3af;
  border-radius: 3px;
  padding: 6px 8px;
  color: #d1d5db;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.35;
}

.uav-mission-card {
  border-color: rgba(0, 242, 254, 0.35);
}

.uav-mission-card.is-editing {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.07);
}

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

.uav-param-grid input[type="range"] {
  width: 100%;
  accent-color: #00f2fe;
}

.ooi-dropdown {
  background: rgba(10, 12, 16, 0.55);
  border: 1px solid var(--line, #2a2f38);
  border-radius: 3px;
  padding: 5px 7px;
}

.ooi-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.ooi-summary::-webkit-details-marker {
  display: none;
}

.gis-drawer {
  margin-top: 8px;
}

.gis-drawer > summary {
  cursor: pointer;
  padding: 6px 8px;
  background: rgba(20, 23, 28, 0.85);
  border: 1px solid var(--line, #2a2f38);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted, #8b919a);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gis-drawer[open] > summary {
  color: #00f2fe;
  border-color: rgba(0, 242, 254, 0.45);
  margin-bottom: 6px;
}

/* ── Rationalized OUR FLEET vs THEATER INTEL Left Panel ───────────────────── */
.domain-tab-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 7px;
}

.domain-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted, #8b919a);
  background: rgba(10, 12, 16, 0.72);
  border: 1px solid var(--line, #2a2f38);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}

.domain-tab:hover {
  color: #e6e8eb;
  border-color: rgba(0, 242, 254, 0.45);
}

.domain-tab.active {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border-color: #00f2fe;
}

.domain-tab .tab-pill {
  padding: 0 5px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  background: rgba(42, 47, 56, 0.9);
  border-radius: 2px;
  color: #e6e8eb;
}

.fleet-overlay-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
}

.fleet-overlay-bar .btn {
  white-space: nowrap;
  padding: 5px 4px;
  font-size: 9.5px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cop-kpi .stat-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  min-height: 28px;
}

.cop-kpi .stat-cell .val {
  font-size: 13px;
  line-height: 1;
}

.fleet-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.fleet-site-group {
  flex-shrink: 0;
  background: rgba(10, 12, 16, 0.74);
  border: 1px solid var(--line, #2a2f38);
  border-radius: 4px;
  overflow: hidden;
}

.fleet-site-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  background: rgba(20, 24, 31, 0.95);
  border-bottom: 1px solid var(--line, #2a2f38);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text, #e6e8eb);
  transition: background-color 120ms ease, color 120ms ease;
}

.fleet-site-hdr:hover,
.fleet-site-hdr.selected {
  background: rgba(0, 242, 254, 0.14);
  color: var(--cyan, #00f2fe);
}

.fleet-dock-row {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(42, 47, 56, 0.5);
  gap: 4px;
}

.fleet-dock-row:last-child {
  border-bottom: none;
}

.fleet-node-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 4px 6px;
  text-align: left;
  cursor: pointer;
  color: var(--text, #e6e8eb);
  font-size: 10.5px;
  line-height: 1.3;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.fleet-node-btn > span:first-child {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-node-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.25);
}

.fleet-node-btn.selected {
  background: rgba(0, 242, 254, 0.14);
  border-color: var(--cyan, #00f2fe);
  color: var(--cyan, #00f2fe);
}

.fleet-uav-sub {
  margin-left: 10px;
  width: calc(100% - 10px);
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid rgba(0, 242, 254, 0.42);
  font-size: 10.5px;
  font-weight: 600;
}

.fleet-uav-sub.is-docked {
  border-left-color: rgba(34, 197, 94, 0.5);
  color: var(--text-muted, #94a3b8);
}

.fleet-uav-sub.is-emcon {
  border-left-color: #6b7280;
  color: #9ca3af;
}

.fleet-node-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted, #8b919a);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.fleet-mode-pill {
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(0, 242, 254, 0.14);
  color: var(--cyan, #00f2fe);
}

.fleet-mode-pill.docked {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
}

.fleet-mode-pill.rtd {
  background: rgba(255, 176, 32, 0.16);
  color: #ffb020;
}

.fleet-mode-pill.emcon {
  background: rgba(107, 114, 128, 0.22);
  color: #9ca3af;
}

/* ── Toggleable Range / Voltage / Altitude RF Simulator Popover ───────────── */
.rf-sim-popover {
  position: absolute;
  top: 56px;
  left: 14px;
  z-index: 60;
  width: 295px;
  padding: 10px 12px;
  background: rgba(10, 12, 16, 0.92);
  border: 1px solid rgba(0, 242, 254, 0.45);
  border-radius: 4px;
  backdrop-filter: blur(14px);
}

.rf-sim-popover input[type="range"] {
  width: 100%;
  accent-color: var(--cyan, #00f2fe);
}

/* ============================================================================
   AEROSPACE DESIGN LANGUAGE PACKS (1-Click Non-Destructive Live Switcher)
   ============================================================================ */

/* 1. LATTICE / ANDURIL MINIMAL — Floating Obsidian Glass HUD over Full-Bleed Map */
html[data-theme="lattice-minimal"] {
  --bg: #05070a;
  --panel: rgba(9, 12, 17, 0.78);
  --surface: rgba(15, 20, 28, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --cyan: #38bdf8;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --hud-left-inset: 338px;
  --hud-right-inset: 354px;
}

html[data-theme="lattice-minimal"] .workspace-grid {
  position: relative;
  display: block;
}

html[data-theme="lattice-minimal"] .center-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

html[data-theme="lattice-minimal"] .left-panel,
html[data-theme="lattice-minimal"] .right-panel {
  position: absolute;
  top: 10px;
  bottom: 10px;
  z-index: 20;
  width: 328px;
  background: transparent;
  border: none;
  padding: 0;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  transition: transform 180ms var(--yirra-sheet-ease), opacity 160ms linear;
}

html[data-theme="lattice-minimal"] .left-panel { left: 10px; }
html[data-theme="lattice-minimal"] .right-panel { right: 10px; width: 344px; }

html[data-theme="lattice-minimal"] .viewport-top-hud,
html[data-theme="aero-cockpit"] .viewport-top-hud {
  left: calc(var(--hud-left-inset) + 12px);
  right: auto;
  max-width: calc(100% - var(--hud-left-inset) - var(--hud-right-inset) - 124px);
  transition: left 180ms var(--yirra-sheet-ease), max-width 180ms var(--yirra-sheet-ease);
}

html[data-theme="lattice-minimal"] .viewport-tool-banner,
html[data-theme="aero-cockpit"] .viewport-tool-banner {
  left: calc(var(--hud-left-inset) + 12px);
  right: auto;
  max-width: calc(100% - var(--hud-left-inset) - var(--hud-right-inset) - 124px);
  transition: left 180ms var(--yirra-sheet-ease);
}

html[data-theme="lattice-minimal"] .viewport-bottom-hud,
html[data-theme="aero-cockpit"] .viewport-bottom-hud {
  left: calc(var(--hud-left-inset) + 12px);
  right: calc(var(--hud-right-inset) + 12px);
  transition: left 180ms var(--yirra-sheet-ease), right 180ms var(--yirra-sheet-ease);
}

html[data-theme="lattice-minimal"] .maplibre-viewport .maplibregl-ctrl-top-right,
html[data-theme="aero-cockpit"] .maplibre-viewport .maplibregl-ctrl-top-right,
html[data-theme="lattice-minimal"] .maplibre-viewport .maplibregl-ctrl-bottom-right,
html[data-theme="aero-cockpit"] .maplibre-viewport .maplibregl-ctrl-bottom-right {
  right: calc(var(--hud-right-inset) + 12px);
  transition: right 180ms var(--yirra-sheet-ease);
}

.entity-row,
.zone-row {
  flex-shrink: 0;
}

/* ── Multi-UAV Search, Animated Discovery Feed & Priority Triage HUD ─────── */
.mesh-peer-chip.is-selected-chip {
  background: rgba(56, 189, 248, 0.20);
  border-color: var(--cyan, #38bdf8);
  color: var(--cyan, #38bdf8);
}

.priority-triage-hud {
  position: absolute;
  bottom: 48px;
  left: 348px;
  z-index: 65;
  width: 380px;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: rgba(8, 11, 17, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
}

html[data-theme="yirra-tactical"] .priority-triage-hud,
html[data-theme="field-daylight"] .priority-triage-hud {
  left: 14px;
}

.triage-feed-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 82px;
  overflow-y: auto;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line, #2a2f38);
  border-radius: 3px;
}

.triage-feed-item {
  font-size: 9.5px;
  color: var(--text, #f8fafc);
  animation: triageFadeIn 220ms ease-out;
}

.triage-feed-item .ts {
  color: var(--text-muted, #94a3b8);
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}

.triage-feed-item.is-caution { color: #fbbf24; }
.triage-feed-item.is-ok { color: #34d399; }

@keyframes triageFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.triage-priority-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 165px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.triage-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  background: rgba(15, 20, 28, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 4px;
  cursor: grab;
  transition: border-color 120ms ease, opacity 120ms ease;
}

.triage-row:hover {
  border-color: var(--cyan, #38bdf8);
}

.triage-row.is-dragging {
  opacity: 0.45;
  border-style: dashed;
}

.triage-row.is-below-thresh {
  opacity: 0.38;
}

.triage-row.is-verified {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(16, 185, 129, 0.10);
}

.triage-rank {
  font-size: 10px;
  font-weight: 800;
  color: var(--cyan, #38bdf8);
  font-variant-numeric: tabular-nums;
  min-width: 22px;
}

.triage-main {
  flex: 1;
  min-width: 0;
}

.triage-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.triage-sub {
  font-size: 9px;
  color: var(--text-muted, #94a3b8);
  font-variant-numeric: tabular-nums;
}

.triage-Controls {
  display: flex;
  gap: 3px;
}

.slide-verify-wrap {
  position: relative;
  height: 32px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.48);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slide-verify-lbl {
  position: absolute;
  pointer-events: none;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan, #38bdf8);
}

.slide-verify-input {
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0.85;
  cursor: ew-resize;
  accent-color: var(--cyan, #38bdf8);
}

html[data-theme="lattice-minimal"] .rf-sim-popover,
html[data-theme="aero-cockpit"] .rf-sim-popover {
  left: calc(var(--hud-left-inset) + 14px);
  transition: left 180ms var(--yirra-sheet-ease);
}

html[data-theme="lattice-minimal"] .left-panel > *,
html[data-theme="lattice-minimal"] .right-panel > * {
  pointer-events: auto;
}

html[data-theme="lattice-minimal"] .tac-card {
  background: rgba(8, 11, 17, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 4px;
  contain: layout style;
}

html[data-theme="lattice-minimal"] .bracket-box::before,
html[data-theme="lattice-minimal"] .bracket-box::after {
  display: none;
}

html[data-theme="lattice-minimal"] .top-cmd-bar {
  background: rgba(6, 9, 14, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

html[data-theme="lattice-minimal"] .btn {
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* 2. AERO / NORTHROP-BOEING COCKPIT — Carbon Instrument Glass + Avionics Emerald */
html[data-theme="aero-cockpit"] {
  --bg: #030508;
  --panel: rgba(7, 10, 14, 0.84);
  --surface: rgba(13, 18, 25, 0.88);
  --line: rgba(16, 185, 129, 0.22);
  --text: #f1f5f9;
  --text-muted: #7c8b9c;
  --cyan: #10b981;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --hud-left-inset: 332px;
  --hud-right-inset: 350px;
}

html[data-theme="aero-cockpit"] .workspace-grid {
  position: relative;
  display: block;
}

html[data-theme="aero-cockpit"] .center-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

html[data-theme="aero-cockpit"] .left-panel,
html[data-theme="aero-cockpit"] .right-panel {
  position: absolute;
  top: 8px;
  bottom: 8px;
  z-index: 20;
  width: 324px;
  background: transparent;
  border: none;
  padding: 0;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  transition: transform 180ms var(--yirra-sheet-ease), opacity 160ms linear;
}

html[data-theme="aero-cockpit"] .left-panel { left: 8px; }
html[data-theme="aero-cockpit"] .right-panel { right: 8px; width: 342px; }

html[data-theme="aero-cockpit"] .left-panel > *,
html[data-theme="aero-cockpit"] .right-panel > * {
  pointer-events: auto;
}

html[data-theme="aero-cockpit"] .tac-card {
  background: rgba(5, 8, 12, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 2px;
  contain: layout style;
}

html[data-theme="aero-cockpit"] .top-cmd-bar {
  background: #04070b;
  border-bottom: 1px solid rgba(16, 185, 129, 0.30);
}

/* 3. FIELD DAYLIGHT — High-Contrast Sunlight-Readable GCS Light Theme */
html[data-theme="field-daylight"] {
  --window: #e2e8f0;
  --shade: #f8fafc;
  --shade-dark: #eef2f6;
  --shade-light: #e2e8f0;
  --bg: #e2e8f0;
  --panel: #f1f5f9;
  --surface: #ffffff;
  --line: #cbd5e1;
  --line-strong: #94a3b8;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --ink: #ffffff;
  --hud-bg: rgba(248, 250, 252, 0.94);
  --hud-line: rgba(15, 23, 42, 0.16);
  --cyan: #0284c7;
  --cyan-soft: rgba(2, 132, 199, 0.12);
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
}

html[data-theme="field-daylight"] body,
html[data-theme="field-daylight"] .top-cmd-bar,
html[data-theme="field-daylight"] .bottom-4d-bar,
html[data-theme="field-daylight"] .left-panel,
html[data-theme="field-daylight"] .right-panel {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="field-daylight"] .tac-card,
html[data-theme="field-daylight"] .uav-metric-card,
html[data-theme="field-daylight"] .fleet-site-group,
html[data-theme="field-daylight"] .fleet-site-hdr,
html[data-theme="field-daylight"] .rf-sim-popover,
html[data-theme="field-daylight"] .kv-grid,
html[data-theme="field-daylight"] .gis-drawer,
html[data-theme="field-daylight"] .ooi-dropdown,
html[data-theme="field-daylight"] .yc-section,
html[data-theme="field-daylight"] .yc-drawer,
html[data-theme="field-daylight"] .yc-metric,
html[data-theme="field-daylight"] .yc-item {
  background: rgba(255, 255, 255, 0.95);
  border-color: #cbd5e1;
  color: #0f172a;
}

html[data-theme="field-daylight"] .gis-drawer > summary,
html[data-theme="field-daylight"] .ooi-dropdown > summary {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

html[data-theme="field-daylight"] .geodesy-bar,
html[data-theme="field-daylight"] .toast-banner,
html[data-theme="field-daylight"] .viewport-tool-banner,
html[data-theme="field-daylight"] .panel-edge-reopen,
html[data-theme="field-daylight"] .yc-rail-btn {
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  border-color: #94a3b8;
}

html[data-theme="field-daylight"] .btn,
html[data-theme="field-daylight"] .mode-tab,
html[data-theme="field-daylight"] .tac-badge,
html[data-theme="field-daylight"] .domain-tab,
html[data-theme="field-daylight"] .fleet-node-btn,
html[data-theme="field-daylight"] .sortie-mini-row,
html[data-theme="field-daylight"] input,
html[data-theme="field-daylight"] select,
html[data-theme="field-daylight"] textarea {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

html[data-theme="field-daylight"] .mode-tab.active,
html[data-theme="field-daylight"] .btn-toggle.active,
html[data-theme="field-daylight"] .domain-tab.active {
  background: rgba(2, 132, 199, 0.14);
  border-color: #0284c7;
  color: #0369a1;
}

html[data-theme="field-daylight"] .brand-yirra,
html[data-theme="field-daylight"] .card-title,
html[data-theme="field-daylight"] .v {
  color: #0f172a;
}

/* ── Side Panel Visibility Controls & Collapse Mechanics ─────────────────── */
.panel-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.panel-toggle-group .btn {
  padding: 0 6px;
  height: 26px;
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.mode-tab.is-collapsed {
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--shade-dark);
}

/* Floating themes (lattice-minimal & aero-cockpit): slide panels off-canvas & reclaim HUD insets */
html[data-theme="lattice-minimal"] #canopy-shell.left-collapsed,
html[data-theme="aero-cockpit"] #canopy-shell.left-collapsed {
  --hud-left-inset: 0px;
}

html[data-theme="lattice-minimal"] #canopy-shell.right-collapsed,
html[data-theme="aero-cockpit"] #canopy-shell.right-collapsed {
  --hud-right-inset: 0px;
}

html[data-theme="lattice-minimal"] #canopy-shell.left-collapsed .left-panel,
html[data-theme="aero-cockpit"] #canopy-shell.left-collapsed .left-panel {
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

html[data-theme="lattice-minimal"] #canopy-shell.right-collapsed .right-panel,
html[data-theme="aero-cockpit"] #canopy-shell.right-collapsed .right-panel {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Docked grid themes (yirra-tactical & field-daylight): collapse grid columns to 0px */
html[data-theme="yirra-tactical"] #canopy-shell.left-collapsed .workspace-grid,
html[data-theme="field-daylight"] #canopy-shell.left-collapsed .workspace-grid {
  grid-template-columns: 0px minmax(0, 1fr) var(--right-w);
}

html[data-theme="yirra-tactical"] #canopy-shell.right-collapsed .workspace-grid,
html[data-theme="field-daylight"] #canopy-shell.right-collapsed .workspace-grid {
  grid-template-columns: var(--left-w) minmax(0, 1fr) 0px;
}

html[data-theme="yirra-tactical"] #canopy-shell.left-collapsed.right-collapsed .workspace-grid,
html[data-theme="field-daylight"] #canopy-shell.left-collapsed.right-collapsed .workspace-grid {
  grid-template-columns: 0px minmax(0, 1fr) 0px;
}

html[data-theme="yirra-tactical"] #canopy-shell.left-collapsed .left-panel,
html[data-theme="field-daylight"] #canopy-shell.left-collapsed .left-panel,
html[data-theme="yirra-tactical"] #canopy-shell.right-collapsed .right-panel,
html[data-theme="field-daylight"] #canopy-shell.right-collapsed .right-panel {
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Slim floating edge tabs to reopen collapsed side panels from the map edges */
.panel-edge-reopen {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 23;
  padding: 8px 6px;
  background: rgba(10, 12, 16, 0.88);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: border-color 120ms linear, color 120ms linear, background-color 120ms linear;
}
.panel-edge-reopen:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(14, 18, 26, 0.96);
}
.panel-edge-reopen.edge-left {
  left: 8px;
}
.panel-edge-reopen.edge-right {
  right: 8px;
}

/* ── Operator Aircraft & Dock Ops Panels ──────────────────────────────────── */
.uav-ops-panel,
.dock-ops-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.btn-rtd {
  background: rgba(255, 176, 32, 0.16);
  border: 1px solid #ffb020;
  color: #ffb020;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 8px 10px;
  border-radius: 3px;
  transition: background-color 140ms ease, color 140ms ease;
}

.btn-rtd:hover:not(:disabled) {
  background: #ffb020;
  color: #0a0c10;
}

.btn-rtd.is-active-rtd {
  background: #ffb020;
  color: #0a0c10;
}

.uav-cmd-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.uav-cmd-row .btn.is-active {
  border-color: #00f2fe;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.14);
}

.uav-metric-card {
  background: rgba(10, 12, 16, 0.72);
  border: 1px solid var(--line, #2a2f38);
  border-radius: 3px;
  padding: 6px 8px;
}

.uav-metric-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.uav-metric-hdr .k {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted, #8b919a);
  text-transform: uppercase;
}

.uav-metric-hdr .v,
.uav-metric-card > .v {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text, #e6e8eb);
}

.uav-bar-track {
  height: 5px;
  background: rgba(42, 47, 56, 0.9);
  border-radius: 2px;
  overflow: hidden;
  margin: 3px 0 4px;
}

.uav-bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  transition: width 200ms ease, background-color 200ms ease;
}

.uav-bar-fill.is-caution { background: #ffb020; }
.uav-bar-fill.is-danger { background: #ef4444; }

.uav-metric-sub {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--text-muted, #8b919a);
  letter-spacing: 0.04em;
}

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

.rf-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.rf-bar {
  width: 3px;
  background: rgba(139, 145, 154, 0.28);
  border-radius: 1px;
}

.rf-bar:nth-child(1) { height: 4px; }
.rf-bar:nth-child(2) { height: 6px; }
.rf-bar:nth-child(3) { height: 8px; }
.rf-bar:nth-child(4) { height: 11px; }

.rf-bar.is-lit { background: #00f2fe; }
.rf-bar.is-lit.is-caution { background: #ffb020; }
.rf-bar.is-lit.is-danger { background: #ef4444; }

.uav-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mesh-peer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mesh-peer-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: 9.5px;
  font-weight: 600;
  color: #e6e8eb;
  background: rgba(20, 23, 28, 0.9);
  border: 1px solid #2a2f38;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}

.mesh-peer-chip:hover {
  border-color: #00f2fe;
  color: #00f2fe;
}

.mesh-peer-chip .peer-rssi {
  color: #00f2fe;
  font-variant-numeric: tabular-nums;
}

.dock-assigned-card {
  border-color: rgba(0, 242, 254, 0.4);
}

.dock-uav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dock-uav-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #00f2fe;
  letter-spacing: 0.04em;
}

.dock-uav-batt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sortie-mini-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 116px;
  overflow-y: auto;
}

.sortie-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 6px;
  font-size: 10px;
  background: rgba(10, 12, 16, 0.65);
  border: 1px solid rgba(42, 47, 56, 0.8);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.sortie-mini-row:hover {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.08);
}

.sortie-mini-row .row-main {
  font-weight: 600;
  color: var(--text, #e6e8eb);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sortie-mini-row .row-meta {
  font-size: 9px;
  color: var(--text-muted, #8b919a);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.site-ops-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-right: 5px;
  flex-shrink: 0;
}

.status-dot.airborne { background: #00f2fe; }
.status-dot.returning { background: #ffb020; }
.status-dot.docked { background: #22c55e; }
.status-dot.fault { background: #ef4444; }

.dispatch-cand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 6px;
  background: rgba(10, 12, 16, 0.72);
  border: 1px solid #2a2f38;
  border-radius: 3px;
}

.dispatch-cand-row .cand-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dispatch-cand-row .cand-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #e6e8eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-cand-row .cand-sub {
  font-size: 9px;
  color: #8b919a;
  font-variant-numeric: tabular-nums;
}

/* ── Map Right-Click Tactical Context Menu ────────────────────────────────── */
.map-ctx-menu {
  position: fixed;
  z-index: 9500;
  min-width: 215px;
  background: rgba(10, 12, 16, 0.96);
  border: 1px solid #2a2f38;
  border-radius: 4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  backdrop-filter: blur(8px);
}

.map-ctx-menu.hidden {
  display: none;
}

.map-ctx-hdr {
  padding: 5px 8px 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00f2fe;
  border-bottom: 1px solid #2a2f38;
  margin-bottom: 2px;
}

.map-ctx-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #e6e8eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-ctx-item:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.45);
  color: #00f2fe;
}

.map-ctx-item.is-caution { color: #ffb020; }
.map-ctx-item.is-caution:hover {
  background: rgba(255, 176, 32, 0.14);
  border-color: rgba(255, 176, 32, 0.55);
  color: #ffb020;
}

.map-ctx-item.is-danger { color: #ef4444; }
.map-ctx-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.55);
  color: #ef4444;
}

.canopy-ml-sym {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 140ms ease;
}

.canopy-ml-marker.is-selected .canopy-ml-sym {
  transform: scale(1.18);
}

/* Selected marker: hard-edged 2–3 px tactical reticle. The `#00f2fe` fallback
   is reachable only from the `.is-selected` state (one active selection). */
.canopy-ml-marker.is-selected .canopy-ml-sym::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 2px solid var(--marker-color, var(--cyan));
  border-radius: 2px;
  opacity: 0.85;
  animation: canopySelectedPulse 1.6s ease-out infinite;
  pointer-events: none;
}

.canopy-ml-marker.is-selected .canopy-ml-sym::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid var(--marker-color, var(--cyan));
  border-radius: 3px;
  pointer-events: none;
}

.canopy-ml-badge {
  margin-top: 3px;
  padding: 1px 5px;
  background: rgba(10, 12, 16, 0.88);
  border: 1px solid var(--marker-color, #2a2f38);
  border-radius: 2px;
  color: #e6e8eb;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.25;
  transition: background-color 140ms ease, color 140ms ease;
}

.canopy-ml-marker.is-selected .canopy-ml-badge {
  margin-top: 7px;
  background: var(--marker-color, var(--cyan));
  border-color: var(--line-strong);
  color: var(--ink);
  font-weight: 700;
}

.canopy-ml-pin-pulse {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  border: 2px solid var(--pin-color, var(--cyan));
  background: transparent;
  animation: canopyPinPulse 0.9s ease-out infinite;
  pointer-events: none;
}

@keyframes canopySelectedPulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.65); opacity: 0; }
}

@keyframes canopyPinPulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.3); opacity: 0; }
}

/* ============================================================================
   EDGE FLEET & MISSION DISPATCH CONTROLS
   ============================================================================ */

.edge-dispatch-box {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line, #2a2f38);
}

.edge-dispatch-status {
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line, #2a2f38);
  border-radius: 2px;
  background: rgba(10, 12, 16, 0.75);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text, #e6e8eb);
  word-break: break-word;
}

.edge-dispatch-status.ok {
  border-color: var(--green, #5ad27a);
  color: var(--green, #5ad27a);
}

.edge-dispatch-status.danger {
  border-color: var(--red, #ff4d4d);
  color: var(--red, #ff4d4d);
}

.edge-dispatch-status.control {
  border-color: var(--cyan, #00f2fe);
  color: var(--cyan, #00f2fe);
}

.edge-device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--line, #2a2f38);
  border-radius: 2px;
  background: rgba(16, 19, 25, 0.78);
  font-size: 10px;
}

.edge-device-row.online {
  border-left: 2px solid var(--cyan, #00f2fe);
}

.edge-device-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.edge-device-id {
  font-weight: 600;
  color: var(--text, #e6e8eb);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-device-sub {
  font-size: 9px;
  color: var(--text-muted, #8b919a);
  letter-spacing: 0.04em;
}

.edge-enroll-result {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line, #2a2f38);
}

.edge-token-line {
  font-size: 9.5px;
  color: var(--green, #5ad27a);
  margin-bottom: 5px;
  word-break: break-all;
}

/* ============================================================================
   ELASTIC RTX 3090 GPU WORKER TELEMETRY & CUDA 3DGS JOB BADGES
   ============================================================================ */

.gpu-worker-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.gpu-worker-name {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text, #e6e8eb);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gpu-telemetry-grid {
  margin-bottom: 7px;
}

.stat-cell .val.gpu-val-sm {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.gpu-worker-active {
  margin-bottom: 6px;
  padding: 4px 6px;
  background: var(--shade-dark, #0e1014);
  border: 1px solid var(--cyan, #00f2fe);
  border-radius: var(--radius-sm, 2px);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cyan, #00f2fe);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gpu-job-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.gpu-backend-badge {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  background: var(--shade-dark, #0e1014);
  border: 1px solid var(--line, #2a2f38);
  border-radius: var(--radius-sm, 2px);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #8b919a);
}

.gpu-backend-badge.is-cuda {
  border-color: #00f2fe;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.10);
}

.gpu-job-stats {
  font-size: 9.5px;
  color: var(--text-muted, #8b919a);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   OPERATOR SECURITY, MFA (TOTP) & SESSION PANEL (`#auth-modal`)
   ============================================================================ */

.security-modal-card {
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 16px 18px;
}

.sec-feedback {
  margin-bottom: 10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.sec-feedback.danger {
  border-color: var(--red);
  background: var(--red-soft);
  color: #ff8c8c;
}

.sec-feedback.ok {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.sec-section {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sec-section-last {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.sec-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.sec-kv-grid {
  margin-bottom: 9px;
}

.sec-btn-row {
  margin-bottom: 0;
}

.sec-field-gap {
  margin-bottom: 7px;
}

.sec-hint {
  margin: 0 0 8px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.sec-enroll-box {
  margin-top: 10px;
  padding: 10px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.sec-code-block {
  margin-bottom: 9px;
}

.sec-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.sec-code-val {
  display: block;
  width: 100%;
  padding: 6px 8px;
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  word-break: break-all;
  user-select: all;
}

.sec-uri-val {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  max-height: 54px;
  overflow-y: auto;
}

.sec-totp-input {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.22em;
  text-align: center;
}

.sec-recovery-box {
  margin-bottom: 10px;
  padding: 10px;
  background: rgba(255, 176, 32, 0.05);
  border: 1px solid rgba(255, 176, 32, 0.55);
  border-radius: var(--radius-sm);
}

.sec-recovery-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.sec-recovery-title {
  color: var(--amber);
}

.sec-recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-bottom: 9px;
}

.sec-recovery-code {
  padding: 5px 7px;
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text);
  text-align: center;
  user-select: all;
}

/* ============================================================================
   SORTIE MAPPING CARD, INGESTION MODAL & RESPONSIVE NO-CLIP LAYOUT
   ============================================================================ */

#mapping-card .form-field {
  margin-bottom: 6px;
}

#mapping-card select {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

#mapping-card .filter-row {
  margin-bottom: 5px;
}

#mapping-card .filter-row:last-child {
  margin-bottom: 0;
}

#mapping-card .btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingest-modal-card {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.ingest-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 132px;
  margin-bottom: 10px;
  padding: 14px 12px;
  background: var(--shade-dark);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.ingest-drop-zone:hover,
.ingest-drop-zone:focus-visible,
.ingest-drop-zone.is-dragover {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  outline: none;
}

.ingest-drop-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--text);
}

.ingest-drop-sub {
  max-width: 460px;
  font-size: 10px;
  line-height: 1.45;
  color: var(--text-muted);
}

.ingest-file-list {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--text-dim);
  word-break: break-word;
}

.ingest-results {
  max-height: 168px;
  margin: 8px 0;
  padding: 7px 9px;
  overflow-y: auto;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  line-height: 1.5;
}

.ingest-result-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid var(--line);
}

.ingest-result-row:last-child {
  border-bottom: 0;
}

.ingest-result-row .ok { color: var(--green); }
.ingest-result-row .bad { color: var(--red); }

/* Right rail must never scroll sideways: every card and canvas fits its column. */
.left-panel > *,
.right-panel > * {
  min-width: 0;
  max-width: 100%;
}

.right-panel canvas,
.left-panel canvas,
.right-panel img,
.right-panel video {
  max-width: 100%;
}

.right-panel .tac-card,
.left-panel .tac-card {
  overflow-x: hidden;
}

/* Cards keep their intrinsic height and the rail scrolls instead, so action
   rows (e.g. SORTIE ORTHOMOSAIC & GIS exports) are never vertically clipped. */
.right-panel > .tac-card {
  flex-shrink: 0;
}

@media (max-width: 1600px) {
  :root {
    --left-w: 320px;
    --right-w: 356px;
  }
  .top-cmd-bar {
    gap: 6px;
    padding: 0 8px;
  }
  .brand-doc-id,
  #badge-sat-status,
  #badge-gpu-status,
  #badge-gpu-worker,
  #badge-edge-links {
    display: none;
  }
  #ui-theme-select {
    max-width: 126px;
  }
  .mode-tab {
    padding: 0 7px;
    letter-spacing: 0.05em;
  }
  .status-cluster {
    gap: 4px;
  }
  .tac-badge {
    font-size: 9px;
    padding: 3px 5px;
  }
}

@media (max-width: 1520px) {
  #canopy-shell:not(.left-collapsed):not(.right-collapsed) .geodesy-bar.geodesy-hints {
    display: none;
  }
}

@media (max-width: 1440px) {
  :root {
    --left-w: 286px;
    --right-w: 330px;
    --topbar-h: 48px;
  }
  .top-cmd-bar {
    gap: 5px;
    padding: 0 7px;
  }
  .brand-product {
    display: none;
  }
  .ao-cluster .micro-label,
  #btn-sync-sat-top,
  #badge-gpu-worker,
  #badge-edge-links,
  #badge-sat-status,
  #badge-gpu-status {
    display: none;
  }
  #ao-select {
    max-width: 136px;
  }
  #ui-theme-select {
    max-width: 116px;
  }
  .mode-tab {
    padding: 0 6px;
    font-size: 9.5px;
    letter-spacing: 0.04em;
  }
  .btn-xs {
    padding: 3px 5px;
    font-size: 9.5px;
  }
  .top-cmd-bar .yirra-one-coin-strip {
    gap: 4px;
  }
  .isr-canvas-wrap {
    height: 168px;
  }
  .profile-canvas-wrap {
    height: 124px;
  }
}

@media (max-width: 1360px) {
  .bottom-4d-bar {
    gap: 8px;
    padding: 0 8px;
  }
  .time-scrubber-group {
    gap: 6px;
    min-width: 240px;
  }
  .scrubber-ticks {
    gap: 4px;
    font-size: 8.5px;
    letter-spacing: 0.04em;
  }
  .layer-bar-group {
    gap: 3px;
  }
}

@media (max-width: 1280px) {
  :root {
    --left-w: 262px;
    --right-w: 306px;
  }
  html[data-theme="lattice-minimal"] {
    --hud-left-inset: 312px;
    --hud-right-inset: 326px;
  }
  html[data-theme="lattice-minimal"] .left-panel { width: 302px; }
  html[data-theme="lattice-minimal"] .right-panel { width: 316px; }
  html[data-theme="aero-cockpit"] {
    --hud-left-inset: 308px;
    --hud-right-inset: 322px;
  }
  html[data-theme="aero-cockpit"] .left-panel { width: 300px; }
  html[data-theme="aero-cockpit"] .right-panel { width: 314px; }
  .brand-mark-sm {
    width: 24px;
    height: 24px;
  }
  .brand-yirra {
    font-size: 12px;
  }
  #ao-select {
    max-width: 118px;
    font-size: 10px;
  }
  #ui-theme-select {
    max-width: 106px;
  }
  .mode-tab {
    padding: 0 4px;
    font-size: 8.5px;
    letter-spacing: 0.02em;
  }
  .panel-toggle-group .btn {
    padding: 0 4px;
    font-size: 9px;
  }
  .top-cmd-bar {
    gap: 4px;
    padding: 0 6px;
  }
  .status-cluster {
    gap: 3px;
  }
  .tac-badge {
    padding: 2px 4px;
    font-size: 8.5px;
  }
  .btn-xs {
    padding: 2px 4px;
    font-size: 8.5px;
  }
  .yirra-one-coin-strip__margin,
  .yirra-authority-label {
    font-size: 8.5px;
    letter-spacing: 0.05em;
  }
  .isr-canvas-wrap {
    height: 150px;
  }
  .profile-canvas-wrap {
    height: 108px;
  }
  html[data-theme="yirra-tactical"] .right-panel,
  html[data-theme="yirra-tactical"] .left-panel,
  html[data-theme="field-daylight"] .right-panel,
  html[data-theme="field-daylight"] .left-panel {
    padding: 6px;
    gap: 6px;
  }
  .tac-card {
    padding: 7px 8px;
  }
}

@media (max-width: 1120px) {
  .brand-yirra,
  #badge-ws-status,
  #btn-ingest-open {
    display: none;
  }
  .mode-tab {
    padding: 0 4px;
    font-size: 8.5px;
  }
}

@media (max-width: 900px) {
  .mode-switcher {
    display: none;
  }
}

/* ==========================================================================
   OH-34 // COP KPI STRIP — 2x2 compact grid, never truncates or clips text
   ========================================================================== */

.stat-strip-4.cop-kpi {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.cop-kpi .stat-cell {
  min-width: 0;
  padding: 4px 6px;
  overflow: hidden;
}

.cop-kpi .stat-cell .lbl {
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cop-kpi .stat-cell .val {
  font-size: 13px;
  line-height: 1.15;
}

/* ==========================================================================
   OH-34 // CAPABILITY RAIL + SLIDE-OVER DRAWERS (modular panels)
   ========================================================================== */

.viewport-module-rail {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: auto;
}

/* Floating themes (lattice-minimal & aero-cockpit): keep capability rail clear of floating right panel */
html[data-theme="lattice-minimal"] .viewport-module-rail,
html[data-theme="aero-cockpit"] .viewport-module-rail {
  right: calc(var(--hud-right-inset) + 12px);
  z-index: 22;
  transition: right 180ms var(--yirra-sheet-ease);
}

.yc-rail-btn {
  min-width: 86px;
  justify-content: center;
  background: rgba(14, 16, 20, 0.92);
}

.yc-rail-btn:hover,
.yc-rail-btn:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.yc-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  justify-content: flex-end;
  background: rgba(10, 12, 16, 0.58);
}

.yc-drawer {
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  height: 100%;
  min-width: 0;
  background: var(--shade);
  border-left: 1px solid var(--line-strong);
}

.yc-drawer-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.yc-drawer-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.yc-drawer-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--text);
}

.yc-drawer-sub {
  font-size: 9px;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px 0;
}

.yc-tab {
  flex: 0 1 auto;
}

.yc-tab.active {
  border-color: var(--cyan);
  color: var(--cyan);
}

.yc-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.yc-tab-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yc-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yc-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 9px;
  background: var(--shade-dark);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.yc-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.yc-section-title {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--text);
}

.yc-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.yc-field-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.yc-drawer-body input,
.yc-drawer-body select,
.yc-drawer-body textarea {
  width: 100%;
  min-width: 0;
  background: var(--window);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-family: inherit;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.yc-drawer-body input:focus,
.yc-drawer-body select:focus,
.yc-drawer-body textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

.yc-textarea {
  resize: vertical;
  min-height: 64px;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

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

.yc-status {
  min-height: 12px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.yc-status.is-ok { color: var(--green); }
.yc-status.is-danger { color: var(--red); }
.yc-status.is-warn { color: var(--amber); }

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

.yc-metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 4px 6px;
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.yc-metric-k {
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

.yc-metric-v {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yc-result {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.yc-result-title {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--cyan);
}

.yc-note {
  font-size: 9.5px;
  line-height: 1.35;
  color: var(--text-muted);
}

.yc-note.is-warn { color: var(--amber); }

.yc-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.yc-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 7px;
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.yc-item-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.yc-item-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.yc-item-meta {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.3;
  word-break: break-word;
}

.yc-item-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.yc-empty {
  margin: 0;
  font-size: 9.5px;
  color: var(--text-muted);
}

.yc-badge {
  padding: 1px 5px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.yc-badge.is-ok { color: var(--green); border-color: var(--green); }
.yc-badge.is-warn { color: var(--amber); border-color: var(--amber); }
.yc-badge.is-danger { color: var(--red); border-color: var(--red); }
.yc-badge.is-muted { color: var(--text-dim); border-color: var(--line); }

.yc-btn-danger,
.btn.yc-btn-danger {
  color: var(--red);
}

.yc-download-btn {
  align-self: end;
}

.yc-range {
  width: 100%;
  accent-color: var(--cyan);
}

.yc-bookmark {
  margin-bottom: 2px;
}

@media (max-width: 1280px) {
  .yc-drawer {
    width: min(400px, 100%);
  }
  .yc-rail-btn {
    min-width: 74px;
    padding: 3px 4px;
    font-size: 8.5px;
  }
}

/* ══ Shared Signature Tactical Primitives (`docs/yirra-design-coherence.md` §3)
   One Coin parity with `yirra-gcs-app/custom/src/YirraFly/YirraTheme.js`:
   Inter only, tabular numerics, 2–4 px radii, flush 1 px brackets, off-white
   nominal text. `#00f2fe` is reached only through `.is-control` / `.is-active`
   (CONTROL authority and the single active selection). */

/* One Coin COP strip: readiness + authority pills mounted by `app.js` into the
   top-bar `.status-cluster`, plus the 1500 ms hold-confirm slot that replaces
   every bare dispatch button. */
.yirra-one-coin-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.yirra-one-coin-strip__margin {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.yirra-authority-label {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 1 — YirraBrackets: flush 1 px corner brackets, 8 px arms. */
.yirra-brackets {
  position: relative;
  --yirra-bracket-color: var(--line-strong);
  --yirra-bracket-arm: 8px;
}

.yirra-brackets__corner {
  position: absolute;
  width: var(--yirra-bracket-arm);
  height: var(--yirra-bracket-arm);
  pointer-events: none;
  border: 0 solid var(--yirra-bracket-color);
}

.yirra-brackets__corner.is-tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.yirra-brackets__corner.is-tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.yirra-brackets__corner.is-bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.yirra-brackets__corner.is-br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.yirra-brackets.is-control { --yirra-bracket-color: var(--cyan); }

.yirra-brackets.is-blocked {
  --yirra-bracket-color: var(--red);
  animation: yirra-bracket-pulse 500ms steps(2, end) infinite;
}

.yirra-brackets.is-danger {
  --yirra-bracket-color: var(--red);
  animation: yirra-bracket-pulse 500ms steps(2, end) infinite;
}

@keyframes yirra-bracket-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* 2 — YirraStatusPill: outlined state strip + nested square indicator. */
.yirra-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--shade-dark);
  color: var(--text);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.yirra-status-pill__indicator {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  flex-shrink: 0;
}

.yirra-status-pill__indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 50%;
  transform: translate(-50%, -50%);
  background: currentColor;
}

.yirra-status-pill__label {
  letter-spacing: inherit;
}

/* Nominal/idle stays calm off-white. Colour appears only when signalling state. */
.yirra-status-pill.is-ready { color: var(--text); border-color: var(--line-strong); }
.yirra-status-pill.is-flying-ok { color: var(--green); border-color: var(--green); }
.yirra-status-pill.is-check { color: var(--amber); border-color: var(--amber); }
.yirra-status-pill.is-blocked { color: var(--red); border-color: var(--red); }
.yirra-status-pill.is-no-link { color: var(--red); border-color: var(--red); }
.yirra-status-pill.is-control { color: var(--cyan); border-color: var(--cyan); }
.yirra-status-pill.is-observe { color: var(--text-muted); border-color: var(--line-strong); }
.yirra-status-pill.is-claiming {
  color: var(--amber);
  border-color: var(--amber);
  animation: yirra-pill-pulse 500ms steps(2, end) infinite;
}

@keyframes yirra-pill-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* 3 — YirraTopCentre: MODE | BATTERY + HOME MARGIN | SATS + HDOP | FLIGHT TIME. */
.yirra-top-centre {
  display: inline-flex;
  align-items: stretch;
  background: var(--hud-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}

.yirra-top-centre__cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  padding: 3px 10px;
  border-left: 1px solid var(--hud-line);
}

.yirra-top-centre__cell:first-child {
  border-left: 0;
}

.yirra-top-centre__value {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--text);
}

.yirra-top-centre__label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--text-muted);
}

.yirra-top-centre__value.is-warn { color: var(--amber); }
.yirra-top-centre__value.is-danger { color: var(--red); }

/* 4 — YirraSheet: right-hand tactical slide-over drawer. */
.yirra-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(var(--right-w), 100%);
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  color: var(--text);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  transform: translateX(100%);
  transition: transform 180ms var(--yirra-sheet-ease);
}

.yirra-sheet::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border: 0 solid var(--line-strong);
  top: 0;
  left: 0;
  border-top-width: 1px;
  border-left-width: 1px;
}

.yirra-sheet::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border: 0 solid var(--line-strong);
  bottom: 0;
  left: 0;
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.yirra-sheet.is-open {
  transform: translateX(0);
}

.yirra-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.yirra-sheet__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.yirra-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.yirra-sheet__close:hover {
  background: var(--shade-light);
  color: var(--text);
}

.yirra-sheet__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 12px;
}

.yirra-sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: var(--scrim, rgba(0, 0, 0, 0.65));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--yirra-sheet-ease);
}

.yirra-sheet-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* 5a — YirraHoldButton: 1500 ms hold-to-confirm progress fill. */
.yirra-hold-confirm {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--shade-dark);
  color: var(--text);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

.yirra-hold-confirm__fill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--shade-light);
  pointer-events: none;
}

.yirra-hold-confirm.is-holding .yirra-hold-confirm__fill {
  transform: scaleX(1);
  transition: transform var(--yirra-hold-ms) linear;
}

.yirra-hold-confirm__label {
  position: relative;
  z-index: 1;
}

.yirra-hold-confirm.is-danger { border-color: var(--red); color: var(--red); }
.yirra-hold-confirm.is-danger .yirra-hold-confirm__fill { background: var(--red-deep); }
.yirra-hold-confirm.is-danger.is-holding { color: var(--text); }
.yirra-hold-confirm.is-confirmed { border-color: var(--green); color: var(--green); }
.yirra-hold-confirm.is-confirmed .yirra-hold-confirm__fill { background: transparent; }

/* 5b — YirraSlideToConfirm: 92 % slide-to-confirm track. */
.yirra-slide-confirm {
  position: relative;
  display: flex;
  align-items: center;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--shade-dark);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.yirra-slide-confirm__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--shade-light);
  pointer-events: none;
}

.yirra-slide-confirm__label {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  pointer-events: none;
}

.yirra-slide-confirm__knob {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--shade);
  color: var(--text);
  transform: translateX(0);
}

.yirra-slide-confirm.is-danger { border-color: var(--red); color: var(--red); }
.yirra-slide-confirm.is-danger .yirra-slide-confirm__fill { background: var(--red-deep); }
.yirra-slide-confirm.is-armed .yirra-slide-confirm__knob {
  border-color: var(--amber);
  color: var(--amber);
}

/* One Coin actuation slot: `app.js` swaps a bare dispatch button for the
   1500 ms `createYirraHoldConfirm` gate, which must span the full card width. */
.yirra-actuation-slot {
  display: block;
  width: 100%;
}

.yirra-actuation-slot .yirra-hold-confirm {
  width: 100%;
}

/* ── Map Label Declutter Toggle (`Aa LABELS` OFF) ────────────────────────── */
.canopy-declutter-labels .canopy-ml-marker:not(.is-selected):not(:hover) .canopy-ml-badge {
  display: none !important;
}

/* ── Prominent Inline `▲ LAUNCH` Pill on Docked Aircraft Rows ───────────── */
.fleet-uav-row-wrap {
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  flex-shrink: 0;
}

.fleet-uav-row-wrap .fleet-uav-sub {
  flex: 1;
  min-width: 0;
}

.fleet-inline-launch {
  flex-shrink: 0;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 3px;
  border: 1px solid rgba(52, 211, 153, 0.65);
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.fleet-inline-launch:hover {
  background: rgba(16, 185, 129, 0.30);
  border-color: #34d399;
}

/* ── Tactical Quick-Send / EMCON / Contingency LZ Modal ─────────────────── */
.quick-send-modal {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 90px);
  overflow-y: auto;
  padding: 12px 14px;
  background: rgba(10, 14, 21, 0.97);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72);
  z-index: 60;
}

.qs-radio-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.qs-radio-seg .btn.active[data-radio-mode="EMCON_RECON"] {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.20);
  color: #e9d5ff;
}

.emcon-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 5px 7px;
  margin-bottom: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.55);
  font-size: 10px;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
}

.emcon-toggle-row input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #38bdf8;
  flex-shrink: 0;
}

.return-risk-box {
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.38;
  border: 1px solid rgba(52, 211, 153, 0.40);
  background: rgba(16, 185, 129, 0.10);
  color: #d1fae5;
}

.return-risk-box.is-caution {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(245, 158, 11, 0.14);
  color: #fef3c7;
}

.return-risk-box.is-danger {
  border-color: rgba(248, 113, 113, 0.75);
  background: rgba(239, 68, 68, 0.16);
  color: #fee2e2;
}

.tab-pill.has-unread {
  background: #f59e0b !important;
  color: #05070a !important;
  font-weight: 700;
}

/* ── Prevent right-panel content overflow/clipping on MacBook 13"/14" viewports ── */
.right-panel .tac-card,
.left-panel .tac-card {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.right-panel .card-hdr,
.right-panel .dossier-top,
.right-panel .kv-grid,
.right-panel .kv-item,
.right-panel .form-grid-2,
.right-panel .chipout-strip {
  min-width: 0;
  max-width: 100%;
}

.right-panel .btn-block,
.right-panel .btn {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.right-panel .kv-item .v,
.right-panel #dossier-sidc-sub {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.right-panel pre,
.right-panel .cot-preview {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
