components.css

/* === Botones === */
.btn,
.btn--pro,
.btn--primary,
.btn--secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), transform 0.2s;
}

.btn {
  padding: 0.75rem 1.25rem;
}

.btn--pro {
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  background: var(--color-primary);
  color: var(--color-surface);
  border: none;
  box-shadow: var(--shadow);
}

.btn--pro:hover {
  background: var(--color-primary-hover);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-surface);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: scale(1.03);
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-surface);
}

.btn--secondary:hover {
  background: var(--color-primary-hover);
}

/* === Iconos === */
.icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: inline-block;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.75rem 0.25rem;
  z-index: 9999;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.75rem;
  transition: color 0.2s ease;
  min-width: 0;
}

.bottom-nav a.active {
  color: var(--color-primary);
  font-weight: bold;
}

.bottom-nav a.active img {
  filter: brightness(0) saturate(100%) invert(39%) sepia(100%) saturate(1000%) hue-rotate(90deg);
}

.bottom-nav a img {
  width: 28px;
  height: 28px;
  margin-bottom: 0.2rem;
  object-fit: contain;
}

/* === BOTONES GENERALES === */
button,
.boton-ancho,
.doble-boton button {
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  background-color: var(--color-primary);
  color: var(--color-surface);
  font-weight: bold;
  font-size: 1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
  background-color: var(--color-primary-hover);
  transform: scale(1.03);
}

/* === ICONOS EN BOTONES === */
button img,
.icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

.historial-actions button .icon {
  width: 20px;
  height: 20px;
}

.card-expanded {
  display: block;
  transition: all 0.3s ease;
}

.card.card-collapsed .card-expanded {
  display: none;
}

.card.card-collapsed .card-header {
  cursor: pointer;
}

.registro-header {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--registro-color, #999);
  /* personalizable según modo */
  margin-bottom: 4px;
}

.ruta-resumen {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--resumen-color, #222);
  /* más énfasis en modo claro */
}

body.dark .ruta-resumen {
  color: #eee;
}

