/* Make the html body cover the entire (visual) viewport with no scroll bars. */
html, body { 
  padding: 0; 
  margin: 0; 
  overflow: hidden; 
  height: 100%; 
  font-family: Arial, sans-serif;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../resources/img/background-index.avif') center/cover no-repeat;
  transition: background-image 0.5s ease-in-out;
}
#screen { width: 100%; height: 100%; }

/* Spinner container styles - Móvil first */
#qtspinner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

#qtspinner center {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

/* Login form styles - Móvil optimizado */
#loginForm {
  width: 100%;
  max-width: 320px;
  padding: 15px 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  text-align: center;
  box-sizing: border-box;
  margin: 0 auto;
  position: relative;
  min-height: 380px;
}

/* Logo dentro del formulario - Móvil */
#loginForm .logo {
  max-width: 120px;
  height: auto;
  margin-bottom: 15px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

#loginForm input {
  width: 100%;
  padding: 16px 12px;
  margin: 8px 0;
  border: 2px solid #e1e1e1;
  border-radius: 12px;
  box-sizing: border-box;
  font-size: 16px;
  background: rgba(255,255,255,0.95);
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

#loginForm input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

#loginForm button {
  width: 100%;
  padding: 18px 12px;
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  touch-action: manipulation;
  min-height: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#loginForm button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

#loginForm button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Desactivar TODAS las transiciones y animaciones durante carga */
#loginForm.loading-state,
#loginForm.loading-state * {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

/* Clase para FIJAR completamente el formulario durante loadEmscriptenModule */
#loginForm.form-locked {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: inherit;
}

/* Botón de carga con animación suave */
.loading-button {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 50%, #4a90e2 100%) !important;
  background-size: 200% 200% !important;
  animation: shimmer 1.5s ease-in-out infinite !important;
  cursor: wait !important;
  opacity: 0.9 !important;
}

.loading-button:hover {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 50%, #4a90e2 100%) !important;
  background-size: 200% 200% !important;
  animation: shimmer 1.2s ease-in-out infinite !important;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.loading-button::after {
  display: none !important;
}

/* Botón de invitado con estilo diferente */
#guestButton {
  background: linear-gradient(45deg, #28a745, #20a139) !important;
  margin-top: 8px !important;
}

#guestButton:hover {
  box-shadow: 0 4px 12px rgba(40,167,69,0.3) !important;
}

#guestButton.loading-button {
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

#guestButton.loading-button:hover {
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Estilos para el switch de recordar credenciales */
.remember-switch {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 15px 0;
  gap: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: #007bff;
}

.switch input:checked + .slider:before {
  transform: translateX(26px);
}

.switch-label {
  color: #333;
  font-size: 14px;
  font-weight: bold;
  text-shadow: none;
  user-select: none;
  cursor: pointer;
}

.error-message {
  color: #dc3545;
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
}

/* Estilos para el enlace de solicitar acceso */
.request-access-link {
  text-align: center;
  margin-top: 15px;
}

.request-access-link a {
  color: #007bff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
  cursor: pointer;
}

.request-access-link a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Estilos para el popup */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.popup-content {
  background: white;
  border-radius: 15px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.3s ease-out;
  overflow: hidden;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup-header {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  padding: 20px;
  position: relative;
  text-align: center;
}

.popup-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.close-popup:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.popup-body {
  padding: 25px;
  line-height: 1.6;
}

.popup-body p {
  margin: 0 0 15px 0;
  color: #333;
}

.popup-body ul {
  margin: 15px 0;
  padding-left: 20px;
  color: #555;
}

.popup-body li {
  margin-bottom: 8px;
}

.contact-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #007bff;
  margin-top: 20px !important;
}

/* Estilos para el campo de email en el popup */
.email-field {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.email-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.popup-email-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  background: white;
}

.popup-email-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.email-help {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #6c757d;
  font-style: italic;
}

