:root {
    /* Auth surfaces are light; primary matches light-mode brand */
    --auth-green: #042E25;
    --auth-green-hover: #156534;
    --auth-green-dark: #031f19;
    --auth-green-btn: #042E25;
    --auth-green-soft: #e8f0ed;
    --auth-green-muted: #c5d9d2;
    --auth-text-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-radius: 12px;
    --auth-focus-ring: color-mix(in srgb, #042E25 22%, transparent);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

.auth-body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    background: #fff;
    color: #111827;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
}

.auth-panel-left {
    flex: 1;
    background: var(--auth-green);
    color: #fff;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100vh;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-brand-mark {
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-dot {
    width: 10px;
    height: 10px;
    background: var(--auth-green);
    border-radius: 50%;
}

.auth-left-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 420px;
    padding: 2rem 0;
}

.auth-left-tag {
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 1rem;
}

.auth-left-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1.25rem;
}

.auth-left-description {
    font-size: 0.9375rem;
    line-height: 1.65;
    opacity: 0.88;
    margin: 0;
}

.auth-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: auto;
}

.auth-stat-label {
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.65;
    margin-bottom: 0.35rem;
}

.auth-stat-value {
    font-size: 1.125rem;
    font-weight: 600;
}

.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: #fff;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-tag {
    display: block;
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--auth-text-muted);
    margin-bottom: 0.75rem;
}

.auth-title {
    font-size: clamp(1.75rem, 3vw, 2.125rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #111827;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--auth-text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.auth-subtitle a {
    color: var(--auth-green);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.auth-subtitle a:hover {
    color: var(--auth-green-hover);
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-label {
    display: block;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--auth-text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: #fff;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px var(--auth-focus-ring);
}

.auth-input.is-invalid,
.auth-input:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

.auth-error {
    display: block;
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.35rem;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9375rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #fff;
    background: var(--auth-green-btn);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    margin-top: 0.5rem;
}

.auth-btn:hover,
.auth-btn:focus-visible {
    background: var(--auth-green-hover);
    color: #fff;
}

.auth-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--auth-focus-ring);
}

.auth-btn-arrow {
    font-size: 1rem;
    line-height: 1;
}

.auth-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.75rem 0 1.25rem;
    font-size: 0.875rem;
}

.auth-link {
    color: var(--auth-green);
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    color: var(--auth-green-hover);
    text-decoration: underline;
}

.auth-footer-note {
    margin-top: 2.5rem;
    font-size: 0.6875rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.5;
}

.auth-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.auth-step-nav a {
    color: var(--auth-text-muted);
    text-decoration: none;
}

.auth-step-nav a:hover {
    color: #111827;
}

.auth-step-indicator {
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    font-weight: 500;
}

.auth-alerts {
    margin-bottom: 1rem;
}

.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--auth-radius);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.auth-alert-success {
    background: var(--auth-green-soft);
    color: var(--auth-green);
    border: 1px solid var(--auth-green-muted);
}

.auth-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-text-center {
    text-align: center;
}

.auth-actions-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.auth-actions-row .auth-btn {
    flex: 1;
}

.auth-actions-row .auth-btn {
    flex: 1;
}

.auth-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9375rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 9999px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.auth-btn-outline:hover {
    background: #f9fafb;
}

.auth-option-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.auth-option-item {
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    padding: 1rem 1.125rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.15s, background 0.15s;
}

.auth-option-item:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.auth-option-item label {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    cursor: pointer;
}

.auth-option-item input[type="radio"] {
    margin-top: 0.25rem;
    accent-color: var(--auth-green);
}

.auth-option-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin: 0 0 0.25rem;
    color: #111827;
}

.auth-option-desc {
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    margin: 0;
    line-height: 1.5;
}

.auth-illustration {
    max-width: 200px;
    margin: 0 auto 1.5rem;
    display: block;
}

/* Registration progress (left panel) */
.auth-progress {
    margin-top: auto;
    padding-top: 2rem;
}

.auth-progress-track {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 200px;
    margin-bottom: 0.875rem;
}

.auth-progress-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    background: transparent;
}

.auth-progress-step.is-active {
    background: #fff;
    border-color: #fff;
    color: var(--auth-green);
}

.auth-progress-step.is-done {
    background: #fff;
    border-color: #fff;
    color: var(--auth-green);
}

.auth-progress-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
    min-width: 28px;
}

.auth-progress-label {
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.85;
    font-weight: 500;
}

.auth-form-wrap.is-wide {
    max-width: 440px;
}

/* Market pills */
.auth-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-pill {
    position: relative;
    cursor: pointer;
}

.auth-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-pill span {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    border: 1px solid var(--auth-border);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    background: #fff;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.auth-pill input:checked + span {
    background: var(--auth-green-btn);
    border-color: var(--auth-green-btn);
    color: #fff;
}

.auth-pill:hover span {
    border-color: #d1d5db;
}

/* Risk tolerance cards */
.auth-risk-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.auth-risk-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.auth-risk-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-risk-card-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.125rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}

.auth-risk-card:hover .auth-risk-card-inner {
    border-color: #d1d5db;
}

.auth-risk-card input:checked + .auth-risk-card-inner {
    border-color: var(--auth-green);
    background: var(--auth-green-soft);
}

.auth-risk-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin: 0 0 0.25rem;
    color: #111827;
}

.auth-risk-desc {
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    margin: 0;
    line-height: 1.45;
}

.auth-risk-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--auth-green);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

.auth-risk-card input:checked + .auth-risk-card-inner .auth-risk-check {
    display: inline-flex;
}

/* Capital allocation grid */
.auth-capital-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.auth-capital-option {
    position: relative;
    cursor: pointer;
    display: block;
}

.auth-capital-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-capital-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 3.25rem;
    padding: 0.75rem 0.75rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    font-size: 0.8125rem;
    font-weight: 500;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}

.auth-capital-option:hover span {
    border-color: #d1d5db;
}

.auth-capital-option input:checked + span {
    border-color: var(--auth-green);
    background: var(--auth-green-soft);
}

.auth-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #374151;
}

.auth-check-row input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-green);
    flex-shrink: 0;
}

.auth-check-row a {
    color: #111827;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-actions-row .auth-btn-outline {
    flex: 0 0 auto;
    min-width: 6.5rem;
    background: #f3f4f6;
    border-color: transparent;
}

.auth-actions-row .auth-btn-outline:hover {
    background: #e5e7eb;
}

@media (max-width: 900px) {
    .auth-shell {
        flex-direction: column;
    }

    .auth-panel-left {
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .auth-left-content {
        padding: 1rem 0;
    }

    .auth-stats,
    .auth-progress {
        margin-top: 2rem;
    }

    .auth-panel-right {
        padding: 2rem 1.5rem 3rem;
    }
}
