/* ============================================================
   Login page — brand-aligned with the header/side menu.
   Page tag: lgn-   |   Standalone page (Layout = null).
   ============================================================ */
:root {
    --lgn-teal-dark: var(--nqa-teal, #344C51);
    --lgn-teal: var(--nqa-teal-mid, #3E5B61);
    --lgn-teal-hover: #2D4853;
    --lgn-gold: var(--nqa-gold, #B39D71);
    --lgn-gold-light: #C9B58C;
    --lgn-text: #1C2B2E;
    --lgn-muted: #788C90;
    --lgn-border: #E4E8EB;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Cairo', sans-serif;
}

.lgn-body {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background lives on a fixed pseudo-element so it can be mirrored independently
   of the form/content sitting above it. */
.lgn-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(120deg, rgba(52,76,81,0.78) 0%, rgba(62,91,97,0.55) 45%, rgba(52,76,81,0.30) 100%), url("/images/nauss-login.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Arabic (RTL): mirror the background image horizontally.
   English (LTR): keep it in its original orientation. */
html[dir="rtl"] .lgn-body::before {
    transform: scaleX(-1);
}

/* ---------- Top bar (language toggle) ---------- */
.lgn-topbar {
    display: flex;
    justify-content: flex-end;
    padding: 16px 22px 0;
}

.lgn-lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.18s ease, border-color 0.18s ease;
}

    .lgn-lang:hover {
        background: rgba(179,157,113,0.30);
        border-color: var(--lgn-gold-light);
        color: #fff;
    }

    .lgn-lang .bi {
        font-size: 1rem;
        color: var(--lgn-gold-light);
    }

/* ---------- Main / card placement (kept on the start side) ---------- */
.lgn-main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    padding: 24px clamp(18px, 6vw, 90px);
}

.lgn-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 20px;
    border-top: 4px solid var(--lgn-gold);
    box-shadow: 0 18px 50px rgba(20,35,38,0.35);
    padding: 34px 34px 30px;
    animation: lgnFadeUp 0.45s ease both;
}

@keyframes lgnFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lgn-card-head {
    text-align: center;
    margin-bottom: 22px;
}

    .lgn-card-head img {
        max-height: 72px;
        width: auto;
        margin-bottom: 14px;
    }

.lgn-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--lgn-teal-dark);
    margin: 0;
}

.lgn-subtitle {
    font-size: 0.9rem;
    color: var(--lgn-muted);
    margin-top: 4px;
}

.lgn-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lgn-border), transparent);
    margin: 4px 0 22px;
}

/* ---------- Form ---------- */
.lgn-field {
    margin-bottom: 18px;
}

.lgn-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--lgn-teal);
    margin-bottom: 7px;
}

    .lgn-label .lgn-req {
        color: var(--lgn-gold);
        margin-inline-start: 2px;
    }

.lgn-input {
    width: 100%;
    height: 54px;
    border: 1.5px solid var(--lgn-border);
    border-radius: 12px;
    padding: 0 16px;
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    color: var(--lgn-text);
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

    .lgn-input::placeholder {
        color: #aab6b8;
    }

    .lgn-input:focus {
        outline: none;
        border-color: var(--lgn-gold);
        box-shadow: 0 0 0 4px rgba(179,157,113,0.16);
    }

    .lgn-input.input-validation-error {
        border-color: #D0463B;
        box-shadow: 0 0 0 4px rgba(208,70,59,0.12);
    }

.lgn-help {
    display: block;
    font-size: 0.76rem;
    color: var(--lgn-muted);
    margin-top: 6px;
}

.lgn-error {
    display: block;
    font-size: 0.78rem;
    color: #D0463B;
    font-weight: 600;
    margin-top: 6px;
}

.lgn-valsummary ul {
    margin: 0 0 16px;
    padding: 12px 16px;
    list-style: none;
    background: rgba(208,70,59,0.08);
    border: 1px solid rgba(208,70,59,0.25);
    border-radius: 10px;
    color: #B23B3B;
    font-size: 0.82rem;
    font-weight: 600;
}

.lgn-valsummary ul:empty {
    display: none;
}

/* ---------- Submit ---------- */
.lgn-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--lgn-teal) 0%, var(--lgn-teal-dark) 100%);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
    box-shadow: 0 6px 18px rgba(52,76,81,0.28);
}

    .lgn-btn:hover {
        background: linear-gradient(135deg, var(--lgn-teal-dark) 0%, var(--lgn-teal-hover) 100%);
        box-shadow: 0 8px 22px rgba(52,76,81,0.36);
    }

    .lgn-btn:active {
        transform: translateY(1px);
    }

    .lgn-btn:disabled {
        opacity: 0.75;
        cursor: progress;
    }

    .lgn-btn .bi {
        font-size: 1.05rem;
        color: var(--lgn-gold-light);
    }

/* ---------- Footer ---------- */
.lgn-footer {
    flex-shrink: 0;
    background: rgba(52,76,81,0.55);
    backdrop-filter: blur(6px);
    border-top: 2px solid var(--lgn-gold);
    color: rgba(255,255,255,0.85);
}

.lgn-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px clamp(18px, 6vw, 90px);
    font-size: 0.82rem;
}

.lgn-footer-brand {
    font-weight: 800;
    color: var(--lgn-gold-light);
}

.lgn-social a {
    color: rgba(255,255,255,0.85);
    margin-inline-start: 16px;
    font-size: 1rem;
    transition: color 0.18s ease;
}

    .lgn-social a:hover {
        color: var(--lgn-gold-light);
    }

@media (max-width: 575.98px) {
    .lgn-card {
        padding: 26px 22px 22px;
    }

    .lgn-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .lgn-social a {
        margin: 0 8px;
    }
}
