:root {
    --auth-primary: #6f7dff;
    --auth-secondary: #7d3dff;
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-text: #f5f7ff;
    --auth-muted: rgba(241, 244, 255, 0.72);
    --auth-input-bg: rgba(12, 19, 46, 0.55);
    --auth-card-bg: rgba(18, 25, 54, 0.74);
}

* {
    box-sizing: border-box;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    color: var(--auth-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top center, rgba(62, 82, 255, 0.26), transparent 30%),
        radial-gradient(circle at 20% 80%, rgba(116, 18, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #05081a 0%, #090d28 40%, #030512 100%);
}

body.auth-theme-light {
    --auth-primary: #5d6dff;
    --auth-secondary: #8a4dff;
    --auth-border: rgba(35, 56, 120, 0.12);
    --auth-text: #101828;
    --auth-muted: rgba(16, 24, 40, 0.64);
    --auth-input-bg: #ffffff;
    --auth-card-bg: #ffffff;
    background: #ffffff;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.auth-frame {
    width: min(100%, 1400px);
    min-height: min(92vh, 820px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(4, 9, 28, 0.44), rgba(4, 9, 28, 0.14)),
        rgba(3, 7, 24, 0.68);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

body.auth-theme-light .auth-frame {
    border-color: rgba(35, 56, 120, 0.1);
    background:
        linear-gradient(90deg, rgba(239, 243, 255, 0.88) 0%, rgba(255, 255, 255, 0.98) 58%),
        #ffffff;
    box-shadow: 0 20px 60px rgba(16, 24, 40, 0.08);
}

.auth-layout {
    direction: ltr;
}

[dir="rtl"] .auth-layout > [class*="col-"] {
    direction: rtl;
}

[dir="ltr"] .auth-layout > [class*="col-"] {
    direction: ltr;
}

.hero-panel {
    position: relative;
    height: 100%;
    min-height: 740px;
    background-image:
        linear-gradient(90deg, rgba(8, 12, 33, 0.4), rgba(8, 12, 33, 0.05)),
        url("/assets/images/login-hero.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.auth-theme-light .hero-panel {
    background-image:
        linear-gradient(135deg, rgba(247, 249, 255, 0.7), rgba(232, 238, 255, 0.86)),
        url("/assets/images/login-hero.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-inline-end: 1px solid rgba(35, 56, 120, 0.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 7, 22, 0.24), rgba(4, 7, 22, 0.58)),
        radial-gradient(circle at center, rgba(72, 78, 255, 0.16), transparent 25%);
}

body.auth-theme-light .hero-overlay {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(227, 235, 255, 0.36)),
        radial-gradient(circle at center, rgba(95, 109, 255, 0.14), transparent 28%);
}

.hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 3rem;
    gap: 0.75rem;
}

[dir="rtl"] .hero-content {
    align-items: center;
}

.hero-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
}

.hero-brand {
    font-size: clamp(2.7rem, 5vw, 4.75rem);
    font-weight: 900;
    line-height: 1;
    color: #7b87ff;
}

.hero-line {
    width: 70px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--auth-primary), var(--auth-secondary));
}

.hero-subtitle {
    margin: 0;
    max-width: 320px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 1.15rem;
    line-height: 1.8;
}

body.auth-theme-light .hero-title {
    color: #16203a;
}

body.auth-theme-light .hero-brand {
    color: #6f7dff;
    text-shadow: 0 12px 26px rgba(111, 125, 255, 0.18);
}

body.auth-theme-light .hero-code {
    color: rgba(93, 109, 255, 0.28);
}

.hero-code {
    position: absolute;
    color: rgba(122, 136, 255, 0.38);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-code-start {
    top: 24%;
    inset-inline-start: 18%;
    font-size: 2rem;
}

.hero-code-end {
    top: 16%;
    inset-inline-end: 18%;
    font-size: 1.5rem;
}

.login-panel {
    padding: 1.5rem;
}

.login-card {
    width: min(100%, 430px);
    margin-inline: auto;
    padding: 2.3rem 1.8rem;
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(22, 30, 64, 0.84), var(--auth-card-bg));
    backdrop-filter: blur(16px);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
}

