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

:root {
    --brand: #0B4F8A;
    --brand-light: #1A6CB5;
    --brand-pale: #E8F2FC;
    --accent: #1FAD7E;
    --accent-pale: #E2F7F0;
    --danger: #D94040;
    --danger-pale: #FDEAEA;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-focus: #1A6CB5;
    --bg: #F7F9FC;
    --card-bg: #FFFFFF;
    --input-bg: #FAFBFD;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-card: 0 2px 24px rgba(11, 79, 138, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

/* Progress bar */
.progress-wrap {
    margin-bottom: 1.75rem;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .3s;
}

.progress-label.active {
    color: var(--color-green-secondary);
}

.progress-label.done {
    color: var(--color-green-primary);
}

.progress-track {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-green-secondary), var(--color-green-primary));
    border-radius: 99px;
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
    width: 50%;
}

/* Step headings */
.step-head {
    margin-bottom: 1.5rem;
}

.step-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-green-secondary);
    margin-bottom: 6px;
}

.step-title {
    font-size: 24px;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 6px;
}

.step-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Fields */
.field {
    margin-bottom: 1.1rem;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.badge-optional {
    font-size: 10px;
    font-weight: 500;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 1px 7px;
    border-radius: 99px;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
}

.input-icon svg {
    width: 16px;
    height: 16px;
}

input[type="email"],
input[type="password"],
input[type="tel"],
input[type="text"],
select {
    width: 100%;
    height: 44px;
    padding: 0 12px 0 38px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    appearance: none;
}

input:focus,
select:focus {
    border-color: var(--border-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 108, 181, 0.12);
}

input.error {
    border-color: var(--danger);
}

input.error:focus {
    box-shadow: 0 0 0 3px rgba(217, 64, 64, 0.12);
}

.field-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 4px;
}

.field-error.show {
    display: flex;
}

.field-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-hint svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* Password strength */
.pw-strength {
    margin-top: 8px;
}

.pw-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

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

.pw-bar.weak {
    background: var(--danger);
}

.pw-bar.medium {
    background: #F59E0B;
}

.pw-bar.strong {
    background: var(--accent);
}

.pw-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Phone row */
.phone-row {
    display: flex;
    gap: 8px;
}

.phone-prefix-wrap {
    position: relative;
    width: 120px;
    flex-shrink: 0;
}

.phone-prefix-wrap select {
    padding-left: 38px;
}

.phone-prefix-wrap .input-icon {
    top: 50%;
}

.phone-num-wrap {
    flex: 1;
    position: relative;
}

/* Toggle parrain */
.parrain-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: transparent;
    font-size: 13px;
    color: var(--text-secondary);
    width: 100%;
    text-align: left;
    transition: border-color .2s, background .2s;
    margin-bottom: 1rem;
}

.parrain-toggle:hover {
    border-color: var(--brand);
    background: var(--brand-pale);
    color: var(--brand);
}

.parrain-toggle:hover .pt-icon {
    color: var(--brand);
}

.pt-icon {
    color: var(--text-muted);
    display: flex;
    transition: color .2s;
}

.pt-icon svg {
    width: 18px;
    height: 18px;
}

.pt-arrow {
    margin-left: auto;
    color: var(--text-muted);
    display: flex;
    transition: transform .3s;
}

.pt-arrow svg {
    width: 14px;
    height: 14px;
}

.pt-arrow.open {
    transform: rotate(180deg);
}

.parrain-reveal {
    overflow: hidden;
    max-height: 0;
    transition: max-height .35s cubic-bezier(.4, 0, .2, 1), opacity .3s;
    opacity: 0;
}

.parrain-reveal.open {
    max-height: 120px;
    opacity: 1;
}

/* Terms */
.terms {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.terms a {
    color: var(--color-green-secondary);
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

.btn-back {
    width: 100%;
    height: 40px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    border-radius: var(--radius);
    transition: background .2s, color .2s;
}

.btn-back:hover {
    background: var(--bg);
    color: var(--brand);
}

.btn-back svg {
    width: 14px;
    height: 14px;
}

/* Sign in link */
.signin-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 13px;
    color: var(--text-muted);
}

.signin-link a {
    color: var(--color-green-secondary);
    text-decoration: none;
    font-weight: 600;
}

.signin-link a:hover {
    text-decoration: underline;
}

.parraignage-input {
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500
}

/* Animations */
.step-view {
    animation: fadeUp .35s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle password */
.pw-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    display: flex;
    padding: 0;
    transition: color .2s;
}

.pw-eye:hover {
    color: var(--brand);
}

.pw-eye svg {
    width: 16px;
    height: 16px;
}

.input-wrap input[type="password"],
.input-wrap input.pw {
    padding-right: 40px;
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem;
    }
}