:root {
    --bg-color: #f7fcf8;
    --container-bg: #ffffff;
    --text-main: #1b4332;
    /* Dark green for headings */
    --text-muted: #52796f;
    /* Muted greenish grey for labels/subtitles */
    --input-bg: #eaf4eb;
    /* Light green tinted grey for inputs */
    --input-border: #cadbc8;
    --btn-bg: #2d6a4f;
    /* Main green button */
    --btn-hover: #1b4332;
    --link-color: #40916c;
    --footer-bg: #eaf4eb;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.auth-page-wrapper {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 60px 20px;
}

.auth-card-container {
    background-color: transparent;
    width: 100%;
    max-width: 450px;
    padding: 30px 20px;
    border: 1px solid var(--input-border);
    border-radius: 16px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-container .logo {
    width: 60px;
    height: 60px;
    background-color: var(--input-bg);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 15px;
}

.half {
    flex: 1;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
    color: var(--text-main);
}

input::placeholder {
    color: #8da998;
}

input:focus {
    border-color: var(--btn-bg);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    padding-left: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* File Upload */
input[type="file"] {
    width: 100%;
    padding: 10px 15px 10px 15px;
    background-color: var(--input-bg);
    border: 1px dashed var(--btn-bg);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
    color: var(--text-main);
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    margin-right: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--btn-hover);
}

.hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
    margin-left: 2px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--btn-bg);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.1s;
}

.submit-btn:hover {
    background-color: var(--btn-hover);
}

.submit-btn:active {
    transform: scale(0.98);
}

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
}

.login-link a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.footer-box {
    margin-top: 30px;
    background-color: var(--footer-bg);
    border: 1px solid var(--input-border);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-main);
}

.password-requirements {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid var(--input-border);
}

.req-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-main);
}

#passwordReqs {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.req-item {
    font-size: 0.8rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.req-item::before {
    content: "✖";
    margin-right: 8px;
    font-size: 0.9rem;
}

.req-item.unmet {
    color: #d32f2f;
}

.req-item.met {
    color: #2e7d32;
}

.req-item.met::before {
    content: "✔";
}

.password-error {
    color: #d32f2f;
    font-size: 0.8rem;
    margin-top: 8px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }
    .title {
        font-size: 1.8rem;
    }
}

/* Server Error Message Styling */
.server-error-banner {
    background-color: #fde8e8;
    border: 1px solid #f8b4b4;
    color: #c81e1e;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ==== RTL Layout overrides for Volunteer Portal ==== */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] * {
    font-family: 'Tajawal', sans-serif !important;
}

[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .fa-arrow-left::before { content: "\f061"; }
[dir="rtl"] .fa-arrow-right::before { content: "\f060"; }