:root {
    --login-ink: #07111f;
    --login-ink-soft: #182230;
    --login-accent: #ffda00;
    --login-accent-deep: #c9aa00;
    --login-paper: #fcfbf7;
    --login-paper-muted: #f5f3ec;
    --login-border: #d8d9d6;
    --login-muted: #646b75;
    --login-danger: #b42318;
    --login-focus: rgba(255, 218, 0, .34);
    --login-shadow: 0 28px 70px rgba(7, 17, 31, .14);
    --login-ease: cubic-bezier(.22, 1, .36, 1);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

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

body.login-page {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background: var(--login-ink);
    color: var(--login-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--login-accent);
    color: var(--login-ink);
    font-size: .875rem;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform .2s ease;
}

.login-skip-link:focus {
    transform: translateY(0);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(420px, 42%) minmax(0, 58%);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--login-paper);
}

.login-form-panel {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: clamp(32px, 5vw, 80px);
    background:
        radial-gradient(circle at 0 0, rgba(255, 218, 0, .12), transparent 31rem),
        linear-gradient(145deg, #fff 0%, var(--login-paper) 58%, var(--login-paper-muted) 100%);
}

.login-form-panel::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: rgba(7, 17, 31, .12);
    content: "";
}

.login-form-wrap {
    width: min(100%, 460px);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(36px, 6vh, 64px);
    color: inherit;
    text-decoration: none;
}

.login-logo-box {
    display: inline-flex;
    width: 178px;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: var(--login-ink);
    box-shadow: 0 16px 36px rgba(7, 17, 31, .18);
}

.login-logo-box img {
    display: block;
    width: 144px;
    height: auto;
}

.login-brand-copy {
    display: grid;
    gap: 2px;
    line-height: 1.2;
}

.login-brand-copy strong {
    color: var(--login-ink);
    font-size: 1rem;
    font-weight: 800;
}

.login-brand-copy small {
    color: var(--login-muted);
    font-size: .79rem;
    font-weight: 650;
}

.login-form.kt-card {
    display: grid;
    width: 100%;
    gap: 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.login-heading {
    margin-bottom: 4px;
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: #645500;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.login-eyebrow::before {
    width: 28px;
    height: 3px;
    border-radius: 999px;
    background: var(--login-accent);
    content: "";
}

.login-heading h1 {
    margin: 0;
    color: var(--login-ink);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 790;
    letter-spacing: -.04em;
    line-height: 1.08;
}

.login-heading p {
    max-width: 42ch;
    margin: 14px 0 0;
    color: var(--login-muted);
    font-size: .96rem;
    font-weight: 500;
    line-height: 1.7;
}

.login-field {
    display: grid;
    gap: 8px;
}

.login-label {
    color: var(--login-ink-soft);
    font-size: .84rem;
    font-weight: 750;
}

.login-input.kt-input,
.login-password-field.kt-input {
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .82);
    color: var(--login-ink);
    font-size: .94rem;
    font-weight: 560;
    box-shadow: 0 1px 2px rgba(7, 17, 31, .03);
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.login-input.kt-input {
    padding: 0 15px;
}

.login-input.kt-input::placeholder,
.login-password-field input::placeholder {
    color: #92979f;
    opacity: 1;
}

.login-input.kt-input:hover,
.login-password-field.kt-input:hover {
    border-color: #b6b8b6;
    background: #fff;
}

.login-input.kt-input:focus,
.login-password-field.kt-input:focus-within {
    border-color: var(--login-ink);
    background: #fff;
    box-shadow: 0 0 0 4px var(--login-focus);
    outline: 0;
}

.login-password-field.kt-input {
    display: flex;
    align-items: center;
    padding: 0 7px 0 15px;
}

.login-password-field input {
    min-width: 0;
    height: 52px;
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--login-ink);
    font: inherit;
    outline: 0;
}

.login-password-toggle {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #69717d;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.login-password-toggle:hover {
    background: #f0eee7;
    color: var(--login-ink);
}

.login-password-toggle:focus-visible,
.login-remember input:focus-visible,
.login-submit:focus-visible,
.login-brand:focus-visible {
    outline: 3px solid var(--login-accent);
    outline-offset: 3px;
}

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

.login-eye-closed,
.login-password-toggle.is-visible .login-eye-open {
    display: none;
}

