/* auth.css — scoped to .page-auth (recuperar-pin, definir-pin) */
.page-auth {
  --m-brand:        #066fd1;
  --m-brand-hover:  #0054a6;
  --m-brand-dark:   #003d7a;
  --m-primary:      #066fd1;
  --m-success:      #34bfa3;
  --m-danger:       #f4516c;
  --m-warning:      #ffb822;
  --m-grey-100: #f4f5f8;
  --m-grey-200: #ebedf2;
  --m-grey-400: #c8cdd9;
  --m-grey-500: #a7abc3;
  --m-grey-600: #868e96;
  --m-grey-700: #595d6e;
  --m-grey-800: #464457;
  --m-grey-900: #212529;
  --m-bg-page:  #f2f3f8;
  --m-bg-aside: #002857;
  --m-border:   #ebedf2;
  --m-radius:    0.25rem;
  --m-radius-pill: 50rem;
  --m-shadow:    0 1px 15px 1px rgba(69,65,78,0.10);
  --m-shadow-focus-brand:  0 0 0 3px rgba(6,111,209,0.25);
  --m-shadow-focus-danger: 0 0 0 3px rgba(244,81,108,0.25);
  --m-transition: all .3s ease;

  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--m-grey-900);
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────────────── */
.page-auth {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 1.1fr;
  min-height: 100vh;
}
@media (max-width: 900px) {
  .page-auth { grid-template-columns: 1fr; }
  .page-auth .hero { display: none; }
}

/* ── Form column ─────────────────────────────────────── */
.page-auth .form-col {
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 40px 56px;
}
@media (max-width: 600px) {
  .page-auth .form-col { padding: 32px 24px; }
}

.page-auth .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 56px;
  text-decoration: none;
}
.page-auth .brand__mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--m-brand) 0%, #0a8fe0 100%);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(6,111,209,0.35);
}
.page-auth .brand__mark svg { width: 22px; height: 22px; color: #fff; }
.page-auth .brand__name {
  font-size: 18px; font-weight: 600;
  color: var(--m-grey-900); letter-spacing: -0.01em;
}
.page-auth .brand__name em {
  font-style: normal; color: var(--m-grey-500);
  font-weight: 400; margin-left: 4px;
}

.page-auth .form-wrap {
  flex: 1; display: flex; align-items: center;
}
.page-auth .form-wrap__inner {
  width: 100%; max-width: 380px; margin: 0 auto;
}

/* ── Panel (estado) ──────────────────────────────────── */
.page-auth .panel { display: none; }
.page-auth .panel.is-active { display: block; }
.page-auth .panel.is-entering { animation: pa-fadeUp .25s ease both; }
@keyframes pa-fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-auth .panel__head { margin-bottom: 28px; }
.page-auth .panel__title {
  font-size: 22px; font-weight: 500;
  color: var(--m-grey-800); margin: 0 0 6px; letter-spacing: -0.01em;
}
.page-auth .panel__desc {
  font-size: 13px; color: var(--m-grey-600); margin: 0; line-height: 1.6;
}

/* ── Banner ──────────────────────────────────────────── */
.page-auth .banner {
  display: none; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--m-radius);
  font-size: 13px; margin-bottom: 18px;
  background: rgba(244,81,108,0.08); border: 1px solid rgba(244,81,108,0.25);
  color: #a8324a;
}
.page-auth .banner.is-visible { display: flex; }
.page-auth .banner i { flex-shrink: 0; margin-top: 1px; font-size: 16px; }
.page-auth .banner--info {
  background: rgba(6,111,209,0.06);
  border-color: rgba(6,111,209,0.20);
  color: #064a8b;
}

