.auth-page {
    --auth-background: #faf8f6;
    --auth-surface: #fff;
    --auth-ink: #251b1e;
    --auth-muted: #64595d;
    --auth-input-hint: #766b6f;
    --auth-border: #ded8d5;
    --auth-border-hover: #b7aaa8;
    --auth-red: #be222b;
    --auth-red-dark: #9e1620;
    --auth-red-soft: #fbebeb;
    --auth-accent: var(--auth-red-dark);
    --auth-control-highlight: var(--auth-red-soft);
    --auth-control-highlight-ink: var(--auth-accent);
    --auth-focus: var(--auth-accent);
    --auth-focus-shadow: rgb(190 34 43 / 14%);
    --auth-notification-border: #ead3d1;
    --auth-shadow: rgb(46 22 26 / 12%);
    --auth-gutter: clamp(24px, 3.5vw, 64px);
    --auth-top-gutter: clamp(24px, 4vh, 44px);
    margin: 0;
    background: var(--auth-background);
    color: var(--auth-ink);
    font: 400 1rem/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page :where(:not(.fas)) {
    font-family: inherit;
}

.auth-page :focus-visible {
    outline: 2px solid var(--auth-focus) !important;
    outline-offset: 3px;
}

.auth-shell {
    display: grid;
    grid-template-areas: "visual workspace";
    grid-template-columns: minmax(0, 0.88fr) minmax(0, .92fr);
    min-height: 100vh;
    min-height: 100svh;
}

.auth-workspace {
    grid-area: workspace;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-width: 0;
    padding: var(--auth-top-gutter) var(--auth-gutter) 26px;
    background: var(--auth-background);
    color: var(--auth-ink);
}

[data-auth-theme="dark"] .auth-page {
    --auth-background: #151e28;
    --auth-surface: #192430;
    --auth-ink: #e3ebf5;
    --auth-muted: #b7c3d1;
    --auth-input-hint: #919fae;
    --auth-border: #3a4d5e;
    --auth-border-hover: #5d758a;
    --auth-red: #c33141;
    --auth-red-dark: #a92836;
    --auth-red-soft: #38262e;
    --auth-accent: #ff9ea5;
    --auth-control-highlight: #283949;
    --auth-control-highlight-ink: var(--auth-ink);
    --auth-focus: #91aec6;
    --auth-focus-shadow: rgb(145 174 198 / 18%);
    --auth-notification-border: #6e3c45;
    --auth-shadow: rgb(6 13 22 / 35%);
}

[data-auth-theme="dark"] .auth-workspace {
    color-scheme: dark;
}

.auth-header,
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-brand {
    display: grid;
    align-items: center;
    width: clamp(164px, 15.2vw, 224px);
    min-width: 0;
    aspect-ratio: 1755 / 394;
}

.auth-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.auth-brand .auth-brand-dark,
[data-auth-theme="dark"] .auth-brand .auth-brand-light {
    display: none;
}

[data-auth-theme="dark"] .auth-brand .auth-brand-dark {
    display: block;
}

.auth-header-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
}

.auth-languages {
    position: relative;
    z-index: 1;
    flex: none;
    color: var(--auth-ink);
    font-size: .875rem;
}

.auth-languages summary,
.auth-theme-toggle:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--auth-border);
    border-radius: 9px;
    background: var(--auth-surface);
    cursor: pointer;
}

.auth-languages summary {
    gap: 9px;
    padding: 0 12px;
    list-style: none;
}

.auth-theme-toggle {
    width: 44px;
    padding: 0;
    color: var(--auth-muted);
    font-size: .875rem;
}

.auth-theme-toggle[aria-pressed="true"] {
    color: var(--auth-control-highlight-ink);
}

.auth-languages summary::-webkit-details-marker {
    display: none;
}

.auth-languages summary:hover,
.auth-languages[open] summary,
.auth-theme-toggle:hover {
    border-color: var(--auth-border-hover);
}

.auth-languages summary span {
    font-weight: 650;
}

