:root {
  color-scheme: dark;
  --brand-orange: rgb(241, 56, 17);
  --brand-gray: rgb(38, 38, 38);
  --brand-black: rgb(26, 26, 26);
  --brand-white: rgb(255, 255, 255);
  --bg-base: var(--brand-black);
  --bg-strong: var(--brand-gray);
  --panel: rgba(38, 38, 38, 0.82);
  --panel-strong: rgba(26, 26, 26, 0.94);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(241, 56, 17, 0.78);
  --text: var(--brand-white);
  --muted: rgba(255, 255, 255, 0.76);
  --accent: var(--brand-orange);
  --accent-soft: rgba(241, 56, 17, 0.16);
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
  --app-zoom-scale: 0.7;
}

/* Normaliza selects oscuros entre Chrome, Firefox y Edge. */
:where(
  .camera-inference-field select,
  .camera-register-field select,
  .telemetry-map-style,
  .telemetry-monitor-filter select,
  .logs-filter select,
  .vehicle-register-camera-position
) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color-scheme: dark;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.74) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.74) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 1px),
    calc(100% - 11px) calc(50% - 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

:where(
  .camera-inference-field select,
  .camera-register-field select,
  .telemetry-map-style,
  .telemetry-monitor-filter select,
  .logs-filter select
) option,
:where(
  .camera-inference-field select,
  .camera-register-field select,
  .telemetry-map-style,
  .telemetry-monitor-filter select,
  .logs-filter select
) optgroup {
  background-color: #1a1a1a;
  color: #ffffff;
}

:where(
  .camera-inference-field select,
  .camera-register-field select,
  .telemetry-map-style,
  .telemetry-monitor-filter select,
  .logs-filter select
)::-ms-expand {
  display: none;
}

@supports (appearance: base-select) {
  :where(
    .camera-inference-field select,
    .camera-register-field select,
    .telemetry-map-style,
    .telemetry-monitor-filter select,
    .logs-filter select
  ) {
    appearance: base-select;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Escala global para que el dashboard se adapte correctamente a la ventana del navegador.
   Sin esto, el layout requería zoom manual al 60% en Chrome para verse bien. */
html {
  zoom: var(--app-zoom-scale);
}

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

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.18), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.05), transparent 18%),
    radial-gradient(circle at 75% 78%, rgba(241, 56, 17, 0.11), transparent 26%),
    linear-gradient(180deg, #292929 0%, #1b1b1b 36%, #141414 100%);
  color: var(--text);
  min-height: 100dvh;
  overflow: hidden;
}

body.is-modal-open {
  overflow: hidden;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg-base: #fff4ed;
  --bg-strong: #fffaf7;
  --panel: rgba(255, 246, 240, 0.92);
  --panel-strong: rgba(255, 249, 245, 0.98);
  --light-sidebar-orange: rgb(241, 56, 17);
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(241, 56, 17, 0.6);
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.68);
  --accent: rgb(226, 93, 44);
  --accent-soft: rgba(241, 56, 17, 0.16);
  --shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
  --light-surface-1: rgba(255, 248, 242, 0.98);
  --light-surface-2: rgba(255, 242, 234, 0.96);
  --light-surface-3: rgba(242, 231, 224, 0.94);
  --light-accent-surface: rgba(255, 232, 220, 0.96);
  --light-border: rgba(15, 23, 42, 0.11);
  --light-border-strong: rgba(15, 23, 42, 0.18);
  --light-ink-soft: #334155;
  --light-ink-muted: #64748b;
  background:
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.2), transparent 28%),
    radial-gradient(circle at 28% 0%, rgba(255, 214, 194, 0.78), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(255, 236, 226, 0.52), transparent 20%),
    radial-gradient(circle at 78% 78%, rgba(148, 163, 184, 0.08), transparent 24%),
    linear-gradient(180deg, #fff7f1 0%, #fcece1 42%, #f3ede8 100%);
}

.theme-toggle {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 120;
  width: 62px;
  height: 34px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.42);
}

.theme-toggle:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.42);
  outline-offset: 3px;
}

.theme-toggle-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
}

.theme-toggle-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  line-height: 1;
  color: rgba(248, 250, 252, 0.54);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.theme-toggle-icon.is-moon {
  opacity: 1;
  color: rgba(248, 250, 252, 0.9);
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(203, 213, 225, 0.88));
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.24);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

body[data-theme="light"] .theme-toggle {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(28px);
  background: linear-gradient(180deg, rgba(255, 245, 194, 0.98), rgba(251, 191, 36, 0.88));
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.18);
}

body[data-theme="light"] .theme-toggle-icon.is-sun {
  opacity: 1;
  color: rgba(217, 119, 6, 0.92);
}

body[data-theme="light"] .theme-toggle-icon.is-moon {
  opacity: 0.56;
  color: rgba(71, 85, 105, 0.72);
}

body.is-theme-toggle-hidden .theme-toggle {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

body[data-theme="light"] .app-sidebar {
  border-right-color: #9a3412;
  background: var(--light-sidebar-orange);
  box-shadow:
    18px 0 42px rgba(154, 52, 18, 0.24),
    inset 0 1px 0 rgba(255, 155, 64, 0.3);
}

body[data-theme="light"] .app-sidebar::before,
body[data-theme="light"] .app-sidebar::after {
  opacity: 0.26;
}

body[data-theme="light"] .app-sidebar::before {
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 137, 42, 0.28), transparent 18%),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 122, 26, 0.12) 16%,
      rgba(154, 52, 18, 0.34) 50%,
      rgba(255, 122, 26, 0.12) 84%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0),
      rgba(255, 117, 24, 0.24) 46%,
      rgba(255, 255, 255, 0)
    );
  box-shadow:
    0 0 14px rgba(154, 52, 18, 0.2),
    0 0 26px rgba(242, 92, 5, 0.16);
}

body[data-theme="light"] .app-sidebar::after {
  background:
    radial-gradient(ellipse at center, rgba(255, 132, 36, 0.24), transparent 60%),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 122, 26, 0.12) 28%,
      rgba(154, 52, 18, 0.22) 38%,
      rgba(255, 163, 87, 0.3) 56%,
      rgba(154, 52, 18, 0.2) 72%,
      rgba(255, 255, 255, 0) 100%
    );
  box-shadow:
    0 0 18px rgba(154, 52, 18, 0.2),
    0 0 32px rgba(242, 92, 5, 0.18);
}

body[data-theme="light"] .top,
body[data-theme="light"] .page-dashboard .top-dashboard,
body[data-theme="light"] .top-page {
  background:
    linear-gradient(180deg, rgba(255, 246, 239, 0.98), rgba(252, 238, 229, 0.9)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.16), transparent 36%);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .page-section-shell,
body[data-theme="light"] .ops-card,
body[data-theme="light"] .camera-selector-panel,
body[data-theme="light"] .camera-side-card,
body[data-theme="light"] .dashboard-camera-preview,
body[data-theme="light"] .viewer-toolbar,
body[data-theme="light"] .camera-pill,
body[data-theme="light"] .sidebar-link,
body[data-theme="light"] .sidebar-footer,
body[data-theme="light"] .hero-stat,
body[data-theme="light"] .page-hero-card,
body[data-theme="light"] .info-item,
body[data-theme="light"] .location-row,
body[data-theme="light"] .event-item,
body[data-theme="light"] .telemetry-row,
body[data-theme="light"] .vehicle-item,
body[data-theme="light"] .user-admin-summary-item,
body[data-theme="light"] .user-admin-rail,
body[data-theme="light"] .camera-register-dialog,
body[data-theme="light"] .telemetry-map-filter {
  background:
    linear-gradient(180deg, rgba(255, 246, 239, 0.98), rgba(255, 239, 231, 0.97)) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .page-dashboard .dashboard-locations-shell,
body[data-theme="light"] .page-map-shell,
body[data-theme="light"] .page-events-shell {
  background:
    linear-gradient(180deg, rgba(255, 246, 239, 0.99), rgba(249, 235, 226, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.1), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(148, 163, 184, 0.04), transparent 30%) !important;
}

body[data-theme="light"] .sidebar-link-copy strong,
body[data-theme="light"] .sidebar-footer strong,
body[data-theme="light"] .sidebar-brand-copy strong,
body[data-theme="light"] .sidebar-nav-head strong,
body[data-theme="light"] .sidebar-logo,
body[data-theme="light"] .camera-page-actions,
body[data-theme="light"] .title,
body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3 {
  color: var(--text);
}

body[data-theme="light"] .sidebar-brand-copy span,
body[data-theme="light"] .sidebar-brand-note,
body[data-theme="light"] .sidebar-nav-head span,
body[data-theme="light"] .sidebar-link-copy span,
body[data-theme="light"] .sidebar-footer-copy,
body[data-theme="light"] .sidebar-footer-user-label,
body[data-theme="light"] .user-admin-detail-copy,
body[data-theme="light"] .camera-admin-map-trigger-head p,
body[data-theme="light"] .user-admin-rail-head p {
  color: rgba(17, 24, 39, 0.78);
}

body[data-theme="light"] .sidebar-header {
  border-bottom-color: rgba(124, 45, 18, 0.34);
}

body[data-theme="light"] .sidebar-nav-head span,
body[data-theme="light"] .sidebar-brand-copy span,
body[data-theme="light"] .sidebar-brand-note,
body[data-theme="light"] .sidebar-footer-copy,
body[data-theme="light"] .sidebar-footer-user-label {
  color: rgba(17, 17, 17, 0.76);
}

body[data-theme="light"] .sidebar-nav-head strong,
body[data-theme="light"] .sidebar-footer strong,
body[data-theme="light"] .sidebar-link-copy strong {
  color: #111111;
}

body[data-theme="light"] .sidebar-link:hover,
body[data-theme="light"] .sidebar-link:focus-visible,
body[data-theme="light"] .camera-pill:hover,
body[data-theme="light"] .camera-pill:focus-visible,
body[data-theme="light"] .user-admin-summary-item:hover,
body[data-theme="light"] .user-admin-summary-item:focus-visible {
  background: linear-gradient(180deg, rgba(255, 229, 217, 0.95), rgba(255, 245, 239, 0.98)) !important;
}

body[data-theme="light"] .sidebar-link {
  border-color: rgba(154, 52, 18, 0.28) !important;
  background: linear-gradient(180deg, #fff5ef 0%, #ffdccc 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 22px rgba(154, 52, 18, 0.14);
}

body[data-theme="light"] .sidebar-footer {
  border-color: #9a3412 !important;
  background: linear-gradient(180deg, #ff9f73 0%, #ff4d01 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 182, 0.34),
    0 10px 22px rgba(154, 52, 18, 0.16);
}

body[data-theme="light"] .sidebar-link:hover,
body[data-theme="light"] .sidebar-link:focus-visible {
  border-color: rgba(154, 52, 18, 0.34) !important;
  background: linear-gradient(180deg, #ffede2 0%, #ffc9ae 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 14px 24px rgba(154, 52, 18, 0.18);
}

body[data-theme="light"] .sidebar-link::before {
  background: rgba(241, 56, 17, 0.34);
}

body[data-theme="light"] .sidebar-link::after {
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 214, 191, 0.18) 20%,
    rgba(255, 255, 255, 0.54) 48%,
    rgba(255, 196, 164, 0.24) 68%,
    rgba(255, 255, 255, 0) 100%
  );
}

body[data-theme="light"] .camera-card {
  border-color: rgba(219, 74, 29, 0.16);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.1);
}

body[data-theme="light"] .camera-card::after {
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.18), transparent 26%);
}

body[data-theme="light"] .video,
body[data-theme="light"] .camera-web-frame {
  background:
    radial-gradient(circle at center, rgba(255, 243, 236, 0.96), rgba(235, 227, 223, 1));
}

body[data-theme="light"] .camera-name,
body[data-theme="light"] .camera-state,
body[data-theme="light"] .camera-hint,
body[data-theme="light"] .camera-cta,
body[data-theme="light"] .camera-audio-toggle,
body[data-theme="light"] .camera-card-close,
body[data-theme="light"] .camera-badge {
  color: rgba(15, 23, 42, 0.82);
  background: rgba(255, 243, 236, 0.9);
  border-color: rgba(219, 74, 29, 0.12);
}

body[data-theme="light"] .camera-audio-toggle[data-state="on"],
body[data-theme="light"] .viewer-chip-state.tone-live {
  color: #166534;
}

body[data-theme="light"] .status,
body[data-theme="light"] .dashboard-block,
body[data-theme="light"] .page-accent-card,
body[data-theme="light"] .page-info-card,
body[data-theme="light"] .page-register-card,
body[data-theme="light"] .viewer-audio-dock,
body[data-theme="light"] .camera-admin-map-trigger,
body[data-theme="light"] .user-admin-note,
body[data-theme="light"] .camera-register-intro,
body[data-theme="light"] .camera-register-guide-item,
body[data-theme="light"] .vehicle-register-camera-item,
body[data-theme="light"] .primary-view.is-empty,
body[data-theme="light"] .dashboard-camera-preview-empty,
body[data-theme="light"] .telemetry-map-filter,
body[data-theme="light"] .telemetry-focus-summary,
body[data-theme="light"] .telemetry-item,
body[data-theme="light"] .event-item {
  background:
    linear-gradient(180deg, var(--light-surface-1), var(--light-surface-2)) !important;
  border-color: var(--light-border) !important;
  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

body[data-theme="light"] .camera-admin-map-trigger,
body[data-theme="light"] .user-admin-note,
body[data-theme="light"] .dashboard-camera-preview.is-active,
body[data-theme="light"] .camera-pill.is-active,
body[data-theme="light"] .camera-register-intro,
body[data-theme="light"] .camera-register-guide-item,
body[data-theme="light"] .vehicle-register-camera-item.is-selected {
  background:
    linear-gradient(180deg, var(--light-accent-surface), var(--light-surface-2)) !important;
}

body[data-theme="light"] .status {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 232, 221, 0.98), rgba(255, 244, 238, 0.96)) !important;
  border-color: rgba(219, 74, 29, 0.3) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .camera-register-open,
body[data-theme="light"] .audio-toggle,
body[data-theme="light"] .camera-register-submit,
body[data-theme="light"] .camera-cta {
  color: #4a1d12;
  border-color: rgba(219, 74, 29, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 219, 205, 0.98), rgba(255, 237, 228, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 24px rgba(219, 74, 29, 0.16);
}

body[data-theme="light"] .camera-register-open:hover,
body[data-theme="light"] .camera-register-open:focus-visible,
body[data-theme="light"] .audio-toggle:hover,
body[data-theme="light"] .audio-toggle:focus-visible,
body[data-theme="light"] .camera-register-submit:hover,
body[data-theme="light"] .camera-register-submit:focus-visible,
body[data-theme="light"] .camera-cta:hover,
body[data-theme="light"] .camera-cta:focus-visible {
  border-color: rgba(219, 74, 29, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 205, 188, 0.98), rgba(255, 229, 218, 0.98));
}

body[data-theme="light"] .plate-preview-status {
  color: var(--light-ink-muted);
}

body[data-theme="light"] .plate-preview-list {
  scrollbar-color: rgba(219, 74, 29, 0.46) rgba(148, 163, 184, 0.16);
}

body[data-theme="light"] .plate-preview-list::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.16);
}

body[data-theme="light"] .plate-preview-list::-webkit-scrollbar-thumb {
  background: rgba(219, 74, 29, 0.46);
}

body[data-theme="light"] .plate-preview-empty {
  color: var(--light-ink-muted);
}

body[data-theme="light"] .plate-file-dialog {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 243, 0.96)),
    rgba(255, 255, 255, 0.88);
}

body[data-theme="light"] .plate-file-eyebrow,
body[data-theme="light"] .plate-file-dialog h3 {
  color: var(--light-ink-muted);
}

body[data-theme="light"] .plate-file-dialog > strong,
body[data-theme="light"] .plate-file-row strong {
  color: var(--light-ink);
}

body[data-theme="light"] .plate-file-section {
  background: rgba(148, 163, 184, 0.1);
}

body[data-theme="light"] .plate-file-section-title,
body[data-theme="light"] .plate-file-row span,
body[data-theme="light"] .plate-file-empty {
  color: var(--light-ink-muted);
}

body[data-theme="light"] .plate-crop-image {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.06);
}

body[data-theme="light"] .plate-file-close {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.76);
  color: var(--light-ink);
}

body[data-theme="light"] .camera-side-kicker,
body[data-theme="light"] .face-preview-copy span {
  color: var(--light-ink-muted);
}

body[data-theme="light"] .face-preview-item,
body[data-theme="light"] .plate-preview-choice {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .face-preview-avatar {
  background:
    linear-gradient(180deg, rgba(255, 224, 214, 0.98), rgba(255, 241, 234, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.12), transparent 42%);
  color: #9a3412;
  border-color: rgba(219, 74, 29, 0.16);
}

body[data-theme="light"] .plate-preview-choice {
  color: #7c2d12;
}

body[data-theme="light"] .plate-preview-choice.is-active {
  border-color: rgba(219, 74, 29, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 228, 216, 0.98), rgba(255, 241, 234, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.1), transparent 42%);
  color: #9a3412;
}

body[data-theme="light"] .camera-side-note {
  color: var(--light-ink-muted);
}

body[data-theme="light"] .camera-side-tag {
  color: #9a3412;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .plate-preview-output {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 252, 250, 0.98), rgba(255, 243, 237, 0.96)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 28px rgba(15, 23, 42, 0.06);
  color: #7c2d12;
}

body[data-theme="light"] .dashboard-camera-preview-close,
body[data-theme="light"] .dashboard-mobile-panel-button,
body[data-theme="light"] .camera-register-secondary,
body[data-theme="light"] .camera-register-close,
body[data-theme="light"] .camera-card-close,
body[data-theme="light"] .telemetry-map-style,
body[data-theme="light"] .telemetry-map-recenter,
body[data-theme="light"] .telemetry-map-mode,
body[data-theme="light"] .sidebar-toggle {
  color: var(--text);
  border-color: rgba(219, 74, 29, 0.2);
  background: rgba(255, 241, 234, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .dashboard-camera-preview-close:hover,
body[data-theme="light"] .dashboard-camera-preview-close:focus-visible,
body[data-theme="light"] .dashboard-mobile-panel-button:hover,
body[data-theme="light"] .dashboard-mobile-panel-button:focus-visible,
body[data-theme="light"] .camera-register-secondary:hover,
body[data-theme="light"] .camera-register-secondary:focus-visible,
body[data-theme="light"] .camera-register-close:hover,
body[data-theme="light"] .camera-register-close:focus-visible,
body[data-theme="light"] .camera-card-close:hover,
body[data-theme="light"] .camera-card-close:focus-visible,
body[data-theme="light"] .telemetry-map-style:hover,
body[data-theme="light"] .telemetry-map-style:focus-visible,
body[data-theme="light"] .telemetry-map-recenter:hover,
body[data-theme="light"] .telemetry-map-recenter:focus-visible,
body[data-theme="light"] .sidebar-toggle:hover,
body[data-theme="light"] .sidebar-toggle:focus-visible {
  border-color: rgba(219, 74, 29, 0.36);
  background: rgba(255, 232, 221, 0.96);
}

body[data-theme="light"] .dashboard-mobile-panel-button.is-active {
  color: #7c2d12;
  border-color: rgba(219, 74, 29, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 208, 190, 0.98), rgba(255, 231, 220, 0.98));
}

body[data-theme="light"] .sidebar-toggle::before {
  border-color: rgba(154, 52, 18, 0.84);
}

body[data-theme="light"] .camera-audio-toggle {
  color: var(--text);
  border-color: rgba(219, 74, 29, 0.16);
  background: rgba(255, 243, 236, 0.9);
}

body[data-theme="light"] .camera-audio-toggle:hover,
body[data-theme="light"] .camera-audio-toggle:focus-visible {
  border-color: rgba(219, 74, 29, 0.28);
  background: rgba(255, 232, 221, 0.94);
}

body[data-theme="light"] .camera-audio-toggle[data-state="on"],
body[data-theme="light"] .audio-toggle[data-state="on"] {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.34);
  background:
    linear-gradient(180deg, rgba(220, 252, 231, 0.98), rgba(240, 253, 244, 0.98));
}

body[data-theme="light"] .camera-register-danger {
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(254, 242, 242, 0.96);
}

body[data-theme="light"] .camera-register-danger:hover,
body[data-theme="light"] .camera-register-danger:focus-visible {
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(254, 226, 226, 0.98);
}

