/* ── Form Alert ── */
.form-alert[hidden] { display: none; }
.form-alert {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.85rem;
    border-radius: 4px;
    margin-bottom: 4px;
}

/* ── Success message (reset link sent / password changed) ── */
.form-success[hidden] { display: none; }
.form-success {
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.85rem;
    line-height: 1.5;
    border-radius: 4px;
    margin-bottom: 4px;
}

.auth-form[hidden] { display: none; }

/* ── Auth Layout ── */
.auth-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: var(--cream);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--cream-deep);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    box-shadow: var(--shadow-md);
    padding: 48px 44px;
}

/* ── Header ── */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--navy);
    margin: 10px 0 10px;
}

.auth-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ── Form Fields ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.field input {
    width: 100%;
    padding: 12px 14px;
    background: var(--cream);
    border: 1px solid var(--border);
    color: var(--text-body);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}

.field input:focus {
    border-color: var(--gold);
}

.field input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ── Password toggle ── */
.input-wrap {
    position: relative;
}

.input-wrap input {
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.toggle-pw svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.toggle-pw:hover {
    color: var(--navy);
}

/* ── Forgot link ── */
.forgot-link {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--gold-dark);
    text-decoration: underline;
}

.forgot-link:hover {
    color: var(--navy);
}

/* ── Checkbox ── */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--gold-dark);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Submit ── */
.auth-submit {
    width: 100%;
    text-align: center;
    margin-top: 8px;
    padding: 16px;
}

/* ── Switch link ── */
.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--gold-dark);
    text-decoration: underline;
    font-weight: 500;
}

.auth-switch a:hover {
    color: var(--navy);
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .auth-card {
        padding: 36px 24px;
    }
}

@media (max-width: 349px) {
    .auth-wrapper {
        padding: 30px 12px;
    }

    .auth-card {
        padding: 28px 15px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .auth-header h1 {
        font-size: 1.9rem;
    }

    /* Hide decorative lines — reclaim vertical space at this size */
    .auth-header .section-label::before,
    .auth-header .section-label::after {
        display: none;
    }

    /* Password label row: wrap so "Forgot password?" drops below cleanly */
    .field label {
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .field input,
    .auth-submit {
        box-sizing: border-box;
    }

    .checkbox-label {
        flex-wrap: wrap;
        gap: 8px;
    }
}
