/* FPCeg login */
:root {
    --ln-brand: #1b2f5c;
    --ln-brand-dark: #16203a;
    --ln-brand-strong: #2b54a8;
    --ln-brand-soft: #eef2fb;
    --ln-accent: #c2a35a;
    --ln-accent-soft: #efe7d4;
    --ln-surface: #fffdf9;
    --ln-surface-alt: #faf8f2;
    --ln-canvas: #f4f1ea;
    --ln-ink: #16203a;
    --ln-ink2: #46506b;
    --ln-ink3: #767f95;
    --ln-hair: #e9e3d6;
    --ln-danger: #a83a47;
    --ln-radius: 8px;
    --ln-shadow: 0 24px 60px rgba(27, 47, 92, .16), 0 4px 14px rgba(27, 47, 92, .08);
}

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

body.login-lux {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ln-canvas);
    background-image:
        linear-gradient(rgba(27, 47, 92, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 47, 92, .04) 1px, transparent 1px);
    background-size: 32px 32px;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    padding: 24px;
    color: var(--ln-ink);
}

.ln-shell {
    background: var(--ln-surface);
    border-radius: var(--ln-radius);
    border: 1px solid var(--ln-hair);
    box-shadow: var(--ln-shadow);
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(320px, .88fr) minmax(420px, 1.12fr);
    overflow: hidden;
    animation: ln-rise .35s cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes ln-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ln-brand-panel {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .05), transparent 52%),
        linear-gradient(160deg, var(--ln-brand-dark), var(--ln-brand));
    color: #fff;
    padding: 48px 42px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    isolation: isolate;
}

.ln-brand-panel::after {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, .09);
    pointer-events: none;
    z-index: -1;
}

.ln-brand-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ln-logo {
    width: 100%;
    min-height: 112px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
}

.ln-logo img {
    display: block;
    width: 100%;
    max-width: 280px;
    max-height: 90px;
    object-fit: contain;
}

.ln-brand-copy {
    max-width: 320px;
}

.ln-brand-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--ln-accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ln-brand-copy h2 {
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.45;
}

.ln-brand-signature {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 600;
}

.ln-brand-signature i {
    color: var(--ln-accent);
}

.ln-form-panel {
    min-width: 0;
    padding: 28px 44px 24px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: linear-gradient(180deg, var(--ln-surface), var(--ln-surface-alt));
}

.ln-form-topbar {
    min-height: 38px;
    display: flex;
    justify-content: flex-end;
}

[dir="rtl"] .ln-form-topbar {
    justify-content: flex-start;
}

.ln-form-content {
    width: 100%;
    max-width: 380px;
    margin: auto;
    align-self: center;
}

.ln-heading {
    margin-bottom: 28px;
}

.ln-heading-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: var(--ln-brand-soft);
    color: var(--ln-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ln-heading h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ln-ink);
    line-height: 1.4;
}

.ln-heading p {
    font-size: 13px;
    color: var(--ln-ink3);
    margin-top: 5px;
}

.ln-field {
    margin-bottom: 18px;
}

.ln-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--ln-ink2);
    font-size: 12px;
    font-weight: 700;
}

.ln-input-wrap {
    position: relative;
}

.ln-field-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ln-ink3);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

[dir="rtl"] .ln-field-icon {
    right: 15px;
}

[dir="ltr"] .ln-field-icon {
    left: 15px;
}

.ln-input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--ln-hair);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: var(--ln-ink);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
    outline: none;
    appearance: none;
}

[dir="rtl"] .ln-input {
    padding: 0 42px 0 14px;
    text-align: right;
}

[dir="ltr"] .ln-input {
    padding: 0 14px 0 42px;
    text-align: left;
}

.ln-input:focus {
    border-color: var(--ln-brand-strong);
    box-shadow: 0 0 0 3px rgba(43, 84, 168, .12);
    background: var(--ln-surface);
}

.ln-input::placeholder {
    color: #9aa4ac;
    font-size: 13px;
}

.ln-eye {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ln-ink3);
    cursor: pointer;
    padding: .3rem .5rem;
    font-size: 14px;
    transition: color .15s;
    z-index: 1;
}

.ln-eye:hover,
.ln-eye:focus-visible {
    color: var(--ln-brand);
    outline: none;
}

[dir="rtl"] .ln-eye {
    left: 8px;
}

[dir="ltr"] .ln-eye {
    right: 8px;
}

[dir="rtl"] .ln-input[type="password"],
[dir="rtl"] .ln-input[data-has-toggle="1"] {
    padding-left: 44px;
}

[dir="ltr"] .ln-input[type="password"],
[dir="ltr"] .ln-input[data-has-toggle="1"] {
    padding-right: 44px;
}

/* ── Alert messages ─────────────────────────────────────────── */
.ln-alert {
    border-radius: 8px;
    padding: .6rem .85rem;
    margin-bottom: .9rem;
    font-size: .82rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    line-height: 1.4;
}

