/* ===== MANGALA VIHARA — LOGIN PAGE ===== */
/* Color palette from mangala_vihara_members_revamp.html */
/* Primary dark:  #400006 | Gold accent: #e89b2d | Page bg: #f9f6f1 */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f9f6f1;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── HEADER ─────────────────────────────────── */
.login-header {
    background: #400006;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(64, 0, 6, 0.25);
}

.header-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e89b2d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #400006;
    flex-shrink: 0;
}

.header-title {
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.header-title span {
    color: #e89b2d;
    font-weight: 700;
}

.header-subtitle {
    color: #f0c870;
    font-size: 16px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* ── MAIN AREA ───────────────────────────────── */
.login-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

/* ── CARD ────────────────────────────────────── */
.login-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8d5b0;
    box-shadow: 0 4px 24px rgba(64, 0, 6, 0.08);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.card-hero {
    background: linear-gradient(135deg, #400006 0%, #6b0010 100%);
    padding: 28px 32px 22px;
    text-align: center;
    position: relative;
}

.card-hero-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e89b2d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 14px;
    box-shadow: 0 4px 14px rgba(232, 155, 45, 0.4);
}

.card-hero h1 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.card-hero p {
    color: #f0c870;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* ── FORM BODY ───────────────────────────────── */
.card-body {
    padding: 28px 32px 32px;
}

/* Alert messages */
.alert {
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert-error {
    background: #fff0f0;
    border: 1px solid #f5c6c6;
    color: #8b0000;
}

.alert-success {
    background: #f0faf4;
    border: 1px solid #a8d5b5;
    color: #1a6640;
}

/* Form rows */
.form-row {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #5a3a00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #b89060;
    font-size: 16px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    border: 1.5px solid #e0c88a;
    border-radius: 8px;
    padding: 10px 12px 10px 36px;
    font-size: 16px;
    color: #2a1a0a;
    background: #fffdf9;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.form-input:focus {
    border-color: #e89b2d;
    box-shadow: 0 0 0 3px rgba(232, 155, 45, 0.18);
    background: #fff;
}

.form-input.is-invalid {
    border-color: #e05555;
    box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.12);
}

.field-error {
    font-size: 11.5px;
    color: #c0392b;
    margin-top: 5px;
    padding-left: 2px;
}

/* Toggle password */
.btn-toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #b89060;
    font-size: 16px;
    padding: 2px 4px;
    line-height: 1;
    transition: color 0.15s;
}

.btn-toggle-pw:hover {
    color: #e89b2d;
}

/* Remember + forgot */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    color: #5a3a00;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    accent-color: #e89b2d;
    width: 15px;
    height: 15px;
}

.forgot-link {
    font-size: 12.5px;
    color: #c07000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.forgot-link:hover {
    color: #400006;
    text-decoration: underline;
}

/* Submit button */
.btn-login {
    width: 100%;
    background: #e89b2d;
    color: #400006;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.18s, transform 0.1s, box-shadow 0.18s;
    font-family: inherit;
    box-shadow: 0 3px 10px rgba(232, 155, 45, 0.35);
}

.btn-login:hover {
    background: #d4891f;
    box-shadow: 0 4px 16px rgba(232, 155, 45, 0.45);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(232, 155, 45, 0.3);
}

/* ── FOOTER ──────────────────────────────────── */
.login-footer {
    text-align: center;
    padding: 16px;
    font-size: 11.5px;
    color: #9a7a50;
    border-top: 1px solid #f0e4c8;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 480px) {
    .login-header {
        padding: 12px 18px;
    }

    .card-body {
        padding: 22px 20px 26px;
    }

    .card-hero {
        padding: 24px 20px 18px;
    }
}
