* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --background: #f6f7fb;
    --surface: #ffffff;
    --text-primary: #171923;
    --text-secondary: #697083;
    --border: #e3e6ee;
    --primary: #6c5ce7;
    --primary-dark: #5746d8;
    --primary-light: #eeeaff;
    --danger-background: #fff1f2;
    --danger-border: #fecdd3;
    --danger-text: #be123c;
    --success-background: #ecfdf3;
    --success-border: #bbf7d0;
    --success-text: #15803d;
    --shadow: 0 24px 70px rgba(29, 34, 55, 0.12);
}

body {
    min-height: 100vh;
    background: var(--background);
    color: var(--text-primary);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(420px, 0.9fr) minmax(500px, 1.1fr);
    min-height: 100vh;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 56px;
}

.auth-logo {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 52px;
    text-decoration: none;
}

.auth-logo img {
    display: block;
    width: 165px;
    max-height: 48px;
    object-fit: contain;
    object-position: left center;
}

.auth-heading {
    margin-bottom: 32px;
}

.auth-eyebrow {
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.auth-heading h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.auth-heading > p:last-child {
    max-width: 430px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.65;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group label,
.password-label-row label {
    color: #303445;
    font-size: 14px;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--surface);
    color: var(--text-primary);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.form-group input::placeholder {
    color: #a1a6b4;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.12);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--primary-dark);
}

.auth-submit {
    min-height: 54px;
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(108, 92, 231, 0.24);
    transition:
        transform 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
    box-shadow: 0 16px 34px rgba(108, 92, 231, 0.3);
}

.auth-switch {
    margin-top: 26px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 14px;
}

.auth-switch a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

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

.back-home {
    align-self: center;
    margin-top: 22px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.back-home:hover {
    color: var(--text-primary);
}

.auth-message {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.5;
}

.auth-error {
    border-color: var(--danger-border);
    background: var(--danger-background);
    color: var(--danger-text);
}

.auth-success {
    border-color: var(--success-border);
    background: var(--success-background);
    color: var(--success-text);
}

.auth-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 32px);
    margin: 16px 16px 16px 0;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(
            circle at 25% 20%,
            rgba(255, 255, 255, 0.15),
            transparent 32%
        ),
        linear-gradient(145deg, #201a59, #5a46d6 58%, #8c65f5);
    color: white;
    box-shadow: var(--shadow);
}

.visual-content {
    position: relative;
    z-index: 2;
    width: min(560px, 78%);
}

.visual-badge {
    display: inline-flex;
    margin-bottom: 26px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    backdrop-filter: blur(10px);
}

.visual-content h2 {
    max-width: 530px;
    margin-bottom: 20px;
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.visual-content > p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 17px;
    line-height: 1.7;
}

.feature-list {
    display: grid;
    gap: 14px;
    margin-top: 38px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 650;
}

.feature-item span {
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
}

.visual-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
}

.visual-glow-one {
    top: -150px;
    right: -110px;
    width: 420px;
    height: 420px;
    background: rgba(255, 255, 255, 0.12);
}

.visual-glow-two {
    bottom: -210px;
    left: -100px;
    width: 520px;
    height: 520px;
    background: rgba(121, 96, 255, 0.35);
}

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

    .auth-card {
        max-width: 600px;
        padding: 44px 30px;
    }

    .auth-visual {
        display: none;
    }
}

@media (max-width: 520px) {
    .auth-card {
        justify-content: flex-start;
        padding: 30px 20px 40px;
    }

    .auth-logo {
        margin-bottom: 42px;
    }

    .auth-heading h1 {
        font-size: 34px;
    }
}

.password-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}

.forgot-password-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-secondary {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.auth-secondary:hover {
    background: #f7f7fc;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.auth-secondary:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.auth-helper-text {
    margin-top: -8px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

.resend-verification-link {
    padding: 0;
    margin-left: 4px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.resend-verification-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.resend-verification-link:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}