.auth-languages summary .fas {
    color: var(--auth-muted);
    font-size: .75rem;
}

.auth-languages summary .fa-chevron-down {
    font-size: .625rem;
}

.auth-languages[open] .fa-chevron-down {
    transform: rotate(180deg);
}

.auth-languages ul {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 9.5rem;
    margin: 0;
    padding: 5px;
    list-style: none;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px var(--auth-shadow);
}

.auth-languages a {
    display: block;
    padding: 9px 11px;
    border-radius: 5px;
    color: var(--auth-ink);
}

.auth-languages a:hover,
.auth-languages a[aria-current] {
    background: var(--auth-control-highlight);
    color: var(--auth-control-highlight-ink);
    text-decoration: none;
}

.auth-main {
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: 26rem;
    padding: 46px 0;
}

.auth-intro {
    margin-bottom: 30px;
}

.auth-intro h1 {
    margin: 0;
    color: var(--auth-ink);
    font-size: clamp(2.1rem, 3.15vw, 3rem);
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: -.045em;
}

.auth-intro p {
    margin: 11px 0 0;
    color: var(--auth-muted);
    font-size: .975rem;
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-form label {
    position: static;
    display: block;
    color: var(--auth-ink);
    opacity: 1;
    font-size: .875rem !important;
    font-weight: 650;
    line-height: 1.4;
    text-transform: none;
    transition: none;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-password-field {
    grid-template-columns: auto minmax(0, 1fr);
}

.auth-password-field .auth-input {
    grid-column: 1 / -1;
}

.auth-password-field .auth-link {
    grid-area: 1 / 2;
    justify-self: end;
    text-align: right;
}

.auth-input {
    display: flex;
    align-items: center;
    min-height: 54px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: var(--auth-surface);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.auth-input:hover {
    border-color: var(--auth-border-hover);
}

.auth-input:focus-within {
    border-color: var(--auth-focus);
    box-shadow: 0 0 0 3px var(--auth-focus-shadow);
}

.auth-field-icon {
    flex: 0 0 18px;
    margin-left: 14px;
    color: var(--auth-input-hint);
    text-align: center;
    font-size: .875rem;
}

.auth-input input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 14px 12px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: var(--auth-ink);
    font-size: 1rem;
    line-height: 1.5;
}

.auth-input input:focus-visible {
    outline: 0 !important;
}

.auth-input input[readonly] {
    background: transparent !important;
    color: var(--auth-muted);
}

.auth-input input::placeholder {
    color: var(--auth-input-hint);
    opacity: 1;
}

.auth-password-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    min-height: 44px;
    margin-right: 4px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle[aria-pressed="true"] {
    background: var(--auth-control-highlight);
    color: var(--auth-control-highlight-ink);
}

.auth-form .auth-trust {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 28px;
    font-weight: 500;
    cursor: pointer;
}

.auth-trust input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--auth-red);
}

.auth-submit.ladda-button {
    position: relative;
    width: 100%;
    min-height: 52px;
    margin-top: 6px;
    padding: 12px 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--auth-red);
    box-shadow: 0 6px 15px rgb(158 22 32 / 16%);
    color: #fff;
    font-size: .975rem;
    font-weight: 700;
    line-height: 1.4;
    transition: background-color .16s ease;
}

.auth-submit.ladda-button:hover,
.auth-submit.ladda-button[data-loading],
.auth-submit.ladda-button:disabled {
    background: var(--auth-red-dark);
}

.auth-submit .ladda-label {
    font-weight: inherit;
}

.auth-submit > .fas {
    position: absolute;
    top: 50%;
    right: 17px;
    transform: translateY(-50%);
    font-size: .875rem;
}

.auth-submit[data-loading] > .fas {
    visibility: hidden;
}

.auth-link,
.auth-switch {
    color: var(--auth-accent);
    font-size: .85rem;
    font-weight: 650;
    text-underline-offset: 3px;
}

.auth-link:hover,
.auth-switch:hover {
    color: var(--auth-accent);
    text-decoration: underline;
}

