:root {
    --bg-0: #0b0f1a;
    --bg-1: #0f1524;
    --bg-2: #111a2e;
    --bg-3: #151f36;
    --line: #1f2b49;
    --txt: #e6eefb;
    --muted: #9aa7bd;
    --accent: #2f88ff;
    --accent-2: #8bb1ff;
    --good: #2dd4bf;
    --bad: #ff6b6b;
    --shadow: 0 18px 40px rgba(6, 12, 30, .45), 0 2px 0 rgba(255, 255, 255, .04) inset;
    --ring: 0 0 0 3px rgba(47, 136, 255, .25);
    --radius: 18px;
    --radius-sm: 12px;
    --pad: 16px;
}


html,
body {
    height: 100%
}

body {
    margin: 0;
    color: var(--txt);
    background: radial-gradient(1100px 700px at -10% -10%, #111a2e 0%, #0b0f1a 40%) no-repeat, var(--bg-0);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding-bottom: env(safe-area-inset-bottom);
}


.auth-page {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(16px, 4vw, 36px);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}


.auth-card__head {
    padding: 18px var(--pad);
    background: linear-gradient(180deg, var(--bg-3), var(--bg-1));
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-card__logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    color: #cfe0ff;
    font-weight: 800;
}

.auth-card__title {
    margin: 0;
    font-size: 16px;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--accent-2);
}


.auth-card__body {
    padding: 20px var(--pad) 18px
}


h1,
h2,
h3 {
    margin: 0 0 10px;
}

.muted {
    color: var(--muted)
}

.caption {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px
}


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

.auth-group {
    display: grid;
    gap: 8px;
}

.auth-label {
    font-size: 13px;
    color: #cfe0ff;
}

.auth-input {
    appearance: none;
    width: 100%;
    background: #0c1222;
    color: var(--txt);
    border: 1px solid #1a2542;
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
    font-size: 14px;
}

.auth-input::placeholder {
    color: #9bb0d5;
    opacity: .85
}

.auth-input:focus {
    box-shadow: var(--ring);
    border-color: #2a5cff;
}

.auth-input[aria-invalid="true"],
.auth-input.is-invalid {
    border-color: #a43a3a;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, .2);
}


.auth-error {
    margin-top: -4px;
    font-size: 12px;
    color: var(--bad);
}


.auth-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    margin-top: 4px;
}


.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dbe8ff;
    font-size: 14px;
}

.auth-check input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #0c1222;
    border: 1px solid #1a2542;
    display: grid;
    place-items: center;
    outline: none;
    cursor: pointer;
    position: relative;
}

.auth-check input[type="checkbox"]:focus-visible {
    box-shadow: var(--ring);
    border-color: #2a5cff;
}

.auth-check input[type="checkbox"]:checked {
    border-color: #2f88ff;
    background: linear-gradient(180deg, #1a2a4d, #12213f);
}

.auth-check input[type="checkbox"]:checked::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: #cfe0ff;
}


.auth-link {
    color: #cfe0ff;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}

.auth-link:hover {
    border-bottom-color: #3b61a8
}


.auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 8px
}

.btn {
    appearance: none;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    color: var(--txt);
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: filter .15s ease, transform .02s ease, box-shadow .15s ease;
}

.btn:hover {
    filter: brightness(1.06)
}

.btn:active {
    transform: translateY(1px) scale(.99)
}

.btn--primary {
    border-color: #2f88ff;
    background: linear-gradient(180deg, #1a2a4d, #12213f);
    box-shadow: 0 0 0 2px rgba(47, 136, 255, .18) inset, var(--shadow);
}

.btn--ghost {
    background: transparent;
}


.auth-sep {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.auth-sep::before,
.auth-sep::after {
    content: "";
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}


.auth-footer {
    padding: 14px var(--pad);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(180deg, var(--bg-1), var(--bg-1));
}


@media (max-width: 380px) {
    .auth-card {
        border-radius: 16px
    }

    .auth-card__head {
        padding: 14px var(--pad)
    }

    .auth-card__title {
        font-size: 15px
    }
}


.text-center {
    text-align: center
}

.mt-1 {
    margin-top: 6px
}

.mt-2 {
    margin-top: 10px
}

.mt-3 {
    margin-top: 14px
}

.mb-0 {
    margin-bottom: 0
}

.mb-1 {
    margin-bottom: 6px
}

.mb-2 {
    margin-bottom: 10px
}




.auth-page {
    min-height: 100svh;

    padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 36px) max(16px, env(safe-area-inset-bottom));
}


.auth-card {
    max-width: min(94vw, 480px);

    border-radius: 20px;
}


.auth-card__title {
    font-size: clamp(16px, 3.8vw, 20px);
}

.auth-form {
    gap: clamp(10px, 2.8vw, 14px);
}

.auth-label {
    font-size: clamp(13px, 3.2vw, 14px);
}


.auth-input {
    font-size: 16px;

    height: 48px;

    padding: 12px 14px;
    border-radius: 14px;
}


.btn {
    height: 48px;
    font-size: 16px;
    border-radius: 14px;
    padding: 0 16px;
}

.btn--primary {
    font-weight: 800;
}


.auth-row {
    gap: 10px;
}

.auth-check {
    font-size: 15px;
}

.auth-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
}


.auth-error {
    font-size: 13px;
}


@media (max-width: 380px) {
    .auth-card {
        max-width: 92vw;
    }

    .auth-input,
    .btn {
        height: 50px;
    }
}


.auth-hero {
    display: grid;
    place-items: center;
    width: 100%;
    margin-bottom: clamp(16px, 4vw, 28px);
    text-decoration: none;
}

.auth-hero__img {
    display: block;
    width: min(320px, 80vw);
    height: auto;
    filter:
        drop-shadow(0 10px 30px rgba(47, 136, 255, .18)) drop-shadow(0 3px 12px rgba(0, 0, 0, .35));

}


@media (max-width: 380px) {
    .auth-hero__img {
        width: min(260px, 86vw);
    }
}


@media (prefers-color-scheme: dark) {
    .auth-hero__img {

        -webkit-mask-image: linear-gradient(#000, #000);
        image-rendering: -webkit-optimize-contrast;
    }
}

.auth-card {
    margin-top: -100px;
}