/* =========================================================================
   Sistema de diseño de la OPERADORA (PWA) — independiente del de las apps
   nativas (familia/conductor). Panel de operaciones: tema oscuro refinado,
   alto contraste, layout que aprovecha el escritorio y sigue usable en móvil.

   Regla de oro: NO se cambian nombres de clase/id — app.js depende de ellos.
   Aquí solo se redefine su apariencia.
   ========================================================================= */

:root {
  --bg: #0b1120;
  --bg-elev: #0e1626;
  --surface: #131c2e;
  --surface-2: #0e1626;
  --surface-3: #1a2740;
  --borde: #23304a;
  --borde-fuerte: #2e3e5c;

  --texto: #e6ecf5;
  --texto-suave: #94a3b8;
  --texto-tenue: #64748b;

  --azul: #3b82f6;
  --azul-fuerte: #2563eb;
  --azul-tenue: rgba(59, 130, 246, 0.14);
  --ambar: #f59e0b;
  --exito: #10b981;
  --exito-tenue: rgba(16, 185, 129, 0.14);
  --peligro: #ef4444;
  --peligro-tenue: rgba(239, 68, 68, 0.14);
  --adv: #f59e0b;
  --adv-tenue: rgba(245, 158, 11, 0.14);

  --radio: 14px;
  --radio-sm: 10px;
  --sombra: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

/* --- Accesibilidad: foco de teclado visible ---
   Un anillo claro y consistente en cualquier elemento interactivo enfocado por teclado
   (:focus-visible no se dispara al hacer clic con el mouse, así que no molesta a ese uso).
   Imprescindible para navegar el panel sin mouse. */
:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  border-radius: 4px;
}
/* Contraste extra del anillo sobre los botones de acción (fondo azul). */
button.accion:focus-visible { outline-color: #fff; outline-offset: 3px; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(59, 130, 246, 0.08), transparent 60%),
    var(--bg);
  color: var(--texto);
  line-height: 1.45;
  min-height: 100vh;
}

/* --- Encabezado / app bar --- */
header {
  padding: 0.85rem 1.25rem;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--borde);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
header::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--azul), var(--azul-fuerte));
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  position: relative;
  flex: none;
  /* icono de bus dibujado con máscara CSS para no depender de assets */
  -webkit-mask: no-repeat center / 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4 16c0 .88.39 1.67 1 2.22V20a1 1 0 001 1h1a1 1 0 001-1v-1h8v1a1 1 0 001 1h1a1 1 0 001-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm9 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zM18 11H6V6h12v5z'/%3E%3C/svg%3E");
  mask: no-repeat center / 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4 16c0 .88.39 1.67 1 2.22V20a1 1 0 001 1h1a1 1 0 001-1v-1h8v1a1 1 0 001 1h1a1 1 0 001-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm9 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zM18 11H6V6h12v5z'/%3E%3C/svg%3E");
  -webkit-mask-composite: source-over;
}
/* el degradado ya es el fondo; la máscara recorta un ícono claro dentro */
header h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
header .aviso {
  font-size: 0.68rem;
  color: var(--ambar);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: auto;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: var(--adv-tenue);
  border-radius: 999px;
  margin-top: 0;
}

/* --- Layout: móvil angosto; escritorio en cuadrícula --- */
main {
  padding: 1.25rem;
  max-width: 520px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  main { max-width: 1240px; padding: 1.5rem 2rem; }
  /* La app autenticada se vuelve un tablero de tarjetas.
     app.js fija `display` en línea (block/none) para mostrar u ocultar la vista;
     por eso el grid necesita !important, y `:not([style*="none"])` evita forzar
     su aparición cuando app.js la oculta (pantalla de login). */
  #pantallaApp:not([style*="none"]) {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.1rem;
    align-items: start;
  }
  /* Barra de sesión y alertas ocupan todo el ancho. */
  #pantallaApp > .barra-sesion,
  #pantallaApp > #tarjetaSOS,
  #pantallaApp > #tarjetaPush,
  #pantallaApp > #avisoSinRuta { grid-column: 1 / -1; }
  /* La tarjeta operativa (mucho contenido) ocupa 2 columnas si hay espacio. */
  #tarjetaOperativa { grid-column: span 2; }
  #pantallaApp > .tarjeta { margin-bottom: 0; }
}