body[data-theme="light"] .camera-admin-action-group {
  border-color: rgba(219, 74, 29, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 245, 239, 0.98), rgba(255, 237, 227, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 32px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .camera-admin-action-kicker {
  color: #8a3412;
}

body[data-theme="light"] .camera-admin-action-copy,
body[data-theme="light"] .camera-admin-rtsp-head p,
body[data-theme="light"] .camera-admin-rtsp-preview,
body[data-theme="light"] .camera-admin-quick-action-note {
  color: var(--light-ink-muted);
}

body[data-theme="light"] .camera-admin-rtsp-builder {
  border-color: rgba(219, 74, 29, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 245, 239, 0.98), rgba(255, 237, 227, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 32px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .camera-admin-quick-action {
  color: var(--text);
  border-color: rgba(219, 74, 29, 0.14);
  background: rgba(255, 250, 246, 0.92);
}

body[data-theme="light"] .camera-admin-quick-action:hover,
body[data-theme="light"] .camera-admin-quick-action:focus-visible {
  border-color: rgba(219, 74, 29, 0.28);
  background: rgba(255, 239, 231, 0.96);
}

body[data-theme="light"] .camera-admin-quick-action.is-active {
  border-color: rgba(219, 74, 29, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 208, 190, 0.98), rgba(255, 229, 218, 0.98));
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

body[data-theme="light"] .camera-register-field input,
body[data-theme="light"] .camera-register-field select,
body[data-theme="light"] .camera-register-field textarea,
body[data-theme="light"] .vehicle-register-camera-position {
  color: var(--text);
  border-color: rgba(219, 74, 29, 0.12);
  background: rgba(255, 249, 245, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body[data-theme="light"] .camera-register-field input::placeholder,
body[data-theme="light"] .camera-register-field textarea::placeholder {
  color: rgba(100, 116, 139, 0.82);
}

body[data-theme="light"] .camera-register-field input:focus,
body[data-theme="light"] .camera-register-field select:focus,
body[data-theme="light"] .camera-register-field textarea:focus,
body[data-theme="light"] .vehicle-register-camera-position:focus {
  border-color: rgba(219, 74, 29, 0.44);
  background: rgba(255, 239, 232, 0.98);
  box-shadow: 0 0 0 4px rgba(241, 56, 17, 0.12);
}

body[data-theme="light"] .camera-register-field select option {
  color: #0f172a;
  background: #ffffff;
}

body[data-theme="light"] .hero-stat-kicker,
body[data-theme="light"] .page-hero-kicker,
body[data-theme="light"] .dashboard-camera-preview-kicker,
body[data-theme="light"] .telemetry-map-style-wrap > span,
body[data-theme="light"] .telemetry-focus-summary-kicker {
  color: #8a3412;
}

body[data-theme="light"] .user-admin-role-pill {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.2);
  background: rgba(204, 251, 241, 0.82);
}

body[data-theme="light"] .hero-stat p,
body[data-theme="light"] .page-hero-card p,
body[data-theme="light"] .dashboard-block-head p,
body[data-theme="light"] .page-section-head p,
body[data-theme="light"] .dashboard-camera-preview-empty,
body[data-theme="light"] .camera-pill-status,
body[data-theme="light"] .camera-pill-tag,
body[data-theme="light"] .camera-empty-state,
body[data-theme="light"] .camera-admin-map-trigger-head p,
body[data-theme="light"] .camera-admin-map-summary,
body[data-theme="light"] .user-admin-note,
body[data-theme="light"] .user-admin-summary-meta,
body[data-theme="light"] .user-admin-empty,
body[data-theme="light"] .camera-register-dialog-head p,
body[data-theme="light"] .vehicle-register-camera-head small,
body[data-theme="light"] .vehicle-register-camera-item p,
body[data-theme="light"] .camera-register-intro p,
body[data-theme="light"] .camera-register-guide-item p,
body[data-theme="light"] .camera-register-label > span:last-child,
body[data-theme="light"] .camera-register-help,
body[data-theme="light"] .camera-register-map-head span,
body[data-theme="light"] .telemetry-map-mode,
body[data-theme="light"] .telemetry-detail,
body[data-theme="light"] .telemetry-focus-meta,
body[data-theme="light"] .telemetry-focus-note,
body[data-theme="light"] .telemetry-focus-foot,
body[data-theme="light"] .event-copy p,
body[data-theme="light"] .location-row p {
  color: var(--light-ink-muted);
}

body[data-theme="light"] .dashboard-block-note,
body[data-theme="light"] .page-section-badge,
body[data-theme="light"] .camera-pill.is-active .camera-pill-status {
  color: #7c2d12;
  border-color: rgba(219, 74, 29, 0.2);
  background: rgba(255, 233, 223, 0.92);
}

body[data-theme="light"] .camera-pill-tag,
body[data-theme="light"] .viewer-chip,
body[data-theme="light"] .camera-badge {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="light"] .camera-pill-inference {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.88);
  color: rgba(124, 45, 18, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 16px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .camera-pill-inference:hover,
body[data-theme="light"] .camera-pill-inference:focus-visible {
  border-color: rgba(219, 74, 29, 0.32);
  background: rgba(255, 238, 230, 0.96);
  color: #7c2d12;
}

body[data-theme="light"] .camera-pill-inference.is-enabled {
  border-color: rgba(219, 74, 29, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 224, 210, 0.98), rgba(255, 239, 231, 0.98));
  color: #7c2d12;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 10px 18px rgba(219, 74, 29, 0.12);
}

body[data-theme="light"] .camera-badge {
  color: rgba(51, 65, 85, 0.82);
}

body[data-theme="light"] .camera-register-step {
  color: #7c2d12;
  background: rgba(255, 228, 217, 0.98);
  border-color: rgba(219, 74, 29, 0.22);
}

body[data-theme="light"] .sidebar-link,
body[data-theme="light"] .sidebar-link-logout {
  color: #111111;
}

body[data-theme="light"] .sidebar-link:hover .sidebar-link-copy strong,
body[data-theme="light"] .sidebar-link:focus-visible .sidebar-link-copy strong {
  color: #111111;
  text-shadow: none;
}

body[data-theme="light"] .sidebar-link:hover .sidebar-link-copy span,
body[data-theme="light"] .sidebar-link:focus-visible .sidebar-link-copy span {
  color: rgba(17, 17, 17, 0.82);
}

body[data-theme="light"] .sidebar-link.is-current {
  color: #111111;
  border-color: #7c2d12;
  background: linear-gradient(180deg, #ffd8c2 0%, #ffb58d 100%);
  box-shadow:
    0 18px 30px rgba(124, 45, 18, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

body[data-theme="light"] .sidebar-link.is-current::before {
  background: rgba(124, 45, 18, 0.9);
  box-shadow: 0 0 0 6px rgba(124, 45, 18, 0.12);
}

body[data-theme="light"] .sidebar-link.is-current .sidebar-link-copy strong {
  color: #111111;
  text-shadow: none;
}

body[data-theme="light"] .sidebar-link.is-current .sidebar-link-copy span {
  color: rgba(17, 17, 17, 0.82);
}

body[data-theme="light"] .sidebar-logo {
  border-color: #9a3412;
  background-color: #ffb087;
  box-shadow:
    0 18px 34px rgba(154, 52, 18, 0.2),
    inset 0 1px 0 rgba(255, 214, 186, 0.3);
}

body[data-theme="light"] .sidebar-icon {
  color: #111111;
  background: linear-gradient(180deg, #fff9f4 0%, #ffe0cf 100%);
  border-color: rgba(154, 52, 18, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(154, 52, 18, 0.12);
}

body[data-theme="light"] .sidebar-link.is-current .sidebar-icon,
body[data-theme="light"] .sidebar-link-logout .sidebar-icon {
  color: #111111;
  background: linear-gradient(180deg, #ffeadc 0%, #ffc4a4 100%);
  border-color: #9a3412;
}

body[data-theme="light"] .sidebar-link:hover .sidebar-icon,
body[data-theme="light"] .sidebar-link:focus-visible .sidebar-icon {
  color: #111111;
  background: linear-gradient(180deg, #fff1e8 0%, #ffd1b8 100%);
  border-color: rgba(154, 52, 18, 0.32);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 10px 22px rgba(154, 52, 18, 0.18);
}

body[data-theme="light"] .sidebar-link-logout {
  border-color: rgba(154, 52, 18, 0.32);
  background:
    linear-gradient(180deg, #fff2e9 0%, #ffd6c2 100%),
    radial-gradient(circle at 12% 50%, rgba(241, 56, 17, 0.1), transparent 48%);
  box-shadow:
    0 16px 28px rgba(154, 52, 18, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

body[data-theme="light"] .sidebar-link-logout:hover,
body[data-theme="light"] .sidebar-link-logout:focus-visible {
  border-color: #7c2d12;
  background:
    linear-gradient(180deg, #ffe5d5 0%, #ffc39f 100%),
    radial-gradient(circle at 12% 50%, rgba(241, 56, 17, 0.14), transparent 52%);
  box-shadow:
    0 18px 30px rgba(124, 45, 18, 0.18),
    0 0 0 1px rgba(124, 45, 18, 0.08);
}

body[data-theme="light"] .sidebar-link-tooltip {
  border-color: rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.94));
  color: rgba(248, 250, 252, 0.96);
}

body[data-theme="light"] .map-canvas {
  border-color: rgba(219, 74, 29, 0.14);
  background:
    linear-gradient(180deg, rgba(244, 230, 222, 0.96), rgba(224, 220, 217, 0.98)),
    radial-gradient(circle at top left, rgba(255, 239, 231, 0.6), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 16px 32px rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .leaflet-container {
  background:
    radial-gradient(circle at top left, rgba(255, 241, 233, 0.52), transparent 32%),
    linear-gradient(180deg, #efe2d9, #d6d0cc);
  color: var(--text);
}

body[data-theme="light"] .leaflet-bar {
  border-color: rgba(219, 74, 29, 0.16);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

body[data-theme="light"] .leaflet-bar a,
body[data-theme="light"] .leaflet-bar a:hover {
  border-bottom-color: rgba(219, 74, 29, 0.14);
  background: rgba(255, 244, 238, 0.96);
  color: #1e293b;
}

body[data-theme="light"] .leaflet-bar a:hover,
body[data-theme="light"] .leaflet-bar a:focus-visible {
  background: rgba(255, 230, 220, 0.98);
  color: #9a3412;
}

body[data-theme="light"] .leaflet-control-attribution {
  background: rgba(255, 243, 236, 0.92) !important;
  color: rgba(51, 65, 85, 0.78);
}

body[data-theme="light"] .leaflet-control-attribution a {
  color: #b45309;
}

body[data-theme="light"] .leaflet-popup-content-wrapper {
  border-color: rgba(219, 74, 29, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 247, 241, 0.98), rgba(246, 234, 226, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 34%);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .leaflet-popup-tip {
  background: rgba(246, 234, 226, 0.98);
}

body[data-theme="light"] .leaflet-container a.leaflet-popup-close-button {
  color: rgba(51, 65, 85, 0.72);
}

body[data-theme="light"] .leaflet-container a.leaflet-popup-close-button:hover {
  color: #0f172a;
}

body[data-theme="light"] .ops-map-tooltip {
  border-color: rgba(219, 74, 29, 0.14);
  background: rgba(255, 244, 238, 0.95);
  color: #334155;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .ops-map-tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .page-map .telemetry-map-filter label,
body[data-theme="light"] .page-dashboard .telemetry-sync-shell .telemetry-map-filter label,
body[data-theme="light"] .page-map .telemetry-map-filter select,
body[data-theme="light"] .page-dashboard .telemetry-sync-shell .telemetry-map-filter select,
body[data-theme="light"] .viewer-audio-dock .volume-wrap span,
body[data-theme="light"] .telemetry-map-overlay-organization,
body[data-theme="light"] .telemetry-map-overlay-close {
  color: var(--text);
}

body[data-theme="light"] .page-map .telemetry-map-filter,
body[data-theme="light"] .page-dashboard .telemetry-sync-shell .telemetry-map-filter {
  border-color: rgba(219, 74, 29, 0.24) !important;
  background:
    linear-gradient(180deg, rgba(255, 239, 231, 0.96), rgba(255, 248, 244, 0.92)) !important;
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-theme="light"] .page-map .telemetry-map-filter label,
body[data-theme="light"] .page-dashboard .telemetry-sync-shell .telemetry-map-filter label {
  color: rgb(241, 56, 17);
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 239, 231, 0.72);
}

body[data-theme="light"] .telemetry-monitor-filter select,
body[data-theme="light"] .telemetry-map-style,
body[data-theme="light"] .page-map .telemetry-map-filter select,
body[data-theme="light"] .page-dashboard .telemetry-sync-shell .telemetry-map-filter select {
  color: #1f2937;
  border-color: rgba(219, 74, 29, 0.18);
  background-color: rgba(255, 252, 249, 0.98);
  background-image:
    linear-gradient(180deg, rgba(255, 245, 240, 0.98), rgba(255, 252, 249, 0.98)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.25 5.25 7 9l3.75-3.75' stroke='%239a3412' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 10px center;
  background-size: 100% 100%, 14px 14px;
  padding-right: 34px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 8px 18px rgba(219, 74, 29, 0.05);
}

body[data-theme="light"] .telemetry-monitor-filter label {
  color: rgb(241, 56, 17);
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 239, 231, 0.72);
}

body[data-theme="light"] .telemetry-monitor-filter select:hover,
body[data-theme="light"] .telemetry-monitor-filter select:focus,
body[data-theme="light"] .telemetry-map-style:hover,
body[data-theme="light"] .telemetry-map-style:focus-visible,
body[data-theme="light"] .page-map .telemetry-map-filter select:hover,
body[data-theme="light"] .page-map .telemetry-map-filter select:focus,
body[data-theme="light"] .page-dashboard .telemetry-sync-shell .telemetry-map-filter select:hover,
body[data-theme="light"] .page-dashboard .telemetry-sync-shell .telemetry-map-filter select:focus {
  color: #111827;
  border-color: rgba(219, 74, 29, 0.3);
  background-image:
    linear-gradient(180deg, rgba(255, 236, 227, 0.98), rgba(255, 248, 244, 0.98)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.25 5.25 7 9l3.75-3.75' stroke='%23c2410c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body[data-theme="light"] .telemetry-monitor-filter select option,
body[data-theme="light"] .telemetry-map-style option,
body[data-theme="light"] .page-map .telemetry-map-filter select option,
body[data-theme="light"] .page-dashboard .telemetry-sync-shell .telemetry-map-filter select option {
  color: #0f172a;
  background: #fff7f2;
}

body[data-theme="light"] .telemetry-map-overlay-preview {
  background: rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .telemetry-map-overlay-close,
body[data-theme="light"] .telemetry-map-overlay-organization {
  background: rgba(255, 255, 255, 0.7);
}

@keyframes sidebar-edge-pulse {
  0%,
  100% {
    opacity: 0.42;
    transform: translateX(0) scaleY(0.985);
  }

  38% {
    opacity: 0.74;
    transform: translateX(-0.5px) scaleY(1);
  }

  72% {
    opacity: 0.56;
    transform: translateX(0.25px) scaleY(1.015);
  }
}

@keyframes sidebar-edge-glint {
  0% {
    transform: translate3d(0, -150%, 0) scaleY(0.76);
    opacity: 0;
  }

  14% {
    opacity: 0.08;
  }

  50% {
    opacity: 0.88;
  }

  86% {
    opacity: 0.08;
  }

  100% {
    transform: translate3d(0, 575%, 0) scaleY(1.08);
    opacity: 0;
  }
}

@keyframes sidebar-link-sheen {
  0% {
    opacity: 0;
    transform: translate3d(-135%, 0, 0) skewX(-18deg);
  }

  18% {
    opacity: 0.18;
  }

  48% {
    opacity: 0.48;
  }

  100% {
    opacity: 0;
    transform: translate3d(145%, 0, 0) skewX(-18deg);
  }
}

.app-shell {
  --sidebar-motion-duration: 0.34s;
  --sidebar-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  transition: grid-template-columns var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  isolation: isolate;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  margin: 0;
  padding: 18px 12px 16px;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background:
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.14), transparent 24%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03), transparent 28%),
    linear-gradient(180deg, rgba(20, 24, 33, 0.98), rgba(13, 17, 25, 0.995));
  box-shadow:
    18px 0 42px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
  transition:
    padding var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    gap var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    box-shadow var(--sidebar-motion-duration) ease,
    background var(--sidebar-motion-duration) ease,
    border-color var(--sidebar-motion-duration) ease;
}

.app-sidebar::before,
.app-sidebar::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.app-sidebar::before {
  top: 0;
  right: -10px;
  width: 20px;
  height: 100%;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 244, 235, 0.16), transparent 18%),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 236, 220, 0.08) 14%,
      rgba(252, 107, 78, 0.36) 50%,
      rgba(255, 232, 210, 0.12) 84%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0),
      rgba(255, 244, 235, 0.22) 46%,
      rgba(255, 255, 255, 0)
    );
  background-repeat: no-repeat;
  background-position:
    50% 0,
    50% 0,
    calc(50% + 0.5px) 0;
  background-size:
    18px 18%,
    12px 100%,
    1px 100%;
  box-shadow:
    0 0 12px rgba(241, 56, 17, 0.12),
    0 0 26px rgba(255, 228, 205, 0);
  opacity: 0.54;
  transform-origin: center;
  animation: sidebar-edge-pulse 6.2s ease-in-out infinite;
}

.app-sidebar::after {
  top: -18%;
  right: -11px;
  width: 22px;
  height: 18%;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(255, 247, 239, 0.24), transparent 60%),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 239, 228, 0.1) 28%,
      rgba(255, 255, 255, 0.20) 38%,
      rgba(255, 255, 255, 0.78) 56%,
      rgba(255, 233, 213, 0.22) 72%,
      rgba(255, 255, 255, 0) 100%
    );
  box-shadow:
    0 0 18px rgba(241, 56, 17, 0.16),
    0 0 34px rgba(255, 226, 203, 0.08);
  filter: blur(6px);
  opacity: 0;
  animation: sidebar-edge-glint 6.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

.app-shell.is-sidebar-collapsed {
  grid-template-columns: 80px minmax(0, 1fr);
}

.camera-register-danger {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

.camera-register-danger:hover,
.camera-register-danger:focus-visible {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(153, 27, 27, 0.28);
}

.user-admin-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

.user-admin-main-card {
  display: grid;
  gap: 20px;
}

.user-admin-detail-head {
  padding-bottom: 0;
}

.user-admin-detail-copy {
  margin: 8px 0 0;
  max-width: 72ch;
  color: rgba(226, 232, 240, 0.72);
}

.user-admin-form {
  display: grid;
  gap: 18px;
}

.user-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.user-admin-form-grid > .camera-register-field:last-child {
  grid-column: 1 / -1;
}

.camera-admin-form-grid > .camera-register-field:last-child {
  grid-column: auto;
}

.camera-admin-form-grid > .camera-admin-rtsp-builder {
  grid-column: 1 / -1;
}

.camera-admin-conditional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.camera-admin-rtsp-builder {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(241, 56, 17, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(10, 16, 25, 0.94)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 38%);
}

.camera-admin-rtsp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.camera-admin-rtsp-head strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.camera-admin-rtsp-head p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.55;
  max-width: 62ch;
}

.camera-admin-rtsp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.camera-admin-rtsp-preview {
  min-height: 24px;
  color: rgba(226, 232, 240, 0.84);
  font-size: 0.86rem;
  line-height: 1.5;
}

.camera-admin-action-intro {
  display: grid;
  gap: 6px;
}

.camera-admin-action-kicker {
  color: rgba(241, 56, 17, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.camera-admin-action-copy {
  margin: 0;
  max-width: 68ch;
  color: rgba(226, 232, 240, 0.7);
  line-height: 1.55;
}

.camera-admin-action-cluster {
  display: grid;
  gap: 12px;
}

.camera-admin-action-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  justify-content: end;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(241, 56, 17, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 40%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 20px 38px rgba(0, 0, 0, 0.16);
}

.camera-admin-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  justify-content: start;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}

.camera-admin-quick-action {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--brand-white);
  border-radius: 16px;
  padding: 11px 14px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.camera-admin-copy-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.camera-admin-code-field {
  grid-column: 1 / -1;
}

.camera-admin-result-row,
.camera-admin-list-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.camera-admin-result-row span,
.camera-admin-list-code span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.camera-admin-rbox-directory {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.camera-admin-rbox-item {
  display: grid;
  text-align: left;
}

.camera-admin-quick-action:hover,
.camera-admin-quick-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.34);
  background: rgba(241, 56, 17, 0.08);
}

.camera-admin-quick-action.is-active {
  border-color: rgba(241, 56, 17, 0.42);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.18), rgba(241, 56, 17, 0.08));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.camera-admin-quick-action-title {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.camera-admin-quick-action-note {
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.75rem;
  line-height: 1.35;
}

.camera-admin-quick-action-rbox .camera-admin-quick-action-title::before {
  content: "RB";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 999px;
  background: rgba(241, 56, 17, 0.2);
  color: rgba(255, 248, 243, 0.98);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.camera-admin-submit-primary {
  min-width: 164px;
  justify-self: end;
}

.camera-admin-delete-action {
  justify-self: end;
}

.camera-admin-map-trigger {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(10, 16, 25, 0.94)),
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 38%);
}

.camera-admin-map-trigger-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.camera-admin-map-trigger-head strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.camera-admin-map-trigger-head p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.55;
  max-width: 56ch;
}

.camera-admin-map-summary {
  color: rgba(226, 232, 240, 0.84);
  font-size: 0.88rem;
  line-height: 1.5;
}

.camera-admin-map-dialog {
  width: min(1080px, calc(100vw - 32px));
}

.camera-admin-management-dialog {
  width: min(1900px, calc(100vw - 16px));
  max-height: min(96dvh, 1040px);
}

.camera-admin-modal-workbench {
  min-height: 0;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.85fr);
}

.camera-admin-management-dialog .user-admin-main-card {
  min-height: 0;
  overflow: hidden;
}

/* El rail usa flex para que cámaras y RBoxes se vean correctamente */
.camera-admin-management-dialog .user-admin-rail {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* La lista de cámaras ocupa todo el espacio disponible */
.camera-admin-management-dialog .user-admin-rail > .user-admin-rail-list {
  flex: 1;
  min-height: 80px;
}

/* La sección de RBoxes ocupa hasta un 52% del rail */
.camera-admin-management-dialog .camera-admin-rbox-directory {
  flex-shrink: 1;
  flex-basis: 52%;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 12px;
  margin-top: 0;
}

/* La lista de RBoxes hace scroll internamente */
.camera-admin-management-dialog .camera-admin-rbox-directory .user-admin-rail-list {
  flex: 1;
  min-height: 0;
}

.camera-admin-management-dialog .user-admin-form {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.camera-admin-map-dialog .camera-register-map {
  min-height: min(58vh, 520px);
}

.camera-admin-conditional-grid > .camera-register-field:last-child {
  grid-column: 1 / -1;
}

.camera-admin-rtsp-grid > .camera-register-field:last-child {
  grid-column: 1 / -1;
}

.user-admin-note {
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(10, 16, 25, 0.94));
  color: rgba(226, 232, 240, 0.72);
  border-radius: 18px;
  padding: 14px 16px;
  line-height: 1.6;
}

.user-admin-note strong {
  color: #f8fafc;
}

.user-admin-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(17, 23, 32, 0.98), rgba(11, 16, 24, 0.98)),
    radial-gradient(circle at top right, rgba(241, 56, 17, 0.08), transparent 40%);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.26);
}

.user-admin-rail-head {
  display: grid;
  gap: 8px;
}

.user-admin-rail-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.02rem;
}

.user-admin-rail-head p {
  margin: 0;
  color: rgba(226, 232, 240, 0.68);
  line-height: 1.55;
}

.user-admin-rail-list {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  min-height: 0;
}

.user-admin-summary-item {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.user-admin-summary-item:hover,
.user-admin-summary-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.24);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.user-admin-summary-item:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.34);
  outline-offset: 2px;
}

.user-admin-summary-item.is-active {
  border-color: rgba(241, 56, 17, 0.36);
  background: linear-gradient(180deg, rgba(241, 56, 17, 0.12), rgba(255, 255, 255, 0.05));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.user-admin-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-admin-summary-top strong {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.user-admin-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(15, 118, 110, 0.16);
  color: #a5f3fc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.user-admin-summary-meta {
  color: rgba(226, 232, 240, 0.58);
  font-size: 0.86rem;
}

.user-admin-empty {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 20px;
  color: rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.page-user-admin .wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-user-admin .app-main {
  min-height: var(--app-height);
}

.page-user-admin .page-user-admin-shell {
  flex: 0 0 auto;
}

.page-user-admin .page-section-head p,
.page-user-admin .camera-register-help,
.page-user-admin .user-admin-detail-copy,
.page-user-admin .user-admin-note,
.page-user-admin .user-admin-rail-head p,
.page-user-admin .user-admin-summary-meta {
  color: rgba(226, 232, 240, 0.72);
}

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

.notification-admin-card {
  display: grid;
  gap: 18px;
}

.page-notification-admin .user-admin-form-grid > .camera-register-field:nth-last-child(-n + 2) {
  grid-column: 1 / -1;
}

.notification-email-recipient-field,
.notification-email-table-wrap {
  grid-column: 1 / -1;
}

.notification-email-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.notification-email-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.notification-email-count {
  flex: 0 0 auto;
  color: rgba(226, 232, 240, 0.66);
  font-size: 0.86rem;
  font-weight: 800;
}

.notification-email-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.notification-email-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  color: rgba(226, 232, 240, 0.9);
}

.notification-email-table th,
.notification-email-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

.notification-email-table th {
  color: rgba(226, 232, 240, 0.58);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-email-table tr:last-child td {
  border-bottom: 0;
}

.notification-email-index {
  width: 54px;
  color: rgba(226, 232, 240, 0.58);
  font-weight: 900;
}

.notification-email-address {
  overflow-wrap: anywhere;
}

.notification-email-empty {
  color: rgba(226, 232, 240, 0.58);
  text-align: center;
}

.notification-email-action {
  width: 96px;
  text-align: right;
}

.notification-email-remove {
  border: 1px solid rgba(248, 113, 113, 0.22);
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.notification-email-remove:hover,
.notification-email-remove:focus-visible {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.28);
}

.notification-email-remove:disabled {
  cursor: wait;
  opacity: 0.68;
}

.page-notification-admin textarea {
  min-height: 140px;
  resize: vertical;
}

.page-notification-admin .user-admin-feedback[data-tone="success"] {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(22, 101, 52, 0.2);
}

.page-notification-admin .user-admin-feedback[data-tone="error"] {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.24);
}

.page-notification-admin .user-admin-feedback[data-tone="info"] {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.22);
}

@media (max-width: 1180px) {
  .user-admin-workbench {
    grid-template-columns: 1fr;
  }

  .notification-admin-grid {
    grid-template-columns: 1fr;
  }

  .camera-admin-conditional-grid {
    grid-template-columns: 1fr;
  }

  .camera-admin-action-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .camera-admin-submit-primary {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .camera-admin-map-trigger-head {
    flex-direction: column;
  }

  .user-admin-rail-list {
    max-height: none;
  }
}

@media (max-width: 900px) {
  .camera-admin-management-dialog .user-admin-detail-copy {
    display: none;
  }
}

@media (max-width: 720px) {
  .user-admin-form-grid {
    grid-template-columns: 1fr;
  }

  .camera-admin-action-group {
    grid-template-columns: 1fr;
  }

  .camera-admin-delete-action {
    justify-self: stretch;
    width: 100%;
  }

  .user-admin-rail {
    padding: 16px;
  }

  .user-admin-summary-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .app-sidebar,
  .sidebar-header,
  .sidebar-header-bar,
  .sidebar-brand-row,
  .sidebar-logo,
  .sidebar-brand-copy,
  .sidebar-brand-meta,
  .sidebar-nav,
  .sidebar-nav-head,
  .sidebar-link,
  .sidebar-link-copy,
  .sidebar-icon,
  .sidebar-footer,
  .sidebar-toggle {
    transition-duration: 0.01ms !important;
  }

  .app-sidebar::before,
  .app-sidebar::after {
    animation: none;
  }

  .app-sidebar::before {
    opacity: 0.48;
    transform: none;
  }

  .app-sidebar::after {
    opacity: 0;
  }
}

.sidebar-header {
  display: grid;
  gap: 14px;
  position: relative;
  padding: 2px 16px 16px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    gap var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    padding var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    border-color var(--sidebar-motion-duration) ease;
}

.sidebar-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  transition: gap var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar-brand-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: gap var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 0;
  letter-spacing: 0.1em;
  color: transparent;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  background:
    url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACRCAYAAAA2JtGTAAAACXBIWXMAAAsSAAALEgHS3X78AAAIBElEQVR4nO2dQVbbSBCGe3jZk52WeBZa4zlB4AR4oT3kBJM5QZwTDDkBZq/3AieIOcGYtTaw1C4+AfPalIIwspEtVXWr6v/e44W8hCB1fqq6q6qr/nh6enKgmTJLR865UQTL8yvJi0UEz9EZc4Irs/Sjc25MQvIf1e8d/f4o8CNKs3TOcYp5Xvt8plpwZZZ6IZ2QkPznnyJ4LMucftD08jWBTSCuOBm84Mos9QK7IKFZc4eDY5CCo838F7JkENmAGJTgyJp5oZ1F8DhgDwYhOBLaFPuy4RO14CA0fUQpONqjXcJ16iMqwVFQ1u/RvkbwOICBaARH7nOGU6dugguOrNoM7tMGQQVHVu3GOXdoaM1NcxDq5css9YeCnxCbLcQtHJ1AvVU7Nr72JhG1cGWWTqgUBmIzipjgyiz14Y4fcKG2EXGpZZb6U+i59cUGzIJTEvK49yXeETxHE+OheQw2wZHY5pHv16ry6gWJalUOneTF/P0v1QcVsH7s4cU2/TsPLCXmEYttSSdk/2zzJC8eIngmU/Ru4SIUWyWymyQvbiJ4HtP0KrjIxPZIFSezJC9i3YOZo28LF0NA1wttmuTFLPBzgAZ6ExyFPkIWSi7Jol3CosVLL4Irs3QaOM526+vocAiIn86n1DJL/RW9q0Bv6q3aBQ4Dw6GT4ChuMw8UfLwlscF9Doi9XWotiyAttiW5TxwKBkiXPdwswInUn0AnWjoJWWSvahHat0nnR+98ygRiGzY77+GogHIh7Eqvk7y4EPx+gIl9LJz0vg1iU8ROgiNXKhnchdiU0dql0qn0QdC6QWwK2cXCXUJsoCutLBwFeP8TWm2ITTFtLdyl0BLcU28RoJR3LRzdjv8p8PpLirMhAa+YNhZuKvT6E4hNP1sFR9ZNIgzy3erFFWu8Z+EkrNt9khfYtxlho+AErRtOpIbYZuEkhPANyXhbNAqOsgrcJeOPguEWEAmbLJyEdZuiWtcemwTHvYm/Q8WuTd4IjtJY3I2dpWJ7IDKaLBy3O71DzM0uTYKbMK8GDgqGeZVLFagKeUzyIoaR3iAQ6xYO1g2wIi04nEyN81twFOzlvGd6jbgbqFu4E+bVQP8P8EpwY8blWKLhDHCCFg5xN7BCysLBuoEVK8FR+wbOK4CwcGBFZeE4g7GPuKsAKqp2XZz7N7MFlhRqmtD6+h/qERVG3NFfmVM7fzNrVAmO08KZExxtUbb1Pf5U+/VrmaVmOq9LuFRT+zeamrjYsWLaW72rMkvnJFa1SAjOjIWj0QH/djiAeYu3oCIKlVSCYyu4tJLOopHqfdwD8WJVa+m4B/Tetfg7g4cmXf/d43scao1dHmg234JwlF0dUwNIVRz0NB9zE+rjbyQKri2Jursf3C7VQsCX0wodUQcENXALzgLc7TAgOPCM0P4XggO/4dz/qgSCA6JAcN2QOBSpOnhBcB2gsqsl87dRlRqE4LrDnRFQlXGA4LrDWVJ0p614FYLrCDXm4coZI9OwI6piSFu4YNjLqezsfoDWWd0ht9dnmwy1nd25LZyZShT6wT3twdLdavYMleC4jvaSg3yDQ6Ib77mn8/8H/yR5MdFctFoJji3Wo63a4T28e03y4oSs3W2LL/EXaL75Mv8kL9S3M6tubXH+RJlsQEjWbk5XBccNbtLv+xbW5lRUgvMvfcb0PUxXFJN7nKP7wDPsLtVQaAS0oBIcZzT7mNwKAM+CE9hHwMqBFfU43D3jkkBwYEVdcJybWu5m1WAg1AXH6VaPcP8VOEEL5zCIF7i64CgB/cj4vSA48CZ5z1ldekg9OIBh1gXH7VZVltyA9rwa7uaek+2/mKs8/kTPX7s01cNxX9rAcF7DhBDcufa2omAzbwRHI4q471rCyhllU4m5hJVDINggmwQnUXmKYb0GaRQcVY9w9+f9pLGlKNjOtltbEkMqLlErZ4uNgqOpKJypLkfxPowlN8R791IlTpNnSHnZ4U2mYZ0ySx84B4cQPgwzRgZCP21u3ktYObWDMMBr3rVwTs7Kea6TvMDJVTFte4tIZQbOaRofUEorC+eerdxcYCZBxWcLs0Mtskv3JEnLc2WtJ4kVWguOsg/fBdflBvlWfezaH24qEAyuqOaGIkaniJ0ER41ZJE+RXnQ/kHPVw84dMKkNlaRrdbSnw+lVAa1PqXUo4e6Fdyy8BNf+8GJlrLlG9hKce5mkNw/QVtX3QJkgDTZM9m4qTafWEG7OW9UF9nXDZG8LV1FmqQ/Qngd6e99D9wIudjh0FpyTz0Kss6R9HTITA6CvOQ0T5v5y2zikU+wc2Yn46cXCuWcrN6KWX6FnM/iT7BSHijjpTXAu7Mm1CS+8S2tt6WOnV8G5+ETnKBV3U7WuxwEjLL0LzsUpujr35Pofqm5RGHAnB4vgXPyi28R9bSrPw5ZxAtv+zL+39auPm9ZnwSY4N1zRAT5OWcdX0ob9JGDIBEQG+whyiA7UYXWp6wROg4Hw8LrUdegK4Gf8x9tFVHDupWfJX4Kl6iAixAXnXvZ1Y8oGAEOI7uGaoEsyM4ROTCC7h2uCegqPYO1sENzC1aHyoplQHxMgz2lUgqsos3RK5etws7oI71KbSPJiCjerkygtXB0q7JwiYKyCOF1qEyS8L3TzH652mAxHcHUolDKhHC0OGMNhmIKrQyVQJ/QxhgCjZviCW4faUIzpY1QriJRuSwHeok9w26iJ0ZEY61MNm64YjiK0mP4ebqiLQX7t9t8/O3f6P5b2o/VgiSFTAAAAAElFTkSuQmCC") center / 30px 28px no-repeat,
    linear-gradient(180deg, rgba(24, 30, 38, 0.98), rgba(12, 16, 22, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition:
    width var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    height var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    border-radius var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    box-shadow var(--sidebar-motion-duration) ease,
    transform var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar-brand-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  max-width: 190px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transform-origin: left center;
  transition:
    max-width var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    opacity 0.18s ease,
    transform 0.24s var(--sidebar-motion-ease);
}

.sidebar-brand-copy strong {
  width: min(172px, 100%);
  height: 24px;
  display: block;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background:
    url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZoAAAA4CAYAAADEpT4yAAAACXBIWXMAAAsSAAALEgHS3X78AAAPfUlEQVR4nO1dS3IbORKFi95Ts+JS8oJraU4g+gTWRHBv6gSmT2DpBJJOIGrPiKZPYOoETa25GHHJ1Zj7rtJEqh88NTKJzCIBFICqF8Ho6Gi2WCgk8uUPme9eXl5Ui8ORF8WJUupkxx967mTZc/uaW7Ro0US0RLMH8qI4UkoN8DlTSp0L/8qTUmquP50s+xnUwlq0aNHCAd79leexMI1W0rd1eQd5URCxjJRSny39yQel1KSTZXNLf28r8qIIaY83SqmFUuon/rmwTbp5UVzt+E9z1+96G/KiIGNEGyfboN+Fdc83L4pbGEOxY9zJsoXtNayH/beRiF17VIZtGVr0pktnRicMYy0DkvVJ8IyPCDERTRl3SqkrXx4BCOaqgudSFY9YjxMlGBjR7MJ3pdSsk2WTQ/+QYb3XnSzbRULWAGIZVfR2NTYlr3d2KPHkRTF3KLc+8fHQ8wFSKUciTkNZW2+6tHb2IX+0xguss2vrb++L93U/wJ74Qi8yL4oLl94N8i4TDweV/v6PvCiIcEYNzed8og8s8FsfhGATsBrHIJjjA/50V78LpdQNZGJig4CbivWwP8K+pEC4O5EXxQgyGAqB/kIWyHPsA3qZCxxw68CmLTwL5znWNPL4m6GBFO23vCgWsMyCBskfQnVkHHw7kGS2gWTiPi+K54bLRWWsh/2L9bBP+3KfMslQxIXkA+sMjmRU5ESjoJSsh5vyophg0+pwObtQLE23YOnAzEMmm7woxiWCcS0rx5CLoN9JCKAQ2XrYJ73whwPiDwYwcmYUDQl9nbETDeEU4ZaDUdq4Q5L9T8i56M+++Ayl4sRjiwTdEMkGckKK7KYGY4Qs8z9Bci3eAGEy35EI78CZeEaINXi872TZu0Bf5AkSWRf4mA70FyIbC7mNeUXXkxK3M3wWu37/TTn0qIJyOsczuVS0T4jrusZJ6TOoYIFpsjkJoRwcB3wWgAVJ+ZuzTpa14TRgPexPLFaEBguEUO9jeuYo7tFAUU8Y9n445NAhVCUV0hWqxPYKb0FQriooq0PXZtrkx06W2Sp5FAOGhE5eSoj3rpNlIkJ0VXUGkplX9GJ0FdmiFOZ9LWNGNaMCAetKoaoxdjIUBrtIuFRabQtcef9XrNUKJJVm62H/COS/rxejIw+2wvBHFY3DcW+6FL2zA0hmBQ/IZXn/znVHdWFTQAYf9vFqEIa4EXx1A4KxFaobg3AkimtvJRki0WgIjQiNf0i8GhdEswfJPKJ6blbxd45KBCw1RJ46WeYlvIjCh2+GrxxchlwFIJl9IhEkcxOpgg8Be5AMkcutjTL5QxFVjgZWvSnvUTkEBAUiIRmyHM9skYz6ez36Mt2T4OvfUkwCE3F0suwCl1c5XNTxjPC+pCRD8vlPIu+qJKP+9z6IoOg3L6EUOZw2uHhkUoFk6F1e96bLo950KfYiQgBd5ahAMrTOryRDkKXar0vEWAxgCiHto4gkB5RCV2cuNoz+JqxRiaJNVpnAiFgxX6uFaBCW4UiGDvclCMaKAkNo9gSXWTl89lQgEIxyXg/7txWS4WQAnPWmy6juZ6n/v88nAa3zxKZBbAPREQ2U/a6Dd4xNEQFhAM4aOig/IgV+gyObU0N7lRTArU28t7aAikZORnSexLohUPL4vgq+fuPB6w2iPx/dkcHFbQnIixn0pstYL0JLDB2FPObOfF2diLW82RQDFimj0k1uEx59VvXgt7gw2jjVkmeBovZ6GQ1Km1NmmmScWvqwUC8FXw3KknUB5GWkpH4ZoxejAS9VIveX0mKZOhAr0dg41Fy106amUM0FE5fveipHrguSfJUvcEp7Zar4sg0QMUc25w3oICAtoCGSiTbcDINSQpJ3obcoSuHC5r7glPWoDhcUoUHu2VImmiDcfpQec+WyF75lBAqFC7EmG15FY0xJyOw6ZpIBJKX/30P2ZDQaSTSw+Ewb+LhPxZAtQJmYquu6qEJpGiQVWLbAKetr1+EyA8ZM4cRxwl6NhEQfYw6XKXlof8MURwWDWInGdO9DYmFySjoEIeWeIVVFYvIivCh2FJSYnmNVZ3dpeFGsR+7pcbwBuRnJpeoU1i7pIDKOZXhirESzkyiEVqapJPKxjuFYb4FnMFmttV2ydAWBl+ZrXzglXrshAo/b5PWeV6nAjAQSArmOuLqsDG6tq5hGR0RHNIid76rCYJtYCpRZSJtnSkZ3Sy1MUgGn4H2FM00yEtIB554jtfAqp3w3KVTdwUDgKs2iCg1GRTSldiW7IFFE3D2D2nIzW8A9SzJEg5vtXLjKeegMh9zU+iUYQwSEZ8pbJSMfCJtxynfmciSyR3AGwia2QXjREA1IZs4oAQlJmA7fY0gxT1Sgmcp9o29Jg5b7koamvipruHca2gE3yXxKHq9kLSEZiYcgJmNYhCiIBhU0z4xF8yBsEWOKW9eem9mCgy+nhggQjJ4dwpHMd49VgKZDvgpwzLZJProJXe5ljaredNkSTaB4H2icX7ebPoIbyXWx3VSweE1/K8QmeybFZuOm/JFHGdAzaSR3VDSePFcRmd5FiPLBPdOZZwPKlfHDKd9DhgzuBAapjSCvK7zLK8cFB9y5jqYZqMZ7jAGNHaKLcwLrLsT4rmuhOg1YBoyzVmpAcAec8lZ5UQTwJL/gimi4s2udTLcMUjvGv1+sh/2Bi+7PEg80QK+aRQoXNi8rlCNzVlF0lkLCo57vaiKZGN9nE8rgvYaJ4cnsCul2HYavavHcXCNmotFt2a0lZwO9/CQJjaQGPTSsjv0whS1CzOEpJryaCrjwue294cK1x+thP8Wz5wQxE81zEw5YLDd/LYPi4f9uQHPIFnEj1WiCdcRMNK+5hdQnCwrmi6RMRPeBFaukdtO+xW5IjNgmeJJWkEKO5rOtYWCBjko2Wk01Nnb0hYnnPJQpBh4q0Zgq+FIxRLiGqrbPLmfAPiTS6sYL3jM/sgkgQS4pg6V5+jNO6VLRAFOh00RX+MnjZUhdtn6GJLVkpsgx2oqEEEaLUT5SMUQWjC6wuje96XK+HvYvIXtv5fTR4ZnhyCvKvBBHNAsaDerpWbaiNC+bI5yxBWXk+86BBKb3b6Nt/k/PTUR/Veug79xYsLefYUj4uKj2bHie4A55gv3u9oX1vaF5Nuthf467fJrI5kRCrhZBpcuMMfx6CTe23C1HNLUDNeMDQZuS1xCaoMb8yVBZFKK1YHqmqK1VEMcMSf9tlmMZFEI78XDATPIjvWTqE0aZDaETuSXMmffvhHARHvPdqHPFVNkNYusOEE2ORjhPX9Kt1qRIQrQOTc+URIwYJeoDwQhrH+Ezo2IOcOCcST5CGot9KDhZ7yZUbswZkNF5sbEVA3BxUckGmBTJcUgzPFCcYLLyU7FWdVFDCMPeuEMeDNFAVk2zlZKRD+FaUimH59Ya3fiHqIgGYQCTlSZJCHKbGJKwcs+SVMVZJ8tuGa/m1HUFGkJzpsqzi4C6MXDykQzRIIRl6oCgGkQ0x7Hl5mIsbz7o8MByNglsEMIKZWZ6Fi/zWWoAF3v2ER4xlbZ2PVbp7YRgpvzGY8drX+DW00XrmKgh0FGqHXzmHjasNC58FoKwjpmwWWpKRCOE+DT3bscBhFibKB+SpPwthqTFDm7/zmPyamIkGhtVR5zAXtUZHhFYqyrAAVy2ULuXhvDZg+Er3TpHBiN39435WvQjjd8C4TOuqWQ3Nmt/B0SkWsuT7YEUOgNUBlxTU67nuGZhvWKs1ceEOwKEYo1y+/8pLwrvITTBOHOVuHxIzuWX9bAfXcK8DFzTMBk7CjnLKMimkUQDcBv0pQ7XFOWzX5ivpdzfLYgSVRz0O+ZrNzWEWSeCwVi155BcAZclJa3yJwmUO4tINYbms40lGtzd4O4ZzHz2P8NvcSTyZHM0QoDg3rfPu0NXgu4L974OOi4tm8qZCXcN6H83EuwLRQTmMZON0NhRkMGg19lkj0YJLL+ur6aOEJS5oP9Xstaq4F6I8kk0yNVISOTeZRiN5C8vigXTGUOhUimF/IQRyNVI1qnJJuY2PRJjhzAP2bNpNNHgXs535msUpnh2aTFUIJnvCbUU2QY23ux7/SgRlliVFEab265GQyj1WRAuU9KR5imgN13eCkNodKZ+rIf9KAkY+ynJN3Vh8AS5zqZ7NAoWK1ez3oXFYN1qxd+UkMwqoQtpv0EYFuKMAifoZNlYqNSoFxfN8D+4apHyg0RcSqk/hF2uLxsQMnuLiwptdr6th/1FjN4NjKtr4depk/0itFBa44mmosWgrdaDhZUEAYrkRqhIkrRWSwqVCwupmss5pUqti9Lj/xB5kkciJR3yhsjwQJjsR4UmnlZHmseC3nSpz660i/kpvBsKp43Ww340g+w6WXYlqELToHX+WVX+XCL47s0+QJZgXhQ0e+Je8HPnmOyp59pXuhiHUMhIYL2XkZS1CmtrACUhVaa1hg2J5GFgzIVhLAXyfCXQvCieEALbto8DDFXj5uJvQyNJRoPyNfBSJFEBjXMtd+thX8GAKBtxekz8keMqyAV+dyIZokaNhTFCQGKUqTfytyrlNxe+B+K1RAPQYcUmSshGaWHNi2IDIV8YOg4MKg77KsO1ItGelQ8cVVDSZWxCCBvCozwTjKzYhlN8qhgYJry+kwTbzFRGb7pcwDupYgSU8fb/8TUOQv/OXFrksgfZaByXDBnv4y5aoilhD7JRII5P+HC3tavCh7XaDXTOigYp1EFIYUMc9rlgho4rPIJk2lHCAIXR4Nnc7qGEowLkb4GwexRofI7mLaDYP1qaXrkv6Lc/NjkkAqxAMsGFDbE3JxXi5jZAcvGVpt62JPM7iGx60yV5vv+q+fw6BzqdfxQUMgWBlmi2ALmAE2GlkW3Qb54lXsYswR3eQ7C5KfKyMJDvo+OKuA2qjk6gYFoY0JsuZzi/krL0aAEdcVahIq02tESzA1Ai5IpferIaVgiVNd1aJQ/hA5UUx1JlRwe+k2VU2PABys2WvDxC/ohgrppyR8YG4N2MHexJUICeusI6H0L15NocDQPkbWa4kT/aszLIhBXaztw2VJGsUEhB73gW8zuAgTDGGAFd/KEryrgk9QbvQX9CfRdR7Q+quV73BO1ozrAf+orCvtV+QQGy91owg+pIXYCkK+fqyCX+wru/8twUolngslowwAHeFT5w/rwoT9affTdPV6pNfFQNeawq46Cf4yeU6bML781wz8nJ71UB5Ld8r6H2Z6oK5vb5vA37ho0tMshhITV60Bnjt/tJ715eXpJ/sa4AhVa2kraV7+oafV2b3x7EFi1aNAdKqf8CN5Nt6kaKYhAAAAAASUVORK5CYII=") left center / contain no-repeat;
  text-indent: -9999px;
  overflow: hidden;
}

.sidebar-brand-copy span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.67rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar-brand-meta {
  display: grid;
  gap: 6px;
  padding: 0 2px;
  overflow: hidden;
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
  transform-origin: top left;
  transition:
    max-height var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    opacity 0.18s ease,
    transform 0.24s var(--sidebar-motion-ease),
    padding var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar-brand-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.44);
}

.sidebar-brand-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  line-height: 1.46;
}

.sidebar-toggle {
  position: absolute;
  top: 40px;
  right: -25px;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(34, 40, 54, 0.98), rgba(18, 23, 33, 0.98)),
    rgba(255, 255, 255, 0.04);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  z-index: 60;
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    top var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    right var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.sidebar-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border: solid rgba(255, 255, 255, 0.8);
  border-width: 0 1.7px 1.7px 0;
  transform: rotate(135deg);
  transition: transform 0.22s ease, border-color 0.18s ease, opacity 0.18s ease;
  opacity: 0.92;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  border-color: rgba(241, 56, 17, 0.42);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.22), rgba(122, 34, 17, 0.26)),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-toggle:hover::before,
.sidebar-toggle:focus-visible::before {
  border-color: rgba(255, 255, 255, 0.96);
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  transition:
    gap var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    padding var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar-nav-head {
  display: grid;
  gap: 4px;
  padding: 2px 4px 8px;
  overflow: hidden;
  max-height: 72px;
  opacity: 1;
  transform: translateY(0);
  transform-origin: top left;
  transition:
    max-height var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    opacity 0.18s ease,
    transform 0.24s var(--sidebar-motion-ease),
    padding var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar-nav-head span {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.sidebar-nav-head strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.74);
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--brand-white);
  padding: 11px 12px 11px 10px;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  overflow: hidden;
  transition:
    width var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    height var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    min-width var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    min-height var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    padding var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    gap var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    border-radius var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.sidebar-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-50%);
  transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.sidebar-link::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: -26%;
  width: 42%;
  border-radius: 18px;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 248, 240, 0.06) 20%,
    rgba(255, 255, 255, 0.34) 48%,
    rgba(255, 230, 225, 0.2) 68%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.12);
  transform: translateX(2px);
}

