:root {
    --navy-1000: #020b14;
    --navy-950: #03101c;
    --navy-900: #061421;
    --navy-850: #091a2a;
    --navy-800: #0d2033;
    --gold-500: #efa924;
    --gold-450: #f4b73b;
    --gold-400: #ffc44d;
    --white: #ffffff;
    --text-main: #f7f8fa;
    --text-soft: #c4c9cf;
    --text-muted: #949ca7;
    --glass-border: rgba(217, 181, 114, 0.52);
    --input-border: rgba(255, 255, 255, 0.27);
    --danger: #ff7272;
    --card-radius: 28px;
    --input-radius: 14px;
    --transition: 180ms ease;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    background: var(--navy-1000);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text-main);
    background: var(--navy-1000);
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: grid;
    grid-template-columns:
        minmax(420px, 760px)
        minmax(540px, 700px);
    column-gap: clamp(48px, 4vw, 72px);
    justify-content: center;
    overflow-x: hidden;
    --panel-shift: 20px;
    background-image:
        linear-gradient(
            90deg,
            rgba(1, 12, 22, 0.89) 0%,
            rgba(2, 13, 23, 0.72) 34%,
            rgba(5, 14, 24, 0.39) 65%,
            rgba(4, 12, 21, 0.30) 100%
        ),
        url("../assets/solar-background.webp");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.page-overlay {
    position: absolute;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(1, 11, 20, 0.62) 0%,
            rgba(2, 12, 21, 0.12) 37%,
            rgba(2, 10, 18, 0.55) 100%
        ),

        radial-gradient(
            circle at 82% 56%,
            rgba(255, 159, 26, 0.12) 0%,
            rgba(255, 159, 26, 0.04) 24%,
            transparent 48%
        );
}

.ambient-glow {
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.ambient-glow-left {
    width: 460px;
    height: 320px;
    left: 31%;
    bottom: 11%;
    background: rgba(255, 153, 25, 0.08);
}

.ambient-glow-right {
    width: 430px;
    height: 430px;
    left: 40%;
    top: 24%;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(255, 205, 120, 0.22) 0%,
            rgba(255, 174, 65, 0.14) 22%,
            rgba(255, 145, 35, 0.07) 45%,
            transparent 72%
        );
    filter: blur(42px);
    opacity: 0.65;
    animation: sunlightDrift 13s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

@keyframes sunlightDrift {
    0% {
        transform:
            translate3d(-8px, 5px, 0)
            scale(1);
        opacity: 0.55;
    }

    45% {
        transform:
            translate3d(5px, -4px, 0)
            scale(1.035);
        opacity: 0.72;
    }

    100% {
        transform:
            translate3d(12px, 3px, 0)
            scale(1.06);
        opacity: 0.62;
    }
}

.ambient-glow-right::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 90px;
    left: -250px;
    top: 185px;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 187, 83, 0.07),
            transparent
        );
    filter: blur(24px);
    transform: rotate(-13deg);
    animation: sunRayMove 10s ease-in-out infinite alternate;
}

@keyframes sunRayMove {
    from {
        opacity: 0.35;
        transform:
            rotate(-13deg)
            translateX(-10px);
    }

    to {
        opacity: 0.65;
        transform:
            rotate(-11deg)
            translateX(18px);
    }
}

.hero-panel {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding-block: 58px 62px;
    padding-inline: 60px 20px;
    transform: translateX(var(--panel-shift));
}

.brand {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    border-radius: 12px;
}

.brand:focus-visible {
    outline: 2px solid var(--gold-450);
    outline-offset: 6px;
}

/* The official horizontal lockup (<x-brand-logo variant="lockup">), at its own proportions. */
.brand .brand-logo-part-lockup {
    width: clamp(260px, 21vw, 340px);
}

.hero-content {
    width: min(680px, 100%);
    margin-top: clamp(74px, 8.5vh, 112px);
}

.hero-welcome {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #c3c6ca;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.88px;
}

.hero-welcome-line {
    width: 40px;
    height: 2px;
    background: var(--gold-450);
    box-shadow: 0 0 10px rgba(246, 185, 63, 0.20);
}

.hero-title {
    margin: 26px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: clamp(48px, 4.2vw, 68px);
    line-height: 1.12;
    letter-spacing: -0.72px;
    font-weight: 700;
}

