/* ============================================================================
   Rosstra — Login (campaña + plataforma). Split-screen: panel editorial oscuro
   + panel de formulario claro. Standalone (sin Bootstrap): solo esta hoja +
   landing-fonts.css. Mismos tokens de marca que landing/panel, aplicados a un
   lienzo claro en el formulario a propósito (contraste editorial/funcional).
   ========================================================================== */

:root {
  --a-dark:      #08080a;
  --a-dark-2:    #0e0e10;
  --a-dark-text: #edeae2;
  --a-dark-text-2: #b7b4ab;
  --a-dark-muted: #726f66;
  --a-dark-border: rgba(255,255,255,.1);
  --a-live: #4ade80;

  --a-light:     #fafaf8;
  --a-ink:       #16161a;
  --a-ink-2:     #6b6a66;
  --a-ink-muted: #9a988f;
  --a-border:    #e2e0da;
  --a-border-2:  #cfcdc5;
  --a-danger:    #b23a3a;
  --a-danger-bg: #fbecec;

  --a-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --a-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --a-mono:  "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--a-sans); color: var(--a-ink);
  -webkit-font-smoothing: antialiased;
}

.auth-shell { display: flex; min-height: 100vh; width: 100%; }

/* ---- Panel izquierdo: editorial oscuro ------------------------------------ */
.auth-left {
  flex: 1 1 48%; position: relative; overflow: hidden;
  background: radial-gradient(ellipse 90% 70% at 20% 15%, #141416 0%, var(--a-dark) 55%);
  color: var(--a-dark-text);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 52px 56px;
}
.auth-left::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 30% 20%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 60% at 30% 20%, #000 0%, transparent 75%);
}

.auth-brand { position: relative; display: flex; align-items: center; gap: 14px; }
.auth-brand img { height: 22px; width: auto; display: block; }
.auth-brand-tag { font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--a-dark-muted); border-left: 1px solid var(--a-dark-border); padding-left: 14px; }

.auth-quote-block { position: relative; max-width: 460px; }
.auth-quote { font-family: var(--a-serif); font-weight: 400; font-size: clamp(1.5rem, 2.7vw, 2.15rem);
  line-height: 1.32; margin: 0; }
.auth-quote em { font-style: italic; color: var(--a-dark-text-2); }
.auth-quote-cite { margin-top: 18px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--a-dark-muted); }

.auth-left-foot { position: relative; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--a-dark-muted); display: flex; align-items: center; gap: 9px; }
.auth-left-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--a-live);
  box-shadow: 0 0 7px var(--a-live); }

/* ---- Panel derecho: formulario claro --------------------------------------- */
.auth-right { flex: 1 1 52%; background: var(--a-light); display: flex; align-items: center;
  justify-content: center; padding: 48px 32px; }
.auth-form-wrap { width: 100%; max-width: 380px; }

.auth-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--a-ink-muted); }
.auth-heading { font-family: var(--a-serif); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.1rem);
  line-height: 1.15; margin: 8px 0 28px; color: var(--a-ink); }

.auth-alert { background: var(--a-danger-bg); color: var(--a-danger); border: 1px solid rgba(178,58,58,.18);
  border-radius: 9px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 20px; }

.auth-field { margin-bottom: 20px; }
.auth-field label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--a-ink-2); margin-bottom: 8px; }
.auth-field-wrap { position: relative; }
.auth-field-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--a-ink-muted); pointer-events: none; }
.auth-field input {
  width: 100%; padding: 12px 14px 12px 38px; border: 1px solid var(--a-border); border-radius: 9px;
  font-size: 14.5px; font-family: var(--a-sans); color: var(--a-ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus { outline: none; border-color: var(--a-ink); box-shadow: 0 0 0 3px rgba(22,22,26,.07); }
.auth-field.has-error input { border-color: var(--a-danger); }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin: -6px 0 22px; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--a-ink-2); }
.auth-check input { width: 15px; height: 15px; accent-color: var(--a-ink); }

