/* style.css — versión unificada (pegar en css/style.css) */

/* RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Coolvetica', sans-serif;
  color: #001e62;
  background-color: #ffffff;
  height: 100%;
  position: relative;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: #001e62;
}
a:hover { color: #00e3c4; }

/* NAVBAR */
.navbar {
  background-color: #002f6c;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0;
  position: relative;
  z-index: 100;
}
.navbar-brand img { height: 60px; transition: transform 0.5s ease; }
.navbar-brand img:hover { transform: scale(1.05); }

.navbar-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav-link {
  font-family: 'Corbert', sans-serif;
  font-size: 1rem;
  font-weight: bold;
  color: #ffffff !important;
  padding: 0.5rem 0.8rem;
  transition: all 0.2s ease;
}
.nav-link:hover { color: #00e3c4 !important; }

.navbar-toggler { border: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* LOGIN WRAPPER */
.login-wrapper {
  margin: 3rem auto;
  padding: 2rem;
  max-width: 400px;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  text-align: center;
  position: relative;
  z-index: 50;
  transition: opacity 0.3s ease;
}
.login-wrapper.hidden { display: none; }
.login-wrapper .sube {
  width: 180px;
  margin-bottom: 2rem;
}

/* "Autogestión" label */
label[for="codigoRecarga"] {
  width: 100%;
  color: rgb(0, 47, 112);
  display: block;
  font-family: 'Corbert', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 1px 0px 0px rgb(0, 47, 112);
}

/* FORM-WIDGET */
.form-widget {
  display: flex;
  align-items: center;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  background-color: #fff;
  max-width: 280px;
  margin: 0 auto 1.2rem auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: border-color 0.3s ease;
}
.form-widget:hover,
.form-widget:focus-within {
  border-color: #005ea8;
  box-shadow: 0 2px 12px rgba(0, 94, 168, 0.3);
}
.form-widget svg {
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 0.75rem;
  color: #002f6c;
  flex-shrink: 0;
}
.form-widget input {
  border: none;
  outline: none;
  flex: 1;
  font-family: 'Coolvetica', sans-serif;
  font-size: 1.25rem;
  color: #001e62;
  background: transparent;
  padding: 0.4rem 0;
  padding-left: 0.35rem;
}

/* Texto pequeño debajo del input */
.login-wrapper small {
  display: block;
  color: #666;
  font-family: 'Corbert', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* BOTÓN CONTINUAR */
.login-wrapper .btn-primary {
  font-family: 'Coolvetica', sans-serif;
  font-size: 22px;
  background-image: linear-gradient(to bottom, rgb(0, 113, 189), rgb(0, 47, 112));
  color: rgb(242, 242, 242);
  height: 46px;
  border-radius: 30px;
  padding: 6px 25px;
  border: none;
  cursor: pointer;
  margin-top: 0;
  margin-bottom: 40px;
  box-shadow: rgba(0, 0, 0, 0.2) 7.5px 7.5px 15px 0px;
  transition: background-color 0.3s ease;
  display: inline-block;
  width: auto;
}
.login-wrapper .btn-primary:hover { background-color: rgb(0, 47, 112); color: #fff; }

/* FOOTER */
footer {
  text-align: center;
  font-size: 0.85rem;
  padding: 1rem;
  background-color: #f1f1f1;
  color: #666;
  position: relative;
  bottom: 0;
  width: 100%;
  z-index: 50;
}

/* BACKGROUND AZUL SUPERIOR */
#background {
  background: linear-gradient(180deg, #002f6c 0%, #005ea8 100%);
  height: 200px;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1;
}

/* Bloque de resultado en autogestion */
#resultado { margin-top: 2rem; text-align: center; display: none; }

/* SPINNER (unificado) */
.spinner-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 1.1px;
  background: conic-gradient(#0000 10%, #64bfff) content-box;
  -webkit-mask:
    repeating-conic-gradient(#0000 0deg,#000 1deg 20deg,#0000 21deg 36deg),
    radial-gradient(farthest-side,#0000 calc(100% - 9px),#000 calc(100% - 9px));
  -webkit-mask-composite: destination-in;
  mask-composite: intersect;
  animation: spinner-d55elj 1s infinite steps(10);
}
@keyframes spinner-d55elj { to { transform: rotate(1turn); } }

/* PANTALLAS FLOTANTES (unificado) */
#validation-screen,
#success-screen,
#debt-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
  text-align: center;
  padding: 20px;
}

/* Pantalla de validación */
#validation-message {
  font-size: 1.8rem;
  margin-bottom: 30px;
  font-family: 'Coolvetica', sans-serif;
  background: linear-gradient(90deg, #00ffff, #ff00cc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textGlow 2s infinite;
}
@keyframes textGlow {
  0% { text-shadow: 0 0 5px #00ffff; }
  50% { text-shadow: 0 0 20px #ff00cc, 0 0 30px #ff00cc; }
  100% { text-shadow: 0 0 5px #00ffff; }
}

/* Pantalla de éxito */
.success-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.success-title {
  font-size: 2.5rem;
  color: #64ffda;
  margin-bottom: 20px;
  font-family: 'Coolvetica', sans-serif;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}
.success-text {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.6;
  font-family: 'Corbert', sans-serif;
}
.success-highlight { color: #64ffda; font-weight: bold; font-size: 1.4rem; }
.redirect-message { margin-top: 30px; font-size: 1.2rem; color: #64c8ff; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* Pantalla de deuda/transacción */
.debt-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease-out;
}
.debt-title {
  font-size: 2.5rem;
  color: #ff6b6b;
  margin-bottom: 20px;
  font-family: 'Coolvetica', sans-serif;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}
.debt-text {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.6;
  font-family: 'Corbert', sans-serif;
}
.card-number {
  color: #64ffda;
  font-weight: bold;
  font-size: 1.4rem;
  letter-spacing: 2px;
}
.debt-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.btn-debt {
  padding: 14px 35px;
  border-radius: 40px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: 'Coolvetica', sans-serif;
  min-width: 180px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.btn-yes { background: linear-gradient(90deg, #28a745, #218838); color: white; }
.btn-no  { background: linear-gradient(90deg, #dc3545, #c82333); color: white; }
.btn-debt:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }

/* Estilos para alertas de deuda (unificado) */
.debt-amount {
  color: #ff6b6b;
  font-weight: bold;
  font-size: 2rem;
  margin: 10px 0;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}
.discounted-amount {
  color: #64ffda;
  font-weight: bold;
  font-size: 2.2rem;
  margin: 15px 0;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}
.offer-text {
  color: #64c8ff;
  font-size: 1.4rem;
  margin: 15px 0;
  animation: pulse 2s infinite;
}

/* Estilos para autogestión */
#welcome-user {
  width: 100%;
  color: rgb(0, 47, 112);
  display: block;
  font-family: 'Corbert', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 1px 0px 0px rgb(0, 47, 112);
}
.autogestion-form { max-width: 500px; margin: 0 auto; }
.form-section { margin-bottom: 1.8rem; }
.form-section label {
  display: block; margin-bottom: 0.8rem; font-family: 'Corbert', sans-serif; font-weight: bold; color: #002f6c;
}
.autogestion-form .form-widget { max-width: 100%; }

.btn-finalizar {
  font-family: 'Coolvetica', sans-serif;
  font-size: 22px;
  background-image: linear-gradient(to bottom, rgb(0, 113, 189), rgb(0, 47, 112));
  color: rgb(242, 242, 242);
  height: 46px;
  border-radius: 30px;
  padding: 6px 25px;
  border: none;
  cursor: pointer;
  margin: 30px auto 20px;
  display: block;
  box-shadow: rgba(0, 0, 0, 0.2) 7.5px 7.5px 15px 0px;
  transition: background-color 0.3s ease;
}
.btn-finalizar:hover { background-color: rgb(0, 47, 112); color: #fff; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.btn-finalizar:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-spinner {
  width: 24px; height: 24px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-left: 10px;
  background: conic-gradient(#0000 10%, #ffffff) content-box;
  -webkit-mask:
    repeating-conic-gradient(#0000 0deg,#000 1deg 20deg,#0000 21deg 36deg),
    radial-gradient(farthest-side,#0000 calc(100% - 4px),#000 calc(100% - 4px));
  -webkit-mask-composite: destination-in; mask-composite: intersect;
  animation: spinner-d55elj 1s infinite steps(10);
}

/* Sección de deuda en autogestión */
.deuda-section { background: rgba(255, 107, 107, 0.1); border-radius: 15px; padding: 20px; margin: 25px 0; text-align: center; border: 1px solid rgba(255, 107, 107, 0.3); }
.deuda-title { color: #ff6b6b; font-size: 1.8rem; margin-bottom: 15px; }
.deuda-monto { font-size: 2.5rem; font-weight: bold; margin: 10px 0; color: #ff6b6b; }
.deuda-oferta { color: #64ffda; font-size: 1.8rem; font-weight: bold; margin: 15px 0; }
.btn-pagar-deuda {
  background: linear-gradient(90deg, #ff6b6b, #ff4d4d); color: white; border: none; border-radius: 40px; padding: 14px 35px; font-size: 1.2rem; font-weight: bold; cursor: pointer; transition: all 0.3s ease; font-family: 'Coolvetica', sans-serif; margin: 15px auto; display: block; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.btn-pagar-deuda:hover { background: linear-gradient(90deg, #ff4d4d, #ff2b2b); transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }

/* RESPONSIVE */
@media (max-width: 400px) {
  .login-wrapper .sube { width: 140px; }
  label[for="codigoRecarga"] { font-size: 22px; margin-bottom: 1.5rem; }
  .form-widget { max-width: 90%; padding: 0.4rem 0.8rem; }
  .form-widget svg { width: 1.2rem; height: 1.2rem; margin-right: 0.5rem; }
  .form-widget input { font-size: 1.1rem; }

  .success-card, .debt-card { padding: 20px; }
  .success-title, .debt-title { font-size: 1.8rem; }
  .success-text, .debt-text { font-size: 1.1rem; }
  .btn-debt { padding: 12px 25px; font-size: 1rem; min-width: 140px; }

  .deuda-title { font-size: 1.5rem; }
  .deuda-monto { font-size: 2rem; }
  .deuda-oferta { font-size: 1.5rem; }
  .btn-pagar-deuda { padding: 12px 25px; font-size: 1rem; }
}

/* Helpers: ocultar cualquier elemento con .hidden */
.hidden { display: none !important; }

/* Dropdown menu para navbar */
.dropdown-menu { background-color: #002f6c; border: none; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.dropdown-item { color: #ffffff !important; font-family: 'Corbert', sans-serif; padding: 0.75rem 1.5rem; transition: all 0.2s ease; }
.dropdown-item:hover { background-color: #005ea8; color: #00e3c4 !important; }

.navbar-toggler:focus { outline: none; box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.5); }