.sidebar-link:hover::after,
.sidebar-link:focus-visible::after {
  animation: sidebar-link-sheen 0.72s cubic-bezier(0.2, 0.75, 0.22, 1) 1;
}

.sidebar-link.is-current {
  border-color: rgba(255, 147, 82, 0.14);
  background:
    linear-gradient(135deg, rgba(241, 56, 17, 0.96), rgba(197, 47, 15, 0.88));
  box-shadow:
    0 18px 30px rgba(241, 56, 17, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.sidebar-link.is-current::before {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
}

.sidebar-link.is-current .sidebar-icon {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sidebar-link:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.88);
  outline-offset: 3px;
}

.sidebar-icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.86);
  transition:
    width var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    height var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    border-radius var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.sidebar-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.sidebar-link-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  white-space: normal;
  max-width: 180px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transform-origin: left center;
  transition:
    max-width var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    opacity 0.18s ease,
    transform 0.24s var(--sidebar-motion-ease);
}

.sidebar-link-tooltip {
  display: none;
}

.sidebar-link-copy strong {
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.22s ease, color 0.22s ease, text-shadow 0.22s ease;
}

.sidebar-link-copy span {
  font-size: 0.69rem;
  line-height: 1.32;
  color: rgba(255, 255, 255, 0.44);
  transition: transform 0.22s ease, color 0.22s ease, opacity 0.22s ease;
}

.sidebar-link.is-current .sidebar-link-copy span {
  color: rgba(255, 255, 255, 0.76);
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link:focus-visible .sidebar-icon {
  transform: translateY(-1px) scale(1.04);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sidebar-link:hover .sidebar-link-copy strong,
.sidebar-link:focus-visible .sidebar-link-copy strong {
  transform: translateX(2px);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.06);
}

.sidebar-link:hover .sidebar-link-copy span,
.sidebar-link:focus-visible .sidebar-link-copy span {
  transform: translateX(2px);
  color: rgba(255, 255, 255, 0.66);
}

.sidebar-footer {
  display: grid;
  gap: 6px;
  padding: 16px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
  transform-origin: top left;
  transition:
    max-height var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    opacity 0.18s ease,
    transform 0.24s var(--sidebar-motion-ease),
    padding var(--sidebar-motion-duration) var(--sidebar-motion-ease),
    border-color var(--sidebar-motion-duration) ease;
}

.sidebar-footer-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.sidebar-footer strong {
  font-size: 0.86rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.sidebar-footer-copy {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.73rem;
  line-height: 1.45;
}

.sidebar-footer-user {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  padding: 10px 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer-user-label {
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar-footer-user-name {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link-logout {
  width: 100%;
  justify-content: flex-start;
  cursor: pointer;
  font: inherit;
  color: var(--brand-white);
  background:
    linear-gradient(180deg, rgba(54, 20, 16, 0.94), rgba(28, 13, 13, 0.98)),
    radial-gradient(circle at 12% 50%, rgba(241, 56, 17, 0.18), transparent 48%);
  border-color: rgba(241, 56, 17, 0.16);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-link-logout::before {
  background: rgba(241, 56, 17, 0.82);
  box-shadow: 0 0 0 5px rgba(241, 56, 17, 0.1);
}

.sidebar-link-logout .sidebar-icon {
  background: rgba(241, 56, 17, 0.12);
  border-color: rgba(241, 56, 17, 0.18);
}

.sidebar-link-logout:hover .sidebar-icon,
.sidebar-link-logout:focus-visible .sidebar-icon {
  background: rgba(241, 56, 17, 0.18);
  border-color: rgba(241, 56, 17, 0.28);
  box-shadow:
    0 0 0 1px rgba(241, 56, 17, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-link-logout:hover,
.sidebar-link-logout:focus-visible {
  border-color: rgba(241, 56, 17, 0.44);
  background:
    linear-gradient(180deg, rgba(76, 24, 17, 0.98), rgba(38, 15, 14, 0.98)),
    radial-gradient(circle at 12% 50%, rgba(241, 56, 17, 0.24), transparent 52%);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(241, 56, 17, 0.08);
}

.app-main {
  min-width: 0;
  height: 100dvh;
  overflow: auto;
}

.app-shell.is-sidebar-collapsed .app-sidebar {
  grid-template-rows: auto 1fr auto;
  padding: 14px 8px 12px;
}

.app-shell.is-sidebar-collapsed .sidebar-header {
  justify-items: center;
  gap: 12px;
  padding-bottom: 12px;
}

.app-shell.is-sidebar-collapsed .sidebar-brand-copy {
  max-width: 0;
  opacity: 0;
  transform: translateX(-12px);
  pointer-events: none;
}

.app-shell.is-sidebar-collapsed .sidebar-nav-head,
.app-shell.is-sidebar-collapsed .sidebar-footer,
.app-shell.is-sidebar-collapsed .sidebar-brand-meta {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.app-shell.is-sidebar-collapsed .sidebar-header-bar {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.app-shell.is-sidebar-collapsed .sidebar-brand-row {
  justify-content: center;
  gap: 0;
}

.app-shell.is-sidebar-collapsed .sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 0.82rem;
}

.app-shell.is-sidebar-collapsed .sidebar-nav {
  width: 100%;
  align-content: center;
  justify-items: center;
  gap: 12px;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.app-shell.is-sidebar-collapsed .sidebar-link {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-radius: 18px;
  transform: none;
  overflow: visible;
  isolation: isolate;
}

.app-shell.is-sidebar-collapsed .sidebar-link:hover,
.app-shell.is-sidebar-collapsed .sidebar-link:focus-visible {
  z-index: 9;
  transform: translateY(-2px);
}

.app-shell.is-sidebar-collapsed .sidebar-link::before {
  display: none;
}

.app-shell.is-sidebar-collapsed .sidebar-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.app-shell.is-sidebar-collapsed .sidebar-link-copy {
  max-width: 0;
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
}

.app-shell.is-sidebar-collapsed .sidebar-nav-head {
  padding-top: 0;
  padding-bottom: 0;
}

.app-shell.is-sidebar-collapsed .sidebar-brand-meta {
  padding-top: 0;
  padding-bottom: 0;
}

.app-shell.is-sidebar-collapsed .sidebar-footer {
  padding-top: 0;
  border-top-color: transparent;
}

.app-shell.is-sidebar-collapsed .sidebar-link-tooltip {
  position: absolute;
  top: 50%;
  left: calc(100% + 16px);
  z-index: 5;
  display: block;
  min-width: max-content;
  padding: 11px 16px 11px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(28, 32, 41, 0.97), rgba(13, 17, 25, 0.99)),
    radial-gradient(circle at 0% 50%, rgba(241, 56, 17, 0.16), transparent 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 20px rgba(241, 56, 17, 0.08);
  backdrop-filter: blur(18px) saturate(135%);
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transform: translate3d(-14px, -50%, 0) scale(0.96);
  transform-origin: left center;
  transition:
    opacity 0.1s ease,
    transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0.14s ease;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.012em;
  line-height: 1.2;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.04);
}

.app-shell.is-sidebar-collapsed .sidebar-link-tooltip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -7px;
  width: 14px;
  height: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(24, 28, 37, 0.98), rgba(13, 17, 25, 0.98));
  transform: translateY(-50%) rotate(45deg);
}

.app-shell.is-sidebar-collapsed .sidebar-link-tooltip::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 36%),
    linear-gradient(90deg, rgba(241, 56, 17, 0.14), rgba(241, 56, 17, 0) 32%);
  opacity: 0.9;
  pointer-events: none;
}

.app-shell.is-sidebar-collapsed .sidebar-link:hover .sidebar-link-tooltip,
.app-shell.is-sidebar-collapsed .sidebar-link:focus-visible .sidebar-link-tooltip {
  opacity: 1;
  visibility: visible;
  z-index: 10;
  transform: translate3d(2px, -50%, 0) scale(1);
}

.app-shell.is-sidebar-collapsed .sidebar-link-logout {
  justify-self: center;
  align-self: end;
  margin-top: 0;
  background:
    linear-gradient(180deg, rgba(66, 21, 16, 0.98), rgba(29, 12, 12, 0.99)),
    radial-gradient(circle at 50% 16%, rgba(241, 56, 17, 0.2), transparent 56%);
  box-shadow:
    0 16px 26px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-shell.is-sidebar-collapsed .sidebar-link-logout .sidebar-icon {
  background: rgba(241, 56, 17, 0.16);
  border-color: rgba(241, 56, 17, 0.22);
}

.app-shell.is-sidebar-collapsed .sidebar-link-logout:hover,
.app-shell.is-sidebar-collapsed .sidebar-link-logout:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 18px 28px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(241, 56, 17, 0.12);
}

.app-shell.is-sidebar-collapsed .sidebar-toggle {
  top: 40px;
  right: -25px;
}

.app-shell.is-sidebar-collapsed .sidebar-toggle::before {
  transform: rotate(-45deg);
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  background: rgba(26, 26, 26, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.page-dashboard .top-dashboard {
  align-items: stretch;
  gap: 18px;
  padding: 22px 24px 20px;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.94), rgba(20, 20, 20, 0.84)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.14), transparent 34%);
}

.heading {
  display: grid;
  gap: 4px;
}

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

.title {
  margin: 0;
  font-size: clamp(1.05rem, 3vw, 1.85rem);
  line-height: 1.08;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.status {
  max-width: min(100%, 680px);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(241, 56, 17, 0.35);
  background: rgba(38, 38, 38, 0.92);
  color: var(--brand-white);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wrap {
  width: 100%;
  min-height: 0;
  display: grid;
  gap: 18px;
  padding: 18px 22px 96px;
}

.page-dashboard .wrap {
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent 14%);
}

.dashboard-hero-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: min(100%, 720px);
}

.hero-stat {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at top right, rgba(241, 56, 17, 0.12), transparent 42%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.hero-stat-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero-stat strong {
  font-size: 1rem;
  font-weight: 800;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.hero-stat p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.88rem;
  line-height: 1.5;
}

.dashboard-block {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(29, 29, 29, 0.9), rgba(17, 17, 17, 0.92)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 36%);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.dashboard-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 0;
}

.dashboard-block-head h2 {
  margin: 0;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.dashboard-block-head p {
  margin: 6px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.93rem;
  line-height: 1.55;
}

.dashboard-block-note {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(241, 56, 17, 0.26);
  background: rgba(241, 56, 17, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-cameras {
  background:
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.16), transparent 22%),
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.04), transparent 16%),
    linear-gradient(180deg, #262626 0%, #171717 42%, #111111 100%);
}

.page-map {
  background:
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.12), transparent 24%),
    radial-gradient(circle at 70% 18%, rgba(20, 184, 166, 0.08), transparent 18%),
    linear-gradient(180deg, #202223 0%, #141618 48%, #111214 100%);
}

.page-events {
  background:
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.14), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(96, 165, 250, 0.08), transparent 18%),
    linear-gradient(180deg, #252525 0%, #181818 44%, #111111 100%);
}

.top-page {
  align-items: stretch;
  gap: 18px;
  padding: 22px 24px 20px;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.94), rgba(20, 20, 20, 0.84)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.12), transparent 34%);
}

.camera-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
}

.camera-register-open {
  border: 1px solid rgba(241, 56, 17, 0.45);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.2), rgba(241, 56, 17, 0.1));
  color: var(--brand-white);
  border-radius: 16px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.camera-register-open:hover,
.camera-register-open:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.68);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.top-page-map {
  padding: 16px 24px 14px;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.94), rgba(19, 21, 22, 0.88)),
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.1), transparent 34%);
}

.top-page-map .title {
  font-size: clamp(0.98rem, 2.35vw, 1.55rem);
}

.top-page-events {
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.94), rgba(22, 20, 20, 0.88)),
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.08), transparent 34%);
}

.page-hero-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: min(100%, 720px);
  direction: rtl;
}

.page-hero-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at top right, rgba(241, 56, 17, 0.1), transparent 42%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.page-hero-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.page-hero-card strong {
  font-size: 1rem;
  font-weight: 800;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.page-hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.88rem;
  line-height: 1.5;
}

.page-section-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(29, 29, 29, 0.9), rgba(17, 17, 17, 0.92)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 36%);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.page-map-shell {
  background:
    linear-gradient(180deg, rgba(27, 29, 30, 0.92), rgba(17, 19, 20, 0.94)),
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.08), transparent 36%);
}

.page-events-shell {
  background:
    linear-gradient(180deg, rgba(28, 28, 28, 0.92), rgba(18, 18, 18, 0.94)),
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.08), transparent 36%);
}

.page-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 0;
}

.page-section-head h2 {
  margin: 0;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.page-section-head p {
  margin: 6px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.93rem;
  line-height: 1.55;
}

.plate-preview-shell {
  gap: 10px;
}

.plate-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plate-preview-copy-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plate-preview-copy {
  min-height: auto;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.plate-preview-copy:hover,
.plate-preview-copy:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.68);
  background: rgba(241, 56, 17, 0.28);
}

.plate-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: min(30dvh, 260px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-color: rgba(241, 56, 17, 0.58) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.plate-preview-list::-webkit-scrollbar {
  width: 8px;
}

.plate-preview-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.plate-preview-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(241, 56, 17, 0.58);
}

.plate-preview-empty {
  grid-column: 1 / -1;
  padding: 10px 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  line-height: 1.35;
}

.plate-preview-choice {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(248, 250, 252, 0.94);
  font: 700 0.82rem/1 "Space Grotesk", "Manrope", monospace;
  letter-spacing: 0.08em;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.plate-preview-choice:hover,
.plate-preview-choice:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.4);
  background: rgba(241, 56, 17, 0.1);
}

.plate-preview-choice:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.72);
  outline-offset: 2px;
}

.plate-preview-choice.is-active {
  border-color: rgba(241, 56, 17, 0.52);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.18), rgba(241, 56, 17, 0.08)),
    rgba(255, 255, 255, 0.04);
  color: rgba(255, 248, 243, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.plate-preview-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.plate-preview-output {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 12, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color: rgba(248, 250, 252, 0.96);
  font: 700 0.92rem/1 "Space Grotesk", "Manrope", monospace;
  letter-spacing: 0.14em;
}

.plate-preview-output:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.76);
  outline-offset: 3px;
}

.plate-preview-status {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.76rem;
  line-height: 1.2;
}

.plate-preview-status[data-tone="success"] {
  color: rgba(74, 222, 128, 0.92);
}

.plate-preview-status[data-tone="error"] {
  color: rgba(248, 113, 113, 0.92);
}

.plate-file-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 20px;
}

.plate-file-modal[hidden] {
  display: none;
}

.plate-file-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.plate-file-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(520px, 132vw);
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(35, 35, 35, 0.98), rgba(16, 16, 16, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.13), transparent 44%);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.42);
}

.plate-file-modal.is-event-detail .plate-file-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(92dvh, 1020px);
  overflow: hidden;
}

.plate-file-eyebrow {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plate-file-dialog h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
  font-weight: 700;
}

