/* ============================================================
   Emite · Autenticación (tema claro institucional)
   Split-screen: panel de marca (izq) + formulario (der).
   Reutiliza tokens y .btn de styles.css.
   ============================================================ */

.auth-body { min-height: 100vh; background: var(--bg); }
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; min-width: 0; }

/* ---------- Panel lateral (showcase claro) ---------- */
.auth-aside {
  position: relative; overflow: hidden; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--brand); color: #fff;
}
/* textura sutil de líneas contables sobre el bloque de marca */
.auth-aside::before {
  content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 100% 30px;
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .brand { color: #fff; font-size: 1.35rem; }
.auth-aside .brand .mark { background: #fff; }
.auth-aside .brand .mark::after { background: var(--accent); box-shadow: 0 6px 0 rgba(14,107,82,.6); }
.aside-hero { max-width: 460px; }
.aside-hero h2 { color: #fff; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.015em; }
.aside-hero p { color: rgba(255,255,255,.86); font-size: 1.05rem; }
.aside-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.aside-list li { display: flex; gap: 12px; align-items: flex-start; color: #fff; font-size: .96rem; font-weight: 500; }
.aside-list .tick { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: .8rem;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); }
.aside-list small { display: block; color: rgba(255,255,255,.72); font-weight: 400; font-size: .85rem; margin-top: 2px; }
.aside-quote { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); border-radius: var(--r-lg); padding: 20px 22px; max-width: 460px; }
.aside-quote p { margin: 0 0 10px; font-size: 1rem; line-height: 1.5; color: #fff; font-family: var(--font-display); }
.aside-quote .who { color: rgba(255,255,255,.72); font-size: .85rem; }

/* ---------- Panel del formulario ---------- */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; position: relative; min-width: 0; background: var(--bg); }
.auth-panel { width: 100%; max-width: 440px; min-width: 0; }
.auth-topnav { position: absolute; top: 22px; right: 26px; font-size: .9rem; color: var(--ink-3); }
.auth-topnav a { color: var(--brand); font-weight: 600; }
.auth-mobile-brand { display: none; }

.auth-head { margin-bottom: 26px; }
.auth-head h1 { font-size: 1.9rem; margin: 0 0 6px; letter-spacing: -.018em; }
.auth-head p { color: var(--ink-2); margin: 0; font-size: .98rem; }

/* ---------- Campos ---------- */
.fld { margin-bottom: 16px; }
.fld > label { display: block; font-size: .85rem; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.fld-input { position: relative; display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg-sunken); transition: border-color .15s, box-shadow .15s, background .15s; }
.fld-input:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: var(--ring); }
.fld.invalid .fld-input { border-color: var(--error); box-shadow: 0 0 0 3px rgba(178,58,46,.16); }
.fld.valid .fld-input { border-color: var(--success); }
.fld-input .lead { padding: 0 0 0 14px; color: var(--ink-4); display: grid; place-items: center; font-size: .95rem; }
.fld-input input { flex: 1; width: 100%; padding: 12px 14px; border: none; background: transparent; color: var(--ink); font-family: inherit; font-size: .98rem; outline: none; }
.fld-input input::placeholder { color: var(--ink-4); }
.fld-input .toggle { background: none; border: none; color: var(--ink-3); cursor: pointer; padding: 0 14px; font-size: .85rem; font-weight: 500; }
.fld-input .toggle:hover { color: var(--ink); }
.fld-msg { font-size: .8rem; margin-top: 6px; min-height: 1em; color: var(--ink-3); }
.fld.invalid .fld-msg { color: var(--error); }

/* Medidor de fortaleza */
.pw-meter { display: flex; gap: 5px; margin-top: 8px; }
.pw-meter i { height: 4px; flex: 1; border-radius: 3px; background: var(--line-strong); transition: background .25s; }
.pw-meter.s1 i:nth-child(-n+1) { background: var(--error); }
.pw-meter.s2 i:nth-child(-n+2) { background: var(--warning); }
.pw-meter.s3 i:nth-child(-n+3) { background: var(--info); }
.pw-meter.s4 i { background: var(--success); }

/* Segmentado (tipo de cuenta) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-opt { cursor: pointer; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 16px; transition: .15s; position: relative; background: var(--surface); }
.seg-opt:hover { border-color: var(--ink-3); }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt .t { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.seg-opt .d { color: var(--ink-3); font-size: .82rem; margin-top: 4px; }
.seg-opt.sel { border-color: var(--brand); background: var(--brand-tint); box-shadow: var(--ring); }

/* Checkbox */
.chk { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: .88rem; margin: 4px 0 16px; cursor: pointer; }
.chk input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.chk a { color: var(--brand); font-weight: 500; }

/* Stepper */
.steps { display: flex; align-items: center; margin-bottom: 26px; }
.steps .step { display: flex; align-items: center; gap: 9px; color: var(--ink-3); font-size: .82rem; font-weight: 500; }
.steps .step .bub { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: .82rem; transition: .25s; flex: none; font-family: var(--font-mono); }
.steps .step.active { color: var(--ink); }
.steps .step.active .bub { border-color: transparent; background: var(--brand); color: #fff; }
.steps .step.done .bub { border-color: var(--success); color: var(--success); }
.steps .bar { flex: 1; height: 2px; background: var(--line-strong); margin: 0 10px; border-radius: 2px; position: relative; overflow: hidden; }
.steps .bar.fill::after { content: ""; position: absolute; inset: 0; background: var(--brand); }

.step-pane { display: none; animation: authIn .35s cubic-bezier(.2,.6,.2,1); }
.step-pane.active { display: block; }
@keyframes authIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-actions { display: flex; gap: 12px; margin-top: 4px; }
.auth-actions .btn { flex: 1; }

/* Resumen */
.summary { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 18px; background: var(--surface); }
.summary .r { display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.summary .r:last-child { border-bottom: none; }
.summary .r span:first-child { color: var(--ink-3); }
.summary .r span:last-child { color: var(--ink); font-weight: 500; text-align: right; word-break: break-word; }

/* Botón loading */
.btn[disabled] { opacity: .7; cursor: not-allowed; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: authspin .7s linear infinite; display: none; }
.btn.loading .spin { display: inline-block; }
@keyframes authspin { to { transform: rotate(360deg); } }

/* Avisos */
.auth-notice { padding: 12px 15px; border-radius: var(--r-md); font-size: .9rem; margin-bottom: 16px; display: none; align-items: flex-start; gap: 9px; }
.auth-notice.show { display: flex; }
.auth-notice.ok { background: var(--success-tint); border: 1px solid var(--success); color: var(--success); }
.auth-notice.err { background: var(--error-tint); border: 1px solid var(--error); color: var(--error); }
.auth-notice.info { background: var(--info-tint); border: 1px solid var(--info); color: var(--info); }
.auth-notice code { display: block; margin-top: 6px; font-size: .78rem; word-break: break-all; color: var(--brand); font-family: var(--font-mono); }

.auth-foot { margin-top: 22px; text-align: center; color: var(--ink-2); font-size: .92rem; }
.auth-foot a { color: var(--brand); font-weight: 600; }
.secure-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.forgot-link { display: inline-block; margin-top: -6px; margin-bottom: 16px; font-size: .85rem; color: var(--brand); font-weight: 500; }

/* Google Sign-In */
.google-slot { display: flex; justify-content: center; margin: 4px 0 6px; }
.google-slot > div { max-width: 100%; }
.auth-or { display: flex; align-items: center; text-align: center; color: var(--ink-2); font-size: .82rem; margin: 14px 0 18px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line, rgba(0,0,0,.1)); }
.auth-or span { padding: 0 12px; white-space: nowrap; }

/* Responsive */
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 24px; }
  .auth-main { min-height: 100vh; align-items: flex-start; padding-top: 44px; }
  .auth-topnav { position: static; text-align: center; margin-bottom: 18px; }
}
@media (max-width: 480px) {
  .row-2 { grid-template-columns: 1fr; }
  .auth-main { padding-left: 16px; padding-right: 16px; }
  .steps .slbl { display: none; }
  .steps .step { gap: 0; }
  .steps .bar { margin: 0 8px; }
  .seg-opt { padding: 13px; }
}