.auth-cancel {
    justify-self: center;
}

.auth-switch {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

a.auth-switch {
    display: inline-flex;
    align-items: center;
}

.form-pane .auth-switch {
    margin-top: 12px;
}

.auth-accounts {
    display: none;
}

.auth-page .main-pane.has-accounts:not(.progress-active) .auth-accounts {
    display: block;
}

.auth-page .account-block {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 60px;
    margin: 0 0 10px;
    padding: 11px 14px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: var(--auth-surface);
    color: var(--auth-ink);
    line-height: 1.4;
}

.auth-page a.account-block {
    cursor: pointer;
}

.auth-page .account-block:hover {
    border-color: var(--auth-focus);
    color: var(--auth-control-highlight-ink);
}

.auth-page .account-block-icon {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    height: 34px;
    margin: 0;
    border-radius: 7px;
    background: var(--auth-control-highlight);
    color: var(--auth-control-highlight-ink);
    font-size: 1rem;
}

.auth-page .account-block-container {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.auth-page .account-block-name {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
}

.auth-page .account-block-desc {
    color: var(--auth-muted);
    font-size: .83rem;
}

.auth-status,
.auth-page .progress-active .auth-status {
    display: grid;
    justify-items: center;
    gap: 16px;
    color: var(--auth-muted);
    text-align: center;
}

.auth-page .main-pane:not(.progress-active) .auth-status {
    display: none;
}

.auth-status p {
    margin: 0;
}

.auth-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid var(--auth-red-soft);
    border-top-color: var(--auth-accent);
    border-radius: 50%;
    animation: auth-spin .8s linear infinite;
}

.auth-status.is-error {
    color: var(--auth-accent);
}

.auth-status.is-error .auth-spinner {
    display: none;
}

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

#auth-notifications {
    position: fixed;
    top: calc(var(--auth-top-gutter) + 60px);
    right: var(--auth-gutter);
    z-index: 2;
    width: min(24rem, calc(100% - 2 * var(--auth-gutter)));
}

.auth-page .noty_theme__metroui.noty_type__error {
    margin: 0 0 10px;
    border: 1px solid var(--auth-notification-border);
    border-radius: 12px;
    background: var(--auth-surface);
    box-shadow: 0 12px 30px var(--auth-shadow), 0 2px 6px rgb(46 22 26 / 6%);
    color: var(--auth-ink);
}

.auth-page .noty_theme__metroui.noty_type__error .noty_body {
    min-height: 60px;
    padding: 14px 16px 14px 56px;
    font-size: .9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.auth-page .noty_theme__metroui.noty_type__error .noty_body::before {
    position: absolute;
    top: 14px;
    left: 14px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--auth-red-soft);
    color: var(--auth-accent);
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f06a";
    content: "\f06a" / "";
}

