body {
    min-height: 100vh;
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    position: relative;
    overflow: hidden;
}

/* ── LEFT: form ── */
.auth-form-side {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 64px 56px;
    position: relative;
}

.auth-form-side::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.05), transparent 70%);
    top: 30%;
    left: -150px;
    filter: blur(60px);
    pointer-events: none;
}

.auth-form {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

/* Stepper */
.stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 600;
}

.step .num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s;
}

.step.active .num {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 18px rgba(192, 68, 245, 0.5);
}

.step.active {
    color: var(--text);
}

.step.done .num {
    background: rgba(34, 211, 238, 0.15);
    border-color: rgba(34, 211, 238, 0.5);
    color: var(--cyan);
}

.step-bar {
    flex: 1;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.step-bar.filled::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient);
}

.form-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 12px;
}

.form-title {
    font-size: 34px;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.form-sub {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.field {
    margin-bottom: 18px;
}

.field-error {
    display: block;
    margin: 0 0 8px;
    color: #fca5a5;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

.input-wrap svg.lead {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-dim);
    pointer-events: none;
}

.field input,
.field select {
    width: 100%;
    padding: 13px 16px 13px 46px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s;
    appearance: none;
}

.field input::placeholder {
    color: var(--text-dim);
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: rgba(192, 68, 245, 0.5);
    background: rgba(192, 68, 245, 0.04);
    box-shadow: 0 0 0 4px rgba(192, 68, 245, 0.08);
}

.field input.is-invalid,
.field select.is-invalid,
.has-error .cp-card,
.has-error .chip,
.checkbox.has-error .box {
    border-color: rgba(239, 68, 68, 0.75);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23606080' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* PW strength */
.pw-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.pw-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    transition: background 0.3s;
}

.pw-bar.s1 {
    background: #f87171;
}

.pw-bar.s2 {
    background: #fbbf24;
}

.pw-bar.s3 {
    background: var(--cyan);
}

.pw-bar.s4 {
    background: #4ade80;
}

.pw-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 6px;
}

/* Course selector cards */
.course-pick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 22px;
}

.course-pick label {
    display: block;
    cursor: pointer;
    position: relative;
}

.course-pick input {
    display: none;
}

.cp-card {
    padding: 14px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cp-card .cp-emoji {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(192, 68, 245, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.cp-card .cp-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.cp-card .cp-meta {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.course-pick input:checked + .cp-card {
    border-color: rgba(192, 68, 245, 0.6);
    background: rgba(192, 68, 245, 0.06);
    box-shadow: 0 0 0 3px rgba(192, 68, 245, 0.1);
}

.course-pick input:checked + .cp-card .cp-emoji {
    background: var(--gradient);
}

/* Format radio chips */
.chip-row {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.chip-row label {
    flex: 1;
    cursor: pointer;
}

.chip-row input {
    display: none;
}

.chip-row .chip {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.chip-row .chip .chip-sub {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
}

.chip-row input:checked + .chip {
    border-color: rgba(192, 68, 245, 0.6);
    background: rgba(192, 68, 245, 0.06);
    color: var(--text);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    margin-bottom: 24px;
    line-height: 1.5;
}

.checkbox input {
    display: none;
}

.checkbox .box {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 1px;
}

.checkbox input:checked + .box {
    background: var(--gradient);
    border-color: transparent;
}

.checkbox input:checked + .box::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.checkbox a {
    color: var(--cyan);
    font-weight: 600;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 50px;
    background: var(--gradient);
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 28px rgba(192, 68, 245, 0.4);
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(192, 68, 245, 0.55);
}

.form-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--cyan);
    font-weight: 700;
}

/* ── RIGHT: brand panel ── */
.auth-brand {
    position: relative;
    background: linear-gradient(220deg, #14112a 0%, #0d0d1a 50%, #1a0e2e 100%);
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-left: 1px solid var(--border);
}

.auth-brand::before {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 70%);
    filter: blur(80px);
    top: -150px;
    right: -200px;
    pointer-events: none;
}

.auth-brand::after {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 68, 245, 0.22), transparent 70%);
    filter: blur(60px);
    bottom: -150px;
    left: -150px;
    pointer-events: none;
}

.brand-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 70% 50%, black 30%, transparent 70%);
    pointer-events: none;
}

.brand-top {
    position: relative;
    z-index: 2;
}

.brand-top img {
    height: 38px;
}

.brand-mid {
    position: relative;
    z-index: 2;
}

.brand-mid h1 {
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.08;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.brand-mid p {
    font-size: 17px;
    max-width: 460px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 15px;
    color: var(--text);
}

.benefit-list .check {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(192, 68, 245, 0.15);
    border: 1px solid rgba(192, 68, 245, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple);
    font-weight: 800;
}

.benefit-list strong {
    display: block;
    margin-bottom: 2px;
}

.benefit-list span {
    font-size: 13px;
    color: var(--text-muted);
}

.brand-stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(192, 68, 245, 0.15);
    border: 1px solid rgba(192, 68, 245, 0.2);
    border-radius: 16px;
    overflow: hidden;
}

.bs-item {
    background: rgba(13, 13, 26, 0.65);
    padding: 22px 18px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.bs-num {
    font-size: 26px;
    font-weight: 800;
}

.bs-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.back-home {
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: rgba(13, 13, 26, 0.6);
    backdrop-filter: blur(12px);
    transition: all 0.2s;
}

.back-home:hover {
    color: var(--text);
    border-color: rgba(192, 68, 245, 0.3);
}

.registration-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 7, 15, 0.78);
    backdrop-filter: blur(12px);
}

.registration-modal-backdrop.open {
    display: flex;
}

.registration-modal {
    width: min(440px, 100%);
    padding: 36px;
    border-radius: 22px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: linear-gradient(160deg, rgba(18, 24, 32, 0.98), rgba(13, 13, 26, 0.98));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.registration-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86efac;
    font-size: 32px;
    font-weight: 900;
}

.registration-modal h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.registration-modal p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.registration-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.registration-modal-actions .btn {
    border: none;
}

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

    .auth-brand {
        display: none;
    }

    .auth-form-side {
        padding: 100px 24px 48px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .course-pick {
        grid-template-columns: 1fr;
    }
}
