/* =========================================================================
   1. VARIABLES Y ESTILOS GLOBALES
   ========================================================================= */
:root {
  --color-primario: #d4a017;
  --color-primario-hover: #b88a14;
  --color-primario-suave: #fdf9ee;
  --color-oscuro: #333333;
  --color-texto: #212529;
  --color-texto-secundario: #6c757d;
  --color-borde: #bdc3c7;
  --color-fondo: #f4f4f4;
  --color-blanco: #ffffff;
  --color-error: #ff4d4d;
  --color-error-fondo: #ffe6e6;
  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1ebd54;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--color-fondo);
  color: var(--color-texto);
}

header {
  position: relative;
  height: 200px;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("../imagenes/iglesia-sta-bbr3.jpeg");
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.logo-header {
  /* Un resplandor más cercano a los bordes de las letras */
  filter: drop-shadow(0px 0px 4px rgba(255, 255, 255, 0.95))
    drop-shadow(0px 0px 8px rgba(255, 255, 255, 0.6));
}
.logo-container img {
  height: 180px;
  width: auto;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

main {
  flex: 1;
  padding: 20px;
  text-align: center;
}

/* Corrección de desbordamiento para inputs y horarios en admin_comerciante.php */
.admin-container,
.panel-comerciante-container,
.form-admin-container,
div[class*="container"] {
  box-sizing: border-box !important;
}

/* Forzar que todos los inputs, textareas y selects respeten el ancho de su tarjeta */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Ajuste específico para la grilla de horarios en móviles */
@media (max-width: 768px) {
  .horario-row,
  .horarios-container,
  form div {
    box-sizing: border-box !important;
  }

  /* Contenedores de bloques de administración */
  .form-box,
  .card,
  .admin-card {
    width: 94% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 15px !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   Panel de Administración - Menú Rubio (admin_comerciante.php)
   ========================================================================== */

.container-admin {
  max-width: 900px;
  width: 100% !important;
  margin: 5px auto;
  padding: 20px;
  font-family: "Segoe UI", sans-serif;
  color: #333;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.registro-container,
.admin-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  box-sizing: border-box !important;
  width: 100% !important;
}

.registro-titulo {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 12px;
  margin-bottom: 20px;
  font-size: 1.3em;
}

/* Grilla adaptable del panel */
.datos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  box-sizing: border-box !important;
}

.field-wrapper {
  margin-bottom: 15px;
  box-sizing: border-box !important;
}

.field-label {
  display: block;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
  font-size: 0.9em;
}

/* Contención estricta para inputs, selects y textareas dentro del admin */
.container-admin .input-field-custom,
.container-admin input[type="text"],
.container-admin input[type="email"],
.container-admin input[type="password"],
.container-admin input[type="number"],
.container-admin input[type="time"],
.container-admin select,
.container-admin textarea {
  width: 100% !important;
  max-width: 100% !important;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box !important;
  background: #f9f9f9;
}

.container-admin .input-field-custom:focus {
  border-color: #3498db;
  background: #fff;
  outline: none;
}

/* Botones específicos del panel */
.container-admin .btn-guardar {
  margin-top: 20px;
  padding: 12px;
  background: #2c3e50;
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 100%;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  box-sizing: border-box !important;
}

.container-admin .btn-guardar:hover {
  background: #1a252f;
}

/* Galería y slots multimedia */
.grid-galeria {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.img-slot {
  width: 110px;
  height: 110px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #f9f9f9;
}

.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.img-slot img:hover {
  transform: scale(1.1);
}

.btn-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#toast-notificacion {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  background: #27ae60;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  font-family: sans-serif;
  font-weight: bold;
  transform: translateY(100px);
  transition: transform 0.3s ease-in-out;
}

#toast-notificacion.show {
  transform: translateY(0);
}

/* ==========================================================================
   Adaptabilidad Móvil exclusiva para el Panel
   ========================================================================== */
@media (max-width: 768px) {
  .container-admin {
    padding: 10px !important;
  }

  /**.registro-container,
  .admin-card {
    padding: 15px !important;
  }**/

  .datos-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  .container-admin form div[style*="display: flex"] {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* =========================================================================
   2. NAVEGACIÓN Y BOTONES DEL HEADER
   ========================================================================= */
.header-nav {
  position: absolute;
  top: 15px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.btn-nav {
  text-decoration: none;
  color: var(--color-blanco);
  background-color: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-nav:hover {
  background-color: rgba(0, 0, 0, 0.9);
  border-color: var(--color-blanco);
}

.btn-comerciante {
  background-color: var(--color-primario);
  color: #000;
  border: none;
}

.btn-comerciante:hover {
  background-color: #f1b418;
  transform: scale(1.05);
}

/* Estructura de grilla adaptativa para el reporte de pago */
.form-grid-pago {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Campos que ocuparán toda la fila en pantallas grandes */
.form-grid-pago .span-two,
.form-grid-pago div:has(> input[name="pago_referencia"]),
.form-grid-pago div:has(> input[type="file"]) {
  grid-column: span 2;
}

/* Asegurar que todos los inputs, selects y fechas no rebasen su celda */
.input-pago-custom {
  width: 100% !important;
  max-width: 100% !important;
  padding: 10px !important;
  border-radius: 6px !important;
  border: 1px solid #ccc !important;
  font-size: 0.95em !important;
  box-sizing: border-box !important;
}

/* Adaptabilidad total para dispositivos móviles */
@media (max-width: 768px) {
  .form-grid-pago {
    grid-template-columns: 1fr !important;
  }
  .form-grid-pago .span-two,
  .form-grid-pago div:has(> input[name="pago_referencia"]),
  .form-grid-pago div:has(> input[type="file"]) {
    grid-column: span 1 !important;
  }
}

/* =========================================================================
   3. FORMULARIO DE REGISTRO
   ========================================================================= */
@media (max-width: 768px) {
  .registro-container {
    max-width: 800px;
    width: 92% !important; /* Cambiado de 100% para dejar respiro en móviles */
    margin: 20px auto;
    background: var(--color-blanco);
    padding: 15px !important;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box !important;
  }
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.bloque-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.video-grid,
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.photo-box,
.video-box {
  width: 100% !important;
  min-height: 80px;
  aspect-ratio: 1 / 1;
  border: 2px dashed var(--color-borde);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  background-color: var(--color-blanco);
  transition: all 0.3s ease;
  overflow: hidden;
}

.grid-form input,
.grid-form select,
.grid-form textarea {
  padding: 12px;
  border: 2px solid var(--color-borde);
  border-radius: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.grid-form input:focus,
.grid-form select:focus,
.grid-form textarea:focus {
  border-color: var(--color-primario);
  background-color: var(--color-primario-suave);
  box-shadow: 0 0 8px rgba(105, 238, 28, 0.2);
}

.grid-form textarea {
  grid-column: span 2;
  height: 100px;
}

.grid-form select {
  cursor: pointer;
  background-color: var(--color-blanco);
}

input[type="file"] {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 5px;
  width: 100%;
}

input[type="file"]::file-selector-button {
  background-color: var(--color-primario);
  color: var(--color-blanco);
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
  font-weight: bold;
  margin-right: 10px;
  text-transform: uppercase;
  font-size: 0.75em;
}

input[type="file"]::file-selector-button:hover {
  background-color: var(--color-primario-hover);
}

/* =========================================================================
   4. SISTEMA DE CARGA MULTIMEDIA
   ========================================================================= */
.file-upload {
  grid-column: span 2;
  text-align: left;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 2px dashed var(--color-primario);
  width: 100%;
  box-sizing: border-box;
}

.file-input-hidden {
  display: none !important;
  visibility: hidden;
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.photo-box {
  aspect-ratio: 1 / 1;
  border: 2px solid var(--color-borde);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  background-color: var(--color-blanco);
  transition: all 0.3s ease;
  overflow: hidden;
}

.photo-box:hover {
  border-color: var(--color-primario) !important;
  background-color: var(--color-primario-suave);
  box-shadow: 0 4px 10px rgba(212, 160, 23, 0.15);
  transform: scale(1.02);
  transition: all 0.2s ease-in-out;
}

.photo-box .plus-icon {
  font-size: 2rem;
  color: var(--color-primario);
  z-index: 2;
  position: relative;
}

.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Botón Eliminar en Hover */
.btn-remove {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(217, 30, 24, 0.85);
  color: var(--color-blanco);
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  z-index: 3;
}

.photo-box:hover .btn-remove {
  display: flex !important;
}

/* Botón Video Personalizado */
.video-upload-box {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-video-custom {
  padding: 10px 20px;
  background: #333;
  color: var(--color-blanco);
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9em;
}

.btn-enviar {
  grid-column: span 2;
  background: var(--color-primario);
  color: black;
  font-weight: bold;
  border: none;
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background 0.3s;
}

.btn-enviar:hover {
  background: var(--color-primario-hover);
}

/* =========================================================================
   5. CONTENEDORES DE FILTROS Y GRID DE COMERCIOS
   ========================================================================= */
.filter-container {
  max-width: 800px;
  margin: 5px auto 30px;
  background: var(--color-blanco);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 15px;
  position: relative;
  z-index: 10;
}

.filter-container select {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
}

.comercios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card-comercio {
  background: var(--color-blanco);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-comercio:hover {
  transform: translateY(-5px);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: #f0f0f0;
}

.card-info {
  padding: 15px;
}

/* =========================================================================
   6. SISTEMA DE MODALES Y CAPAS (Z-INDEX CONFIGURADO)
   ========================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 0;
  box-sizing: border-box;
  z-index: 1000; /* Capa intermedia para detalles y avisos */
}

.modal-content {
  background: var(--color-blanco);
  padding: 30px;
  border-radius: 15px;
  width: min(100%, 500px);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-top: 5px solid var(--color-primario);
  animation: slideIn 0.4s ease-out;
  max-width: 95vw;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

#modalDetalle.modal-overlay,
#modalDetalle .modal-content,
.modal-detalle-width {
  width: min(100%, 800px) !important;
  max-width: 95vw !important;
  max-height: calc(100vh - 40px) !important;
}

#modalDetalle .modal-content {
  padding: 20px !important;
}

#modalDetalle .modal-grid {
  grid-template-columns: 1fr !important;
  gap: 18px !important;
}

#modalDetalle .col-visual,
#modalDetalle .col-info {
  width: 100% !important;
}

@media (max-width: 768px) {
  .modal-content {
    width: 95% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 15px !important;
    box-sizing: border-box !important;
  }

  #modalDetalle .col-info,
  .modal-content > div {
    max-height: none !important;
    overflow-y: visible !important;
  }

  .modal-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .gallery-mini {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-video-element {
    max-height: 240px;
  }

  .col-info h2 {
    font-size: 1.4rem;
  }

  .btn-whatsapp-link {
    font-size: 0.95rem;
    padding: 11px 16px;
  }
}

@media (min-width: 768px) {
  .modal-overlay {
    justify-content: center !important;
    align-items: center !important;
  }

  #modalDetalle .modal-content {
    width: min(95vw, 800px) !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
  }

  #modalDetalle .modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}

@media (min-width: 1024px) {
  #modalDetalle.modal-overlay {
    display: flex;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.92) !important;
    z-index: 1050 !important;
    overflow-y: auto !important;
  }

  #modalDetalle .modal-content {
    width: min(90vw, 1100px) !important;
    max-width: 1100px !important;
    box-sizing: border-box !important;
    height: min(90vh, calc(100vh - 40px)) !important;
    max-height: calc(100vh - 40px) !important;
    overflow: hidden !important;
    padding: 28px !important;
    border-radius: 16px !important;
    margin: 0 auto !important;
    position: relative !important;
  }

  /* Grid inside modal: make columns adapt and allow internal scrolling */
  #modalDetalle .modal-grid {
    display: grid !important;
    grid-template-columns: 320px 1fr !important;
    gap: 20px !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  #modalDetalle .col-visual,
  #modalDetalle .col-info {
    width: auto !important;
    max-height: calc(90vh - 120px) !important;
    overflow-y: auto !important;
  }
}

.modal-content h3 {
  color: var(--color-oscuro);
  margin-bottom: 15px;
  font-size: 1.5em;
}

.modal-content p {
  color: #555;
  line-height: 1.6;
  font-size: 1.1em;
}

.modal-content .software-tag {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  color: var(--color-primario);
  font-family: "Courier New", Courier, monospace;
}

/* Capa del Visor de Imágenes Ampliadas (Primer plano absoluto) */
.visor-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Cambiado a 100% para mejor compatibilidad móvil */
  background-color: rgba(
    0,
    0,
    0,
    0.95
  ); /* Un poco más oscuro para resaltar la foto */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999 !important;
  backdrop-filter: blur(5px); /* Efecto elegante de desenfoque en el fondo */
  cursor: zoom-out;
}

/* Ajuste específico para la imagen dentro del visor */
.visor-img-content {
  /* Mantiene la proporción sin estirar la imagen */
  object-fit: contain;
  /* Asegura que nunca se salga de la pantalla */
  max-width: 90vw;
  max-height: 90vh;
  /* Sombras y bordes para que resalte sobre el fondo oscuro */
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  /* Transición suave por si la imagen cambia de tamaño */
  transition: all 0.3s ease;
}

.visor-close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--color-blanco);
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2001;
}

.visor-close-btn:hover {
  color: var(--color-primario);
}

.modal-grid {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 25px;
  align-items: start;
}

.col-visual {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.modal-video-element {
  width: 100%;
  max-height: 450px;
  border-radius: 12px;
  background-color: #000;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-mini img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-mini img:hover {
  transform: scale(1.05);
}

.col-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  word-wrap: break-word;
  color: #212529;
  text-align: left;
}

.col-info h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #111;
}

.comercio-cat-text {
  font-size: 0.95rem;
  color: var(--color-texto-secundario);
  margin: 0;
}

.modal-separator {
  border: 0;
  height: 1px;
  background: #e0e0e0;
  margin: 5px 0;
}

.btn-whatsapp-link {
  background: var(--color-whatsapp);
  color: var(--color-blanco) !important;
  padding: 12px 20px;
  display: block;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
  transition:
    background 0.3s ease,
    transform 0.2s;
  margin-top: 10px;
}

.btn-whatsapp-link:hover {
  background: var(--color-whatsapp-hover);
  transform: translateY(-2px);
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomInIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================================================================
   7. INTERFAZ DE LOGIN Y SISTEMA (wSystem)
   ========================================================================= */
.login-container {
  display: flex;
  justify-content: center;
  padding: 50px 20px;
  min-height: 60vh;
  align-items: center;
}

.form-box {
  background: var(--color-blanco);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;
  border-top: 5px solid var(--color-primario);
  text-align: center;
}

.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.input-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.input-group input:focus {
  border-color: var(--color-primario);
  box-shadow: 0 0 8px rgba(212, 160, 23, 0.2);
  outline: none;
}

.error-msg {
  color: var(--color-error);
  text-align: center;
  font-weight: bold;
  background: var(--color-error-fondo);
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.reg-text {
  margin-top: 15px;
  text-align: center;
}

.reg-text a {
  color: var(--color-primario);
  font-weight: bold;
  text-decoration: none;
}

.btn-submit {
  width: 100%;
  background: var(--color-primario);
  color: #000;
  border: none;
  padding: 15px;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
}

.btn-submit:hover {
  background: #b8860b;
}

.btn-modal {
  margin-top: 20px;
  max-width: 200px;
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* =========================================================================
   8. MODAL ACERCA DE MENÚ RUBIO (wSystem)
   ========================================================================= */
.modal-acerca-flotante {
  max-width: 600px;
  background: linear-gradient(to bottom, var(--color-blanco), #fffdf5);
  border-top: 8px solid var(--color-primario);
  animation: slideUp 0.3s ease-out;
}

.modal-header-branding {
  text-align: center;
  margin-bottom: 20px;
}

.logo-modal {
  width: 100px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

.titulo-dorado {
  color: #b8860b;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.divisor-modal {
  border: 0;
  height: 1px;
  background-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0),
    rgba(212, 160, 23, 0.75),
    rgba(0, 0, 0, 0)
  );
  margin: 20px 0;
}

.highlight-text {
  font-size: 1.2rem;
  color: #2c3e50;
  font-weight: bold;
  margin-bottom: 15px;
}

.mision-box {
  background: #fdf6e3;
  padding: 20px;
  border-left: 4px solid var(--color-primario);
  margin: 20px 0;
  font-style: italic;
  color: #5d4037;
}

.software-credit {
  margin: 30px 0;
  text-align: center;
}

.ws-brand {
  font-size: 1.5rem;
  color: #2c3e50;
  margin: 5px 0;
  letter-spacing: 3px;
}

.tagline {
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
}

footer {
  background-color: var(--color-oscuro);
  color: var(--color-blanco);
  text-align: center;
  padding: 15px 0;
  font-size: 0.9em;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-logo {
  height: 30px;
  width: auto;
}

.footer-version {
  opacity: 0.85;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
}

/* =========================================================================
   9. RESPONSIVIDAD GENERAL (MEDIA QUERIES)
   ========================================================================= */
@media (max-width: 768px) {
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-video-element {
    max-height: 380px;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .bloque-grid {
    grid-template-columns: 1fr;
  }

  .grid-form textarea,
  .file-upload,
  .btn-enviar {
    grid-column: span 1;
  }

  .grid-form input,
  .grid-form select,
  .grid-form textarea {
    min-width: 0;
  }

  .photo-grid,
  .video-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .photo-box,
  .video-box {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }

  .horarios-container {
    padding: 15px !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .horarios-container > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    background: #fdfdfd;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 12px;
  }

  .horarios-container label,
  .horarios-container input[type="time"],
  .horarios-container input[type="checkbox"] {
    width: 100%;
    box-sizing: border-box;
  }

  .file-upload {
    padding: 15px;
  }

  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Optimizaciones para Android / Móvil */
  header {
    height: auto;
    padding: 15px 0 25px 0;
    flex-direction: column;
  }

  .header-nav {
    position: relative;
    top: 0;
    right: 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .filter-container {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    margin: 10px;
  }

  .filter-container select {
    width: 100% !important;
  }

  .logo-container img {
    height: 140px;
  }
  /* Colores específicos para estados */
  .btn-primary {
    background-color: #d97706;
    color: white;
  } /* Tu naranja principal */
  .btn-secondary {
    background-color: #374151;
    color: white;
  } /* Gris/Neutro */
  .btn-success {
    background-color: #27ae60;
    color: white;
  } /* Verde para pagos */
  .btn-danger {
    background-color: #c0392b;
    color: white;
  } /* Rojo para cerrar sesión */
  .btn-warning {
    background-color: #59f312;
    color: white;
  } /* Amarillo para recuperar */
}