.plate-file-dialog > strong {
  color: rgba(255, 248, 243, 0.98);
  font: 800 1.1rem/1 "Space Grotesk", "Manrope", monospace;
  letter-spacing: 0.08em;
  font-size: 1.1rem;
}

.plate-file-content {
  display: grid;
  gap: 10px;
  max-height: min(32dvh, 220px);
  overflow-y: auto;
}

.plate-file-modal.is-event-detail .plate-file-content {
  max-height: min(68dvh, 620px);
}

.plate-file-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.plate-file-section-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plate-file-row {
  display: grid;
  gap: 3px;
}

.plate-file-row span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plate-file-row strong {
  color: rgba(248, 250, 252, 0.9);
  font: 700 0.78rem/1.38 "Manrope", sans-serif;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.plate-file-row-image {
  gap: 8px;
}

.plate-crop-image {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.event-detail-image {
  display: block;
  width: 100%;
  max-height: min(52dvh, 440px);
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.event-detail-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 12px;
  align-items: start;
}

.event-detail-meta strong {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-detail-meta span {
  color: rgba(248, 250, 252, 0.9);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.event-detail-meta > span:only-child {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.56);
}

.plate-file-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  line-height: 1.4;
}

.plate-file-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.22rem;
  line-height: 1;
  cursor: pointer;
}

.plate-file-close:hover,
.plate-file-close:focus-visible {
  border-color: rgba(241, 56, 17, 0.42);
  background: rgba(241, 56, 17, 0.16);
  outline: none;
}

.page-section-badge {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(241, 56, 17, 0.26);
  background: rgba(241, 56, 17, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-support-grid {
  display: grid;
  gap: 16px;
}

.page-support-grid-cameras {
  grid-template-columns: minmax(260px, 320px) minmax(320px, 0.95fr) minmax(320px, 1fr);
}

.page-accent-card {
  background:
    linear-gradient(180deg, rgba(33, 24, 22, 0.94), rgba(20, 17, 16, 0.96)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.12), transparent 44%);
}

.page-info-card {
  background:
    linear-gradient(180deg, rgba(31, 31, 31, 0.92), rgba(20, 20, 20, 0.96));
}

.page-register-card {
  background:
    linear-gradient(180deg, rgba(29, 26, 24, 0.94), rgba(18, 17, 16, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 42%);
}

.info-stack {
  display: grid;
  gap: 12px;
}

.info-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.info-item strong {
  font-size: 0.94rem;
}

.info-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.5;
}

.map-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.map-main-card {
  min-height: min(78vh, 920px);
}

.telemetry-rail,
.event-rail {
  display: grid;
  gap: 16px;
}

.telemetry-list-card {
  min-height: min(48vh, 520px);
  align-content: start;
}

.events-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.events-main-card {
  min-height: min(74vh, 860px);
}

.camera-stage {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: min(74vh, 820px);
}

.dashboard-mobile-panel-switcher {
  display: none;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 44%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

.dashboard-mobile-panel-button {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.dashboard-mobile-panel-button:hover,
.dashboard-mobile-panel-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.38);
  background: rgba(241, 56, 17, 0.12);
}

.dashboard-mobile-panel-button.is-active {
  color: rgba(255, 248, 243, 0.98);
  border-color: rgba(241, 56, 17, 0.42);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.22), rgba(241, 56, 17, 0.1));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}

.camera-selector-panel {
  position: sticky;
  top: 96px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(36, 36, 36, 0.94), rgba(20, 20, 20, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.09), transparent 40%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.camera-side-panel {
  display: grid;
  gap: 16px;
  grid-auto-rows: min-content;
  align-content: start;
  min-width: 0;
}

.camera-side-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(32, 32, 32, 0.94), rgba(18, 18, 18, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 38%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.camera-side-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.camera-side-kicker {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.camera-side-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.58;
}

.camera-side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.camera-side-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.face-preview-shell {
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(74vh, 820px);
  overflow: hidden;
}

.events-panel {
  position: relative;
  isolation: isolate;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(32, 32, 32, 0.76), rgba(18, 18, 18, 0.72)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 38%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.events-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.events-panel__header {
  align-items: center;
  justify-content: flex-start;
  padding: 0 2px 2px;
}

.events-panel__title {
  border-color: rgba(241, 56, 17, 0.18);
  background: rgba(241, 56, 17, 0.07);
  color: rgba(255, 214, 191, 0.9);
}

.face-preview-grid,
.events-panel__list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  max-height: min(62vh, 700px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-color: rgba(255, 122, 45, 0.7) transparent;
  scrollbar-width: thin;
}

.events-panel__list::-webkit-scrollbar,
.face-preview-grid::-webkit-scrollbar {
  width: 8px;
}

.events-panel__list::-webkit-scrollbar-track,
.face-preview-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: transparent;
}

.events-panel__list::-webkit-scrollbar-thumb,
.face-preview-grid::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 122, 45, 0.62);
  background-clip: padding-box;
}

.events-panel__list::-webkit-scrollbar-thumb:hover,
.face-preview-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 122, 45, 0.86);
  background-clip: padding-box;
}

.face-preview-item,
.event-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.034));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
}

.face-preview-item:hover,
.face-preview-item:focus-visible,
.event-card:hover,
.event-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 45, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 122, 45, 0.13), rgba(241, 56, 17, 0.055)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    0 0 0 1px rgba(255, 122, 45, 0.08) inset,
    0 0 22px rgba(241, 56, 17, 0.2),
    0 14px 30px rgba(0, 0, 0, 0.24);
}

.face-preview-item[role="button"] {
  align-items: center;
  flex-direction: row;
  cursor: pointer;
}

.face-preview-image,
.face-preview-video,
.event-card__thumb {
  width: 76px;
  height: 90px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.face-preview-video {
  display: block;
}

.event-video-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 22px;
}

.event-video-modal[hidden] {
  display: none;
}

.event-video-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.event-video-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(980px, 94vw);
  max-height: min(88dvh, 780px);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(31, 31, 31, 0.98), rgba(12, 12, 12, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.14), transparent 42%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
  overflow: hidden;
}

.event-video-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.84);
  cursor: pointer;
}

.event-video-eyebrow {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-video-dialog h3 {
  margin: 0;
  padding-right: 42px;
  color: rgba(255, 248, 243, 0.96);
  font-size: 1rem;
}

.event-video-player {
  width: 100%;
  max-height: min(62dvh, 620px);
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
}

.event-video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
}

.event-video-meta strong,
.event-video-meta span {
  font-size: 0.8rem;
  line-height: 1.35;
}

.event-video-meta strong {
  color: rgba(255, 248, 243, 0.88);
}

.event-video-meta span {
  color: rgba(255, 255, 255, 0.58);
}

.face-preview-empty {
  justify-content: center;
  min-height: 116px;
  cursor: default;
}

.face-preview-empty:hover,
.face-preview-empty:focus-visible,
.event-card--empty:hover,
.event-card--empty:focus-visible {
  transform: none;
  border-color: rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.024));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.face-preview-avatar,
.event-card__thumb.face-preview-avatar {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  border-radius: 10px;
  border: 1px solid rgba(241, 56, 17, 0.16);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.16), rgba(241, 56, 17, 0.055)),
    rgba(18, 18, 18, 0.72);
  color: rgba(255, 214, 191, 0.94);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.face-preview-copy,
.event-card__content {
  display: grid;
  align-content: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.face-preview-copy strong,
.event-card__time {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.96);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.face-preview-copy span,
.event-card__duration {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-head {
  display: grid;
  align-content: start;
  gap: 6px;
}

.selector-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.selector-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.camera-switcher {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  max-height: min(62vh, 700px);
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(241, 56, 17, 0.45) transparent;
}

.dashboard-camera-preview {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dashboard-camera-preview.is-active {
  border-color: rgba(241, 56, 17, 0.34);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.09), rgba(241, 56, 17, 0.04)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
}

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

.dashboard-camera-preview-kicker {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-camera-preview-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-camera-preview-close {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--brand-white);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dashboard-camera-preview-close:hover,
.dashboard-camera-preview-close:focus-visible {
  border-color: rgba(241, 56, 17, 0.42);
  background: rgba(241, 56, 17, 0.1);
}

.dashboard-camera-preview-close:active {
  transform: scale(0.98);
}

.dashboard-camera-preview-empty {
  padding: 22px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at top, rgba(241, 56, 17, 0.1), transparent 45%),
    linear-gradient(180deg, rgba(20, 20, 20, 0.82), rgba(12, 12, 12, 0.96));
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.dashboard-camera-preview-stage {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 2px;
}

.dashboard-camera-preview-stage[hidden] {
  display: none !important;
}

.camera-pill-shell {
  position: relative;
  min-height: 0;
}

.camera-pill {
  position: relative;
  display: grid;
  gap: 9px;
  width: 100%;
  min-height: 176px;
  padding: 10px 44px 12px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
  color: var(--brand-white);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.camera-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  cursor: pointer;
  pointer-events: none;
}

.camera-pill:hover {
  border-color: rgba(241, 56, 17, 0.42);
  background: linear-gradient(180deg, rgba(241, 56, 17, 0.08), rgba(241, 56, 17, 0.04));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.camera-pill:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.88);
  outline-offset: 3px;
}

.camera-pill.is-active {
  border-color: rgba(241, 56, 17, 0.68);
  background: linear-gradient(180deg, rgba(241, 56, 17, 0.16), rgba(241, 56, 17, 0.08));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  transform: translateX(2px);
}

.camera-pill-preview {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 86px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 50% 20%, rgba(241, 56, 17, 0.14), transparent 48%),
    #050709;
}

.camera-pill-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  background: #050709;
}

.camera-pill-preview-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.camera-pill-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.camera-pill-topline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.camera-pill-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.camera-pill-association {
  display: block;
  padding-left: 21px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.camera-pill-status {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: underline;
}

.camera-pill-led {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.camera-pill-led.tone-live {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.camera-pill-led.tone-busy {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.camera-pill-led.tone-error {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.camera-pill-led.tone-idle {
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.camera-pill-tags {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.camera-pill-tag {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.camera-pill-inference {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 12, 12, 0.42);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.camera-pill-inference:hover,
.camera-pill-inference:focus-visible {
  border-color: rgba(241, 56, 17, 0.34);
  background: rgba(241, 56, 17, 0.1);
  color: rgba(255, 255, 255, 0.92);
}

.camera-pill-inference:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.76);
  outline-offset: 2px;
}

.camera-pill-inference:active {
  transform: scale(0.96);
}

.camera-pill-inference.is-enabled {
  border-color: rgba(241, 56, 17, 0.5);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.24), rgba(241, 56, 17, 0.14));
  color: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(241, 56, 17, 0.18);
}

.camera-pill-inference.is-updating {
  cursor: progress;
  opacity: 0.7;
}

.camera-pill-inference:disabled {
  pointer-events: none;
}

.camera-pill-inference-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.camera-pill-inference-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.camera-pill-inference-icon-on {
  display: none;
}

.camera-pill-inference.is-enabled .camera-pill-inference-icon-on {
  display: inline-flex;
}

.camera-pill-inference.is-enabled .camera-pill-inference-icon-off {
  display: none;
}

.viewer-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
  position: relative;
  isolation: isolate;
}

.viewer-shell-flat {
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0;
}

.viewer-audio-dock {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: min(360px, calc(100% - 32px));
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.84), rgba(12, 12, 12, 0.92)),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 38%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.viewer-audio-dock .audio-controls {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: end;
  gap: 12px;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(21, 21, 21, 0.88), rgba(14, 14, 14, 0.94)),
    radial-gradient(circle at top right, rgba(241, 56, 17, 0.1), transparent 30%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.viewer-copy {
  display: grid;
  gap: 4px;
}

.viewer-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.viewer-name {
  font-size: clamp(1.12rem, 2vw, 1.5rem);
  font-weight: 800;
}

.viewer-capabilities {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.viewer-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.viewer-chip-state.tone-live {
  border-color: rgba(34, 197, 94, 0.34);
  color: #86efac;
}

.viewer-chip-state.tone-busy {
  border-color: rgba(245, 158, 11, 0.34);
  color: #fcd34d;
}

.viewer-chip-state.tone-error {
  border-color: rgba(239, 68, 68, 0.34);
  color: #fca5a5;
}

.viewer-chip-state.tone-idle {
  border-color: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

.primary-view {
  min-width: 0;
  min-height: min(68vh, 760px);
}

.camera-inference-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 1.14rem;
  padding: 23px 14px;
  position: relative;
  z-index: 12;
  overflow: visible;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(38, 38, 38, 0.9), rgba(18, 18, 18, 0.92));
}

.camera-inference-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  position: relative;
  z-index: 13;
}

.camera-inference-field span,
.camera-inference-active {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.camera-inference-field span {
  font-size: 1.3rem;
}

.camera-inference-field select {
  width: 295px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #262626;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  padding: 0 34px 0 12px;
}

.camera-inference-field select option {
  background: #262626;
  color: #ffffff;
  font-weight: 800;
}

.camera-inference-field select option:checked,
.camera-inference-field select option:hover {
  background: #334155;
  color: #ffffff;
}

.camera-inference-load {
  
  min-height: 38px;
  border: 1px solid rgba(255, 110, 0, 0.72);
  border-radius: 10px;
  background: rgba(255, 110, 0, 0.13);
  color: #FF6E00;
  font: inherit;
  font-weight: 900;
  padding: 3px 14px;
  cursor: pointer;
}

.camera-inference-load:hover,
.camera-inference-load:focus-visible {
  border-color: rgba(255, 110, 0, 0.78);
  background: rgba(255, 110, 0, 0.2);
}

.camera-inference-load:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.camera-inference-active {
  align-self: center;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.4em;
  white-space: nowrap;
  text-align: right;
  color: rgba(255, 255, 255, 0.62);
}

.camera-inference-no-inference {
  color: #fb5a2d;
}

.camera-inference-selected {
  color: #ffffff;
  font-weight: 950;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.76),
    0 0 5px rgba(255, 255, 255, 0.5),
    0 0 10px rgba(255, 255, 255, 0.28);
  animation: camera-inference-neon 2.8s ease-in-out infinite alternate;
}

@keyframes camera-inference-neon {
  from {
    text-shadow:
      0 0 1px rgba(255, 255, 255, 0.58),
      0 0 4px rgba(255, 255, 255, 0.34),
      0 0 8px rgba(255, 255, 255, 0.18);
  }
  to {
    text-shadow:
      0 0 2px rgba(255, 255, 255, 0.78),
      0 0 6px rgba(255, 255, 255, 0.48),
      0 0 12px rgba(255, 255, 255, 0.26);
  }
}

.primary-view.is-empty {
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at top, rgba(241, 56, 17, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(30, 30, 30, 0.96), rgba(15, 15, 15, 1));
}

.camera-empty-state {
  width: 100%;
  max-width: 420px;
  text-align: center;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  font-weight: 700;
  line-height: 1.5;
}

.camera-empty-state[hidden] {
  display: none !important;
}

.camera-pool {
  display: none;
}

.camera-card {
  position: relative;
  min-height: 250px;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(241, 56, 17, 0.18), transparent 46%),
    linear-gradient(180deg, rgba(36, 36, 36, 0.96), rgba(16, 16, 16, 1));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  touch-action: manipulation;
  isolation: isolate;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.camera-card:hover {
  border-color: rgba(241, 56, 17, 0.45);
}

.camera-card:active {
  transform: scale(0.992);
}

.camera-card:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.9);
  outline-offset: 3px;
}

.camera-card.is-active {
  border-color: var(--line-strong);
  box-shadow: 0 30px 74px rgba(241, 56, 17, 0.18);
}

.primary-view .camera-card {
  height: 100%;
  min-height: min(68vh, 760px);
  aspect-ratio: auto;
}

.page-cameras .primary-view {
  display: grid;
  align-content: stretch;
  position: relative;
  z-index: 1;
}

.page-cameras .viewer-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 12px;
  min-height: 0;
}

.page-cameras .cameras-page-large-card {
  width: 100%;
  height: 100%;
  min-height: min(68vh, 760px);
  cursor: default;
  position: relative;
  z-index: 1;
}

.page-cameras .cameras-page-large-card::after {
  display: none;
}

.camera-badges {
  position: absolute;
  top: 48px;
  left: 12px;
  z-index: 3;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  max-width: min(calc(100% - 72px), 240px);
}

.camera-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(248, 250, 252, 0.76);
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.camera-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(26, 26, 26, 0.82), transparent 34%),
    linear-gradient(to bottom, rgba(26, 26, 26, 0.56), transparent 26%);
  pointer-events: none;
}

.camera-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 20, 20, 0.84);
  color: var(--brand-white);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.camera-card-close:hover,
.camera-card-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.52);
  background: rgba(241, 56, 17, 0.18);
}

.camera-card-close[hidden] {
  display: none !important;
}

.camera-float-btn {
  position: absolute;
  top: 10px;
  right: 50px;
  z-index: 5;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 20, 20, 0.84);
  color: var(--brand-white);
  font-size: 0.85rem;
  line-height: 1;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
  opacity: 0;
  pointer-events: none;
}

.camera-card:hover .camera-float-btn,
.camera-card.is-floating .camera-float-btn {
  opacity: 1;
  pointer-events: auto;
}

.camera-float-btn:hover,
.camera-float-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.52);
  background: rgba(241, 56, 17, 0.18);
}

.camera-float-drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 52px;
  height: 44px;
  z-index: 6;
  cursor: grab;
  display: none;
}

.camera-float-drag-handle:active {
  cursor: grabbing;
}

.camera-card.is-floating {
  position: fixed !important;
  z-index: 900;
  width: 480px !important;
  height: 270px !important;
  min-height: unset !important;
  aspect-ratio: unset !important;
  border-radius: 14px;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.72), 0 0 0 1.5px rgba(241, 56, 17, 0.5);
  transition: box-shadow 0.18s ease;
  cursor: default;
}

.camera-card.is-floating .camera-float-drag-handle {
  display: block;
}

.video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background:
    radial-gradient(circle at center, rgba(38, 38, 38, 0.92), rgba(26, 26, 26, 1));
}

.camera-web-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background:
    radial-gradient(circle at center, rgba(38, 38, 38, 0.92), rgba(26, 26, 26, 1));
}

.camera-meta {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  pointer-events: none;
}

.camera-topline,
.camera-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.camera-name,
.camera-state,
.camera-hint,
.camera-cta,
.camera-audio-toggle {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 26, 26, 0.82);
  backdrop-filter: blur(8px);
}

.camera-name,
.camera-state {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.camera-hint {
  font-size: 0.82rem;
  color: #f8fafc;
}

.camera-cta {
  font-size: 0.78rem;
  color: var(--brand-white);
  border-color: rgba(241, 56, 17, 0.45);
  background: rgba(241, 56, 17, 0.2);
}

.camera-audio-toggle {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-white);
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(15, 23, 42, 0.56);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.camera-audio-toggle:hover,
.camera-audio-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.58);
  background: rgba(15, 23, 42, 0.82);
}

.camera-audio-toggle:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.errors {
  display: grid;
  gap: 12px;
}

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

.ops-card {
  display: grid;
  gap: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(28, 28, 28, 0.9), rgba(18, 18, 18, 0.94));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  padding: 18px;
  min-height: 100%;
}

.ops-card-map {
  background:
    linear-gradient(180deg, rgba(28, 28, 28, 0.92), rgba(18, 18, 18, 0.96)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.09), transparent 38%);
}

.ops-card-map {
  align-content: start;
}

.page-panel {
  min-height: min(72vh, 840px);
}

.page-feed {
  max-height: none;
  min-height: min(64vh, 720px);
}

.page-map-canvas {
  min-height: min(64vh, 720px);
}

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

.ops-head h2 {
  margin: 0;
  font-size: 1rem;
}

.ops-eyebrow {
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.audio-controls {
  display: grid;
  gap: 12px;
}

.audio-toggle {
  border: 1px solid rgba(241, 56, 17, 0.45);
  background: linear-gradient(180deg, rgba(241, 56, 17, 0.18), rgba(241, 56, 17, 0.1));
  color: var(--brand-white);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.audio-toggle:hover,
.audio-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.62);
}

.audio-toggle[data-state="on"],
.camera-audio-toggle[data-state="on"] {
  border-color: rgba(34, 197, 94, 0.48);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.22), rgba(21, 128, 61, 0.14));
}

.audio-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.volume-wrap {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.viewer-audio-dock .volume-wrap {
  min-width: 0;
}

.viewer-audio-dock .volume-wrap span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.volume-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.volume-wrap input[type="range"]:disabled {
  opacity: 0.5;
}

.ops-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.audio-summary-note {
  font-size: 0.84rem;
  line-height: 1.4;
  max-width: 32ch;
}

.camera-register-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 24px;
}

.camera-register-modal[hidden] {
  display: none;
}

.camera-register-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(10px);
}

.camera-register-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 32px));
  max-height: min(90dvh, 900px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(25, 28, 34, 0.98), rgba(15, 17, 23, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.12), transparent 38%);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.camera-register-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.camera-register-dialog-head h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.35rem, 1.2rem + 0.45vw, 1.8rem);
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.camera-register-dialog-head p {
  margin: 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  font-size: 0.92rem;
}

.camera-register-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--brand-white);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.camera-register-close:hover,
.camera-register-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.58);
  background: rgba(241, 56, 17, 0.12);
}

.camera-register-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.camera-register-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.camera-register-stack,
.camera-register-map-stack {
  display: grid;
  gap: 14px;
}

.vehicle-register-drone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vehicle-register-drone-grid[hidden] {
  display: none;
}

.vehicle-register-camera-shell {
  display: grid;
  gap: 12px;
}

.vehicle-register-camera-list {
  display: grid;
  gap: 10px;
}

.vehicle-register-camera-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.vehicle-register-camera-item.is-selected {
  border-color: rgba(72, 186, 255, 0.4);
  background: rgba(72, 186, 255, 0.08);
}

.vehicle-register-camera-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.vehicle-register-camera-head input[type="checkbox"] {
  inline-size: 18px;
  block-size: 18px;
  accent-color: #48baff;
}

.vehicle-register-camera-head span {
  display: grid;
  gap: 2px;
}

.vehicle-register-camera-head strong {
  font-size: 0.95rem;
}

.vehicle-register-camera-head small,
.vehicle-register-camera-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  line-height: 1.45;
}

.vehicle-register-camera-position {
  inline-size: 100%;
  min-block-size: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 18, 28, 0.72);
  color: inherit;
}

.vehicle-register-camera-position:disabled {
  opacity: 0.55;
}

.camera-register-intro {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.camera-register-intro strong {
  font-size: 0.95rem;
}

.camera-register-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.5;
}

.camera-register-guide {
  display: grid;
  gap: 10px;
}

.camera-register-guide-item {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.camera-register-guide-item strong {
  font-size: 0.88rem;
}

.camera-register-guide-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  line-height: 1.45;
}

.camera-register-guide-item code,
.camera-register-example code {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 0.76rem;
  word-break: break-all;
}

.camera-register-field {
  display: grid;
  gap: 8px;
}

#camera-admin-form.is-rbox-mode .camera-register-field[hidden] {
  display: none !important;
}

.camera-admin-conditional-grid[hidden] {
  display: none !important;
}

.camera-register-coordinates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.camera-register-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.camera-register-step {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(241, 56, 17, 0.18);
  border: 1px solid rgba(241, 56, 17, 0.36);
  color: var(--brand-white);
  font-size: 0.76rem;
  font-weight: 800;
}

.camera-register-label > span:last-child {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.87rem;
  font-weight: 700;
}

.camera-register-field input,
.camera-register-field select,
.camera-register-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--brand-white);
  padding: 12px 14px;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.camera-register-field input::placeholder,
.camera-register-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.camera-register-field input:focus,
.camera-register-field select:focus,
.camera-register-field textarea:focus {
  outline: none;
  border-color: rgba(241, 56, 17, 0.62);
  background: rgba(241, 56, 17, 0.06);
  box-shadow: 0 0 0 4px rgba(241, 56, 17, 0.12);
}

.camera-register-field select {
  appearance: none;
}

.camera-register-field select option {
  background: #1a1a2e;
  color: #f8fafc;
}

.camera-register-field textarea {
  min-height: 108px;
  resize: vertical;
}

.camera-register-help {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  line-height: 1.45;
}

.camera-register-map-head {
  display: grid;
  gap: 5px;
}

.camera-register-map-head strong {
  font-size: 0.96rem;
}

.camera-register-map-head span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.84rem;
  line-height: 1.45;
}

.camera-register-map {
  min-height: 360px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(25, 31, 40, 0.94), rgba(17, 21, 28, 0.98)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.08), transparent 34%);
}

.camera-register-map .empty-state {
  height: 100%;
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
}