body.auth-theme-light .login-card {
    border-color: rgba(35, 56, 120, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.98));
    box-shadow:
        0 18px 42px rgba(16, 24, 40, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.language-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.auth-switchers {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.auth-switchers .language-switcher {
    flex: 1 1 0;
    justify-content: center;
}

.auth-switchers .language-switcher__actions {
    width: 100%;
    justify-content: center;
}

.language-switcher__label {
    color: var(--auth-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.language-switcher__actions {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

body.auth-theme-light .language-switcher__actions {
    border-color: rgba(35, 56, 120, 0.1);
    background: rgba(93, 109, 255, 0.04);
}

.language-switcher__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    color: var(--auth-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.language-switcher__link:hover {
    color: #fff;
}

body.auth-theme-light .language-switcher__link:hover {
    color: #101828;
}

.language-switcher__link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(95, 135, 255, 0.95), rgba(126, 65, 255, 0.95));
    box-shadow: 0 8px 24px rgba(101, 103, 255, 0.22);
}

.language-switcher__icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    color: #f4f7ff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.language-switcher__icon-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
    border-color: rgba(126, 65, 255, 0.4);
    background: linear-gradient(135deg, rgba(95, 135, 255, 0.18), rgba(126, 65, 255, 0.22));
    box-shadow: 0 14px 32px rgba(46, 57, 120, 0.28);
}

.language-switcher__icon-link svg {
    width: 20px;
    height: 20px;
}

.brand-mark {
    font-size: 4rem;
    line-height: 1;
    font-weight: 900;
    color: #8b7fff;
}

.brand-name {
    font-size: 3rem;
    font-weight: 800;
}

.brand-text {
    color: var(--auth-muted);
    font-size: 0.95rem;
}

.form-label {
    color: #edf1ff;
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    width: 18px;
    height: 18px;
    color: rgba(225, 230, 255, 0.65);
    transform: translateY(-50%);
    z-index: 2;
}

.input-icon svg {
    width: 100%;
    height: 100%;
}

.form-control {
    min-height: 56px;
    padding-inline-start: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--auth-input-bg);
    color: var(--auth-text);
}

body.auth-theme-light .form-label {
    color: #101828;
}

body.auth-theme-light .input-icon {
    color: rgba(57, 74, 116, 0.6);
}

body.auth-theme-light .form-control {
    border-color: rgba(35, 56, 120, 0.12);
    background: var(--auth-input-bg);
    color: var(--auth-text);
}

body.auth-theme-light .form-control::placeholder {
    color: rgba(16, 24, 40, 0.42);
}

body.auth-theme-light .form-control:focus {
    background: #ffffff;
}

body.auth-theme-light .brand-text,
body.auth-theme-light .hero-subtitle,
body.auth-theme-light .language-switcher__label {
    color: rgba(16, 24, 40, 0.64);
}

body.auth-theme-light .language-switcher__icon-link {
    color: #334155;
    border-color: rgba(35, 56, 120, 0.12);
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 12px 28px rgba(16, 24, 40, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

body.auth-theme-light .language-switcher__icon-link:hover {
    color: #1f2937;
    border-color: rgba(95, 135, 255, 0.28);
    background: linear-gradient(135deg, rgba(95, 135, 255, 0.12), rgba(126, 65, 255, 0.14));
    box-shadow: 0 14px 28px rgba(95, 135, 255, 0.12);
}

body.auth-theme-light .brand-name {
    color: #111b34;
}

body.auth-theme-light .brand-mark {
    color: #7a65ff;
}

.form-control::placeholder {
    color: rgba(233, 236, 255, 0.38);
}

.form-control:focus {
    background: rgba(14, 21, 50, 0.7);
    color: var(--auth-text);
    border-color: rgba(111, 125, 255, 0.8);
    box-shadow: 0 0 0 0.25rem rgba(111, 125, 255, 0.14);
}

.login-btn {
    min-height: 56px;
    margin-top: 0.65rem;
    border: 0;
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(90deg, #5f87ff 0%, #7e41ff 100%);
    box-shadow: 0 12px 35px rgba(101, 103, 255, 0.3);
}

.login-btn:hover,
.login-btn:focus {
    color: #fff;
    background: linear-gradient(90deg, #567fff 0%, #7438ff 100%);
}

.invalid-feedback {
    color: #ffb6b6;
}

@media (max-width: 991.98px) {
    .auth-shell {
        padding: 0;
    }

    .auth-frame {
        min-height: 100vh;
        border-radius: 0;
        border: 0;
    }

    .login-panel {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.25rem;
    }

    .auth-switchers {
        gap: 0.65rem;
    }
}
