:root {
  --orange: #f18423;
  --orange-dark: #d56d10;
  --orange-soft: #fff3e8;
  --orange-ring: rgba(241, 132, 35, 0.18);
  --black: #111111;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --line: #e6e2dd;
  --bg: #f6f4f1;
  --card: #ffffff;
  --error: #c62828;
  --error-soft: #fdecea;
  --ok: #1b7f3b;
  --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.hero {
  background: var(--black);
  color: #fff;
  padding: 40px 20px 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px; top: -140px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241,132,35,.35), rgba(241,132,35,0) 70%);
}
.hero-inner {
  max-width: 920px; margin: 0 auto;
  display: flex; align-items: center; gap: 22px;
  position: relative; z-index: 1;
}
.hero-logo {
  width: 72px; height: 72px; object-fit: contain;
  background: #fff; border-radius: 18px; padding: 8px;
}
.eyebrow { margin: 0; color: var(--orange); font-weight: 600; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.hero h1 { margin: 2px 0 4px; font-size: 32px; font-weight: 700; letter-spacing: -0.5px; }
.hero-sub { margin: 0; color: #bdbdbd; font-size: 14px; }
.req { color: var(--orange); }

/* ---------- Layout ---------- */
.shell { max-width: 920px; margin: -64px auto 40px; padding: 0 16px; position: relative; z-index: 2; }

.card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(17,17,17,.08);
  padding: 40px;
}

/* ---------- Stepper ---------- */
.stepper {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 22px 40px 18px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(17,17,17,.06);
}
.stepper + .card { border-radius: 0 0 20px 20px; }
.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.progress-bar { height: 100%; width: 20%; background: var(--orange); transition: width .35s ease; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 8px; }
.stepper li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; cursor: default; }
.stepper li.done { cursor: pointer; }
.dot {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  border: 2px solid var(--line); background: #fff; color: var(--muted);
  transition: all .2s;
}
.stepper li.active { color: var(--black); }
.stepper li.active .dot { border-color: var(--orange); background: var(--orange); color: #fff; }
.stepper li.done .dot { border-color: var(--black); background: var(--black); color: #fff; }
.stepper li.done:hover .step-label { color: var(--orange-dark); }

/* ---------- Steps ---------- */
.step { display: none; animation: fade .3s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h2 { font-size: 20px; margin: 0 0 18px; font-weight: 600; color: var(--black); }
h2.sub { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
h3 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); margin-top: -8px; }

.hint-box {
  background: var(--orange-soft); border-left: 4px solid var(--orange);
  padding: 12px 16px; border-radius: 8px; font-size: 14px; margin: 0 0 22px;
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; margin-bottom: 20px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.full { grid-column: 1 / -1; }

fieldset { border: 0; padding: 0; margin: 0; }
label, legend { font-size: 14px; font-weight: 500; color: var(--ink); }
legend { padding: 0; margin-bottom: 7px; }
small { font-weight: 400; color: var(--muted); font-size: 12px; }

input, select, textarea {
  font: inherit; font-size: 14px; color: var(--ink);
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
textarea { resize: vertical; min-height: 100px; }
input:hover, select:hover, textarea:hover { border-color: #cfc8c0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-ring); }
input[readonly] { background: var(--bg); }

.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); background: #fffafa; }
.error-msg { color: var(--error); font-size: 12.5px; font-weight: 500; }
.field.invalid .chips, .field.invalid .segmented, .field.invalid .dropzone { outline: 1.5px solid var(--error); outline-offset: 4px; border-radius: 10px; }

.counter { font-size: 12px; color: var(--muted); align-self: flex-end; }

.inline-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; cursor: pointer; }
.inline-check input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--orange); padding: 0; }

.badge {
  align-self: flex-start; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  background: var(--black); color: #fff;
}
.badge.local { background: var(--orange-soft); color: var(--orange-dark); }

.follow-up { margin-top: 4px; }

/* ---------- Chips (multi-select) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; pointer-events: none; margin: 0; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 99px;
  font-size: 14px; font-weight: 500; cursor: pointer; user-select: none;
  transition: all .15s; background: #fff;
}
.chip span::before {
  content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #bdb5ac; transition: all .15s;
}
.chip:hover span { border-color: var(--orange); }
.chip input:checked + span { background: var(--black); border-color: var(--black); color: #fff; }
.chip input:checked + span::before {
  border-color: var(--orange); background: var(--orange)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--orange-ring); }
.other-input { margin-top: 12px; }

/* ---------- Segmented Yes/No ---------- */
.segmented { align-self: flex-start; display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; background: #fff; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 8px 26px; border-radius: 9px; cursor: pointer; font-weight: 500; transition: all .15s; }
.segmented input:checked + span { background: var(--orange); color: #fff; }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px var(--orange-ring); }

/* ---------- Salary input group ---------- */
.input-group { display: flex; }
.input-group select { width: 96px; flex: none; border-radius: 10px 0 0 10px; border-right: 0; background-color: var(--bg); }
.input-group input { border-radius: 0 10px 10px 0; }

/* ---------- Dropzone ---------- */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 18px; border: 2px dashed #d7cfc6; border-radius: var(--radius);
  background: #fcfbf9; text-align: center; cursor: pointer; transition: all .2s; font-weight: 400;
}
.dropzone:hover, .dropzone.drag { border-color: var(--orange); background: var(--orange-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: #f1f9f3; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-icon { color: var(--orange); }
.dz-text { font-size: 14px; color: var(--muted); word-break: break-all; }
.dz-text strong { color: var(--ink); }

/* ---------- Review ---------- */
.review { display: grid; gap: 14px; margin-bottom: 28px; }
.review-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-head h3 { margin: 0; font-size: 15px; }
.review-head button { background: none; border: 0; color: var(--orange-dark); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.review-head button:hover { background: var(--orange-soft); }
.review dl { margin: 0; display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 16px; font-size: 14px; }
.review dt { color: var(--muted); }
.review dd { margin: 0; font-weight: 500; word-break: break-word; }

.declaration { background: var(--bg); border-radius: var(--radius); padding: 22px; }
.declaration .grid { margin: 18px 0 0; }

/* ---------- Privacy ---------- */
.hero-privacy { margin: 10px 0 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #e9e9e9; background: rgba(255,255,255,.08); padding: 5px 12px; border-radius: 99px; }
.hero-privacy svg { color: var(--orange); }
.privacy { border: 1.5px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.privacy-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--orange-dark); }
.privacy-head h3 { margin: 0; color: var(--black); }
.privacy ul { margin: 0 0 16px; padding-left: 18px; font-size: 13.5px; color: #3d3d3d; display: grid; gap: 6px; }
.privacy a, .foot a { color: var(--orange-dark); font-weight: 500; }
.privacy .field + .field { margin-top: 10px; }
.declaration .field:first-of-type { margin-bottom: 0; }

/* ---------- Actions ---------- */
.form-error { background: var(--error-soft); color: var(--error); padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-top: 8px; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.btn {
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 14px 30px; border-radius: 12px; border: 0; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn.primary { background: var(--orange); color: #fff; margin-left: auto; }
.btn.primary:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(241,132,35,.3); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--black); }
.btn:disabled { background: #b9b2aa; cursor: not-allowed; transform: none; box-shadow: none; }
.btn[hidden] { display: none; }

.spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Success ---------- */
.success { text-align: center; padding: 56px 32px; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; }
.success p { max-width: 520px; margin: 0 auto 26px; color: var(--muted); }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero { padding: 28px 16px 84px; }
  .hero h1 { font-size: 26px; }
  .hero-logo { width: 56px; height: 56px; border-radius: 14px; }
  .card { padding: 26px 18px; }
  .stepper { padding: 18px; }
  .step-label { display: none; }
  .stepper li.active .step-label { display: inline; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .review dl { grid-template-columns: 1fr; gap: 0 0; }
  .review dd { margin-bottom: 8px; }
  .btn { padding: 13px 20px; }
}
