.lg-page {
    --lg-navy: #0f1b3d;
    --lg-muted: #4a5775;
    --lg-subtle: #6b7794;
    --lg-blue: #1d5fd6;
    --lg-blue-dark: #174cae;
    --lg-border: #cbd5e6;
    --lg-bg: #eef3fc;
    --lg-danger: #d92d20;
    --lg-radius: 12px;
    --lg-ease: cubic-bezier(.22, .61, .36, 1);
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background: linear-gradient(180deg, #fff 0%, var(--lg-bg) 100%);
    color: var(--lg-navy);
    font-family: 'Alexandria', 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.lg-page *,
.lg-page *::before,
.lg-page *::after {
    box-sizing: border-box;
}

.lg-stage {
    position: relative;
    display: flex;
    align-items: center;
    min-height: inherit;
    max-width: 1440px;
    margin: 0 auto;
    padding: 48px 24px;
}

.lg-art {
    display: none;
}

.lg-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 36px 32px;
    background: #fff;
    border: 1px solid #e6ebf5;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(15, 27, 61, .04), 0 24px 48px -24px rgba(15, 27, 61, .18);
    animation: lg-rise .5s var(--lg-ease) both;
}

.lg-lang {
    position: absolute;
    top: 20px;
    inset-inline-start: 24px;
    z-index: 5;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lg-lang .dropdown {
    list-style: none;
}

.lg-lang .dash-head-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #dbe2ef;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 2px rgba(15, 27, 61, .06);
    color: var(--lg-navy);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    transition: border-color .2s var(--lg-ease), box-shadow .2s var(--lg-ease), background-color .2s var(--lg-ease);
}

.lg-lang .dash-head-link::after {
    margin: 0;
    transition: transform .2s var(--lg-ease);
}

.lg-lang .dash-head-link[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.lg-lang .dash-head-link:hover,
.lg-lang .dash-head-link.show {
    background: #fff;
    border-color: #b9c4dc;
    color: var(--lg-navy);
}

.lg-lang .dash-head-link:focus-visible {
    outline: 2px solid var(--lg-blue);
    outline-offset: 2px;
}

.lg-lang .dropdown-menu {
    min-width: 168px;
    margin-top: 8px;
    padding: 6px;
    border: 1px solid #e3e8f2;
    border-radius: 14px;
    box-shadow: 0 16px 36px -12px rgba(15, 27, 61, .22);
}

.lg-lang .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--lg-navy);
}

.lg-lang .dropdown-item:hover,
.lg-lang .dropdown-item:focus-visible {
    background: #eef3fc;
    color: var(--lg-navy);
}

.lg-lang .dropdown-item.is-current {
    color: var(--lg-blue);
}

.lg-lang .dropdown-item i {
    font-size: 1rem;
}

.lg-brand {
    display: block;
    margin-bottom: 32px;
}

.lg-brand img {
    display: block;
    height: 46px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.lg-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--lg-navy);
    animation: lg-rise .5s .08s var(--lg-ease) both;
}

.lg-sub {
    margin: 0 0 32px;
    font-size: .9375rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--lg-muted);
    animation: lg-rise .5s .14s var(--lg-ease) both;
}

.lg-field {
    margin-bottom: 20px;
    animation: lg-rise .5s .2s var(--lg-ease) both;
}

.lg-field+.lg-field {
    animation-delay: .26s;
}

.lg-label {
    display: block;
    margin-bottom: 8px;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--lg-navy);
}

.lg-control {
    position: relative;
}

.lg-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    font-size: 1.15rem;
    line-height: 1;
    color: var(--lg-subtle);
    pointer-events: none;
    transition: color .2s var(--lg-ease);
}

.lg-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 44px;
    font: inherit;
    font-size: 1rem;
    font-weight: 400;
    scroll-margin-block: 120px;
    color: var(--lg-navy);
    background: #fff;
    border: 1px solid var(--lg-border);
    border-radius: var(--lg-radius);
    transition: border-color .2s var(--lg-ease), box-shadow .2s var(--lg-ease), background-color .2s var(--lg-ease);
}

.lg-input::placeholder {
    color: #8490aa;
    opacity: 1;
}

.lg-input:hover {
    border-color: #b9c4dc;
}

.lg-input:focus {
    outline: none;
    border-color: var(--lg-blue);
    box-shadow: 0 0 0 4px rgba(29, 95, 214, .16);
}

.lg-control:focus-within .lg-icon {
    color: var(--lg-blue);
}

.lg-input.is-invalid {
    border-color: var(--lg-danger);
    background-image: none;
    padding-inline-end: 44px;
}

.lg-field:has(.is-invalid) .lg-icon {
    color: var(--lg-danger);
}

.lg-input:-webkit-autofill {
    -webkit-text-fill-color: var(--lg-navy);
    box-shadow: 0 0 0 1000px #fff inset;
}

.lg-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(217, 45, 32, .14);
}

.lg-input:not(:placeholder-shown) {
    direction: ltr;
    text-align: left;
}

.lg-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.15rem;
    color: #8793ad;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: color .2s var(--lg-ease), background-color .2s var(--lg-ease);
}

.lg-toggle:hover {
    color: var(--lg-navy);
    background: #f1f4fa;
}

.lg-toggle:focus-visible,
.lg-link:focus-visible,
.lg-check input:focus-visible+span::before {
    outline: 2px solid var(--lg-blue);
    outline-offset: 2px;
}

.lg-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--lg-danger);
    animation: lg-rise .25s var(--lg-ease) both;
}

.lg-error i {
    flex: none;
    margin-top: 2px;
    font-size: 1rem;
    line-height: 1;
}

.lg-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0 0 24px;
}

.lg-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: .875rem;
    color: var(--lg-muted);
    cursor: pointer;
    user-select: none;
}