.login-password-toggle.is-visible .login-eye-closed {
    display: block;
}

.login-field-error {
    min-height: 18px;
    color: var(--login-danger);
    font-size: .76rem;
    font-weight: 650;
    line-height: 1.45;
}

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

.login-input.input-validation-error,
.login-password-field:has(.input-validation-error) {
    border-color: var(--login-danger);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, .09);
}

.login-validation-summary,
[data-flash-toast] {
    padding: 12px 14px;
    border: 1px solid #f0b9b3;
    border-radius: 10px;
    background: #fff3f2;
    color: #912018;
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.5;
}

.login-validation-summary:empty,
.login-validation-summary.validation-summary-valid {
    display: none;
}

.login-validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

[data-flash-toast] {
    display: block;
    margin-bottom: 18px;
}

[data-flash-toast][data-toast-type="success"] {
    border-color: #a6d8be;
    background: #ecf9f2;
    color: #11633a;
}

.login-options {
    margin-top: -2px;
}

.login-remember {
    display: inline-flex;
    align-items: flex-start;
    gap: 11px;
    color: var(--login-ink-soft);
    cursor: pointer;
    user-select: none;
}

.login-remember .kt-checkbox {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 1px;
    border-color: #b9bcbf;
    border-radius: 5px;
}

.login-remember .kt-checkbox:checked {
    border-color: var(--login-ink);
    background-color: var(--login-ink);
}

.login-remember-copy {
    display: grid;
    gap: 3px;
}

.login-remember-copy strong {
    color: var(--login-ink-soft);
    font-size: .84rem;
    font-weight: 760;
}

.login-remember-copy small {
    max-width: 36ch;
    color: var(--login-muted);
    font-size: .74rem;
    font-weight: 520;
    line-height: 1.45;
}

.login-submit.kt-btn {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--login-ink);
    border-radius: 10px;
    background: var(--login-ink);
    color: #fff;
    font-size: .94rem;
    font-weight: 790;
    letter-spacing: .005em;
    box-shadow: 0 16px 30px rgba(7, 17, 31, .18);
    transition: transform .18s var(--login-ease), background-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.login-submit.kt-btn:hover:not(:disabled) {
    background: #000;
    color: var(--login-accent);
    box-shadow: 0 18px 38px rgba(7, 17, 31, .24);
    transform: translateY(-1px);
}

.login-submit.kt-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-submit.kt-btn:disabled {
    cursor: wait;
    opacity: .9;
}

.login-submit-progress {
    display: none;
    align-items: center;
    gap: 9px;
}

.login-form.is-submitting .login-submit-label {
    display: none;
}

.login-form.is-submitting .login-submit-progress {
    display: inline-flex;
}

.login-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .34);
    border-top-color: var(--login-accent);
    border-radius: 50%;
    animation: login-spin .72s linear infinite;
}

.login-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    color: #747b84;
    font-size: .72rem;
    font-weight: 560;
    text-align: center;
}

.login-security-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: #8a7600;
}

.login-hero {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    background: #07111f;
}

.login-hero-media,
.login-hero-shade,
.login-light-sweep {
    position: absolute;
    inset: 0;
}

.login-hero-media {
    z-index: -3;
    background-image: url("/images/auth/neskar-brand-showroom.jpg");
    background-position: center;
    background-size: cover;
    transform: scale(1.015);
}

.login-hero-shade {
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(7, 17, 31, .26) 0%, rgba(7, 17, 31, .1) 38%, rgba(7, 17, 31, .48) 100%),
        linear-gradient(180deg, rgba(7, 17, 31, .12) 16%, rgba(7, 17, 31, .88) 100%),
        radial-gradient(circle at 70% 25%, rgba(255, 218, 0, .13), transparent 32%);
}

.login-light-sweep {
    z-index: -1;
    width: 34%;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 245, 182, .14) 49%, transparent 78%);
    filter: blur(12px);
    opacity: 0;
    transform: translateX(-140%) skewX(-12deg);
    animation: login-light-pass 9s ease-in-out infinite;
}

.login-hero-content {
    position: absolute;
    right: clamp(34px, 5.5vw, 92px);
    bottom: clamp(42px, 8vh, 96px);
    left: clamp(34px, 5.5vw, 92px);
    max-width: 720px;
    color: #fff;
}

