/* ============================================================================
   EcuTunerx — Order / intake flow
   ========================================================================== */
.order-wrap { padding-top: 130px; padding-bottom: var(--sp-9); min-height: 100vh; }
.order-grid { display: grid; grid-template-columns: 1fr 360px; gap: var(--sp-7); align-items: start; }
@media (max-width: 960px) { .order-grid { grid-template-columns: 1fr; } .order-summary { order: -1; } }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-7); }
.stepper__node { display: flex; align-items: center; gap: 10px; }
.stepper__dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--font-mono); font-size: 0.8rem; background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: all var(--dur); }
.stepper__node.is-active .stepper__dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--glow-cyan); }
.stepper__node.is-done .stepper__dot { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.stepper__label { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stepper__node.is-active .stepper__label { color: var(--text); }
.stepper__line { flex: 1; height: 1px; background: var(--line); min-width: 14px; }
.stepper__node.is-done + .stepper__line { background: var(--accent); }
@media (max-width: 700px) { .stepper__label { display: none; } .stepper__line { min-width: 8px; } }

/* Steps */
.ostep { display: none; }
.ostep.is-active { display: block; animation: ostepIn .45s var(--ease-out); }
@keyframes ostepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ostep__title { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.3rem,1rem+1.4vw,1.9rem); letter-spacing: 0.03em; }
.ostep__sub { color: var(--muted); margin-top: 10px; margin-bottom: var(--sp-6); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.form-grid .col-2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form-grid .col-2 { grid-column: span 1; } }

/* Selectable stage / goal chips */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); transition: all var(--dur); }
.choice:hover .choice__box { border-color: var(--line-strong); }
.choice input:checked + .choice__box { border-color: transparent; box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-md); background: var(--surface-2); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice__no { font-family: var(--font-display); font-size: 1rem; width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--bg-2); color: var(--muted); flex: none; }
.choice input:checked + .choice__box .choice__no { background: var(--accent); color: var(--accent-ink); }
.choice__name { font-weight: 600; }
.choice__desc { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.choice__price { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--accent); }

/* Auto-detected vehicle spec panel */
.veh-spec { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; padding: 16px 18px;
  border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
  position: relative; overflow: hidden; }
.veh-spec::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad-thermal); }
.veh-spec__item { display: flex; flex-direction: column; gap: 3px; }
.veh-spec__item i { font-style: normal; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.veh-spec__item b { font-size: var(--fs-sm); color: var(--text); font-weight: 600; }
#specTier.badge--cyan { background: var(--accent-soft); color: var(--accent); }
#specTier.badge--amber { background: var(--accent-2-soft); color: var(--accent-2); }
#specTier.badge--hot { background: var(--hot-soft); color: var(--hot); }

/* VIN-first vehicle entry */
.vin-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.vin-field { position: relative; flex: 1; min-width: 220px; display: flex; align-items: center; margin: 0; }
.vin-input { font-family: var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; padding-right: 58px; }
.vin-input::placeholder { letter-spacing: 0.1em; }
.vin-count { position: absolute; right: 16px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); pointer-events: none; }
.vin-input.is-valid { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(56,232,160,0.12); }
.vin-input.is-valid + .vin-count { color: var(--ok); }
.vin-altlink { margin-top: 12px; background: none; border: none; color: var(--accent); font-family: var(--font-mono); font-size: var(--fs-xs); cursor: pointer; letter-spacing: 0.03em; padding: 4px 0; }
.vin-altlink:hover { text-decoration: underline; }
.vin-status { margin-top: var(--sp-4); }
.vin-loading { display: flex; align-items: center; gap: 12px; color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-sm); }
.vin-loading .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.vin-error { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--hot-soft); border: 1px solid rgba(255,45,85,0.22); color: var(--text-dim); font-size: var(--fs-sm); }

.car-candidates { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-4); }
.car-cand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: border-color var(--dur), background var(--dur), transform var(--dur); }
.car-cand:hover { border-color: var(--accent); background: var(--surface-2); transform: translateX(3px); }
.car-cand__name { font-weight: 600; font-size: var(--fs-sm); }
.car-cand__chev { color: var(--muted); }