.hero-title-gold {
    color: var(--gold-450);
}

.hero-description {
    margin: 0;
    max-width: 610px;
    color: #c8ccd1;
    font-size: clamp(17px, 1.45vw, 21px);
    line-height: 1.68;
    letter-spacing: -0.88px;
}

.feature-strip {
    position: relative;
    --fs-gap: 20px;
    margin-top: 38px;
    margin-bottom: 32px;
    width: 100%;
    max-width: 560px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    column-gap: var(--fs-gap);
}

.feature-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-icon {
    width: 100%;
    max-width: 96px;
    aspect-ratio: 96 / 88;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 13px;
    color: var(--gold-450);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.01)
        ),
        rgba(5, 18, 31, 0.43);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 10px 25px rgba(0, 0, 0, 0.10);
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        background 220ms ease,
        box-shadow 220ms ease;
}

.feature-item:hover .feature-icon {
    transform: translateY(-4px);
    border-color: rgba(244, 183, 59, 0.42);
    background: rgba(8, 24, 39, 0.62);
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.18),
        0 0 24px rgba(244, 183, 59, 0.06);
}
.solar-system-icon {
    width: min(60px, 63%);
    height: min(60px, 63%);
    object-fit: contain;
    display: block;
}

.feature-icon svg {
    width: min(52px, 58%);
    height: min(52px, 58%);
}

.feature-icon svg,
.feature-icon img {
    transition: transform 220ms ease;
}

.feature-item:hover .feature-icon svg,
.feature-item:hover .feature-icon img {
    transform: scale(1.05);
}

.feature-item p {
    margin: 12px 0 0;
    color: #f4f5f6;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.feature-separator {
    position: absolute;
    top: 12px;
    width: 1px;
    height: 64px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(205, 209, 217, 0),
        rgba(205, 209, 217, 0.45) 18%,
        rgba(233, 154, 8, 0.45) 82%,
        rgba(230, 189, 10, 0)
    );
    box-shadow: 0 0 7px rgba(228, 150, 17, 0.08);
}

.feature-separator:first-of-type {
    inset-inline-start: calc(100% / 3 - var(--fs-gap) / 6 - 0.5px);
}

.feature-separator:last-of-type {
    inset-inline-start: calc(200% / 3 + var(--fs-gap) / 6 - 0.5px);
}

.security-note {
    margin-top: auto;
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #b7bcc4;
    font-size: 15px;
    line-height: 1.3;
}

.security-note svg {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    color: var(--gold-450);
}

.auth-panel {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 46px;
    padding-inline: 12px 60px;
    transform: translateX(calc(-1 * var(--panel-shift)));
}

html[dir="rtl"] .hero-panel {
    transform: translateX(calc(-1 * var(--panel-shift)));
}

html[dir="rtl"] .auth-panel {
    transform: translateX(var(--panel-shift));
}

.login-card {
    width: min(610px, 100%);
    position: relative;
    overflow: hidden;
    padding: 36px 42px 30px;
    border-radius: 28px;
    background: linear-gradient(
        155deg,
        rgba(9, 25, 42, 0.72) 0%,
        rgba(7, 21, 35, 0.68) 45%,
        rgba(4, 15, 26, 0.76) 100%
    );
    border: 1px solid rgba(210, 176, 112, 0.24);
    backdrop-filter: blur(24px) saturate(118%);
    -webkit-backdrop-filter: blur(24px) saturate(118%);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(0, 0, 0, 0.06);
    animation: cardEnter 700ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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

.login-card::before {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    right: -170px;
    top: 150px;
    border-radius: 50%;
    background: rgba(255, 164, 37, 0.11);
    filter: blur(105px);
    pointer-events: none;
}

.login-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0.018),
        transparent 30%,
        transparent 68%,
        rgba(255, 185, 75, 0.02)
    );
}

