:root {
    --ink: #1b1425;
    --muted: #726982;
    --line: #e8dfef;
    --purple: #220033;
    --purple-2: #3f0f5f;
    --gold: #d8a71f;
    --gold-2: #f1cf5a;
    --red: #bd3341;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background:
        linear-gradient(120deg, rgba(34, 0, 51, 0.94), rgba(64, 15, 95, 0.88)),
        #220033;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.site-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 24px;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(241, 207, 90, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(34, 0, 51, 0.98), rgba(63, 15, 95, 0.96));
}

.preloader-enabled .site-preloader {
    display: grid;
}

.preloader-done .site-preloader {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.015);
    transition: opacity 420ms ease, visibility 420ms ease, transform 420ms ease;
}

.site-preloader-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 124px;
    height: 124px;
}

.site-preloader-mark img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    border-radius: 999px;
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.32));
    animation: preloaderLogoPulse 1400ms ease-in-out infinite;
}

.site-preloader-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-top-color: var(--gold-2);
    border-right-color: rgba(241, 207, 90, 0.78);
    border-radius: 999px;
    animation: preloaderRingSpin 1100ms linear infinite;
}

.site-preloader strong {
    font-size: 18px;
    line-height: 1.25;
}

.site-preloader > span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.site-preloader > span::after {
    content: "";
    display: inline-block;
    width: 1.6em;
    text-align: left;
    animation: preloaderDots 1200ms steps(4, end) infinite;
}

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

@keyframes preloaderLogoPulse {
    0%,
    100% {
        transform: scale(0.95);
    }

    50% {
        transform: scale(1.04);
    }
}

@keyframes preloaderDots {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75%,
    100% {
        content: "...";
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-preloader-ring,
    .site-preloader-mark img,
    .site-preloader > span::after {
        animation: none;
    }
}

img {
    max-width: 100%;
}

.icon {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
    min-height: 100vh;
}

.login-hero {
    position: relative;
    display: grid;
    align-content: center;
    padding: clamp(32px, 7vw, 90px);
    color: #fff;
    overflow: hidden;
}

.login-hero img {
    width: min(260px, 52vw);
    margin-bottom: 28px;
    filter: drop-shadow(0 22px 38px rgba(0, 0, 0, 0.28));
}

.login-hero h1 {
    max-width: 660px;
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.login-hero p {
    max-width: 560px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 18px;
    line-height: 1.6;
    text-align: justify;
    text-justify: inter-word;
}

.login-card-wrap {
    display: grid;
    align-items: center;
    padding: 28px;
    background: #fbf9fd;
}

.login-container {
    width: 100%;
    padding: clamp(28px, 5vw, 44px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(34, 0, 51, 0.16);
}

.login-container .mini-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.mini-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.mini-brand strong {
    display: block;
    line-height: 1.08;
}

.mini-brand span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.login-container h2 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: 0;
}

.login-container .lead {
    margin: 0 0 26px;
    color: var(--muted);
    line-height: 1.5;
}

.login-container .lead + .login-register-promise {
    margin-top: -12px;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

label {
    font-size: 13px;
    font-weight: 900;
}

.required-mark {
    color: #b42318;
    margin-left: 2px;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    outline: none;
    font: inherit;
    max-width: 100%;
}

select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    outline: none;
    font: inherit;
    max-width: 100%;
}

input:focus,
select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(216, 167, 31, 0.16);
}

button,
.login-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--purple-2), var(--purple));
    box-shadow: 0 16px 28px rgba(34, 0, 51, 0.22);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.login-actions {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.login-actions button {
    margin-top: 0;
}

.login-actions .login-secondary-link {
    margin-top: 0;
}

.login-secondary-link {
    border: 1px solid var(--line);
    color: var(--purple);
    background: #fff;
    box-shadow: none;
    text-decoration: none;
}

.login-secondary-link:hover,
.login-secondary-link:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(216, 167, 31, 0.12);
}

.alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 8px;
    color: var(--red);
    background: #fce8eb;
    font-weight: 800;
}

.alert.success {
    color: #087044;
    background: #e7f7ef;
}

.field-error {
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
}

.register-page .login-container {
    max-height: calc(100vh - 56px);
    overflow-y: auto;
}

.login-footnote {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.registration-location-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(20, 8, 29, 0.68);
}

.registration-location-modal[hidden] {
    display: none;
}

.registration-location-dialog {
    width: min(100%, 420px);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.registration-location-dialog h3 {
    margin: 0 0 8px;
    font-size: 24px;
    letter-spacing: 0;
}

.registration-location-dialog p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-word;
}

.registration-location-actions {
    display: grid;
    gap: 10px;
}

.registration-location-cancel {
    color: var(--purple);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: none;
}

@media (max-width: 860px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-hero {
        min-height: 42vh;
        padding: 34px 24px;
    }

    .login-card-wrap {
        padding: 18px;
    }
}

@media (max-width: 520px) {
    .login-page {
        min-height: auto;
    }

    .login-hero {
        min-height: auto;
        padding: 28px 18px 22px;
    }

    .login-hero img {
        width: 128px;
        margin-bottom: 18px;
    }

    .login-hero h1 {
        font-size: 34px;
        line-height: 1.05;
    }

    .login-hero p {
        font-size: 15px;
        line-height: 1.5;
        margin-top: 12px;
    }

    .login-card-wrap {
        padding: 12px;
    }

    .login-container {
        padding: 22px 16px;
    }

    .login-container h2 {
        font-size: 24px;
    }

    .mini-brand img {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 360px) {
    .login-hero {
        padding: 22px 12px 18px;
    }

    .login-hero h1 {
        font-size: 29px;
    }

    .login-hero p,
    .login-container .lead {
        font-size: 14px;
    }

    .login-card-wrap {
        padding: 8px;
    }

    .login-container {
        padding: 18px 12px;
    }

    input,
    select,
    button {
        min-height: 44px;
    }
}