/* confirmed vehicle card */
.veh-confirm { margin-top: var(--sp-5); border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface-2); padding: var(--sp-5); position: relative; overflow: hidden; animation: ostepIn .4s var(--ease-out); }
.veh-confirm::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-thermal); }
.veh-confirm--no::before { background: var(--hot); }
.veh-confirm__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.veh-confirm__title { font-family: var(--font-display); text-transform: uppercase; font-size: 1.15rem; letter-spacing: 0.03em; color: var(--text); }
.veh-confirm__sub { color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-xs); margin-top: 5px; }
.veh-confirm__badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.veh-confirm__specs { margin-top: var(--sp-5); display: flex; flex-wrap: wrap; gap: 16px 26px; }
.veh-confirm__spec { display: flex; flex-direction: column; gap: 3px; }
.veh-confirm__spec i { font-style: normal; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.veh-confirm__spec b { font-size: var(--fs-sm); color: var(--text); font-weight: 600; }
.veh-confirm__note { margin-top: var(--sp-4); color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.veh-confirm__change { margin-top: var(--sp-4); }

.goal-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.goal { cursor: pointer; }
.goal input { position: absolute; opacity: 0; }
.goal__chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-sm); transition: all var(--dur); }
.goal input:checked + .goal__chip { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* File upload */
.upload { border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); padding: var(--sp-7); text-align: center;
  background: var(--surface); transition: all var(--dur); cursor: pointer; }
.upload:hover, .upload.is-drag { border-color: var(--accent); background: var(--surface-2); }
.upload input { display: none; }
.upload__icon { width: 54px; height: 54px; margin: 0 auto var(--sp-4); border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.upload__icon svg { width: 26px; height: 26px; }
.upload__title { font-weight: 600; }
.upload__hint { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; }
.upload__file { margin-top: var(--sp-4); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--accent); }

/* Waiver gate */
.waiver { border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); padding: var(--sp-5); max-height: 220px; overflow-y: auto; }
.waiver h4 { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.waiver p { color: var(--text-dim); font-size: var(--fs-sm); line-height: 1.6; margin-bottom: 10px; }
.consents { display: flex; flex-direction: column; gap: 14px; margin-top: var(--sp-5); }
.consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.consent input { position: absolute; opacity: 0; }
.consent__box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; margin-top: 1px; transition: all var(--dur); }
.consent__box svg { width: 15px; height: 15px; color: var(--accent-ink); opacity: 0; transform: scale(0.5); transition: all var(--dur); }
.consent input:checked + .consent__box { background: var(--accent); border-color: var(--accent); }
.consent input:checked + .consent__box svg { opacity: 1; transform: scale(1); }
.consent input:focus-visible + .consent__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent__text { font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.5; }

/* Nav buttons */
.ostep__nav { display: flex; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-7); }
.ostep__nav .btn[disabled] { opacity: 0.4; pointer-events: none; }

/* Summary aside */
.order-summary { position: sticky; top: 110px; }
.summary-card { padding: var(--sp-6); }
.summary-card h3 { font-size: 1.1rem; margin-bottom: var(--sp-4); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.summary-row:last-of-type { border-bottom: none; }
.summary-row .k { color: var(--muted); }
.summary-row .v { color: var(--text); text-align: right; font-weight: 500; }
.summary-note { margin-top: var(--sp-4); font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

/* Success */
.success { text-align: center; padding: var(--sp-8) var(--sp-5); }
.success__icon { width: 84px; height: 84px; margin: 0 auto var(--sp-5); border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; box-shadow: var(--glow-cyan); }
.success__icon svg { width: 40px; height: 40px; }
.success__steps { text-align: left; max-width: 460px; margin: var(--sp-6) auto 0; display: flex; flex-direction: column; gap: 12px; }
.success__steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-dim); font-size: var(--fs-sm); }
.success__steps .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.7rem; }
.err { color: var(--danger); font-size: var(--fs-xs); margin-top: 6px; min-height: 1em; }