.user-badge {
    position: relative;
    z-index: 1;
    width: 98px;
    height: 98px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    color: var(--gold-450);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.20);
    background: rgba(2, 14, 24, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.user-badge svg {
    width: 50px;
    height: 50px;
}

.auth-heading {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-heading h2 {
    margin: 0;
    font-size: clamp(33px, 2.3vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.56px;
    font-weight: 700;
}

.auth-heading p {
    margin: 12px 0 0;
    color: #c6cbd2;
    font-size: 16px;
    line-height: 1.5;
}

.login-form {
    position: relative;
    z-index: 1;
    margin-top: 48px;
}

.form-group + .form-group {
    margin-top: 25px;
}

.form-group label {
    display: inline-block;
    margin-bottom: 10px;
    color: #f1f2f4;
    font-size: 16px;
    font-weight: 500;
}

.input-container {
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: 12px;
    background:
        linear-gradient(
            90deg,
            rgba(6, 18, 30, 0.42),
            rgba(42, 31, 23, 0.18)
        );
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.input-container:focus-within {
    border-color: rgba(246,185,63,0.82);
    box-shadow:
        0 0 0 3px
        rgba(246,185,63,0.08),

        0 0 28px
        rgba(246,185,63,0.06);
}

.input-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: var(--gold-450);
}

.input-icon svg {
    width: 25px;
    height: 25px;
}

.input-container input {
    min-width: 0;
    flex: 1;
    height: 62px;
    padding: 0;
    border: 0;
    outline: 0;
    color: #f6f7f9;
    background: transparent;
    font-size: 16px;
    caret-color: var(--gold-450);
}

.input-container input::placeholder {
    color: #9ba2ac;
    opacity: 1;
}

.password-toggle {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #9199a4;
    background: transparent;
    cursor: pointer;
    transition:
        color var(--transition),
        background var(--transition);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--gold-450);
    background: rgba(255,255,255,0.045);
}

.password-toggle svg {
    width: 21px;
    height: 21px;
}

.password-toggle .icon-eye {
    display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
    display: block;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
    display: none;
}

.field-error {
    min-height: 0;
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 12px;
}

.field-error:empty {
    display: none;
}

.input-container.has-error {
    border-color: rgba(255,114,114,0.88);
    box-shadow: 0 0 0 3px rgba(255,114,114,0.07);
}

.form-options {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.remember-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #d5d9de;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.remember-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    position: relative;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.27);
    background: rgba(1,12,22,0.31);
    transition: all var(--transition);
}

.remember-option input:checked + .custom-checkbox {
    border-color: var(--gold-450);
    background: var(--gold-450);
}

.remember-option input:checked + .custom-checkbox::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid #081522;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    color: var(--gold-400);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
}

.forgot-link:hover {
    color: #ffd67d;
}

.primary-button {
    width: 100%;
    height: 66px;
    margin-top: 31px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    border-radius: 12px;
    color: #111821;
    font-size: 18px;
    font-weight: 600;
    background:
        linear-gradient(
            90deg,
            #eda923 0%,
            #f6bf4b 48%,
            #e8a51c 100%
        );
    box-shadow:
        inset
        0 1px 0
        rgba(255,255,255,0.33),

        0 11px 27px
        rgba(229,157,28,0.10);
    cursor: pointer;
    transition:
        transform var(--transition),
        filter var(--transition),
        box-shadow var(--transition);
}

.primary-button::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -45%;
    width: 35%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.28),
        transparent
    );
    transform: rotate(18deg);
    transition: left 600ms ease;
}

.primary-button:hover::before {
    left: 120%;
}

.primary-button:active {
    transform: translateY(1px);
}

.button-arrow {
    font-size: 30px;
    line-height: 1;
    font-weight: 400;
    transform: translateY(-1px);
}

.button-spinner {
    display: none;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 2px solid rgba(5,18,30,0.25);
    border-top-color: #071421;
    animation: spin 0.75s linear infinite;
}

.primary-button.is-loading {
    cursor: wait;
}

.primary-button.is-loading .button-arrow {
    display: none;
}

.primary-button.is-loading .button-spinner {
    display: block;
}

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

.copyright {
    position: relative;
    z-index: 1;
    margin: 33px 0 0;
    text-align: center;
    color: #a9afb8;
    font-size: 14px;
}

a:focus-visible,
button:focus-visible,
.remember-option input:focus-visible + .custom-checkbox {
    outline: 2px solid var(--gold-400);
    outline-offset: 4px;
}