.auth-submit {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--a-ink); color: #fff; border: 0; border-radius: 9px; padding: 13px;
  font-size: 15px; font-weight: 600; font-family: var(--a-sans); cursor: pointer;
  transition: background .15s, transform .15s;
}
.auth-submit:hover { background: #232227; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit svg { width: 16px; height: 16px; }

.auth-note { margin-top: 20px; font-size: 12px; line-height: 1.5; color: var(--a-ink-muted);
  text-align: center; }

.auth-demo { margin-top: 22px; padding: 14px 16px; background: #f2f1ec; border: 1px solid var(--a-border);
  border-radius: 10px; font-size: 12px; color: var(--a-ink-2); line-height: 1.7; }
.auth-demo strong { color: var(--a-ink); font-weight: 600; }
.auth-demo code { font-family: var(--a-mono); font-size: 11.5px; color: var(--a-ink);
  background: #e9e7e0; padding: 1px 5px; border-radius: 4px; }

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .auth-shell { flex-direction: column; }
  .auth-left { flex: 0 0 auto; padding: 30px 26px 40px; }
  .auth-quote-block { display: none; }
  .auth-right { flex: 1 1 auto; padding: 36px 24px; }
}
@media (max-width: 480px) {
  .auth-left { padding: 24px 22px 32px; }
  .auth-brand-tag { display: none; }
}

/* ============================================================================
   Verificacion en dos pasos / codigos de recuperacion — pagina centrada
   oscura (no split-screen: aqui no hay formulario "de tramite", es un solo
   gesto de seguridad). Reusa los tokens --a-dark-* ya definidos arriba.
   ========================================================================== */
.verify-shell {
  min-height: 100vh; position: relative; overflow: hidden;
  background: radial-gradient(ellipse 90% 70% at 50% 12%, #141416 0%, var(--a-dark) 55%);
  display: flex; align-items: center; justify-content: center; padding: 48px 20px;
}
.verify-shell::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 15%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 15%, #000 0%, transparent 75%);
}
.verify-box { position: relative; width: 100%; max-width: 440px; text-align: center; }

.verify-tag { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--a-dark-muted); }
.verify-logo { height: 22px; width: auto; margin: 10px auto 28px; display: block; }

.verify-icon { width: 56px; height: 56px; margin: 0 auto 22px; border-radius: 14px;
  background: linear-gradient(180deg, #1b1b1f, #101012); border: 1px solid var(--a-dark-border);
  display: flex; align-items: center; justify-content: center; color: var(--a-dark-text); }
.verify-icon svg { width: 24px; height: 24px; }

.verify-heading { font-family: var(--a-serif); font-weight: 500; color: var(--a-dark-text);
  font-size: clamp(1.6rem, 3vw, 2rem); margin: 0 0 12px; }
.verify-lead { font-size: 14.5px; line-height: 1.6; color: var(--a-dark-text-2); max-width: 380px;
  margin: 0 auto 34px; }
.verify-lead b { color: var(--a-dark-text); font-weight: 600; }

.verify-alert { background: rgba(178,58,58,.14); color: #e79a9a; border: 1px solid rgba(178,58,58,.3);
  border-radius: 9px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 22px; }

.otp-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--a-dark-muted); margin-bottom: 12px; text-align: left; }
.otp-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 26px; }
.otp-box {
  width: 44px; height: 54px; text-align: center; font-family: var(--a-mono); font-size: 20px;
  font-variant-numeric: tabular-nums; color: var(--a-dark-text); background: #131315;
  border: 1px solid var(--a-dark-border); border-radius: 9px; transition: border-color .15s, box-shadow .15s;
}
.otp-box:focus { outline: none; border-color: var(--a-live); box-shadow: 0 0 0 3px rgba(74,222,128,.13); }
.otp-sep { width: 10px; height: 1.5px; background: var(--a-dark-border); }

.verify-recovery input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--a-dark-border); border-radius: 9px;
  background: #131315; color: var(--a-dark-text); font-family: var(--a-mono); font-size: 15px;
  letter-spacing: .06em; text-align: center; margin-bottom: 22px;
}
.verify-recovery input:focus { outline: none; border-color: var(--a-live); box-shadow: 0 0 0 3px rgba(74,222,128,.13); }

.verify-submit {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  background: #f3f1ea; color: #0c0c0d; border: 0; border-radius: 9px; padding: 13px;
  font-size: 15px; font-weight: 600; font-family: var(--a-sans); cursor: pointer;
  transition: background .15s, opacity .15s;
}
.verify-submit svg { width: 16px; height: 16px; }
.verify-submit:hover { background: #fff; }
.verify-submit:disabled { opacity: .5; cursor: default; }

.verify-aux { margin-top: 22px; font-size: 13px; line-height: 1.7; color: var(--a-dark-text-2); }
.verify-aux a, .verify-aux button.linklike {
  color: var(--a-dark-text); text-decoration: underline; text-underline-offset: 2px;
  background: none; border: 0; font: inherit; cursor: pointer; padding: 0;
}
.verify-cancel { display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--a-dark-border);
  font-size: 13.5px; font-weight: 600; color: var(--a-dark-text); }
