/* ==========================================================================
   MediPortal — mp-auth.css
   Sistema visual v3 (D-041). Pantallas de acceso PANT-01 a 04 (contexto 'auth'). Depende de mp-base.css.
   Diseño: docs/diseno/v3-sistema-visual.md §3.1 (Stitch «iniciar sesión» y «crear cuenta», filtrado).
   Wordmark arriba, tarjeta centrada y pie. Sin panel lateral (v2).
   ========================================================================== */

/* --------------------------------------------------------------------------
   9. LAYOUT: ACCESO (PANT-01 a 04)
   -------------------------------------------------------------------------- */
.mp-auth { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: var(--mp-s7) var(--mp-s4) 0; }
.mp-auth__brand { display: flex; justify-content: center; margin-bottom: var(--mp-s7); }
.mp-auth__brand .mp-logo__name { font-size: 1.5rem; }
.mp-auth__brand .mp-logo__sub { font-size: 0.625rem; }
.mp-auth__brand .mp-logo__mark { width: 44px; height: 44px; }
.mp-auth__brand .mp-logo__mark svg { width: 24px; height: 24px; }
.mp-auth__main { width: 100%; display: flex; justify-content: center; }

/* Tarjeta: 480 px (login, verificar, recuperar) o 760 px (crear cuenta, dos columnas) */
.mp-auth__panel { width: 100%; max-width: 480px; padding: var(--mp-s7) var(--mp-s7) var(--mp-s6); background: var(--mp-surface); border: 1px solid var(--mp-line); border-radius: 24px; }
.mp-auth__panel--wide { max-width: 760px; }
.mp-auth__panel .mp-h1 { margin-bottom: var(--mp-s2); }
.mp-auth__lead { color: var(--mp-ink-2); font-size: var(--mp-fs-base); line-height: 1.5; margin-bottom: var(--mp-s6); }
.mp-auth__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--mp-s5); border-radius: 50%; background: var(--mp-accent-weak); color: var(--mp-accent); }
.mp-auth__icon .mp-icon { width: 26px; height: 26px; }
.mp-auth__icon--success { background: var(--mp-accent-weak); color: var(--mp-accent); }
.mp-auth__icon--danger { background: var(--mp-danger-weak); color: var(--mp-danger); }
.mp-auth .mp-alert { margin-bottom: var(--mp-s5); }

/* Enlaces de cambio de pantalla («¿Ya tienes cuenta?», «Volver a iniciar sesión»…) */
.mp-auth__switch { margin: var(--mp-s6) 0 0; font-size: var(--mp-fs-sm); color: var(--mp-ink-2); text-align: center; }
.mp-auth__switch a { font-weight: 700; text-decoration: none; }
.mp-auth__switch a:hover { text-decoration: underline; }
.mp-auth__switch + .mp-auth__switch { margin-top: var(--mp-s3); }
/* Franja inferior de la tarjeta ancha (crear cuenta): «¿Ya tienes cuenta? Iniciar sesión» */
.mp-auth__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--mp-s2); margin: var(--mp-s6) calc(-1 * var(--mp-s7)) calc(-1 * var(--mp-s6)); padding: var(--mp-s5) var(--mp-s7); border-top: 1px solid var(--mp-line); border-radius: 0 0 24px 24px; background: var(--mp-surface-2); font-size: var(--mp-fs-sm); color: var(--mp-ink-2); }
.mp-auth__foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }

/* Etiqueta con enlace a la derecha («Contraseña · ¿Olvidaste tu contraseña?») */
.mp-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--mp-s3); }
.mp-label-row a { font-size: var(--mp-fs-sm); font-weight: 500; text-decoration: none; }
.mp-label-row a:hover { text-decoration: underline; }
.mp-auth__options { margin-top: var(--mp-s4); }
.mp-auth form > .mp-btn, .mp-auth section > form + .mp-auth__switch { margin-top: var(--mp-s5); }
.mp-auth .mp-check-row a { text-decoration: underline; }
.mp-auth .mp-form-actions .mp-btn .mp-icon { width: 18px; height: 18px; }

/* Campo con ícono a la izquierda (sprite SVG; template-parts/auth/field.php) */
.mp-input-icon { position: relative; }
.mp-input-icon > .mp-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--mp-ink-2); pointer-events: none; }
.mp-input-icon > .mp-input, .mp-input-icon > .mp-select, .mp-input-icon > .mp-input-group .mp-input { padding-left: 46px; }

/* Pie (texto en ink-2 sobre el fondo: 4,72:1) */
.mp-auth__footer { margin-top: auto; width: 100%; padding-top: var(--mp-s7); }

/* --------------------------------------------------------------------------
   14. RESPONSIVE (acceso)
   En el celular la tarjeta se funde con el fondo (Stitch): sin borde y con el ancho completo.
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .mp-auth { padding: var(--mp-s5) 0 0; align-items: stretch; }
  .mp-auth__brand { justify-content: flex-start; padding: 0 var(--mp-s4); margin-bottom: var(--mp-s5); }
  .mp-auth__brand .mp-logo__name { font-size: 1.25rem; }
  .mp-auth__brand .mp-logo__sub { display: none; }
  .mp-auth__brand .mp-logo__mark { width: 40px; height: 40px; }
  .mp-auth__panel, .mp-auth__panel--wide { max-width: none; padding: 0 var(--mp-s4) var(--mp-s5); background: transparent; border: 0; border-radius: 0; }
  .mp-auth__foot { margin: var(--mp-s6) calc(-1 * var(--mp-s4)) 0; padding: var(--mp-s5) var(--mp-s4); border-radius: 0; justify-content: center; }
  .mp-auth__lead { margin-bottom: var(--mp-s5); }
}
