/* Login, register and forgot password (resources/views/auth/*, public/assets/js/auth-forms.js) */

.auth-page {
    padding: 56px 16px 96px;
    background: #f5f7fa;
}

.auth-card {
    max-width: 460px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05), 0 18px 40px rgba(15, 23, 42, .07);
}

.auth-card--wide { max-width: 760px; }

.auth-card__head { margin-bottom: 28px; }

.auth-card__head h1 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.auth-card__head p {
    margin: 0;
    color: #526173;
    line-height: 1.6;
}

.auth-card .form-label {
    margin-bottom: 6px;
    color: #273449;
    font-size: .92rem;
    font-weight: 600;
}

.auth-card .form-control,
.auth-card .form-select {
    min-height: 48px;
    border: 1px solid #d5dbe5;
    border-radius: 10px;
    background-color: #ffffff;
    font-size: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
    border-color: #273eab;
    box-shadow: 0 0 0 3px rgba(39, 62, 171, .15);
}

.auth-card .form-control[readonly] { background: #f5f7fa; }

.auth-card .form-control.is-invalid,
.auth-card .form-select.is-invalid {
    border-color: #dc2626;
    background-image: none;
}

.auth-card .form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }

.auth-field-error {
    display: flex;
    gap: 6px;
    align-items: baseline;
    margin-top: 6px;
    color: #b91c1c;
    font-size: .875rem;
    line-height: 1.45;
}

/* The reCAPTCHA component's own error slot is styled italic elsewhere. */
.auth-card .error-message.auth-field-error { font-style: normal; }

/* Password field with a show/hide button */
.auth-password { position: relative; }
.auth-password .form-control { padding-right: 48px; }

.auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    transform: translateY(-50%);
}

.auth-password__toggle:hover { background: #f3f5f9; color: #131b5f; }
.auth-password__toggle:focus-visible { outline: 2px solid #273eab; outline-offset: 1px; }

/* Messages above the form */
.auth-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: .95rem;
    line-height: 1.55;
}

.auth-alert i { margin-top: 3px; }
.auth-alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.auth-alert--error { background: #fef2f2; color: #991b1b; }
.auth-alert--success { background: #ecfdf5; color: #065f46; }
.auth-alert--info { background: #eef3ff; color: #1e3a8a; }

.auth-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.auth-row .form-check { margin: 0; }
.auth-row .form-check-label { color: #273449; }

.auth-card a.auth-link { color: #131b5f; font-weight: 600; text-decoration: none; }
.auth-card a.auth-link:hover { text-decoration: underline; }

.auth-card .btn-primary { min-height: 50px; }

.auth-card .btn-primary:disabled { opacity: .85; transform: none; }
.auth-card .btn-primary:disabled::after { display: none; }

.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-mfa-restart {
    display: block;
    margin-top: 16px;
    text-align: center;
}

.auth-card .mfa-code-input {
    letter-spacing: .3em;
    font-size: 1.35rem;
}

.auth-card__footer {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid #eef1f6;
    color: #526173;
    text-align: center;
}

@media (max-width: 576px) {
    .auth-page { padding: 24px 12px 64px; }
    .auth-card { padding: 28px 20px; border-radius: 16px; }
    .auth-card__head h1 { font-size: 1.5rem; }
}
