:root {
    --bg: #0b0d14;
    --surface: rgba(20, 23, 34, 0.84);
    --surface-strong: #171a25;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.15);
    --text: #f6f7fb;
    --muted: #969cac;
    --accent: #8b7cff;
    --accent-bright: #a99fff;
    --cyan: #66dfd1;
    --danger: #ff6f86;
    --radius: 22px;
    --radius-sm: 13px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

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

body {
    background: var(--bg);
    color: var(--text);
}

button,
input {
    font: inherit;
}

.auth-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    overflow: hidden;
    padding: 28px 18px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--bg);
    background-size: 42px 42px;
}

.ambient {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(100px);
    opacity: 0.16;
}

.ambient-one {
    top: -180px;
    left: -120px;
    background: var(--accent);
}

.ambient-two {
    right: -160px;
    bottom: -210px;
    background: var(--cyan);
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 5px 18px;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    color: var(--text);
    place-items: center;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

.brand-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.brand-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.brand-status i,
.pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 14px rgba(102, 223, 209, 0.78);
}

.auth-card {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.card-heading {
    margin-bottom: 27px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--accent-bright);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 7vw, 35px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.card-heading p {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.message,
.current-session,
.launcher-note {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.message {
    gap: 10px;
    margin: -8px 0 20px;
    padding: 12px 13px;
    color: #ffdce2;
    background: rgba(255, 111, 134, 0.09);
    border-color: rgba(255, 111, 134, 0.24);
    font-size: 13px;
    line-height: 1.45;
}

.message-icon {
    display: grid;
    flex: 0 0 23px;
    height: 23px;
    border-radius: 50%;
    color: #151620;
    background: var(--danger);
    font-weight: 900;
    place-items: center;
}

.current-session {
    justify-content: space-between;
    gap: 16px;
    margin: -7px 0 21px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.025);
}

.current-session span {
    display: grid;
    gap: 2px;
}

.current-session small {
    color: var(--muted);
    font-size: 11px;
}

.current-session strong {
    font-size: 13px;
}

.current-session a {
    color: var(--accent-bright);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

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

.field {
    display: grid;
    gap: 9px;
}

.field > span:first-child {
    color: #d9dce5;
    font-size: 12px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    z-index: 1;
    color: #6e7485;
    font-size: 18px;
    font-weight: 700;
    pointer-events: none;
}

.field input {
    width: 100%;
    height: 54px;
    padding: 0 16px 0 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text);
    background: rgba(7, 9, 14, 0.55);
    font-size: 16px;
    letter-spacing: 0.02em;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input::placeholder {
    color: #606675;
}

.field input:hover {
    border-color: var(--line-strong);
}

.field input:focus {
    border-color: rgba(139, 124, 255, 0.78);
    background: rgba(10, 12, 19, 0.82);
    box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.11);
}

.primary-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 54px;
    padding: 0 17px 0 19px;
    border: 0;
    border-radius: var(--radius-sm);
    color: #fff;
    background: linear-gradient(115deg, #7667ee, #9587ff);
    box-shadow: 0 13px 28px rgba(118, 103, 238, 0.22);
    font-weight: 750;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.primary-button svg {
    width: 20px;
    height: 20px;
}

.primary-button:hover {
    filter: brightness(1.08);
    box-shadow: 0 16px 34px rgba(118, 103, 238, 0.3);
    transform: translateY(-1px);
}

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

.primary-button:focus-visible,
.current-session a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

.privacy-note,
.launcher-note {
    color: var(--muted);
    font-size: 12px;
}

.privacy-note {
    margin: 19px 0 0;
    text-align: center;
    line-height: 1.5;
}

.launcher-note {
    justify-content: center;
    gap: 9px;
    margin-top: 19px;
    padding: 11px;
    background: rgba(102, 223, 209, 0.035);
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 17px;
    color: #656b79;
    font-size: 11px;
}

.footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #555b68;
}

@media (max-width: 520px) {
    .auth-page {
        align-items: start;
        padding-top: max(22px, env(safe-area-inset-top));
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 19px;
    }

    .brand {
        margin-bottom: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
