/* SMEDC — تسجيل الحساب */

:root {
  --ink: #14211c;
  --muted: #5c6b64;
  --line: #cfe4de;
  --paper: #f3f8f6;
  --card: #ffffff;
  --primary: #17947B;
  --accent: #06AA89;
  --teal: #17947B;
  --teal-deep: #0f6b5a;
  --gold: #06AA89;
  --gold-soft: #e5f7f3;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --ok: #17947B;
  --ok-bg: #e6f7f3;
  --focus: rgba(23, 148, 123, 0.18);
  --shadow: 0 12px 40px rgba(15, 107, 90, 0.08);
  --radius: 14px;
  --font: "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background:
  radial-gradient(1200px 500px at 100% -10%, rgba(6, 170, 137, 0.12), transparent 50%),
  radial-gradient(900px 400px at -10% 0%, rgba(23, 148, 123, 0.1), transparent 45%),
  var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  background: #fff;
  color: var(--ink);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 8px 24px rgba(15, 107, 90, 0.06);
}
.topbar-inner {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand-lockup {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.brand-logo {
  height: 48px;
  width: auto;
  max-width: min(200px, 52vw);
  object-fit: contain;
  object-position: left center;
  display: block;
}
.brand-mark {
  display: none;
  height: 48px;
  width: auto;
  max-width: min(200px, 52vw);
}
.brand-mark.is-fallback { display: block; }
.brand-copy { min-width: 0; }
.brand-kicker { font-size: 11px; letter-spacing: 0.08em; color: var(--accent); }
.brand-name { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--primary); }
.brand-sub { font-size: 12px; color: var(--muted); }

.wrap { width: min(980px, calc(100% - 32px)); margin: 22px auto 64px; }
.stepper {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px;
  scrollbar-width: thin;
}
.crumb {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.crumb.is-done { color: var(--primary); border-color: #b7d9d0; background: #eef8f5; }
.crumb.is-current {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: var(--primary);
}
.crumb b {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(23, 148, 123, 0.1); font-size: 11px;
}
.crumb.is-current b { background: rgba(255,255,255,0.2); }

.panel {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 170, 137, 0.08), transparent);
}
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.panel-head h1 { font-size: 24px; margin: 4px 0 4px; color: var(--primary); }
.panel-head p { color: var(--muted); font-size: 14px; }
.notice {
  margin: 16px 24px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--teal-deep);
  font-size: 13px;
}
.banner {
  margin: 16px 24px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
}
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.warn { background: #fff6e5; color: #8a5a00; }
.banner.err { background: var(--danger-bg); color: var(--danger); }
.echo {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  direction: ltr;
}

#step-body { padding: 20px 24px 8px; }
.field { margin-bottom: 18px; }
.field.is-hidden { display: none; }
.field label.lbl {
  display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px;
}
.req { color: #c2410c; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.err { min-height: 1.15em; font-size: 12px; color: var(--danger); margin-top: 5px; }
.field.has-error .ctrl,
.field.has-error .choice { border-color: #f0b4ad; }

.ctrl {
  width: 100%;
  border: 1.5px solid #cfd8d2;
  border-radius: 12px;
  padding: 11px 13px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.ctrl { min-height: 96px; resize: vertical; }
.ctrl:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}
[dir="ltr"].ctrl { text-align: left; }
.phone-box { display: flex; gap: 8px; direction: ltr; }
.phone-cc {
  flex: 0 0 86px;
  display: grid; place-items: center;
  border: 1.5px solid #cfd8d2;
  border-radius: 12px;
  font-weight: 700;
  background: #f4f7f5;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(118px, 140px) 1fr;
  gap: 8px;
  direction: ltr;
}
.country-picker { position: relative; }
.country-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1.5px solid #cfd8d2;
  border-radius: 12px;
  background: #fff;
}
.country-trigger:hover { border-color: #9bb5aa; }
.country-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}
.country-trigger .flag,
.country-option .flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
}
.flag-img {
  display: block;
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}
.country-trigger .dial-code,
.country-option .code {
  font-size: 14px;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
}
.chevron {
  margin-left: auto;
  width: 0;
  height: 0;
  border-inline: 5px solid transparent;
  border-top: 5px solid var(--muted);
}
.country-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(300px, 85vw);
  background: #fff;
  border: 1px solid #cfd8d2;
  border-radius: 12px;
  z-index: 40;
  overflow: hidden;
}
.country-search {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #cfd8d2;
  border-radius: 0;
  padding: 10px 12px;
  background: #f4f7f5;
}
.country-search:focus { outline: none; }
.country-list { list-style: none; max-height: 240px; overflow-y: auto; }
.country-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  text-align: right;
}
.country-option:hover,
.country-option[aria-selected="true"] { background: var(--gold-soft); }
.country-option .name { flex: 1; font-size: 14px; }
.country-option .code { color: var(--muted); font-size: 13px; }
.country-empty { padding: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.phone-row input[type="tel"] { min-width: 0; }

.choices { display: grid; gap: 10px; }
@media (min-width: 640px) {
  .choices.cols-2 { grid-template-columns: 1fr 1fr; }
}
.choice {
  text-align: right;
  border: 1.5px solid #cfd8d2;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
  transition: border-color .15s, background .15s, transform .15s;
}
.choice:hover { border-color: var(--accent); }
.choice.is-on { border-color: var(--primary); background: #eef8f5; }
.choice i {
  width: 18px; height: 18px; margin-top: 3px; flex: 0 0 18px;
  border: 2px solid #9aaea5; border-radius: 50%;
  display: grid; place-items: center;
}
.choice.is-on i { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.choice.multi i { border-radius: 5px; }
.choice.is-locked {
  cursor: default;
  background: #f4f7f5;
  border-color: #b7c9bf;
}
.choice.is-locked:hover { border-color: #b7c9bf; }
.choice small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.choice b { font-size: 14px; }
.choice .tag {
  display: inline-block;
  margin: 4px 0 0;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  color: var(--teal-deep);
  background: #e5f7f3;
  border-radius: 999px;
  padding: 1px 8px;
}

.pwd-row { display: grid; gap: 10px; }
@media (min-width: 640px) { .pwd-row { grid-template-columns: 1fr 1fr; } }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checkline input { margin-top: 4px; accent-color: var(--primary); }

.verify-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.verify-row .ctrl { flex: 1 1 140px; }
.ghost, .primary, .soft {
  border: 0; border-radius: 11px; padding: 10px 16px; font-weight: 600;
  transition: background .15s, color .15s, transform .15s;
}
.ghost { background: #eef3f0; color: var(--teal-deep); }
.ghost:hover:not(:disabled) { background: #dceee9; }
.soft { background: var(--gold-soft); color: var(--teal-deep); }
.soft:hover:not(:disabled) { background: #d4f3ec; }
.primary {
  background: var(--primary);
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: var(--accent);
}
.primary:disabled, .ghost:disabled, .soft:disabled { opacity: .55; cursor: not-allowed; }
.primary.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 1;
  cursor: wait;
}
.btn-spinner,
.overlay-spinner {
  display: inline-block;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
}
.overlay-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid #cfe4de;
  border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

.submit-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(2px);
  text-align: center;
  padding: 24px;
}
.submit-overlay p {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}
.submit-overlay small {
  color: var(--muted);
  font-size: 13px;
}
.panel.is-submitting {
  cursor: wait;
}
.panel.is-submitting #step-body {
  pointer-events: none;
  opacity: .5;
}

.map {
  height: 240px; border-radius: 12px; border: 1.5px solid #cfd8d2; overflow: hidden;
  margin-top: 8px;
}
.map-meta { font-size: 12px; color: var(--muted); margin-top: 6px; direction: ltr; text-align: left; }
.file-box {
  border: 1.5px dashed #b7d9d0; border-radius: 12px; padding: 14px; background: #f7fbf9;
}
.file-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
}
.file-pick input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 0;
  cursor: pointer;
}
.file-btn {
  display: inline-block;
  background: #fff;
  border: 1.5px solid #b7d9d0;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 600;
  color: var(--teal-deep);
}
.file-name { font-size: 13px; color: var(--primary); margin-top: 8px; font-weight: 600; }
.file-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.file-box.is-pending .file-name { color: #9a6700; }
.file-box.is-ok .file-name { color: var(--ok); }
.file-box.is-error .file-name { color: var(--danger); }

.repeater { display: flex; flex-direction: column; gap: 10px; }
.rep-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff;
}
.rep-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.linkish { background: none; border: 0; color: var(--danger); font-weight: 600; }

.review { display: flex; flex-direction: column; gap: 14px; }
.rev-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.rev-card h3 { font-size: 14px; margin-bottom: 8px; color: var(--primary); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 600; overflow-wrap: anywhere; }

.actions {
  display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap;
  padding: 16px 24px 22px; border-top: 1px solid var(--line); background: #f4faf8;
}
.actions-left, .actions-right { display: flex; gap: 8px; flex-wrap: wrap; }
.save-meta { font-size: 12px; color: var(--muted); align-self: center; }

.success {
  text-align: center; padding: 42px 24px;
}
.success i {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 28px; font-weight: 800;
}
.success h2 { color: var(--primary); }
.pid {
  display: inline-block; margin-top: 10px; padding: 6px 12px;
  border-radius: 999px; background: var(--gold-soft); color: var(--teal-deep); font-weight: 700; direction: ltr;
}

.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.foot a { color: var(--primary); font-weight: 700; }
.foot a:hover { color: var(--accent); }
.spin {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

@media (max-width: 640px) {
  .brand-logo, .brand-mark { height: 40px; }
  .topbar-inner { flex-wrap: wrap; gap: 8px; }
}