.ln-alert i {
    margin-top: .1rem;
    flex-shrink: 0;
}

.ln-alert-error {
    background: #ffebee;
    border: 1px solid #c62828;
    color: #7f0000;
}

.ln-alert-warning {
    background: #fff8e1;
    border: 1px solid #f9a825;
    color: #7a5800;
}

.ln-alert-info {
    background: #e3f2fd;
    border: 1px solid #1565c0;
    color: #0d3e7d;
}

.ln-alert-success {
    background: #e8f5e9;
    border: 1px solid #2e7d32;
    color: #1b5e20;
}

/* ── Submit button ──────────────────────────────────────────── */
.ln-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    min-height: 48px;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--ln-brand), #22407a);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    margin-top: 8px;
    font-family: inherit;
}

.ln-btn:hover {
    background: linear-gradient(135deg, var(--ln-brand-dark), var(--ln-brand));
}

.ln-btn:focus-visible {
    outline: 3px solid rgba(43, 84, 168, .22);
    outline-offset: 2px;
}

.ln-btn:active {
    transform: scale(.99);
}

.ln-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* ── Footer / bottom links ──────────────────────────────────── */
.ln-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--ln-hair);
    font-size: 11px;
    color: var(--ln-ink3);
}

.ln-footer a {
    color: var(--ln-brand);
    text-decoration: none;
    font-weight: 600;
}

.ln-footer a:hover {
    text-decoration: underline;
}

.ln-lang {
    text-align: start;
}

.ln-lang .dropdown-toggle {
    background: transparent;
    border: 1px solid var(--ln-hair);
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 12px;
    color: var(--ln-ink3);
    transition: border-color .15s, color .15s;
}

.ln-lang .dropdown-toggle:hover,
.ln-lang .dropdown-toggle:focus {
    border-color: var(--ln-brand);
    color: var(--ln-brand);
    box-shadow: none;
    outline: none;
}

.ln-lang .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(27, 47, 92, .15);
    border: 1px solid var(--ln-hair);
    min-width: 150px;
    padding: .3rem;
}

.ln-lang .dropdown-item {
    border-radius: 5px;
    padding: .45rem .85rem;
    font-size: .8rem;
    transition: background .12s;
}

.ln-lang .dropdown-item:hover {
    background: rgba(27, 47, 92, .06);
}

.ln-lang .dropdown-item.active {
    background: var(--ln-brand);
    color: #fff;
}

/* ── Language loading overlay ───────────────────────────────── */
.ln-lang-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 47, 92, .72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity .3s;
}

.ln-lang-overlay.visible {
    opacity: 1;
}

.ln-lang-overlay-inner {
    background: var(--ln-surface);
    border-radius: var(--ln-radius);
    padding: 2rem 2.5rem;
    text-align: center;
    box-shadow: var(--ln-shadow);
}

.ln-lang-overlay-inner p {
    font-size: .9rem;
    color: var(--ln-navy);
    font-weight: 600;
    margin-top: .75rem;
}

.ln-lang-overlay-icon,
.ln-lang-overlay-inner p {
    color: var(--ln-brand);
}

@media (max-width: 760px) {
    body.login-lux {
        height: var(--ln-visual-viewport-height, 100dvh);
        min-height: var(--ln-visual-viewport-height, 100dvh);
        align-items: center;
        padding: 14px;
        overflow-y: auto;
    }

    .ln-shell {
        max-width: 480px;
        min-height: 0;
        margin-block: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .ln-brand-panel {
        min-height: 120px;
        padding: 16px 18px;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .ln-brand-panel::after {
        inset: 10px;
    }

    .ln-brand-content {
        min-width: 0;
        flex: 1;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .ln-logo {
        width: 96px;
        min-width: 96px;
        min-height: 70px;
        padding: 8px;
    }

    .ln-logo img {
        max-height: 54px;
    }

    .ln-brand-copy h2 {
        font-size: 17px;
    }

    .ln-brand-kicker {
        margin-bottom: 4px;
        font-size: 10px;
    }

    .ln-brand-signature {
        display: none;
    }

    .ln-form-panel {
        padding: 14px 22px 18px;
    }

    .ln-form-content {
        margin: 6px auto 0;
        align-self: start;
        padding: 12px 0 8px;
    }

    .ln-heading {
        margin-bottom: 18px;
    }

    .ln-heading-icon {
        display: none;
    }

    .ln-heading h1 {
        font-size: 21px;
    }

    .ln-footer {
        margin-top: 18px;
        padding-top: 14px;
    }
}

@media (max-width: 380px) {

    .ln-brand-copy h2,
    .ln-brand-kicker {
        display: none;
    }

    .ln-brand-content {
        justify-content: center;
    }

    .ln-form-panel {
        padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ln-shell {
        animation: none;
    }
}