/* --- Tarjetas --- */
.tarjeta {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--surface);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.15rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--sombra);
}
.tarjeta h2 {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--borde);
}
.tarjeta h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--texto-suave);
  margin: 1.4rem 0 0.6rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.estado-linea {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(35, 48, 74, 0.5);
}
.estado-linea:last-of-type { border-bottom: 0; }
.estado-linea span:first-child { color: var(--texto-suave); }
.estado-linea span:last-child { font-weight: 600; text-align: right; }

#mapaRecorrido {
  height: 280px;
  border-radius: var(--radio-sm);
  margin-top: 0.85rem;
  overflow: hidden;
  display: none;
  border: 1px solid var(--borde);
}

/* --- Badges / píldoras de estado --- */
.badge {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid transparent;
}
.badge.conectado { background: var(--exito-tenue); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
.badge.desconectado { background: var(--peligro-tenue); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.badge.advertencia { background: var(--adv-tenue); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }

/* --- Selector de rol (si aplica) --- */
.rol-selector { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.rol-selector button {
  flex: 1;
  padding: 0.6rem;
  border-radius: var(--radio-sm);
  border: 1px solid var(--borde);
  background: var(--surface-2);
  color: var(--texto);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}
.rol-selector button.activo { background: var(--azul); border-color: var(--azul); color: #fff; }

/* --- Botones de acción --- */
button.accion {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radio-sm);
  border: none;
  background: linear-gradient(180deg, var(--azul), var(--azul-fuerte));
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.6rem;
  transition: filter 0.15s ease, transform 0.05s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
button.accion:hover { filter: brightness(1.08); }
button.accion:active { transform: translateY(1px); }
button.accion:disabled {
  background: var(--surface-3);
  cursor: not-allowed;
  color: var(--texto-tenue);
  box-shadow: none;
}
button.accion.peligro {
  background: linear-gradient(180deg, #f05252, #dc2626);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

/* SOS — deliberadamente el elemento más grande y llamativo */
button.boton-sos {
  font-size: 1.2rem;
  padding: 1.05rem;
  letter-spacing: 0.03em;
  margin-top: 0.4rem;
}

.tarjeta-sos {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25), 0 10px 30px rgba(239, 68, 68, 0.12);
  animation: pulso-sos 2s ease-in-out infinite;
}
.tarjeta-sos h2 { color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
@keyframes pulso-sos {
  0%, 100% { box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25), 0 10px 30px rgba(239, 68, 68, 0.1); }
  50% { box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5), 0 10px 34px rgba(239, 68, 68, 0.22); }
}

/* --- Chat --- */
.mensajes-lista {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 0.85rem;
  padding-right: 0.2rem;
}
.mensaje {
  padding: 0.6rem 0.8rem;
  border-radius: 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--borde);
  font-size: 0.9rem;
}
.mensaje small { display: block; color: var(--texto-tenue); margin-top: 0.2rem; font-size: 0.72rem; }

.predefinidos { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.5rem; }
.predefinidos button, .predefinidos a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--borde-fuerte);
  background: var(--azul-tenue);
  color: #bfdbfe;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s ease;
}
.predefinidos button:hover, .predefinidos a:hover {
  border-color: var(--azul);
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
}

/* --- Avisos --- */
.aviso-bloqueo {
  background: var(--peligro-tenue);
  color: #fecaca;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radio-sm);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.aviso-bloqueo.exito {
  background: var(--exito-tenue);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.3);
}

/* --- Acceso y sesión --- */
#pantallaLogin { max-width: 420px; margin: 3rem auto 0; }

.tarjeta form { display: flex; flex-direction: column; gap: 0.3rem; }
.tarjeta form label {
  font-size: 0.74rem;
  color: var(--texto-suave);
  margin-top: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tarjeta form input, .tarjeta form select {
  padding: 0.7rem 0.8rem;
  border-radius: var(--radio-sm);
  border: 1px solid var(--borde-fuerte);
  background: var(--surface-2);
  color: var(--texto);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tarjeta form input::placeholder { color: var(--texto-tenue); }
.tarjeta form input:focus, .tarjeta form select:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px var(--azul-tenue);
}

.barra-sesion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--texto);
  background: var(--surface);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 0.75rem 1rem;
  box-shadow: var(--sombra);
}
#infoSesion { font-weight: 600; }
button.enlace {
  background: none;
  border: 1px solid var(--borde-fuerte);
  color: #93c5fd;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition: all 0.15s ease;
}
button.enlace:hover { border-color: var(--azul); background: var(--azul-tenue); }

