/* ===========================================================================
   NSAI „Launch-Console"-Theme für Bootstrap 5.3 (via AssetMapper).
   Bewahrt die Identität (void/panel, ignition-Akzent, instrument-Cyan, Telemetrie-
   Mono, Status nominal/caution/fault) — kein generischer Bootstrap-Look. Wird NACH
   bootstrap.min.css geladen und überschreibt dessen Dark-Variablen auf die Palette.
   =========================================================================== */

:root {
  --ignition: #ff6a1a;
  --ignition-soft: #ff9b4d;
  --instrument: #3fe0d0;
  --void: #05070f;
  --panel: #0b1120;
  --muted: #9fb0cc;
  --nominal: #16c172;
  --caution: #d9a441;
  --fault: #ef4444;
}

/* Bootstrap-Dark-Palette auf die Console-Tokens ziehen. */
[data-bs-theme="dark"] {
  --bs-primary: #ff6a1a;
  --bs-primary-rgb: 255, 106, 26;
  --bs-primary-text-emphasis: #ff9b4d;
  --bs-body-bg: #05070f;
  --bs-body-bg-rgb: 5, 7, 15;
  --bs-body-color: #e9eefb;
  --bs-body-color-rgb: 233, 238, 251;
  --bs-emphasis-color: #ffffff;
  --bs-secondary-color: rgba(159, 176, 204, .85);
  --bs-tertiary-color: rgba(159, 176, 204, .55);
  --bs-tertiary-bg: #0b1120;
  --bs-border-color: rgba(99, 142, 196, .18);
  --bs-border-color-translucent: rgba(99, 142, 196, .18);
  --bs-link-color: #3fe0d0;
  --bs-link-color-rgb: 63, 224, 208;
  --bs-link-hover-color: #7ff0e4;
  --bs-success: #16c172; --bs-success-rgb: 22, 193, 114;
  --bs-warning: #d9a441; --bs-warning-rgb: 217, 164, 65;
  --bs-danger:  #ef4444; --bs-danger-rgb: 239, 68, 68;
  --bs-info:    #3fe0d0; --bs-info-rgb: 63, 224, 208;
  --bs-focus-ring-color: rgba(63, 224, 208, .35);
}

/* Karten = Panel mit dünner Kante. */
.card {
  --bs-card-bg: #0b1120;
  --bs-card-border-color: rgba(99, 142, 196, .18);
  --bs-card-cap-bg: transparent;
}

/* Eingaben: dunkler Void-Grund, instrument-Fokus. */
.form-control,
.form-select {
  background-color: rgba(5, 7, 15, .6);
  border-color: rgba(99, 142, 196, .22);
  color: var(--bs-body-color);
}
.form-control::placeholder { color: rgba(255, 255, 255, .3); }
.form-control:focus,
.form-select:focus {
  background-color: rgba(5, 7, 15, .6);
  border-color: var(--instrument);
  box-shadow: 0 0 0 .2rem rgba(63, 224, 208, .22);
  color: #fff;
}
.form-check-input:checked { background-color: var(--ignition); border-color: var(--ignition); }
.form-check-input:focus { border-color: var(--instrument); box-shadow: 0 0 0 .2rem rgba(63, 224, 208, .22); }
.form-label { color: var(--bs-secondary-color); }

/* Ignition-Primärbutton (schwarzer Text auf Orange). */
.btn-primary {
  --bs-btn-color: #180a02;
  --bs-btn-bg: #ff6a1a;
  --bs-btn-border-color: #ff6a1a;
  --bs-btn-hover-color: #180a02;
  --bs-btn-hover-bg: #ff7d33;
  --bs-btn-hover-border-color: #ff7d33;
  --bs-btn-active-bg: #e85f16;
  --bs-btn-active-border-color: #e85f16;
  --bs-btn-focus-shadow-rgb: 255, 106, 26;
  font-weight: 600;
}
.btn-outline-secondary {
  --bs-btn-color: var(--instrument);
  --bs-btn-border-color: rgba(63, 224, 208, .4);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(63, 224, 208, .12);
  --bs-btn-hover-border-color: var(--instrument);
}

/* Status-Alerts dezent (Rahmen + Ton, nie color-only — Icon/Label kommt aus dem Markup). */
.alert { --bs-alert-border-color: transparent; background-color: rgba(255, 255, 255, .03); }
.alert-success { --bs-alert-color: #7ee2b0; border-left: 3px solid var(--nominal); }
.alert-warning { --bs-alert-color: #f0d08a; border-left: 3px solid var(--caution); }
.alert-danger  { --bs-alert-color: #f6a6a6; border-left: 3px solid var(--fault); }
.alert-info    { --bs-alert-color: #8fecE2; border-left: 3px solid var(--instrument); }

/* HUD-Eckwinkel als Utility (für Auth-Karten u. a.). */
.hud-frame { position: relative; }
.hud-frame > .hud-tick { position: absolute; width: 1rem; height: 1rem; pointer-events: none; opacity: .55; }
.hud-frame > .hud-tl { top: -1px; left: -1px; border-top: 1px solid var(--instrument); border-left: 1px solid var(--instrument); }
.hud-frame > .hud-tr { top: -1px; right: -1px; border-top: 1px solid var(--instrument); border-right: 1px solid var(--instrument); }
.hud-frame > .hud-bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--instrument); border-left: 1px solid var(--instrument); }
.hud-frame > .hud-br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--instrument); border-right: 1px solid var(--instrument); }

