/* ==========================================================
   Vendor Onboarding - horizontal one-screen wizard
   ========================================================== */
:root {
  /* Ind-Swift logo palette */
  --brand: #2f2b60;        /* navy (bird / wordmark) */
  --brand-2: #4b46a3;      /* lighter indigo for gradients */
  --brand-dark: #211e48;
  --brand-soft: #eef0fb;
  --sky: #5dd1f6;          /* globe blue */
  --sky-2: #2bb4e6;
  --sky-pale: #b6e5f9;
  --sky-soft: #e8f8fe;
  --green: #00a859;        /* tagline green */
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7ef;
  --field: #ffffff;
  --bg: #f5f6fa;
  --ok: #00a859;
  --ok-soft: #e6f7ee;
  --bad: #d92d20;
  --bad-soft: #fef1f0;
  --r: 14px;
  --ease: cubic-bezier(.65, 0, .35, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
.req { color: #e5484d; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .06em; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 340px 1fr; height: 100vh; height: 100dvh; }

/* ---------- Side panel ---------- */
.side {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(90% 55% at 0% 100%, rgba(93,209,246,.30) 0%, rgba(93,209,246,0) 65%),
    radial-gradient(70% 45% at 100% 0%, rgba(182,229,249,.16) 0%, rgba(182,229,249,0) 70%),
    linear-gradient(165deg, #25225a 0%, #2f2b60 50%, #1b1942 100%);
  padding: 34px 30px 26px; display: flex; flex-direction: column; gap: 26px;
}
.side-art { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--sky); opacity: .16; pointer-events: none; }
.side > :not(.side-art) { position: relative; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .01em; }
.brand img { height: 38px; }
.logo-card { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 1px rgba(93,209,246,.25); }
.logo-card img { display: block; height: 128px; width: auto; }
.tagline { font-style: italic; font-weight: 700; font-size: 12.5px; color: #3ddc8f; letter-spacing: .01em; margin-bottom: 6px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: linear-gradient(135deg, var(--sky), var(--sky-2)); box-shadow: 0 6px 18px rgba(93,209,246,.4);
}
.side-title { font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin: 26px 0 10px; }
.side-title span { background: linear-gradient(90deg, var(--sky-pale), var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side-sub { color: #c4c9d4; font-size: 14px; margin: 0; max-width: 270px; }

/* step rail */
.rail { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.rail li { position: relative; }
.rail li:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 42px; bottom: -6px; width: 2px; border-radius: 2px;
  background: rgba(255,255,255,.12);
}
.rail li.done:not(:last-child)::after { background: linear-gradient(var(--sky), var(--sky-2)); }
.rail button {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 7px 8px 7px 0; cursor: pointer; border-radius: 12px; min-height: 48px;
}
.rail button:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.rail li.locked button { cursor: not-allowed; }
.rail-dot {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 2px solid rgba(255,255,255,.22); color: #aab1bf; font-weight: 700; font-size: 13px;
  transition: all .35s var(--ease); background: rgba(255,255,255,.03);
}
.rail-tick { width: 18px; height: 18px; stroke-width: 3; display: none; }
.rail-txt strong { display: block; font-size: 14px; font-weight: 600; color: #d6dae2; transition: color .3s; }
.rail-txt small { display: block; font-size: 12px; color: #8b93a3; }
.rail li.active .rail-dot { border-color: var(--sky); color: #fff; background: rgba(93,209,246,.15); box-shadow: 0 0 0 6px rgba(93,209,246,.12); }
.rail li.active .rail-txt strong { color: #fff; }
.rail li.done .rail-dot { background: linear-gradient(135deg, var(--sky), var(--sky-2)); border-color: transparent; color: var(--brand-dark); }
.rail li.done .rail-n { display: none; }
.rail li.done .rail-tick { display: block; }
.rail li.has-error .rail-dot { border-color: #ff8a80; color: #ff8a80; background: rgba(217,45,32,.18); }
.rail li.has-error .rail-txt small { color: #ff8a80; }
.side-foot { font-size: 12.5px; color: #8b93a3; }
.side-foot a { color: #e5e7eb; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.35); }

/* ---------- Main ---------- */
.main {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  padding: 26px clamp(24px, 4vw, 64px) 22px;
  background:
    radial-gradient(60% 45% at 100% 0%, rgba(93,209,246,.12), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(47,43,96,.05), transparent 70%),
    var(--bg);
}
.main > .topbar, .main > .banner, .main > form { width: 100%; max-width: 1060px; margin-left: auto; margin-right: auto; }
.topbar { display: flex; align-items: center; gap: 22px; margin-bottom: 14px; }
.counter { font-weight: 800; font-size: 22px; letter-spacing: -.02em; min-width: 78px; }
.counter em { font-style: normal; font-weight: 600; font-size: 14px; color: var(--muted); margin-left: 4px; }
.progress { flex: 1; height: 6px; border-radius: 99px; background: #e6e8f0; overflow: hidden; }
.progress span { display: block; height: 100%; width: 14%; border-radius: inherit; background: linear-gradient(90deg, var(--sky), var(--brand)); transition: width .6s var(--ease); }
.req-note { font-size: 13px; color: var(--muted); }
.banner { background: var(--bad-soft); color: var(--bad); border: 1px solid #fbd0cc; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; }

form#vendorForm { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.viewport { flex: 1; min-height: 0; overflow: hidden; position: relative; margin: 0 -8px; }
.track { display: flex; height: 100%; transition: transform .6s var(--ease); will-change: transform; }
.slide {
  flex: 0 0 100%; min-width: 0; height: 100%; overflow-y: auto; padding: 10px 8px 16px;
  opacity: .15; transform: scale(.97); transition: opacity .5s var(--ease), transform .6s var(--ease);
  scrollbar-width: thin;
}
.slide.active { opacity: 1; transform: none; }
@media (min-width: 901px) {
  .slide { display: flex; flex-direction: column; }
  .slide > :first-child { margin-top: auto; }      /* vertically centre, but stay scrollable */
  .slide > :last-child { margin-bottom: auto; }
}
.slide > * { max-width: 980px; }

.slide-head { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.slide[data-step="6"] .slide-head { margin-bottom: 14px; }
.slide[data-step="6"] .big-n { font-size: 56px; }
.big-n {
  font-size: 76px; font-weight: 800; line-height: .85; letter-spacing: -.04em; color: transparent;
  -webkit-text-stroke: 1.5px var(--sky-2); flex: none;
}
.slide-head h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.slide-head p { margin: 2px 0 0; color: var(--muted); }

/* ---------- Fields ---------- */
.grid { display: grid; gap: 18px 22px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.hint { font-weight: 500; color: var(--muted); font-size: 12px; }
.link { all: unset; margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--sky-2); cursor: pointer; }
.link:hover { text-decoration: underline; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%; height: 50px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--field);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: #a3a9b6; }
input:hover { border-color: #cfd4df; }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47,43,96,.1); }
input.upper { text-transform: uppercase; }
input.upper::placeholder { text-transform: none; }
input[type=date] { padding-right: 12px; }
.affix { display: flex; align-items: stretch; }
.affix span { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: #eef0f5; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.affix input { border-radius: 0 12px 12px 0; }
.affix.no-prefix span { display: none; }
.affix.no-prefix input { border-radius: 12px; }
.is-invalid, input.is-invalid { border-color: var(--bad) !important; }
input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(217,45,32,.12); }
.field-error { color: var(--bad); font-size: 12.5px; font-weight: 500; }

/* pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input, .cat input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pill span {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 99px;
  background: #fff; border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink-2);
  transition: all .2s var(--ease);
}
.pill:hover span { border-color: var(--sky); color: var(--brand); }
.pill input:checked + span { background: linear-gradient(135deg, var(--brand-2), var(--brand)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(47,43,96,.28); }
.pill input:focus-visible + span { box-shadow: 0 0 0 4px rgba(47,43,96,.18); }
.pills.is-invalid .pill span { border-color: #f3b0aa; }

/* category cards */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; border-radius: var(--r); }
.cat { position: relative; cursor: pointer; }
.cat-card {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; height: 104px; padding: 16px;
  border-radius: var(--r); background: #fff; border: 1.5px solid var(--line); transition: all .25s var(--ease);
}
.cat-card svg { flex: none; width: 30px; height: 30px; color: #9aa1af; stroke-width: 1.6; transition: color .25s; }
.cat-card b { font-size: 15px; }
.cat:hover .cat-card { border-color: #a9d9f0; transform: translateY(-2px); }
.cat input:checked + .cat-card { border-color: var(--brand); background: var(--sky-soft); box-shadow: 0 8px 22px rgba(47,43,96,.14); }
.cat input:checked + .cat-card svg { color: var(--brand); }
.cat input:checked + .cat-card::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat;
}
.cat input:focus-visible + .cat-card { box-shadow: 0 0 0 4px rgba(47,43,96,.18); }
.cat-grid.is-invalid .cat-card { border-color: #f3b0aa; }

/* documents */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.drop {
  position: relative; display: flex; align-items: center; gap: 16px; min-height: 112px; padding: 18px 20px;
  border: 2px dashed #d6dae4; border-radius: 18px; background: #fff; cursor: pointer; transition: all .25s var(--ease);
}
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop:hover, .drop.dragover { border-color: var(--sky-2); background: var(--sky-soft); }
.drop:focus-within { box-shadow: 0 0 0 4px rgba(47,43,96,.15); }
.drop-ico { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky-2); transition: all .25s; }
.drop-ico svg { width: 24px; height: 24px; }
.drop .i-ok { display: none; stroke-width: 3; }
.drop-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.drop-txt b { font-size: 14.5px; line-height: 1.35; }
.drop-file { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop.has-file { border-style: solid; border-color: #8fd8b3; background: var(--ok-soft); }
.drop.has-file .drop-ico { background: var(--ok); color: #fff; }
.drop.has-file .i-up { display: none; }
.drop.has-file .i-ok { display: block; }
.drop.has-file .drop-file { color: var(--ok); font-weight: 600; }
.drop.is-invalid { border-color: var(--bad); background: var(--bad-soft); }
.drop.optional .doc-star { display: none; }
.drop.optional b::after { content: "Optional"; margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--muted); background: #eef0f5; padding: 2px 8px; border-radius: 99px; vertical-align: 1px; }

/* review */
.review { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.rv { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 11px 14px; min-width: 0; }
.rv h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.rv h4 button { all: unset; cursor: pointer; color: var(--sky-2); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.rv dl { margin: 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 2px 10px; font-size: 12.5px; line-height: 1.45; }
.rv dt { color: var(--muted); white-space: nowrap; }
.rv dd { margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv dd.empty { color: #b3b8c3; font-weight: 500; }
.rv dd.ok { color: var(--ok); }

.declare { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); }
.declare .field { width: 300px; flex: none; }
.declare-date { flex: none; font-weight: 600; font-size: 13px; color: var(--muted); padding: 0 10px; }
.check { flex: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; position: relative; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #c9ceda; flex: none; display: grid; place-items: center; transition: all .2s; background: #fff; }
.check .box svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3.5; opacity: 0; transform: scale(.5); transition: all .2s; }
.check input:checked + .box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .box svg { opacity: 1; transform: none; }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(47,43,96,.18); }
.check.is-invalid .box { border-color: var(--bad); }

/* ---------- Nav buttons ---------- */
.navbar { display: flex; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.kbd-hint { margin-right: auto; margin-left: 6px; font-size: 12.5px; color: var(--muted); }
kbd { font: 600 11px/1 ui-monospace, Consolas, monospace; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; padding: 3px 6px; border-radius: 5px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 26px;
  border-radius: 13px; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2.5; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand-2) -20%, var(--brand) 60%); box-shadow: 0 10px 24px rgba(47,43,96,.28), inset 0 -2px 0 rgba(93,209,246,.55); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(47,43,96,.36); }
.btn-primary:active { transform: none; }
.btn-primary:disabled { opacity: .7; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: var(--ink-2); padding: 0 14px; }
.btn-ghost:hover { background: #eceef4; }
.btn-ghost:disabled { opacity: 0; pointer-events: none; }
.btn-submit { padding: 0 30px; }

/* ---------- Done ---------- */
.success { margin: auto; text-align: center; max-width: 520px; padding: 20px; animation: rise .7s var(--ease) both; }
.success h2 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 10px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--green); margin: 0; }
.success-burst { position: relative; width: 104px; height: 104px; margin: 0 auto 24px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2fd183, var(--ok)); color: #fff; box-shadow: 0 16px 40px rgba(0,168,89,.32); }
.success-burst::before, .success-burst::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid rgba(0,168,89,.25); animation: ring 2.4s ease-out infinite; }
.success-burst::after { animation-delay: 1.2s; }
.success-burst svg { width: 48px; height: 48px; stroke-width: 3; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .3s ease forwards; }
.ref-chip { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; margin: 18px 0; padding: 16px 30px; border-radius: 18px; cursor: pointer; background: #fff; border: 1.5px dashed var(--sky); font: 800 28px/1.1 ui-monospace, Consolas, monospace; letter-spacing: .06em; color: var(--brand); transition: background .2s; }
.ref-chip small { font: 500 11.5px "Plus Jakarta Sans", sans-serif; letter-spacing: 0; color: var(--muted); }
.ref-chip:hover { background: var(--sky-soft); }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes ring { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } }
.shake { animation: shake .45s; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .shell { grid-template-columns: 290px 1fr; }
  .side { padding: 28px 24px 22px; }
  .side-title { font-size: 28px; }
  .review { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 760px) and (min-width: 901px) {
  .logo-card img { height: 84px; }
  .logo-card { padding: 6px 10px; border-radius: 14px; }
  .side-sub { display: none; }
  .side-title { margin-top: 14px; }
  .rail-txt small { display: none; }
  .rail button { min-height: 42px; }
  .slide-head { margin-bottom: 18px; }
  .big-n { font-size: 60px; }
  .slide-head h2 { font-size: 24px; }
  .grid { gap: 14px 20px; }
  input, select { height: 46px; }
  .pill span { height: 40px; }
  .cat-card { height: 88px; }
  .drop { min-height: 96px; }
  .main { padding-top: 20px; }
}
@media (max-width: 900px) {
  .shell { display: block; height: auto; }
  .side { padding: 18px 18px 16px; gap: 14px; }
  .side-title, .side-sub, .side-foot, .rail-txt { display: none; }
  .logo-card img { height: 56px; }
  .logo-card { padding: 4px 8px; border-radius: 12px; }
  .rail { flex-direction: row; justify-content: space-between; }
  .rail li { flex: 1; display: flex; justify-content: center; }
  .rail li:not(:last-child)::after { left: calc(50% + 22px); right: calc(-50% + 22px); top: 24px; bottom: auto; width: auto; height: 2px; }
  .rail button { width: auto; padding: 6px; }
  .rail-dot { width: 34px; height: 34px; }
  .main { padding: 18px 16px 16px; min-height: calc(100dvh - 130px); }
  .viewport { overflow: hidden; }
  .track { height: auto; align-items: flex-start; }
  .slide { height: auto; overflow: visible; }
  .slide:not(.active) { height: 0; overflow: hidden; }
  .slide-head { gap: 14px; margin-bottom: 18px; }
  .big-n { font-size: 52px; }
  .slide-head h2 { font-size: 21px; }
  .g2, .g3, .docs, .review { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .declare { flex-direction: column; align-items: stretch; }
  .declare .field { width: 100%; }
  .kbd-hint, .req-note { display: none; }
  .navbar { position: sticky; bottom: 0; background: var(--bg); padding-bottom: 6px; }
  .navbar .btn-primary { flex: 1; }
  .success h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