/* --- Listas (usuarios, alertas, reportes, etc.) --- */
.lista-usuarios { display: flex; flex-direction: column; gap: 0.5rem; }
.usuario-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radio-sm);
  background: var(--surface-2);
  border: 1px solid var(--borde);
  flex-wrap: wrap;
  transition: border-color 0.15s ease;
}
.usuario-fila:hover { border-color: var(--borde-fuerte); }
.usuario-fila small { color: var(--texto-tenue); display: block; font-size: 0.78rem; }
.usuario-acciones { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.usuario-acciones button {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radio-sm);
  border: 1px solid var(--borde-fuerte);
  background: var(--surface-3);
  color: var(--texto);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.usuario-acciones button:hover { border-color: var(--azul); }

.texto-secundario { color: var(--texto-suave); font-size: 0.88rem; margin: 0.2rem 0; }

/* --- Modo demo / detalles plegables --- */
.detalle-demo { margin-top: 0.85rem; }
.detalle-demo summary {
  cursor: pointer;
  color: var(--texto-suave);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  list-style: none;
}
.detalle-demo summary::-webkit-details-marker { display: none; }
.detalle-demo summary::before { content: "▸ "; color: var(--texto-tenue); }
.detalle-demo[open] summary::before { content: "▾ "; }
.detalle-demo button { margin-top: 0.4rem; }

/* --- Edición en línea (administración operativa) --- */
.fila-edicion { flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.campos-edicion { display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 1; min-width: 220px; }
.campos-edicion input, .campos-edicion select {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--borde-fuerte);
  background: var(--surface-2);
  color: var(--texto);
  font-size: 0.85rem;
  max-width: 150px;
}
.campos-edicion input:focus, .campos-edicion select:focus {
  outline: none;
  border-color: var(--azul);
}
.fila-parada { padding-left: 1.25rem; opacity: 0.92; border-left: 2px solid var(--borde-fuerte); }

/* --- Scrollbar sutil (WebKit) --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--borde-fuerte); }

/* =========================================================================
   Panel de operadora: pestañas admin, mapa de flota, subsecciones, modal y
   gráficos ligeros. Todo namespaced para no chocar con el resto de la PWA
   (familia/conductor siguen viendo el flujo plano de siempre).
   ========================================================================= */

/* --- Pestañas de administración (dentro de #tarjetaOperativa) --- */
.tabs-bar {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: -0.2rem 0 1.1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--borde);
}
.tabs-bar button {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--borde-fuerte);
  background: var(--surface-2);
  color: var(--texto-suave);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex; align-items: center; gap: 0.4rem;
}
.tabs-bar button:hover { border-color: var(--azul); color: var(--texto); }
.tabs-bar button.activo {
  background: var(--azul); border-color: var(--azul); color: #fff;
}
.tabs-bar button .punto-alerta {
  width: 7px; height: 7px; border-radius: 999px; background: var(--peligro);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}
.tab-panel { display: none; }
.tab-panel.activo { display: block; }

.subseccion { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px dashed var(--borde); }
.subseccion:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.subseccion > h3:first-child { margin-top: 0; }

/* --- Mapa de flota --- */
#mapaFlota {
  height: 300px; border-radius: var(--radio-sm); margin: 0.6rem 0 0.85rem;
  overflow: hidden; display: none; border: 1px solid var(--borde);
}
.leyenda-flota { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; font-size: 0.78rem; color: var(--texto-suave); }
.leyenda-flota span { display: inline-flex; align-items: center; gap: 0.3rem; }
.punto-leyenda { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }

/* --- Gráficos ligeros (analítica): barras con div, sin dependencias --- */
.grafico-barras { display: flex; flex-direction: column; gap: 0.55rem; margin: 0.3rem 0 0.9rem; }
.barra-h-fila { display: flex; align-items: center; gap: 0.65rem; }
.barra-h-etiqueta {
  flex: 0 0 152px; font-size: 0.82rem; color: var(--texto); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.barra-h-pista { flex: 1; height: 11px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.barra-h-relleno { height: 100%; border-radius: 999px; transition: width 0.5s ease; }
.barra-h-relleno.tono-exito { background: var(--exito); }
.barra-h-relleno.tono-peligro { background: var(--peligro); }
.barra-h-relleno.tono-azul { background: var(--azul); }
.barra-h-relleno.tono-ambar { background: var(--ambar); }
.barra-h-valor { flex: 0 0 auto; font-size: 0.78rem; color: var(--texto-suave); white-space: nowrap; min-width: 56px; text-align: right; }
.grafico-vacio { color: var(--texto-tenue); font-size: 0.85rem; padding: 0.6rem 0; }

/* --- Cartera en el tiempo: barras agrupadas por mes --- */
.grafico-meses { display: flex; align-items: flex-end; gap: 0.6rem; height: 140px; padding: 0.5rem 0 0.3rem; overflow-x: auto; }
.grafico-mes-col { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; min-width: 46px; flex: 1; }
.grafico-mes-barras { display: flex; align-items: flex-end; gap: 3px; height: 100px; }
.grafico-mes-barra { width: 12px; border-radius: 3px 3px 0 0; min-height: 2px; }
.grafico-mes-barra.vencido { background: var(--peligro); }
.grafico-mes-barra.cobrado { background: var(--exito); }
.grafico-mes-etiqueta { font-size: 0.68rem; color: var(--texto-tenue); }
.grafico-leyenda { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--texto-suave); margin-bottom: 0.3rem; }
.grafico-leyenda span { display: inline-flex; align-items: center; gap: 0.35rem; }
.grafico-leyenda .punto-leyenda { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* --- Modal genérico (reemplaza confirm/prompt/alert nativos) --- */
.modal-fondo {
  position: fixed; inset: 0; background: rgba(5, 8, 16, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 100;
}
.modal-caja {
  background: var(--surface); border: 1px solid var(--borde-fuerte);
  border-radius: var(--radio); padding: 1.3rem; max-width: 420px; width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.modal-caja h3 { margin: 0 0 0.6rem; font-size: 1rem; color: var(--texto); text-transform: none; letter-spacing: 0; }
.modal-caja p { color: var(--texto-suave); font-size: 0.9rem; margin: 0 0 1rem; line-height: 1.5; }
.modal-caja input {
  width: 100%; padding: 0.65rem 0.8rem; border-radius: var(--radio-sm);
  border: 1px solid var(--borde-fuerte); background: var(--surface-2); color: var(--texto);
  font-size: 0.95rem; margin-bottom: 0.5rem;
}
.modal-acciones { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.9rem; }
.modal-acciones button {
  padding: 0.55rem 1rem; border-radius: var(--radio-sm); border: 1px solid var(--borde-fuerte);
  background: var(--surface-2); color: var(--texto); font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.modal-acciones button.primario { background: var(--azul); border-color: var(--azul); color: #fff; }
.modal-acciones button.peligro { background: var(--peligro); border-color: var(--peligro); color: #fff; }

/* --- Toast (confirmaciones no bloqueantes) --- */
.toast-cont { position: fixed; bottom: 1rem; right: 1rem; z-index: 110; display: flex; flex-direction: column; gap: 0.5rem; max-width: min(90vw, 360px); }
.toast {
  background: var(--surface-3); border: 1px solid var(--borde-fuerte); border-radius: var(--radio-sm);
  padding: 0.7rem 0.9rem; font-size: 0.85rem; color: var(--texto); box-shadow: var(--sombra);
  animation: toast-entrada 0.2s ease;
}
.toast.exito { border-color: rgba(16, 185, 129, 0.4); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }
@keyframes toast-entrada { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* --- Estado vacío (secciones sin datos todavía) --- */
.estado-vacio {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--texto-suave);
}
.estado-vacio-icono {
  width: 54px;
  height: 54px;
  margin: 0 auto 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--borde);
  border-radius: 999px;
  font-size: 1.5rem;
}
.estado-vacio-titulo {
  font-weight: 700;
  color: var(--texto);
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}
.estado-vacio-detalle {
  margin: 0 auto;
  max-width: 360px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.estado-vacio-detalle strong { color: var(--texto); }

/* --- Sistema: respaldos y auditoría --- */
.campo-busqueda {
  width: 100%; padding: 0.6rem 0.8rem; border-radius: var(--radio-sm);
  border: 1px solid var(--borde-fuerte); background: var(--surface-2); color: var(--texto);
  font-size: 0.9rem; margin-bottom: 0.7rem;
}
.tabla-auditoria { max-height: 420px; overflow-y: auto; }
