/* Botón Mis Documentos ancho triple en el grid */
#open-docs.elite-btn {
  grid-column: span 3;
  width: 100%;
  max-width: none;
  min-width: 0;
  justify-content: center;
}
@media (max-width: 900px) {
/* Botón 'Mis Documentos' ocupa 3 columnas en desktop y 100% en móvil */
#open-docs.elite-btn {
  grid-column: span 3;
}

@media (max-width: 700px) {
  #open-docs.elite-btn {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    justify-self: stretch;
  }
}
}
@media (max-width: 600px) {
  #open-docs.elite-btn {
    grid-column: span 1;
  }
}
/* --- Botón rectangular destacado para Mis Documentos --- */

/* --- Recuadro de seguridad y beneficio en el modal de documentos --- */
#docs-modal .oil-modal-content > div[style*="background:#0e223a"] {
  border: 2px solid #00e5ff;
  background: linear-gradient(90deg, #0e223a 60%, #101c2c 100%);
  margin-bottom: 20px;
  box-shadow: 0 2px 16px #00e5ff22;
}
/* --- Documentos Modal y Botón --- */
#docs-modal .oil-modal-content {
  background: #101c2c;
  border: 2px solid #00e5ff;
  border-radius: 16px;
  box-shadow: 0 4px 32px #00e5ff33;
  color: #fff;
  padding: 32px 18px 24px 18px;
  position: relative;
  max-width: 420px;
  width: 96vw;
  margin: 0 auto;
}
#docs-modal .oil-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 2rem;
  color: #00e5ff;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10;
}
#docs-modal input[type="file"]::-webkit-file-upload-button {
  background: #00e5ff;
  color: #101c2c;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
}
#docs-modal input[type="file"]::file-selector-button {
  background: #00e5ff;
  color: #101c2c;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
}
#docs-modal button,
#docs-modal a[download] {
  transition: background 0.2s, color 0.2s;
}
#docs-modal button:hover,
#docs-modal a[download]:hover {
  background: #00b8cc;
  color: #fff;
}
#docs-modal #docs-preview > div,
#docs-modal #saved-docs-list > div {
  transition: box-shadow 0.2s;
}
#docs-modal #docs-preview > div:hover,
#docs-modal #saved-docs-list > div:hover {
  box-shadow: 0 0 12px #00e5ff77;
}
/* Root Variables */
:root {
  --bg-1: #0a1020;
  --bg-2: #181c2b;
  --accent: #7fd7ff;
  --accent-2: #b2eaff;
  --accent-3: #fff6e0;
  --accent-glow: #00f0ff;
  --text-light: #f5f7fa;
  --text-dark: #23243a;
  --btn-gradient: linear-gradient(90deg, #7fd7ff 0%, #b2eaff 100%);
  --btn-gradient-hover: linear-gradient(90deg, #b2eaff 0%, #7fd7ff 100%);
  --glass: rgba(24,28,43,0.85);
  --glass-blur: blur(12px);
}

/* Light Mode Theme */
body.light-mode {
  --bg-1: #f5f7fa;
  --bg-2: #ffffff;
  --accent: #7fd7ff;
  --accent-2: #b2eaff;
  --accent-3: #fff6e0;
  --text-light: #23243a;
  --text-dark: #181a23;
  --btn-gradient: linear-gradient(90deg, #b2eaff 0%, #fff6e0 100%);
  --btn-gradient-hover: linear-gradient(90deg, #fff6e0 0%, #b2eaff 100%);
}

/* Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  background: var(--bg-1);
  color: var(--text-light);
  min-height: 100vh;
  margin: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  letter-spacing: 0.01em;
}

/* Layout */
.main-container {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
  height: auto;
  overflow-y: visible;
}

/* Header */
.elite-header {
  width: 100vw;
  max-width: 520px;
  margin: 0 auto 16px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
}

.elite-logo {
  max-width: 220px !important;
  width: 100%;
  display: block;
  margin: 0 auto 8px auto;
  filter: drop-shadow(0 0 32px var(--accent-glow)) drop-shadow(0 0 64px var(--accent-2));
  border-radius: 24px;
  background: rgba(255,255,255,0.02);
  box-shadow: 0 0 64px 0 var(--accent-glow);
}

/* Grid Layout */
.elite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 32px auto;
}

/* Buttons */
.elite-btn {
  background: var(--glass);
  border: 1.5px solid var(--accent-2);
  border-radius: 18px;
  box-shadow: 0 4px 32px rgba(127,215,255,0.10), 0 0 0 2px var(--accent-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 8px 14px 8px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.12rem;
  transition: background .3s, color .3s, box-shadow .3s, border .3s;
  min-height: 100px;
  backdrop-filter: var(--glass-blur);
  position: relative;
  overflow: hidden;
}

.elite-btn:hover {
  background: var(--btn-gradient-hover);
  color: var(--accent-3);
  box-shadow: 0 0 48px var(--accent-glow), 0 0 32px var(--accent-2);
  border: 2.5px solid var(--accent-glow);
}

/* Button Icons */
.elite-btn-icon {
  width: 68px !important;
  height: 68px !important;
  font-size: 2.7rem !important;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #181c2b !important;
  border-radius: 18px;
  box-shadow: none !important;
  border: none !important;
}

.elite-btn-icon img, 
.elite-btn-icon svg {
  width: 54px !important;
  height: 54px !important;
  object-fit: contain;
  filter: none !important;
}

/* Button Text */
.elite-btn-text {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 40px;
  font-size: 1.08rem;
  padding: 4px 0 0 0;
  color: var(--accent-2);
  text-shadow: 0 2px 8px #23243a;
}

/* Oil Change Button */
.elite-oil-change {
  background: #181c2b !important;
  color: #fff !important;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(24,28,43,0.18);
  transition: background .3s, color .3s, box-shadow .3s;
  padding: 18px 36px;
  font-size: 1.25rem;
  margin: 36px auto 0 auto;
  cursor: pointer;
  text-align: center;
  max-width: 350px;
  display: block;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.elite-oil-change:hover {
  background: #22304a !important;
  color: #7fd7ff !important;
  box-shadow: 0 0 24px #22304a;
}

/* Tagline */
.tagline {
  margin-bottom: 30px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #aaff77 !important;
  opacity: 1;
  text-shadow: 0 2px 12px #000a;
}

/* Modals */
.oil-modal,
.afiliados-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 20, 40, 0.96);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.oil-modal-content,
.afiliados-content {
  background: var(--glass);
  border-radius: 18px;
  box-shadow: 0 8px 40px 0 var(--accent-glow), 0 0 0 2px var(--accent-2);
  color: var(--text-light);
  padding: 32px 24px;
  max-width: 600px;
  width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  font-family: 'Montserrat', sans-serif;
  backdrop-filter: var(--glass-blur);
}

/* Modal close button */
.oil-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--accent-2);
  cursor: pointer;
  z-index: 10001;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.oil-modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent-glow);
}

/* Form Styles */
/* Oil and Kit Forms Styles */
#oil-form,
#kit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#oil-form label,
#kit-form label {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-2);
  font-weight: 500;
}

