/*
   The site's own pages that the WiAutomation reference does not show (an order's page and
   its quotation, favourites, saved lists, BOM upload): their earlier layout, kept and
   recoloured to the reference's palette. The earlier tokens these rules use are mapped
   here onto the new ones (docs/wiautomation-reference/17-current-vs-reference-gap.md).
*/

:root {
  --brand-50: #eaf9f9; --brand-100: #d4f1f1; --brand-200: #a9e3e3; --brand-300: #7ed5d5; --brand-400: #55cdcd;
  --brand-500: #31c7c7; --brand-600: #27a9a9; --brand-700: #1f8888; --brand-800: #186a6a;
  --n-25: #fafbfb; --n-50: #f3f4f4; --n-100: #eeeff0; --n-300: #cfd3d9; --n-400: #a9adb6;
  --success: #2fae4e; --success-bg: #e5f8ea; --warning: #b9800a; --warning-bg: #fff5d6;
  --danger: #d8463a; --danger-bg: #fde8e6; --info: #126b6b; --info-bg: #d4f1f1;
  --border: var(--c-border); --border-strong: var(--c-border-strong);
  --text: var(--c-text); --text-body: var(--c-text-2); --text-muted: var(--c-text-muted);
  --primary: var(--c-teal); --primary-hover: var(--c-teal-dark); --primary-ink: var(--c-white);
  --surface: var(--c-white); --surface-sunk: var(--c-bg);
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  --lh-tight: 1.25; --lh-snug: 1.4; --lh-base: 1.55;
  --fs-2xs: 10px; --fs-4xl: 30px;
  --r-sm: 2px; --r-md: 4px; --r-lg: 6px; --r-pill: 999px;
  --sh-xs: 0 1px 2px rgba(17, 22, 38, .06); --sh-sm: var(--shadow-card); --sh-md: var(--shadow-pop);
  --dur: .15s; --ease-out: cubic-bezier(.2, .7, .3, 1);
  --focus-ring: 0 0 0 2px var(--c-teal); --header-h: 100px;
}

