/* ============================================================
   Auth pages shared styles
   Used by: forgot-password.html, reset-password.html, login.html
   ============================================================ */

/* ── Layout wrapper ──────────────────────────────────────── */
.auth-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 16px 60px;
}

/* Fallback login uses full-viewport gradient container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* ── Card ────────────────────────────────────────────────── */
.auth-card {
    max-width: 520px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    padding: 28px;
}

/* ── Headings / copy inside card ─────────────────────────── */
.auth-card h1 {
    margin-bottom: 8px;
    color: #3E1725;
}

.auth-card p {
    color: #555;
    margin-bottom: 18px;
}

.auth-card label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

/* ── Inputs inside card ──────────────────────────────────── */
.auth-card input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #e2e2e2;
    margin-bottom: 12px;
}

/* ── Submit button ───────────────────────────────────────── */
.auth-card button {
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    background: #3E1725;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

.auth-card button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Status message below form ───────────────────────────── */
.auth-message {
    margin-top: 12px;
    font-weight: 700;
}

.auth-message.success { color: #2e7d32; }
.auth-message.error   { color: #c62828; }

/* ── Fallback login header ───────────────────────────────── */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    color: #3E1725;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
}

/* ── Form group (fallback login) ─────────────────────────── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.form-group input:focus {
    outline: none;
    border-color: #3E1725;
    box-shadow: 0 0 0 3px rgba(61, 24, 37, 0.1);
}

/* ── Primary submit button (fallback login) ──────────────── */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: #3E1725;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── Form options row ────────────────────────────────────── */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.forgot-password {
    color: #3E1725;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ── Alert banners ───────────────────────────────────────── */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.alert.show     { display: block; }

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ── Footer link below card ──────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.auth-footer a {
    color: #3E1725;
    text-decoration: none;
    font-weight: 600;
}

/* ── Utility ─────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ── Input focus ring ────────────────────────────────────── */
.auth-card input:focus-visible {
    outline: none;
    border-color: #3E1725;
    box-shadow: 0 0 0 3px rgba(62, 23, 37, 0.2);
}

/* ── Submit button hover / focus ─────────────────────────── */
.auth-card button:not(.password-toggle):hover {
    background: #5D2D3F;
}

.auth-card button:not(.password-toggle):focus-visible {
    outline: 3px solid #3E1725;
    outline-offset: 2px;
}

/* ── Password visibility toggle ──────────────────────────── */
/* Resets the full-width dark-button styles that .auth-card button applies */
button.password-toggle {
    width: auto;
    padding: 0;
    background: none;
    color: #666;
    font-weight: normal;
    font-size: 0.9rem;
}

button.password-toggle:hover {
    background: none;
    color: #3E1725;
}

button.password-toggle:focus-visible {
    outline: 2px solid #3E1725;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── <main> inside .auth-container (login.html fallback) ─── */
.auth-container > main {
    width: 100%;
    max-width: 520px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card {
        padding: 20px 16px;
    }

    .auth-wrap {
        padding: 100px 12px 40px;
    }
}