/* ── Fields ──────────────────────────────────────────── */
.page-auth .field { margin-bottom: 18px; position: relative; }
.page-auth .field__label {
  display: block; font-size: 12px;
  color: var(--m-grey-700); font-weight: 500; margin-bottom: 6px;
}
.page-auth .field__label .req { color: var(--m-danger); margin-left: 2px; }
.page-auth .input {
  width: 100%; height: 44px; padding: 0 14px;
  font-family: inherit; font-size: 14px; color: var(--m-grey-900);
  background: #fff; border: 1px solid var(--m-border);
  border-radius: var(--m-radius); transition: var(--m-transition);
}
.page-auth .input::placeholder { color: var(--m-grey-500); }
.page-auth .input:hover { border-color: #d8dbe6; }
.page-auth .input:focus {
  outline: none; border-color: var(--m-brand);
  box-shadow: var(--m-shadow-focus-brand);
}
.page-auth .input--pin {
  letter-spacing: 0.4em; font-size: 18px; font-weight: 500;
  text-align: center; font-variant-numeric: tabular-nums;
}
.page-auth .input--pin::placeholder { letter-spacing: normal; font-size: 14px; font-weight: 400; }

.page-auth .field--error .input { border-color: var(--m-danger); }
.page-auth .field--error .input:focus { box-shadow: var(--m-shadow-focus-danger); }
.page-auth .field__error {
  display: none; font-size: 12px; color: var(--m-danger);
  margin-top: 6px; align-items: center; gap: 4px;
}
.page-auth .field--error .field__error { display: flex; }
.page-auth .field__error i { font-size: 12px; }
.page-auth .field__hint {
  display: block; font-size: 11px; color: var(--m-grey-600); margin-top: 6px;
}

/* ── PIN strength ────────────────────────────────────── */
.page-auth .strength {
  margin-top: 8px; display: flex; align-items: center; gap: 8px;
}
.page-auth .strength__bar {
  flex: 1; height: 4px; background: var(--m-grey-200);
  border-radius: 2px; display: flex; gap: 3px;
}
.page-auth .strength__bar span {
  flex: 1; background: var(--m-grey-200); border-radius: 2px; transition: background .2s ease;
}
.page-auth .strength__label {
  font-size: 11px; color: var(--m-grey-600); font-weight: 500;
  min-width: 60px; text-align: right;
}
.page-auth .strength[data-level="1"] .strength__bar span:nth-child(-n+1) { background: var(--m-danger); }
.page-auth .strength[data-level="1"] .strength__label { color: var(--m-danger); }
.page-auth .strength[data-level="2"] .strength__bar span:nth-child(-n+2) { background: var(--m-warning); }
.page-auth .strength[data-level="2"] .strength__label { color: var(--m-warning); }
.page-auth .strength[data-level="3"] .strength__bar span { background: var(--m-success); }
.page-auth .strength[data-level="3"] .strength__label { color: var(--m-success); }

/* ── Buttons ─────────────────────────────────────────── */
.page-auth .btn-auth {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 28px; border-radius: var(--m-radius-pill);
  border: 1px solid transparent; font-family: inherit; font-size: 13px;
  font-weight: 500; letter-spacing: 0.02em; cursor: pointer;
  transition: var(--m-transition); white-space: nowrap;
}
.page-auth .btn-auth:focus-visible { outline: none; box-shadow: var(--m-shadow-focus-brand); }
.page-auth .btn-primary {
  background: var(--m-brand); color: #fff;
  box-shadow: 0 4px 12px rgba(6,111,209,0.30);
}
.page-auth .btn-primary:hover { background: var(--m-brand-hover); box-shadow: 0 6px 16px rgba(6,111,209,0.40); }
.page-auth .btn-primary:active { background: var(--m-brand-dark); }
.page-auth .btn-ghost {
  background: transparent; color: var(--m-grey-700);
  border-color: var(--m-border);
}
.page-auth .btn-ghost:hover { background: var(--m-grey-100); border-color: #d8dbe6; }
.page-auth .btn-block { width: 100%; }
.page-auth .btn-auth[disabled] { opacity: 0.65; cursor: not-allowed; pointer-events: none; }

.page-auth .btn-spinner {
  display: none; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  border-radius: 50%; animation: pa-spin .7s linear infinite;
}
.page-auth .is-loading .btn-spinner { display: inline-block; }
.page-auth .is-loading .btn-label { opacity: 0.7; }
@keyframes pa-spin { to { transform: rotate(360deg); } }

.page-auth .actions { display: flex; gap: 10px; }

/* ── Back link ───────────────────────────────────────── */
.page-auth .back-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 24px; font-size: 13px; color: var(--m-grey-600);
  background: none; border: 0; cursor: pointer;
  font-family: inherit; padding: 0; text-decoration: none;
  transition: var(--m-transition);
}
.page-auth .back-link:hover { color: var(--m-brand); }

/* ── Success icon ────────────────────────────────────── */
.page-auth .success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(52,191,163,0.12); color: var(--m-success);
  display: grid; place-items: center; margin: 0 0 16px;
  font-size: 28px;
}

