/* Wizard shell, form fields, signature, uploads */
.wiz-shell {
  max-width: 820px; margin: 0 auto; padding-block: 36px 60px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wiz-kicker { letter-spacing: .14em; font-size: 12.5px; color: var(--gold); text-transform: uppercase; margin: 0 0 4px; }
.wiz-title { font-size: clamp(26px, 4.5vw, 36px); margin-bottom: 20px; }

.wiz-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 8px; }
.wiz-steps li {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px; background: var(--surface);
}
.wiz-steps li .dot {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11.5px; background: var(--line); color: var(--ink); font-variant-numeric: tabular-nums;
}
.wiz-steps li.cur { border-color: var(--gold); color: var(--ink); font-weight: 600; }
.wiz-steps li.cur .dot { background: var(--gold); color: #fffdf6; }
.wiz-steps li.done { color: var(--good); border-color: var(--good); }
.wiz-steps li.done .dot { background: var(--good); color: #fff; }

.wiz-body {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 28px 26px; margin-top: 14px;
}
.f-heading {
  font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--gold);
  border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 26px 0 4px;
}
.f-heading:first-child { margin-top: 0; }
.f-note { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }

.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 14px; }
.f-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f-field.full { grid-column: 1 / -1; }
.f-field label { font-size: 14px; font-weight: 600; }
.f-field label .req { color: var(--bad); }
.f-field input, .f-field select, .f-field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font: inherit; font-size: 15px; padding: 9px 12px; width: 100%;
}
.f-field textarea { min-height: 110px; resize: vertical; }
.f-field input:focus, .f-field select:focus, .f-field textarea:focus { border-color: var(--gold); outline: none; }
.f-field.invalid input, .f-field.invalid select, .f-field.invalid textarea { border-color: var(--bad); }
.f-hint { font-size: 12.5px; color: var(--muted); }

/* radio pills + checkbox group */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 18px; cursor: pointer;
  font-weight: 500; font-size: 14.5px; background: var(--bg); transition: border-color .15s;
}
.pills input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.pills label:has(input:checked) {
  background: var(--gold); color: var(--on-gold); border-color: var(--gold);
  font-weight: 700; box-shadow: 0 2px 10px color-mix(in srgb, var(--gold) 45%, transparent);
}
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.checks label {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 12px; cursor: pointer; font-size: 14.5px; background: var(--bg);
}
.checks label:has(input:checked) {
  background: var(--gold); color: var(--on-gold); border-color: var(--gold); font-weight: 700;
}
.checks label:has(input:checked) input { accent-color: var(--on-gold); }
.checks input { accent-color: var(--gold); width: 16px; height: 16px; flex: none; }

/* repeat rows (kollel frameworks) */
.rep-rows { display: flex; flex-direction: column; gap: 10px; }
.rep-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 10px; align-items: end; }
.rep-row .rm {
  background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px;
  width: 38px; height: 38px; cursor: pointer; font-size: 17px; line-height: 1;
}
.rep-row .rm:hover { color: var(--bad); border-color: var(--bad); }
.rep-add {
  background: none; border: 1px dashed var(--gold); color: var(--gold); border-radius: 8px;
  padding: 8px 18px; cursor: pointer; font: inherit; font-size: 14px; margin-top: 10px;
}

/* money table */
.money-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 14px; }
.money-col h4 { font-family: var(--font-display); font-size: 16.5px; margin: 0 0 10px; color: var(--ink); }
.money-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.money-row label { flex: 1; font-size: 14px; min-width: 0; }
.money-row input {
  width: 128px; flex: none; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font: inherit; font-size: 14.5px; color: var(--ink); text-align: end;
  font-variant-numeric: tabular-nums;
}
.money-total {
  display: flex; justify-content: space-between; border-top: 1.5px solid var(--gold);
  margin-top: 10px; padding-top: 8px; font-weight: 700; font-size: 15px;
}
.money-total output { font-variant-numeric: tabular-nums; color: var(--gold); }

/* signature */
.sig-wrap { margin-top: 8px; }
.sig-canvas {
  width: 100%; max-width: 440px; height: 140px; background: var(--bg);
  border: 1px dashed var(--gold-soft); border-radius: 10px; touch-action: none; cursor: crosshair; display: block;
}
.sig-clear { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; margin-top: 6px; }

/* documents / uploads */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--bg);
}
.doc-item .doc-name { flex: 1; font-size: 14.5px; min-width: 180px; }
.doc-item .doc-state { font-size: 13px; color: var(--good); font-weight: 600; }
.doc-item .up-btn {
  background: none; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px;
  padding: 5px 16px; cursor: pointer; font: inherit; font-size: 13.5px;
}
.doc-fallback { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* applicant photo */
.photo-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.photo-preview {
  width: 132px; height: 132px; object-fit: cover; border-radius: 50%;
  border: 2px solid var(--gold-soft); background: var(--bg);
}
.photo-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.photo-status { color: var(--good); font-weight: 700; font-size: 14px; }
.photo-video { width: 100%; max-width: 380px; border-radius: 12px; border: 1px solid var(--line); display: block; margin-bottom: 10px; }
.photo-cam { margin-top: 4px; }

/* declarations */
.decl label { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin-bottom: 10px; cursor: pointer; }
.decl input { accent-color: var(--gold); width: 17px; height: 17px; margin-top: 3px; flex: none; }

.wiz-error { color: var(--bad); font-weight: 600; font-size: 14.5px; margin: 16px 0 0; }
.invalid-item { border: 1.5px solid var(--bad) !important; background: color-mix(in srgb, var(--bad) 7%, var(--bg)) !important; border-radius: 9px; }
.decl label.invalid-item { padding: 8px 10px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }

@media (max-width: 640px) {
  .f-grid, .money-cols { grid-template-columns: 1fr; }
  .rep-row { grid-template-columns: 1fr 1fr; }
  .rep-row .f-field:first-child { grid-column: 1 / -1; }
  .wiz-body { padding: 20px 16px; }
}