.camera-register-submit {
  border: 1px solid rgba(241, 56, 17, 0.45);
  background: linear-gradient(180deg, rgba(241, 56, 17, 0.2), rgba(241, 56, 17, 0.1));
  color: var(--brand-white);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.camera-register-submit:hover {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.68);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.camera-register-submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.camera-register-actions {
  display: grid;
  gap: 12px;
  flex: 0 0 auto;
  margin-top: 6px;
  padding-top: 14px;
  background:
    linear-gradient(180deg, rgba(15, 17, 23, 0.12), rgba(15, 17, 23, 0.96) 28%, rgba(15, 17, 23, 0.98));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.camera-register-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.camera-register-secondary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--brand-white);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.camera-register-secondary:hover,
.camera-register-secondary:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.camera-register-secondary:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.camera-register-feedback {
  min-height: 1.3em;
}

.camera-register-feedback[data-tone="success"] {
  color: #7ef0a5;
}

.camera-register-feedback[data-tone="error"] {
  color: #ff8d8d;
}

.map-canvas {
  width: 100%;
  min-height: 340px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(78, 83, 91, 0.94), rgba(40, 44, 50, 0.98)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 32px rgba(0, 0, 0, 0.18);
}

.map-canvas.is-preparing-map .leaflet-pane,
.map-canvas.is-preparing-map .leaflet-control-container {
  opacity: 0;
}

.leaflet-container {
  font: inherit;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 30%),
    linear-gradient(180deg, #4d5259, #25292f);
  color: #f3f4f6;
}

.leaflet-tile {
  filter: brightness(0.4) contrast(1.28) saturate(1.18) sepia(0.12);
}

.leaflet-pane,
.leaflet-control,
.leaflet-top,
.leaflet-bottom {
  z-index: 4;
}

.leaflet-bar {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.leaflet-bar a,
.leaflet-bar a:hover {
  width: 34px;
  height: 34px;
  line-height: 34px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(57, 62, 70, 0.92);
  color: #f9fafb;
}

.leaflet-bar a:hover,
.leaflet-bar a:focus-visible {
  background: rgba(82, 88, 97, 0.98);
  color: #ffd28a;
}

.leaflet-control-attribution {
  background: rgba(34, 38, 44, 0.8) !important;
  color: rgba(241, 245, 249, 0.72);
  border-top-left-radius: 12px;
  backdrop-filter: blur(10px);
}

.leaflet-control-attribution a {
  color: #ffd28a;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(62, 68, 77, 0.96), rgba(36, 40, 46, 0.98)),
    radial-gradient(circle at top left, rgba(255, 210, 138, 0.08), transparent 34%);
  color: #f8fafc;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.leaflet-popup-tip {
  background: rgba(36, 40, 46, 0.98);
}

.leaflet-popup-content {
  margin: 12px 14px;
  line-height: 1.5;
}

.leaflet-container a.leaflet-popup-close-button {
  color: rgba(255, 255, 255, 0.72);
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: #ffffff;
}

.ops-map-tooltip {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(44, 49, 56, 0.94);
  color: #f8fafc;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ops-map-tooltip::before {
  border-top-color: rgba(44, 49, 56, 0.94);
}

.telemetry-summary {
  display: grid;
  gap: 10px;
}

.telemetry-monitor-filter {
  min-width: min(100%, 240px);
  display: grid;
  gap: 6px;
}

.telemetry-map-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.telemetry-map-controls::-webkit-scrollbar { display: none; }

.telemetry-map-mode {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.telemetry-map-mode[data-mode="manual"] {
  border-color: rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.1);
  color: #99f6e4;
}

.telemetry-map-style-wrap {
  min-width: 138px;
  display: grid;
  gap: 4px;
}

.telemetry-osint-layer-wrap {
  min-width: 210px;
}

.telemetry-map-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
}

.telemetry-map-switch input {
  width: 16px;
  height: 16px;
  accent-color: #f59e0b;
  cursor: pointer;
}

.telemetry-map-style-wrap > span {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.telemetry-map-style {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.telemetry-map-style:hover,
.telemetry-map-style:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.telemetry-map-style option {
  background: #1a1a2e;
  color: #f8fafc;
}

.telemetry-map-recenter {
  min-width: 132px;
}

.telemetry-track-export {
  min-width: 132px;
  background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(99,102,241,0.12));
  border-color: rgba(34,211,238,0.35);
  color: #22d3ee;
}
.telemetry-track-export:hover,
.telemetry-track-export:focus-visible {
  background: linear-gradient(135deg, rgba(34,211,238,0.22), rgba(99,102,241,0.22));
  border-color: rgba(34,211,238,0.6);
}

.telemetry-track-clear {
  min-width: 112px;
  background: linear-gradient(135deg, rgba(248,113,113,0.12), rgba(249,115,22,0.12));
  border-color: rgba(248,113,113,0.35);
  color: #f97316;
}
.telemetry-track-clear:hover,
.telemetry-track-clear:focus-visible {
  background: linear-gradient(135deg, rgba(248,113,113,0.2), rgba(249,115,22,0.2));
  border-color: rgba(249,115,22,0.55);
}

.telemetry-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 14px 18px;
  flex-wrap: wrap;
  padding: 0 2px;
}

.telemetry-toolbar-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.telemetry-toolbar-copy h2 {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.telemetry-toolbar-filter {
  flex: 0 1 300px;
  min-width: min(100%, 260px);
}

.page-map .app-main {
  display: flex;
  flex-direction: column;
  height: var(--app-height);
  overflow: hidden;
}

.page-map .wrap {
  flex: 1;
  min-height: 0;
  padding: 0;
  gap: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  align-content: stretch;
}

.page-map .page-map-shell {
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.page-map .map-workbench {
  grid-template-columns: minmax(0, 1.64fr) minmax(420px, 0.98fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.page-map .map-workbench[data-video-layout="video"] {
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
}

.page-map .map-main-card,
.page-map .telemetry-list-card,
.page-map .telemetry-video-shell,
.page-map .telemetry-focus-shell,
.page-map .telemetry-rail {
  min-height: 0;
}

.page-map .map-main-card {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.telemetry-map-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  z-index: 0;
  isolation: isolate;
}

.page-map .telemetry-map-stage {
  min-height: 320px;
}

.page-map .page-map-canvas,
.page-map .map-canvas {
  height: 100%;
  min-height: 320px;
}

.page-map .telemetry-map-stage .page-map-canvas,
.page-map .telemetry-map-stage .map-canvas {
  height: 100%;
}

.page-map .telemetry-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(210px, 0.34fr) minmax(0, 0.66fr);
  gap: 16px;
  height: 100%;
  min-height: 0;
  width: 100%;
  max-width: none;
  overflow: hidden;
  align-items: stretch;
}

.page-map .map-workbench[data-video-layout="video"] .telemetry-rail {
  grid-template-rows: minmax(420px, 0.68fr) minmax(180px, 0.32fr);
}

.page-map .telemetry-list-card,
.page-map .telemetry-video-shell,
.page-map .telemetry-focus-shell {
  height: 100%;
  overflow: hidden;
}

.page-map .telemetry-video-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  border-color: rgba(20, 184, 166, 0.11);
  background:
    linear-gradient(180deg, rgba(19, 25, 27, 0.94), rgba(11, 15, 17, 0.97)),
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 44%);
}

.page-map .telemetry-video-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.page-map .telemetry-video-head > div {
  min-width: 0;
}

.page-map .telemetry-video-head h2 {
  margin: 2px 0 0;
  max-width: 100%;
  color: rgba(248, 250, 252, 0.95);
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-map .telemetry-video-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(14, 165, 233, 0.08);
  color: rgba(186, 230, 253, 0.86);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-map .telemetry-video-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 168px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #05080c;
}

.page-map .map-workbench[data-video-layout="video"] .telemetry-video-stage {
  min-height: 360px;
}

.page-map .telemetry-video-stage iframe,
.page-map .telemetry-video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #05080c;
}

.page-map .telemetry-video-stage .empty-state {
  width: 100%;
  min-height: 0;
  padding: 20px;
  text-align: center;
  color: rgba(226, 232, 240, 0.72);
}

.page-map .ops-head,
.page-map .telemetry-title,
.page-map .telemetry-focus-top,
.page-map .telemetry-focus-foot {
  flex-wrap: wrap;
}

.page-map .telemetry-monitor-filter {
  width: 100%;
  max-width: 100%;
}

.page-map .telemetry-map-filter {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 460;
  min-width: 18.5%;
  width: min(112px, calc(100% - 28px));
  max-width: min(112px, calc(100% - 28px));
  padding: 9px 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 24, 26, 0.92), rgba(10, 14, 17, 0.86));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.page-map .telemetry-map-filter label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.page-map .telemetry-map-filter select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.page-map .telemetry-map-filter select option {
  background: #1a1a2e;
  color: #f8fafc;
}

.page-map .telemetry-map-overlay-box {
  --telemetry-overlay-width: 230px;
  --telemetry-overlay-height: 138px;
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 450;
  width: min(var(--telemetry-overlay-width), calc(100% - 28px));
  height: min(var(--telemetry-overlay-height), calc(100% - 28px));
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.telemetry-map-overlay-box[hidden] {
  display: none;
}

.telemetry-map-overlay-preview {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(2, 6, 12, 0.92);
  pointer-events: auto;
}

.telemetry-map-overlay-preview video,
.telemetry-map-overlay-preview iframe,
.telemetry-map-overlay-preview .empty-state {
  width: 100%;
  height: 100%;
}

.telemetry-map-overlay-preview video,
.telemetry-map-overlay-preview iframe {
  display: block;
  border: 0;
  object-fit: cover;
  background: #02060c;
}

.telemetry-map-overlay-preview .empty-state {
  min-height: 0;
  padding: 16px 14px;
  text-align: center;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  line-height: 1.4;
}

.telemetry-map-overlay-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 8, 12, 0.22);
  color: rgba(248, 250, 252, 0.72);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(4px);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.telemetry-map-overlay-close:hover,
.telemetry-map-overlay-close:focus-visible {
  background: rgba(5, 8, 12, 0.38);
  color: rgba(248, 250, 252, 0.96);
  transform: scale(1.04);
}


.telemetry-map-overlay-organization {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 8, 12, 0.26);
  color: rgba(248, 250, 252, 0.76);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.page-map .telemetry-monitor-filter select,
.page-map .telemetry-battery-copy,
.page-map .telemetry-detail,
.page-map .telemetry-focus-meta,
.page-map .telemetry-focus-note,
.page-map .telemetry-focus-foot {
  min-width: 0;
  overflow-wrap: anywhere;
}

.page-map .telemetry-summary {
  height: 100%;
  max-height: none;
  overflow: auto;
  gap: 8px;
  padding-right: 2px;
}

.telemetry-focus-summary {
  display: grid;
  gap: 14px;
  min-height: 100%;
}

.telemetry-focus-summary-head {
  display: grid;
  gap: 4px;
}

.telemetry-focus-summary-head strong {
  font-size: 0.98rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.telemetry-focus-summary-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
}

.page-map .telemetry-summary-embedded {
  height: auto;
  padding-right: 4px;
}

.page-map .telemetry-focus-card {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.page-map .telemetry-gauge-grid {
  display: flex;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.page-map .telemetry-attitude-dial,
.page-map .telemetry-heading-dial {
  width: min(100%, 124px);
}

.telemetry-focus-shell {
  align-content: start;
}

.page-map .telemetry-focus-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(25, 29, 31, 0.9), rgba(15, 18, 20, 0.94)),
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.08), transparent 42%);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-map .telemetry-focus-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(153, 246, 228, 0), rgba(153, 246, 228, 0.32), rgba(153, 246, 228, 0));
  pointer-events: none;
}

.page-map .telemetry-focus-shell .ops-head {
  position: relative;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2px 2px 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-map .telemetry-focus-shell .ops-head > div {
  display: grid;
  gap: 8px;
}

.page-map .telemetry-focus-shell .ops-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  background: rgba(20, 184, 166, 0.08);
  color: rgba(153, 246, 228, 0.84);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.page-map .telemetry-focus-shell h2 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: rgba(248, 250, 252, 0.94);
}

.telemetry-focus-card {
  display: grid;
  gap: 14px;
}

.page-map .telemetry-focus-shell .telemetry-focus-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 16px;
  padding: 4px 4px 2px 2px;
}

.page-map .telemetry-focus-shell .empty-state {
  padding: 16px 17px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.55;
}

.telemetry-focus-content {
  display: grid;
  gap: 14px;
}

.page-map .telemetry-focus-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  grid-template-columns: 1fr;
  gap: 14px;
}

.telemetry-focus-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.page-map .telemetry-focus-top {
  order: 0;
  flex: 0 0 auto;
}

.telemetry-focus-identity {
  display: grid;
  gap: 6px;
}

.telemetry-focus-kicker,
.telemetry-battery-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.telemetry-focus-name {
  font-size: 1.02rem;
  letter-spacing: 0.03em;
}

.telemetry-focus-meta {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.84rem;
}

.telemetry-focus-freshness {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.telemetry-battery-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(28, 37, 38, 0.96), rgba(19, 25, 27, 0.9));
}

.page-map .telemetry-battery-card {
  grid-area: battery;
  align-self: stretch;
  padding: 12px 14px;
  gap: 10px;
}

.telemetry-battery-card[data-level="good"] {
  border-color: rgba(34, 197, 94, 0.32);
}

.telemetry-battery-card[data-level="warning"] {
  border-color: rgba(245, 158, 11, 0.32);
}

.telemetry-battery-card[data-level="critical"] {
  border-color: rgba(239, 68, 68, 0.32);
}

.telemetry-battery-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.telemetry-battery-copy strong {
  font-size: 1rem;
}

.telemetry-battery-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
  line-height: 1.45;
}

.page-map .telemetry-battery-copy p {
  font-size: 0.78rem;
  line-height: 1.36;
}

.telemetry-battery-visual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.telemetry-battery-icon {
  position: relative;
  width: 72px;
  height: 28px;
  border-radius: 9px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  padding: 3px;
  background: rgba(7, 11, 16, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.telemetry-battery-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  right: -6px;
  width: 4px;
  height: 10px;
  border-radius: 0 4px 4px 0;
  background: rgba(255, 255, 255, 0.82);
}

.telemetry-battery-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #10b981, #4ade80);
  transition: width 0.25s ease, background 0.25s ease;
}

.telemetry-battery-card[data-level="warning"] .telemetry-battery-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.telemetry-battery-card[data-level="critical"] .telemetry-battery-fill {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.telemetry-battery-card[data-level="unknown"] .telemetry-battery-fill {
  background: linear-gradient(90deg, #475569, #94a3b8);
}

.telemetry-battery-value {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.telemetry-gauge-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.telemetry-gauge-card {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(37, 37, 37, 0.85), rgba(24, 24, 24, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-map .telemetry-gauge-card {
  padding: 12px;
  gap: 8px;
}

.telemetry-gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.telemetry-gauge-head strong {
  font-size: 0.9rem;
}

.telemetry-gauge-head span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.telemetry-attitude-dial,
.telemetry-heading-dial {
  position: relative;
  width: min(100%, 176px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 36px rgba(0, 0, 0, 0.18);
}

.telemetry-attitude-dial {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 62%),
    rgba(6, 10, 15, 0.88);
}

.telemetry-attitude-horizon,
.telemetry-attitude-lines {
  position: absolute;
  inset: -30%;
  transition: transform 0.22s ease-out;
}

.telemetry-attitude-horizon {
  background:
    linear-gradient(
      180deg,
      rgba(56, 189, 248, 0.94) 0%,
      rgba(56, 189, 248, 0.88) 48%,
      rgba(255, 255, 255, 0.84) 49%,
      rgba(255, 255, 255, 0.84) 51%,
      rgba(180, 83, 9, 0.94) 52%,
      rgba(120, 53, 15, 0.94) 100%
    );
  transform: translateY(var(--pitch-shift)) rotate(var(--roll-deg));
}

.telemetry-attitude-lines {
  opacity: 0.24;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 16px,
      rgba(255, 255, 255, 0.7) 16px 18px
    );
  transform: translateY(var(--pitch-shift)) rotate(var(--roll-deg));
}

.telemetry-attitude-crosshair {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)) center / 54% 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)) center / 2px 22% no-repeat;
}

.telemetry-attitude-center,
.telemetry-heading-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #f8fafc;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.28);
}

.telemetry-heading-dial {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 58%),
    conic-gradient(
      from 0deg,
      rgba(248, 250, 252, 0.24) 0deg 8deg,
      transparent 8deg 22deg,
      rgba(248, 250, 252, 0.12) 22deg 28deg,
      transparent 28deg 45deg
    ),
    rgba(7, 11, 16, 0.9);
}

.telemetry-heading-card {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  transition: transform 0.22s ease-out;
  transform: rotate(calc(var(--yaw-deg) * -1));
}

.telemetry-heading-card span {
  position: absolute;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.telemetry-heading-card .is-north {
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  color: #fb7185;
}

.telemetry-heading-card .is-east {
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
}

.telemetry-heading-card .is-south {
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.telemetry-heading-card .is-west {
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
}

.telemetry-heading-needle {
  position: absolute;
  left: 50%;
  top: 13%;
  width: 4px;
  height: 37%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #f97316, rgba(249, 115, 22, 0.12));
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.28);
}

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

.page-map .telemetry-gauge-values {
  grid-template-columns: 1fr;
  gap: 6px;
}

.telemetry-gauge-values span {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.82rem;
}

.telemetry-focus-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
}

.telemetry-focus-info-grid {
  display: grid;
  gap: 14px;
}

.page-map .telemetry-focus-stats {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-content: start;
}

.telemetry-focus-stat {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.page-map .telemetry-focus-stat {
  padding: 14px 15px;
}

.telemetry-focus-stat span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.telemetry-focus-stat strong {
  font-size: 0.94rem;
  line-height: 1.35;
}

.page-map .telemetry-focus-stat strong {
  font-size: 1.15rem;
  line-height: 1.28;
}

.telemetry-concession-card {
  display: grid;
  gap: 12px;
  padding: 16px 17px;
  border-radius: 18px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  background: linear-gradient(180deg, rgba(16, 54, 57, 0.62), rgba(10, 35, 37, 0.72));
}

.telemetry-concession-kicker {
  color: rgba(153, 246, 228, 0.9);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telemetry-concession-title {
  font-size: 1.28rem;
  line-height: 1.2;
  color: #f8fafc;
}

.telemetry-concession-grid {
  display: grid;
  gap: 10px;
}

.telemetry-concession-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.telemetry-concession-item span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.telemetry-concession-item strong {
  font-size: 1.06rem;
  line-height: 1.32;
  color: #f8fafc;
}

.page-map .telemetry-focus-info-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(165px, 0.82fr);
  align-items: start;
  order: 1;
  flex: 0 0 auto;
}

@media (max-width: 1680px) {
  .page-map .map-workbench {
    grid-template-columns: minmax(0, 1.72fr) minmax(360px, 0.9fr);
  }

  .page-map .telemetry-focus-info-grid {
    grid-template-columns: 1fr;
  }
}

.telemetry-focus-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.82rem;
}

.page-map .telemetry-focus-foot {
  grid-area: foot;
  gap: 6px 10px;
  font-size: 0.78rem;
}

.telemetry-focus-note {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(20, 184, 166, 0.16);
  background: rgba(20, 184, 166, 0.08);
  color: rgba(236, 253, 245, 0.82);
  font-size: 0.84rem;
  line-height: 1.45;
}

.page-map .telemetry-focus-note {
  padding: 10px 11px;
  font-size: 0.78rem;
  line-height: 1.34;
  order: 2;
}

.telemetry-monitor-filter label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.telemetry-monitor-filter select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--brand-white);
  padding: 10px 12px;
  font: inherit;
  appearance: none;
}

.telemetry-monitor-filter select:focus {
  outline: none;
  border-color: rgba(241, 56, 17, 0.62);
  box-shadow: 0 0 0 4px rgba(241, 56, 17, 0.12);
}

.telemetry-monitor-filter select option {
  background: #1a1a2e;
  color: #f8fafc;
}

