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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.form-wrapper {
    padding: 40px;
    width: 100%;
    max-width: 640px;
}

/* ---------- Bubbles ---------- */
.bubbles {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.bubble.active,
.bubble.done {
    opacity: 1;
}

.bubble-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e4e8;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
}

.bubble.active .bubble-number {
    background: #3b82f6;
    color: #fff;
}

.bubble.done .bubble-number {
    background: #22c55e;
    color: #fff;
}

.bubble-label {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    max-width: 90px;
    text-align: center;
}

.bubble-line {
    flex: 1;
    height: 2px;
    background: #e0e4e8;
    margin: 0 8px;
    margin-bottom: 22px;
    min-width: 20px;
}

/* ---------- Steps ---------- */
.step {
    display: none;
    animation: fadeIn 0.3s;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 22px;
    color: #1f2937;
    margin-bottom: 20px;
}

/* ---------- Warning ---------- */
.warning {
    background: #fff7ed;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ---------- Fields ---------- */
.field {
    margin-bottom: 18px;
}

.field label,
.field-label {
    display: block;
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 500;
}

/* ---------- Section heading ---------- */
.field-heading {
    margin-top: 28px;
    margin-bottom: 18px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.field-heading:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.field-heading h3 {
    font-size: 22px;
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 2px;
}

.field-heading .field-hint {
    margin-bottom: 0;
}

.field-hint {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 13px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="tel"],
.field input[type="date"],
.field textarea,
.field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field input.error,
.field textarea.error,
.field select.error {
    border-color: #ef4444;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    margin-bottom: 6px;
}

.radio-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

/* ---------- Choice cards (radio / checklist) ---------- */
.choice-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.choice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.choice-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.2s, background 0.2s;
}

.choice-option:hover {
    background: #f9fafb;
}

.choice-option:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.choice-option.error-outline {
    border-color: #ef4444;
}

.choice-option input {
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---------- Inline row (side by side) ---------- */
.field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
}

.field-row > .field {
    flex: 1;
    margin-bottom: 0;
}

/* Width modifiers for inline children */
.field-row > .field--1-2 { flex: 0 0 calc(50% - 8px); }
.field-row > .field--1-3 { flex: 0 0 calc(33.333% - 11px); }
.field-row > .field--2-3 { flex: 0 0 calc(66.666% - 5px); }
.field-row > .field--auto { flex: 0 0 auto; }

/* ---------- Date of birth ---------- */
.field--date-birth {
    margin-bottom: 18px;
}

.date-birth-row {
    display: flex;
    gap: 12px;
}

.date-birth-col {
    display: flex;
    flex-direction: column;
}

.date-birth-col label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.date-birth-col--month {
    flex: 2;
}

.date-birth-col--day,
.date-birth-col--year {
    flex: 1;
}

.date-birth-col select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.date-birth-col select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.date-birth-col select.error {
    border-color: #ef4444;
}

/* ---------- Nav links (inline with buttons) ---------- */
.nav-link {
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    color: #374151;
    text-decoration: underline;
}

/* ---------- Buttons ---------- */
.nav {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Alignment variants */
.nav--between { justify-content: space-between; }
.nav--left    { justify-content: flex-start; }
.nav--right   { justify-content: flex-end; }
.nav--center  { justify-content: center; }

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-prev {
    background: #e5e7eb;
    color: #374151;
}

.btn-prev:hover {
    background: #d1d5db;
}

.btn-next,
.btn-submit {
    background: #3b82f6;
    color: #fff;
}

.btn-next:hover,
.btn-submit:hover {
    background: #2563eb;
}

.btn-submit {
    background: #22c55e;
}

.btn-submit:hover {
    background: #16a34a;
}

/* Extra button styles */
.btn-extra-primary {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    background: #3b82f6;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.btn-extra-primary:hover {
    background: #2563eb;
}

.btn-extra-secondary {
    padding: 10px 24px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    background: #fff;
    color: #374151;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.btn-extra-secondary:hover {
    background: #f3f4f6;
}

.btn-extra-success {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    background: #22c55e;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.btn-extra-success:hover {
    background: #16a34a;
}

/* ---------- Responsive ---------- */
@media (max-width: 500px) {
    .field-row {
        flex-direction: column;
        gap: 0;
    }
    .field-row > .field {
        margin-bottom: 18px;
    }
    .field-row > .field--1-2,
    .field-row > .field--1-3,
    .field-row > .field--2-3 {
        flex: 1 1 100%;
    }
    .date-birth-row {
        flex-direction: column;
        gap: 10px;
    }
}