.popup-footer {
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.whatsapp-button {
  flex: 1;
  background: linear-gradient(45deg, #25d366, #20ba5a);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.cancel-button {
  flex: 0 0 auto;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cancel-button:hover {
  background: #5a6268;
}

/* Estilos para la barra de progreso personalizada */
#customProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../resources/img/background-index.avif') center/cover no-repeat;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
  font-family: Arial, sans-serif;
}

.progress-container {
  text-align: center;
  background: transparent;
  border-radius: 0;
  padding: 40px;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  max-width: 400px;
  width: 90%;
}

.progress-logo-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.progress-logo {
  width: 140px;
  height: 140px;
  border-radius: 0;
  background: transparent;
  padding: 0;
  backdrop-filter: none;
  border: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  position: static;
  transform: none !important;
  animation: none !important;
  object-fit: contain;
  box-shadow: none;
}

.progress-glow {
  display: none;
}

.progress-text {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 25px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.progress-bar-track {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 4px;
  transition: width 0.3s ease, background 0.5s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progressShimmer 2s ease-in-out infinite;
}

.progress-bar-glow {
  position: absolute;
  top: -2px;
  left: 0%;
  width: 4px;
  height: 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  filter: blur(2px);
  transition: left 0.3s ease;
}

.progress-percentage {
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@keyframes logoPulse {
  from { 
    transform: none;
    box-shadow: none;
  }
  to { 
    transform: none;
    box-shadow: none;
  }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes progressShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Responsive para la barra de progreso */
@media (max-width: 480px) {
  .progress-container {
    padding: 25px 20px;
    border-radius: 0;
  }
  
  .progress-logo-wrapper {
    width: 160px;
    height: 160px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }
  
  .progress-logo {
    width: 100px;
    height: 100px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    backdrop-filter: none;
    box-shadow: none;
  }
  
  .progress-text {
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .progress-bar-track {
    height: 6px;
  }
  
  .progress-percentage {
    font-size: 14px;
  }
}

/* Botón de instalación PWA */
#installButton {
  position: fixed;
  top: 20px;
  right: 20px;
  margin: 0;
  padding: 12px 16px;
  background: linear-gradient(45deg, #6c757d, #495057);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  height: 40px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: inline-flex;
  visibility: hidden;
  transition: all 0.3s ease;
  min-width: 120px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#installButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  background: linear-gradient(45deg, #495057, #343a40);
}

#installButton:active {
  transform: translateY(0px);
}

#installButton.ios {
  background: linear-gradient(45deg, #007aff, #005cbf);
}

#installButton.ios:hover {
  background: linear-gradient(45deg, #005cbf, #004a99);
}

/* Botón de notificaciones (esquina superior izquierda) */
#notificationsButton {
  position: fixed;
  top: 20px;
  left: 20px;
  margin: 0;
  padding: 12px 16px;
  background: linear-gradient(45deg, #4a90e2, #357abd);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  height: 40px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: inline-flex;
  visibility: hidden;
  transition: all 0.3s ease;
  min-width: 140px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#notificationsButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  background: linear-gradient(45deg, #357abd, #2a5f99);
}

#notificationsButton:active {
  transform: translateY(0px);
}

/* Banner superior de primera vez */
#notificationTopBanner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: white;
  padding: 12px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  animation: slideDown 0.4s ease-out;
  display: none;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.top-banner-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.top-banner-text {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-banner-text span {
  font-size: 20px;
}

.top-banner-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.top-banner-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.top-banner-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.top-banner-btn.accept {
  background: white;
  color: #4a90e2;
}

.top-banner-btn.accept:hover {
  background: #f0f0f0;
}

.top-banner-btn.dismiss {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.top-banner-btn.dismiss:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* Banner de información (post-activación/desactivación) */
#infoBanner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: calc(100% - 40px);
  z-index: 10001;
  animation: slideUp 0.4s ease-out;
  color: white;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.info-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.info-text {
  flex: 1;
}

.info-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
  color: #fff;
}

.info-text p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
}

.info-dismiss {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  margin-left: 8px;
  transition: color 0.2s;
}

.info-dismiss:hover {
  color: #fff;
}

#qtstatus {
  color: white;
  font-size: 18px;
  margin-top: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Responsive design - Mobile first approach */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  #qtspinner {
    padding: 15px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 100vh;
  }
  
  #loginForm {
    max-width: calc(100% - 40px);
    margin: 0 auto;
    padding: 15px 10px;
    border-radius: 12px;
    min-height: 360px;
    width: calc(100% - 40px);
    box-sizing: border-box;
  }
  
  #loginForm .logo {
    max-width: 100px;
    margin-bottom: 12px;
  }
  
  #loginForm input {
    padding: 14px 10px;
    font-size: 16px;
    margin: 6px 0;
    border-radius: 10px;
  }
  
  #loginForm button {
    padding: 16px 10px;
    font-size: 16px;
    margin-top: 8px;
    min-height: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .error-message {
    font-size: 13px;
    margin-top: 8px;
  }

  #qtstatus {
    font-size: 16px;
    margin-top: 15px;
  }
  
  #notificationTopBanner {
    padding: 10px 15px;
  }
  
  .top-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .top-banner-text {
    text-align: center;
    justify-content: center;
  }
  
  .top-banner-text p {
    font-size: 13px;
  }
  
  .top-banner-buttons {
    justify-content: center;
    width: 100%;
  }
  
  .top-banner-btn {
    flex: 1;
    padding: 10px;
  }
  
  #infoBanner {
    bottom: 10px;
    width: calc(100% - 20px);
    padding: 12px 16px;
  }
  
  .info-content {
    gap: 10px;
  }
  
  .info-icon {
    font-size: 24px;
  }
  
  .info-text strong {
    font-size: 14px;
  }
  
  .info-text p {
    font-size: 12px;
  }
  
  #notificationsButton {
    top: 10px !important;
    left: 10px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    min-width: 120px !important;
  }
}