.telemetry-row {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(38, 38, 38, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.page-map .telemetry-row {
  padding: 10px 11px;
}

.telemetry-row[data-selectable="true"] {
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.telemetry-row[data-selectable="true"]:hover {
  border-color: rgba(20, 184, 166, 0.44);
  background: rgba(27, 37, 39, 0.9);
  transform: translateY(-1px);
}

.location-row {
  font: inherit;
  width: 100%;
  display: grid;
  gap: 8px;
  text-align: left;
  border-radius: 14px;
  padding: 12px;
  background: rgba(38, 38, 38, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.location-row:hover,
.location-row:focus-visible {
  border-color: rgba(20, 184, 166, 0.48);
  background: rgba(26, 34, 36, 0.94);
  transform: translateY(-1px);
}

.location-row:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.72);
  outline-offset: 2px;
}

.telemetry-row.is-active {
  border-color: rgba(241, 56, 17, 0.45);
  box-shadow: inset 0 0 0 1px rgba(241, 56, 17, 0.16);
}

.telemetry-row.is-registered-drone {
  border-color: rgba(20, 184, 166, 0.3);
  background:
    linear-gradient(180deg, rgba(25, 42, 46, 0.9), rgba(21, 32, 35, 0.8));
}

.location-row.is-active {
  border-color: rgba(241, 56, 17, 0.45);
  box-shadow: inset 0 0 0 1px rgba(241, 56, 17, 0.16);
}

.telemetry-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.telemetry-title-compact {
  align-items: center;
  margin-bottom: 0;
}

.page-map .telemetry-title {
  margin-bottom: 5px;
}

.page-map .telemetry-title-compact {
  margin-bottom: 0;
}

.telemetry-row-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(241, 56, 17, 0.28);
  background: rgba(241, 56, 17, 0.12);
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.location-row-status {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.telemetry-detail {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.page-map .telemetry-detail {
  font-size: 0.8rem;
  line-height: 1.34;
}

.telemetry-freshness {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.event-feed {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.logs-toolbar {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at top right, rgba(241, 56, 17, 0.08), transparent 34%);
}

.logs-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.logs-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.logs-mode-pill:hover,
.logs-mode-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.38);
  color: rgba(255, 255, 255, 0.94);
}

.logs-mode-pill.is-active {
  border-color: rgba(241, 56, 17, 0.48);
  background: linear-gradient(180deg, rgba(241, 56, 17, 0.18), rgba(241, 56, 17, 0.08));
  color: rgba(255, 245, 239, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.logs-filter {
  display: grid;
  gap: 6px;
}

.logs-filter span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.logs-filter select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  color: var(--brand-white);
  font: inherit;
}

.logs-filter select option {
  background: #1a1a2e;
  color: #f8fafc;
}

.event-item {
  display: grid;
  gap: 8px;
  border-radius: 16px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(42, 42, 42, 0.78), rgba(32, 32, 32, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.event-item.is-active {
  border-color: rgba(241, 56, 17, 0.42);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.event-item:hover,
.event-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.28);
}

.event-item:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.82);
  outline-offset: 3px;
}

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

.event-severity,
.event-time {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sev-info {
  color: #60a5fa;
}

.sev-warning {
  color: #f59e0b;
}

.sev-error {
  color: #ef4444;
}

.event-title {
  text-transform: capitalize;
  font-weight: 700;
}

.event-meta,
.event-detail,
.empty-state {
  color: var(--muted);
  font-size: 0.86rem;
}

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

.logs-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.logs-summary-card span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logs-summary-card strong {
  font-size: 1rem;
  font-weight: 800;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.logs-detail {
  min-height: 320px;
  display: grid;
  align-content: start;
  max-height: min(58vh, 680px);
  overflow: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.logs-detail-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  line-height: 1.55;
}

.logs-detail-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top right, rgba(241, 56, 17, 0.08), transparent 34%);
}

.logs-detail-kicker {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logs-detail-title {
  font-size: 1.05rem;
  font-weight: 800;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.logs-detail-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.6;
}

.logs-detail-meta-grid {
  display: grid;
  gap: 10px;
}

.logs-detail-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.logs-detail-meta-row span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.78rem;
  font-weight: 700;
}

.logs-detail-meta-row strong {
  text-align: right;
  font-size: 0.84rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}

.logs-detail-pre {
  margin: 0;
  max-height: 280px;
  overflow: auto;
}

.vehicle-registry-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.vehicle-registry-rail {
  display: grid;
  gap: 16px;
}

.vehicle-registry-rail-list {
  display: grid;
  gap: 16px;
  align-content: start;
}

.vehicle-registry-detail {
  display: grid;
  gap: 16px;
  min-height: min(64vh, 720px);
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.vehicle-registry-detail-head {
  align-content: start;
}

.vehicle-registry-detail-copy {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.55;
}

.vehicle-registry-detail-empty {
  display: grid;
  place-items: center;
  min-height: 700px;
  padding: 22px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
}

.vehicle-registry-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.03), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.vehicle-registry-section.is-drones {
  border-color: rgba(20, 184, 166, 0.22);
  background:
    linear-gradient(180deg, rgba(21, 35, 37, 0.86), rgba(16, 24, 26, 0.78)),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.08), transparent 42%);
}

.vehicle-registry-section.is-vehicles {
  border-color: rgba(241, 56, 17, 0.22);
  background:
    linear-gradient(180deg, rgba(37, 28, 24, 0.86), rgba(24, 20, 18, 0.78)),
    radial-gradient(circle at top right, rgba(241, 56, 17, 0.08), transparent 42%);
}

.vehicle-registry-section.is-evidence {
  border-color: rgba(148, 163, 184, 0.2);
  background:
    linear-gradient(180deg, rgba(29, 31, 36, 0.84), rgba(20, 22, 26, 0.78)),
    radial-gradient(circle at top right, rgba(148, 163, 184, 0.06), transparent 42%);
}

.vehicle-registry-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.vehicle-registry-section-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vehicle-registry-section-kicker {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vehicle-registry-section-head strong {
  font-size: 1rem;
  font-weight: 800;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.vehicle-registry-section-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  line-height: 1.5;
}

.vehicle-registry-section-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 245, 239, 0.92);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vehicle-registry-section-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.vehicle-registry-summary-item {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  color: var(--brand-white);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.vehicle-registry-summary-item:hover,
.vehicle-registry-summary-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.vehicle-registry-summary-item:focus-visible {
  outline: none;
}

.vehicle-registry-section.is-drones .vehicle-registry-summary-item.is-active {
  border-color: rgba(20, 184, 166, 0.42);
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow:
    0 0 0 1px rgba(20, 184, 166, 0.14),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.vehicle-registry-section.is-vehicles .vehicle-registry-summary-item.is-active {
  border-color: rgba(241, 56, 17, 0.42);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow:
    0 0 0 1px rgba(241, 56, 17, 0.14),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.vehicle-registry-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vehicle-registry-summary-top strong {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.vehicle-registry-summary-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vehicle-registry-summary-identifier,
.vehicle-registry-summary-time {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  line-height: 1.4;
}

.vehicle-registry-section-empty {
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.55;
}

.vehicle-item {
  display: grid;
  gap: 10px;
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(42, 42, 42, 0.8), rgba(30, 30, 30, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vehicle-item.is-active {
  border-color: rgba(241, 56, 17, 0.42);
  box-shadow: inset 0 0 0 1px rgba(241, 56, 17, 0.14);
}

.vehicle-item-manual {
  position: relative;
  overflow: hidden;
  gap: 18px;
  min-height: 700px;
  padding: 24px;
  border-color: rgba(20, 184, 166, 0.24);
  background:
    radial-gradient(circle at top right, rgba(241, 56, 17, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(24, 41, 45, 0.9), rgba(20, 30, 32, 0.8));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 32px rgba(0, 0, 0, 0.16);
}

.vehicle-item-manual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%);
  pointer-events: none;
}

.vehicle-item-heading {
  display: grid;
  gap: 5px;
}

.vehicle-item-manual-summary {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 244, 237, 0.88);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vehicle-item-manual-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.vehicle-item-detail-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 110px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 18px rgba(0, 0, 0, 0.1);
}

.vehicle-item-detail-card-wide {
  grid-column: 1 / -1;
}

.vehicle-item-detail-label {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vehicle-item-detail-value {
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.35;
}

.vehicle-item-detail-value-code {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.vehicle-item-copy {
  justify-self: start;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.vehicle-item-copy:hover,
.vehicle-item-copy:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.vehicle-item-video-card {
  min-height: 320px;
}

.vehicle-item-video-card iframe {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
}

.vehicle-item-link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-item-link-pill {
  display: grid;
  gap: 3px;
  min-width: 86px;
  padding: 9px 11px;
  border-radius: 14px;
  border: 1px solid rgba(241, 56, 17, 0.16);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.1), rgba(255, 255, 255, 0.02));
}

.vehicle-item-link-pill small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.vehicle-item-link-pill strong {
  color: rgba(255, 245, 239, 0.96);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.vehicle-item-notes {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.55;
}

.vehicle-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.vehicle-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.vehicle-item-title {
  font-weight: 800;
  letter-spacing: 0.03em;
}

.vehicle-item-time {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.82rem;
  margin-top: 4px;
}

.vehicle-item-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vehicle-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(241, 56, 17, 0.38);
  background: rgba(241, 56, 17, 0.14);
  color: var(--brand-white);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vehicle-item-badge-soft {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.vehicle-item-meta {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
}

.map-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
}

.errors:empty {
  display: none;
}

.error-card {
  border-radius: 16px;
  border: 1px solid rgba(241, 56, 17, 0.32);
  background: rgba(38, 38, 38, 0.9);
  padding: 12px;
}

h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
  color: var(--brand-orange);
}

pre {
  margin: 0;
  max-height: 28vh;
  overflow: auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(26, 26, 26, 0.96);
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
}

.focus-close {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(241, 56, 17, 0.55);
  background:
    linear-gradient(180deg, rgba(26, 26, 26, 0.92), rgba(14, 14, 14, 0.96)),
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.12), transparent 38%);
  color: var(--brand-white);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.focus-close:hover,
.focus-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.74);
}

.focus-close[hidden] {
  display: none;
}

@media (min-width: 901px) {
  .camera-stage.has-multiple {
    grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  body {
    min-height: 100dvh;
    overflow: auto;
  }

  body.is-sidebar-mobile-open {
    overflow: hidden;
  }

  .app-shell {
    position: relative;
    --mobile-sidebar-width: min(320px, calc(100vw - 42px));
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .app-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 680;
    background:
      linear-gradient(180deg, rgba(3, 7, 18, 0.52), rgba(3, 7, 18, 0.7)),
      radial-gradient(circle at top left, rgba(241, 56, 17, 0.16), transparent 32%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .app-shell.is-sidebar-mobile-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--mobile-sidebar-width) - 28px);
    z-index: 700;
    width: var(--mobile-sidebar-width);
    height: 100dvh;
    grid-template-rows: auto 1fr auto;
    gap: 14px;
    margin: 0;
    padding:
      calc(env(safe-area-inset-top, 0px) + 18px)
      12px
      calc(env(safe-area-inset-bottom, 0px) + 16px);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 0 24px 24px 0;
    overflow: hidden;
    box-shadow:
      24px 0 48px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition:
      left var(--sidebar-motion-duration) var(--sidebar-motion-ease),
      box-shadow var(--sidebar-motion-duration) ease,
      background var(--sidebar-motion-duration) ease,
      border-color var(--sidebar-motion-duration) ease;
  }

  .app-shell.is-sidebar-mobile-open .app-sidebar {
    left: 0;
  }

  .sidebar-header {
    gap: 12px;
  }

  .sidebar-header-bar {
    align-items: flex-start;
  }

  .sidebar-brand-meta {
    display: grid;
    gap: 6px;
  }

  .sidebar-nav {
    align-content: start;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 10px;
    padding: 0 2px 4px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar-nav-head {
    display: grid;
  }

  .sidebar-footer {
    display: grid;
  }

  .app-shell.is-sidebar-collapsed .app-sidebar {
    left: calc(-1 * var(--mobile-sidebar-width) - 28px);
  }

  .sidebar-toggle {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 16px);
    left: 14px;
    right: auto;
    display: inline-grid;
    width: 48px;
    height: 48px;
    z-index: 710;
    box-shadow:
      0 16px 28px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .app-shell.is-sidebar-collapsed .sidebar-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 16px);
    right: auto;
    left: 14px;
  }

  .app-shell.is-sidebar-mobile-open .sidebar-toggle {
    left: calc(var(--mobile-sidebar-width) - 24px);
  }

  .app-main {
    min-height: auto;
    overflow: visible;
  }

  body.is-sidebar-mobile-open .app-main {
    pointer-events: none;
    user-select: none;
  }

  .top {
    padding: 14px 14px 12px 76px;
  }

  .page-dashboard .top-dashboard {
    padding: 18px 14px 14px 76px;
  }

  .top-page {
    padding: 18px 14px 14px 76px;
  }

  .page-map .top-page-map {
    padding: 14px 14px 12px 76px;
  }

  .title {
    font-size: clamp(1rem, 5vw, 1.45rem);
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .status {
    width: 100%;
  }

  .wrap {
    padding: 12px 10px 84px;
  }

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

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

  .dashboard-block {
    padding: 14px;
    border-radius: 22px;
  }

  .dashboard-block-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .page-section-shell {
    padding: 14px;
    border-radius: 22px;
  }

  .page-section-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .page-support-grid-cameras,
  .map-workbench,
  .events-workbench {
    grid-template-columns: 1fr;
  }

  .camera-stage {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
  }

  .camera-selector-panel {
    position: static;
    padding: 14px;
  }

  .camera-switcher {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 70vw);
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    padding-bottom: 4px;
  }

  .viewer-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .viewer-capabilities {
    justify-content: flex-start;
  }

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

  .page-panel {
    min-height: auto;
  }

  .page-feed,
  .page-map-canvas {
    min-height: 320px;
  }

  .primary-view .camera-card {
    min-height: clamp(250px, 58vw, 430px);
    border-radius: 18px;
  }

  .camera-register-dialog {
    width: min(960px, calc(100vw - 24px));
    padding: 18px;
  }

  .camera-register-grid {
    grid-template-columns: 1fr;
  }

  .camera-admin-mode-switch,
  .camera-admin-copy-wrap {
    grid-template-columns: 1fr;
  }

  .vehicle-register-drone-grid {
    grid-template-columns: 1fr;
  }

  .focus-close {
    top: 12px;
    left: 12px;
    padding: 9px 12px;
  }
}

@media (max-width: 640px) {
  .camera-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .camera-cta {
    display: none;
  }

  .ops-card {
    padding: 14px;
  }

  .map-canvas {
    min-height: 260px;
  }

  .camera-register-modal {
    padding: 12px;
  }

  .camera-register-dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 16px;
    border-radius: 22px;
  }

  .camera-register-dialog-head {
    gap: 12px;
  }

  .camera-register-dialog-head p {
    font-size: 0.88rem;
  }

  .camera-register-coordinates {
    grid-template-columns: 1fr;
  }

  .camera-register-map {
    min-height: 280px;
  }

  .camera-register-map .empty-state {
    min-height: 280px;
  }

  .camera-register-action-row {
    justify-content: stretch;
  }

  .camera-register-secondary,
  .camera-register-submit {
    width: 100%;
  }
}

/* Viewport-fit application shell */
:root {
  --app-height: 100dvh;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  height: var(--app-height);
  min-height: var(--app-height);
}

.app-shell {
  height: var(--app-height);
  min-height: var(--app-height);
  overflow: hidden;
}

.app-sidebar {
  height: var(--app-height);
}

.sidebar-nav {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.app-main {
  height: var(--app-height);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.top {
  position: relative;
  top: auto;
  flex: 0 0 auto;
}

.wrap {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  align-content: stretch;
  padding: 14px 16px 16px;
}

.dashboard-block,
.page-section-shell,
.ops-card,
.camera-stage,
.camera-selector-panel,
.viewer-shell,
.primary-view,
.map-workbench,
.events-workbench,
.telemetry-rail,
.event-rail,
.page-support-grid {
  min-height: 0;
}

.camera-switcher,
.telemetry-summary,
.event-feed,
.info-stack,
.sidebar-nav {
  overscroll-behavior: contain;
}

.camera-stage {
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.camera-selector-panel {
  position: relative;
  top: auto;
  height: 100%;
  overflow: hidden;
}

.camera-switcher {
  max-height: none;
  min-height: 0;
}

.viewer-shell {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
}

.primary-view {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.primary-view .camera-card {
  height: 100%;
  min-height: 0;
}

.ops-grid {
  min-height: 0;
  height: 100%;
  align-items: stretch;
  overflow: hidden;
}

.ops-card {
  min-height: 0;
  overflow: hidden;
}

.page-panel,
.page-feed,
.page-map-canvas,
.map-main-card,
.telemetry-list-card,
.events-main-card {
  min-height: 0;
  height: 100%;
}

.map-workbench,
.events-workbench {
  height: 100%;
  align-items: stretch;
}

.telemetry-rail,
.event-rail {
  height: 100%;
  overflow: hidden;
}

.map-canvas {
  min-height: 0;
  height: 100%;
}

.event-feed {
  max-height: none;
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.telemetry-summary,
.info-stack,
.camera-switcher {
  min-height: 0;
  overflow: auto;
}

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

.page-dashboard .app-main {
  display: flex;
  flex-direction: column;
  height: var(--app-height);
  overflow: hidden;
}

.page-dashboard .wrap {
  flex: 1;
  min-height: 0;
  padding: 0;
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.9fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

.page-dashboard .dashboard-block-video {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.page-dashboard .dashboard-ops-grid {
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  align-self: stretch;
  height: 100%;
}

.page-dashboard .dashboard-block-video .camera-stage {
  grid-template-columns: minmax(0, 1fr) min(370px, 28vw);
  gap: 10px;
  height: 100%;
  align-items: stretch;
}

.page-dashboard .camera-selector-panel {
  grid-column: 2;
  gap: 12px;
  padding: 12px;
}

.page-dashboard .dashboard-camera-preview {
  gap: 10px;
  padding: 10px;
}

.page-dashboard .dashboard-camera-preview-head {
  gap: 10px;
}

.page-dashboard .dashboard-camera-preview-close {
  padding: 7px 10px;
}

.page-dashboard .dashboard-camera-preview-empty {
  padding: 18px 12px;
}

.page-dashboard .dashboard-camera-preview-stage {
  gap: 10px;
  padding-right: 0;
}

.page-dashboard .dashboard-camera-preview-stage .camera-card {
  min-height: 180px;
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.24);
}

.page-dashboard .dashboard-camera-preview-stage .camera-badges {
  top: 42px;
  left: 11px;
  max-width: calc(100% - 58px);
}

.page-dashboard .dashboard-camera-preview-stage .camera-meta {
  padding: 11px 11px 9px;
}

.page-dashboard .dashboard-camera-preview-stage .camera-name {
  font-size: 0.86rem;
}

.page-dashboard .dashboard-camera-preview-stage .camera-state {
  font-size: 0.76rem;
}

.page-dashboard .dashboard-ops-grid .ops-card-audio {
  align-content: start;
}

.page-dashboard .dashboard-locations-shell {
  padding: 12px;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(27, 29, 30, 0.92), rgba(17, 19, 20, 0.94)),
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.08), transparent 36%);
}

.page-dashboard .telemetry-sync-shell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.page-dashboard .telemetry-sync-shell .map-workbench {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
}

.page-dashboard .telemetry-sync-shell .map-main-card,
.page-dashboard .telemetry-sync-shell .telemetry-rail,
.page-dashboard .telemetry-sync-shell .telemetry-focus-shell {
  min-height: 0;
}

.page-dashboard .telemetry-sync-shell .map-main-card {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.page-dashboard .telemetry-sync-shell .telemetry-map-stage {
  position: relative;
  min-height: 200px;
  height: 100%;
}

.page-dashboard .telemetry-sync-shell .page-map-canvas,
.page-dashboard .telemetry-sync-shell .map-canvas {
  height: 100%;
  min-height: 200px;
}

.page-dashboard .telemetry-sync-shell .telemetry-map-filter {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 460;
  width: min(180px, calc(100% - 28px));
  max-width: min(180px, calc(100% - 28px));
  padding: 9px 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 24, 26, 0.92), rgba(10, 14, 17, 0.86));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.page-dashboard .telemetry-sync-shell .telemetry-map-filter label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.page-dashboard .telemetry-sync-shell .telemetry-map-filter select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.page-dashboard .telemetry-sync-shell .telemetry-map-filter select option {
  background: #1a1a2e;
  color: #f8fafc;
}

.page-dashboard .telemetry-sync-shell .telemetry-map-overlay-box {
  --telemetry-overlay-width: 220px;
  --telemetry-overlay-height: 132px;
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 450;
  width: min(var(--telemetry-overlay-width), calc(100% - 28px));
  height: min(var(--telemetry-overlay-height), calc(100% - 28px));
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.page-dashboard .telemetry-sync-shell .telemetry-rail {
  grid-template-columns: 1fr;
  min-height: 0;
}

.page-dashboard .telemetry-sync-shell .telemetry-focus-card {
  max-height: min(24vh, 220px);
  overflow: auto;
  padding-right: 2px;
}

.page-dashboard .telemetry-sync-shell .telemetry-summary {
  max-height: min(32vh, 260px);
  overflow: auto;
  padding-right: 2px;
}

.page-dashboard .dashboard-map-workbench {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.page-dashboard .dashboard-map-main-card {
  min-height: 0;
}

.page-dashboard .dashboard-map-canvas {
  min-height: min(68vh, 760px);
}

.page-cameras .wrap {
  grid-template-rows: minmax(0, 1fr) auto;
}

.page-cameras .camera-stage,
.page-cameras .camera-stage.has-multiple {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1.7fr) minmax(300px, 340px);
  gap: 18px;
  align-items: stretch;
}

.page-cameras .page-section-shell {
  overflow: hidden;
}

.page-cameras .camera-switcher {
  gap: 14px;
  padding-right: 8px;
}

.page-cameras .camera-side-panel,
.page-cameras .face-preview-shell {
  height: 100%;
  min-height: 0;
}

.page-cameras .camera-side-panel {
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.page-cameras .face-preview-shell {
  max-height: none;
}

.page-cameras .face-preview-grid {
  height: 100%;
  max-height: none;
  scrollbar-color: rgba(255, 122, 45, 0.7) transparent;
  scrollbar-width: thin;
}

.page-cameras .face-preview-grid::-webkit-scrollbar {
  width: 8px;
}

.page-cameras .face-preview-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: transparent;
}

.page-cameras .face-preview-grid::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 122, 45, 0.62);
  background-clip: padding-box;
}

.page-cameras .face-preview-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 122, 45, 0.86);
  background-clip: padding-box;
}

.page-cameras .camera-pill-shell {
  min-height: auto;
}

.page-cameras .camera-pill {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: auto;
  padding: 10px;
  overflow: hidden;
}

.page-cameras .camera-pill.is-active {
  transform: none;
}

.page-cameras .camera-pill-preview {
  flex: 0 0 auto;
  min-height: 0;
  border-radius: 10px;
}

.page-cameras .camera-pill-main {
  gap: 3px;
  min-width: 0;
  padding-right: 48px;
}

.page-cameras .camera-pill-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.page-cameras .camera-pill-title {
  font-size: 0.84rem;
  line-height: 1.12;
  letter-spacing: 0.02em;
}

.page-cameras .camera-pill-association {
  padding-left: 19px;
  font-size: 0.66rem;
  line-height: 1.28;
}

.page-cameras .camera-pill-status,
.page-cameras .camera-pill-tags {
  display: none;
}

.page-cameras .camera-pill-inference {
  top: auto;
  right: 16px;
  bottom: 16px;
}

.page-support-grid-cameras {
  grid-template-rows: minmax(0, 1fr);
}

.page-map .wrap {
  grid-template-rows: minmax(0, 1fr) auto;
}

.page-events .wrap {
  grid-template-rows: minmax(0, 1fr) auto;
}

.page-map .page-map-shell {
  overflow: hidden;
}

.page-events .page-events-shell {
  overflow: hidden;
}

.page-map .map-workbench {
  grid-template-columns: minmax(0, 1.64fr) minmax(420px, 0.98fr);
}

.page-events .events-workbench {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.page-vehicle-registry .wrap {
  grid-template-rows: minmax(0, 1fr) auto;
}

.page-vehicle-registry .app-main {
  overflow: auto;
}

.page-user-admin .app-main {
  overflow: auto;
}

.page-vehicle-registry .wrap {
  height: auto;
  overflow: visible;
  align-content: start;
  padding-bottom: 24px;
}

.page-user-admin .wrap {
  height: auto;
  overflow: visible;
  align-content: start;
  padding-bottom: 24px;
}

.page-vehicle-registry .page-vehicle-registry-shell {
  min-height: 0;
  overflow: visible;
}

.page-user-admin .page-user-admin-shell,
.page-user-admin .user-admin-main-card,
.page-user-admin .user-admin-rail,
.page-user-admin .page-panel {
  min-height: 0;
  height: auto;
  overflow: visible;
}

.page-vehicle-registry .page-section-head > div:first-child,
.page-vehicle-registry .ops-head > div:first-child,
.page-vehicle-registry .vehicle-item-heading,
.page-vehicle-registry .camera-register-stack,
.page-vehicle-registry .camera-register-map-stack {
  min-width: 0;
}

.page-vehicle-registry .vehicle-registry-workbench {
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.55fr);
  gap: 18px;
  min-height: 0;
  align-items: start;
}

.page-vehicle-registry .vehicle-registry-main-card {
  min-height: clamp(520px, 78vh, 920px);
  height: auto;
  overflow: hidden;
}

.page-vehicle-registry .vehicle-registry-rail,
.page-vehicle-registry .page-info-card,
.page-vehicle-registry .page-accent-card {
  min-height: 0;
  height: auto;
  overflow: visible;
}

.page-vehicle-registry .vehicle-registry-rail-list {
  min-height: 0;
}

.page-vehicle-registry .vehicle-registry-detail {
  min-height: clamp(440px, 62vh, 760px);
  max-height: min(78vh, 880px);
  padding-right: 8px;
  padding-bottom: 4px;
  scrollbar-gutter: stable;
}

.page-vehicle-registry .info-stack {
  height: auto;
  max-height: none;
  overflow: visible;
}

.page-vehicle-registry .page-section-head p,
.page-vehicle-registry .info-item p,
.page-vehicle-registry .vehicle-item-title,
.page-vehicle-registry .vehicle-item-manual-summary,
.page-vehicle-registry .vehicle-item-meta,
.page-vehicle-registry .vehicle-item-detail-value,
.page-vehicle-registry .vehicle-item-notes,
.page-vehicle-registry .vehicle-registry-summary-identifier,
.page-vehicle-registry .vehicle-registry-detail-copy,
.page-vehicle-registry .camera-register-help,
.page-vehicle-registry .camera-register-guide-item p,
.page-vehicle-registry .camera-register-intro p {
  overflow-wrap: anywhere;
}

.page-vehicle-registry .vehicle-item {
  gap: 12px;
}

.page-vehicle-registry .camera-register-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(92dvh, 940px);
}

.page-vehicle-registry .camera-register-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
}

.page-vehicle-registry .camera-register-field textarea {
  min-height: 112px;
  resize: vertical;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-sidebar {
    height: 100dvh;
    overflow: hidden;
  }

  .app-main {
    height: 100%;
  }

  .dashboard-hero-panel,
  .page-hero-strip {
    display: none;
  }

  .wrap {
    padding: 10px;
    gap: 10px;
  }

  .page-dashboard .wrap {
    padding: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.08fr) minmax(0, 0.92fr) auto;
  }

  .page-dashboard .dashboard-block-video,
  .page-dashboard .dashboard-ops-grid {
    grid-column: 1;
  }

  .page-dashboard .camera-selector-panel {
    grid-column: 1;
  }

  .page-dashboard .dashboard-block-video {
    grid-row: 1;
  }

  .page-dashboard .dashboard-ops-grid {
    grid-row: 2;
  }

  .page-dashboard .dashboard-ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
  }

  .page-dashboard .dashboard-ops-grid .ops-card-audio {
    grid-column: 1 / -1;
  }

  .page-dashboard .dashboard-locations-shell {
    grid-column: 1 / -1;
  }

  .page-cameras .wrap {
    grid-template-rows: minmax(0, 1fr) auto;
  }

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

  .page-map .map-workbench,
  .page-events .events-workbench,
  .page-dashboard .dashboard-map-workbench {
    grid-template-columns: 1fr;
  }

  .vehicle-registry-workbench {
    grid-template-columns: 1fr;
  }

  .page-vehicle-registry .wrap {
    height: auto;
    overflow: visible;
    grid-template-rows: auto auto;
  }

  .page-vehicle-registry .page-vehicle-registry-shell,
  .page-vehicle-registry .vehicle-registry-main-card,
  .page-vehicle-registry .vehicle-registry-rail {
    overflow: visible;
  }

  .page-vehicle-registry .vehicle-registry-main-card,
  .page-vehicle-registry .page-info-card,
  .page-vehicle-registry .page-accent-card {
    min-height: 0;
    height: auto;
  }

  .page-vehicle-registry .vehicle-registry-detail {
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .page-vehicle-registry .camera-register-dialog {
    width: min(960px, calc(100vw - 24px));
  }

  .page-vehicle-registry .camera-register-grid {
    grid-template-columns: 1fr;
  }

  .page-map .map-workbench,
  .page-events .events-workbench {
    grid-template-rows: minmax(0, 1fr) minmax(160px, 0.42fr);
  }

  .page-events .event-feed,
  .page-events .logs-detail {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .page-map .wrap {
    height: auto;
    overflow: visible;
    grid-template-rows: auto auto;
  }

  .page-map .page-map-shell {
    overflow: visible;
  }

  .page-map .map-workbench {
    grid-template-rows: auto auto;
    height: auto;
    position: static;
  }

  .page-map .telemetry-rail {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    width: auto;
    padding: 0;
    height: auto;
    overflow: visible;
    pointer-events: auto;
  }

  .page-map .map-main-card,
  .page-map .telemetry-rail,
  .page-map .telemetry-list-card,
  .page-map .telemetry-video-shell,
  .page-map .telemetry-focus-shell {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .page-map .page-map-canvas {
    height: min(62vh, 560px);
    min-height: min(62vh, 560px);
  }

  .page-map .telemetry-summary,
  .page-map .telemetry-focus-card {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .page-map .telemetry-video-stage,
  .page-map .map-workbench[data-video-layout="video"] .telemetry-video-stage {
    height: min(48vh, 360px);
    min-height: 220px;
  }

  .page-map .telemetry-map-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .page-map .telemetry-map-recenter {
    min-width: 0;
  }

  .page-dashboard .dashboard-map-workbench {
    grid-template-rows: minmax(0, 1fr);
  }

  .viewer-audio-dock {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    padding: 12px;
  }

  .viewer-audio-dock .audio-controls {
    grid-template-columns: 1fr;
  }

  .camera-stage {
    min-height: 0;
  }

  .page-feed,
  .page-map-canvas,
  .primary-view .camera-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .subtitle {
    display: none;
  }

  .page-support-grid-cameras {
    grid-template-columns: 1fr;
  }

  .vehicle-item-top {
    flex-direction: column;
  }

  .vehicle-item-badges {
    justify-content: flex-start;
  }

  .vehicle-registry-section-head {
    flex-direction: column;
  }

  .vehicle-registry-section-count {
    align-self: flex-start;
  }

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

  .vehicle-item-manual {
    min-height: 0;
  }

  .page-vehicle-registry .page-section-shell,
  .page-vehicle-registry .vehicle-registry-main-card,
  .page-vehicle-registry .page-info-card,
  .page-vehicle-registry .page-accent-card {
    padding: 14px;
    border-radius: 22px;
  }

  .page-vehicle-registry .page-section-head {
    gap: 12px;
  }

  .page-vehicle-registry .vehicle-registry-detail {
    gap: 12px;
  }

  .page-events .logs-toolbar {
    padding: 12px;
  }

  .page-events .logs-summary-grid {
    grid-template-columns: 1fr;
  }

  .page-events .logs-detail-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-events .logs-detail-meta-row strong {
    text-align: left;
  }

  .page-map .page-section-shell {
    padding: 12px;
    border-radius: 20px;
  }

  .page-map .page-section-head {
    padding: 0;
  }

  .page-map .telemetry-toolbar {
    gap: 12px;
  }

  .page-map .page-section-badge {
    padding: 8px 10px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .page-map .map-main-card,
  .page-map .telemetry-list-card,
  .page-map .telemetry-video-shell,
  .page-map .telemetry-focus-shell {
    padding: 12px;
  }

  .page-map .telemetry-focus-content {
    grid-template-columns: 1fr;
  }

  .page-map .telemetry-list-card,
  .page-map .telemetry-video-shell,
  .page-map .telemetry-focus-shell {
    min-height: 0;
    height: auto;
    backdrop-filter: none;
    box-shadow: none;
  }

  .page-map .ops-head {
    gap: 10px;
  }

  .page-map .telemetry-map-controls {
    gap: 8px;
  }

  .page-map .telemetry-focus-info-grid,
  .page-map .telemetry-focus-stats {
    grid-template-columns: 1fr;
  }

  .page-map .telemetry-map-mode,
  .page-map .telemetry-map-switch,
  .page-map .telemetry-map-recenter,
  .page-map .telemetry-map-swap,
  .page-map .telemetry-map-style-wrap,
  .page-map .telemetry-map-style {
    width: 100%;
    justify-content: center;
  }

  .page-map .telemetry-map-style-wrap {
    min-width: 0;
  }

  .page-map .page-map-canvas {
    height: 360px;
    min-height: 360px;
  }

  .page-map .telemetry-map-filter {
    top: 10px;
    right: 10px;
    width: min(104px, calc(100% - 20px));
    max-width: none;
    padding: 8px 9px 9px;
  }

  .page-map .telemetry-map-overlay-box {
    --telemetry-overlay-width: 200px;
    --telemetry-overlay-height: 120px;
    left: 10px;
    bottom: 10px;
    width: min(var(--telemetry-overlay-width), calc(100% - 20px));
    height: min(var(--telemetry-overlay-height), calc(100% - 20px));
    border-radius: 16px;
  }

  .page-map .telemetry-battery-visual {
    width: 100%;
    justify-content: flex-start;
  }

  .page-map .telemetry-gauge-grid,
  .page-map .telemetry-gauge-values,
  .page-map .telemetry-focus-stats {
    grid-template-columns: 1fr;
  }

  .page-map .telemetry-attitude-dial,
  .page-map .telemetry-heading-dial {
    width: min(100%, 148px);
  }
}

@media (max-height: 900px) {
  .hero-stat,
  .page-hero-card {
    padding: 12px 14px;
  }

  .hero-stat p,
  .page-hero-card p {
    display: none;
  }

  .wrap {
    padding: 12px 14px 14px;
    gap: 12px;
  }
}

@media (max-height: 780px) {
  .dashboard-hero-panel,
  .page-hero-strip {
    display: none;
  }
}

.map-main-card,
.events-main-card,
.vehicle-registry-main-card,
.telemetry-list-card,
.page-accent-card,
.page-info-card {
  grid-template-rows: auto minmax(0, 1fr);
}

.page-cameras .page-support-grid-cameras {
  height: 100%;
}

.page-cameras .page-support-grid-cameras > .ops-card {
  height: 100%;
}

.page-map .telemetry-summary {
  height: auto;
}

.page-vehicle-registry .info-stack,
.page-events .info-stack,
.page-cameras .info-stack {
  height: 100%;
}

.page-login {
  position: relative;
  min-height: 100dvh;
  height: auto;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 14% 16%, rgba(241, 56, 17, 0.22), transparent 22%),
    radial-gradient(circle at 84% 14%, rgba(245, 158, 11, 0.12), transparent 20%),
    radial-gradient(circle at 75% 80%, rgba(255, 255, 255, 0.06), transparent 18%),
    linear-gradient(135deg, #111318 0%, #171a20 38%, #101214 100%);
}

.page-login::before,
.page-login::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(24px);
}

.page-login::before {
  width: 280px;
  height: 280px;
  top: 54px;
  right: 8%;
  border-radius: 999px;
  background: rgba(241, 56, 17, 0.18);
}

.page-login::after {
  width: 220px;
  height: 220px;
  bottom: 54px;
  left: 10%;
  border-radius: 28px;
  background: rgba(245, 158, 11, 0.1);
}

@keyframes login-border-orbit {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(1turn);
  }
}

@keyframes login-border-bloom {
  0%,
  100% {
    opacity: 0.24;
    filter: drop-shadow(0 0 3px rgba(214, 122, 66, 0.05));
  }

  42% {
    opacity: 0.42;
    filter: drop-shadow(0 0 7px rgba(214, 122, 66, 0.1));
  }

  74% {
    opacity: 0.32;
    filter: drop-shadow(0 0 4px rgba(255, 214, 184, 0.06));
  }
}

@keyframes login-border-network-pulse {
  0%,
  100% {
    opacity: 0.28;
    filter: drop-shadow(0 0 2px rgba(214, 122, 66, 0.04));
  }

  50% {
    opacity: 0.4;
    filter: drop-shadow(0 0 4px rgba(255, 220, 193, 0.05));
  }
}

@keyframes login-input-ambient {
  0%,
  100% {
    background-position: 0 0, 130% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 10px 22px rgba(0, 0, 0, 0);
  }

  50% {
    background-position: 0 0, -10% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 12px 24px rgba(214, 122, 66, 0.04);
  }
}

.login-shell {
  position: relative;
  isolation: isolate;
  z-index: 1;
  width: min(1180px, 100%);
  min-height: min(760px, calc(100dvh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(15, 18, 24, 0.96), rgba(10, 12, 17, 0.98));
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 3px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.login-shell::before {
  background:
    linear-gradient(
      180deg,
      rgba(255, 232, 216, 0.16),
      rgba(214, 122, 66, 0.07) 24%,
      rgba(214, 122, 66, 0.05) 72%,
      rgba(255, 229, 208, 0.12)
    );
  opacity: 0.34;
  animation: login-border-network-pulse 5.2s ease-in-out infinite;
}

.login-shell::after {
  background:
    conic-gradient(
      from 180deg,
      rgba(255, 255, 255, 0) 0deg,
      rgba(255, 255, 255, 0) 58deg,
      rgba(255, 232, 216, 0.04) 68deg,
      rgba(214, 122, 66, 0.14) 78deg,
      rgba(232, 145, 91, 0.46) 88deg,
      rgba(255, 230, 214, 0.32) 96deg,
      rgba(214, 122, 66, 0.12) 108deg,
      rgba(255, 255, 255, 0) 124deg,
      rgba(255, 255, 255, 0) 360deg
    );
  opacity: 0.4;
  transform-origin: center;
  animation:
    login-border-orbit 8.8s linear infinite,
    login-border-bloom 4s ease-in-out infinite;
}

.login-hero,
.login-panel {
  min-height: 0;
}

.login-hero {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 42px;
  background:
    radial-gradient(circle at top left, rgba(241, 56, 17, 0.2), transparent 30%),
    linear-gradient(155deg, rgba(25, 29, 37, 0.98), rgba(12, 15, 21, 0.98));
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 46%);
  pointer-events: none;
}

.login-hero-top,
.login-copy,
.login-hero-grid,
.login-hero-band {
  position: relative;
  z-index: 1;
}

.login-hero-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-mark {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(25, 31, 40, 0.98), rgba(12, 16, 22, 0.98));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.login-brand {
  display: grid;
  gap: 4px;
}

.login-brand span,
.login-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
}

.login-brand strong {
  font-size: 1.02rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.02em;
}

.login-brand-logo {
  width: min(150px, 100%);
  height: auto;
  margin-top: 4px;
  display: block;
  object-fit: contain;
}

.login-copy {
  display: grid;
  gap: 14px;
  max-width: 560px;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(2.15rem, 1.7rem + 1.45vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.login-copy p {
  margin: 0;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.65;
}

.login-copy p,
.login-glance-card p,
.login-panel-head p,
.login-alt-card p,
.login-footnote {
  text-align: justify;
  text-align-last: start;
  text-justify: inter-word;
  text-wrap: pretty;
  hyphens: auto;
}

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

.login-glance-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-glance-card span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.login-glance-card strong {
  font-size: 1rem;
  line-height: 1.3;
}

.login-glance-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  line-height: 1.56;
}

.login-hero-band {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-hero-band span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  font-weight: 700;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 42px;
  background:
    linear-gradient(180deg, rgba(17, 19, 25, 0.98), rgba(11, 13, 18, 1));
}

.login-panel-head {
  display: grid;
  gap: 8px;
}

.login-panel-badge {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(24, 29, 37, 0.98), rgba(14, 17, 23, 0.98));
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-panel-badge img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.login-panel-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 1.5rem + 0.6vw, 2.2rem);
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.04em;
}

.login-panel-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.login-mobile-brand,
.login-panel-copy-mobile,
.login-mobile-pills,
.login-checkbox-copy-mobile,
.login-link-mobile {
  display: none;
}

.login-mobile-brand {
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-mobile-brand-logo {
  width: min(160px, 100%);
  height: auto;
  display: block;
  object-fit: contain;
}

.login-mobile-pills {
  gap: 8px;
  flex-wrap: wrap;
}

.login-mobile-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(241, 56, 17, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 233, 222, 0.84);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-field {
  position: relative;
  display: grid;
  gap: 8px;
}

.login-password-wrap {
  position: relative;
  display: grid;
}

.login-password-wrap input {
  padding-right: 60px;
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(241, 56, 17, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.08), rgba(255, 255, 255, 0.03));
  color: rgba(255, 234, 223, 0.84);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  color: rgba(255, 247, 242, 0.98);
  border-color: rgba(241, 56, 17, 0.34);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login-password-toggle:focus-visible {
  outline: 2px solid rgba(241, 56, 17, 0.34);
  outline-offset: 2px;
}

.login-password-toggle-icon {
  width: 18px;
  height: 18px;
}

.login-password-toggle-icon-open {
  display: none;
}

.login-password-toggle[data-state="visible"] .login-password-toggle-icon-open {
  display: block;
}

.login-password-toggle[data-state="visible"] {
  color: rgba(255, 247, 242, 0.98);
  border-color: rgba(241, 56, 17, 0.38);
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.22), rgba(255, 255, 255, 0.05));
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(241, 56, 17, 0.08);
}

