* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { display: block; min-height: 100vh; margin: 0; padding: 20px 20px; background: var(--auth-page); background-image: none; color: var(--auth-rich); font-family: var(--auth-font); }
body *, button, input, select { font-family: var(--auth-font); }
:focus-visible { outline: 3px solid var(--auth-soft-navy); outline-offset: 3px; }

.wizard-container { width: min(100%, 1080px); max-width: 1080px; margin-inline: auto; padding: 28px 42px 20px; border: 1px solid var(--auth-border); border-radius: 8px; background: var(--auth-white); box-shadow: none; }
.wizard-header { margin-bottom: 20px; text-align: right; }
.wizard-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 13px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--auth-soft-navy); font-size: 12px; font-weight: 600; }
.wizard-brand::before { content: ''; width: 28px; height: 2px; background: var(--auth-teal); }
.wizard-title { margin-bottom: 6px; color: var(--auth-navy); font-size: 34px; font-weight: 700; line-height: 1.35; }
.wizard-sub { max-width: 650px; color: var(--auth-soft-navy); font-size: 15px; line-height: 1.7; }
.wizard-alert { margin-bottom: 23px; padding: 14px 18px; border: 1px solid var(--auth-soft-navy); border-radius: 8px; background: var(--auth-soft); color: var(--auth-navy); }
.wizard-alert strong { display: block; margin-bottom: 4px; font-size: 14px; }
.wizard-alert ul { margin: 0; padding-right: 20px; font-size: 13px; }

.steps-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--auth-border); }
.steps-bar::before { content: ''; position: absolute; top: 19px; right: 0; left: 0; height: 1px; background: var(--auth-border); z-index: 1; transform: translateY(-50%); }
.step-item { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; padding: 0 6px; background: var(--auth-white); gap: 6px; }
.step-circle { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--auth-border); border-radius: 8px; background: var(--auth-white); color: var(--auth-soft-navy); font-size: 14px; font-weight: 600; box-shadow: none; }
.step-item.active .step-circle { border-color: var(--auth-teal); background: var(--auth-teal); color: var(--auth-navy); box-shadow: none; }
.step-item.done .step-circle { border-color: var(--auth-navy); background: var(--auth-navy); color: var(--auth-white); }
.step-label { color: var(--auth-soft-navy); font-size: 12px; font-weight: 500; text-align: center; line-height: 1.4; }
.step-item.active .step-label { color: var(--auth-navy); font-weight: 700; }
/* كانت ناقصة الحالة الأساسية display:none — تسبّب بظهور كل الخطوات الأربع فوق بعضها دفعة واحدة. */
.step-panel { display: none; }
.step-panel.active { display: block; animation: registerStepFade .2s ease forwards; }
@keyframes registerStepFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.step-heading { margin: 0 0 19px; color: var(--auth-navy); font-size: 21px; font-weight: 600; line-height: 1.5; }

.activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 11px; margin-bottom: 26px; }
.activity-card { position: relative; display: block; cursor: pointer; min-height: 140px; padding: 21px 13px; border: 1px solid var(--auth-border); border-radius: 8px; background: var(--auth-white); color: var(--auth-rich); text-align: right; transition: border-color .15s ease, background-color .15s ease; }
.activity-card:hover { border-color: var(--auth-soft-navy); transform: none; }
.activity-card.selected { border-color: var(--auth-teal-ink); background: var(--auth-soft); box-shadow: inset 0 3px 0 var(--auth-teal); }
.activity-card.is-unavailable { cursor: not-allowed; opacity: .58; filter: none; }
.activity-card.is-unavailable:hover { border-color: var(--auth-border); }
.activity-card:focus-within { outline: 3px solid var(--auth-soft-navy); outline-offset: 2px; }
.activity-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.activity-icon { display: flex; align-items: center; width: 40px; height: 40px; justify-content: flex-start; margin: 0 0 13px; border-radius: 0; background: transparent !important; color: var(--auth-navy) !important; }
.activity-icon svg { width: 25px; height: 25px; stroke-width: 1.5; }
.activity-card.selected .activity-icon { color: var(--auth-teal-ink) !important; }
.activity-name { margin-bottom: 6px; color: var(--auth-navy); font-size: 16px; font-weight: 600; }
.activity-desc { color: var(--auth-soft-navy); font-size: 12px; line-height: 1.55; }
.activity-status { position: absolute; top: 9px; left: 9px; padding: 2px 7px; border: 1px solid var(--auth-border); border-radius: 4px; background: var(--auth-soft); color: var(--auth-soft-navy); font-size: 11px; font-weight: 600; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 20px; }
.form-group { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.form-label { color: var(--auth-rich); font-size: 13px; font-weight: 600; }
.form-input, .form-select { min-height: 47px; padding: 10px 13px; border: 1px solid var(--auth-border); border-radius: 8px; background: var(--auth-white); color: var(--auth-rich); font-size: 14px; font-weight: 400; transition: border-color .15s ease, box-shadow .15s ease; }
.form-input::placeholder { color: var(--auth-muted); opacity: 1; }
.form-input:focus, .form-select:focus { border-color: var(--auth-teal-ink); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }
.form-input[dir="ltr"] { text-align: right; }
.field-error { color: #b91c1c; font-size: 12.5px; margin-top: 5px; }

/* كلمة المرور: زر إظهار/إخفاء — نفس نمط login.css بالضبط */
.form-input-wrapper { position: relative; }
.form-input-wrapper .form-input { padding-left: 46px; }
.toggle-password { position: absolute; top: 50%; left: 3px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--auth-soft-navy); cursor: pointer; }
.toggle-password:hover { color: var(--auth-navy); }
.toggle-password svg { width: 18px; height: 18px; stroke-width: 1.6; }
.toggle-password .eye-off-icon, .toggle-password.active .eye-icon { display: none; }
.toggle-password.active .eye-off-icon { display: block; }

.selected-activity-badge { display: flex; align-items: center; width: 100%; margin-bottom: 24px; padding: 10px 13px; border: 1px solid var(--auth-border) !important; border-radius: 8px; background: var(--auth-soft) !important; color: var(--auth-navy) !important; font-size: 13px; font-weight: 600; }
.selected-activity-badge button { margin-right: auto; padding: 7px; border: 0; background: transparent; color: var(--auth-teal-ink) !important; font-size: 12px; font-weight: 600; cursor: pointer; }
.terms-wrap { margin-top: 17px; }
.terms-label { display: flex; align-items: flex-start; gap: 10px; color: var(--auth-soft-navy); font-size: 13px; line-height: 1.7; cursor: pointer; }
.terms-label input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--auth-teal-ink); flex: none; }
.terms-label a, .wizard-footer a { color: var(--auth-teal-ink); font-weight: 600; text-decoration: none; }
.terms-label a:hover, .wizard-footer a:hover { text-decoration: underline; }

.actions-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--auth-border); }
.btn-next, .btn-submit, .btn-prev { display: inline-flex; align-items: center; cursor: pointer; min-height: 47px; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; box-shadow: none; transition: background-color .15s ease, border-color .15s ease; }
.btn-next, .btn-submit { border: 1px solid var(--auth-teal); background: var(--auth-teal); background-image: none; color: var(--auth-navy); }
.btn-next:hover, .btn-submit:hover { border-color: var(--auth-teal-hover); background: var(--auth-teal-hover); transform: none; box-shadow: none; }
.btn-next:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }
.btn-prev { border: 1px solid var(--auth-border); background: var(--auth-white); color: var(--auth-navy); }
.btn-prev:hover { border-color: var(--auth-navy); color: var(--auth-navy); background: var(--auth-soft); }
.btn-next svg, .btn-submit svg, .btn-prev svg { width: 18px; height: 18px; stroke-width: 1.6; flex: none; }
.summary-card { padding: 10px 20px; border: 1px solid var(--auth-border); border-radius: 8px; background: var(--auth-white); }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--auth-border); color: var(--auth-rich); font-size: 13px; }
.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--auth-soft-navy); }
.summary-val { color: var(--auth-navy); font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.summary-val--trial { color: var(--auth-teal-ink) !important; }
.wizard-footer { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--auth-border); text-align: center; }
.wizard-footer p { color: var(--auth-soft-navy); font-size: 14px; }

