/* =========================================================
   Accesos (login abogados / portal de clientes / registro)
   Se carga después de styles.css
   ========================================================= */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1fr); background: var(--ink-900); }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px clamp(32px, 5vw, 72px); border-right: 1px solid var(--line); }
.auth-brand .hero__glow { background: radial-gradient(55% 50% at 50% 55%, rgba(0,71,204,.55), transparent 70%), radial-gradient(30% 30% at 15% 90%, rgba(24,56,168,.35), transparent 70%); }
.auth-brand .brand { margin: 0; }
.auth-emblem { position: relative; height: min(38vh, 330px); display: grid; place-items: center; margin: 24px 0; }
.auth-emblem .emblem__ring { width: auto; height: 100%; }
.auth-emblem .emblem__logo { height: 78%; }
.auth-brand__copy h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 1.08; margin-bottom: 14px; }
.auth-brand__copy > p { color: #B9C1DB; max-width: 440px; }
.auth-perks { list-style: none; display: grid; gap: 12px; margin-top: 26px; }
.auth-perks li { display: flex; align-items: center; gap: 12px; color: #D7DCEB; font-size: .95rem; }
.auth-perks li::before { content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #1A1406; background: var(--gold-grad); }
.auth-brand__foot { color: var(--muted); font-size: .82rem; margin-top: 30px; }
.auth-brand__quote { font-family: var(--serif); font-style: italic; font-size: 1.4rem; line-height: 1.35; color: #D7DCEB; max-width: 460px; }

.auth-main { position: relative; display: flex; flex-direction: column; padding: 32px clamp(24px, 5vw, 72px); background: radial-gradient(60% 50% at 70% 0%, rgba(0,71,204,.12), transparent 70%); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .88rem; color: var(--muted); }
.auth-top a { display: inline-flex; align-items: center; gap: 8px; transition: color .25s; }
.auth-top a:hover { color: var(--gold-300); }
.auth-top .brand { display: none; }
.auth-center { flex: 1; display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: min(460px, 100%); }
.auth-card--wide { width: min(560px, 100%); }
.auth-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-gold); color: var(--gold-300); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 20px; }
.auth-kicker svg { width: 13px; height: 13px; fill: currentColor; }
.auth-card h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.3rem, 4vw, 3.1rem); line-height: 1.05; margin-bottom: 10px; }
.auth-card .auth-sub { color: var(--muted); margin-bottom: 32px; }
.auth-form .field { margin-bottom: 14px; }
.field__toggle { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: color .25s, background .25s; }
.field__toggle:hover { color: var(--gold-300); background: rgba(255,255,255,.04); }
.field__toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.field--pw input { padding-right: 56px; }
.field__help { display: block; font-size: .78rem; color: var(--muted); margin: -6px 4px 12px; }
.field__help.is-error { color: #F08A80; }
.caps { display: none; align-items: center; gap: 6px; font-size: .78rem; color: var(--gold-300); margin: -6px 4px 12px; }
.caps.is-on { display: flex; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 22px; font-size: .88rem; }
.link-gold { color: var(--gold-300); font-weight: 600; background: none; border: 0; cursor: pointer; padding: 0; font-size: inherit; }
.link-gold:hover { text-decoration: underline; text-underline-offset: 4px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .86rem; color: #C9CFE3; cursor: pointer; line-height: 1.45; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1px solid var(--line-gold); background: rgba(5,8,22,.45); display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.check input:checked { background: var(--gold-grad); }
.check input:checked::after { content: "✓"; font-size: .75rem; font-weight: 800; color: #1A1406; }
.check.is-invalid input { border-color: #E5675C; }

.alert { display: none; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: .9rem; margin-bottom: 20px; border: 1px solid; }
.alert.is-on { display: flex; animation: alertIn .4s var(--ease); }
.alert--error { background: rgba(229,103,92,.1); border-color: rgba(229,103,92,.35); color: #F6B1AA; }
.alert--ok { background: rgba(61,220,151,.1); border-color: rgba(61,220,151,.35); color: #9BF0C9; }
@keyframes alertIn { from { opacity: 0; transform: translateY(-6px); } }

.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0; color: var(--muted); font-size: .8rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-alt { text-align: center; font-size: .92rem; color: var(--muted); }

.recover { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.recover > div { overflow: hidden; }
.recover.is-open { grid-template-rows: 1fr; }
.recover__box { margin-top: 18px; padding: 22px; border-radius: 18px; border: 1px solid var(--line-gold); background: rgba(242,199,68,.04); }
.recover__box h3 { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 4px; }
.recover__box p { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }

/* Registro por pasos */
.steps { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.steps__item { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.steps__n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-gold); font-weight: 800; font-size: .85rem; transition: background .4s, color .4s; }
.steps__item.is-on { color: #fff; }
.steps__item.is-on .steps__n { background: var(--gold-grad); color: #1A1406; border-color: transparent; }
.steps__item.is-done .steps__n { background: rgba(242,199,68,.15); color: var(--gold-300); }
.steps__line { flex: 1; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.steps__line span { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width .6s var(--ease); }
.step-panel { display: none; }
.step-panel.is-on { display: block; animation: alertIn .5s var(--ease); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: 16px; border: 1px solid var(--line); background: rgba(5,8,22,.45); margin-bottom: 14px; }
.segmented label { position: relative; text-align: center; padding: 10px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .92rem; color: #C9CFE3; transition: background .3s, color .3s; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--gold-grad); color: #1A1406; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--gold-300); outline-offset: 2px; }
.segmented label small { display: block; font-weight: 500; font-size: .72rem; opacity: .75; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: -6px 4px 6px; }
.strength span { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); transition: background .3s; }
.strength[data-s="1"] span:nth-child(-n+1) { background: #E5675C; }
.strength[data-s="2"] span:nth-child(-n+2) { background: #E6B94A; }
.strength[data-s="3"] span:nth-child(-n+3) { background: #9CD36B; }
.strength[data-s="4"] span { background: #3DDC97; }
.step-actions { display: flex; gap: 12px; margin-top: 24px; }
.step-actions .btn--gold { flex: 1; }
.auth-success { text-align: center; padding: 30px 0; }
.auth-success__icon { width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #1A1406; background: var(--gold-grad); box-shadow: 0 0 0 10px rgba(242,199,68,.1); }

/* Variante sobria para abogados */
.auth-page--staff .auth-brand .hero__glow { background: radial-gradient(55% 50% at 50% 55%, rgba(24,56,168,.4), transparent 70%); }

@media (max-width: 960px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-top .brand { display: flex; }
  .auth-top .brand__text small { display: none; }
  .auth-main { min-height: 100vh; background: radial-gradient(70% 40% at 50% 0%, rgba(0,71,204,.35), transparent 70%), var(--ink-900); }
}
@media (max-width: 520px) {
  .grid-2 { grid-template-columns: 1fr; }
  .steps__item b { display: none; }
}
