/* =============================================================
   auth.css — Sistema de diseño unificado para vistas de Auth
   Compartido por: login, register, forgot, verify, reset
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── Variables ───────────────────────────────────────────────────────── */
:root {
  --bg: #070e1a;
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.18);
  --accent: #4facfe;
  --accent-2: #00f2fe;
  --accent-g: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --text: #f1f5f9;
  --muted: rgba(241, 245, 249, 0.45);
  --card: rgba(13, 23, 40, 0.88);
  --inp-bg: rgba(255, 255, 255, 0.05);
  --inp-border: rgba(255, 255, 255, 0.10);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ─── Reset base ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Fondo: blobs + grilla ───────────────────────────────────────────── */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  animation: floatBlob 18s ease-in-out infinite;
}

@keyframes floatBlob {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  33% {
    transform: translateY(-25px) scale(1.05);
  }

  66% {
    transform: translateY(-12px) scale(.97);
  }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Stage ───────────────────────────────────────────────────────────── */
.auth-stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ─── Glass card ──────────────────────────────────────────────────────── */
.glass-card {
  background: var(--card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 172, 254, .45), transparent);
}

/* ─── Brand ───────────────────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--accent-g);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  color: #000;
}

/* ─── Card sections ───────────────────────────────────────────────────── */
.card-sm {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.card-md {
  width: 100%;
  max-width: 490px;
  position: relative;
  z-index: 1;
}

.c-head {
  padding: 30px 34px 26px;
  border-bottom: 1px solid var(--border);
}

.c-body {
  padding: 30px 34px;
}

.c-foot {
  padding: 18px 34px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.c-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

/* ─── Form fields ─────────────────────────────────────────────────────── */
.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.field-row label {
  margin-bottom: 0;
}

.field-inner {
  position: relative;
}

.f-ctrl {
  width: 100%;
  background: var(--inp-bg);
  border: 1.5px solid var(--inp-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12.5px 16px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.f-ctrl::placeholder {
  color: rgba(241, 245, 249, .22);
}

.f-ctrl:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, .12);
}

.f-ctrl.error {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .1);
}

.f-ctrl.pad-l {
  padding-left: 42px;
}

.f-ctrl.pad-r {
  padding-right: 42px;
}

.f-ico-l {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
}

.toggle-btn {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
  line-height: 1;
  transition: color .2s;
  display: flex;
  align-items: center;
}

.toggle-btn:hover {
  color: var(--text);
}

.f-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

.error-message {
  font-size: 12px;
  color: #f87171;
  margin-top: 5px;
  display: none;
}

.error-message.show {
  display: block;
}

/* ─── Botones ─────────────────────────────────────────────────────────── */
.btn-g {
  width: 100%;
  background: var(--accent-g);
  color: #000;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14.5px;
  cursor: pointer;
  letter-spacing: .3px;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 8px 24px rgba(79, 172, 254, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-g:hover:not(:disabled) {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(79, 172, 254, .38);
}

.btn-g:active {
  transform: scale(.98);
}

.btn-g:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-outline {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border-hi);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(79, 172, 254, .06);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px;
  transition: opacity .2s;
}

.btn-ghost:hover {
  opacity: .7;
}

/* ─── Loading spinner ─────────────────────────────────────────────────── */
.loading-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(0, 0, 0, .25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-right: 6px;
}

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

/* ─── Alertas (compatibles con JS: alert-error, alert-success) ────────── */
.alert {
  display: none;
  border-radius: 10px;
  padding: 11px 15px;
  font-size: 13.5px;
  margin-bottom: 1.2rem;
  align-items: center;
  gap: 9px;
}

.alert.show {
  display: flex;
}

.alert.alert-error.show {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .22);
  color: #fca5a5;
}

.alert.alert-success.show {
  background: rgba(52, 211, 153, .1);
  border: 1px solid rgba(52, 211, 153, .22);
  color: #6ee7b7;
}

.alert.alert-suspended.show {
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .22);
  color: #fcd34d;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
}

.alert-icon {
  font-size: 18px;
}

.alert-title {
  font-weight: 700;
  font-size: 14px;
}

.alert-contact {
  font-size: 12.5px;
  opacity: .85;
}

/* ─── Divider & links ─────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin: 1.4rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  opacity: .8;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color .2s;
  margin-bottom: 20px;
}

.back-link:hover {
  color: var(--text);
}

.txt-gradient {
  background: var(--accent-g);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Info box ────────────────────────────────────────────────────────── */