/* ── Email chip ──────────────────────────────────────── */
.page-auth .email-chip {
  display: inline-block; background: var(--m-grey-100);
  border: 1px solid var(--m-border); border-radius: var(--m-radius);
  padding: 6px 12px; font-size: 13px; color: var(--m-grey-800);
  font-weight: 500; margin: 8px 0 18px;
}

/* ── Footer ──────────────────────────────────────────── */
.page-auth .foot {
  margin-top: auto; display: flex;
  align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--m-grey-500);
}
.page-auth .foot a { color: var(--m-grey-600); text-decoration: none; }
.page-auth .foot a:hover { color: var(--m-grey-800); }
.page-auth .foot__links { display: flex; gap: 18px; }

/* ── Hero column ─────────────────────────────────────── */
.page-auth .hero {
  background: var(--m-bg-aside);
  background-image:
    radial-gradient(1200px 600px at 110% -10%, rgba(6,111,209,0.30), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(10,143,224,0.18), transparent 60%),
    linear-gradient(160deg, #003972 0%, #002857 50%, #001a3d 100%);
  color: #fff;
  padding: 56px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.page-auth .hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
}
.page-auth .hero__top {
  display: flex; justify-content: flex-end;
  position: relative; z-index: 2;
}
.page-auth .hero__pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 50rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  font-size: 12px; color: rgba(255,255,255,0.75); font-weight: 500;
}
.page-auth .hero__pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--m-success);
  box-shadow: 0 0 0 0 rgba(52,191,163,0.7);
  animation: pa-pulse 2s infinite;
}
@keyframes pa-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52,191,163,0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(52,191,163,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,191,163,0); }
}
.page-auth .hero__body {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; position: relative; z-index: 2; max-width: 480px;
}
.page-auth .hero__eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--m-brand); margin-bottom: 20px;
}
.page-auth .hero__title {
  font-size: 38px; font-weight: 500; line-height: 1.18;
  margin: 0 0 18px; letter-spacing: -0.015em; color: #fff;
}
.page-auth .hero__title b { font-weight: 600; color: var(--m-brand); }
.page-auth .hero__lead {
  font-size: 15px; line-height: 1.65;
  color: rgba(255,255,255,0.72); margin: 0 0 36px; max-width: 420px;
}
.page-auth .hero__steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 18px; counter-reset: step;
}
.page-auth .hero__steps li {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 14px; color: rgba(255,255,255,0.85); counter-increment: step;
}
.page-auth .hero__steps li .num {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(6,111,209,0.18); border: 1px solid rgba(6,111,209,0.45);
  color: var(--m-brand); display: grid; place-items: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0; margin-top: -2px;
}
.page-auth .hero__steps li .num::before { content: counter(step); }
.page-auth .hero__steps li.is-active { color: #fff; }
.page-auth .hero__steps li.is-active .num {
  background: var(--m-brand); color: #fff; border-color: var(--m-brand);
  box-shadow: 0 0 0 4px rgba(6,111,209,0.20);
}
.page-auth .hero__steps li.is-done .num {
  background: rgba(52,191,163,0.18); border-color: rgba(52,191,163,0.45); color: var(--m-success);
}
.page-auth .hero__steps li.is-done .num::before { content: "✓"; font-size: 14px; }
.page-auth .hero__foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.45);
  position: relative; z-index: 2;
}
.page-auth .hero__foot a { color: rgba(255,255,255,0.65); text-decoration: none; }
.page-auth .hero__foot a:hover { color: #fff; }