/* Para pantallas muy pequeñas (móviles pequeños) */
@media (max-width: 480px) {
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
  }
  
  #qtspinner {
    padding: 10px !important;
    margin: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
  }
  
  #qtspinner center {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: center !important;
  }
  
  #loginForm {
    margin: 0 auto !important;
    padding: 15px 10px !important;
    width: calc(100vw - 60px) !important;
    max-width: calc(100vw - 60px) !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    min-width: auto !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    margin-bottom: 0 !important;
  }
  
  #loginForm .logo {
    max-width: 80px !important;
    margin-bottom: 12px !important;
  }
  
  #loginForm input {
    margin: 8px 0 !important;
    padding: 14px 10px !important;
    font-size: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
  }
  
  #loginForm button {
    padding: 16px 10px !important;
    font-size: 16px !important;
    margin: 12px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    min-height: 50px !important;
  }
  
  .remember-switch {
    margin: 10px 0 !important;
  }
  
  .switch-label {
    font-size: 13px !important;
  }
  
  /* Estilos responsivos para el popup */
  .request-access-link {
    margin-top: 12px !important;
  }
  
  .request-access-link a {
    font-size: 13px !important;
  }
  
  .popup-overlay {
    padding: 15px !important;
  }
  
  .popup-content {
    max-width: calc(100vw - 30px) !important;
  }
  
  .popup-header {
    padding: 15px !important;
  }
  
  .popup-header h3 {
    font-size: 16px !important;
  }
  
  .popup-body {
    padding: 20px !important;
  }
  
  .popup-body p, .popup-body li {
    font-size: 14px !important;
  }
  
  .email-field {
    margin: 15px 0 !important;
    padding: 12px !important;
  }
  
  .email-field label {
    font-size: 13px !important;
  }
  
  .popup-email-input {
    padding: 10px !important;
    font-size: 15px !important;
  }
  
  .email-help {
    font-size: 11px !important;
  }
  
  .popup-footer {
    padding: 15px !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  .whatsapp-button, .cancel-button {
    width: 100% !important;
    font-size: 15px !important;
  }
}

/* Para pantallas extra pequeñas (móviles muy pequeños) */
@media (max-width: 360px) {
  #qtspinner {
    padding: 5px !important;
    margin: 0 !important;
  }
  
  #loginForm {
    width: calc(100vw - 40px) !important;
    max-width: calc(100vw - 40px) !important;
    padding: 12px 8px !important;
    border-radius: 8px !important;
    margin: 0 auto !important;
  }
  
  #loginForm input {
    padding: 12px 8px !important;
    font-size: 15px !important;
    margin: 6px 0 !important;
  }
  
  #loginForm button {
    padding: 14px 8px !important;
    font-size: 15px !important;
    margin: 10px 0 !important;
    min-height: 48px !important;
  }
  
  .remember-switch {
    margin: 8px 0 !important;
  }
  
  .switch-label {
    font-size: 12px !important;
  }
  
  #installButton {
    top: 10px !important;
    right: 10px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    min-width: 100px !important;
  }
}

/* Para pantallas muy pequeñas en altura (landscape móvil) */
@media (max-height: 600px) {
  #qtspinner {
    padding-top: 5px;
  }
  
  #loginForm {
    padding: 12px 10px;
  }
  
  #loginForm .logo {
    max-width: 70px;
    margin-bottom: 8px;
  }
  
  #loginForm input {
    padding: 12px 8px;
    margin: 4px 0;
  }
  
  #loginForm button {
    padding: 14px 8px;
    margin-top: 6px;
    min-height: 44px;
  }
}

/* Evitar zoom en iOS cuando se toca input */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  #loginForm input {
    font-size: 16px;
  }
}