.login-alert {
    position: relative;
    z-index: 2;
    margin: 24px 0 -18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.login-alert-success {
    color: #d8ffe8;
    border: 1px solid rgba(82, 210, 133, 0.24);
    background: rgba(30, 121, 67, 0.13);
}

.auth-simple-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    background-image:
        linear-gradient(90deg, rgba(1, 12, 22, .82), rgba(5, 14, 24, .42)),
        url("../assets/solar-background.webp");
    background-size: cover;
    background-position: center;
}

.auth-simple-wrap {
    width: min(520px, 100%);
}

.auth-simple-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-simple-brand .brand-logo-part-lockup {
    width: min(280px, 72vw);
}

.auth-simple-card {
    padding: 34px;
    border: 1px solid rgba(210, 176, 112, .24);
    border-radius: 24px;
    background: linear-gradient(155deg, rgba(9,25,42,.76), rgba(4,15,26,.82));
    backdrop-filter: blur(26px) saturate(118%);
    -webkit-backdrop-filter: blur(26px) saturate(118%);
    box-shadow: 0 28px 70px rgba(0,0,0,.34);
}

.auth-simple-card h1 {
    margin: 0 0 10px;
    font-size: 30px;
}

.auth-simple-card > p {
    margin: 0 0 26px;
    color: var(--text-soft);
    line-height: 1.6;
}

.auth-simple-card .form-group + .form-group {
    margin-top: 20px;
}

/* The base alert's negative bottom margin is tuned for the login form's 48px top margin; this
   form has none, so the alert keeps its own space here instead of sliding over the first label. */
.auth-simple-card .login-alert {
    margin: 0 0 22px;
    overflow-wrap: anywhere;
}

.auth-simple-actions {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-simple-actions .primary-button {
    margin-top: 0;
    width: auto;
    min-width: 180px;
    padding-inline: 22px;
}

.back-to-login {
    color: var(--gold-400);
    font-size: 14px;
}

.login-lang-switch {
    position: absolute;
    top: 28px;
    inset-inline-end: 32px;
    z-index: 6;
}

.lang-switch-login-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(6, 18, 30, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #f4f5f7;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.lang-switch-login-trigger svg {
    width: 16px;
    height: 16px;
    color: var(--gold-450);
}

.lang-switch-login-trigger:hover,
.lang-switch-login-trigger[aria-expanded="true"] {
    border-color: rgba(244, 183, 59, 0.45);
    background: rgba(8, 24, 39, 0.6);
}

.login-page .topbar-dropdown,
.auth-simple-page .topbar-dropdown {
    position: relative;
}

.login-page .topbar-dropdown-panel,
.auth-simple-page .topbar-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    width: max-content;
    min-width: 190px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(210, 176, 112, 0.24);
    background: linear-gradient(155deg, rgba(9, 25, 42, 0.94), rgba(4, 15, 26, 0.97));
    backdrop-filter: blur(20px) saturate(118%);
    -webkit-backdrop-filter: blur(20px) saturate(118%);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.4);
    z-index: 7;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
}

.login-page .topbar-dropdown[data-open="true"] .topbar-dropdown-panel,
.auth-simple-page .topbar-dropdown[data-open="true"] .topbar-dropdown-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.login-page .dropdown-section-label,
.auth-simple-page .dropdown-section-label {
    padding: 8px 10px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b93a0;
}

.login-page .dropdown-item,
.auth-simple-page .dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #d5d9de;
    font-size: 14px;
    text-align: start;
    cursor: pointer;
}

.login-page .dropdown-item svg,
.auth-simple-page .dropdown-item svg {
    width: 16px;
    height: 16px;
    color: #8b93a0;
}

.login-page .dropdown-item:hover,
.auth-simple-page .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.login-page .dropdown-item.is-active,
.auth-simple-page .dropdown-item.is-active {
    color: #fff;
    font-weight: 600;
    background: rgba(244, 183, 59, 0.12);
}

.login-page .dropdown-item.is-active svg,
.auth-simple-page .dropdown-item.is-active svg {
    color: var(--gold-450);
}

.login-page .dropdown-item-check,
.auth-simple-page .dropdown-item-check {
    margin-inline-start: auto;
    width: 14px;
    height: 14px;
    color: var(--gold-450);
    visibility: hidden;
}

