/* Desktop visual refresh; business fields and mobile mini-program are unchanged. */
:root {
  --bg:#f7f8fa; --text:#24282e; --muted:#7f8691; --line:#e9ebef;
  --brand:#ed651d; --brand-strong:#d65310; --brand-soft:#fff3e9;
  --sidebar-text:#535962; --sidebar-heading:#24282e; --sidebar-active:#dc5b19;
  --sidebar-accent:#ed651d; --shadow-card:none; --radius:6px;
}
.sidebar { background:#fdfdfc; border-right:1px solid var(--line); padding-inline:12px; }
.sidebar-brand { padding:22px 10px; border-bottom:0; margin-bottom:4px; }
.sidebar-brand .brand-name { font-size:18px; }
.sidebar-brand .brand-sub { margin-top:4px; color:#90959d; }
.nav { overflow-y:auto; min-height:0; gap:3px; padding-bottom:12px; }
.nav-group-label { color:#969ba3; font-size:11px; padding:16px 12px 5px; }
.nav a { min-height:38px; font-size:13px; }
.nav a:hover { background:#f1f2f3; color:#22272e; }
.nav a.active { background:#fff0e4; color:#df5a14; }
.nav a.active::before { background:var(--brand); width:2px; }
.sidebar-foot { padding-top:14px; border-top:1px solid var(--line); color:#a0a5ad; }
.topbar { background:#fff; box-shadow:none; border-bottom:1px solid var(--line); }
.topbar-title { font-size:13px; font-weight:500; color:#727983; }
.topbar-user { gap:10px; }
.user-avatar { background:#fff0df; color:#a55c23; }
.page { background:#f8f9fb; }
.page-enter { animation:none; }
.page-title { color:#20252b; font-size:23px; font-weight:650; }
.page-subtitle { font-size:12px; color:#9299a3; }
.panel,.section { box-shadow:none; border-color:#e8ebef; }
.section-header { background:#fff; }
.btn { border-radius:6px; box-shadow:none; transition:background .15s,border-color .15s; }
.btn.primary { background:var(--brand); border-color:var(--brand); }
.input,.select,.textarea { background:#fff; border-color:#e1e5eb; border-radius:6px; }
.input:focus,.select:focus,.textarea:focus { border-color:#ed9b6d; box-shadow:0 0 0 3px #fff1e7; }
.badge { border-radius:4px; font-size:11px; }
.stat-card { box-shadow:none; border-color:#e8ebef; }
.intake-workspace { background:#fff; margin:-24px; padding:28px 28px 16px; min-height:calc(100vh - 70px); }
.page.intake-list-page { overflow-x:clip; }
.intake-workspace .page-header { margin-bottom:14px; }
.intake-total { display:inline-block; margin-left:8px; padding:2px 8px; vertical-align:middle; background:#f0f1f3; border-radius:6px; color:#656d77; font-size:12px; font-weight:500; }
.intake-status-tabs { display:flex; gap:24px; border-bottom:1px solid var(--line); overflow-x:auto; }
.intake-status-tabs button { flex-shrink:0; border:0; border-bottom:2px solid transparent; background:transparent; color:#6d747e; padding:12px 0; font-size:13px; }
.intake-status-tabs button span { margin-left:7px; color:#9298a0; font-size:12px; }
.intake-status-tabs button.active { border-bottom-color:var(--brand); color:#24282e; font-weight:600; }
.intake-workspace .toolbar { padding:18px 0; margin:0; gap:10px; }
.intake-filter-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) 180px 140px minmax(290px,330px) auto; align-items:center; }
.intake-filter-toolbar .intake-search,.intake-filter-toolbar .intake-status-filter,.intake-filter-toolbar .intake-salesperson-filter { max-width:none; min-width:0; }
.intake-date-range { min-width:0; min-height:var(--control-height); display:grid; grid-template-columns:auto minmax(118px,1fr) auto minmax(118px,1fr); align-items:center; gap:8px; padding:0 8px 0 11px; border:1px solid var(--line-strong); border-radius:var(--radius); background:#fff; color:#747c86; font-size:12px; }
.intake-date-range .input { min-width:0; min-height:32px; padding:4px 5px; border:0; background:#f7f8fa; }
.intake-date-range .input:focus { box-shadow:none; background:#fff4ed; }
.intake-date-range i { color:#a1a7af; font-style:normal; }
@media(max-width:1450px) { .intake-filter-toolbar { grid-template-columns:minmax(260px,1fr) 180px 140px auto; } .intake-date-range { grid-column:1/4; grid-row:2; } .intake-filter-toolbar #resetIntakeFilter { grid-column:4; grid-row:2; align-self:stretch; } }
.intake-workspace .todo-panel { box-shadow:none; background:#fafbfc; border:1px solid var(--line); padding:12px 14px; margin:0 0 16px; }
.intake-workspace .todo-head { font-size:12px; }
.intake-workspace .todo-list { gap:6px; }
.intake-workspace .todo-item { background:#fff; box-shadow:none; font-size:12px; padding:8px 10px; }
.intake-split { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; }
.intake-split.has-inspector { grid-template-columns:minmax(0,1fr) 340px; }
.intake-list-panel { min-width:0; border:0; border-radius:0; margin:0; background:#fff; }
.intake-list-panel .table-wrap { border-radius:0; }
.intake-list-panel .application-table { min-width:990px; }
.intake-list-panel th:last-child,.intake-list-panel td:last-child { width:1%; }
.intake-list-panel td:last-child .actions { width:210px; max-width:none; }
.intake-inspector[hidden] { display:none !important; }
.intake-list-panel th { background:#fff; color:#7d848e; font-size:12px; font-weight:500; padding:12px; }
.intake-list-panel td { padding:16px 12px; font-size:13px; }
.intake-list-panel tr { cursor:pointer; }
.intake-list-panel tr:hover td { background:#fafbfc; }
.intake-list-panel tr.is-selected td { background:#fff5ed; }
.intake-list-panel tr.is-selected td:first-child { box-shadow:inset 2px 0 var(--brand); }
.intake-customer { display:flex; align-items:flex-start; gap:10px; min-width:182px; }
.intake-avatar { width:32px; height:32px; flex-shrink:0; border-radius:50%; display:grid; place-items:center; background:#fff0e3; color:#b85d26; font-weight:600; }
.intake-customer-name { display:flex; min-height:32px; align-items:center; margin:-6px 0 -2px; padding:6px 0 4px; color:#292e35; font-weight:600; background:none; border:0; text-align:left; cursor:pointer; }
.intake-customer-name:hover { color:var(--brand); }
.intake-customer small { display:block; font-size:11px; color:#8b919a; line-height:1.8; }
.intake-identity { font-variant-numeric:tabular-nums; }
.intake-vehicle-name { display:block; max-width:200px; font-weight:500; }
.intake-list-panel .actions { min-width:170px; max-width:210px; gap:5px; }
.intake-list-panel .actions .btn { min-height:34px; padding:5px 9px; font-size:13px; }
.intake-more-menu { position:fixed; inset:auto; margin:0; width:160px; max-height:180px; overflow-y:auto; padding:6px; border:1px solid var(--line); border-radius:6px; background:#fff; box-shadow:0 6px 20px #18202b18; }
.intake-more-menu .btn { display:block; width:100%; text-align:left; margin:0; border:0; background:transparent; color:#333; }
.intake-more-menu .btn:hover { background:#f5f6f8; }
.intake-more-menu .btn.danger { color:#c43131; border-top:1px solid var(--line); border-radius:0; margin-top:4px; }
.intake-pagination { display:flex; align-items:center; gap:10px; }
.intake-pagination .select { width:112px; }
.intake-list-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.intake-list-footer { color:#8a9099; font-size:12px; padding:16px 12px; border-top:1px solid var(--line); }
.intake-todos { margin:0 0 14px; border-bottom:1px solid var(--line); }
.intake-todos > summary { padding:8px 0 14px; cursor:pointer; color:#727b86; font-size:12px; }
.intake-todos > summary span { margin-left:6px; color:#db6c27; }
.intake-inspector { position:relative; z-index:20; grid-column:2; grid-row:1; align-self:start; margin-top:var(--intake-inspector-offset,0px); width:340px; height:min(720px,calc(100vh - 84px)); min-width:0; min-height:420px; max-height:calc(100vh - 84px); border-left:1px solid var(--line); background:#fff; display:flex; flex-direction:column; box-shadow:-10px 0 28px #20252b0d; }
.inspector-heading { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding:18px 22px; }
.inspector-heading h3 { margin:0 0 8px; font-size:20px; overflow-wrap:anywhere; }
.inspector-close { display:grid; place-items:center; flex-shrink:0; width:30px; height:30px; border:0; background:transparent; font-size:24px; color:#8c929b; border-radius:5px; }
.inspector-close:hover { background:#f3f4f6; }
.inspector-body { flex:1; padding:0 22px; overflow-y:auto; min-height:0; }
.inspector-vehicle { display:flex; gap:12px; padding:18px 0; align-items:center; }
.inspector-vehicle .nav-icon { width:30px; height:30px; color:#83939d; flex-shrink:0; }
.inspector-vehicle small,.inspector-amount small { display:block; color:#969da5; font-size:11px; margin-bottom:5px; }
.inspector-vehicle strong { font-size:14px; font-weight:500; }
.inspector-amount { padding:10px 0 22px; }
.inspector-amount strong { font-size:28px; font-weight:600; color:var(--brand); font-variant-numeric:tabular-nums; }
.inspector-fields { margin:0; padding:16px 0; border-block:1px solid var(--line); }
.inspector-fields > div { display:grid; grid-template-columns:75px minmax(0,1fr); gap:12px; padding:7px 0; font-size:12px; }
.inspector-fields dt { color:#8a929c; }
.inspector-fields dd { margin:0; text-align:right; overflow-wrap:anywhere; }
.inspector-info-section { padding:16px 0; border-top:1px solid var(--line); }
.inspector-info-section h4 { margin:0 0 8px; font-size:13px; font-weight:650; color:#303740; }
.inspector-info-section .inspector-fields { padding:0; border:0; }
.inspector-info-section .inspector-fields > div { grid-template-columns:90px minmax(0,1fr); gap:10px; padding:6px 0; }
.inspector-unfilled { color:#949ba4; font-size:12px; }
.inspector-history h4 { font-size:13px; margin:20px 0; }
.inspector-history ol { list-style:none; margin:0 0 20px 5px; padding:0; }
.inspector-history li { position:relative; border-left:1px solid #e2e9e7; padding:0 0 24px 20px; font-size:12px; }
.inspector-history li::before { position:absolute; left:-4px; top:5px; width:7px; height:7px; border-radius:50%; background:#349c83; content:""; }
.inspector-history li.current::before { background:var(--brand); }
.inspector-history li:last-child { border-left-color:transparent; }
.inspector-history li strong,.inspector-history li small { display:block; margin-bottom:5px; }
.inspector-history li small { color:#949ba4; font-size:11px; }
.inspector-history p { color:#7f8792; overflow-wrap:anywhere; }
.inspector-actions { display:flex; gap:8px; padding:16px 22px; border-top:1px solid var(--line); }
.inspector-actions .btn { flex:1; font-size:12px; }
@media(min-width:1600px) { .intake-split.has-inspector { grid-template-columns:minmax(0,1fr) 370px; } .intake-inspector { width:370px; } }
@media(max-width:1099px) {
  .intake-split.has-inspector { grid-template-columns:minmax(0,1fr); }
  .intake-inspector { position:fixed; z-index:80; top:70px; right:0; bottom:0; grid-column:auto; grid-row:auto; margin-top:0; height:auto; min-height:0; width:min(390px,calc(100vw - 24px)); max-height:none; box-shadow:-12px 0 36px #20252b15; }
  .inspector-body { flex:1; }
}
@media(max-width:720px) {
  .intake-workspace { margin:-12px; padding:18px 12px; }
  .intake-status-tabs { gap:18px; }
  .intake-list-panel .application-table { min-width:0; }
  .intake-list-panel .application-table tr { box-shadow:none; }
  .intake-list-panel .application-table td { padding:10px 12px; }
  .intake-list-panel .actions { max-width:none; }
  .intake-list-panel td:last-child .actions { width:auto; }
  .intake-customer { min-width:0; }
  .intake-avatar { display:none; }
  .intake-customer-name { min-height:38px; margin:-8px 0 -4px; padding:8px 0 6px; }
  .intake-list-panel .actions .btn { min-height:38px; }
  .intake-subtab { min-height:38px; line-height:38px; }
  .intake-date-range .input { min-height:38px; }
  .intake-inspector { top:0; z-index:100; }
  .intake-filter-toolbar { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .intake-filter-toolbar .intake-search { grid-column:1/-1; }
  .intake-filter-toolbar .intake-status-filter,.intake-filter-toolbar .intake-salesperson-filter { grid-column:auto; }
  .intake-date-range { grid-column:1/-1; grid-row:auto; grid-template-columns:1fr auto 1fr; padding:5px 7px; }
  .intake-date-range > span { display:none; }
  .intake-filter-toolbar #resetIntakeFilter { grid-column:1/-1; grid-row:auto; }
}
@media(prefers-reduced-motion:reduce) { .btn,.nav a { transition:none; } }
.form-validation-summary { margin:12px 0; padding:12px 16px; border-left:3px solid #c63a38; background:#fff4f3; color:#9c2a28; }
.form-validation-summary > div { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; max-height:120px; overflow:auto; }
.validation-overflow { display:inline-flex; align-items:center; padding:0 8px; color:#8c5b59; font-size:11px; }
[aria-invalid="true"] { outline:2px solid #c63a38; outline-offset:2px; }

/* Intake form information hierarchy */
.intake-tab-count { display:inline-grid; min-width:18px; height:18px; margin-left:7px; padding:0 5px; place-items:center; border-radius:9px; background:#eef0f3; color:#707883; font-size:10px; line-height:18px; }
.intake-subtab.active .intake-tab-count { background:#ffe2d1; color:#b74610; }
.intake-completion { display:grid; grid-template-columns:auto minmax(180px,420px) auto; align-items:center; gap:16px; margin:0 0 14px; padding:12px 16px; border:1px solid #e8ebef; border-radius:6px; background:#fff; }
.intake-completion-copy { display:flex; align-items:baseline; gap:9px; white-space:nowrap; }
.intake-completion-copy span { color:#7d858f; font-size:12px; }
.intake-completion-copy strong { color:#2c3239; font-size:16px; }
.intake-completion-track { height:6px; overflow:hidden; border-radius:3px; background:#eceff2; }
.intake-completion-track i { display:block; height:100%; border-radius:inherit; background:var(--brand); transition:width .18s ease; }
.intake-completion-state { color:#737c87; font-size:12px; white-space:nowrap; }
.intake-completion-state strong { color:var(--brand-strong); }
.intake-completion .form-validation-summary { grid-column:1/-1; margin:0; }
.derived-control { min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 11px; border:1px solid #e4e7eb; border-radius:6px; background:#f7f8fa; color:#8a919a; }
.derived-control.has-value { color:#343a42; }
.derived-control small { flex-shrink:0; color:#9aa1aa; font-size:10px; }
.guarantor-presence-panel { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:12px 14px; border:1px solid #e5e8ec; border-radius:6px; background:#fafbfc; }
.guarantor-presence-label { color:#353c45; font-size:13px; font-weight:600; }
.segmented-choice { display:inline-grid; grid-template-columns:repeat(2,minmax(96px,1fr)); padding:3px; border:1px solid #dde2e8; border-radius:6px; background:#f0f2f4; }
.segmented-choice label { position:relative; cursor:pointer; }
.segmented-choice input { position:absolute; opacity:0; pointer-events:none; }
.segmented-choice span { display:grid; min-height:32px; padding:0 14px; place-items:center; border-radius:4px; color:#727b86; font-size:12px; }
.segmented-choice label.selected span { background:#fff; color:#d65310; box-shadow:0 1px 3px #1d26320f; font-weight:600; }
.evaluation-source-strip { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; padding:10px 12px; border-left:3px solid #3c9b72; background:#f3faf6; }
.evaluation-source-strip strong,.evaluation-source-strip span { display:block; }
.evaluation-source-strip strong { color:#2f3b35; font-size:13px; }
.evaluation-source-strip div span { margin-top:3px; color:#76867e; font-size:11px; }
.form-footer .form-save-state { display:flex; align-items:center; gap:8px; margin-right:auto; color:#818994; font-size:12px; }
.form-footer .form-save-state.is-hidden { visibility:hidden; }
.form-save-state > span { width:7px; height:7px; border-radius:50%; background:#d59a32; }

@media(max-width:800px) {
  .intake-completion { grid-template-columns:1fr auto; gap:10px; }
  .intake-completion-track { grid-column:1/-1; grid-row:2; }
  .intake-completion-state { grid-column:2; grid-row:1; }
  .guarantor-presence-panel { align-items:flex-start; flex-direction:column; }
  .form-footer .form-save-state { display:none; }
}

/* Keep the detail header in flow so its actual height determines the content offset. */
.app-shell.is-secondary-route .page,
.app-shell.is-secondary-route.has-intake-subtabs .page {
  padding-top: 24px;
  overflow: visible;
}
.app-shell.is-secondary-route .page > .sticky-action-bar {
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  margin: -24px 0 20px;
  padding: 20px 0 0;
  background: #f7f8fa;
  box-shadow: none;
}
.intake-review-card {
  margin-top: 24px;
  border: 1px solid #dfe5e9;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.intake-review-card > .section {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.intake-review-card > .section + .section { border-top: 1px solid #edf0f2; }
.intake-review-card .section-header { background: #f8fafb; }
