:root {
  color-scheme: light;
  --background: #f9fafb;
  --surface: #fff;
  --text: #161616;
  --text-muted: #667085;
  --primary: #1b8354;
  --primary-hover: #166a45;
  --primary-dark: #14573a;
  --border: #d2d6db;
  --subtle: #f3f4f6;
  --success-surface: #ecfdf3;
  --danger: #b42318;
  --error-surface: #fef3f2;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--background); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: var(--text); background: var(--background); font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--primary-dark); text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
::selection { background: var(--success-surface); color: var(--primary-dark); }
.hidden { display: none !important; }
.skip-link { position: fixed; top: 12px; right: 12px; z-index: 1000; padding: 12px 16px; border-radius: var(--radius); background: var(--primary); color: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.register-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; padding: 16px max(24px, calc((100vw - 1200px) / 2)); background: var(--surface); border-bottom: 1px solid var(--border); }
.top-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-size: 24px; font-weight: 700; text-decoration: none; }
.top-brand img { width: 48px; height: 48px; object-fit: contain; border-radius: 4px; }
.login-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; font-weight: 500; text-decoration: none; }
.login-link:hover { background: var(--success-surface); border-color: var(--primary); }
.register-layout { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; padding: 48px 24px; }
.glass-panel { position: relative; width: 100%; max-width: 480px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.register-form-panel { position: relative; min-width: 0; padding: 32px; }
.form-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 28px; }
.mobile-eyebrow { color: var(--primary-dark); font-size: 13px; font-weight: 500; }
.reg-title { margin: 0; color: var(--text); font-size: 32px; font-weight: 700; line-height: 1.4; }
.form-subtitle { margin: 0; color: var(--text-muted); font-size: 14px; }
.gate-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.gate-badge-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--text-muted); }
.gate-badge.is-open { display: none; }
.gate-badge.is-open .gate-badge-dot { background: var(--primary); }
.gate-badge.is-closed { color: var(--danger); }
.gate-badge.is-closed .gate-badge-dot { background: var(--danger); }
.progress-container { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.progress-line { position: absolute; top: 50%; right: 8px; left: 8px; height: 2px; background: var(--border); transform: translateY(-50%); }
.progress-line-fill { position: absolute; top: 0; right: 0; height: 100%; background: var(--primary); transition: width .25s ease; }
.progress-dot { position: relative; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text-muted); font-size: 14px; font-weight: 500; }
.progress-dot.active { border-color: var(--primary); background: var(--primary); color: var(--surface); box-shadow: 0 0 0 4px var(--success-surface); }
.progress-dot.completed { border-color: var(--primary); background: var(--success-surface); color: var(--primary); }
.progress-dot svg { width: 18px; height: 18px; }
.step-labels { display: flex; justify-content: space-between; margin: 8px 0 24px; }
.step-label { width: 52px; font-size: 12px; color: var(--text-muted); text-align: center; }
.step-label.active, .step-label.completed { color: var(--primary-dark); font-weight: 600; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: stepIn .2s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.input-group { position: relative; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.floating-label { order: -1; color: var(--text); font-size: 14px; font-weight: 500; }
.floating-label::after { content: " *"; color: var(--danger); }
.floating-input { width: 100%; min-width: 0; height: 44px; padding: 10px 12px 10px 40px; border: 1px solid var(--border); border-radius: 4px; outline: none; background: var(--surface); color: var(--text); font-size: 16px; text-align: right; transition: border-color .15s ease, box-shadow .15s ease; }
.floating-input:hover { border-color: var(--text-muted); }
.floating-input:focus { border-color: var(--text); box-shadow: 0 2px 0 var(--text); }
.floating-input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 1000px var(--surface) inset; }
.input-icon { display: none; }
.valid-check { position: absolute; left: 12px; top: 40px; width: 18px; height: 18px; color: var(--primary); opacity: 0; pointer-events: none; }
.input-group.is-valid .valid-check { opacity: 1; }
.inline-error { display: none; color: var(--danger); font-size: 12px; }
.has-error .inline-error { display: block; }
.has-error .floating-input { border-color: var(--danger); }
.stagger-item { position: relative; }
.btn-premium, .btn-secondary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 4px; font-size: 14px; font-weight: 500; transition: background .15s ease; }
.btn-premium { background: var(--primary); color: var(--surface); }
.btn-premium:hover { background: var(--primary-hover); }
.btn-premium:disabled { opacity: .65; cursor: wait; }
.btn-secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-secondary:hover { background: var(--subtle); }
.btn-premium svg, .btn-secondary svg { width: 18px; height: 18px; color: inherit; }
.password-toggle { position: absolute; top: 31px; left: 4px; display: grid; place-items: center; width: 36px; height: 42px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); }
.password-toggle:hover { background: var(--subtle); }
.password-toggle svg { width: 20px; height: 20px; }
.password-feedback { padding: 16px; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); }
.password-feedback.is-weak { border-color: var(--danger); }
.strength-meter { height: 4px; overflow: hidden; border-radius: 4px; background: var(--border); }
.strength-fill { height: 100%; width: 0; background: var(--primary); transition: width .2s ease; }
.strength-text { display: block; min-height: 20px; margin-top: 8px; color: #384250 !important; font-size: 12px; }
.pass-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.pass-checklist li { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 12px; }
.rule-dot { width: 10px; height: 10px; flex: none; border: 1px solid var(--text-muted); border-radius: 50%; }
.pass-checklist li.ok { color: var(--primary-dark); }
.pass-checklist li.ok .rule-dot { border-color: var(--primary); background: var(--primary); }
#errorMsgContainer { border-color: var(--danger); background: var(--error-surface); color: var(--danger); }
.register-form-panel > .text-center:last-child { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.register-form-panel > .text-center:last-child > p:first-child { margin: 0; color: var(--text-muted); font-size: 13px; }
.register-form-panel > .text-center:last-child a { color: var(--primary-dark); font-weight: 600; filter: none; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; color: var(--text-muted); font-size: 11px; }
.secure-note svg { width: 14px; height: 14px; flex: none; }
.register-footer { padding: 0 24px 24px; color: var(--text-muted); font-size: 12px; text-align: center; }
.success-overlay { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; background: var(--surface); text-align: center; visibility: hidden; opacity: 0; }
.success-overlay.active { visibility: visible; opacity: 1; }
.success-overlay h2 { margin: 0; color: var(--primary-dark); background: none; -webkit-text-fill-color: initial; font-size: 28px; }
.success-overlay p { color: var(--text-muted); }
.check-circle { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; background: var(--success-surface); color: var(--primary); }
.check-circle svg { width: 36px; height: 36px; color: var(--primary); }
.form-locked #regForm, .form-locked .progress-container, .form-locked .step-labels { visibility: hidden; pointer-events: none; }
.closed-overlay { position: absolute; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; background: var(--surface); border-radius: 16px; text-align: center; }
.closed-overlay[hidden], .closed-countdown[hidden] { display: none; }
.closed-lock-ring { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--success-surface); color: var(--primary); }
.closed-title { margin: 0; font-size: 24px; font-weight: 600; }
.closed-reason, .closed-note { margin: 0; color: var(--text-muted); font-size: 14px; }
.closed-countdown { display: flex; flex-direction: column; gap: 8px; }
.closed-countdown-time { color: var(--primary-dark); font-size: 28px; }
.closed-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 12px; }
.closed-login-btn { text-decoration: none; }
.closed-note { font-size: 12px; }
@media (max-width: 600px) {
  .register-header { min-height: 72px; padding: 12px 16px; gap: 8px; }
  .top-brand { gap: 8px; font-size: 20px; }
  .top-brand img { width: 40px; height: 40px; }
  .login-link { padding: 8px 12px; font-size: 12px; }
  .register-layout { align-items: flex-start; padding: 24px 16px; }
  .register-form-panel { padding: 24px; }
  .reg-title { font-size: 28px; }
  .form-subtitle { font-size: 13px; }
  .form-heading { margin-bottom: 24px; }
  #step-1 > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  #step-1 > .grid > .sm\:col-span-2 { grid-column: span 2; }
  .floating-label { font-size: 13px; }
  .floating-input { padding-inline-start: 10px; }
  .pass-checklist { grid-template-columns: 1fr; }
  #regForm .mt-8 { margin-top: 20px; }
}
@media (max-width: 350px) {
  #step-1 > .grid { grid-template-columns: 1fr; }
  #step-1 > .grid > .sm\:col-span-2 { grid-column: span 1; }
  .register-form-panel { padding: 24px 16px; }
}
.glass-panel { max-width: 600px; }
.form-heading { align-items: center; text-align: center; }
.register-steps { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; }
.register-step { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; min-width: 0; height: 44px; border: 1px solid var(--code-muted); border-radius: 999px; transition: flex-grow 360ms ease, background-color 240ms ease, border-color 240ms ease; }
.register-step.active { flex: 1 0 44px; justify-content: flex-start; gap: 10px; padding: 4px 4px 4px 12px; border-color: var(--code-green); background: var(--code-green); }
html.code-design .register-steps .progress-dot { display: flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; margin: 0; border: 0; border-radius: 50%; background: transparent !important; color: var(--code-text); font-size: 18px; font-weight: 600; box-shadow: none !important; }
html.code-design .register-steps .progress-dot.active { background: #f5faf7 !important; color: var(--code-green) !important; }
html.code-design .register-steps .step-label { display: none; width: auto; min-width: 0; margin: 0; color: #fff !important; font-size: 14px; font-weight: 600; white-space: nowrap; }
html.code-design .register-steps .register-step.active .step-label { display: block; }
@media (min-width: 480px) {
  .register-steps { gap: 12px; }
  .register-step { flex-basis: 56px; height: 56px; }
  .register-step.active { flex-basis: 56px; padding: 5px 5px 5px 20px; gap: 16px; }
  html.code-design .register-steps .progress-dot { width: 44px; height: 44px; font-size: 22px; }
  html.code-design .register-steps .step-label { font-size: 18px; }
}
.current-step-summary { margin: 16px 0 28px; color: var(--code-muted); font-size: 13px; text-align: center; }
.form-locked .register-steps, .form-locked .current-step-summary { visibility: hidden; }
html.code-design #regForm .code-floating-field > .floating-input { height: 60px; min-height: 60px; padding: 12px 16px 12px 52px; }
html.code-design #regForm .code-floating-field > .code-floating-label { top: 30px !important; gap: 8px; }
html.code-design #regForm .code-floating-field:has(> .input-icon) > .code-floating-label { inset-inline-start: 38px !important; }
html.code-design #regForm .code-floating-label svg { display: block !important; width: 1.25em; height: 1.25em; flex: none; }
html.code-design #regForm .code-floating-field > .input-icon { display: block !important; position: absolute; right: 16px; top: 30px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--code-muted); background: var(--code-surface); pointer-events: none; z-index: 2; transition: top 240ms cubic-bezier(.22, 1, .36, 1), width 240ms ease, height 240ms ease, color 200ms ease; }
html.code-design #regForm .code-floating-field:has(> input:is(:focus, :autofill, :not(:placeholder-shown))) > .code-floating-label { top: 0 !important; }
html.code-design #regForm .code-floating-field:has(> input:is(:focus, :autofill, :not(:placeholder-shown))) > .input-icon { top: 0; width: 15px; height: 15px; }
html.code-design #regForm .code-floating-field:has(> input:focus) > .input-icon { color: var(--code-link); }
html.code-design #regForm .code-floating-field > .password-toggle { top: 8px !important; left: 6px; width: 44px; height: 44px; z-index: 3; }
html.code-design #regForm .code-floating-field > .valid-check { top: 21px !important; }
html.code-design #regForm .strength-text { color: var(--code-muted) !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