.login-page .dropdown-item.is-active .dropdown-item-check,
.auth-simple-page .dropdown-item.is-active .dropdown-item-check {
    visibility: visible;
}

.auth-simple-page .login-lang-switch {
    position: absolute;
    top: 24px;
    inset-inline-end: 24px;
}

.login-lang-corner {
    position: absolute;
    top: 20px;
    inset-inline-end: 22px;
    z-index: 1;
}

.lang-inline-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    /* Keep the language order stable in RTL. */
    direction: ltr;
}

.lang-inline-link {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #8b93a0;
    transition: color var(--transition);
}

.lang-inline-link:hover {
    color: #f4f5f7;
}

.lang-inline-link.is-active {
    color: var(--gold-450);
}

.lang-inline-sep {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.22);
}

@media (min-width: 1921px) {
    .login-page {
        grid-template-columns:
            minmax(0, 1.05fr)
            minmax(560px, 680px);
        --panel-shift: 28px;
    }

    .hero-panel {
        padding-inline-start: clamp(60px, 4vw, 140px);
    }

    .auth-panel {
        padding-inline-end: clamp(60px, 4vw, 140px);
    }
}

@media (min-width: 1720px) and (max-width: 1920px) {
    .login-page {
        --panel-shift: -32px;
    }
}

@media (max-width: 1280px) {
    .login-page {
        grid-template-columns:
            minmax(400px, 1.05fr)
            minmax(480px, 0.86fr);
        --panel-shift: 12px;
    }

    .hero-panel {
        padding-inline-start: 42px;
    }

    .auth-panel {
        padding-inline-end: 38px;
    }

    .login-card {
        padding-left: 36px;
        padding-right: 36px;
    }
}

@media (max-width: 1024px) {
    .login-page {
        display: block;
        min-height: 100vh;
        background-position: 58% center;
        --panel-shift: 0px;
    }

    .hero-panel {
        min-height: auto;
        padding: 36px 32px 42px;
    }

    .brand .brand-logo-part-lockup {
        width: 260px;
    }

    .hero-content {
        margin-top: 62px;
    }

    .security-note {
        margin-top: 42px;
    }

    .auth-panel {
        min-height: auto;
        padding: 0 32px 58px;
    }

    .login-card {
        width: min(620px, 100%);
    }
}