@media (max-width: 720px) {
    body { display: block; padding: 0; }
    .wizard-container { min-height: 100vh; padding: 27px 20px 32px; border: 0; border-radius: 0; }
    .wizard-header { margin-bottom: 26px; }
    .wizard-title { font-size: 27px; }
    .wizard-sub { font-size: 14px; }
    .steps-bar { gap: 2px; margin-bottom: 26px; }
    .step-item { padding: 0 2px; }
    .step-circle { width: 32px; height: 32px; font-size: 12px; }
    .step-label { font-size: 10px; }
    .step-heading { font-size: 18px; }
    .activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .activity-card { min-height: 150px; padding: 17px 12px; }
    .activity-name { font-size: 15px; }
    .form-grid { grid-template-columns: 1fr; gap: 16px; }
    .actions-bar { align-items: stretch; flex-direction: column-reverse; }
    .actions-bar .btn-next, .actions-bar .btn-submit, .actions-bar .btn-prev { width: 100%; }
    .summary-card { padding: 8px 14px; }
    .summary-row { align-items: flex-start; flex-direction: column; gap: 2px; }
    .summary-val { text-align: right; }
}

@media (max-width: 390px) {
    .activity-grid { grid-template-columns: 1fr; }
    .activity-card { min-height: 105px; display: grid; grid-template-columns: 35px minmax(0, 1fr); align-content: center; column-gap: 8px; }
    .activity-icon { grid-row: span 2; margin: 0; }
    .activity-status { top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── خطوة «اختر أقسامك» (الذهب والألماس) ── */
.sec-intro { margin: -6px 0 14px; color: #475569; font-size: 14px; line-height: 1.8; }
.sec-pricebar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--auth-teal, #2dd4bf); border-radius: 12px; background: #f0fdfa; }
.sec-price-label { display: block; font-size: 12px; color: #475569; }
.sec-price { font-size: 26px; font-weight: 700; color: var(--auth-navy, #0f172a); line-height: 1.3; }
.sec-cur { font-size: 14px; font-weight: 600; }
.sec-price-meta { font-size: 13px; color: #0f766e; }
.sec-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sec-btn { border: 1px solid #cbd5e1; background: #fff; color: var(--auth-navy, #0f172a); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.sec-btn:hover { background: #f1f5f9; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.sec-card { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; overflow: hidden; }
.sec-card.is-off { opacity: .75; }
.sec-card-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid #eef2f7; font-weight: 700; color: var(--auth-navy, #0f172a); cursor: pointer; }
.sec-pages { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.sec-page { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; font-size: 13.5px; color: #334155; cursor: pointer; }
.sec-page:hover { background: #f8fafc; }
.sec-page.is-locked { opacity: .45; cursor: not-allowed; }
.sec-page.is-added { background: #ecfdf5; }
.sec-badge { margin-inline-start: auto; font-size: 11px; color: #047857; background: #d1fae5; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.sec-card input[type="checkbox"] { width: 16px; height: 16px; accent-color: #0d9488; flex-shrink: 0; }
/* ── كود الخصم بالتسجيل ── */
.sec-discount { margin: 16px 0; padding: 14px 16px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; }
.sec-discount-row { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.sec-discount-row .form-input { flex: 1; min-width: 0; text-transform: uppercase; }
.sec-discount-msg { margin-top: 8px; font-size: 13.5px; }
.sec-discount-msg.is-ok { color: #047857; }
.sec-discount-msg.is-bad { color: #b91c1c; }