.info-box-note {
  background: rgba(79, 172, 254, .07);
  border: 1px solid rgba(79, 172, 254, .18);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: rgba(241, 245, 249, .7);
  margin-bottom: 1.2rem;
}

/* ─── Password requirements ───────────────────────────────────────────── */
.pass-reqs {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 9px;
  list-style: none;
}

.pass-reqs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 2px 0;
  transition: color .25s;
}

.pass-reqs li::before {
  content: '○';
  font-size: 10px;
  flex-shrink: 0;
}

.pass-reqs li.valid {
  color: #34d399;
}

.pass-reqs li.valid::before {
  content: '✓';
  color: #34d399;
}

/* Barra de fortaleza */
.strength-track {
  height: 3px;
  background: rgba(255, 255, 255, .08);
  border-radius: 2px;
  margin-top: 9px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .35s, background .35s;
}

/* ─── OTP inputs ──────────────────────────────────────────────────────── */
.code-inputs {
  display: flex;
  gap: 9px;
  justify-content: center;
  margin: 1.4rem 0;
}

.code-input {
  width: 52px;
  height: 60px;
  background: var(--inp-bg);
  border: 1.5px solid var(--inp-border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.code-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, .14);
}

.code-input.filled {
  border-color: rgba(79, 172, 254, .5);
  background: rgba(79, 172, 254, .07);
}

.code-input.error {
  border-color: rgba(248, 113, 113, .6);
  background: rgba(248, 113, 113, .05);
}

/* ─── Timer badge ─────────────────────────────────────────────────────── */
.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--muted);
}

.timer-badge strong {
  color: var(--accent);
}

.expiration-row {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1rem;
}

.resend-section {
  text-align: center;
  margin-top: 1.2rem;
}

.resend-timer {
  color: var(--accent);
  font-weight: 700;
}

/* ─── Debug code box (verify-code) ───────────────────────────────────── */
.email-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 172, 254, .08);
  border: 1px solid rgba(79, 172, 254, .2);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 20px;
  word-break: break-all;
  text-align: center;
}

.code-display-box {
  background: rgba(79, 172, 254, .05);
  border: 1px solid rgba(79, 172, 254, .3);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

.code-display-box.visible {
  display: block;
}

.code-display-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.code-display-value {
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: .25em;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(79, 172, 254, .4);
  user-select: all;
  margin-bottom: 12px;
}

.code-display-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 172, 254, .12);
  border: 1px solid rgba(79, 172, 254, .35);
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.copy-btn:hover {
  background: rgba(79, 172, 254, .22);
}

.copy-btn.copied {
  background: rgba(52, 211, 153, .18);
  border-color: rgba(52, 211, 153, .5);
  color: #6ee7b7;
}

/* ─── Step dots ───────────────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: all .3s;
}

.step-dot.active {
  width: 22px;
  border-radius: 4px;
  background: var(--accent-g);
}

/* ─── Login split layout ──────────────────────────────────────────────── */
.login-shell {
  display: grid;
  grid-template-columns: 1fr 420px;
  width: 100%;
  max-width: 1080px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.login-left {
  background: linear-gradient(160deg, #0a1628 0%, #0d1f38 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 35%, rgba(79, 172, 254, .14) 0%, transparent 65%),
    radial-gradient(ellipse at 75% 80%, rgba(0, 242, 254, .07) 0%, transparent 55%);
}

.login-right {
  background: #0c1a2e;
  border-left: 1px solid var(--border);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-list {
  list-style: none;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.tv-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(79, 172, 254, .09);
  border: 1px solid rgba(79, 172, 254, .22);
  border-radius: 14px;
  color: var(--accent);
  padding: 15px 18px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all .25s;
  position: relative;
  z-index: 1;
}

.tv-btn:hover {
  background: rgba(79, 172, 254, .18);
  border-color: rgba(79, 172, 254, .48);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 172, 254, .18);
  color: var(--accent);
}

.tv-btn .ms-auto {
  margin-left: auto;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-left {
    padding: 28px;
  }

  .login-right {
    padding: 28px;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .c-head,
  .c-body,
  .c-foot {
    padding: 22px;
  }

  .code-inputs {
    gap: 6px;
  }

  .code-input {
    width: 44px;
    height: 54px;
    font-size: 19px;
  }
}