.lg-check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.lg-check span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lg-check span::before {
    content: '';
    flex: none;
    width: 18px;
    height: 18px;
    border: 1px solid #b9c4dc;
    border-radius: 5px;
    background: #fff center / 12px no-repeat;
    transition: background-color .2s var(--lg-ease), border-color .2s var(--lg-ease);
}

.lg-check input:checked+span::before {
    border-color: var(--lg-blue);
    background-color: var(--lg-blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E");
}

.lg-link {
    font-size: .875rem;
    font-weight: 600;
    color: var(--lg-blue);
    text-decoration: none;
    border-radius: 4px;
}

.lg-link:hover {
    color: var(--lg-blue-dark);
    text-decoration: underline;
}

.lg-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--lg-blue);
    border: 0;
    border-radius: var(--lg-radius);
    box-shadow: 0 8px 18px -8px rgba(29, 95, 214, .65);
    cursor: pointer;
    transition: background-color .2s var(--lg-ease), transform .2s var(--lg-ease), box-shadow .2s var(--lg-ease);
}

.lg-submit:hover {
    background: var(--lg-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px -10px rgba(29, 95, 214, .7);
}

.lg-submit:active {
    transform: translateY(0);
}

.lg-submit:focus-visible {
    outline: 3px solid rgba(29, 95, 214, .35);
    outline-offset: 2px;
}

.lg-submit:disabled,
.lg-submit[aria-disabled="true"] {
    cursor: not-allowed;
    background: #7fa2e6;
    box-shadow: none;
    transform: none;
}

.lg-submit.is-loading {
    cursor: progress;
}

.lg-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lg-spin .7s linear infinite;
}

.lg-submit.is-loading .lg-spinner {
    display: inline-block;
}

.lg-register {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid #edf0f6;
    text-align: center;
    font-size: .9375rem;
    color: var(--lg-muted);
}

.lg-register a {
    font-weight: 600;
    color: var(--lg-blue);
    text-decoration: none;
}

.lg-register a:hover {
    text-decoration: underline;
}

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

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes lg-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes lg-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 768px) {
    .lg-stage {
        position: static;
    }

    .lg-art {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        animation: lg-fade .6s .1s ease both;
    }

    .lg-art img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 50% 55%;
    }

    .lg-art::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to var(--lg-fade), rgba(238, 243, 252, .92) 0, rgba(238, 243, 252, .7) 25%, rgba(238, 243, 252, 0) 62%);
    }

    .lg-page {
        --lg-fade: right;
    }

    [dir="rtl"] .lg-page {
        --lg-fade: left;
    }

    .lg-panel {
        margin-inline: 0 auto;
        margin-inline-start: 0;
        margin-inline-end: auto;
    }

    .lg-stage {
        padding-inline: 40px;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .lg-art img {
        object-position: 30% 55%;
    }

    .lg-panel {
        max-width: 420px;
    }
}

@media (min-width: 1200px) {
    .lg-stage {
        padding-inline: 72px;
    }

    .lg-panel {
        max-width: 460px;
        padding: 44px 40px 36px;
    }
}

@media (max-width: 767.98px) {
    .lg-page {
        background: radial-gradient(120% 60% at 50% 0, #dce8fb 0, rgba(238, 243, 252, 0) 70%), linear-gradient(180deg, #f4f7fd 0, #fff 100%);
    }

    .lg-stage {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 0 16px 32px;
    }

    .lg-art {
        display: block;
        position: relative;
        z-index: 1;
        width: calc(100% + 32px);
        margin: 0 -16px;
        aspect-ratio: 3 / 2;
        max-height: 44vh;
        pointer-events: none;
        animation: lg-fade .6s .1s ease both;
        -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 55%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 0, #000 55%, transparent 100%);
    }

    .lg-art img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 50% 55%;
    }

    .lg-lang {
        top: 12px;
        inset-inline-start: 12px;
    }

    .lg-panel {
        max-width: 440px;
        margin: -64px auto 0;
        padding: 28px 20px 24px;
        scroll-margin-top: 16px;
        border-radius: 20px;
        box-shadow: 0 1px 2px rgba(15, 27, 61, .04), 0 20px 40px -20px rgba(15, 27, 61, .25);
    }

    .lg-brand {
        display: flex;
        justify-content: center;
        margin: 0 0 20px;
    }

    .lg-brand img {
        height: 44px;
    }

    .lg-logo img {
        height: 44px;
    }

    .lg-title,
    .lg-sub {
        text-align: center;
    }

    .lg-title {
        font-size: 1.5rem;
    }

    .lg-sub {
        margin-bottom: 24px;
        font-size: .9rem;
    }

    .lg-input,
    .lg-submit {
        height: 52px;
        font-size: 16px;
    }

    .lg-brand {
        margin-bottom: 20px;
    }

    .lg-sub {
        margin-bottom: 24px;
    }

    .lg-stage {
        padding-bottom: max(32px, env(safe-area-inset-bottom));
    }

    .lg-toggle {
        width: 44px;
        height: 44px;
        inset-inline-end: 4px;
    }

    .lg-check {
        min-height: 44px;
    }

    .lg-link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .lg-row {
        margin-bottom: 14px;
    }

    .lg-register {
        margin-top: 18px;
    }
}

@media (max-width: 359.98px) {
    .lg-stage {
        padding-inline: 12px;
    }

    .lg-panel {
        padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lg-page *,
    .lg-page *::before,
    .lg-page *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
    }

    .lg-spinner {
        animation-duration: 1.5s !important;
    }
}

.lg-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.lg-logo img {
    height: 40px;
    width: auto;
}

.lg-logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    text-wrap: balance;
    color: var(--lg-navy);
}
