/* FILE: vuelos-ajustes.css */
.profile-trigger {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  max-width: 280px;
}

.profile-trigger .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10,132,255,.25);
  font-weight: 700;
  flex-shrink: 0;
}

.profile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-text > * {
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-text small {
  display: block;
  font-size: 10px;
  color: var(--tenue);
}

.mod-tabla th { white-space: nowrap; }
.mod-tabla td { overflow-wrap: normal; word-break: normal; }
.mod-tabla td a { overflow-wrap: anywhere; }
.panel .panel-content { overflow-x: auto; }

.vv-kv { grid-template-columns: minmax(96px, 38%) 1fr; }

.vv-mapa-barra {
  right: 56px;
  flex-wrap: wrap;
}

.vv-mapa-barra span.mod-tenue { font-size: 11px; }

.vv-estado-grande { padding: 0; }
.vv-estado-grande > span:first-child {
  font-size: 22px;
  font-weight: 700;
  color: var(--tinta);
  letter-spacing: -.3px;
}

.page-heading .mod-etiqueta {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
}

.mod-acciones a,
.vv-filtros a { text-decoration: none; }
a:has(> button) { text-decoration: none; }

@media (max-width: 759.98px) {
  .profile-text { display: none; }
}

.vv-offline-banner { position: sticky; top: 0; z-index: 50; padding: 8px 16px; font-size: 0.875rem; text-align: center; color: #fff; }
.vv-offline-banner--off { background: #7c2d12; }
.vv-offline-banner--sync { background: #0a84ff; }

.vv-aviso { padding: 10px 16px; margin: 0 0 16px; border-radius: 10px; font-weight: 600; }
.vv-aviso--error { background: rgba(251, 113, 133, 0.16); border: 1px solid #fb7185; color: #fecdd3; }

/* === Fondo de montañas y ruta (DroneFly) === */
/* Aísla las capas sobre el fondo existente y bajo el contenido. */
body {
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background: url('/img/fondo-dronefly.svg') center bottom / cover no-repeat;
}

/* Viñeta suave; deja libre la ruta inferior derecha. */
body::after {
  background:
    linear-gradient(to bottom, rgba(2, 18, 46, 0.18), transparent 65%),
    linear-gradient(to right, rgba(2, 18, 46, 0.18), transparent 70%);
}

@media (max-width: 760px) {
  body::before {
    background-position: center bottom;
    background-size: auto 70vh;
  }
}

/* Mejora la legibilidad sin modificar los colores. */
@supports ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  .auth-pantalla .auth-tarjeta {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

@media print {
  body::before,
  body::after {
    display: none;
  }
}

/* El login traía un fondo opaco y una cuadrícula decorativa que tapaban el fondo de montañas */
.auth-pantalla { background: transparent; }
.auth-pantalla::before, .auth-pantalla::after { display: none; }

/* === Paleta DroneFly (Grok) con contrastes corregidos: botón #2563EB (5.2:1) y bordes de control #64748B (3:1+) === */
:root {
  --fondo: #0B1220;
  --superficie: #151E2E;
  --nav: #090F1C;
  --texto: #F8FAFC;
  --tinta: #F8FAFC;
  --tenue: #94A3B8;

  /* Blanco sobre botones con contraste suficiente. */
  --acento: #2563EB;
  --acento-texto: #60A5FA;
  --acento-secundario: #3B82F6;
  --acento-cian: #22D3EE;

  --ok: #10B981;
  --critica: #F87171;
  --relevante: #F59E0B;
  --anomalia: #F59E0B;
  --glow: 0 8px 28px rgba(37,99,235,.18);

  /* Vidrio y bordes decorativos sin cambios. */
  --panel: rgba(255,255,255,.045);
  --vidrio: rgba(255,255,255,.045);
  --borde: rgba(120,160,255,.14);
  --vidrio-borde: rgba(120,160,255,.14);

  --borde-control: #64748B;
}

/* Bordes de controles con contraste suficiente. */
input, select, textarea {
  border-color: var(--borde-control);
}

.mod-btn-secundario {
  border-color: var(--borde-control);
}

:focus-visible {
  outline: 2px solid var(--acento-cian);
  outline-offset: 2px;
}

/* === Símbolo DroneFly en la marca de la barra lateral y del login === */
.brand-symbol { background: #2563EB; border-color: rgba(248, 250, 252, .22); box-shadow: 0 6px 24px rgba(37, 99, 235, .25); }
.brand-symbol img { display: block; }
.auth-marca::before { content: ""; display: block; width: 48px; height: 48px; margin-bottom: 14px; background: url('/icons/simbolo-blanco.svg') center / contain no-repeat; }