.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; gap: var(--sp-3); align-items: center; }
.tiny { font-size: var(--fs-xs); }
.strong { font-weight: var(--fw-semibold); color: var(--text); }
.ml-auto { margin-left: auto; }
.text-brand { color: var(--brand-600); }
@media (max-width: 480px) {
  .header-aside .btn--sm { padding-inline: var(--sp-3); }
}
.page-head .breadcrumb { padding-top: 0; }
.account-wide { padding-block: var(--sp-8); }
.auth__points .icon-badge { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: var(--sh-sm); }
.password-field .input { padding-right: 3rem; }
.account-nav__help .icon-badge { margin-bottom: var(--sp-1); background: var(--surface); }
.page-progress.is-done .page-progress__bar { animation: progress-done 680ms var(--ease-out) forwards; }
.btn--primary { background-color: var(--primary); color: var(--primary-ink); background-image: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 60%); box-shadow: 0 1px 2px rgba(10,35,66,.18), inset 0 1px 0 rgba(255,255,255,.16); --spinner: #fff; }
.btn--primary:hover { background-color: var(--primary-hover); box-shadow: 0 10px 22px -8px rgba(14,107,192,.6), inset 0 1px 0 rgba(255,255,255,.16); transform: translateY(-1px); }
.btn--primary:focus-visible { box-shadow: var(--focus-ring), 0 1px 2px rgba(10,35,66,.18); }
.btn--secondary { background: var(--surface); color: var(--brand-700); border-color: var(--border-strong); box-shadow: var(--sh-xs); }
.btn--secondary:hover { background: var(--brand-50); border-color: var(--brand-300); box-shadow: var(--sh-sm); }
.btn--ghost { background: transparent; color: var(--text-body); }
.btn--ghost:hover { background: var(--n-100); color: var(--text); }
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--border-strong); --spinner: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn--invert { background: var(--surface); color: var(--brand-700); box-shadow: 0 1px 2px rgba(7,28,54,.2); }
.btn--invert:hover { background: var(--brand-50); box-shadow: 0 10px 22px -8px rgba(7,28,54,.5); transform: translateY(-1px); }
.btn--sm { min-height: 34px; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); }
.label { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: var(--lh-snug); color: var(--text); }
.label .req { color: var(--danger); margin-left: 2px; }
.label .opt { color: var(--text-muted); font-weight: var(--fw-regular); }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: var(--sp-3) var(--sp-4); background-color: var(--n-25); border: 1px solid var(--border-strong); border-radius: var(--r-md); font-size: var(--fs-base); line-height: 1.4; color: var(--text); box-shadow: inset 0 1px 2px rgba(10,35,66,.04); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.input::placeholder, .textarea::placeholder { color: var(--n-400); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-400); background-color: var(--surface); }
.input:focus, .select:focus, .textarea:focus { outline: none; background-color: var(--surface); border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(22,120,209,.14); }
.textarea { min-height: 148px; line-height: var(--lh-base); resize: vertical; }
.select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px; text-overflow: ellipsis; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236D7A8F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.select:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231678D1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.select:has(> option[value=""]:checked) { color: var(--n-400); }
.select option { color: var(--text); }
.field__control .textarea { padding-bottom: var(--sp-8); }
.field__count { position: absolute; right: var(--sp-3); bottom: var(--sp-2); padding: 2px var(--sp-2); border-radius: var(--r-pill); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; color: var(--text-muted); background: var(--surface); pointer-events: none; }
.field__count.is-near { color: var(--warning); }
.field__count.is-full { color: var(--danger); }
.hint { font-size: var(--fs-xs); color: var(--text-muted); }
.error-text { display: flex; align-items: flex-start; gap: 6px; font-size: var(--fs-xs); line-height: var(--lh-snug); color: var(--danger); }
.error-text:empty, .error-text.validation-summary-valid { display: none; }
.error-text::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 1px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D81E2A' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.field--error .input, .field--error .select, .field--error .textarea { border-color: var(--danger); background-color: #FFFBFB; }
.field--error .input:focus, .field--error .select:focus, .field--error .textarea:focus { box-shadow: 0 0 0 4px rgba(216,30,42,.12); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.check__text { font-size: var(--fs-sm); line-height: 20px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch__track { width: 38px; height: 22px; border-radius: var(--r-pill); background: var(--n-300); transition: background var(--dur) var(--ease); flex: none; }
.switch__track::after { content: ""; display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: #fff; transition: transform var(--dur) var(--ease); }
.switch input:checked + .switch__track { background: var(--brand-500); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--focus-ring); }
.input-group > .select { width: auto; border-radius: var(--r-md) 0 0 var(--r-md); border-right: 0; }
.input-group > .input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.search-bar .select { border: 0; width: auto; min-width: 150px; }
.search-bar .input { border: 0; flex: 1; }
.search-bar .input, .search-bar .select { background-color: transparent; box-shadow: none; }
.search-bar .input:focus, .search-bar .select:focus { box-shadow: none; }
.card__foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); background: var(--n-25); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.icon-badge { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-600); flex: none; }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); padding-block: var(--sp-4); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb [aria-current] { color: var(--text); font-weight: var(--fw-medium); }
.breadcrumb .sep { color: var(--n-300); }
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: var(--fs-sm); }
.table td .row { flex-wrap: nowrap; }
.table td .row > span:last-child { min-width: 0; }
.table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: var(--fw-semibold); padding: var(--sp-3) var(--sp-3); background: var(--n-25); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--n-25); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__part { font-weight: var(--fw-semibold); color: var(--brand-600); }
.step { text-align: center; position: relative; padding-top: var(--sp-10); }
.step::before { content: ""; position: absolute; top: 15px; left: 0; right: 0; height: 2px; background: var(--border); }
.step:first-child::before { left: 50%; }
.step:last-child::before { right: 50%; }
@media (max-width: 860px) {
  .step { padding: 0 0 var(--sp-5) var(--sp-10); text-align: left; }
  .step::before { top: 0; bottom: 0; left: 15px; right: auto; width: 2px; height: auto; }
  .step:first-child::before { top: 16px; left: 15px; }
  .step:last-child::before { bottom: auto; height: 16px; }
}
.alert { display: flex; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-md); font-size: var(--fs-sm); border: 1px solid transparent; }
.alert--info { background: var(--info-bg); border-color: #CBE2F8; color: var(--brand-800); }
.alert--warning { background: var(--warning-bg); border-color: #FBDFB5; color: #7A4A00; }
.alert--danger { background: var(--danger-bg); border-color: #F6C6CB; color: #8E1018; }
.alert svg { flex: none; margin-top: 2px; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--n-25); padding: var(--sp-12) var(--sp-6); text-align: center; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand-400); background: var(--brand-50); }
@media (max-width: 600px) {
  .row { flex-wrap: wrap; }
}
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.kpi { display: grid; gap: var(--sp-3); padding: var(--sp-5); }
.kpi__value { font-size: var(--fs-3xl); font-weight: var(--fw-bold); color: var(--text); line-height: 1; }
.kpi__label { font-size: var(--fs-sm); color: var(--text-body); }
@media (max-width: 1000px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
.kpi-grid > * { min-width: 0; }
.quick-action { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--border); }
.quick-action:last-child { border-bottom: 0; }
.quick-action:hover { background: var(--n-25); text-decoration: none; }
.quick-action > span:not(.icon-badge) { display: flex; flex-direction: column; min-width: 0; }
.quick-action__title { display: block; font-weight: var(--fw-semibold); color: var(--text); font-size: var(--sp-4); }
.quick-action__sub { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.list-row { display: grid; grid-template-columns: 132px 1fr auto auto; gap: var(--sp-5); align-items: center; padding: var(--sp-5); border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--n-25); }
.list-row__main h4 { font-size: var(--fs-lg); margin-bottom: var(--sp-1); display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.list-row__main p { margin-bottom: var(--sp-2); }
@media (max-width: 760px) {
  .list-row { grid-template-columns: 1fr; }
}
.contact-channel .icon-badge { margin-bottom: var(--sp-2); }
.hiw-strip__btn.is-done .hiw-num { background: var(--brand-100); }
.hiw-strip__btn.is-done .hiw-strip__bar::after { transform: scaleX(1); }
.hiw-track .step { padding-top: 48px; }
.hiw-track .step::before { top: 17px; height: 3px; }
.hiw-track .step:not(.step--done):not(.step--current) .step__marker { color: var(--n-300); border-color: var(--n-300); }
.js-motion .hiw-track.is-waiting .step::before { transform: scaleX(0); }
.js-motion .hiw-track.is-drawn .step::before { transform-origin: left; animation: hiw-line 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 260ms); }
.help-card { display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-6); border-radius: var(--r-lg); background: var(--surface-sunk); border: 1px solid var(--brand-100); }
.help-card p { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); }
@media (max-width: 1100px) {
  .hiw-track .step::before { display: none; }
}
@media (max-width: 480px) {
  .help-card { flex-direction: column; }
}
.date-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--sp-2); align-items: center; }
.date-range > span { color: var(--text-muted); }
.kpi-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .kpi-grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .date-range { grid-template-columns: 1fr; }
  .date-range > span { display: none; }
}
.filters__price .input { min-height: 36px; padding: var(--sp-2); font-size: var(--fs-sm); }
.results__tools .select { width: auto; min-height: 42px; }
.avail { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-semibold); }
.avail::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--n-400); flex: none; }
.avail__note { display: block; margin-top: 2px; font-size: var(--fs-xs); font-weight: var(--fw-regular); color: var(--text-muted); }
.buy-box__status .avail { font-size: var(--fs-lg); }
.pd__copy.is-done, [data-share].is-done { color: var(--success); }
.parts-table th { white-space: nowrap; }
.parts-table td { vertical-align: middle; }
.parts-table__check { width: 40px; }
.parts-table__thumb { display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; border-radius: var(--r-md); background: var(--n-100); color: var(--n-400); }
.parts-table__thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.parts-table__pn { display: block; font-weight: var(--fw-semibold); color: var(--brand-600); white-space: nowrap; }
.parts-table__name { display: block; max-width: 26ch; margin-top: 2px; font-size: var(--fs-sm); color: var(--text-body); line-height: var(--lh-snug); }
.parts-table__brand { font-weight: var(--fw-bold); letter-spacing: .02em; color: var(--brand-700); text-transform: uppercase; font-size: var(--fs-xs); }
.parts-table .input--sm { min-width: 130px; }
.parts-table td, .parts-table th { padding-inline: var(--sp-2); }
.parts-table td:first-child, .parts-table th:first-child { padding-left: var(--sp-4); }
.parts-table .avail { font-size: var(--fs-sm); }
.parts-table__unlisted { color: var(--text-muted); font-style: italic; }
.input--sm { height: 38px; padding-inline: var(--sp-3); font-size: var(--fs-sm); }
.basket__empty .icon-badge { width: 64px; height: 64px; margin: 0 auto var(--sp-4); }
.basket__empty .row { justify-content: center; margin-top: var(--sp-5); }
.summary-card__title { display: flex; align-items: center; gap: var(--sp-3); margin: 0; font-size: var(--fs-xl); }
.summary-card__title .i { color: var(--brand-600); }
.summary-list { display: grid; gap: var(--sp-3); margin: 0; padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.summary-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.summary-list dt { color: var(--text-body); }
.summary-list dd { margin: 0; font-weight: var(--fw-bold); font-size: var(--fs-lg); color: var(--text); font-variant-numeric: tabular-nums; }
.summary-eta { display: flex; gap: var(--sp-3); align-items: flex-start; }
.summary-eta > .i { color: var(--brand-600); flex: none; margin-top: 2px; }
.summary-eta__label { margin: 0; color: var(--text-body); }
.summary-eta__value { margin: 0 0 var(--sp-1); font-size: var(--fs-2xl); font-weight: var(--fw-bold); color: var(--brand-600); line-height: 1.2; }
.summary-points .icon-badge { flex: none; background: var(--surface); }
.help-band__points .icon-badge { width: 48px; height: 48px; border-radius: 50%; margin-bottom: var(--sp-2); background: var(--surface); }
.add-request .label { margin-bottom: calc(-1 * var(--sp-2)); }
.review-head { padding-block: var(--sp-6) var(--sp-4); background: linear-gradient(180deg, var(--brand-50), transparent); }
.review-head .breadcrumb { padding-top: 0; }
.review-head h1 { font-size: var(--fs-4xl); line-height: var(--lh-tight); margin: var(--sp-2) 0 var(--sp-3); }
.review-head__lead { max-width: 75ch; font-size: var(--fs-md); color: var(--text-body); }
.flow-steps { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin: var(--sp-6) 0 0; padding: 0; }
.flow-steps__item { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--text-body); }
.flow-steps__item + .flow-steps__item::before { content: ""; width: 40px; height: 2px; background: var(--border-strong); }
.flow-steps__item.is-done + .flow-steps__item::before { background: var(--brand-500); }
.flow-steps__n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-weight: var(--fw-bold); }
.flow-steps__item.is-done .flow-steps__n { background: var(--brand-100); }
.flow-steps__item.is-current { color: var(--brand-700); font-weight: var(--fw-semibold); }
.flow-steps__item.is-current .flow-steps__n { background: var(--brand-600); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
@media (max-width: 900px) {
  .flow-steps__item + .flow-steps__item::before { display: none; }
}
.review { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: var(--sp-6); align-items: start; padding-block: var(--sp-6) var(--sp-12); }
.review__main { display: grid; gap: var(--sp-6); min-width: 0; }
.review__details { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); align-items: stretch; }
.switch__text { display: grid; }
.switch__text .hint { margin: 0; }
.review__side { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.review__flag { display: block; margin-top: var(--sp-1); padding: 2px var(--sp-2); border-radius: var(--r-sm); background: var(--warning-bg); color: var(--warning); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.review__before { background: var(--brand-50); }
.review__help .card__body { display: flex; gap: var(--sp-4); align-items: flex-start; background: var(--brand-50); border-radius: var(--r-lg); }
.review__help h2 { font-size: var(--fs-md); margin-bottom: var(--sp-1); }
.card__title-lg { margin: 0; font-size: var(--fs-xl); }
.card__title-icon { display: flex; align-items: center; gap: var(--sp-3); margin: 0; font-size: var(--fs-lg); }
.card__title-icon .i { color: var(--brand-600); }
.link-arrow { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--brand-600); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-body); }
.check-list li { display: flex; gap: var(--sp-2); }
.check-list li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--success) 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat; }
.address-choice { border: 0; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.address-choice__item { display: flex; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.address-choice__item:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-500); }
.address-choice__item input { margin-top: 3px; accent-color: var(--brand-600); }
.address-choice__body { display: grid; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--text-body); line-height: var(--lh-snug); }
.address-choice__label { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-semibold); color: var(--text); }
@media (max-width: 1100px) {
  .review__details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .review__before { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .review { grid-template-columns: minmax(0, 1fr); }
  .review__side { position: static; }
}
@media (max-width: 700px) {
  .review__details { grid-template-columns: minmax(0, 1fr); }
  .review-head h1 { font-size: var(--fs-3xl); }
}
.dash-kpis { margin-bottom: var(--sp-6); }
a.kpi { color: inherit; text-decoration: none; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
a.kpi:hover { border-color: var(--brand-300); box-shadow: var(--sh-md); }
.kpi__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); }
.kpi--warning .kpi__icon { background: var(--warning-bg); color: var(--warning); }
.kpi--success .kpi__icon { background: var(--success-bg); color: var(--success); }
.kpi--danger .kpi__icon { background: var(--danger-bg); color: var(--danger); }
.kpi .kpi__label { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--text); }
.quick-actions { display: grid; gap: var(--sp-3); padding: var(--sp-4); }
.quick-actions .quick-action { border: 1px solid var(--border); border-radius: var(--r-md); }
.quick-actions .quick-action:last-child { border-bottom: 1px solid var(--border); }
.quick-actions .icon-badge { width: 48px; height: 48px; border-radius: 50%; }
.quick-action__go { margin-left: auto; color: var(--brand-600); flex: none; }
.table--compact { min-width: 0; }
.table--compact td { padding-block: var(--sp-3); }
.badge--dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.activity__empty { padding: var(--sp-6) var(--sp-5); color: var(--text-muted); }
.page-title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.page-title-row .breadcrumb { padding-top: 0; }
.page-title-row > :first-child { flex: 1 1 300px; min-width: 0; }
.page-title { margin: var(--sp-2) 0 var(--sp-1); font-size: var(--fs-3xl); line-height: var(--lh-tight); }
.page-title__lead { margin: 0; color: var(--text-body); font-size: var(--fs-md); }
.filter-card { padding: var(--sp-5); margin-bottom: var(--sp-5); }
.filter-card__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-4); align-items: end; }
.filter-card__actions { grid-column: span 2; display: flex; justify-content: flex-end; gap: var(--sp-3); }
.input-icon { position: relative; display: block; }
.input-icon > .i { position: absolute; left: var(--sp-3); top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-icon > .input { padding-left: 2.5rem; }
.count-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: var(--sp-5); }
.count-tile { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); color: var(--text-body); font-size: var(--fs-sm); text-decoration: none; border-right: 1px solid var(--border); }
.count-tile:last-child { border-right: 0; }
.count-tile:hover { background: var(--n-25); text-decoration: none; }
.count-tile[aria-current="true"] { background: var(--brand-50); }
.count-tile strong { display: block; font-size: var(--fs-2xl); line-height: 1.1; color: var(--brand-700); }
.count-tile__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); }
.count-tile--warning .count-tile__icon { background: var(--warning-bg); color: var(--warning); }
.count-tile--success .count-tile__icon { background: var(--success-bg); color: var(--success); }
.count-tile--info .count-tile__icon { background: var(--info-bg); color: var(--info); }
.count-tile--orange .count-tile__icon { background: #FFF1E3; color: #D9730D; }
.count-tile--danger .count-tile__icon { background: var(--danger-bg); color: var(--danger); }
.table__sub { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.table .badge, .table .link-arrow { white-space: nowrap; }
.list-empty { padding: var(--sp-10) var(--sp-6); text-align: center; color: var(--text-muted); }
.list-empty .icon-badge { width: 56px; height: 56px; margin: 0 auto var(--sp-3); }
@media (max-width: 1200px) {
  .count-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .count-tile:nth-child(3n) { border-right: 0; }
}
@media (max-width: 1000px) {
  .filter-card__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .filter-card__grid, .count-tiles { grid-template-columns: minmax(0, 1fr); }
  .filter-card__actions { grid-column: auto; }
  .count-tile { border-right: 0; border-bottom: 1px solid var(--border); }
}
.track-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.track-head .breadcrumb { padding-top: 0; }
.track-head__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin: var(--sp-2) 0 var(--sp-1); font-size: var(--fs-3xl); line-height: var(--lh-tight); }
.track-head__title .badge { font-size: var(--fs-sm); }
.track-head__sub { margin: 0; color: var(--text-body); }
.track-head__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.track-steps { padding: var(--sp-6) var(--sp-5); margin-bottom: var(--sp-5); }
.milestones { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.milestone { position: relative; display: grid; justify-items: center; gap: var(--sp-1); padding-top: 52px; text-align: center; font-size: var(--fs-sm); color: var(--text-muted); }
.milestone::before { content: ""; position: absolute; top: 19px; left: 0; right: 0; height: 3px; background: var(--border); }
.milestone:first-child::before { left: 50%; }
.milestone:last-child::before { right: 50%; }
.milestone.is-done::before, .milestone.is-current::before { background: var(--brand-600); }
.milestone.is-current::before { background: linear-gradient(90deg, var(--brand-600) 50%, var(--border) 50%); }
.milestone__dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-muted); }
.milestone.is-done .milestone__dot { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.milestone.is-current .milestone__dot { border-color: var(--brand-600); box-shadow: 0 0 0 5px var(--brand-100); }
.milestone.is-current .milestone__dot::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--brand-600); }
.milestone strong { color: var(--text); font-size: var(--fs-base); }
.milestone.is-current strong { color: var(--brand-700); }
.milestone em { font-style: normal; font-size: var(--fs-xs); color: var(--text-muted); max-width: 22ch; }
.milestone.is-current em { color: var(--brand-700); font-weight: var(--fw-semibold); }
.milestone.is-stopped .milestone__dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.milestone.is-stopped strong { color: var(--danger); }
.track-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: var(--sp-5); align-items: start; margin-bottom: var(--sp-6); }
.track-grid__main, .track-grid__side { display: grid; gap: var(--sp-5); min-width: 0; }
.track-grid__main > *, .track-grid__side > *, .review__main > * { min-width: 0; }
.facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-6); margin: var(--sp-4) 0 0; }
.facts-grid dt { font-size: var(--fs-sm); color: var(--text-muted); }
.facts-grid dd { margin: 2px 0 0; font-weight: var(--fw-semibold); color: var(--text); }
.track-note { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-md); background: var(--brand-50); font-size: var(--fs-sm); color: var(--text-body); }
.track-note > .i { flex: none; color: var(--brand-600); margin-top: 2px; }
.outcomes { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: grid; gap: var(--sp-3); font-size: var(--fs-sm); }
.outcomes li { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-body); }
.outcomes strong { margin-left: auto; color: var(--text); }
.outcomes__total { padding-top: var(--sp-3); border-top: 1px solid var(--border); font-weight: var(--fw-semibold); }
.outcomes__dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--n-400); }
.outcomes__dot--success { background: var(--success); }
.outcomes__dot--info { background: var(--info); }
.outcomes__dot--warning { background: var(--warning); }
.outcomes__dot--danger { background: var(--danger); }
.outcomes__dot--violet { background: #6D3FD8; }
.log { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: grid; gap: var(--sp-4); }
.log li { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: var(--sp-3); font-size: var(--fs-sm); color: var(--text-body); }
.log__when { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.4; }
.log strong { display: block; color: var(--text); }
.help-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-8); padding: var(--sp-6) var(--sp-8); border-radius: var(--r-lg); background: linear-gradient(110deg, var(--brand-800), var(--brand-600)); color: #fff; }
.help-cta h2 { margin: 0 0 var(--sp-1); color: #fff; font-size: var(--fs-xl); }
.help-cta p { margin: 0; color: rgba(255,255,255,.82); }
@media (max-width: 1100px) {
  .track-grid { grid-template-columns: minmax(0, 1fr); }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .milestones { grid-auto-flow: row; gap: var(--sp-4); }
  .milestone { justify-items: start; text-align: left; padding: 0 0 0 56px; }
  .milestone::before { top: 0; bottom: 0; left: 19px; right: auto; width: 3px; height: auto; }
  .milestone:first-child::before { top: 20px; left: 19px; }
  .milestone:last-child::before { display: none; }
  .milestone__dot { left: 0; transform: none; }
  .facts-grid { grid-template-columns: minmax(0, 1fr); }
}
.card__title-icon .icon-badge { width: 44px; height: 44px; }
.status-banner { display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-5); margin-bottom: var(--sp-5); border: 1px solid var(--brand-200); border-radius: var(--r-lg); background: var(--brand-50); }
.status-banner > .i { flex: none; color: var(--brand-600); }
.status-banner strong { display: block; font-size: var(--fs-lg); color: var(--text); }
.status-banner span { color: var(--text-body); }
.btn--danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger-solid:hover { background: #B4232C; border-color: #B4232C; color: #fff; }
.review__lock { display: flex; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); color: var(--text-body); }
.review__lock > .i { flex: none; color: var(--brand-600); }
.parts-table__remove { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--danger); white-space: nowrap; cursor: pointer; }
.parts-table__remove input { accent-color: var(--danger); }
tr:has(.parts-table__remove input:checked) td { opacity: .55; }
.parts-table--fit th { white-space: normal; line-height: var(--lh-snug); }
.parts-table--fit .input--sm { min-width: 104px; }
.parts-table--fit .parts-table__thumb { width: 44px; height: 44px; }
.parts-table__remove .i { width: 16px; height: 16px; }
.quote-cta { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); flex: 0 1 480px; min-width: 0; }
.quote-cta strong { display: block; color: var(--text); }
.quote-cta span span { display: block; font-size: var(--fs-sm); color: var(--text-muted); }
.quote-cta .btn { flex: none; }
.count-tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.count-tiles--4 .count-tile:nth-child(3n) { border-right: 1px solid var(--border); }
.count-tiles--4 .count-tile:last-child { border-right: 0; }
.filter-card--inline { display: grid; grid-template-columns: minmax(0, 1fr) 260px auto; gap: var(--sp-3); align-items: center; }
.text-danger { color: var(--danger); }
@media (max-width: 760px) {
  .filter-card--inline, .count-tiles--4 { grid-template-columns: minmax(0, 1fr); }
  .quote-cta { flex-wrap: wrap; }
}
.quote-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: var(--sp-4) var(--sp-5); gap: var(--sp-4); }
.quote-facts > div { display: grid; gap: 2px; padding-right: var(--sp-4); border-right: 1px solid var(--border); }
.quote-facts > div:last-child { border-right: 0; }
.quote-facts span { font-size: var(--fs-sm); color: var(--text-muted); }
.quote-facts strong, .quote-facts .link-arrow { font-size: var(--fs-md); }
.verified-banner { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); background: var(--success-bg); border: 1px solid #BFE5CF; font-size: var(--fs-sm); color: var(--text-body); }
.verified-banner > .i { flex: none; color: var(--success); }
.verified-banner strong { color: #0F6B3A; }
.answer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.answer { display: grid; gap: var(--sp-3); align-content: start; padding: var(--sp-5); }
.answer h2 { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-lg); }
.answer p { margin: 0; font-size: var(--fs-sm); color: var(--text-body); }
.answer--accept { background: #F1FAF4; border-color: #BFE5CF; }
.answer--accept h2 { color: #0F6B3A; }
.answer--reject { background: #FDF3F3; border-color: #F3C9CB; }
.answer--reject h2 { color: var(--danger); }
.answer--revise h2 { color: var(--brand-700); }
.btn--success { background: #12844A; border-color: #12844A; color: #fff; }
.btn--success:hover { background: #0E6E3D; border-color: #0E6E3D; color: #fff; }
.quote-total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.quote-total span { font-weight: var(--fw-semibold); color: var(--text); }
.quote-total strong { font-size: var(--fs-2xl); color: var(--brand-800); }
.quote-terms { display: grid; gap: var(--sp-3); margin: 0; font-size: var(--fs-sm); }
.quote-terms > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--sp-2); }
.quote-terms dt { display: flex; align-items: center; gap: var(--sp-2); color: var(--text-muted); }
.quote-terms dd { margin: 0; color: var(--text); }
.quote-terms dd .text-danger { display: block; }
.quote-note { margin: var(--sp-3) 0 0; padding: var(--sp-4); border-radius: var(--r-md); background: var(--brand-50); white-space: pre-line; font-size: var(--fs-sm); color: var(--text-body); }
.version-table td.is-changed { background: var(--warning-bg); }
@media (max-width: 1100px) {
  .answer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .quote-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-facts > div { border-right: 0; }
}
.kpi-grid--2 { grid-template-columns: repeat(2, 1fr); }
.part-cell { display: flex; align-items: center; gap: var(--sp-3); min-width: 220px; }
.part-cell > span:last-child { min-width: 0; }
.selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.selection-bar__list { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.selection-bar .input--sm { width: 180px; }
.select--sm { height: 38px; padding-block: 0; font-size: var(--fs-sm); width: auto; }
.list-mini { list-style: none; margin: 0; padding: var(--sp-2) var(--sp-5) var(--sp-4); display: grid; }
.list-mini li { display: flex; align-items: center; gap: var(--sp-3); padding-block: var(--sp-3); border-bottom: 1px solid var(--border); }
.list-mini li:last-child { border-bottom: 0; }
.list-mini a { display: grid; color: inherit; text-decoration: none; }
.list-mini strong { color: var(--brand-700); }
.list-mini span:not(.icon-badge) { font-size: var(--fs-sm); color: var(--text-muted); }
.list-rows { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.list-rows .list-row { grid-template-columns: minmax(0, 1fr) auto auto; border: 1px solid var(--border); }
.list-row__main h2 { margin: 0 0 var(--sp-1); font-size: var(--fs-lg); }
.list-row__main h2 a { color: var(--text); }
.list-row__meta { display: flex; flex-wrap: wrap; gap: var(--sp-5); margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.list-row__meta span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.list-row__thumbs { display: flex; gap: var(--sp-2); }
.list-row__more { background: var(--brand-50); color: var(--brand-600); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.list-actions { flex-wrap: wrap; justify-content: flex-start; }
.new-list { margin-bottom: var(--sp-8); }
@media (max-width: 900px) {
  .list-rows .list-row { grid-template-columns: minmax(0, 1fr); }
  .list-row__thumbs { display: none; }
  .kpi-grid--2 { grid-template-columns: 1fr; }
}
.bom-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-5); margin-top: var(--sp-5); }
.bom-title h1 { margin: 0 0 var(--sp-2); }
.bom-template { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); max-width: 560px; }
.bom-template__icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: var(--r-md); background: var(--success-bg); color: var(--success); }
.bom-template strong { display: block; color: var(--text); }
.bom-template span span { display: block; font-size: var(--fs-sm); color: var(--text-muted); }
.bom-template .btn { flex: none; }
@media (max-width: 600px) {
  .bom-template { flex-wrap: wrap; }
}
.bom-drop { display: grid; justify-items: center; gap: var(--sp-3); cursor: pointer; }
.bom-drop:focus-within { border-color: var(--brand-500); box-shadow: var(--focus-ring); }
.bom-drop__file { display: grid; justify-items: center; gap: 2px; width: 64px; padding: var(--sp-3) 0 var(--sp-2); border: 1px solid var(--border-strong); border-radius: var(--r-sm) var(--r-lg) var(--r-sm) var(--r-sm); background: var(--surface); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-body); }
.bom-drop__file span { padding: 1px 6px; border-radius: 3px; background: #12844A; color: #fff; }
.bom-drop__title { font-size: var(--fs-lg); color: var(--text); }
.field--error .bom-drop, .bom-upload .field--error { border-color: var(--danger); }
.bom-tip { display: flex; gap: var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-muted); }
.bom-tip > .i { flex: none; color: #E5A100; }
.bom-tip strong { display: block; color: var(--text); }
.next-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); font-size: var(--fs-sm); color: var(--text-body); }
.next-steps li { display: flex; align-items: center; gap: var(--sp-3); }
.next-steps .icon-badge { border-radius: 50%; }
.bom-qty { width: 96px; min-width: 0; }
.parts-table .bom-qty { min-width: 0; }
.bom-missing .i { color: var(--danger); }
.card__intro { margin: 0; padding: var(--sp-3) var(--sp-5) 0; font-size: var(--fs-sm); color: var(--text-muted); }
.kpi--row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); }
.kpi--row .kpi__icon { flex: none; }
.kpi--row .kpi__value { display: block; font-size: var(--fs-2xl); }
.kpi--row .kpi__label { display: block; font-size: var(--fs-sm); font-weight: var(--fw-regular); color: var(--text-body); }
.list-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.list-toolbar__search { flex: 1 1 320px; }
.list-toolbar__sort .select { min-width: 190px; }
.list-rows .list-row--cover { grid-template-columns: 128px minmax(0, 1fr) auto auto; }
.list-row__cover { display: grid; place-items: center; width: 128px; height: 92px; border-radius: var(--r-md); background: var(--n-50); border: 1px solid var(--border); color: var(--n-400); overflow: hidden; position: relative; }
.list-row__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: var(--sp-2); }
.list-row__actions { display: flex; align-items: center; gap: var(--sp-2); }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.btn--icon { width: 40px; min-width: 40px; padding: 0; justify-content: center; }
.row-menu__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px; padding: var(--sp-1); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-md); }
.row-menu__panel a, .row-menu__panel button { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: var(--sp-2) var(--sp-3); border: 0; background: none; border-radius: var(--r-sm); font: inherit; font-size: var(--fs-sm); color: var(--text-body); text-align: left; cursor: pointer; text-decoration: none; }
.row-menu__panel a:hover, .row-menu__panel button:hover { background: var(--brand-50); color: var(--brand-700); }
.row-menu__panel form { margin: 0; }
.row-menu__panel .row-menu__danger { color: var(--danger); }
.row-menu__panel .row-menu__danger:hover { background: var(--danger-bg); color: var(--danger); }
.list-count { margin: 0 0 var(--sp-6); font-size: var(--fs-sm); color: var(--text-muted); }
.list-empty--filtered { padding: var(--sp-6); }
.new-list > summary { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-5); cursor: pointer; list-style: none; font-weight: var(--fw-semibold); color: var(--brand-700); }
.new-list > summary::-webkit-details-marker { display: none; }
.new-list[open] > summary { border-bottom: 1px solid var(--border); }
@media (max-width: 900px) {
  .list-rows .list-row--cover { grid-template-columns: 96px minmax(0, 1fr); }
  .list-row__cover { width: 96px; height: 72px; }
  .list-row--cover .list-row__actions { grid-column: 1 / -1; }
}
.list-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-6); align-items: start; margin-bottom: var(--sp-6); }
.list-detail-grid > * { min-width: 0; }
@media (max-width: 1400px) {
  .list-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .list-detail-grid__side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-4); }
}
.list-row--head-cover { grid-template-columns: 128px minmax(0, 1fr) auto; border: 1px solid var(--border); }
.list-actions--bar { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.list-actions--bar .row-menu__panel { left: 0; right: auto; }
.list-toolbar--table { margin: 0; padding: var(--sp-4); border-bottom: 1px solid var(--border); }
.list-toolbar--table .select { min-width: 150px; }
.parts-table__name--clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 30ch; }
.parts-table--list .input--sm { min-width: 0; width: 118px; }
.parts-table--list .parts-table__name--clamp { max-width: 24ch; }
.parts-table--list td, .parts-table--list th { padding-inline: 6px; }
.list-foot { justify-content: space-between; }
.summary-stats { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; gap: var(--sp-4); }
.summary-stats li { display: flex; align-items: center; gap: var(--sp-3); }
.summary-stats strong { display: block; font-size: var(--fs-xl); color: var(--text); line-height: 1.1; }
.summary-stats li > span:last-child { font-size: var(--fs-sm); color: var(--text-body); }
.summary-stats__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); }
.summary-stats__icon--success { background: var(--success-bg); color: var(--success); }
.summary-stats__icon--danger { background: var(--danger-bg); color: var(--danger); }
button.quick-action { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }

/* The earlier forms put the label above the field, not inside it. */
.field > label.label { position: static; margin: 0 0 6px; padding: 0; background: none; font-size: var(--fs-sm); font-weight: 600; color: var(--c-text); pointer-events: auto; }
.field .input::placeholder, .field .textarea::placeholder { color: var(--c-text-faint); }
.input, .select, .textarea { width: 100%; min-height: var(--control-h); padding: 8px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-white); font-size: 13px; color: var(--c-text); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-teal); }
.textarea { min-height: 84px; }
.error-text { display: block; margin-top: 4px; font-size: var(--fs-sm); color: #d8463a; }
/* Flat buttons, as the reference's. */
.btn--primary, .btn--secondary, .btn--ghost, .btn--danger, .btn--danger-solid, .btn--success { background-image: none; box-shadow: none; transform: none; border-radius: var(--radius-sm); }
.btn--primary:hover, .btn--secondary:hover, .btn--ghost:hover { transform: none; box-shadow: none; }
.btn--secondary { background-color: var(--c-bg-alt); color: var(--c-text); border-color: transparent; }
.btn--secondary:hover { background-color: var(--c-border); color: var(--c-text); }

/*
   Order management and quotation in the reference's account look (05-account/previous-orders):
   white cards on grey with a soft shadow, teal links and icons, flat grey buttons, small
   uppercase status badges, and a quiet step line.
*/
.badge--dot { gap: 6px; }
.badge--dot::before { width: 6px; height: 6px; }
.badge--success { background: var(--success-bg); color: #1f7a37; }
.badge--warning { background: var(--warning-bg); color: #8a5d00; }
.badge--violet { background: #efe9fc; color: #5a35b8; }
.badge--neutral { background: var(--c-bg-alt); color: var(--c-text-muted); }
.account-wide .card, .review .card { border: 0; border-radius: var(--radius); box-shadow: 0 2px 6px rgba(17, 22, 38, .06); }
.account-wide .card__body, .review .card__body { padding: 22px 24px; }
.account-wide .card__head, .review .card__head { margin: 0 24px; padding: 18px 0 14px; }
.card__title-icon { gap: 10px; font-size: var(--fs-md); font-weight: 700; line-height: 1.3; }
.card__title-icon .i { width: 20px; height: 20px; flex: none; color: var(--c-teal); }
.track-head { align-items: center; margin-bottom: 22px; }
.track-head__title { gap: 12px; margin: 6px 0 4px; font-size: 28px; font-weight: 800; }
.track-head__title .badge { font-size: 11px; }
.track-head__sub { font-size: var(--fs-sm); color: var(--c-text-2); }
.track-head__actions .btn, .review .btn { display: inline-flex; align-items: center; gap: 8px; }
.track-head__actions .btn .i, .review .btn .i { width: 16px; height: 16px; flex: none; }
.account-wide .alert, .review .alert { align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius); }
.account-wide .alert > .i, .review .alert > .i { width: 20px; height: 20px; margin: 0; }
.alert--success { background: var(--success-bg); border-color: #bfe5cf; color: #0f6b3a; }

/* The step line: done steps teal with a check, the current one a teal ring, the rest grey. */
.track-steps { padding: 26px 24px 22px; }
.milestone { gap: 4px; padding-top: 44px; font-size: var(--fs-xs); }
.milestone::before { top: 15px; height: 2px; }
.milestone.is-current::before { background: linear-gradient(90deg, var(--c-teal) 50%, var(--c-border) 50%); }
.milestone.is-current:first-child::before { background: var(--c-border); }
.milestone.is-done::before { background: var(--c-teal); }
.milestone.is-done:has(+ .milestone:not(.is-done):not(.is-current))::before { background: linear-gradient(90deg, var(--c-teal) 50%, var(--c-border) 50%); }
.milestone.is-done:last-child::before, .milestone.is-done:first-child:last-child::before { background: var(--c-teal); }
.milestone__dot { width: 32px; height: 32px; border-width: 2px; border-color: var(--c-border); color: var(--c-text-faint); }
.milestone__dot .i { width: 14px; height: 14px; }
.milestone.is-done .milestone__dot { background: var(--c-teal); border-color: var(--c-teal); }
.milestone.is-current .milestone__dot { border-color: var(--c-teal); box-shadow: 0 0 0 4px rgba(49, 199, 199, .18); }
.milestone.is-current .milestone__dot::after { width: 12px; height: 12px; background: var(--c-teal); }
.milestone strong { font-size: 13px; font-weight: 700; line-height: 1.3; }
.milestone.is-current strong { color: var(--c-teal-dark); }
.milestone > span:not(.milestone__dot) { color: var(--c-text-muted); line-height: 1.4; }
@media (max-width: 760px) {
  .milestone { padding: 0 0 0 46px; min-height: 36px; }
  .milestone::before { left: 15px; width: 2px; }
  .milestone:first-child::before { top: 16px; left: 15px; }
}

/* Facts, tables and side panels. */
.facts-grid dt, .quote-facts span { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--c-text-muted); }
.facts-grid dd { font-size: var(--fs-sm); }
.quote-facts { grid-template-columns: 1.2fr 1fr 1.3fr 1fr; padding: 18px 24px; }
.quote-facts strong, .quote-facts .link-arrow { font-size: var(--fs-sm); }
.quote-facts .link-arrow { white-space: nowrap; }
.track-note, .quote-note { border-radius: var(--radius); background: var(--c-bg); }
.account-wide .table th, .review .table th { padding: 10px 12px; background: var(--c-bg); font-size: 11px; color: var(--c-text-muted); }
.account-wide .table td, .review .table td { padding: 14px 12px; }
.parts-table__pn { color: var(--c-teal); }
.parts-table__brand { color: var(--c-text); font-weight: 700; }
.outcomes { gap: 10px; }
.outcomes__dot { width: 9px; height: 9px; }
.log li { grid-template-columns: 78px minmax(0, 1fr); }
.summary-card__title { gap: 10px; font-size: var(--fs-md); font-weight: 700; }
.summary-card__title .i { width: 20px; height: 20px; color: var(--c-teal); }
.quote-total strong { color: var(--c-text); }
.quote-terms dt { gap: 8px; }
.quote-terms dt .i { width: 15px; height: 15px; flex: none; color: var(--c-teal); }
.review { padding-block: 0 var(--sp-8); }
.review-head { padding: 0; background: none; }
.review__help .card__body { background: var(--c-white); }
.review__help .icon-badge { background: var(--c-bg); color: var(--c-teal); }
.verified-banner { align-items: center; border-radius: var(--radius); }
.verified-banner > .i { width: 20px; height: 20px; }
.answer h2 { gap: 8px; font-size: var(--fs-md); }
.answer h2 .i { width: 20px; height: 20px; }
.help-cta { padding: 24px 28px; border-radius: var(--radius); background: var(--c-navy); }
.help-cta h2 { font-size: var(--fs-md); }
.help-cta .btn--invert { display: inline-flex; align-items: center; gap: 8px; background: var(--c-teal); color: var(--c-white); border-radius: var(--radius-sm); box-shadow: none; }
.help-cta .btn--invert:hover { background: var(--c-teal-dark); transform: none; box-shadow: none; }
.account-wide .table, .review .table { min-width: 0; }
.account-wide .table td, .account-wide .table th { white-space: normal; }
.account-wide .table .table__part, .account-wide .table .badge, .account-wide .table .num { white-space: nowrap; }
.account-wide .parts-table th, .review .parts-table th { white-space: normal; line-height: 1.3; }
.card__title-icon + p, .card__title-icon + .quote-note { margin-top: 12px; }
@media (max-width: 760px) {
  .account-wide .table, .review .table { min-width: 640px; }
}
/* Beside the account menu there is no room for a side column: its cards go in a row below. */
.account-wide .track-grid, .account-wide .review { grid-template-columns: minmax(0, 1fr); }
.account-wide .track-grid__side, .account-wide .review__side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-5); align-items: start; }
.account-wide .review__side.stack > * + * { margin-top: 0; }
.quote-facts > div { align-content: start; }
.review .track-steps, .account-wide .track-steps { margin-bottom: 0; }
.account-wide > .track-steps { margin-bottom: var(--sp-5); }
.account-wide .card { min-height: 0; }
/* A check box inside a field is a line of its own, not a floating label. */
.field > label.check { position: static; transform: none; margin: 0; padding: 0; background: none; font-size: var(--fs-sm); font-weight: 400; color: var(--c-text-2); pointer-events: auto; }
.account-wide .review__side { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) {
  .account-wide .review__side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .quote-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
}