.ruta-resumen .detalle {
  font-weight: normal;
  color: var(--detalle-color, #666);
  margin-left: 6px;
}

body.dark .ruta-resumen .detalle {
  color: #aaa;
}

.fechas-ruta {
  font-size: 0.85rem;
  color: var(--fechas-color, #666);
  margin-top: 2px;
}

body.dark .fechas-ruta {
  color: #999;
}

button,
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  filter: brightness(1.05);
}

/* Asegura que los botones no se estiren ni escalen raro */
.nav__item a.btn {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.fab-feedback {
  position: fixed;
  bottom: 4.5rem;
  right: 1rem;
  background: #3b82f6;
  /* Azul intenso */
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.fab-feedback:hover {
  background: #2563eb;
}



.error-text {
  color: var(--color-alerta);
  font-size: 0.85rem;
  margin-top: 4px;
}

.input-error {
  border-color: var(--color-alerta);
  background-color: var(--color-surface);
}

.modo-activo {
  box-shadow: 0 0 0 3px var(--color-primary);
  background-color: var(--color-primary-hover) !important;
}

.doc-card {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0.75rem 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease;
}

/* Estados visuales */
.doc-ok {
  border-left: 4px solid var(--color-success);
}

.doc-warning {
  border-left: 4px solid #facc15;
  /* Amarillo */
}

.doc-expired {
  border-left: 4px solid var(--color-danger);
}

.doc-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.doc-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.doc-info {
  flex-grow: 1;
  font-size: 0.95rem;
}

.doc-info strong {
  font-weight: 600;
}

.doc-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (min-width: 480px) {
  .doc-actions {
    flex-direction: row;
  }
}

.empty-docs {
  text-align: center;
  font-size: 1rem;
  margin-top: 2rem;
  color: var(--color-muted);
}

.doc-info {
  flex-grow: 1;
  font-size: 0.95rem;
  color: var(--color-text);
  /* Asegura texto legible */
}

.doc-info strong,
.doc-info small {
  color: var(--color-text);
  /* Forzar color si está heredando algo pálido */
}

.doc-warning,
.doc-ok,
.doc-expired {
  color: var(--color-text);
}

.doc-info strong,
.doc-info small {
  color: #000 !important;
}

.doc-warning {
  background-color: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.idioma-section {
  margin-bottom: 2rem;
  text-align: center;
}

.idioma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  justify-items: center;
  max-width: 400px;
  margin: 0 auto;
}

.ruta-card {
  background: var(--color-surface);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  line-height: 1.6;
  font-family: var(--font-family);
  color: var(--color-text);
}

.filtro-fechas {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 2rem;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

.filtro-fechas label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.filtro-fechas input[type="checkbox"] {
  accent-color: var(--color-primary);
}

.ruta-info {
  color: var(--color-text);
  font-size: 0.95rem;
}

.ruta-info strong {
  font-weight: bold;
  color: var(--color-text);
}

.rutas-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rutas-info .dato-principal {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  /* Azul claro o brillante */
}

.rutas-info .dato-secundario {
  font-size: 1rem;
  color: var(--color-muted);
  /* Gris legible */
}


[data-theme="oscuro"] .rutas-info .dato-principal {
  color: #FF4D4F;
  /* Rojo intenso para destacar en oscuro */
}

[data-theme="oscuro"] .rutas-info .dato-secundario {
  color: #bbbbbb;
  /* Gris claro legible */
}


.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.campo {
  display: flex;
  flex-direction: column;
}

.campo input,
.campo select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--gris-suave, #ccc);
  font-size: 1rem;
}

.campo-largo {
  grid-column: span 2;
}

form.card button.guardar {
  margin-top: 10px;
  width: 100%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mensaje {
  margin-top: 12px;
  padding: 10px;
  background-color: #d2ffd2;
  color: #065f10;
  border-radius: 6px;
  font-weight: bold;
}

.volver-derecha-despues {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  margin-bottom: 60px;
  /* espacio antes del bottom-nav */
}

.volver-abajo-derecha {
  transition: all 0.2s ease-in-out;
}

.botones-dobles {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.botones-dobles .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 1rem;
}



.btn-eliminar-gasto {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.9em;
  margin-left: 8px;
}

.btn-eliminar-gasto:hover {
  color: red;
}

[data-theme="oscuro"] .btn-eliminar-gasto {
  color: #ccc;
}

[data-theme="oscuro"] .btn-eliminar-gasto:hover {
  color: red;
}

.header-con-boton {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding-left: 1rem;
  padding-top: 1rem;
  position: relative;
}

.btn-volver {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), transform 0.2s;
  padding: 0.75rem 1.25rem;
  background-color: var(--color-accent, #f39c12);
  color: white;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}



.btn-volver:hover {
  background-color: #d68910;
}

[data-lucide] {
  width: 28px;
  height: 28px;
  stroke: var(--color-text);
  stroke-width: 2;
}

.btn--icon {
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.btn--icon:hover {
  background-color: var(--color-border);
}

.btn--danger {
  background-color: var(--color-danger, #e74c3c);
  color: white;
}

.btn--danger:hover {
  background-color: #c0392b;
}

.btn--wide {
  width: 100%;
}


.btn--accent {
  background-color: var(--color-accent, #f59e0b);
  color: white;
  font-weight: bold;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-size: 1.05rem;
}

.btn--accent:hover {
  background-color: #d97706;
}

.btn--accent {
  margin-bottom: 1rem;
}

.parada-extra+.parada-extra {
  border-top: 1px dashed var(--color-border);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.doc-expired {
  background-color: #ffe0e0;
  border: 2px solid #e11d48;
}

.ajustes-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ajustes-lista li {
  margin: 0.5rem 0;
}

.ajustes-lista button {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  text-align: left;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.fab-feedback i {
  width: 26px;
  height: 26px;
}

.modal-consent {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal-consent-content {
  background: var(--color-surface);
  color: var(--color-text);
  padding: 1.5rem;
  border-radius: var(--radius);
  max-width: 90%;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal-consent-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.usuario-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem auto;
  max-width: 450px;
  font-size: 1rem;
  box-shadow: var(--shadow);
  gap: 1rem;
  line-height: 1.4;
}

/* =============================== */
/* MODO OSCURO: usuario-info & logoutBtn */
/* =============================== */

html[data-theme="dark"] .usuario-info {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] #usuarioEmail {
  color: #fff;
}

html[data-theme="dark"] #logoutBtn {
  color: #fff;
  background-color: #c00;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: bold;
}

.historial-card .gastos-extra {
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--color-primary);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1.5rem;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
}

.gastos-extra strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.gastos-extra ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gastos-extra li {
  background: rgba(255, 255, 255, 0.015);
  border-radius: 6px;
  padding: 0.75rem 0.75rem 0.5rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--color-border);
  position: relative;
  word-break: break-word;
}

.gastos-extra li:hover {
  background: rgba(255, 255, 255, 0.03);
}

.gastos-extra li small {
  display: block;
  color: var(--gris);
  white-space: pre-wrap;
  margin-top: 4px;
}

.gastos-extra li .btn-eliminar-gasto {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  font-size: 1rem;
  opacity: 0.7;
}

.gastos-extra li .btn-eliminar-gasto:hover {
  opacity: 1;
  color: red;
}

.dash__resumen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem auto;
  padding: 0 1rem;
  max-width: 480px;
}

.dash__card {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: 1rem;
  /* más suave */
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash__card:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.dash__valor-principal {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 1.1rem;
  /* ⬆️ Aumentado para mayor legibilidad */
  font-weight: 600;
}

.dash__numero {
  font-size: 1.6rem;
  color: var(--color-text);
  /* ✅ Se adapta al tema claro u oscuro */
}

.dash__texto {
  font-size: 1.15rem;
  color: var(--color-text);
  font-weight: 600;
}

.dash__subvalores {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0.2rem;
  font-size: 0.95rem;
  /* ⬆️ Un poco más grande */
  font-weight: 500;
  color: var(--color-muted);
  /* ⬅️ mejor usar muted */
}

.dash__descripcion {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-style: italic;
  /* opcional, da aire de comentario */
}

.logo {
  display: block;
  margin: 0 auto 0.5rem auto;
  width: clamp(48px, 8vw, 72px);
  height: auto;
}

.btn-parcial-importante {
  background-color: #f1c40f;
  /* Mostaza */
  color: #000;
  padding: 1.2rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease-in-out;
  width: 90%;
  max-width: 400px;
  justify-content: center;
}

.btn-parcial-importante:hover {
  transform: scale(1.03);
  background-color: #f39c12;
  /* Un toque más naranja al pasar el ratón */
  box-shadow: 0 0.6rem 1.2rem rgba(0, 0, 0, 0.3);
}

.btn-parcial-importante:active {
  transform: scale(0.98);
}

.texto-grande {
  font-size: 1.4rem;
  font-weight: bold;
}

.card.historial-card.seleccionada {
  border: 2px solid #1ec977 !important;
  background: #153f2e !important;
  color: #fff;
}

/* AVISO DE PRUEBA - Tarjeta */

.aviso-prueba-bloque {
  background-color: var(--fondo-aviso);
  color: var(--texto-aviso, #333);
  border: 2px solid var(--borde-aviso);
  border-radius: 16px;
  padding: 1.2rem;
  margin: 1.5rem auto;
  max-width: 600px;
  text-align: center;
  animation: parpadeo 2.5s infinite ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;

  /* 🔇 Eliminar filtros molestos y suavizados innecesarios */
  backdrop-filter: none;
  background-image: none;

  /* 👀 Mejor nitidez en texto sin exceso de suavizado */
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;

  font-weight: 500;
  font-size: 1.05rem;
}

/* Texto principal */
.titulo-prueba {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.25px;
  margin-bottom: 0.6rem;
}

/* Días restantes */
.dias-prueba {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

/* Subtexto */
.subtitulo-prueba {
  font-size: 0.95rem;
  color: var(--texto-sub, #444);
  font-weight: 400;
  margin-bottom: 1rem;
}

/* Precio */
.precio {
  color: #ff5252;
  font-weight: bold;
}

.precio-original {
  text-decoration: line-through;
  color: #888;
  font-size: 0.9rem;
  margin-left: 0.4rem;
}

/* Botón */
.btn-comprar {
  padding: 0.7rem 1.4rem;
  background-color: #ffa500;
  border: none;
  border-radius: 10px;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease;
}

.btn-comprar:hover {
  background-color: #ff8c00;
}

/* Animación */
@keyframes parpadeo {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.01);
  }
}

/* COLORES DINÁMICOS */
:root[data-theme="light"] {
  --fondo-aviso: #fff3cd;
  --texto-aviso: #333;
  --borde-aviso: #ffdd8c;
  --texto-sub: #666;

  --registro-color: #555;
  --resumen-color: #111;
  --detalle-color: #555;
  --fechas-color: #666;
}

:root[data-theme="dark"] {
  --fondo-aviso: #1e1e1e;
  --texto-aviso: #f0f0f0;
  --borde-aviso: #ffb300;
  --texto-sub: #aaa;

  --registro-color: #aaa;
  --resumen-color: #f0f0f0;
  --detalle-color: #bbb;
  --fechas-color: #ccc;
}