#oil-form input[type="text"],
#oil-form input[type="date"],
#oil-form input[type="number"],
#oil-form input[type="email"],
#kit-form input[type="text"],
#kit-form input[type="date"],
#kit-form input[type="number"],
#kit-form input[type="email"] {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--accent-2);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--text-light);
  font-size: 1rem;
  transition: all 0.3s;
}

#oil-form input:focus,
#kit-form input:focus {
  outline: none;
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 2px var(--accent-glow);
  background: rgba(255,255,255,0.1);
}

#oil-form button[type="submit"],
#kit-form button[type="submit"] {
  background: var(--accent);
  color: var(--bg-1);
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
  width: 100%;
}

#oil-form button[type="submit"]:hover,
#kit-form button[type="submit"]:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

#oil-form button[type="submit"]:disabled,
#kit-form button[type="submit"]:disabled {
  background: #666;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Radio Button Styles */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Error styles */
.error {
  border-color: #ff4444 !important;
  box-shadow: 0 0 0 2px #ff4444 !important;
}

/* Afiliados Grid */
.afiliados-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
}

.afiliado-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  box-shadow: 0 4px 32px var(--accent-glow), 0 0 32px var(--accent-2);
  padding: 24px 18px;
  width: 100%;
  max-width: 420px;
  border: 1.5px solid var(--accent-2);
  backdrop-filter: var(--glass-blur);
}

.afiliado-card img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: 0;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 2px 12px var(--accent-glow);
  flex-shrink: 0;
}

.afiliado-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  margin-left: 10px;
}

.afiliado-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px var(--accent-glow);
  width: 100%;
  text-align: left;
  word-break: break-word;
}

.afiliado-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
  width: 100%;
}

.afiliado-links img {
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 8px;
  background: var(--accent-3);
  box-shadow: 0 2px 8px var(--accent-glow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1.5px solid var(--accent-2);
}

.afiliado-links img:hover {
  transform: scale(1.13);
  box-shadow: 0 0 24px var(--accent-glow), 0 0 32px var(--accent-2);
}

/* Gallery */
.promo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  justify-content: center;
}

.promo-grid img {
  width: calc(50% - 4px);
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.gallery-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  transition: transform 0.3s ease-out;
  transform: scale(1);
  user-select: none;
  -webkit-user-select: none;
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20001;
  transition: background 0.3s;
}

.gallery-prev:hover,
.gallery-next:hover {
  background: rgba(255,255,255,0.3);
}

.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }

.gallery-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0,0,0,0.5);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 20001;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100vw; 
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 20%, #1b3358 0%, #0a1020 80%), linear-gradient(120deg, #0a1020 0%, #1b3358 50%, #0a1020 100%);
  background-blend-mode: screen, normal;
  background-size: 200% 200%;
  animation: gradientShift 12s ease-in-out infinite;
  filter: blur(2px) brightness(1.1);
}

.animated-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(32px) brightness(1.1) saturate(1.1);
  opacity: 0.55;
  mix-blend-mode: lighten;
  animation: blobMoveY 14s ease-in-out infinite alternate;
}

.animated-bg .blob1 {
  width: 420px; 
  height: 420px;
  background: radial-gradient(circle at 60% 40%, #7fff7a 0%, #00ffb0 80%, transparent 100%);
  left: -120px; 
  top: -80px;
  animation-delay: 0s;
}

.animated-bg .blob2 {
  width: 340px; 
  height: 340px;
  background: radial-gradient(circle at 40% 60%, #7fff7a 0%, #00ffb0 80%, transparent 100%);
  right: -100px; 
  top: 40px;
  animation-delay: 3s;
}

.animated-bg .blob3 {
  width: 320px; 
  height: 320px;
  background: radial-gradient(circle at 60% 60%, #7fff7a 0%, #00ffb0 80%, transparent 100%);
  left: 30vw; 
  bottom: -120px;
  animation-delay: 6s;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#preloader .spinner {
  width: 60px;
  height: 60px;
  border: 6px solid var(--bg-2);
  border-top: 6px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Theme Toggle */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform .2s;
  z-index: 2;
}

#theme-toggle:active {
  transform: scale(0.9);
}

#theme-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Footer */
.elite-footer-final {
  width: 100vw;
  background: #181c2b;
  color: #b2eaff;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 18px 0 12px 0;
  letter-spacing: 0.04em;
  box-shadow: 0 -2px 16px #0a1020cc;
  margin-top: 32px;
  z-index: 2;
}

/* Animations */
@keyframes shine {
  0% { left: -75%; }
  100% { left: 125%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes rippleEffect {
  to { transform: scale(4); opacity: 0; }
}

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

@keyframes blobMoveY {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(360deg); }
}

/* Ripple Effect */
.ripple { 
  position: absolute; 
  border-radius: 50%; 
  transform: scale(0); 
  background: rgba(255,255,255,0.4); 
  animation: rippleEffect 0.6s linear; 
}

/* Mobile Styles */
@media (max-width: 600px) {
  .main-container {
    padding: 0 2vw;
  }

  .elite-header {
    padding-top: 12px;
    margin-bottom: 12px;
  }

  .elite-logo {
    max-width: 180px !important;
  }

  .elite-grid {
    gap: 10px;
    max-width: 98vw;
  }

  .elite-btn {
    min-height: 70px;
    font-size: 0.98rem;
    padding: 12px 2px 8px 2px;
    border-radius: 8px;
  }

  .elite-btn-icon {
    width: 44px !important;
    height: 44px !important;
  }

  .elite-btn-icon img,
  .elite-btn-icon svg {
    width: 38px !important;
    height: 38px !important;
  }

  .oil-modal-content,
  .afiliados-content {
    padding: 20px 16px;
    max-width: 99vw;
    width: 99vw;
  }

  .elite-footer-final {
    font-size: 0.98rem;
    padding: 12px 0 8px 0;
    margin-top: 18px;
  }

  .tagline {
    font-size: 0.82rem !important;
    margin-top: 2px !important;
    margin-bottom: 4px !important;
    text-align: center !important;
  }

  .elite-btn-text {
    font-size: 0.78rem !important;
    min-height: 16px !important;
    padding: 1px 0 0 0 !important;
  }

  .elite-oil-change {
    font-size: 0.82rem !important;
    padding: 6px 0 !important;
    margin: 10px auto 8px auto !important;
    max-width: 98vw !important;
    border-radius: 8px !important;
  }

  .afiliado-card {
    flex-direction: column;
    align-items: center;
    padding: 16px 6px;
    gap: 10px;
    max-width: 98vw;
  }

  .afiliado-card img {
    width: 64px;
    height: 64px;
    margin-bottom: 0;
  }

  .afiliado-info {
    align-items: center;
    margin-left: 0;
    width: 100%;
  }

  .afiliado-card h3 {
    text-align: center;
    font-size: 1.1rem;
  }

  .afiliado-links {
    justify-content: center;
  }

  #oil-form input[type="text"],
  #oil-form input[type="date"],
  #oil-form input[type="number"],
  #oil-form input[type="email"] {
    padding: 10px;
    font-size: 0.95rem;
  }

  #oil-form button[type="submit"] {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .promo-grid {
    gap: 4px;
    padding: 8px;
  }
  
  .promo-grid img {
    width: calc(50% - 2px);
    height: 140px;
  }
  
  .gallery-prev,
  .gallery-next {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  
  .gallery-prev { left: 10px; }
  .gallery-next { right: 10px; }
  
  .gallery-counter {
    bottom: 16px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}