.login-password-toggle[data-state="visible"] .login-password-toggle-icon-closed {
  display: none;
}

.login-field > span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
  transition: color 0.22s ease, transform 0.22s ease;
}

.login-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.035)),
    linear-gradient(
      120deg,
      rgba(214, 122, 66, 0.08),
      rgba(255, 255, 255, 0.018) 32%,
      rgba(214, 122, 66, 0.06) 58%,
      rgba(255, 255, 255, 0.018) 82%,
      rgba(214, 122, 66, 0.08)
    );
  background-size: 100% 100%, 220% 100%;
  background-position: 0 0, 130% 50%;
  color: var(--brand-white);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.18s ease,
    box-shadow 0.24s ease,
    background 0.24s ease,
    transform 0.24s ease;
  animation: login-input-ambient 7.2s ease-in-out infinite;
}

.login-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.login-field:hover > span,
.login-field:focus-within > span {
  color: rgba(255, 240, 231, 0.94);
  transform: translateX(1px);
}

.login-field:hover input {
  border-color: rgba(214, 122, 66, 0.26);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 26px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(214, 122, 66, 0.04);
}

.login-field input:focus {
  outline: none;
  border-color: rgba(214, 122, 66, 0.58);
  background:
    linear-gradient(180deg, rgba(214, 122, 66, 0.08), rgba(255, 255, 255, 0.035)),
    linear-gradient(
      120deg,
      rgba(255, 237, 225, 0.18),
      rgba(214, 122, 66, 0.08) 35%,
      rgba(255, 255, 255, 0.03) 68%,
      rgba(214, 122, 66, 0.14)
    );
  background-size: 100% 100%, 210% 100%;
  background-position: 0 0, 48% 50%;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 4px rgba(214, 122, 66, 0.1),
    0 16px 34px rgba(0, 0, 0, 0.16),
    0 0 24px rgba(214, 122, 66, 0.08);
}

.login-form-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.login-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
}

.login-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(241, 56, 17, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #ffc180;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.login-link:hover,
.login-link:focus-visible {
  color: #ffe0ba;
}

.login-feedback {
  min-height: 1.4em;
  margin: -4px 2px 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  line-height: 1.45;
}

.login-feedback[data-state="pending"] {
  color: rgba(255, 193, 128, 0.92);
}

.login-feedback[data-state="success"] {
  color: rgba(132, 255, 182, 0.92);
}

.login-feedback[data-state="error"] {
  color: rgba(255, 143, 143, 0.94);
}

.login-submit {
  min-height: 56px;
  border: 1px solid rgba(241, 56, 17, 0.46);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(241, 56, 17, 0.22), rgba(241, 56, 17, 0.1));
  color: var(--brand-white);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-submit:hover,
.login-submit:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(241, 56, 17, 0.74);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
}

.login-submit:disabled {
  cursor: wait;
  transform: none;
  opacity: 0.78;
  box-shadow: none;
}

.login-divider {
  position: relative;
  text-align: center;
}

.login-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.login-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 12px;
  background: rgba(12, 14, 19, 0.96);
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.login-alt-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.login-alt-card strong {
  font-size: 0.95rem;
}

.login-alt-card p,
.login-footnote {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.84rem;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .login-shell::before,
  .login-shell::after {
    animation: none;
    filter: none;
  }

  .login-shell::before {
    opacity: 0.62;
  }

  .login-shell::after {
    opacity: 0.36;
  }

  .login-field > span,
  .login-field input {
    animation: none;
    transform: none;
  }
}

@media (max-width: 900px) {
  .page-login {
    padding: 18px;
  }

  .login-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-hero,
  .login-panel {
    padding: 28px;
  }

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

@media (max-width: 640px) {
  .page-login {
    padding: 12px;
  }

  .page-login::before,
  .page-login::after {
    display: none;
  }

  .login-shell {
    border-radius: 24px;
  }

  .login-hero,
  .login-panel {
    padding: 20px;
  }

  .login-copy h1 {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
  }

  .login-brand-logo {
    width: min(180px, 100%);
  }

  .login-form-row,
  .login-alt-grid {
    grid-template-columns: 1fr;
  }

  .login-form-row {
    display: grid;
    align-items: stretch;
  }
}

/* =========================
   LOGIN RESPONSIVE SOLO MÓVIL
   Pegar al final del CSS
   ========================= */

@media (max-width: 900px) {
  .page-login {
    padding: 10px;
    align-items: start;
  }

  .login-shell {
    width: 100%;
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .login-hero,
  .login-panel {
    padding: 20px 18px;
  }

  .login-hero {
    gap: 18px;
  }

  .login-hero::before {
    inset: 14px;
    border-radius: 18px;
  }

  .login-copy {
    gap: 10px;
  }

  .login-copy h1 {
    font-size: clamp(1.45rem, 4.8vw, 2rem);
    line-height: 1.08;
  }

  .login-copy p,
  .login-panel-head p,
  .login-alt-card p,
  .login-footnote {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .login-hero-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .login-glance-card {
    padding: 14px;
    border-radius: 16px;
    gap: 6px;
  }

  .login-hero-band {
    gap: 8px;
  }

  .login-hero-band span {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .login-panel {
    gap: 16px;
    align-content: start;
  }

  .login-panel-head {
    gap: 6px;
  }

  .login-panel-head h2 {
    font-size: 1.4rem;
    margin: 0;
  }

  .login-panel-badge {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .login-panel-badge img {
    width: 30px;
    height: 30px;
  }

  .login-form {
    gap: 14px;
  }

  .login-field {
    gap: 6px;
  }

  .login-field > span {
    font-size: 0.82rem;
  }

  .login-field input {
    min-height: 50px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 16px; /* evita zoom raro en iPhone */
  }

  .login-form-row {
    gap: 10px;
  }

  .login-submit {
    min-height: 50px;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  .login-divider {
    margin: 2px 0;
  }

  .login-alt-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .login-alt-card {
    padding: 14px;
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .page-login {
    padding: 0;
    min-height: 100dvh;
    background:
      radial-gradient(circle at 18% 14%, rgba(241, 56, 17, 0.24), transparent 22%),
      radial-gradient(circle at 82% 12%, rgba(255, 173, 132, 0.12), transparent 18%),
      radial-gradient(circle at 50% 100%, rgba(241, 56, 17, 0.1), transparent 28%),
      linear-gradient(180deg, #090b11 0%, #11141b 42%, #090b10 100%);
  }

  .page-login::before,
  .page-login::after {
    display: block;
    pointer-events: none;
    z-index: 0;
    filter: blur(42px);
    opacity: 0.9;
  }

  .page-login::before {
    width: 210px;
    height: 210px;
    top: 7%;
    right: -72px;
    background: rgba(241, 56, 17, 0.26);
    border-radius: 999px;
  }

  .page-login::after {
    width: 180px;
    height: 180px;
    bottom: 8%;
    left: -56px;
    background: rgba(255, 189, 156, 0.16);
    border-radius: 34px;
  }

  .login-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(18px, 5.4vw, 28px) 14px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .login-shell::before,
  .login-shell::after {
    display: none;
  }

  /* En celular deja el formulario como protagonista */
  .login-hero {
    display: none;
  }

  .login-panel {
    position: relative;
    isolation: isolate;
    justify-items: center;
    width: min(100%, 404px);
    min-height: auto;
    justify-content: center;
    align-content: center;
    padding: 30px 18px 22px;
    gap: 20px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
      linear-gradient(180deg, rgba(17, 20, 27, 0.96), rgba(8, 10, 16, 0.98));
    box-shadow:
      0 30px 80px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(241, 56, 17, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
  }

  .login-panel::before,
  .login-panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }

  .login-panel::before {
    inset: 0;
    z-index: 0;
    background:
      radial-gradient(circle at 12% 10%, rgba(241, 56, 17, 0.18), transparent 24%),
      radial-gradient(circle at 86% 0%, rgba(255, 215, 194, 0.08), transparent 24%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 34%),
      repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.018) 0 1px,
        rgba(255, 255, 255, 0) 1px 16px
      );
    opacity: 0.92;
  }

  .login-panel::after {
    inset: 14px;
    z-index: 0;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 0 46px rgba(241, 56, 17, 0.08);
  }

  .login-panel-head {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 352px;
    justify-items: center;
    text-align: center;
    gap: 14px;
  }

  .login-panel-head h2 {
    font-size: clamp(1.92rem, 8vw, 2.42rem);
    line-height: 1;
    letter-spacing: -0.06em;
    text-shadow: 0 10px 24px rgba(241, 56, 17, 0.14);
  }

  .login-panel-head > p:not(.login-panel-copy-mobile) {
    display: none;
  }

  .login-panel-head h2,
  .login-panel-copy-mobile {
    display: none;
  }

  .login-mobile-brand {
    justify-content: center;
    width: 100%;
    margin-inline: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .login-mobile-brand-logo {
    width: min(196px, 62vw);
  }

  .login-panel-badge {
    display: none;
  }

  .login-panel-copy-mobile {
    display: none;
    margin: 0 auto;
    max-width: 28ch;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.94rem;
    line-height: 1.48;
  }

  .login-mobile-pills {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    justify-content: center;
    gap: 10px;
  }

  .login-mobile-pills span {
    min-height: 34px;
    padding: 0 13px;
    border-color: rgba(241, 56, 17, 0.24);
    background: rgba(241, 56, 17, 0.08);
  }

  .login-form {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 348px;
    justify-self: center;
    justify-items: stretch;
    gap: 18px;
    padding: 20px 18px 18px;
    margin-inline: auto;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.02));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 18px 30px rgba(0, 0, 0, 0.12);
  }

  .login-field {
    width: 100%;
    justify-items: stretch;
    text-align: left;
    gap: 8px;
  }

  .login-field > span {
    font-size: 0.8rem;
    text-align: left;
  }

  .login-field input {
    width: 100%;
    min-height: 58px;
    border-radius: 20px;
    padding: 0 18px;
    border-color: rgba(241, 56, 17, 0.18);
    text-align: left;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.032)),
      linear-gradient(
        120deg,
        rgba(241, 56, 17, 0.12),
        rgba(255, 255, 255, 0.022) 30%,
        rgba(241, 56, 17, 0.08) 68%,
        rgba(255, 255, 255, 0.022)
      );
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 12px 26px rgba(0, 0, 0, 0.12);
  }

  .login-password-wrap input {
    padding-right: 62px;
  }

  .login-password-toggle {
    right: 8px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .login-form-row {
    display: grid;
    justify-items: center;
    gap: 12px;
    width: 100%;
    text-align: center;
  }

  .login-checkbox {
    justify-content: center;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.76);
  }

  .login-checkbox-copy-desktop {
    display: none;
  }

  .login-checkbox-copy-mobile {
    display: inline;
  }

  .login-link {
    font-size: 0.8rem;
  }

  .login-link-desktop {
    display: none;
  }

  .login-link-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(241, 56, 17, 0.24);
    background: rgba(241, 56, 17, 0.1);
    color: #ffd0ba;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .login-feedback {
    min-height: 1.3em;
    font-size: 0.82rem;
    margin-top: 2px;
    width: 100%;
    text-align: center;
  }

  .login-submit {
    width: 100%;
    justify-self: center;
    min-height: 58px;
    border-radius: 20px;
    font-size: 1rem;
    letter-spacing: 0.04em;
    background:
      linear-gradient(180deg, rgba(255, 112, 72, 1), rgba(241, 56, 17, 0.98) 38%, rgba(171, 28, 6, 0.94));
    border-color: rgba(255, 177, 145, 0.34);
    box-shadow:
      0 22px 40px rgba(0, 0, 0, 0.26),
      0 0 34px rgba(241, 56, 17, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .login-submit:hover,
  .login-submit:focus-visible {
    transform: translateY(-2px);
    box-shadow:
      0 26px 44px rgba(0, 0, 0, 0.3),
      0 0 40px rgba(241, 56, 17, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .login-divider,
  .login-alt-grid,
  .login-footnote {
    display: none;
  }

  .login-divider span {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .login-shell {
    padding: 18px 12px;
  }

  .login-panel {
    width: min(100%, 388px);
    padding: 24px 14px 18px;
    border-radius: 24px;
  }

  .login-panel-head,
  .login-form {
    max-width: 100%;
  }

  .login-form {
    width: 100%;
    max-width: 312px;
    padding: 18px 14px 16px;
  }

  .login-panel::after {
    inset: 10px;
    border-radius: 18px;
  }

  .login-panel-head h2 {
    font-size: clamp(1.72rem, 8vw, 2rem);
  }

  .login-field input {
    min-height: 52px;
    border-radius: 18px;
    width: 100%;
  }

  .login-password-wrap input {
    padding-right: 56px;
  }

  .login-password-toggle {
    width: 38px;
    height: 38px;
    right: 7px;
  }

  .login-submit {
    min-height: 52px;
    border-radius: 18px;
    width: 100%;
  }
}

@media (max-width: 900px) {
  :root {
    --app-zoom-scale: 1;
  }

  .app-shell.is-sidebar-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-main {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wrap,
  .page-dashboard .wrap,
  .page-map .wrap,
  .page-events .wrap,
  .page-vehicle-registry .wrap,
  .page-user-admin .wrap,
  .page-cameras .wrap {
    height: auto;
    min-height: 0;
    overflow: visible;
    align-content: start;
    gap: 12px;
    padding: 12px 12px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .top,
  .top-page,
  .page-dashboard .top-dashboard,
  .page-map .top-page-map,
  .page-events .top-page-events {
    align-items: flex-start;
    gap: 10px;
  }

  .heading,
  .camera-page-actions,
  .page-section-head > div,
  .dashboard-block-head > div {
    min-width: 0;
  }

  .camera-page-actions {
    width: 100%;
    justify-content: stretch;
  }

  .camera-register-open,
  .page-vehicle-registry #vehicle-register-open,
  .page-user-admin #user-admin-refresh {
    width: 100%;
    justify-content: center;
  }

  .dashboard-block,
  .page-section-shell,
  .camera-selector-panel,
  .camera-side-card,
  .ops-card,
  .vehicle-registry-section,
  .info-item {
    padding: 14px;
    border-radius: 20px;
  }

  .page-section-head,
  .dashboard-block-head,
  .page-map .ops-head,
  .page-events .logs-toolbar,
  .page-map .telemetry-map-controls,
  .vehicle-item-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .page-dashboard .wrap {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .page-dashboard .dashboard-block-video {
    overflow: visible;
  }

  .page-dashboard .dashboard-mobile-panel-switcher {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 74px);
    z-index: 16;
    display: grid;
  }

  .page-dashboard .dashboard-block-video .camera-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-dashboard .dashboard-ops-grid {
    order: 1;
    grid-template-columns: 1fr;
    grid-row: auto;
  }

  .page-dashboard .camera-selector-panel {
    order: 2;
    grid-column: auto;
    position: static;
  }

  .page-dashboard .dashboard-camera-preview-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-dashboard .dashboard-camera-preview-close {
    width: 100%;
    justify-content: center;
  }

  .page-dashboard .telemetry-sync-shell .telemetry-map-stage,
  .page-dashboard .telemetry-sync-shell .page-map-canvas,
  .page-dashboard .telemetry-sync-shell .map-canvas {
    min-height: 320px;
    height: auto;
  }

  .page-dashboard .telemetry-sync-shell .telemetry-map-stage {
    display: grid;
    gap: 10px;
  }

  .page-dashboard .telemetry-sync-shell .telemetry-map-filter {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .page-dashboard .telemetry-sync-shell .telemetry-focus-card,
  .page-dashboard .telemetry-sync-shell .telemetry-summary {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .page-dashboard[data-dashboard-mobile-view="map"] .camera-selector-panel {
    display: none;
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-ops-grid {
    display: none;
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-camera-preview-stage {
    display: grid;
    align-content: start;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-camera-preview-stage.has-multiple {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scroll-snap-type: y proximity;
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-block-video,
  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-block-video .camera-stage,
  .page-dashboard[data-dashboard-mobile-view="cameras"] .camera-selector-panel,
  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-camera-preview {
    min-height: min(68dvh, 640px);
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-camera-preview {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-camera-preview-stage .camera-card {
    width: 100%;
    height: min(56dvh, 460px);
    min-height: min(56dvh, 460px);
    max-height: min(56dvh, 460px);
    aspect-ratio: auto;
    scroll-snap-align: start;
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-camera-preview-stage .camera-meta {
    display: none !important;
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-camera-preview-stage .camera-card::after {
    display: none;
  }

  .page-dashboard[data-dashboard-mobile-view="map"] .telemetry-sync-shell .page-map-canvas,
  .page-dashboard[data-dashboard-mobile-view="map"] .telemetry-sync-shell .map-canvas {
    min-height: 360px;
    height: min(58dvh, 500px);
  }

  .page-dashboard[data-dashboard-mobile-view="map"] .telemetry-sync-shell .telemetry-map-stage {
    min-height: min(58dvh, 500px);
  }

  .page-cameras .camera-stage {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
    align-items: start;
  }

  .page-cameras .camera-selector-panel {
    position: static;
    order: 2;
    overflow: visible;
  }

  .page-cameras .camera-side-panel {
    order: 3;
  }

  .page-cameras .face-preview-shell {
    max-height: none;
  }

  .page-cameras .face-preview-grid {
    max-height: min(42dvh, 360px);
  }

  .page-cameras .camera-switcher {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: min(32dvh, 280px);
    padding-bottom: 0;
  }

  .page-cameras .page-section-shell,
  .page-cameras .viewer-shell,
  .page-cameras .primary-view {
    overflow: visible;
  }

  .page-cameras .viewer-shell {
    order: 1;
    height: auto;
    min-height: min(60dvh, 520px);
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  .page-cameras .camera-inference-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-cameras .camera-inference-field {
    align-items: stretch;
    flex-direction: column;
  }

  .page-cameras .camera-inference-field select {
    width: 100%;
  }

  .page-cameras .camera-inference-active {
    margin-left: 0;
    white-space: normal;
    text-align: left;
  }

  .page-cameras .primary-view {
    display: grid;
    align-content: stretch;
    height: auto;
    min-height: min(56dvh, 460px);
  }

  .page-cameras .primary-view .camera-card {
    width: 100%;
    height: min(56dvh, 460px);
    min-height: min(56dvh, 460px);
    max-height: min(56dvh, 460px);
    aspect-ratio: auto;
  }

  .page-cameras .primary-view .camera-meta {
    display: none !important;
  }

  .page-cameras .primary-view .camera-card::after {
    display: none;
  }

  .page-map .page-map-shell,
  .page-events .page-events-shell {
    overflow: visible;
  }

  .page-map .map-workbench,
  .page-events .events-workbench,
  .page-vehicle-registry .vehicle-registry-workbench,
  .page-user-admin .user-admin-workbench {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
  }

  .page-map .telemetry-map-controls,
  .page-map .telemetry-map-mode,
  .page-map .telemetry-map-style-wrap,
  .page-map .telemetry-map-style,
  .page-map .telemetry-map-recenter {
    width: 100%;
  }

  .page-map .telemetry-map-stage {
    display: grid;
    gap: 10px;
  }

  .page-map .telemetry-map-filter {
    position: static;
    width: 100%;
    max-width: none;
  }

  .page-map .page-map-canvas,
  .page-map .map-canvas {
    min-height: 320px;
    height: min(54dvh, 440px);
  }

  .page-map .telemetry-summary,
  .page-map .telemetry-focus-card,
  .page-events .event-feed,
  .page-events .logs-detail,
  .page-vehicle-registry .vehicle-registry-detail {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .page-events .logs-mode-switch,
  .page-events .logs-filter,
  .page-events .logs-filter select {
    width: 100%;
  }

  .page-events .logs-mode-switch {
    overflow: auto;
    padding-bottom: 2px;
  }

  .page-vehicle-registry .page-section-head,
  .page-user-admin .page-section-head {
    grid-template-columns: 1fr;
  }

  .page-vehicle-registry .vehicle-registry-main-card,
  .page-vehicle-registry .vehicle-registry-rail,
  .page-user-admin .user-admin-main-card,
  .page-user-admin .user-admin-rail,
  .page-user-admin .page-panel {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .page-user-admin .user-admin-form-grid,
  .page-user-admin .camera-admin-conditional-grid {
    grid-template-columns: 1fr;
  }

  .app-shell.is-sidebar-collapsed .app-sidebar {
    grid-template-rows: auto 1fr auto;
    gap: 14px;
    padding:
      calc(env(safe-area-inset-top, 0px) + 18px)
      12px
      calc(env(safe-area-inset-bottom, 0px) + 16px);
  }

  .app-shell.is-sidebar-collapsed .sidebar-header {
    justify-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-header-bar {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-brand-row {
    justify-content: flex-start;
    gap: 12px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    font-size: 1rem;
  }

  .app-shell.is-sidebar-collapsed .sidebar-brand-copy {
    display: grid;
    max-width: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .app-shell.is-sidebar-collapsed .sidebar-nav-head,
  .app-shell.is-sidebar-collapsed .sidebar-footer,
  .app-shell.is-sidebar-collapsed .sidebar-brand-meta {
    max-height: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .app-shell.is-sidebar-collapsed .sidebar-nav {
    width: 100%;
    align-content: start;
    justify-items: stretch;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-shell.is-sidebar-collapsed .sidebar-link,
  .app-shell.is-sidebar-collapsed .sidebar-link-logout {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 48px;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 12px 11px 10px;
    border-radius: 16px;
    transform: none;
    overflow: hidden;
    isolation: auto;
  }

  .app-shell.is-sidebar-collapsed .sidebar-link:hover,
  .app-shell.is-sidebar-collapsed .sidebar-link:focus-visible,
  .app-shell.is-sidebar-collapsed .sidebar-link-logout:hover,
  .app-shell.is-sidebar-collapsed .sidebar-link-logout:focus-visible {
    transform: translateX(2px);
    z-index: auto;
  }

  .app-shell.is-sidebar-collapsed .sidebar-link::before {
    display: block;
  }

  .app-shell.is-sidebar-collapsed .sidebar-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-link-copy {
    display: grid;
    max-width: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .app-shell.is-sidebar-collapsed .sidebar-link-tooltip {
    display: none;
  }

  .app-shell.is-sidebar-collapsed .sidebar-toggle {
    left: 14px;
    right: auto;
  }
}

@media (max-width: 640px) {
  .app-shell {
    --mobile-sidebar-width: min(340px, calc(100vw - 18px));
  }

  .top,
  .top-page,
  .page-dashboard .top-dashboard,
  .page-map .top-page-map,
  .page-events .top-page-events {
    padding-right: 12px;
    padding-left: 72px;
  }

  .title {
    font-size: clamp(1rem, 6vw, 1.3rem);
  }

  .eyebrow,
  .page-hero-kicker,
  .hero-stat-kicker,
  .dashboard-camera-preview-kicker,
  .vehicle-registry-section-kicker {
    letter-spacing: 0.1em;
  }

  .dashboard-block,
  .page-section-shell,
  .camera-selector-panel,
  .camera-side-card,
  .ops-card {
    padding: 12px;
    border-radius: 18px;
  }

  .plate-preview-list,
  .plate-preview-inline {
    grid-template-columns: 1fr;
  }

  .plate-preview-list {
    max-height: min(28dvh, 220px);
  }

  .plate-preview-copy {
    width: 100%;
    justify-content: center;
  }

  .page-dashboard .telemetry-sync-shell .telemetry-map-stage,
  .page-dashboard .telemetry-sync-shell .page-map-canvas,
  .page-dashboard .telemetry-sync-shell .map-canvas,
  .page-map .page-map-canvas,
  .page-map .map-canvas {
    min-height: 280px;
    height: min(48dvh, 380px);
  }

  .page-dashboard .telemetry-sync-shell .telemetry-map-overlay-box,
  .page-map .telemetry-map-overlay-box {
    --telemetry-overlay-width: 190px;
    --telemetry-overlay-height: 112px;
  }

  .page-dashboard .dashboard-camera-preview-stage .camera-card {
    min-height: 160px;
  }

  .page-dashboard .dashboard-mobile-panel-switcher {
    top: calc(env(safe-area-inset-top, 0px) + 68px);
    padding: 5px;
    border-radius: 16px;
  }

  .page-dashboard .dashboard-mobile-panel-button {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 0.8rem;
  }

  .page-dashboard[data-dashboard-mobile-view="cameras"] .dashboard-camera-preview-stage .camera-card {
    height: min(52dvh, 400px);
    min-height: min(52dvh, 400px);
    max-height: min(52dvh, 400px);
  }

  .page-cameras .viewer-shell {
    min-height: min(56dvh, 440px);
  }

  .page-cameras .primary-view {
    min-height: min(52dvh, 400px);
  }

  .page-cameras .primary-view .camera-card {
    height: min(52dvh, 400px);
    min-height: min(52dvh, 400px);
    max-height: min(52dvh, 400px);
  }

  .vehicle-registry-section,
  .vehicle-item,
  .user-admin-rail,
  .page-user-admin .page-panel {
    border-radius: 18px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    --mobile-sidebar-width: min(360px, calc(100vw - 18px));
  }

  .app-sidebar,
  .app-shell.is-sidebar-collapsed .app-sidebar {
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding:
      calc(env(safe-area-inset-top, 0px) + 18px)
      14px
      calc(env(safe-area-inset-bottom, 0px) + 16px);
    border-radius: 0 22px 22px 0;
    overflow: hidden;
  }

  .app-shell.is-sidebar-mobile-open .app-sidebar {
    left: 0;
  }

  .sidebar-header,
  .app-shell.is-sidebar-collapsed .sidebar-header {
    justify-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
  }

  .sidebar-header-bar,
  .app-shell.is-sidebar-collapsed .sidebar-header-bar {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .sidebar-brand-row,
  .app-shell.is-sidebar-collapsed .sidebar-brand-row {
    min-width: 0;
    justify-content: flex-start;
    gap: 10px;
  }

  .sidebar-logo,
  .app-shell.is-sidebar-collapsed .sidebar-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 0.86rem;
  }

  .sidebar-brand-copy,
  .app-shell.is-sidebar-collapsed .sidebar-brand-copy,
  .sidebar-brand-meta,
  .app-shell.is-sidebar-collapsed .sidebar-brand-meta,
  .sidebar-nav-head,
  .app-shell.is-sidebar-collapsed .sidebar-nav-head,
  .sidebar-footer,
  .app-shell.is-sidebar-collapsed .sidebar-footer {
    max-width: none;
    max-height: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .sidebar-brand-copy strong {
    font-size: 0.8rem;
  }

  .sidebar-brand-copy span,
  .sidebar-brand-note {
    font-size: 0.7rem;
  }

  .sidebar-nav,
  .app-shell.is-sidebar-collapsed .sidebar-nav {
    width: 100%;
    min-height: 0;
    align-content: start;
    justify-items: stretch;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
  }

  .sidebar-link,
  .sidebar-link-logout,
  .app-shell.is-sidebar-collapsed .sidebar-link,
  .app-shell.is-sidebar-collapsed .sidebar-link-logout {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 52px;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px 10px 10px;
    border-radius: 15px;
    transform: none;
    overflow: hidden;
    isolation: auto;
  }

  .sidebar-link::before,
  .app-shell.is-sidebar-collapsed .sidebar-link::before {
    display: block;
  }

  .sidebar-icon,
  .app-shell.is-sidebar-collapsed .sidebar-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.15rem;
  }

  .sidebar-link-copy,
  .app-shell.is-sidebar-collapsed .sidebar-link-copy {
    display: grid;
    min-width: 0;
    max-width: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .sidebar-link-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .sidebar-link-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .sidebar-footer {
    display: none;
  }

  .sidebar-link-tooltip,
  .app-shell.is-sidebar-collapsed .sidebar-link-tooltip {
    display: none;
  }

  .sidebar-toggle,
  .app-shell.is-sidebar-collapsed .sidebar-toggle {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    left: 14px;
    right: auto;
    width: 46px;
    height: 46px;
    z-index: 730;
    border-radius: 16px;
  }

  .app-shell.is-sidebar-mobile-open .sidebar-toggle {
    left: min(calc(var(--mobile-sidebar-width) - 23px), calc(100vw - 58px));
  }
}

@media (max-width: 380px) {
  .app-shell {
    --mobile-sidebar-width: min(330px, calc(100vw - 14px));
  }

  .sidebar-link-copy span,
  .sidebar-footer-copy,
  .sidebar-brand-note {
    display: none;
  }

  .sidebar-link,
  .sidebar-link-logout,
  .app-shell.is-sidebar-collapsed .sidebar-link,
  .app-shell.is-sidebar-collapsed .sidebar-link-logout {
    min-height: 50px;
  }
}

@media (max-width: 900px) {
  .theme-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 16px);
    right: 12px;
    width: 58px;
    height: 32px;
    z-index: 71;
  }

  .theme-toggle-thumb {
    width: 22px;
    height: 22px;
  }

  body[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(26px);
  }

  body.is-sidebar-mobile-open .theme-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
  }

  .top,
  .top-page,
  .page-dashboard .top-dashboard,
  .page-map .top-page-map,
  .page-events .top-page-events {
    padding-right: 84px;
  }

  .leaflet-top {
    margin-top: 6px;
  }

  .leaflet-left {
    margin-left: 6px;
  }

  .leaflet-right {
    margin-right: 6px;
  }

  .leaflet-bottom {
    margin-bottom: 6px;
  }

  .page-map .leaflet-top,
  .page-dashboard .leaflet-top {
    margin-top: 12px;
  }

  .page-map .telemetry-map-overlay-box,
  .page-dashboard .telemetry-sync-shell .telemetry-map-overlay-box {
    z-index: 320;
  }
}

@media (max-width: 640px) {
  .theme-toggle {
    right: 10px;
    width: 54px;
    height: 30px;
  }

  .theme-toggle-thumb {
    width: 20px;
    height: 20px;
  }

  body[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(24px);
  }

  .top,
  .top-page,
  .page-dashboard .top-dashboard,
  .page-map .top-page-map,
  .page-events .top-page-events {
    padding-right: 74px;
  }

  .page-map .leaflet-top,
  .page-dashboard .leaflet-top {
    margin-top: 14px;
  }
}

@media (max-width: 900px) {
  .dashboard-block-head h2,
  .page-section-head h2,
  .user-admin-rail-head h3 {
    font-size: clamp(1.04rem, 4.5vw, 1.3rem);
    line-height: 1.14;
  }

  .dashboard-block-head p,
  .page-section-head p,
  .vehicle-registry-section-head p,
  .user-admin-rail-head p,
  .camera-register-help,
  .camera-register-map-head span,
  .event-meta,
  .event-detail,
  .empty-state,
  .telemetry-detail,
  .telemetry-battery-copy p,
  .telemetry-focus-meta,
  .telemetry-focus-note,
  .logs-detail-copy,
  .vehicle-registry-summary-identifier,
  .vehicle-registry-summary-time,
  .vehicle-item-meta,
  .vehicle-item-time {
    font-size: 0.92rem;
    line-height: 1.56;
  }

  .dashboard-camera-preview-name,
  .camera-pill-title,
  .page-dashboard .dashboard-camera-preview-stage .camera-name,
  .telemetry-focus-name,
  .logs-detail-title,
  .vehicle-registry-summary-top strong,
  .vehicle-item-title,
  .vehicle-item-detail-value {
    font-size: 1rem;
    line-height: 1.34;
  }

  .logs-summary-card strong,
  .telemetry-battery-copy strong {
    font-size: 1.06rem;
  }

  .telemetry-focus-stat strong {
    font-size: 0.98rem;
  }

  .page-dashboard .dashboard-camera-preview-stage .camera-state,
  .camera-pill-status,
  .telemetry-focus-kicker,
  .telemetry-battery-kicker,
  .telemetry-focus-stat span,
  .logs-filter span,
  .logs-summary-card span,
  .logs-detail-kicker,
  .vehicle-item-detail-label,
  .vehicle-registry-section-kicker,
  .dashboard-camera-preview-kicker {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
  }

  .camera-pill-topline,
  .event-topline,
  .vehicle-registry-summary-top,
  .telemetry-title,
  .location-row-head,
  .telemetry-focus-top {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .dashboard-camera-preview-empty,
  .logs-detail-empty,
  .vehicle-registry-section-empty {
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .camera-pill-status,
  .telemetry-focus-meta,
  .telemetry-detail,
  .telemetry-focus-note,
  .dashboard-camera-preview-empty,
  .logs-detail-copy,
  .logs-detail-meta-row strong,
  .event-meta,
  .event-detail,
  .vehicle-registry-summary-identifier,
  .vehicle-item-meta,
  .vehicle-item-detail-value,
  .camera-register-help,
  .user-admin-rail-head p {
    overflow-wrap: anywhere;
  }

  .telemetry-row-state,
  .vehicle-registry-summary-pill,
  .vehicle-item-manual-summary,
  .vehicle-item-badge {
    white-space: normal;
    text-align: center;
  }

  .logs-detail-meta-row {
    align-items: flex-start;
  }

  .logs-detail-meta-row strong {
    text-align: left;
  }

  .page-map .telemetry-map-filter,
  .page-dashboard .telemetry-sync-shell .telemetry-map-filter {
    width: min(168px, calc(100% - 20px));
    max-width: min(168px, calc(100% - 20px));
    padding: 10px 11px 11px;
  }

  .page-map .telemetry-map-filter label,
  .page-dashboard .telemetry-sync-shell .telemetry-map-filter label {
    margin-bottom: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    line-height: 1.3;
  }

  .page-map .telemetry-map-filter select,
  .page-dashboard .telemetry-sync-shell .telemetry-map-filter select {
    min-height: 40px;
    font-size: 0.92rem;
  }
}

@media (max-width: 640px) {
  .dashboard-block-head p,
  .page-section-head p,
  .vehicle-registry-section-head p,
  .user-admin-rail-head p,
  .camera-register-help,
  .camera-register-map-head span,
  .event-meta,
  .event-detail,
  .empty-state,
  .telemetry-detail,
  .telemetry-battery-copy p,
  .telemetry-focus-meta,
  .telemetry-focus-note,
  .logs-detail-copy,
  .vehicle-registry-summary-identifier,
  .vehicle-registry-summary-time,
  .vehicle-item-meta,
  .vehicle-item-time {
    font-size: 0.9rem;
    line-height: 1.54;
  }

  .dashboard-camera-preview-name,
  .camera-pill-title,
  .telemetry-focus-name,
  .logs-detail-title,
  .vehicle-registry-summary-top strong,
  .vehicle-item-title,
  .vehicle-item-detail-value {
    font-size: 0.98rem;
  }

  .page-dashboard .dashboard-camera-preview-stage .camera-meta {
    padding: 10px;
  }

  .page-dashboard .dashboard-camera-preview-stage .camera-badges {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 52px);
  }

  .page-map .telemetry-map-filter,
  .page-dashboard .telemetry-sync-shell .telemetry-map-filter {
    width: min(164px, calc(100% - 20px));
    max-width: min(164px, calc(100% - 20px));
  }

  .page-map .telemetry-focus-top {
    gap: 8px;
  }

  .page-map .telemetry-focus-stats {
    gap: 7px;
  }

  .logs-mode-pill,
  .camera-register-open,
  .page-vehicle-registry #vehicle-register-open,
  .page-user-admin #user-admin-refresh {
    min-height: 44px;
  }
}

.opensky-aircraft-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transform-origin: center center;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
}

.osint-map-icon {
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
  padding: 3px;
}

.osint-map-icon img,
.leaflet-marker-icon.osint-map-icon {
  object-fit: contain;
}

.osint-map-fallback-icon {
  background: transparent;
  border: 0;
}

.osint-map-fallback-icon span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  color: #fff;
  background: var(--osint-icon-color, #ef4444);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}


/* ═══════════════════════════════════════════════════════════════════
   GESTIÓN DE DISPOSITIVOS  ·  page-device-mgmt
   ═══════════════════════════════════════════════════════════════════ */

.page-device-mgmt {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.11), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(241, 56, 17, 0.07), transparent 18%),
    linear-gradient(180deg, #252525 0%, #181818 44%, #111111 100%);
}

.page-device-mgmt .app-main {
  background: transparent;
}

.page-device-mgmt .wrap {
  padding: 20px 24px 36px;
}

/* ── Shell ─────────────────────────────────────────────────────────── */

.devmgmt-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.devmgmt-section-head p {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 4px 0 0;
}

/* ── Toolbar ───────────────────────────────────────────────────────── */

.devmgmt-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.devmgmt-filter-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.devmgmt-filter-pill {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  padding: 7px 16px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.devmgmt-filter-pill:hover,
.devmgmt-filter-pill:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.22);
}

.devmgmt-filter-pill.is-active {
  background: rgba(241, 56, 17, 0.2);
  border-color: rgba(241, 56, 17, 0.52);
  color: #fff;
}

.devmgmt-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 7px 16px;
  margin-left: auto;
  min-width: 240px;
  max-width: 340px;
  transition: border-color 0.16s;
}

.devmgmt-search-wrap:focus-within {
  border-color: rgba(241, 56, 17, 0.45);
}

.devmgmt-search-icon {
  color: rgba(255, 255, 255, 0.38);
  font-size: 1rem;
  flex-shrink: 0;
}

.devmgmt-search-input {
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  width: 100%;
  outline: none;
}

.devmgmt-search-input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

/* ── Grid ──────────────────────────────────────────────────────────── */

.devmgmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

/* ── Empty state ───────────────────────────────────────────────────── */

.devmgmt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 72px 24px;
  color: rgba(255, 255, 255, 0.32);
  text-align: center;
}

.devmgmt-empty-icon { font-size: 2.2rem; }
.devmgmt-empty p    { font-size: 0.92rem; margin: 0; }

/* ── Card ──────────────────────────────────────────────────────────── */

.devmgmt-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.92), rgba(20, 20, 20, 0.96));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  padding: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.devmgmt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Card header */
.devmgmt-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.devmgmt-card-icon-wrap {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.devmgmt-card-icon--camera  { color: rgba(96, 165, 250, 0.9); }
.devmgmt-card-icon--drone   { color: rgba(52, 211, 153, 0.9); }
.devmgmt-card-icon--vehicle { color: rgba(251, 191, 36, 0.9); }

.devmgmt-type-icon {
  width: 20px;
  height: 20px;
}

.devmgmt-card-title-block {
  flex: 1;
  min-width: 0;
}

.devmgmt-card-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.devmgmt-card-meta {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.44);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.devmgmt-card-code {
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 1px 5px;
}

.devmgmt-status-led {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding-top: 2px;
}

.devmgmt-status-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Badges */
.devmgmt-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.devmgmt-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.devmgmt-badge--ok    { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.28); color: rgba(52, 211, 153, 0.95); }
.devmgmt-badge--off   { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.38); }
.devmgmt-badge--live  { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.28); color: rgba(52, 211, 153, 0.95); }
.devmgmt-badge--idle  { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.38); }
.devmgmt-badge--infer { background: rgba(96, 165, 250, 0.1); border-color: rgba(96, 165, 250, 0.25); color: rgba(96, 165, 250, 0.9); }
.devmgmt-badge--none  { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.3); }

/* Card footer */
.devmgmt-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  gap: 8px;
}

.devmgmt-card-notif-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.devmgmt-notif-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.devmgmt-notif-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: opacity 0.16s;
}

.devmgmt-notif-chip.is-enabled {
  background: rgba(241, 56, 17, 0.12);
  border-color: rgba(241, 56, 17, 0.28);
  color: rgba(255, 180, 160, 0.95);
}

.devmgmt-notif-chip.is-disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.24);
}

.devmgmt-org-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.28);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.devmgmt-cfg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 7px 14px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.devmgmt-cfg-btn:hover,
.devmgmt-cfg-btn:focus-visible {
  background: rgba(241, 56, 17, 0.16);
  border-color: rgba(241, 56, 17, 0.38);
  color: #fff;
}

.devmgmt-cfg-icon {
  width: 15px;
  height: 15px;
}

/* ── Modal ─────────────────────────────────────────────────────────── */

.devmgmt-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
}

.devmgmt-modal[hidden] { display: none; }

.devmgmt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(3px);
}

.devmgmt-dialog {
  position: relative;
  z-index: 1;
  width: min(660px, calc(100vw - 32px));
  max-height: min(92dvh, 820px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-height: 0;
  background: linear-gradient(180deg, rgba(32, 32, 32, 0.98), rgba(20, 20, 20, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 36px 88px rgba(0, 0, 0, 0.54);
}

.devmgmt-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: sticky;
  top: 0;
  background: rgba(30, 30, 30, 0.97);
  backdrop-filter: blur(4px);
  border-radius: 24px 24px 0 0;
  z-index: 1;
}

.devmgmt-dialog-head .ops-eyebrow {
  font-size: 0.7rem;
  margin-bottom: 3px;
}

.devmgmt-dialog-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.devmgmt-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 18px 24px 28px;
}

/* Modal config sections */
.devmgmt-cfg-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.devmgmt-cfg-section:last-child { border-bottom: none; }

.devmgmt-cfg-section .ops-eyebrow {
  font-size: 0.67rem;
  margin-bottom: 2px;
}

.devmgmt-cfg-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.84rem;
}

.devmgmt-cfg-label {
  color: rgba(255, 255, 255, 0.46);
  font-weight: 500;
  flex-shrink: 0;
}

.devmgmt-cfg-value {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.devmgmt-cfg-mono {
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 3px 8px;
  color: rgba(200, 220, 255, 0.85);
}

.devmgmt-cfg-note {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 8px 12px;
}

.devmgmt-cfg-note strong { color: rgba(255, 255, 255, 0.6); }

/* URL row */
.devmgmt-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.devmgmt-url-row {
  flex-wrap: wrap;
  gap: 8px;
}

.devmgmt-url-code {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  white-space: normal;
  font-size: 0.75rem;
  padding: 6px 10px;
  line-height: 1.4;
}

/* Copy button */
.devmgmt-copy-btn {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: rgba(150, 200, 255, 0.9);
  border-radius: 8px;
  padding: 5px 12px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.devmgmt-copy-btn:hover,
.devmgmt-copy-btn:focus-visible {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.4);
}

.devmgmt-copy-btn.is-copied {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: rgba(52, 211, 153, 0.9);
}

/* Inference select */
.devmgmt-select {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.devmgmt-select:focus {
  border-color: rgba(241, 56, 17, 0.45);
}

.devmgmt-select option {
  background: #1a1a1a;
  color: #fff;
}

/* Save button */
.devmgmt-save-btn {
  background: rgba(241, 56, 17, 0.15);
  border: 1px solid rgba(241, 56, 17, 0.35);
  color: rgba(255, 200, 190, 0.95);
  border-radius: 10px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.devmgmt-save-btn:hover,
.devmgmt-save-btn:focus-visible {
  background: rgba(241, 56, 17, 0.24);
  border-color: rgba(241, 56, 17, 0.52);
  color: #fff;
}

.devmgmt-save-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Save status feedback */
.devmgmt-save-status {
  font-size: 0.76rem;
  min-height: 1rem;
  color: rgba(255, 255, 255, 0.46);
}

.devmgmt-save-status.is-ok    { color: rgba(52, 211, 153, 0.9); }
.devmgmt-save-status.is-error { color: rgba(248, 113, 113, 0.9); }

/* Toggle switches */
.devmgmt-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  cursor: pointer;
}

.devmgmt-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.76);
  user-select: none;
}

.devmgmt-toggle-label .devmgmt-notif-icon {
  color: rgba(255, 255, 255, 0.5);
}

.devmgmt-toggle {
  position: relative;
  flex-shrink: 0;
}

.devmgmt-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.devmgmt-toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}

.devmgmt-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s, background 0.2s;
}

.devmgmt-toggle input:checked + .devmgmt-toggle-track {
  background: rgba(241, 56, 17, 0.75);
  border-color: rgba(241, 56, 17, 0.6);
}

.devmgmt-toggle input:checked + .devmgmt-toggle-track::after {
  transform: translateX(20px);
  background: #fff;
}

.devmgmt-toggle input:focus-visible + .devmgmt-toggle-track {
  outline: 2px solid rgba(241, 56, 17, 0.7);
  outline-offset: 2px;
}

/* ── Light theme ───────────────────────────────────────────────────── */

body[data-theme="light"] .page-device-mgmt {
  background: #f3f4f6;
}

body[data-theme="light"] .devmgmt-card {
  background: linear-gradient(180deg, #fff, #f9f9fb);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

body[data-theme="light"] .devmgmt-card:hover {
  border-color: rgba(0, 0, 0, 0.14);
}

body[data-theme="light"] .devmgmt-card-name  { color: rgba(0, 0, 0, 0.85); }
body[data-theme="light"] .devmgmt-card-meta,
body[data-theme="light"] .devmgmt-status-label { color: rgba(0, 0, 0, 0.44); }

body[data-theme="light"] .devmgmt-filter-pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.54);
}

body[data-theme="light"] .devmgmt-filter-pill.is-active {
  background: rgba(241, 56, 17, 0.1);
  border-color: rgba(241, 56, 17, 0.38);
  color: #c0300e;
}

body[data-theme="light"] .devmgmt-search-wrap {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .devmgmt-search-input { color: rgba(0, 0, 0, 0.8); }

body[data-theme="light"] .devmgmt-dialog {
  background: linear-gradient(180deg, #fff, #f8f8fa);
  border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .devmgmt-dialog-head {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(0, 0, 0, 0.07);
}

body[data-theme="light"] .devmgmt-dialog-head h2 { color: rgba(0, 0, 0, 0.85); }
body[data-theme="light"] .devmgmt-cfg-label      { color: rgba(0, 0, 0, 0.45); }
body[data-theme="light"] .devmgmt-cfg-value      { color: rgba(0, 0, 0, 0.8); }
body[data-theme="light"] .devmgmt-cfg-note       { color: rgba(0, 0, 0, 0.45); background: rgba(0, 0, 0, 0.03); }
body[data-theme="light"] .devmgmt-card-icon-wrap { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.08); }
body[data-theme="light"] .devmgmt-cfg-btn        { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.6); }
body[data-theme="light"] .devmgmt-cfg-btn:hover  { background: rgba(241, 56, 17, 0.08); border-color: rgba(241, 56, 17, 0.3); color: #c0300e; }
body[data-theme="light"] .devmgmt-org-label      { color: rgba(0, 0, 0, 0.3); }
body[data-theme="light"] .devmgmt-section-head p { color: rgba(0, 0, 0, 0.46); }
body[data-theme="light"] .devmgmt-select         { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.14); color: rgba(0, 0, 0, 0.85); }
body[data-theme="light"] .devmgmt-toggle-track   { background: rgba(0, 0, 0, 0.12); border-color: rgba(0, 0, 0, 0.1); }
body[data-theme="light"] .devmgmt-toggle-track::after { background: rgba(0, 0, 0, 0.4); }
body[data-theme="light"] .devmgmt-toggle-label   { color: rgba(0, 0, 0, 0.76); }

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .devmgmt-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (max-width: 900px) {
  .devmgmt-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .devmgmt-search-wrap {
    min-width: 180px;
    max-width: 220px;
  }
}

@media (max-width: 600px) {
  .devmgmt-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .devmgmt-search-wrap {
    min-width: 100%;
    max-width: 100%;
  }

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

  .devmgmt-dialog {
    width: calc(100vw - 16px);
    max-height: 95dvh;
  }
}

/* ─── Reportes y estadísticas ────────────────────────────────────────────── */
.page-reports .wrap {
  height: auto;
  min-height: 0;
  overflow: visible;
  align-content: start;
  gap: 14px;
}

.reports-shell {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.reports-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.reports-global-controls,
.reports-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.reports-global-controls {
  justify-content: flex-end;
}

.reports-field {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.reports-field-camera {
  min-width: min(280px, 100%);
}

.reports-field-small {
  min-width: 92px;
}

.reports-field-id {
  min-width: 180px;
}

.reports-field span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reports-field input,
.reports-field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #e5edf8;
  font: 700 0.86rem/1.2 Manrope, system-ui, sans-serif;
  padding: 8px 10px;
  outline: none;
}

.reports-field input:focus,
.reports-field select:focus {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.reports-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: #dff7ff;
  cursor: pointer;
  font: 800 0.84rem/1 Manrope, system-ui, sans-serif;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
}

.reports-action:hover,
.reports-action:focus-visible {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.62);
}

.reports-action:disabled,
.reports-action[aria-disabled="true"] {
  opacity: 0.48;
  pointer-events: none;
}

.reports-action-secondary {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
}

.reports-action-secondary:hover,
.reports-action-secondary:focus-visible {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.52);
}

.reports-tabs,
.reports-subtabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.reports-tab,
.reports-subtab {
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.46);
  color: rgba(226, 232, 240, 0.78);
  cursor: pointer;
  font: 800 0.84rem/1 Manrope, system-ui, sans-serif;
  padding: 0 14px;
  white-space: nowrap;
}

.reports-tab.is-active,
.reports-subtab.is-active {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.16);
  color: #fff7ed;
}

.reports-panel,
.reports-view {
  display: none;
}

.reports-panel.is-active,
.reports-view.is-active {
  display: grid;
  gap: 14px;
}

.reports-result-count {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.82rem;
  font-weight: 800;
}

.reports-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.26);
}

.reports-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  color: #e2e8f0;
  font-size: 0.82rem;
}

.reports-table th,
.reports-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  text-align: left;
  vertical-align: top;
}

