/* Sign-in pages (layouts/app.blade.php). Colours come from palette.css. */
.auth-body { margin: 0; font-family: var(--brand-font); color: var(--brand-text, #1B2140); background: var(--brand-surface, #fff); -webkit-font-smoothing: antialiased; }
.auth-body *, .auth-body *::before, .auth-body *::after { box-sizing: border-box; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

.auth__brand { background: #F3F5FF; color: var(--brand-text, #1B2140); border-inline-end: 1px solid var(--brand-border, #E3E6EE); padding: 2.25rem 3rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.auth__logo { align-self: flex-start; }
.auth__art { width: 100%; max-width: 30rem; height: auto; margin: 0 auto; }
.auth__copy { margin: 0; font-size: 0.75rem; color: var(--brand-text-muted, #5F6785); }

.auth__panel { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.auth__card { width: 100%; max-width: 24rem; }
.auth__title { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.auth__sub { margin: 0.35rem 0 1.5rem; font-size: 0.875rem; color: var(--brand-text-muted, #5F6785); }
.auth__sub:empty { display: none; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-field label { display: block; margin-bottom: 0.35rem; font-size: 0.8125rem; font-weight: 500; }
.auth-field input, .auth-pw input { width: 100%; height: 2.75rem; padding: 0 0.85rem; font: inherit; font-size: 0.9375rem; color: inherit; background: var(--brand-surface, #fff); border: 1px solid var(--brand-border, #E3E6EE); border-radius: 0.5rem; outline: 0; transition: border-color 120ms, box-shadow 120ms; }
.auth-field input::placeholder, .auth-pw input::placeholder { color: #9AA1BC; }
.auth-field input:focus, .auth-pw input:focus { border-color: var(--brand-primary, #3B4BC8); box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb, 59, 75, 200), 0.18); }
.auth-field input[aria-invalid="true"], .auth-pw input[aria-invalid="true"] { border-color: var(--brand-danger, #C62828); }
.auth-pw { position: relative; }
.auth-pw input { padding-inline-end: 4.25rem; }
.auth-pw__toggle { position: absolute; inset-block: 0; inset-inline-end: 0.35rem; margin: auto 0; height: 2rem; padding: 0 0.6rem; border: 0; border-radius: 0.375rem; background: transparent; color: var(--brand-primary, #3B4BC8); font: inherit; font-size: 0.8125rem; font-weight: 500; cursor: pointer; }
.auth-pw__toggle:hover { background: var(--brand-primary-soft, #E9ECFC); }
.auth-pw__toggle:focus-visible, .auth-btn:focus-visible, .auth-check input:focus-visible { outline: 2px solid var(--brand-primary, #3B4BC8); outline-offset: 2px; }
.auth-error { margin: 0.35rem 0 0; font-size: 0.8125rem; color: var(--brand-danger, #C62828); }

.auth-check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.875rem; color: var(--brand-text-muted, #5F6785); cursor: pointer; }
.auth-check input { width: 1rem; height: 1rem; accent-color: var(--brand-primary, #3B4BC8); }

.auth-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; height: 2.75rem; margin-top: 0.25rem; border: 0; border-radius: 0.5rem; background: var(--brand-primary, #3B4BC8); color: #fff; font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; transition: background-color 120ms; }
.auth-btn:hover { background: var(--brand-primary-hover, #3240AE); }
.auth-btn:disabled { cursor: progress; opacity: 0.85; }
.auth-btn__spin { display: none; width: 1rem; height: 1rem; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: auth-spin 0.7s linear infinite; }
.auth-btn.is-busy .auth-btn__spin { display: inline-block; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-alert { margin-bottom: 1rem; padding: 0.7rem 0.9rem; border-radius: 0.5rem; font-size: 0.875rem; border-inline-start: 3px solid transparent; }
.auth-alert--ok { background: var(--brand-success-soft, #DCFCE7); color: var(--brand-success-text-soft, #166534); border-color: var(--brand-success, #15803D); }
.auth-alert--bad { background: var(--brand-danger-soft, #FEE2E2); color: var(--brand-danger-text-soft, #991B1B); border-color: var(--brand-danger, #C62828); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth__brand { padding: 1rem 1.25rem; flex-direction: row; align-items: center; border-inline-end: 0; border-bottom: 1px solid var(--brand-border, #E3E6EE); }
  .auth__art { display: none; }
    .auth__panel { align-items: flex-start; padding-top: 2rem; }
}
@media (prefers-reduced-motion: reduce) { .auth-btn__spin { animation-duration: 2s; } .auth-field input, .auth-pw input, .auth-btn { transition: none; } }