.verify-cancel svg { width: 14px; height: 14px; }

.verify-foot { margin-top: 30px; font-size: 11.5px; letter-spacing: .04em; color: var(--a-dark-muted);
  display: flex; align-items: center; justify-content: center; gap: 8px; }
.verify-foot svg { width: 12px; height: 12px; }
.verify-foot .sep { color: var(--a-dark-border); }

@media (max-width: 480px) {
  .otp-box { width: 38px; height: 48px; font-size: 17px; }
  .otp-row { gap: 6px; }
}

/* ---- Activar dos pasos (enrolamiento): mismo canon oscuro; pasos + QR + clave -- */
.enrol-steps {
  text-align: left; max-width: 384px; margin: 0 auto 24px; padding: 0; list-style: none;
  counter-reset: enrol; font-size: 13.5px; line-height: 1.5; color: var(--a-dark-text-2);
}
.enrol-steps li { counter-increment: enrol; position: relative; padding: 3px 0 14px 36px; }
.enrol-steps li:last-child { padding-bottom: 0; }
.enrol-steps li::before {
  content: counter(enrol); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 8px; background: #131315;
  border: 1px solid var(--a-dark-border); color: var(--a-dark-text-2);
  font-family: var(--a-mono); font-size: 11.5px; display: flex; align-items: center; justify-content: center;
}
.enrol-steps b { color: var(--a-dark-text); font-weight: 600; }

.enrol-qr {
  width: max-content; margin: 4px auto 20px; padding: 14px; background: #fff;
  border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.5);
}
.enrol-qr svg, .enrol-qr img { display: block; width: 188px; height: 188px; }

.enrol-secret { font-size: 12.5px; line-height: 1.7; color: var(--a-dark-muted); margin: 0 0 28px; }
.enrol-secret code {
  display: inline-block; margin-top: 6px; font-family: var(--a-mono); font-size: 13px;
  letter-spacing: .16em; color: var(--a-dark-text); background: #131315;
  border: 1px solid var(--a-dark-border); border-radius: 8px; padding: 6px 12px;
}

.enrol-note { max-width: 366px; margin: 20px auto 0; font-size: 12px; line-height: 1.55; color: var(--a-dark-muted); }

@media (max-width: 480px) {
  .enrol-qr svg, .enrol-qr img { width: 164px; height: 164px; }
}

/* ---- Codigos de recuperacion (mismo canon oscuro): aviso + grid de codigos ----- */
.recovery-warn {
  text-align: left; background: rgba(212, 160, 74, .1); border: 1px solid rgba(212, 160, 74, .28);
  color: #e0b877; border-radius: 9px; padding: 12px 14px; font-size: 12.5px; line-height: 1.55;
  margin-bottom: 22px;
}
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 24px; }
.recovery-code {
  background: #131315; border: 1px solid var(--a-dark-border); border-radius: 9px; padding: 11px 8px;
  text-align: center; font-family: var(--a-mono); font-size: 14px; letter-spacing: .1em;
  color: var(--a-dark-text); font-variant-numeric: tabular-nums;
}

/* Boton secundario (contorno) — usado por "Imprimir o guardar en PDF". */
.verify-submit-alt {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  background: transparent; color: var(--a-dark-text); border: 1px solid var(--a-dark-border);
  border-radius: 9px; padding: 13px; font-size: 14.5px; font-weight: 600; font-family: var(--a-sans);
  cursor: pointer; margin-bottom: 12px; transition: border-color .15s, background .15s;
}
.verify-submit-alt:hover { border-color: var(--a-dark-text-2); background: rgba(255, 255, 255, .03); }
.verify-submit-alt svg { width: 16px; height: 16px; }

/* Impresion: en fondo oscuro los codigos saldrian ilegibles (los navegadores no imprimen
   fondos por defecto). Se pasa a blanco/negro para que el PDF de respaldo sea legible. */
@media print {
  .verify-shell { background: #fff; min-height: auto; padding: 20px; display: block; }
  .verify-shell::before { display: none; }
  .verify-box { max-width: 100%; }
  .verify-tag, .verify-icon, .verify-foot, .verify-submit, .verify-submit-alt { display: none !important; }
  .verify-logo { display: none; }
  .verify-heading, .verify-lead, .verify-lead b { color: #000; }
  .recovery-warn { color: #000; background: #fff; border: 1px solid #000; }
  .recovery-code { background: #fff; border: 1px solid #000; color: #000; }
}