.reports-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111827;
  color: rgba(203, 213, 225, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.reports-table td {
  line-height: 1.35;
}

.reports-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08);
}

.reports-table tbody tr[data-report-person-id],
.reports-table tbody tr[data-report-work-date] {
  cursor: pointer;
}

.reports-table strong {
  color: #f8fafc;
  font-weight: 900;
}

.reports-plate {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a !important;
  font-family: "Space Grotesk", Manrope, system-ui, sans-serif;
  letter-spacing: 0.04em;
  padding: 2px 8px;
}

.reports-empty,
.reports-table-error {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.88rem;
  font-weight: 700;
}

.reports-empty {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.reports-table-error {
  color: #fecaca !important;
}

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

.reports-nested-panel {
  display: grid;
  gap: 10px;
}

.reports-panel-title {
  color: rgba(226, 232, 240, 0.76);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-theme="light"] .reports-field span,
body[data-theme="light"] .reports-result-count,
body[data-theme="light"] .reports-panel-title,
body[data-theme="light"] .reports-empty {
  color: rgba(30, 41, 59, 0.72);
}

body[data-theme="light"] .reports-field input,
body[data-theme="light"] .reports-field select,
body[data-theme="light"] .reports-tab,
body[data-theme="light"] .reports-subtab {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(148, 163, 184, 0.34);
  color: #0f172a;
}

body[data-theme="light"] .reports-table-wrap {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="light"] .reports-table {
  color: #1e293b;
}

body[data-theme="light"] .reports-table th {
  background: #f8fafc;
  color: rgba(30, 41, 59, 0.72);
}

body[data-theme="light"] .reports-table td {
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="light"] .reports-table strong {
  color: #0f172a;
}

@media (max-width: 900px) {
  .page-reports .wrap {
    padding: 12px 12px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .reports-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .reports-global-controls,
  .reports-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
  }

  .reports-field,
  .reports-field-camera,
  .reports-field-small,
  .reports-field-id {
    min-width: 0;
  }

  .reports-action,
  .reports-result-count {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .reports-shell {
    padding: 12px;
  }

  .reports-global-controls,
  .reports-toolbar {
    grid-template-columns: 1fr;
  }

  .reports-table {
    min-width: 720px;
  }
}

/* ─── Panel de km recorridos ─────────────────────────────────────────────── */
.vehicle-km-panel {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
}
.vehicle-km-panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}
.vehicle-km-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}
.vehicle-km-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: #94a3b8;
}
.vehicle-km-label input[type="date"] {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: inherit;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
}
.vehicle-km-load {
  padding: 0.35rem 0.85rem;
  background: #3b82f6;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-end;
}
.vehicle-km-load:hover { background: #2563eb; }
.vehicle-km-export {
  padding: 0.35rem 0.85rem;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 6px;
  color: #22c55e;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-end;
}
.vehicle-km-export:hover { background: rgba(34,197,94,0.25); }
.vehicle-km-loading, .vehicle-km-empty, .vehicle-km-error {
  font-size: 0.8rem;
  color: #94a3b8;
  padding: 0.5rem 0;
}
.vehicle-km-error { color: #f87171; }
.vehicle-km-summary-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}
.vehicle-km-kpi {
  font-size: 0.82rem;
  color: #94a3b8;
}
.vehicle-km-kpi strong {
  font-size: 1.1rem;
  color: #e2e8f0;
}
.vehicle-km-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.vehicle-km-table th {
  text-align: left;
  padding: 0.3rem 0.5rem;
  color: #64748b;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}
.vehicle-km-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}
.km-row-active td:nth-child(2) { color: #22c55e; }
.km-row-empty { opacity: 0.45; }
.km-ign-on  { color: #22c55e; font-size: 0.72rem; margin-right: 0.25rem; }
.km-ign-off { color: #f59e0b; font-size: 0.72rem; }

/* ── Route toggle button ─────────────────────────────────── */
.route-toggle-bar {
  margin: 0.6rem 0 0.25rem;
}
.route-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(99,179,237,0.35);
  background: rgba(99,179,237,0.08);
  color: #90cdf4;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.route-toggle-btn::before {
  content: "○";
  font-size: 0.7rem;
}
.route-toggle-btn.is-active {
  background: rgba(59,130,246,0.22);
  border-color: rgba(59,130,246,0.6);
  color: #93c5fd;
}
.route-toggle-btn.is-active::before {
  content: "●";
  color: #3b82f6;
}
.route-toggle-btn:hover {
  background: rgba(59,130,246,0.3);
  border-color: rgba(59,130,246,0.75);
  color: #bfdbfe;
}

/* ── Fleet km open button ────────────────────────────────────────────────── */
.fleet-km-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(99,179,237,0.4);
  background: rgba(99,179,237,0.1);
  color: #90cdf4;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.fleet-km-open-btn:hover { background: rgba(99,179,237,0.22); border-color: rgba(99,179,237,0.65); }

/* ── Fleet km modal ──────────────────────────────────────────────────────── */
.fleet-km-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
.fleet-km-modal[hidden] { display: none; }
.fleet-km-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
}
.fleet-km-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  background: #1a202c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 4rem);
}
.fleet-km-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.fleet-km-dialog-head h2 {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
}
.fleet-km-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
}
.fleet-km-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.fleet-km-dialog-body {
  padding: 1.25rem 1.5rem 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
}
.fleet-km-controls {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.fleet-km-kpi-row { margin-bottom: 0.9rem; flex-wrap: wrap; gap: 1rem; }
.fleet-km-table-wrap { overflow-x: auto; }
.fleet-km-table { width: 100%; min-width: 480px; }
.fleet-km-table tfoot tr td { border-top: 2px solid rgba(255,255,255,0.15); font-weight: 700; color: #93c5fd; }
.fleet-km-total-row td { padding-top: 0.5rem; }
.vehicle-km-export-fleet {
  display: inline-flex;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(74,222,128,0.4);
  background: rgba(74,222,128,0.08);
  color: #86efac;
  cursor: pointer;
}
.vehicle-km-export-fleet:hover { background: rgba(74,222,128,0.18); }
