/* === Documentos === */
.doc-ok {
  background: #ecfdf5;
  border-left: 5px solid var(--color-success);
}

.doc-warning {
  background: #fefce8;
  border-left: 5px solid var(--color-accent);
}

.doc-expired {
  background: #fef2f2;
  border-left: 5px solid var(--color-danger);
}

/* === Snackbar === */
.snackbar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-surface);
  padding: 12px 24px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.snackbar.show {
  opacity: 1;
}

/* === Modal === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
  overflow: hidden;
}


.modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

/* === Pausa === */
/* === Aviso Seguimiento de Pausa === */
.advertencia {
  background: var(--color-surface);
  color: var(--color-danger);
  /* Rojo */
  border: 1px solid var(--color-danger);
  padding: 0.75rem 1rem;
  margin: 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
  word-break: break-word;
  line-height: 1.4;
}

[data-theme="dark"] .advertencia {
  background-color: var(--color-surface);
  color: var(--color-danger);
  border-color: var(--color-danger);
}




/* === Animaciones === */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Iconos === */
img {
  max-width: 100%;
  height: auto;
}

.nav__item img,
.utilities-bar img,
.bottom-nav img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* === Navegación principal === */
.nav__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}


.nav__item a.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--color-surface);
  padding: 1rem;
  border-radius: var(--radius);
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s ease;
}

/* === Botones de utilidades === */
.utility-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem;
}

.utility-buttons button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  background: var(--color-surface);
  color: var(--color-text);
  border: none;
  border-radius: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.2s ease;
}

.utility-buttons button:hover {
  background: var(--color-border);
}

.utility-buttons img {
  width: 24px;
  height: 24px;
}

/* === Validación de campos === */
.campo-error {
  border-color: var(--color-danger);
  outline: none;
}

.error-feedback {
  font-size: 0.85rem;
  color: var(--color-danger);
  margin-top: 4px;
  font-weight: 500;
}

.widget-pausa {
  padding: var(--space);
  font-size: var(--font-large);
  background-color: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius);
  text-align: center;
  margin: 0 1rem 1rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.4;
}

.widget-pausa div {
  display: block;
  word-break: break-word;
}

.fab-feedback {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 2rem;
  text-decoration: none;
  border: none;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background-color var(--transition);
}

.fab-feedback:hover {
  background-color: var(--color-primary-hover);
  cursor: pointer;
}

/* 🔳 Contenedor principal de cada ruta */
.card.historial-card {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem auto;
  box-shadow: var(--shadow);
  max-width: 600px;
  list-style: none;
}

/* 🧱 Cabecera de la card */
.card-header {
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* 🚛 Progresión de eventos (salida, paradas, llegada) */
.ruta-progresion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.evento {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.evento .icono {
  font-size: 1.2rem;
  line-height: 1.5;
}

/* 📋 Info resumida al final */
.info-resumen {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* 🚦 Footer: estado + botones */
.footer-ruta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* 🟢 Chips de estado */
.estado-chip {
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 0.85rem;
}

.estado-chip.completa {
  background-color: var(--color-success);
  color: #e2e8f0;
}

.estado-chip.parcial {
  background-color: var(--color-alerta);
  color: #fef2f2;
}


/* ✏️ Botones de acción */
.historial-actions button {
  background-color: var(--color-secondary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.historial-actions button:hover {
  background-color: var(--color-primary);
}

/* 📭 Estilo del mensaje vacío */
.empty {
  text-align: center;
  color: var(--color-muted);
  font-size: 1rem;
  margin-top: 2rem;
}

/* 📦 Contenedor general */
.container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1rem;
}

/* 🕓 Estado del temporizador */
.estado-pausa {
  background-color: var(--color-surface);
  color: var(--color-text);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.contador {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 0.5rem;
  color: var(--color-primary);
}

.fin-exacto {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

/* ⚠️ Mensaje de seguimiento */
#mensajeSeguimiento {
  color: var(--color-danger);
  font-weight: bold;
  margin-top: 1rem;
}

/* ⏱ Botonera de inicio/registro */
.botonera {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* 🛠 Registro manual */
.fecha-inicio-manual {
  text-align: center;
  margin-bottom: 2rem;
}

.fecha-inicio-manual input {
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
}

.fecha-inicio-manual button {
  margin-top: 0.5rem;
}

/* 🔘 Botones personalizados */
button.verde {
  background-color: var(--color-success);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
}

button.rojo {
  background-color: var(--color-danger);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
}

button.verde:hover {
  background-color: #16a34a;
}

button.rojo:hover {
  background-color: #b91c1c;
}

button.volver {
  display: block;
  margin: 2rem auto;
  background-color: var(--color-secondary);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.pausa-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.pausa-botones {
  background: var(--color-surface);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tarjeta-pago {
  background-color: var(--fondo-aviso);
  color: var(--texto-aviso);
  border: 2px solid var(--borde-aviso);
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  margin-top: 2rem;
}

.titulo-pago {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1.2rem;
}

.texto-pago {
  font-size: 1rem;
  color: var(--texto-aviso);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.bloque-oferta {
  background-color: #1d1d1d;
  padding: 1.5rem;
  border: 2px solid var(--borde-aviso);
  border-radius: 12px;
  animation: parpadeo 3s infinite ease-in-out;
}

.oferta-texto {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.precio {
  color: #ff4c4c;
  font-weight: bold;
}

.precio-original {
  text-decoration: line-through;
  color: gray;
  margin-left: 0.5rem;
}

.subtexto-oferta {
  font-size: 0.95rem;
  color: var(--texto-sub);
  margin-bottom: 1.2rem;
}

.boton-principal {
  background-color: #ffc107;
  color: #000;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.boton-principal:hover {
  background-color: #e6a800;
}

@keyframes parpadeo {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.01);
  }
}

html[data-theme="oscuro"] .card {
  background-color: #1d1f2a;
  color: #ddd;
  border: 1px solid #333;
}

html[data-theme="oscuro"] .registro-header {
  color: #aaa;
}

html[data-theme="oscuro"] .ruta-resumen {
  color: #fff;
  font-weight: 600;
}

html[data-theme="oscuro"] .ruta-resumen .detalle {
  color: #bbb;
}

html[data-theme="oscuro"] .fechas-ruta {
  color: #ccc;
}

html[data-theme="oscuro"] .ruta-resumen strong {
  color: #fff;
}

html[data-theme="oscuro"] .ruta-resumen .ciudad {
  color: #f0f0f0;
  font-weight: 600;
}