/* auth.css - pantallas de acceso (depende de brand.css). Colapsa a una columna bajo 900px. */

.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

/* ---------- Panel de marca: tono sólido, tipografía, sin adornos ---------- */
.auth-brand {
  background: var(--inverse-bg); color: var(--inverse-ink);
  padding: 3rem clamp(2rem, 5vw, 4.5rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
}
.auth-brand .wordmark { color: var(--inverse-ink); font-size: 1.2rem; }
.auth-brand h1 { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.auth-brand .lead { margin-top: 1.1rem; color: var(--inverse-muted); font-size: 1.05rem; max-width: 30rem; }
.auth-points { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: .85rem; }
.auth-points li { display: flex; gap: .7rem; align-items: center; color: var(--inverse-ink); font-weight: 500; }
.auth-points svg { width: 18px; height: 18px; color: #aab2ff; flex-shrink: 0; }
.auth-brand small { color: var(--inverse-muted); font-size: .82rem; }

/* ---------- Formulario ---------- */
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-role { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-tint); padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1.25rem; }
.auth-card h2 { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; }
.auth-card .sub { margin: .5rem 0 2rem; color: var(--muted); }

.alert-auth { padding: .7rem .9rem; border-radius: var(--radius-control); margin-bottom: 1.25rem; font-size: .9rem; color: #b42318; background: rgba(217, 45, 32, .09); border: 1px solid rgba(217, 45, 32, .25); }
[data-bs-theme="dark"] .alert-auth { color: #ffb4ab; background: rgba(255, 99, 85, .12); border-color: rgba(255, 99, 85, .3); }
@media (prefers-color-scheme: dark) { :root:not([data-bs-theme="light"]) .alert-auth { color: #ffb4ab; background: rgba(255, 99, 85, .12); border-color: rgba(255, 99, 85, .3); } }
.alert-auth p + p { margin-top: .25rem; }

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .45rem; }
.field-wrap { position: relative; }
.field-wrap .lead-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.field input[type="email"], .field input[type="password"], .field input[type="text"] {
  width: 100%; height: 48px; padding: 0 44px; font: 400 .95rem var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); border-radius: var(--radius-control);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.field input::placeholder { color: var(--muted); opacity: .75; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input.invalid { border-color: #d92d20; }
.field .err { margin-top: .4rem; font-size: .82rem; color: #b42318; }
[data-bs-theme="dark"] .field .err { color: #ffb4ab; }
.toggle-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.toggle-pass svg { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) { .toggle-pass:hover { color: var(--ink); background: var(--surface-2); } }

.remember { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--muted); margin: .25rem 0 1.5rem; }
.remember input { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-card .btn-brand { width: 100%; height: 48px; font-size: 1rem; }
.auth-alt { margin-top: 1.5rem; text-align: center; font-size: .9rem; color: var(--muted); }
.auth-alt a { font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 1.75rem 1.5rem; gap: 1.25rem; }
  .auth-brand h1 { font-size: 1.75rem; }
  .auth-points, .auth-brand small { display: none; }
  .auth-brand .lead { margin-top: .6rem; }
}