.auth-page .noty_theme__metroui.noty_type__error .noty_body a {
    color: var(--auth-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-page .noty_theme__metroui.noty_type__error .noty_progressbar {
    height: 2px;
    background: var(--auth-red);
    opacity: .35;
    filter: none;
}

.auth-page .noty_theme__metroui.noty_type__error.noty_effects_open {
    animation: auth-notification-in .22s ease-out both;
}

.auth-page .noty_theme__metroui.noty_type__error.noty_effects_close {
    animation: auth-notification-out .18s ease-in both;
}

@keyframes auth-notification-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

@keyframes auth-notification-out {
    from {
        opacity: 1;
        transform: none;
    }

    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

.auth-footer {
    min-height: 36px;
    padding-top: 12px;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted);
    font-size: .8125rem;
}

.auth-footer a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    color: var(--auth-muted);
    font-weight: 650;
    text-underline-offset: 3px;
}

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

.auth-footer .fas {
    font-size: .66rem;
}

.auth-visual {
    grid-area: visual;
    display: flex;
    align-items: flex-end;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-width: 0;
    padding: clamp(32px, 4vw, 74px);
    background-color: #41191b;
    color: #fff;
}

.auth-visual-media,
.auth-visual::after {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.auth-visual-photo,
.auth-visual-fallback,
.auth-vehicle-preview,
.auth-vehicle-shot,
.auth-vehicle-photo {
    position: absolute;
    inset: 0;
}

.auth-visual-fallback {
    background: url("img/login-road.webp") center / cover no-repeat;
}

.auth-visual-photo,
.auth-vehicle-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-vehicle-shot {
    opacity: 0;
}

.auth-vehicle-shot:is(.is-current, .is-leaving) {
    opacity: 1;
}

.auth-vehicle-progress-slot {
    min-height: 36px;
    margin-top: 20px;
}

.auth-vehicle-progress:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-vehicle-progress-track {
    display: flex;
    gap: 5px;
    width: 112px;
}

.auth-vehicle-progress-segment {
    display: grid;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.auth-vehicle-progress-line {
    position: relative;
    overflow: hidden;
    height: 3px;
    border-radius: 999px;
    background: rgb(255 255 255 / 34%);
}

.auth-vehicle-progress-segment.is-complete .auth-vehicle-progress-line {
    background: rgb(255 255 255 / 66%);
}

.auth-vehicle-progress-segment:hover .auth-vehicle-progress-line,
:where(.auth-vehicle-progress.is-paused) .auth-vehicle-progress-segment.is-current .auth-vehicle-progress-line {
    background: rgb(255 255 255 / 86%);
}

.auth-vehicle-progress-fill {
    position: absolute;
    inset: 0;
    transform: scaleX(0);
    transform-origin: left center;
    background: #fff;
}

.auth-vehicle-progress-segment.is-current .auth-vehicle-progress-fill {
    animation: auth-vehicle-progress 6s linear both;
}

.auth-vehicle-progress:not(.is-playing) .auth-vehicle-progress-fill {
    animation-play-state: paused;
}

.auth-vehicle-playback {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 40%);
    border-radius: 50%;
    background: rgb(255 255 255 / 9%);
    color: #fff;
    cursor: pointer;
}

.auth-vehicle-playback:hover {
    background: rgb(255 255 255 / 20%);
}

.auth-vehicle-progress-segment:focus-visible,
.auth-vehicle-playback:focus-visible {
    outline-color: #fff !important;
    outline-offset: 1px;
}

.auth-vehicle-playback .fas {
    font-size: .75rem;
}

@media (hover: hover) {
    .auth-vehicle-playback {
        opacity: 0;
        pointer-events: none;
    }

    .auth-vehicle-progress.is-paused .auth-vehicle-playback,
    .auth-visual:hover .auth-vehicle-playback,
    .auth-vehicle-playback:focus-visible {
        opacity: 1;
        pointer-events: auto;
    }
}

.auth-visual::after {
    background: linear-gradient(0deg, rgb(29 11 15 / 90%), rgb(56 19 24 / 16%) 56%, rgb(56 19 24 / 5%));
    content: "";
}

.auth-visual-copy {
    max-width: 34rem;
}

.auth-visual-welcome {
    display: block;
    margin-bottom: 14px;
    color: #f4e3df;
    font-size: .875rem;
    font-weight: 600;
}

.auth-visual-date {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 1.4em;
    margin-top: 14px;
    color: rgb(255 255 255 / 80%);
    font-size: .8125rem;
    font-weight: 550;
    line-height: 1.4;
}

.auth-visual-date-icon {
    flex: none;
    width: 1rem;
    height: 1rem;
}

.auth-visual-date-icon > [data-period] {
    display: none;
}

.auth-visual-date[data-period="morning"] [data-period="morning"],
.auth-visual-date[data-period="afternoon"] [data-period="afternoon"],
.auth-visual-date[data-period="night"] [data-period="night"] {
    display: inline;
}

.auth-visual h2::before {
    display: block;
    width: 44px;
    height: 3px;
    margin-bottom: 22px;
    border-radius: 2px;
    background: #f45a5e;
    content: "";
}

.auth-visual h2 {
    max-width: 17ch;
    margin: 0;
    font-size: clamp(2.3rem, 3.35vw, 4rem);
    font-weight: 730;
    line-height: 1.04;
    letter-spacing: -.044em;
    text-wrap: balance;
}

.auth-visual p {
    max-width: 34ch;
    margin: 15px 0 0;
    color: #f4e3df;
    font-size: clamp(.95rem, 1.15vw, 1.125rem);
}

.auth-visual .auth-visual-seasonal {
    margin-top: 12px;
    color: #ffe1d2;
    font-weight: 600;
}

.auth-visual-countdown:not([hidden]) {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 8px;
    padding: 5px 12px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 999px;
    background: rgb(0 0 0 / 22%);
    color: #f4e3df;
    font-size: .8125rem;
}

.auth-visual-countdown [role="timer"] {
    color: #fff;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

[data-auth-theme="dark"] .auth-visual {
    background-color: var(--auth-background);
    color: var(--auth-ink);
}

[data-auth-theme="dark"] .auth-visual::after {
    background: linear-gradient(0deg, var(--auth-background), rgb(21 30 40 / 85%) 18%, rgb(25 36 48 / 22%) 58%, rgb(25 36 48 / 7%));
}

[data-auth-theme="dark"] .auth-visual :is(.auth-visual-welcome, .auth-visual-date, .auth-visual-countdown, p) {
    color: var(--auth-muted);
}

[data-auth-theme="dark"] .auth-visual h2::before {
    background: #ff4d59;
}

[data-auth-theme="dark"] .auth-visual .auth-visual-seasonal {
    color: #f3cc84;
}

@media (prefers-reduced-motion: no-preference) {
    .auth-visual-photo + .auth-visual-photo {
        animation: auth-visual-fade .65s ease-out;
    }

    .auth-vehicle-shot {
        transition: opacity .35s ease-out;
    }

    .auth-vehicle-playback {
        transition: opacity .18s ease-out;
    }
}

@keyframes auth-visual-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes auth-vehicle-progress {
    to {
        transform: scaleX(1);
    }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-areas: "workspace";
        grid-template-columns: minmax(0, 1fr);
        overflow-anchor: none;
    }

    .auth-visual {
        display: none;
    }

    .auth-workspace {
        padding-bottom: 18px;
    }

    #auth-notifications {
        position: static;
        width: auto;
    }

    #auth-notifications:not(:empty) {
        padding-bottom: 6px;
    }
}

