:root {
    --primary: #5b5ff4;
    --primary-dark: #3730a3;
    --primary-soft: rgba(91, 95, 244, 0.1);

    --success: #14b8a6;
    --success-dark: #0f766e;
    --success-soft: rgba(20, 184, 166, 0.12);

    --danger: #ef4444;
    --danger-dark: #b91c1c;
    --danger-soft: #fff5f5;

    --dark: #111827;
    --text: #374151;
    --muted: #6b7280;
    --soft: #f5f7ff;
    --white: #ffffff;
    --border: #e5e7eb;

    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;

    --shadow-sm: 0 8px 24px rgba(17, 24, 39, 0.06);
    --shadow-md: 0 18px 48px rgba(17, 24, 39, 0.1);
    --shadow-lg: 0 30px 90px rgba(17, 24, 39, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 6% 8%, rgba(91, 95, 244, 0.16), transparent 30%),
        radial-gradient(circle at 92% 18%, rgba(20, 184, 166, 0.16), transparent 28%),
        linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
}

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

button,
input,
select {
    font-family: inherit;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
}

.register-shell {
    grid-template-columns: 0.82fr 1.18fr;
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.24), transparent 30%),
        radial-gradient(circle at 82% 16%, rgba(20, 184, 166, 0.22), transparent 26%),
        linear-gradient(135deg, #5b5ff4, #3730a3);
    color: var(--white);
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -140px;
    bottom: -120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    font-size: 21px;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.auth-logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.16);
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.section-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 12.5px;
    font-weight: 900;
}

.auth-form-panel .section-kicker {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.auth-brand-content h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.auth-brand-content p {
    max-width: 560px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.7;
}

.auth-feature-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.auth-feature-list div {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.auth-feature-list strong {
    display: block;
    margin-bottom: 6px;
    color: var(--white);
    font-size: 25px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.auth-feature-list span {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 750;
}

.auth-note-card {
    position: relative;
    z-index: 1;
    max-width: 560px;
    padding: 18px 20px;
    display: grid;
    gap: 6px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.auth-note-card strong {
    color: var(--white);
    font-size: 15px;
}

.auth-note-card span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.6;
}

.auth-form-panel {
    padding: 42px 28px;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(100%, 520px);
    padding: 34px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(229, 231, 235, 0.88);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.auth-card-wide {
    width: min(100%, 760px);
}

.auth-card-header {
    margin-bottom: 24px;
}

.auth-card-header h2 {
    margin: 0;
    color: var(--dark);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.auth-card-header p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.65;
}

.auth-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 750;
}

.auth-alert-error {
    background: var(--danger-soft);
    color: var(--danger-dark);
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

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

.form-group label {
    color: #374151;
    font-size: 13.5px;
    font-weight: 850;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 50px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--white);
    color: var(--dark);
    font-size: 15px;
    outline: 0;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #8b8ef8;
    box-shadow: 0 0 0 4px rgba(91, 95, 244, 0.1);
}

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

.remember-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.remember-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.auth-small-link {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 850;
}

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

.button {
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 14px 34px rgba(91, 95, 244, 0.28);
}

.button-primary:hover {
    box-shadow: 0 20px 42px rgba(91, 95, 244, 0.36);
}

.auth-footer-text {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 14.5px;
}

.auth-footer-text a {
    color: var(--primary-dark);
    font-weight: 900;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

.auth-consent-list {
    display: grid;
    gap: 10px;
}

.auth-consent-card {
    padding: 14px 15px;
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 11px;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfcff;
    cursor: pointer;
}

.auth-consent-card input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.auth-consent-card span {
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.55;
}

.auth-consent-card a {
    color: var(--primary-dark);
    font-weight: 900;
}

.auth-consent-card a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 3px solid rgba(91, 95, 244, 0.32);
    outline-offset: 3px;
}

@media (max-width: 1080px) {
    .auth-shell,
    .register-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 34px 24px;
        gap: 44px;
    }

    .auth-brand-content h1 {
        font-size: clamp(34px, 8vw, 52px);
    }

    .auth-form-panel {
        padding: 28px 18px 36px;
    }
}

@media (max-width: 720px) {
    .auth-brand-panel {
        padding: 26px 18px;
    }

    .auth-feature-list {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px;
        border-radius: 26px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .auth-form-row {
        align-items: flex-start;
        flex-direction: column;
    }
}