:root {
    --primary: #cf6b24;
    --primary-dark: #b3591c;
    --text: #1f2430;
    --muted: #6b7280;
    --border: #d9dce1;
    --bg: #f7f7f9;
    --surface: #ffffff;
    --success: #1b7a3d;
    --success-bg: #e7f6ec;
    --danger: #b3261e;
    --danger-bg: #fbe9e7;
    --radius: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #edeef2;
        --muted: #a3a8b3;
        --border: #3a3f4b;
        --bg: #14161c;
        --surface: #1c1f27;
        --success-bg: #10331d;
        --danger-bg: #3a1613;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.wizard {
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

h1 { font-size: 1.5rem; margin: 0 0 0.25rem; }
.subtitle { color: var(--muted); margin: 0 0 1.5rem; }

.progress {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    counter-reset: step;
}
.progress li {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    position: relative;
    padding-top: 1.75rem;
}
.progress li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    border-radius: 50%;
    background: var(--border);
    color: var(--surface);
    font-weight: 600;
}
.progress li.active::before { background: var(--primary); }
.progress li.active { color: var(--text); }

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger { background: var(--danger-bg); color: var(--danger); }

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1rem 0 0.35rem;
}
input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
}
input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(207, 107, 36, 0.2);
}

.hint { font-size: 0.8rem; color: var(--muted); margin: 0.5rem 0 0; }
.hint a { color: var(--primary); }

/* intl-tel-input reserves space on the left for the country flag/dial-code dropdown */
.iti { width: 100%; }
#phone_number { padding-left: 52px !important; }

.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.btn-primary, .btn-secondary {
    margin-top: 1.5rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled, .btn-primary.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }

.btn-row { display: flex; gap: 0.75rem; }
.btn-row .btn-primary, .btn-row .btn-secondary { margin-top: 1.5rem; }

.progress-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
    margin: 1rem 0 0.5rem;
}
#progress-fill {
    height: 100%;
    width: 0;
    background: var(--primary);
    transition: width 0.2s ease;
}
#progress-label { text-align: center; font-weight: 600; margin: 0; }

/* Select2 (city / industry search dropdowns) themed to match the rest of the form */
.select2-container--default .select2-selection--single {
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 0.75rem;
    padding-right: 2rem;
    color: var(--text);
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--muted);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary);
}
.select2-dropdown {
    border-color: var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    overflow: hidden;
}
.select2-search--dropdown .select2-search__field {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.select2-results__option {
    color: var(--text);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--primary);
    color: #fff;
}