.login-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
    color: var(--login-accent);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.login-hero-kicker::before {
    width: 38px;
    height: 3px;
    border-radius: 99px;
    background: currentColor;
    content: "";
}

.login-hero h2 {
    max-width: 13ch;
    margin: 0;
    color: #fff;
    font-size: clamp(2.5rem, 4.7vw, 5.4rem);
    font-weight: 760;
    letter-spacing: -.055em;
    line-height: .98;
    text-wrap: balance;
}

.login-hero-content > p {
    max-width: 56ch;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(.94rem, 1.2vw, 1.08rem);
    font-weight: 480;
    line-height: 1.7;
}

.login-hero-trust {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(7, 17, 31, .4);
    color: rgba(255, 255, 255, .88);
    font-size: .74rem;
    font-weight: 650;
    backdrop-filter: blur(9px);
}

.login-hero-trust svg {
    width: 18px;
    height: 18px;
    color: var(--login-accent);
}

@keyframes login-light-pass {
    0%, 20% {
        opacity: 0;
        transform: translateX(-140%) skewX(-12deg);
    }
    36% {
        opacity: 1;
    }
    62%, 100% {
        opacity: 0;
        transform: translateX(440%) skewX(-12deg);
    }
}

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

@media (max-width: 1100px) {
    .login-shell {
        grid-template-columns: minmax(410px, 46%) minmax(0, 54%);
    }

    .login-form-panel {
        padding: 36px;
    }

    .login-hero h2 {
        font-size: clamp(2.35rem, 5vw, 4rem);
    }
}

@media (max-width: 899.98px) {
    body.login-page {
        display: block;
        background: var(--login-ink);
    }

    .login-shell {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "form";
        min-height: 100vh;
        min-height: 100dvh;
        background: var(--login-ink);
    }

    .login-form-panel {
        grid-area: form;
        align-items: flex-start;
        min-height: calc(100dvh - 178px);
        margin-top: -28px;
        padding: 38px 24px 34px;
        border-radius: 28px 28px 0 0;
        background:
            radial-gradient(circle at 0 0, rgba(255, 218, 0, .13), transparent 24rem),
            linear-gradient(160deg, #fff 0%, var(--login-paper) 100%);
        box-shadow: 0 -18px 48px rgba(7, 17, 31, .24);
    }

    .login-form-panel::after {
        display: none;
    }

    .login-form-wrap {
        width: min(100%, 520px);
        margin: 0 auto;
    }

    .login-brand {
        margin-bottom: 34px;
    }

    .login-hero {
        grid-area: hero;
        min-height: 210px;
    }

    .login-hero-media {
        background-position: center 40%;
    }

    .login-hero-shade {
        background: linear-gradient(180deg, rgba(7, 17, 31, .3), rgba(7, 17, 31, .82));
    }

    .login-hero-content {
        right: 24px;
        bottom: 48px;
        left: 24px;
    }

    .login-hero h2 {
        max-width: 20ch;
        font-size: clamp(1.75rem, 6vw, 2.4rem);
        line-height: 1.04;
    }

    .login-hero-kicker,
    .login-hero-content > p,
    .login-hero-trust {
        display: none;
    }
}

@media (max-width: 479.98px) {
    .login-form-panel {
        padding: 34px 20px 30px;
    }

    .login-brand {
        gap: 11px;
        margin-bottom: 30px;
    }

    .login-logo-box {
        width: 154px;
        min-height: 52px;
        padding: 10px 13px;
    }

    .login-logo-box img {
        width: 130px;
    }

    .login-brand-copy strong {
        font-size: .9rem;
    }

    .login-brand-copy small {
        font-size: .7rem;
    }

    .login-heading h1 {
        font-size: 2rem;
    }

    .login-heading p {
        font-size: .9rem;
    }

    .login-form {
        gap: 18px;
    }

    .login-security-note {
        align-items: flex-start;
    }
}

@media (max-height: 760px) and (min-width: 900px) {
    .login-form-panel {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .login-brand {
        margin-bottom: 28px;
    }

    .login-form {
        gap: 15px;
    }

    .login-heading p {
        margin-top: 9px;
    }
}

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

    .login-light-sweep {
        display: none;
    }
}

@media (forced-colors: active) {
    .login-light-sweep,
    .login-hero-shade {
        display: none;
    }

    .login-logo-box,
    .login-submit.kt-btn {
        border: 1px solid ButtonText;
    }
}