/* ── Console-Farb-Utilities: framework-agnostisch, überleben die Tailwind-Ablösung (P5) ── */
.text-instrument { color: var(--instrument) !important; }
.text-ignition   { color: var(--ignition) !important; }
.text-nominal    { color: var(--nominal) !important; }
.text-caution    { color: var(--caution) !important; }
.text-fault      { color: var(--fault) !important; }

/* ── Review-Nav (Bootstrap nav-tabs im Console-Look) ── */
.nav-tabs { --bs-nav-tabs-border-color: rgba(99,142,196,.18); }
.nav-tabs .nav-link { color: var(--muted); border-color: transparent; font-family: 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; padding: .4rem .7rem; }
.nav-tabs .nav-link:hover { color: var(--text); border-color: rgba(99,142,196,.18) rgba(99,142,196,.18) transparent; background: rgba(255,255,255,.03); }
.nav-tabs .nav-link.active { color: var(--ignition); background: rgba(255,106,26,.08); border-color: rgba(255,106,26,.4) rgba(255,106,26,.4) transparent; }

/* Aktiver Filter-/Chip-Button (Ignition). */
.btn.btn-console-active { color: var(--ignition); border-color: rgba(255,106,26,.5); background: rgba(255,106,26,.1); }
.btn.btn-console-active:hover { color: var(--ignition); border-color: rgba(255,106,26,.7); background: rgba(255,106,26,.15); }
/* Ignition-Outline-Aktion (Löschen/Zurückrollen). */
.btn.btn-outline-ignition { color: var(--ignition); border-color: rgba(255,106,26,.4); }
.btn.btn-outline-ignition:hover { color: var(--ignition); border-color: rgba(255,106,26,.6); background: rgba(255,106,26,.1); }

/* ── Tabellen im Console-Look ── */
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: rgba(99,142,196,.14); --bs-table-hover-bg: rgba(255,255,255,.03); --bs-table-hover-color: #fff; }
.table > :not(caption) > * > * { border-bottom-color: rgba(99,142,196,.10); }

/* ── Operator-Hub-Dashboard: Panels + klickbare Zeilen ── */
.hub-panel { background: rgba(255,255,255,.04); border: 1px solid rgba(99,142,196,.14); }
.hub-row { border: 1px solid rgba(99,142,196,.14); transition: background .15s, border-color .15s; text-decoration: none; color: inherit; }
a.hub-row:hover { background: rgba(255,255,255,.05); border-color: rgba(99,142,196,.30); color: inherit; }
.hub-row.is-alert { border-color: rgba(255,106,26,.4); background: rgba(255,106,26,.05); }
a.hub-row.is-alert:hover { background: rgba(255,106,26,.09); }

/* ── Shell-Wrapper (Header/Main/Footer): ersetzt Tailwind max-w-5xl mx-auto px-5 exakt (P5) ── */
.shell { width: 100%; max-width: 64rem; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* ── Overlays: Notification-Dropdown, Toasts, Push-Banner (framework-agnostisch nach Tailwind-Ablösung P5) ── */
.nsai-pop { border: 1px solid rgba(99,142,196,.18); background: rgba(11,17,32,.97); backdrop-filter: blur(8px); box-shadow: 0 12px 40px rgba(0,0,0,.5); border-radius: .6rem; }
.nsai-dd-head { border-bottom: 1px solid rgba(99,142,196,.14); }
.nsai-dd-foot { border-top: 1px solid rgba(99,142,196,.14); }
.nsai-linkish { background: none; border: 0; cursor: pointer; color: var(--muted); font: inherit; }
.nsai-linkish:hover { color: var(--ignition); }
.nsai-dd-item { display: block; padding: .5rem 1rem; text-decoration: none; color: var(--text); border-top: 1px solid rgba(99,142,196,.08); }
.nsai-dd-item:first-child { border-top: 0; }
.nsai-dd-item:hover { background: rgba(255,255,255,.05); }
.nsai-dd-item.is-read { opacity: .6; }
.nsai-dd-item .t { font-weight: 500; }
.nsai-dd-empty { padding: .75rem 1rem; color: var(--muted); }
.nsai-dd-time { font-size: 11px; color: var(--muted); margin-top: .1rem; }
.nsai-toast { width: 18rem; padding: .75rem 1rem; font-size: 12px; }
.nsai-toast .t { font-weight: 500; color: var(--instrument); }
.nsai-toast .b { color: var(--muted); }

/* ── Inline-SVG-Icons (framework-agnostisch, überleben die Tailwind-Ablösung P5) ── */
.nsai-ico { display: inline-block; flex-shrink: 0; vertical-align: -.125em; }
.w-3 { width: .75rem; }  .h-3 { height: .75rem; }
.w-3\.5 { width: .875rem; }  .h-3\.5 { height: .875rem; }
.w-4 { width: 1rem; }  .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }  .h-5 { height: 1.25rem; }

/* ── Admin-Listen: Inline-Textlinks, Sortier-Header, Status-Pillen ── */
.admin-navlink { color: var(--muted); text-decoration: none; font-size: .8rem; }
.admin-navlink:hover { color: var(--instrument); }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: var(--instrument); }
.pill { display: inline-block; padding: .1rem .45rem; border-radius: .25rem; font-size: 11px; line-height: 1.5; }
.pill-on { background: rgba(63,224,208,.15); color: var(--instrument); }
.pill-off { background: rgba(255,106,26,.2); color: var(--ignition); }
.pill-mute { background: rgba(255,255,255,.10); color: var(--muted); }