@media (max-width: 360px) {
    .auth-header {
        gap: 10px;
    }

    .auth-header-actions {
        gap: 6px;
    }

    .auth-languages summary {
        gap: 6px;
        padding: 0 9px;
    }

    .auth-languages summary .fa-globe {
        display: none;
    }
}

@media (max-width: 480px) and (max-height: 680px) {
    .auth-page {
        --auth-top-gutter: 16px;
    }

    .auth-main {
        padding: 28px 0;
    }

    .auth-intro {
        margin-bottom: 20px;
    }

    .auth-form {
        gap: 14px;
    }

    .auth-input {
        min-height: 48px;
    }

    .auth-input input {
        padding-block: 11px;
    }

    .auth-submit.ladda-button {
        margin-top: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-vehicle-progress-segment.is-current .auth-vehicle-progress-line {
        background: #fff;
    }

    .auth-vehicle-progress-fill {
        opacity: 0;
    }

    .auth-page .auth-spinner,
    .auth-page .account-block.loading::before {
        animation: none;
    }

    .auth-page .account-block.loading::before {
        width: 100%;
    }

    /* Noty uses animationend to start the timer and remove the notification. */
    .auth-page .noty_theme__metroui.noty_type__error:is(.noty_effects_open, .noty_effects_close),
    #auth-notifications .noty_fix_effects_height {
        animation-duration: 1ms;
    }

    .auth-page .noty_theme__metroui.noty_type__error .noty_progressbar {
        display: none;
    }
}
