:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #eef2f8;
    --text: #172033;
    --muted: #6f7b91;
    --line: #e3e8f1;
    --primary: #625df5;
    --primary-dark: #4d48d8;
    --primary-soft: #efeeff;
    --shadow: 0 22px 60px rgba(31, 43, 71, 0.12);
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 10% 5%, rgba(98, 93, 245, 0.12), transparent 24rem),
        radial-gradient(circle at 95% 90%, rgba(114, 191, 255, 0.14), transparent 26rem),
        var(--bg);
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(20px);
    pointer-events: none;
}

body::before {
    top: 8vh;
    right: -8rem;
    width: 22rem;
    height: 22rem;
    background: rgba(98, 93, 245, 0.1);
}

body::after {
    bottom: -7rem;
    left: -4rem;
    width: 18rem;
    height: 18rem;
    background: rgba(31, 169, 113, 0.08);
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: 18px;
}

.auth-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.brand-panel,
.auth-panel {
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.brand-panel {
    position: relative;
    color: #fff;
    padding: 30px;
    background:
        linear-gradient(145deg, rgba(12, 18, 43, 0.98), rgba(31, 24, 88, 0.96)),
        #0d132b;
}

.brand-panel::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    right: -130px;
    top: -110px;
    background: rgba(101, 71, 255, 0.35);
    filter: blur(10px);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    left: -150px;
    bottom: -130px;
    background: rgba(83, 139, 255, 0.18);
    filter: blur(8px);
}

.brand-content {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: start;
    gap: 18px;
    max-width: 640px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #8f7aff);
    box-shadow: 0 12px 30px rgba(101, 71, 255, 0.35);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy small {
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    font-weight: 700;
}

.hero-copy {
    display: grid;
    gap: 18px;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(38px, 10vw, 66px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p {
    margin: 0;
    max-width: 570px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 16px;
    line-height: 1.7;
}

.hero-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hero-chip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.hero-chip-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: var(--primary);
    background: var(--primary-soft);
}

.hero-chip strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.hero-chip span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    line-height: 1.5;
}

.auth-panel {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.auth-card {
    padding: 28px;
}

.auth-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.auth-card-title {
    max-width: 420px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.auth-card h2 {
    margin: 0;
    font-size: 27px;
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.auth-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.mini-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.mini-pill svg {
    color: var(--primary);
}

.auth-slot {
    display: grid;
    gap: 16px;
}

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

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

.auth-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-label {
    color: #243042;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.auth-input {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    outline: none;
    color: var(--text);
    background: #fafbfe;
    transition: 0.18s ease;
    font-size: 14px;
}

.auth-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 15px;
    font-weight: 800;
    transition: 0.18s ease;
}

.auth-button-primary {
    color: white;
    background: linear-gradient(145deg, var(--primary), #7b76ff);
    box-shadow: 0 16px 26px rgba(98, 93, 245, 0.28);
}

.auth-button-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.auth-button-secondary {
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.auth-button-secondary:hover {
    border-color: rgba(98, 93, 245, 0.25);
    background: #f6f7ff;
}

.auth-error-list {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff1f1;
    color: #a31616;
    font-size: 12px;
    line-height: 1.55;
}

.auth-error-list ul {
    margin: 0;
    padding-left: 18px;
}

.auth-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7f8ff;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.auth-actions-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.auth-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-back {
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
}

.public-footer {
    width: min(100%, 1180px);
    margin: 14px auto 0;
    padding: 0 4px 12px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

@media (min-width: 920px) {
    .auth-page {
        padding: 24px;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
        gap: 20px;
    }

    .auth-card {
        padding: 34px;
    }
}

@media (max-width: 919px) {
    .brand-panel {
        padding: 24px;
    }

    .hero-copy {
        margin-top: 56px;
    }

    .auth-card {
        padding: 20px;
    }
}

@media (max-width: 620px) {
    .auth-page {
        padding: 12px;
    }

    .brand-panel,
    .auth-panel {
        border-radius: 28px;
    }

    .auth-card-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-chips {
        grid-template-columns: 1fr;
    }
}