@media (max-width: 700px) {
    .login-page {
        background-position: 62% center;
    }

    .hero-panel {
        padding: 28px 20px 34px;
    }

    .brand .brand-logo-part-lockup {
        width: min(230px, 68vw);
    }

    .hero-content {
        margin-top: 54px;
    }

    .hero-welcome {
        font-size: 11px;
    }

    .hero-welcome-line {
        width: 30px;
    }

    .hero-title {
        margin-top: 20px;
        font-size: clamp(39px, 11vw, 52px);
    }

    .hero-description {
        font-size: 16px;
        line-height: 1.6;
    }

    .feature-strip {
        margin-top: 34px;
        margin-bottom: 24px;
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 12px;
    }

    .feature-separator {
        display: none;
    }

    .feature-item {
        align-items: center;
        text-align: center;
    }

    .feature-icon {
        width: 88px;
        height: 78px;
    }

    .feature-icon svg {
        width: 52px;
        height: 52px;
    }

    .feature-item p {
        font-size: 12px;
        white-space: normal;
    }

    .security-note {
        width: 100%;
        font-size: 12px;
    }

    .security-note svg {
        width: 26px;
        height: 26px;
    }

    .auth-panel {
        padding: 0 16px 30px;
    }

    .login-card {
        padding: 30px 20px 26px;
        border-radius: 22px;
    }

    .user-badge {
        width: 82px;
        height: 82px;
    }

    .login-form {
        margin-top: 36px;
    }

    .form-options {
        align-items: flex-start;
    }

    .remember-option,
    .forgot-link {
        font-size: 12px;
    }

    .copyright {
        font-size: 12px;
    }

    .login-lang-switch {
        top: 16px;
        inset-inline-end: 16px;
    }

    .lang-switch-login-trigger span {
        display: none;
    }

    .lang-switch-login-trigger {
        width: 38px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .auth-simple-card { padding: 26px 20px; }
    .auth-simple-actions { flex-direction: column-reverse; align-items: stretch; }
    .auth-simple-actions .primary-button { width: 100%; }
    .back-to-login { text-align: center; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero-panel {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .hero-content {
        margin-top: 24px;
    }

    .feature-strip {
        margin-top: 20px;
    }

    .security-note {
        margin-top: 20px;
    }

    .login-card {
        padding-top: 20px;
        padding-bottom: 18px;
    }

    .user-badge {
        width: 64px;
        height: 64px;
        margin-bottom: 10px;
    }

    .login-form {
        margin-top: 24px;
    }
}

@media (max-width: 380px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .login-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .login-lang-corner {
        top: 14px;
        inset-inline-end: 14px;
    }

    .lang-inline-switch {
        gap: 4px;
    }

    .lang-inline-link {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}

/* ---------- Theme toggle ---------- */

.login-lang-corner,
.login-lang-switch {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-theme-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(6, 18, 30, 0.42);
    color: var(--gold-450);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.auth-theme-toggle:hover {
    border-color: rgba(244, 183, 59, 0.55);
}

.auth-theme-toggle svg {
    width: 17px;
    height: 17px;
}

/* Dark shows the sun (switch to light); light shows the moon. */
.auth-theme-icon-moon,
html[data-theme="light"] .auth-theme-icon-sun {
    display: none;
}

html[data-theme="light"] .auth-theme-icon-moon {
    display: block;
}

/* ---------- Light theme ----------
   The same composition in daylight: a bright sunrise (the photo washed with a warm cream light),
   navy text, a white card with a champagne edge. Colours follow the app's light tokens. */

html[data-theme="light"] {
    --text-main: #14213a;
    --text-soft: #4c566a;
    --text-muted: #6f7888;
    --danger: #c42b2b;
    background: #f6f1e7;
    color-scheme: light;
}

html[data-theme="light"] body {
    color: var(--text-main);
    background: #f6f1e7;
}

html[data-theme="light"] .login-page,
html[data-theme="light"] .auth-simple-page {
    background-image:
        linear-gradient(90deg, rgba(255, 251, 244, 0.93) 0%, rgba(255, 249, 240, 0.74) 38%, rgba(255, 246, 232, 0.32) 70%, rgba(255, 244, 228, 0.18) 100%),
        linear-gradient(#f3d4a4, #f3d4a4),
        url("../assets/solar-background.webp");
    background-blend-mode: normal, screen, normal;
}

html[data-theme="light"] .page-overlay {
    background:
        linear-gradient(180deg, rgba(255, 250, 241, 0.55) 0%, rgba(255, 250, 241, 0) 40%, rgba(246, 241, 231, 0.75) 100%),
        radial-gradient(circle at 82% 56%, rgba(255, 186, 74, 0.18) 0%, transparent 50%);
}

html[data-theme="light"] .ambient-glow-left {
    background: rgba(255, 196, 102, 0.16);
}

html[data-theme="light"] .hero-welcome,
html[data-theme="light"] .hero-description,
html[data-theme="light"] .security-note {
    color: #3e495d;
}

html[data-theme="light"] .hero-title {
    color: #14213a;
}

html[data-theme="light"] .hero-title-gold {
    color: #b8780d;
}

html[data-theme="light"] .feature-icon {
    border-color: rgba(216, 177, 91, 0.45);
    background: rgba(255, 255, 255, 0.82);
    color: #b8780d;
    box-shadow: 0 10px 24px -14px rgba(120, 86, 24, 0.45);
}

html[data-theme="light"] .feature-item:hover .feature-icon {
    border-color: #d8b15b;
    background: #ffffff;
}

html[data-theme="light"] .feature-item p {
    color: #14213a;
}

html[data-theme="light"] .feature-separator {
    background: linear-gradient(to bottom, rgba(216, 177, 91, 0), rgba(216, 177, 91, 0.55) 50%, rgba(216, 177, 91, 0));
    box-shadow: none;
}

html[data-theme="light"] .login-card,
html[data-theme="light"] .auth-simple-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(216, 177, 91, 0.5);
    box-shadow: 0 28px 60px -24px rgba(120, 86, 24, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

html[data-theme="light"] .login-card::before {
    background: rgba(255, 190, 80, 0.16);
}

html[data-theme="light"] .login-card::after {
    background: none;
}

html[data-theme="light"] .user-badge {
    border-color: rgba(216, 177, 91, 0.5);
    background: #fff8ea;
    color: #b8780d;
}

html[data-theme="light"] .auth-heading h2,
html[data-theme="light"] .auth-simple-card h1 {
    color: #14213a;
}

html[data-theme="light"] .auth-heading p,
html[data-theme="light"] .auth-simple-card > p,
html[data-theme="light"] .copyright {
    color: #5b6474;
}

html[data-theme="light"] .form-group label,
html[data-theme="light"] .remember-option {
    color: #14213a;
}

html[data-theme="light"] .input-container {
    border-color: #dccfb6;
    background: #ffffff;
}

html[data-theme="light"] .input-container:focus-within {
    border-color: #d99a22;
    box-shadow: 0 0 0 3px rgba(216, 177, 91, 0.3);
}

html[data-theme="light"] .input-container.has-error {
    border-color: #c42b2b;
    box-shadow: 0 0 0 3px rgba(196, 43, 43, 0.12);
}

html[data-theme="light"] .input-icon {
    color: #b8780d;
}

html[data-theme="light"] .input-container input {
    color: #14213a;
    caret-color: #b8780d;
}

html[data-theme="light"] .input-container input::placeholder {
    color: #8a93a2;
}

/* Browser autofill keeps the light field instead of painting it dark. */
html[data-theme="light"] .input-container input:-webkit-autofill {
    -webkit-text-fill-color: #14213a;
    box-shadow: 0 0 0 1000px #ffffff inset;
}

html[data-theme="light"] .password-toggle {
    color: #6f7888;
}

html[data-theme="light"] .password-toggle:hover,
html[data-theme="light"] .password-toggle:focus-visible {
    color: #b8780d;
    background: rgba(216, 177, 91, 0.12);
}

html[data-theme="light"] .custom-checkbox {
    border-color: #ccbfa6;
    background: #ffffff;
}

html[data-theme="light"] .forgot-link,
html[data-theme="light"] .back-to-login {
    color: #946210;
}

html[data-theme="light"] .forgot-link:hover,
html[data-theme="light"] .back-to-login:hover {
    color: #7a500b;
}

html[data-theme="light"] .login-alert-success {
    color: #14532d;
    border-color: rgba(31, 138, 112, 0.35);
    background: rgba(31, 138, 112, 0.1);
}

html[data-theme="light"] .lang-inline-link {
    color: #6f7888;
}

html[data-theme="light"] .lang-inline-link:hover {
    color: #14213a;
}

html[data-theme="light"] .lang-inline-link.is-active {
    color: #b8780d;
}

html[data-theme="light"] .lang-inline-sep {
    color: rgba(20, 33, 58, 0.2);
}

html[data-theme="light"] .auth-theme-toggle,
html[data-theme="light"] .lang-switch-login-trigger {
    border-color: rgba(216, 177, 91, 0.45);
    background: rgba(255, 255, 255, 0.85);
    color: #14213a;
}

html[data-theme="light"] .auth-theme-toggle {
    color: #b8780d;
}

html[data-theme="light"] .lang-switch-login-trigger svg {
    color: #b8780d;
}

html[data-theme="light"] .login-page .topbar-dropdown-panel,
html[data-theme="light"] .auth-simple-page .topbar-dropdown-panel {
    border-color: rgba(216, 177, 91, 0.45);
    background: #ffffff;
    box-shadow: 0 24px 48px -20px rgba(120, 86, 24, 0.4);
}

html[data-theme="light"] .login-page .dropdown-item,
html[data-theme="light"] .auth-simple-page .dropdown-item {
    color: #3e495d;
}

html[data-theme="light"] .login-page .dropdown-item:hover,
html[data-theme="light"] .auth-simple-page .dropdown-item:hover {
    background: #f6efe1;
    color: #14213a;
}

html[data-theme="light"] .login-page .dropdown-item.is-active,
html[data-theme="light"] .auth-simple-page .dropdown-item.is-active {
    background: rgba(216, 177, 91, 0.16);
    color: #14213a;
}

html[data-theme="light"] .brand:focus-visible,
html[data-theme="light"] a:focus-visible,
html[data-theme="light"] button:focus-visible {
    outline-color: #b8780d;
}
