/* Authentication page styling */
body.auth-body {
    min-height: 100vh;
    margin: 0;
    font-family: 'SSTArabic', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e6eef5 100%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    box-sizing: border-box;
}

.auth-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e6eef5;
    box-shadow: 0 18px 36px rgba(41, 79, 132, 0.16);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.auth-card--single {
    width: min(420px, 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-card__header {
    background: linear-gradient(135deg, #316fa1 0%, #294f84 100%);
    padding: 1.6rem 1.5rem 1.35rem;
    display: grid;
    gap: 1rem;
    color: #ffffff;
    text-align: center;
}

.auth-header-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
}

.auth-header-logos img.hrdf-logo {
    height: 54px;
    width: auto;
    filter: brightness(0) invert(1);
}

.auth-header-logos img.faq-logo {
    height: 70px;
    width: auto;
}

.auth-logo-divider {
    width: 1px;
    height: 46px;
    background: rgba(255, 255, 255, 0.4);
}

.auth-card__heading {
    display: grid;
    text-align: center;
    gap: 0.35rem;
}

.auth-card__title {
    margin: 0;
    font-weight: 800;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    color: #ffffff;
}

.auth-card__subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.auth-card__body {
    flex: 1;
    padding: 1.6rem 1.5rem 1.6rem;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: center;
}

.auth-alert {
    border-radius: 14px;
    border-width: 1.5px;
    font-weight: 600;
    padding: 0.85rem 1rem;
    background: rgba(220, 53, 69, 0.07);
    border-color: rgba(220, 53, 69, 0.35);
    color: #b02a37;
}

.auth-form {
    display: grid;
    gap: 1.15rem;
}

.auth-field {
    display: grid;
    gap: 0.55rem;
}

.auth-field label {
    font-weight: 700;
    color: rgba(29, 39, 51, 0.85);
    font-size: 0.95rem;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    inset-inline-start: 1rem;
    color: rgba(29, 39, 51, 0.45);
    font-size: 1.15rem;
    pointer-events: none;
    transition: color 0.25s ease;
}

.auth-input {
    width: 100%;
    border-radius: 12px;
    border: 1.8px solid rgba(218, 228, 238, 0.9);
    background: rgba(245, 248, 252, 0.9);
    padding: 0.85rem 1.1rem;
    padding-inline-start: 3rem;
    font-size: 0.95rem;
    color: #1d2733;
    transition: all 0.25s ease;
}

.auth-input::placeholder {
    color: rgba(107, 122, 137, 0.7);
}

.auth-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(49, 111, 161, 0.12);
}

.auth-input:focus + .auth-password-toggle,
.auth-input:focus ~ .auth-password-toggle {
    color: var(--brand-primary);
}

.auth-input:focus ~ .auth-input-icon,
.auth-input-wrapper:hover .auth-input-icon {
    color: var(--brand-primary);
}

.auth-input--with-toggle {
    padding-inline-end: 3.15rem;
}

.auth-password-toggle {
    position: absolute;
    inset-inline-end: 1rem;
    background: none;
    border: none;
    padding: 0;
    color: rgba(29, 39, 51, 0.45);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-password-toggle:hover {
    color: var(--brand-primary);
    transform: scale(1.05);
}

.auth-hint {
    font-size: 0.85rem;
    color: rgba(29, 39, 51, 0.58);
}

.auth-submit {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-primary), #21496f);
    color: #ffffff;
    padding: 0.95rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 14px 32px rgba(33, 73, 111, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(33, 73, 111, 0.32);
}

.auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 10px 28px rgba(33, 73, 111, 0.22);
}

.auth-submit:disabled {
    background: rgba(108, 117, 125, 0.8);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.85;
}

.auth-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(230, 238, 245, 0.9);
    margin-top: auto;
}

.auth-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #7a8694;
    font-weight: 500;
    font-family: "Times New Roman", "Times Roman", serif;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer-link:hover {
    color: #5c6673;
}

.auth-language-btn {
    background: none;
    border: none;
    padding: 0;
    color: #7a8694;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
    font-family: "Times New Roman", "Times Roman", serif;
}

.auth-language-btn:hover,
.auth-language-btn:focus-visible {
    color: #5c6673;
    text-decoration-color: #5c6673;
}

.auth-recaptcha {
    padding: 0.5rem 0;
}

.auth-metadata {
    font-size: 0.85rem;
    color: rgba(29, 39, 51, 0.55);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.auth-meta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(216, 123, 46, 0.1);
    color: var(--brand-orange);
}

@media (max-width: 768px) {
    body.auth-body {
        padding: 0;
    }

    .auth-card--single {
        min-height: 0;
        box-shadow: 0 14px 28px rgba(41, 79, 132, 0.12);
    }

    .auth-card__header {
        padding: 1.35rem 1.2rem;
        gap: 0.9rem;
    }

    .auth-card__body {
        padding: 1.35rem 1.2rem 1.35rem;
        justify-content: flex-start;
    }

    .auth-header-logos {
        gap: 1rem;
    }

    .auth-header-logos img.hrdf-logo {
        height: 48px;
    }

    .auth-header-logos img.faq-logo {
        height: 62px;
    }

    .auth-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-footer-link,
    .auth-language-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-card__header {
        padding: 1.2rem 1rem;
    }

    .auth-card__body {
        padding: 1.2rem 1rem 1.2rem;
    }

    .auth-input {
        padding-inline-start: 2.75rem;
    }
}

@media (min-width: 1024px) {
    body.auth-body {
        align-items: center;
    }

    .auth-card--single {
        min-height: 0;
        max-height: calc(100vh - clamp(2.5rem, 6vw, 4rem));
    }

    .auth-card__body {
        justify-content: center;
    }
}

body.lang-en .auth-card {
    text-align: left;
}

body.lang-en .auth-language-btn .language-text {
    font-family: 'Segoe UI', Arial, sans-serif;
}

