/* FPCeg login — matched to Plugins admin console login */
:root {
    --ln-bg: #0b1220;
    --ln-bg-2: #111827;
    --ln-surface: #ffffff;
    --ln-panel: #F4F6F8;
    --ln-border: #CFD6E2;
    --ln-text: #0F172A;
    --ln-muted: #878787;
    --ln-primary: #111827;
    --ln-primary-hover: #0b1220;
    --ln-danger-soft: #fef2f2;
    --ln-danger: #991b1b;
    --ln-radius: 12px;
    --ln-font: "DM Sans", "Cairo", "Segoe UI", system-ui, sans-serif;
    --ln-visual-viewport-height: 100dvh;
}

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

body.login-lux {
    font-family: var(--ln-font);
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--ln-bg);
    color: var(--ln-text);
    -webkit-font-smoothing: antialiased;
}

/* ── Hero (dark) ─────────────────────────────────────────────── */
.ln-hero {
    position: relative;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(148, 163, 184, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(51, 65, 85, 0.28), transparent 50%),
        linear-gradient(160deg, #0b1220 0%, #111827 55%, #0f172a 100%);
    color: #fff;
    overflow: hidden;
}

.ln-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
    pointer-events: none;
}

.ln-hero-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ln-hero-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.ln-hero-mark img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.ln-hero-brand strong {
    font-size: 18px;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: #fff;
}

.ln-hero-brand span {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ln-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.ln-hero-copy h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.25;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 14px;
    color: #fff;
}

.ln-hero-copy p {
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

.ln-hero-meta {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* ── Form panel ──────────────────────────────────────────────── */
.ln-panel {
    background: var(--ln-panel);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    min-width: 0;
}

.ln-container {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 36px 32px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.ln-form-topbar {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
}

.ln-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 48px;
}

.ln-logo-row img {
    display: block;
    max-width: 180px;
    max-height: 56px;
    object-fit: contain;
}

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

.ln-heading h1 {
    font-size: 1.45rem;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ln-text);
    line-height: 1.3;
}

.ln-heading p {
    color: var(--ln-muted);
    font-size: 14px;
    font-weight: 500;
}

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

.ln-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--ln-text);
    font-size: 13px;
}

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

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

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

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

.ln-input {
    width: 100%;
    padding: 11px 14px;
    height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--ln-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    appearance: none;
}

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

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

.ln-input:focus {
    border-color: var(--ln-primary);
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.18);
}

.ln-input::placeholder {
    color: #94a3b8;
    font-size: 14px;
}

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

.ln-eye:hover,
.ln-eye:focus-visible {
    color: var(--ln-primary);
    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;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.ln-alert {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    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: var(--ln-danger-soft);
    border: 1px solid #fecaca;
    color: var(--ln-danger);
}

.ln-alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ln-alert-info {
    background: #E8EBF0;
    border: 1px solid #CFD6E2;
    color: #111827;
}

.ln-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* ── Submit ──────────────────────────────────────────────────── */
.ln-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 8px;
    background: var(--ln-primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    min-height: 46px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease;
}

.ln-btn:hover {
    background: var(--ln-primary-hover);
}

.ln-btn:focus-visible {
    outline: 3px solid rgba(17, 24, 39, .22);
    outline-offset: 2px;
}

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

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

/* ── Footer ──────────────────────────────────────────────────── */
.ln-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--ln-muted);
    font-size: 12.5px;
    font-weight: 500;
}

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

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

/* ── Language switcher ───────────────────────────────────────── */
.ln-lang .dropdown-toggle {
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    min-height: 40px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    transition: border-color .15s, color .15s;
}

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

.ln-lang .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .12);
    border: 1px solid var(--ln-border);
    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(17, 24, 39, .08);
}

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

/* ── Language overlay ────────────────────────────────────────── */
.ln-lang-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 18, 32, .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: 0 8px 24px rgba(15, 23, 42, 0.12);
}

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

.ln-lang-overlay-icon {
    color: var(--ln-primary);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    body.login-lux {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: var(--ln-visual-viewport-height, 100dvh);
        min-height: var(--ln-visual-viewport-height, 100dvh);
        overflow-y: auto;
        background: var(--ln-panel);
    }

    .ln-hero {
        min-height: 0;
        padding: calc(20px + env(safe-area-inset-top, 0px))
            calc(20px + env(safe-area-inset-right, 0px))
            20px
            calc(20px + env(safe-area-inset-left, 0px));
    }

    .ln-hero-copy,
    .ln-hero-meta {
        display: none;
    }

    .ln-hero-brand {
        gap: 12px;
    }

    .ln-panel {
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        align-items: flex-start;
        justify-content: flex-start;
        min-height: 0;
        background: var(--ln-panel);
    }

    .ln-container {
        max-width: none;
        width: 100%;
        padding: 36px 22px 24px;
        margin: 0 auto;
    }
}

/* Phones — white card on canvas, safe brand padding, large lang target */
@media (max-width: 768px) {
    .ln-hero {
        padding: calc(18px + env(safe-area-inset-top, 0px))
            calc(18px + env(safe-area-inset-right, 0px))
            18px
            calc(18px + env(safe-area-inset-left, 0px));
    }

    .ln-hero-brand {
        gap: 10px;
        max-width: 100%;
    }

    .ln-hero-brand strong {
        font-size: 16px;
    }

    .ln-hero-mark {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .ln-panel {
        padding: 12px 14px calc(20px + env(safe-area-inset-bottom, 0px));
        background: var(--ln-panel);
        align-items: stretch;
    }

    .ln-container {
        max-width: none;
        width: 100%;
        border: 1px solid var(--ln-border);
        border-radius: var(--ln-radius);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
        padding: 40px 18px 28px;
        display: flex;
        flex-direction: column;
    }

    .ln-form-topbar {
        top: 14px;
        inset-inline-end: 14px;
    }

    .ln-lang .dropdown-toggle {
        min-height: 44px;
        min-width: 48px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .ln-logo-row {
        margin-top: 4px;
        margin-bottom: 18px;
    }

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

    .ln-heading h1 {
        font-size: 1.35rem;
    }

    .ln-input,
    .ln-btn {
        min-height: 44px;
        height: auto;
    }

    .ln-input {
        font-size: 16px; /* avoid iOS zoom on focus */
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .ln-input:focus {
        border-color: var(--ln-primary);
        box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.18);
    }

    .ln-btn {
        min-height: 48px;
        margin-top: 12px;
        font-size: 15px;
        background: var(--ln-primary);
    }

    .ln-btn:hover {
        background: var(--ln-primary-hover);
    }

    .ln-eye {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

    .ln-footer {
        margin-top: 24px;
        padding-top: 8px;
    }
}

@media (max-width: 480px) {
    .ln-hero {
        padding: calc(16px + env(safe-area-inset-top, 0px))
            calc(16px + env(safe-area-inset-right, 0px))
            16px
            calc(16px + env(safe-area-inset-left, 0px));
    }

    .ln-panel {
        padding: 10px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .ln-container {
        padding: 38px 16px 24px;
    }

    .ln-form-topbar {
        top: 12px;
        inset-inline-end: 12px;
    }

    .ln-logo-row {
        margin-bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ln-btn:active {
        transform: none;
    }
}
