/* =========================================================
   Auth Login — Modern Redesign
   Theme tokens: --theme-*, --c-*-rgb
   ========================================================= */

.lg-page {
    --lg-accent: rgb(var(--c-accent-rgb, 0, 156, 204));
    --lg-accent-rgb: var(--c-accent-rgb, 0, 156, 204);
    --lg-hover: rgb(var(--c-accent-hover-rgb, 0, 140, 184));
    --lg-text: rgb(var(--c-text-rgb, 15, 23, 42));
    --lg-muted: rgb(var(--c-gray-rgb, 100, 116, 139));
    --lg-card: rgb(var(--c-card-bg-rgb, 255, 255, 255));
    --lg-border: rgba(var(--c-border-rgb, 226, 232, 240), 0.95);
    --lg-ease: cubic-bezier(0.22, 1, 0.36, 1);
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 2.5rem 0 3rem;
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.lg-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 10% 10%, rgba(var(--lg-accent-rgb), 0.16), transparent 45%),
        radial-gradient(ellipse at 90% 90%, rgba(var(--c-secondary-rgb, var(--lg-accent-rgb)), 0.12), transparent 50%),
        linear-gradient(180deg, rgba(var(--c-bg-rgb, 248, 249, 250), 1), rgba(var(--c-bg-rgb, 248, 249, 250), 1));
    pointer-events: none;
}

.lg-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--lg-card);
    border: 1px solid var(--lg-border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 28px 60px -32px rgba(15, 23, 42, 0.35);
}

.lg-brand {
    position: relative;
    padding: 2.5rem 2.25rem;
    color: #f8fafc;
    background:
        radial-gradient(ellipse at 80% 0%, rgba(var(--lg-accent-rgb), 0.45), transparent 55%),
        linear-gradient(155deg, #0b1220 0%, #132033 55%, #0f1a2c 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 620px;
}

.lg-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 800;
}

.lg-brand__logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

.lg-brand__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: 12ch;
}

.lg-brand__desc {
    margin: 0 0 1.75rem;
    max-width: 34ch;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.98rem;
    line-height: 1.8;
    font-weight: 600;
}

.lg-brand__points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lg-brand__points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.9);
}

.lg-brand__points i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--lg-accent-rgb), 0.22);
    color: #fff;
    font-size: 12px;
}

.lg-brand__art {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.lg-brand__art img {
    width: min(100%, 320px);
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
    animation: lg-float 5s ease-in-out infinite;
}

@keyframes lg-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.lg-form-wrap {
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lg-form__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 12px;
    font-weight: 800;
    color: var(--lg-accent);
    letter-spacing: 0.04em;
}

.lg-form__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--lg-text);
    letter-spacing: -0.02em;
}

.lg-form__sub {
    margin: 0 0 1.75rem;
    color: var(--lg-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
}

.lg-alert {
    margin-bottom: 1rem;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
}

.lg-alert--success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.22);
    color: #047857;
}

.lg-field {
    margin-bottom: 1rem;
}

.lg-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 13px;
    font-weight: 800;
    color: var(--lg-text);
}

.lg-input {
    position: relative;
}

.lg-input i.lg-input__icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lg-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.lg-input input {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--lg-border);
    background: rgba(var(--c-bg-rgb, 248, 249, 250), 0.75);
    padding: 0 44px 0 44px;
    font-size: 14px;
    font-weight: 700;
    color: var(--lg-text);
    transition: border-color 0.18s var(--lg-ease), box-shadow 0.18s var(--lg-ease), background 0.18s var(--lg-ease);
}

.lg-input input::placeholder {
    color: rgba(var(--c-gray-rgb, 100, 116, 139), 0.75);
    font-weight: 600;
}

.lg-input input:focus {
    outline: none;
    border-color: rgba(var(--lg-accent-rgb), 0.55);
    background: var(--lg-card);
    box-shadow: 0 0 0 4px rgba(var(--lg-accent-rgb), 0.14);
}

/* Override global `form button` rules from theme style.css */
.lg-page form .lg-input__toggle,
.lg-page .lg-input__toggle {
    position: absolute;
    left: 8px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    background: transparent;
    color: var(--lg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.lg-page form .lg-input__toggle:hover,
.lg-page .lg-input__toggle:hover {
    background: rgba(var(--lg-accent-rgb), 0.08);
    color: var(--lg-accent);
    box-shadow: none;
}

.lg-page form .lg-input__toggle i,
.lg-page .lg-input__toggle i {
    position: static;
    transform: none;
    pointer-events: none;
    font-size: 15px;
    color: inherit;
}

.lg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0.35rem 0 1.35rem;
}

.lg-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--lg-text);
    cursor: pointer;
    user-select: none;
}

.lg-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--lg-accent);
    cursor: pointer;
}

.lg-forgot {
    font-size: 13px;
    font-weight: 800;
    color: var(--lg-accent);
    text-decoration: none !important;
}

.lg-forgot:hover {
    color: var(--lg-hover);
}

.lg-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--main-gradient, linear-gradient(135deg, var(--lg-accent), var(--lg-hover)));
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 16px 30px -14px rgba(var(--lg-accent-rgb), 0.7);
    transition: transform 0.18s var(--lg-ease), box-shadow 0.18s var(--lg-ease);
    cursor: pointer;
}

.lg-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px -14px rgba(var(--lg-accent-rgb), 0.8);
}

.lg-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--lg-muted);
}

.lg-footer a {
    color: var(--lg-accent);
    font-weight: 800;
    text-decoration: none !important;
    margin-inline-start: 4px;
}

.lg-footer a:hover {
    color: var(--lg-hover);
}

body[data-theme="dark"] .lg-shell {
    box-shadow: 0 28px 60px -32px rgba(0, 0, 0, 0.55);
}

@media (max-width: 991.98px) {
    .lg-page {
        min-height: auto;
        padding: 1.5rem 0 2rem;
    }

    .lg-shell {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .lg-brand {
        min-height: auto;
        padding: 1.75rem 1.5rem 1.5rem;
    }

    .lg-brand__art {
        display: none;
    }

    .lg-brand__title {
        max-width: none;
    }

    .lg-form-wrap {
        padding: 1.75rem 1.35rem 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lg-brand__art img,
    .lg-submit {
        animation: none;
        transition: none;
    }
}
