* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f5f7fb 0%, #eef2f6 100%);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-header {
  background: #000000;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  width: 240px;
  height: auto;
  max-height: 70px;
  object-fit: contain;
  border-radius: 12px;
}

.hamburger-menu {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.hamburger-menu:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100%;
  background: #0f1219;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu.open {
  right: 0;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
}

.mobile-menu-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
}

.mobile-nav a {
  color: #e0e4ec;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-nav a:hover {
  color: #00A86B;
  padding-left: 0.5rem;
}

.login-directo {
  max-width: 480px;
  width: 90%;
  margin: 3rem auto;
  text-align: center;
  flex: 1;
  position: relative;
}

.titulo {
  font-size: 2rem;
  font-weight: 600;
  color: #0a2540;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.titulo-destacado {
  display: block;
  font-weight: 800;
  background: linear-gradient(135deg, #000000 0%, #1a4a6f 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.descripcion {
  color: #5b6e8c;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 2rem;
  text-align: center;
}

.highlight {
  color: #00A86B;
  font-weight: 600;
}

.input-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.input-icono {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon {
  position: absolute;
  left: calc(50% - 180px + 0.8rem);
  pointer-events: none;
  z-index: 2;
  transition: all 0.2s ease;
}

@media (max-width: 550px) {
  .input-icon {
    left: calc(50% - 160px + 0.8rem);
  }
}

.input-icono input {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 0.9rem 1rem 0.9rem 2.5rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 0px;
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
  color: #0a2540;
  font-weight: 500;
  display: block;
  position: relative;
}

.input-icono input:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.1);
}

.input-icono input:focus {
  border-color: #adabab;
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.input-icono input::placeholder {
  color: #797777;
  font-weight: 400;
  font-size: 0.9rem;
}

.password-container {
  position: relative;
}

.password-container input {
  padding: 0.9rem 2.5rem 0.9rem 1rem;
}

.toggle-password {
  position: absolute;
  right: calc(50% - 180px + 0.5rem);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  transition: all 0.2s ease;
}

@media (max-width: 550px) {
  .toggle-password {
    right: calc(50% - 160px + 0.5rem);
  }
}

.eye-icon {
  transition: stroke 0.2s;
}

.toggle-password:hover .eye-icon {
  stroke: #000000;
}

.input-hint {
  display: block;
  font-size: 0.7rem;
  color: #8e9eae;
  margin-top: 0.5rem;
  text-align: center;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.5rem 0 1.8rem 0;
}

.checkbox-wrapper input {
  width: 1rem;
  height: 1rem;
  accent-color: #000000;
  cursor: pointer;
  margin: 0;
}

.checkbox-wrapper label {
  font-size: 0.85rem;
  color: #2c3e50;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.btn-continuar {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: #94989c;
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: white;
  border-radius: 0px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.btn-continuar.active {
  background: #000000;
}

.btn-continuar.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-continuar:active {
  transform: scale(0.98);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn-continuar.active:hover .btn-arrow {
  transform: translateX(4px);
}

.footer-links {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.75rem;
}

.footer-links a {
  color: #000000;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #000000;
}

.separator {
  color: #000000;
  margin: 0 0.5rem;
}

.message-area {
  background: #ffefef;
  border-left: 4px solid #e53e3e;
  padding: 0.75rem 1rem;
  border-radius: 0px;
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
  color: #b91c1c;
  display: none;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

.message-area.show {
  display: flex;
}

.main-footer {
  background: #ffffff;
  border-top: 1px solid #ffffff;
  padding: 0.75rem 1rem;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo-area {
  margin-bottom: 0.25rem;
}

.footer-logo-img {
  width: 140px;
  height: auto;
  border-radius: 17px;
  object-fit: contain;
  opacity: 0.;
  transition: opacity 0.2s;
}

.footer-logo-img:hover {
  opacity: 1;
}

.footer-credit {
  font-size: 0.95rem;
  color: #000000;
  margin-bottom: 0.25rem;
}

.footer-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.95rem;
  row-gap: 0.25rem;
}

.footer-links-grid a {
  color: #121213;
  text-decoration: none;
  font-size: 0.7rem;
  transition: color 0.2s;
}

.footer-links-grid a:hover {
  color: #000000;
  text-decoration: underline;
}

/* ========== NUEVOS ESTILOS PARA SPINER Y OTP ========== */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.spinner-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spinner-container {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner-text {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.otp-message-area {
  background: #ffefef;
  border-left: 4px solid #e53e3e;
  padding: 0.75rem 1rem;
  border-radius: 0px;
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
  color: #b91c1c;
  display: none;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

.otp-message-area.show {
  display: flex;
}

.otp-group {
  margin: 1.5rem 0;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.otp-input {
  width: 60px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 0px;
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
  color: #0a2540;
}

.otp-input:focus {
  border-color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.1);
}

.btn-verificar {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: #000000;
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: white;
  border-radius: 0px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
}

.btn-verificar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.resend-link {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #5b6e8c;
}

.resend-link a {
  color: #0066b3;
  text-decoration: none;
}

.resend-link a:hover {
  text-decoration: underline;
}

/* ========== ESTILOS DEL MODAL ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: white;
  max-width: 400px;
  width: 90%;
  padding: 2rem;
  text-align: center;
  border-radius: 0px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0a2540;
  margin-bottom: 0.75rem;
}

.modal-message {
  font-size: 0.9rem;
  color: #5b6e8c;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-loader {
  margin-bottom: 1.5rem;
  display: none;
}

.modal-loader.active {
  display: block;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: #00A86B;
  transition: width 0.1s linear;
}

.loader-text {
  font-size: 0.8rem;
  color: #00A86B;
  font-weight: 500;
}

.modal-btn {
  background: #000000;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: white;
  border-radius: 0px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.modal-success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem auto;
}

.checkmark-circle {
  width: 60px;
  height: 60px;
  position: relative;
  display: inline-block;
}

.checkmark {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #00A86B;
  stroke-miterlimit: 10;
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle-svg {
  width: 60px;
  height: 60px;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes fill {
  100% {
    box-shadow: inset 0px 0px 0px 30px #00A86B;
  }
}

/* ========== RESPONSIVE - LOGO AJUSTADO ========== */
@media (max-width: 550px) {
  .login-directo {
    width: 92%;
    margin: 2rem auto;
  }
  
  .titulo {
    font-size: 1.6rem;
  }
  
  .descripcion {
    font-size: 0.85rem;
  }
  
  .main-header {
    padding: 0.875rem 1.25rem;
  }
  
  .logo-img {
    width: 190px;
    max-height: 60px;
  }
  
  .input-icono input,
  .btn-continuar,
  .btn-verificar {
    max-width: 320px;
  }

  .footer-links-grid {
    gap: 0.5rem;
  }

  .footer-links-grid a {
    font-size: 0.55rem;
  }

  .footer-logo-img {
    width: 45px;
  }

  .otp-input {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .otp-inputs {
    gap: 0.5rem;
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 380px) {
  .logo-img {
    width: 160px;
    max-height: 55px;
  }
}
