/* Pricing workspace only: Compact ERP layout */
#pricing-form .journey-workspace{grid-template-columns:minmax(0,1fr) 350px;gap:10px;align-items:start}
.journey-inputs,.journey-output{min-width:0}
.journey-output{position:sticky;top:10px;max-height:calc(100vh - 20px);overflow-y:auto;scrollbar-width:thin}

/* Page head & tabs density */
.workspace:has(#pricing-form){padding:12px 18px 30px}
.workspace:has(#pricing-form) .page-head{margin-bottom:6px;gap:6px}
.workspace:has(#pricing-form) .page-head h1{font-size:1.2rem;margin-bottom:2px}
.workspace:has(#pricing-form) .page-head p{font-size:.78rem;margin:0}
.workspace:has(#pricing-form)>.tabs{margin-bottom:8px;padding:3px}
.workspace:has(#pricing-form)>.tabs button{min-width:110px;padding:5px 10px;font-size:.8rem}

/* Navigation toolbar */
.journey-toolbar{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0 0 8px;flex-wrap:wrap}
.journey-jumps{display:flex;gap:4px;flex-wrap:wrap}
.journey-jumps button{padding:4px 8px;font-size:.76rem;background:#fff;border-radius:5px;line-height:1.2}
.journey-jumps button:hover{background:var(--soft);color:var(--brand)}
.journey-jumps button:focus-visible{background:var(--soft)}
.journey-toolbar>[data-action=reset-price]{font-size:.76rem;color:var(--muted);padding:3px 6px}

/* Step panels & titles */
#pricing-form [id^=step-]{scroll-margin-top:10px}
#pricing-form .panel{margin-bottom:8px;border-radius:7px;border:1px solid var(--line)}
#pricing-form .panel-title{padding:6px 10px;background:#fbfcfd;border-bottom:1px solid #edf1f5;display:flex;align-items:center;justify-content:space-between;gap:6px}
#pricing-form .panel-title h2{font-size:.84rem;font-weight:650;display:flex;align-items:center}
#pricing-form .step{font-size:.68rem;padding:1px 4px;margin-right:5px;border-radius:3px}
#pricing-form .panel-body{padding:8px 10px}
#pricing-form .form-grid{gap:6px 8px}

/* Compact inputs & labels */
#pricing-form input,#pricing-form select,#pricing-form textarea{min-height:30px;padding:3px 7px;font-size:.82rem;border-radius:5px;border:1px solid #cbd6df}
#pricing-form textarea{min-height:44px}
#pricing-form label.field{gap:2px;font-size:.75rem;font-weight:600}
#pricing-form .field-error:empty{display:none}
#pricing-form .field-error{font-size:.7rem;margin-top:1px}

/* Declutter verbose hints: hide wordy static instruction text, preserve active feedback */
#pricing-form .field small:not(.field-error):not(#out-allowance-matches):not(#return-allowance-matches):not(#margin-threshold-hint):not(#commercial-floor-hint){display:none}
#pricing-form p.hint:not(#template-status){display:none}

/* Step 01: Khách hàng & nhóm xe — 4-Column Setup Bar */
#pricing-form #step-basic .panel-body{display:grid;grid-template-columns:1.2fr 1fr 0.9fr 1.2fr;gap:5px 8px;align-items:start}
#pricing-form #step-basic .panel-body>.field{grid-column:auto}
#pricing-form #step-basic .customer-details{grid-column:1/-1;border-top:1px dashed var(--line);margin-top:2px;padding:0}
#pricing-form #step-basic .customer-details>summary{padding:3px 0;font-size:.74rem;color:var(--brand)}
#pricing-form #step-basic .customer-details #customer-hint .resolved{display:flex;flex-wrap:wrap;gap:4px 14px;padding:3px 0 1px}
#pricing-form #step-basic .customer-details #customer-hint .resolved>div{display:flex;gap:5px;border:0;padding:0;font-size:.76rem}
#pricing-form #step-basic .customer-details #customer-hint dt{font-size:.74rem;color:var(--muted);margin:0}
#pricing-form #step-basic .customer-details #customer-hint dd{font-size:.76rem;font-weight:600;margin:0}

/* Step 02: Hành trình thực tế — Route & Quick Summary Strip */
#pricing-form #step-route .panel-body{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;padding:6px 10px}
#pricing-form #step-route .template-picker{display:flex;align-items:flex-end;gap:6px;flex:1 1 340px;max-width:450px;margin:0}
#pricing-form #step-route .template-picker>.field{flex:1;margin:0}
#pricing-form #step-route .template-picker>button{min-height:30px;padding:3px 10px;font-size:.78rem;margin:0;white-space:nowrap}
#pricing-form #step-route .journey-overview{flex:0 0 auto;margin-left:auto}
#pricing-form #template-status{margin:2px 0 0;font-size:.72rem;width:100%;order:3}
#pricing-form #template-status:empty{display:none}
.journey-overview{display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:#f8fafc;border-radius:5px;padding:3px 10px;margin:0}
.journey-overview div{display:flex;flex-direction:column}
.journey-overview span{font-size:.65rem;color:var(--muted);display:block}
.journey-overview strong{font-size:.82rem;display:block;font-variant-numeric:tabular-nums;margin-top:1px}

/* Two Legs Side-by-Side */
.journey-legs-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:start;margin-bottom:8px}
.journey-leg{margin-bottom:0!important}
.journey-leg .panel-title{background:#f0f7f7;border-bottom:1px solid #d6e7e5;padding:5px 10px}
.journey-leg[data-leg=return] .panel-title{background:#f1f5fa;border-bottom:1px solid #d7e2ec}
#pricing-form .journey-leg .panel-body{padding:6px 8px;gap:5px}
#pricing-form .journey-leg .leg-running{gap:5px}
.leg-metrics-3col{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.leg-metrics-2col{display:grid;grid-template-columns:repeat(2,1fr);gap:5px}
.journey-leg .leg-cargo{margin:0}
#pricing-form .journey-leg .leg-allowance{padding:6px 8px;background:#f8fafb;border:1px solid #e7ecf1;border-radius:5px;margin-top:2px}
#pricing-form .journey-leg .leg-allowance h3{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#486576;margin:0 0 3px}
#pricing-form .journey-leg .leg-allowance>.form-grid{display:grid;grid-template-columns:125px 1fr;gap:5px 8px;align-items:end}
#pricing-form .journey-leg .leg-allowance>.form-grid>[data-allowance-norm]{grid-column:auto}
#pricing-form .journey-leg .leg-allowance>.form-grid>[data-allowance-manual]{grid-column:auto}
.allowance-combobox{display:flex;align-items:stretch;border:1px solid #cbd6df;border-radius:5px;background:#fff;overflow:hidden;min-height:30px;transition:border-color .15s ease,box-shadow .15s ease}
.allowance-combobox:focus-within{border-color:var(--brand);box-shadow:0 0 0 2px rgba(37,139,207,0.35)}
.combobox-search-wrap{flex:0 0 36%;min-width:0;display:flex;align-items:center;background:#f8fafc;border-right:1px solid #dbe3ea;padding:0 5px}
.combobox-search-wrap .search-icon{font-size:.72rem;color:var(--muted);margin-right:3px;user-select:none}
.combobox-search{width:100%;border:none!important;background:transparent!important;padding:3px 2px!important;min-height:28px!important;font-size:.78rem!important;outline:none!important;box-shadow:none!important}
.combobox-select-wrap{flex:1;min-width:0}
.combobox-select{width:100%;border:none!important;background:transparent!important;padding:3px 6px!important;min-height:28px!important;font-size:.8rem!important;outline:none!important;box-shadow:none!important;cursor:pointer}
.allowance-norm-box small{font-size:.7rem;color:var(--brand);margin-top:2px;display:block}
.allowance-norm-box small:empty{display:none}
.allowance-preview{margin-top:2px;font-size:.72rem;font-weight:600;color:var(--brand)}
#pricing-form .journey-leg .notice{margin:3px 0 0;font-size:.72rem;padding:3px 6px;display:flex;align-items:center;justify-content:space-between;gap:6px}
#pricing-form .journey-leg .notice button{margin:0;padding:2px 6px;min-height:24px;font-size:.72rem;white-space:nowrap}

/* Step 03 & Step 04 Stacked for spacious ERP tables */
.journey-bottom-grid{display:grid;grid-template-columns:1fr;gap:8px;align-items:start}
.journey-bottom-grid .panel{margin-bottom:0}
#pricing-form #step-cost .panel-body{display:grid;grid-template-columns:1fr 1fr;gap:5px 8px;align-items:end;padding:6px 8px}
#pricing-form #step-cost .template-picker{grid-column:1;display:flex;align-items:flex-end;gap:5px;margin:0}
#pricing-form #step-cost .template-picker>.field{flex:1;margin:0}
#pricing-form #step-cost .template-picker>button{min-height:30px;padding:3px 8px;font-size:.76rem;margin:0;white-space:nowrap}
#pricing-form #step-cost #handling-summary{grid-column:2;font-size:.74rem;font-weight:650;color:#005186;text-align:right;padding-bottom:6px}
#pricing-form #step-cost #handling-summary:empty{display:none}
#pricing-form #step-cost .handling-details{grid-column:1/-1;margin-top:2px}
#pricing-form #step-cost .handling-details>summary{padding:2px 0;font-size:.74rem;color:var(--brand)}
#pricing-form #step-cost .handling-details>.form-grid{padding-top:4px;gap:4px 6px}

/* Surcharges multi-row table in Step 03 */
#pricing-form #step-cost .surcharges-box{grid-column:1/-1;margin-top:6px;background:#fbfcfd;border:1px solid #e2e8f0;border-radius:6px;padding:6px 8px}
.surcharges-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;flex-wrap:wrap}
.surcharges-header-left h3{font-size:.78rem;font-weight:700;color:#334155;margin:0;text-transform:uppercase;letter-spacing:.3px}
.surcharges-header-left p{font-size:.7rem;color:#64748b;margin:1px 0 0}
#btn-add-surcharge{padding:3px 8px;font-size:.74rem;min-height:26px;border-radius:4px;margin:0;white-space:nowrap;background:var(--brand);color:#fff;border:none;cursor:pointer}
#btn-add-surcharge:hover{opacity:.9}
.surcharges-table-wrap{width:100%;overflow-x:auto;margin:0;border:1px solid #e2e8f0;border-radius:4px;background:#fff}
.surcharges-table{width:100%;border-collapse:collapse;font-size:.76rem}
.surcharges-table th{background:#f8fafc;color:#475569;font-weight:650;padding:4px 5px;border-bottom:1px solid #cbd5e1;border-right:1px solid #f1f5f9;font-size:.72rem}
.surcharges-table td{padding:2px 4px;border-bottom:1px solid #f1f5f9;border-right:1px solid #f8fafc;vertical-align:middle}
.surcharges-table tfoot td{background:#f8fafc;padding:5px 6px;border-top:1px solid #cbd5e1;border-bottom:none}
.sc-input{width:100%!important;min-height:24px!important;padding:2px 4px!important;font-size:.76rem!important;border:1px solid #cbd5e1!important;border-radius:3px!important;box-sizing:border-box!important;background:#fff!important}
.sc-input:focus{border-color:var(--brand)!important;outline:none!important;box-shadow:0 0 0 2px rgba(37,139,207,0.35)!important}
.sc-btn-del{background:transparent;border:1px solid transparent;color:#94a3b8;font-weight:700;cursor:pointer;padding:1px 5px;font-size:.78rem;border-radius:3px;line-height:1.2;min-height:auto}
.sc-btn-del:hover{color:#ef4444;background:#fee2e2;border-color:#fca5a5}
.sc-empty-hint{text-align:center;color:#94a3b8;font-style:italic;padding:8px}

#pricing-form #step-price .panel-body{padding:6px 8px}
#pricing-form #step-price .sales-fields{display:grid;grid-template-columns:1.3fr 0.9fr 0.9fr;gap:4px 6px;align-items:end}
#pricing-form #step-price .sales-fields>#margin-threshold-hint,
#pricing-form #step-price .sales-fields>.full,
#pricing-form #step-price .sales-fields>.quote-metadata{grid-column:1/-1;margin:0}
#pricing-form #step-price .sales-fields>#margin-threshold-hint{font-size:.72rem}
#pricing-form #step-price .quote-metadata{border-top:1px dashed var(--line);padding:2px 0 0;margin-top:2px}
#pricing-form #step-price .quote-metadata>summary{padding:2px 0;font-size:.74rem;display:list-item}
#pricing-form #step-price .quote-metadata>summary .hint{margin-left:6px;font-weight:400}
#pricing-form #step-price .quote-metadata>.panel-body{padding:3px 0 1px;gap:4px 6px}

/* Right Output Column (.journey-output) */
.journey-output .panel{margin-bottom:6px}
.journey-output .result-empty{padding:16px 10px;font-size:.76rem}
.journey-output .result-empty h3{margin-bottom:3px;font-size:.82rem}
.journey-output .empty-symbol{display:none}
.journey-output .kpi-stack{padding:2px 10px}
.journey-output .metric{padding:4px 0;gap:4px;align-items:center;flex-direction:row}
.journey-output .metric .label{font-size:.74rem;min-width:0}
.journey-output .metric .value{font-size:1rem;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;font-weight:650}
.journey-output .metric.main-price{background:var(--soft);margin:0 -10px;padding:5px 10px}
.journey-output .metric.main-price .value{font-size:1.18rem;color:var(--brand)}
.journey-output .metric small{font-size:.64rem;line-height:1.2}
.journey-output .total-bar{padding:7px 10px;display:flex;align-items:center;justify-content:space-between}
.journey-output .total-bar span{font-size:.66rem;letter-spacing:.4px}
.journey-output .total-bar strong{font-size:1.25rem;white-space:nowrap;font-variant-numeric:tabular-nums;margin:0}
.journey-output .margin-results .metric:first-child{padding:4px 0}
.journey-output .margin-results .metric:first-child .label small{display:none}
.journey-output .result-foot{padding:5px 10px;font-size:.68rem}
.journey-output .result-foot>p.hint{font-size:.64rem;margin-bottom:2px}
.journey-output .result-foot .notice{font-size:.7rem;margin:0 0 4px;padding:4px 6px}
.journey-output .price-formula{margin:0;border:0;padding:0}
.journey-output .price-formula>summary{padding:4px 0;font-size:.7rem}
.journey-output .norm-details>summary{padding:5px 8px;font-size:.74rem}
#pricing-form .pricing-actions{padding:6px 8px;display:grid;grid-template-columns:1fr 1fr;gap:6px}
#pricing-form .pricing-actions button{padding:5px;font-size:.76rem;min-height:34px;border-radius:5px}
#pricing-form .pricing-actions #save-button{background:#fff;color:var(--brand);border-color:var(--brand)}

/* Collapsible Breakdown Table */
#breakdown{width:100%}
#breakdown .panel{margin:8px 0;border-radius:8px;border:1px solid #cbd5e1;box-shadow:0 1px 3px rgba(0,0,0,0.04);background:#fff;overflow:hidden}
#breakdown summary{padding:7px 11px;font-size:.78rem;font-weight:650;color:var(--brand);background:#fbfcfd;cursor:pointer;user-select:none;transition:background .15s ease}
#breakdown summary:hover{background:#f1f5f9}
#breakdown table{width:100%;border-collapse:collapse}
#breakdown table th,#breakdown table td{padding:5px 7px;font-size:.75rem}
#breakdown table th{background:#f8fafc;border-bottom:1px solid #cbd5e1}
#breakdown table td{border-bottom:1px solid #f1f5f9}
#breakdown .table-wrap{overflow-x:auto}


/* Calculation States */
.stale-result{opacity:.72;filter:grayscale(20%);transition:opacity .2s ease}
.stale-banner{margin:0 0 6px;font-size:.74rem;padding:4px 8px}
#calculate-button.needs-recalc{box-shadow:0 0 0 3px rgba(0,81,134,0.4);border-color:var(--brand);font-weight:700}

/* Responsive adjustments */
@media(max-width:1350px){
  #pricing-form .journey-workspace{grid-template-columns:minmax(0,1fr) 310px}
  .journey-bottom-grid{grid-template-columns:1fr}
}
@media(max-width:1100px){
  #pricing-form .journey-workspace{grid-template-columns:minmax(0,1fr)}
  .journey-output{position:static}
  .journey-output .metric .value{font-size:1.15rem}
  #pricing-form #step-basic .panel-body{grid-template-columns:1fr 1fr}
  #pricing-form #step-cost .panel-body{grid-template-columns:1fr}
}
@media(max-width:760px){
  .journey-legs-grid{grid-template-columns:1fr}
  .journey-toolbar{gap:4px}
  .journey-jumps{display:grid;grid-template-columns:repeat(3,1fr);width:100%;gap:4px}
  .journey-jumps button{min-height:38px;padding:5px 4px;font-size:.74rem}
  .journey-toolbar>[data-action=reset-price]{margin-left:auto}
  .journey-overview{width:100%;justify-content:space-around}
  .leg-metrics-3col{grid-template-columns:1fr 1fr}
  .leg-metrics-3col>:last-child{grid-column:1/-1}
  #pricing-form .journey-leg .leg-allowance>.form-grid{grid-template-columns:1fr}
  .allowance-combobox{flex-direction:row}
  #pricing-form #step-basic .panel-body{grid-template-columns:1fr}
  #pricing-form #step-price .sales-fields{grid-template-columns:1fr}
}
@media(max-width:430px){
  .leg-metrics-3col{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}
@media(max-width:900px){
  .shell:has(#pricing-form) .sidebar{padding:8px 12px}
  .shell:has(#pricing-form) .sidebar .brand{margin-bottom:6px}
  .shell:has(#pricing-form) .brand-logo{width:120px;padding:0}
  .shell:has(#pricing-form) .topbar{min-height:44px}
  .workspace:has(#pricing-form){padding-top:10px}
  .workspace:has(#pricing-form) .page-head{margin-bottom:8px}
  .workspace:has(#pricing-form) .page-head .eyebrow{display:none}
  .workspace:has(#pricing-form) .page-head h1{font-size:1.15rem;margin-bottom:3px}
  .workspace:has(#pricing-form)>.tabs{margin-bottom:8px}
  .journey-toolbar{margin-bottom:8px;gap:2px;position:sticky;top:0;z-index:25;background:#f3f6fa;padding:3px 0;border-bottom:1px solid #dbe3ea}
  .journey-jumps button[data-jump=step-result]{background:var(--soft);color:var(--brand);font-weight:700}
  .journey-jumps{display:flex;flex-wrap:nowrap;overflow-x:auto;width:100%;max-width:100%;padding:2px;scrollbar-width:thin}
  .journey-jumps button{flex-shrink:0;padding:5px 7px}
}

/* =========================================================
   QUOTE DETAIL VIEW (Modern ERP Executive Redesign)
   ========================================================= */
.detail-view-wrap{max-width:1600px;margin:0 auto}
.quote-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px;flex-wrap:wrap}
.quote-head-info .eyebrow{font-size:.73rem;font-weight:700;letter-spacing:1.5px;color:var(--brand);text-transform:uppercase;margin-bottom:4px}
.quote-head-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:4px}
.quote-head-title-row h1{font-size:1.65rem;font-weight:700;letter-spacing:-.5px;margin:0;color:var(--ink)}
.quote-head-meta{font-size:.86rem;color:var(--muted);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.quote-head-meta strong{color:#334155}
.quote-detail-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.quote-detail-actions button{padding:8px 13px;font-size:.85rem;font-weight:600;border-radius:6px;min-height:38px}

.quote-detail-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,1fr);gap:18px;align-items:start}
.quote-detail-left{display:flex;flex-direction:column;gap:16px;min-width:0}
.quote-detail-right{display:flex;flex-direction:column;gap:16px;min-width:0;position:sticky;top:16px;max-height:calc(100vh - 32px);overflow-y:auto;scrollbar-width:thin}
/* Keep full card content accessible through the sidebar scroll area. */
.quote-detail-right > *{flex-shrink:0}

.detail-card{background:#fff;border:1px solid var(--line);border-radius:9px;overflow:hidden;margin-bottom:0!important}
.detail-card .panel-title{padding:12px 16px;background:#fbfcfd;border-bottom:1px solid #edf1f5;display:flex;align-items:center;justify-content:space-between;gap:8px}
.detail-card .panel-title h2,.detail-card .panel-title h3{font-size:.88rem;font-weight:650;margin:0;color:var(--ink);display:flex;align-items:center;gap:6px}
.detail-card .panel-body{padding:14px 16px}

.route-specs-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px;padding:11px 14px;margin-bottom:10px}
.route-spec-item{display:flex;flex-direction:column}
.route-spec-item .spec-label{font-size:.7rem;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);font-weight:600;margin-bottom:2px}
.route-spec-item .spec-val{font-size:.88rem;font-weight:650;color:var(--ink);overflow-wrap:anywhere}
.customer-detail-strip{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:.8rem;color:var(--muted);padding-top:8px;border-top:1px dashed #e2e8f0}
.customer-detail-strip span strong{color:#334155}

.detail-legs-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.detail-leg-card{border:1px solid #e2e8f0;border-radius:7px;background:#fff;overflow:hidden;display:flex;flex-direction:column}
.detail-leg-head{padding:8px 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2e8f0;font-size:.82rem;font-weight:700}
.detail-leg-head.outbound{background:#f0f7fd;color:#005186;border-bottom-color:#d0e6f7}
.detail-leg-head.return{background:#f8fafc;color:#334155}
.detail-leg-route{padding:10px 12px;display:flex;align-items:center;gap:8px;background:#fbfcfd;border-bottom:1px solid #f1f5f9;font-size:.9rem}
.detail-leg-route .pt{font-weight:700;color:var(--ink)}
.detail-leg-route .arrow{color:var(--brand);font-weight:700;font-size:1rem}
.detail-leg-stats{display:grid;grid-template-columns:1fr 1fr;gap:7px 10px;padding:10px 12px;font-size:.8rem}
.detail-leg-stat{display:flex;flex-direction:column}
.detail-leg-stat span{font-size:.7rem;color:var(--muted);margin-bottom:1px}
.detail-leg-stat strong{font-weight:650;color:var(--ink)}

.detail-sub-table{width:100%;border-collapse:collapse;font-size:.8rem;margin-top:4px}
.detail-sub-table th{background:#f8fafc;padding:6px 8px;font-size:.74rem;color:#475569;text-align:left;border-bottom:1px solid #e2e8f0;font-weight:650}
.detail-sub-table td{padding:7px 8px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
.detail-sub-table td.num{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}

.hero-finance-card{background:#fff;border:1px solid #cbd5e1;border-radius:9px;box-shadow:0 3px 10px rgba(0,0,0,0.04);overflow:hidden}
.hero-total-banner{background:linear-gradient(135deg,#002d4d 0%,#005186 100%);color:#fff;padding:16px 18px;text-align:center}
.hero-total-banner .total-lbl{font-size:.72rem;text-transform:uppercase;letter-spacing:1px;opacity:.9;font-weight:650;margin-bottom:4px}
.hero-total-banner .total-val{font-size:1.75rem;font-weight:750;letter-spacing:-.4px;font-variant-numeric:tabular-nums;color:#fff}
.hero-total-banner small{display:block;font-size:.7rem;opacity:.8;margin-top:3px}
.hero-finance-metrics{padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.finance-row{display:flex;justify-content:space-between;align-items:center;font-size:.84rem;padding:3px 0}
.finance-row.divider{border-top:1px solid #e2e8f0;padding-top:8px;margin-top:2px}
.finance-row .lbl{color:#475569}
.finance-row .val{font-weight:650;font-variant-numeric:tabular-nums;color:var(--ink)}
.finance-row .val.highlight{font-size:1rem;color:var(--brand)}
.finance-row .val.profit-pos{color:#087a55}
.finance-row .val.profit-neg{color:#dc2626}
.hero-finance-actions{padding:12px 16px 16px;background:#f8fafc;border-top:1px solid #e2e8f0;display:flex;flex-direction:column;gap:7px}
.hero-finance-actions button{width:100%;padding:9px 14px;font-size:.88rem;font-weight:650;display:flex;align-items:center;justify-content:center;gap:6px;min-height:38px}

@media(max-width:1100px){
  .quote-detail-grid{grid-template-columns:1fr}
  .quote-detail-right{position:static;max-height:none}
}
@media(max-width:760px){
  .detail-legs-grid{grid-template-columns:1fr}
  .route-specs-grid{grid-template-columns:1fr 1fr}
  .leg-metrics-3col,.leg-metrics-2col{grid-template-columns:1fr}
}
@media(max-width:480px){
  .route-specs-grid{grid-template-columns:1fr}
}

/* =========================================================
   MULTI-STOP / WAYPOINTS SECTION (Phương án 2)
   ========================================================= */
.multistop-section{margin-top:4px;padding:5px 6px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px}
.multistop-header{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.multistop-header-left{display:flex;align-items:center;gap:6px}
.multistop-header-left strong{font-size:.75rem;color:#334155}
.multistop-badge{font-size:.64rem;font-weight:700;text-transform:uppercase;background:#e0f2fe;color:#0369a1;padding:1px 4px;border-radius:3px;letter-spacing:.3px}
.multistop-count-label{font-size:.7rem;color:#005186;font-weight:650}
.btn-add-stop{padding:2px 7px;font-size:.7rem;min-height:22px;border-radius:4px;background:#fff;border:1px solid #cbd5e1;color:var(--brand);font-weight:600;cursor:pointer;transition:all .15s ease}
.btn-add-stop:hover{background:var(--soft);border-color:var(--brand)}
.multistop-table-wrap{margin-top:5px;overflow-x:auto;background:#fff;border:1px solid #e2e8f0;border-radius:4px;scrollbar-width:thin}
.multistop-table{width:100%;min-width:440px;border-collapse:collapse;font-size:.73rem}
.multistop-table th{background:#f8fafc;color:#475569;font-weight:650;padding:3px 4px;border-bottom:1px solid #cbd5e1;border-right:1px solid #f1f5f9;font-size:.68rem}
.multistop-table td{padding:2px 2px;border-bottom:1px solid #f1f5f9;border-right:1px solid #f8fafc;vertical-align:middle}
.multistop-table .stop-input{min-height:22px!important;padding:1px 3px!important;font-size:.72rem!important}
.multistop-total-row td{background:#f1f5f9;padding:4px 5px;border-top:1px solid #cbd5e1;font-size:.73rem}
.multistop-total-label{font-weight:700;color:#1e293b;text-align:right}
.multistop-sync-hint{color:#005186;font-size:.66rem;font-weight:600;text-align:center}
.multistop-footer-actions{display:flex;justify-content:space-between;align-items:center;padding:3px 6px;background:#fafbfc;border-top:1px solid #edf1f5;gap:6px}
.multistop-hint-text{font-size:.68rem;color:#64748b;font-style:italic}
.btn-add-stop-inline{padding:2px 6px;font-size:.7rem;min-height:20px;background:transparent;border:1px dashed #cbd5e1;color:var(--brand);border-radius:3px;cursor:pointer}
.btn-add-stop-inline:hover{background:#fff;border-color:var(--brand)}

.detail-multistop-wrap{margin-top:8px;border-top:1px dashed #e2e8f0;padding-top:6px;overflow-x:auto;scrollbar-width:thin}
.detail-multistop-title{display:flex;align-items:center;gap:6px;margin-bottom:5px;font-size:.76rem;color:#334155}
.multistop-summary-table{width:100%;min-width:440px;font-size:.74rem;border-collapse:collapse}
.multistop-summary-table th{background:#f8fafc;padding:4px 5px;font-size:.7rem;color:#475569;border-bottom:1px solid #cbd5e1}
.multistop-summary-table td{padding:4px 5px;border-bottom:1px solid #f1f5f9}
.stop-action-pill{display:inline-block;padding:1px 4px;font-size:.66rem;font-weight:600;background:#f1f5f9;color:#475569;border-radius:3px}
.detail-stops-total-row td{background:#f8fafc;border-top:1px solid #cbd5e1;font-size:.74rem;padding:5px 6px}

/* =========================================================
   ODOO-STYLE SALES QUOTATION & ORDER LINES (Tạo Báo Giá Tổng Hợp)
   ========================================================= */
.odoo-sheet-wrap{background:#f8fafc;min-height:calc(100vh - 50px);padding:16px 24px 60px}
.odoo-control-panel{max-width:1240px;margin:0 auto 16px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.odoo-cp-left{display:flex;align-items:center;gap:10px}
.odoo-btn-save{background:#005186;color:#fff;border:none;padding:7px 18px;border-radius:6px;font-size:.84rem;font-weight:650;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:background .15s}
.odoo-btn-save:hover{background:#003e68}
.odoo-btn-back{background:#fff;border:1px solid #cbd5e1;color:#334155;padding:7px 14px;border-radius:6px;font-size:.84rem;cursor:pointer;font-weight:600;transition:all .15s}
.odoo-btn-back:hover{background:#f1f5f9;border-color:#94a3b8}

/* Odoo Status Pipeline Ribbon */
.odoo-statusbar{display:inline-flex;align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:6px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,0.03)}
.odoo-status-step{padding:6px 14px;font-size:.76rem;font-weight:600;color:#64748b;background:#fff;position:relative;display:flex;align-items:center;gap:6px;border-right:1px solid #e2e8f0;transition:all .15s}
.odoo-status-step:last-child{border-right:none}
.odoo-status-step.active{background:#005186;color:#fff;font-weight:700}
.odoo-status-step.done{color:#005186;background:#edf5fb}

/* The Document Paper Sheet */
.odoo-sheet{max-width:1240px;margin:0 auto;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 20px -2px rgba(0,0,0,0.05),0 2px 6px -1px rgba(0,0,0,0.03);padding:28px 36px}
.odoo-sheet-title-row{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}
.odoo-doc-badge{font-size:.72rem;text-transform:uppercase;font-weight:700;color:#005186;letter-spacing:.6px;margin-bottom:2px}
.odoo-sheet-title{font-size:1.65rem;font-weight:750;color:#0f172a;margin:0;line-height:1.2}
.odoo-sheet-subtitle{font-size:.82rem;color:#64748b;margin-top:3px}

/* 2-Column Metadata Grid */
.odoo-header-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:24px 40px;padding-bottom:22px;border-bottom:1px solid #f1f5f9;margin-bottom:20px}
.odoo-field-row{display:grid;grid-template-columns:130px 1fr;gap:8px 12px;align-items:center;margin-bottom:10px}
.odoo-field-label{font-size:.82rem;font-weight:600;color:#475569}
.odoo-field-label.required::after{content:' *';color:#e11d48}
.odoo-field-ctrl select,.odoo-field-ctrl input{width:100%;min-height:34px;padding:5px 10px;font-size:.84rem;border:1px solid #cbd5e1;border-radius:5px;background:#fff;transition:all .15s}
.odoo-field-ctrl select:focus,.odoo-field-ctrl input:focus{border-color:#005186;box-shadow:0 0 0 3px rgba(37,139,207,0.25);outline:none}
.odoo-partner-card{margin-top:6px;padding:8px 12px;background:#f8fafc;border-left:3px solid #005186;border-radius:4px;font-size:.78rem;color:#475569;line-height:1.5}
.odoo-partner-card strong{color:#1e293b}

/* Notebook / Tabs */
.odoo-notebook-tabs{display:flex;gap:4px;border-bottom:2px solid #e2e8f0;margin-bottom:16px}
.odoo-tab-btn{padding:8px 18px;font-size:.84rem;font-weight:650;color:#64748b;background:transparent;border:none;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;transition:all .15s}
.odoo-tab-btn:hover{color:#005186}
.odoo-tab-btn.active{color:#005186;border-bottom-color:#005186}

/* Order Lines Table */
.odoo-table-wrap{border:1px solid #e2e8f0;border-radius:6px;overflow-x:auto;margin-bottom:14px;background:#fff;min-height:360px;padding-bottom:24px}
.odoo-lines-table{width:100%;min-width:980px;border-collapse:collapse;font-size:.82rem}
.odoo-lines-table th{background:#f8fafc;color:#475569;font-weight:700;padding:10px 10px;border-bottom:2px solid #cbd5e1;font-size:.76rem;text-transform:uppercase;letter-spacing:.2px}
.odoo-lines-table td{padding:8px 8px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
.odoo-line-row{transition:background .1s}
.odoo-line-row:hover{background:#f8fafc}
.odoo-route-cell{min-width:240px}
.odoo-route-title{font-weight:650;color:#0f172a;display:flex;align-items:center;gap:6px;margin-bottom:2px}
.odoo-pa-pill{cursor:pointer;display:inline-flex;align-items:center;gap:3px;background:#e0f2fe;color:#0369a1;padding:2px 7px;border-radius:4px;font-size:.7rem;font-weight:700;letter-spacing:.3px;transition:all .15s;border:1px solid #bae6fd}
button.odoo-pa-pill{font-family:inherit;line-height:1.2;outline:none}
.odoo-pa-pill:hover{background:#0284c7;color:#fff;border-color:#0284c7}
.odoo-cost-tag{display:inline-flex;align-items:center;gap:4px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:4px;padding:1px 6px;font-size:.7rem;color:#475569}
.odoo-cost-tag .pos{color:#166534;font-weight:700}
.odoo-cost-tag .neg{color:#e11d48;font-weight:700}
.odoo-route-meta{font-size:.74rem;color:#64748b;display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:4px}
.odoo-btn-detail{display:inline-flex;align-items:center;gap:4px;background:#f1f5f9;color:#005186;border:1px solid #cbd5e1;padding:3px 8px;border-radius:4px;font-size:.74rem;font-weight:600;cursor:pointer;transition:all .15s}
.odoo-btn-detail:hover{background:#005186;color:#fff;border-color:#005186}
.odoo-cell-input{width:100%;min-height:30px!important;padding:3px 6px!important;font-size:.82rem!important;border:1px solid #cbd5e1!important;border-radius:4px!important}
.odoo-cell-input:focus{border-color:#005186!important;background:#fff!important;outline:none;box-shadow:0 0 0 2px rgba(37,139,207,0.25)}
.odoo-cell-del{background:transparent;border:none;color:#94a3b8;font-size:1.1rem;cursor:pointer;padding:2px 6px;border-radius:3px;transition:all .15s}
.odoo-cell-del:hover{color:#e11d48;background:#ffe4e6}

/* Integrated Discount Group in Cell */
.odoo-discount-group{display:inline-flex;align-items:center;width:100%;border:1px solid #cbd5e1;border-radius:4px;overflow:hidden;background:#fff;transition:border-color .15s}
.odoo-discount-group:focus-within{border-color:#005186;box-shadow:0 0 0 2px rgba(37,139,207,0.25)}
.odoo-discount-group input{border:none!important;width:100%;text-align:right;padding:3px 6px!important;min-height:28px!important;font-size:.82rem!important;outline:none!important}
.odoo-discount-group select{border:none!important;border-left:1px solid #e2e8f0!important;background:#f8fafc;font-size:.76rem;padding:0 4px;height:30px;color:#475569;font-weight:600;cursor:pointer;outline:none!important}

/* Bottom Grid: Terms & Odoo Totals */
.odoo-bottom-grid{display:grid;grid-template-columns:1fr 420px;gap:32px;align-items:start;margin-top:20px;padding-top:16px;border-top:1px solid #f1f5f9}
.odoo-terms-box label{font-size:.82rem;font-weight:650;color:#334155;display:block;margin-bottom:6px}
.odoo-terms-box textarea{width:100%;min-height:130px;padding:8px 12px;font-size:.82rem;border:1px solid #cbd5e1;border-radius:6px;line-height:1.5;color:#334155}
.odoo-totals-card{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:18px 22px;box-shadow:0 1px 3px rgba(0,0,0,0.04)}
.odoo-totals-tbl{width:100%;border-collapse:collapse;font-size:.84rem}
.odoo-totals-tbl td{padding:6px 0;vertical-align:middle}
.odoo-totals-tbl .lbl{color:#475569}
.odoo-totals-tbl .val{text-align:right;font-weight:600;color:#0f172a;font-variant-numeric:tabular-nums}
.odoo-order-disc-group{display:inline-flex;align-items:center;gap:4px}
.odoo-order-disc-group input{width:62px;height:26px;padding:2px 4px;font-size:.78rem;text-align:right;border:1px solid #cbd5e1;border-radius:4px}
.odoo-order-disc-group input:focus{border-color:#005186;outline:none}
.odoo-order-disc-group select{height:26px;font-size:.75rem;border:1px solid #cbd5e1;border-radius:4px;padding:0 4px;font-weight:600}
.odoo-totals-tbl .divider td{border-top:1px dashed #e2e8f0;padding-top:8px}
.odoo-totals-tbl .grand-total td{border-top:2px solid #0f172a;border-bottom:2px solid #0f172a;padding:10px 0;font-size:1.05rem}
.odoo-totals-tbl .grand-total .val{font-size:1.25rem;font-weight:800;color:#005186}
.odoo-internal-ribbon{margin-top:14px;padding:9px 12px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:6px;font-size:.76rem;color:#166534;display:flex;justify-content:space-between;align-items:center}

/* Costing Option Detail Modal */
.odoo-modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,0.45);z-index:999;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(2px)}
.odoo-modal-card{background:#fff;border-radius:8px;box-shadow:0 25px 50px -12px rgba(0,0,0,0.25);width:100%;max-width:860px;max-height:90vh;display:flex;flex-direction:column;overflow:hidden;border:1px solid #cbd5e1}
.odoo-modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.odoo-modal-head h3{margin:0;font-size:1rem;color:#0f172a;display:flex;align-items:center;gap:8px}
.odoo-modal-close{background:transparent;border:none;font-size:1.4rem;color:#94a3b8;cursor:pointer;line-height:1;padding:2px 6px;border-radius:4px}
.odoo-modal-close:hover{color:#0f172a;background:#e2e8f0}
.odoo-modal-body{padding:18px 24px;overflow-y:auto;scrollbar-width:thin}
.odoo-modal-foot{padding:12px 20px;background:#f8fafc;border-top:1px solid #e2e8f0;display:flex;justify-content:flex-end;gap:10px}
.odoo-modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.odoo-modal-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:12px 14px}
.odoo-modal-box h4{margin:0 0 8px;font-size:.82rem;font-weight:700;color:#334155;text-transform:uppercase;letter-spacing:.3px}
.odoo-modal-spec-row{display:flex;justify-content:space-between;padding:3px 0;font-size:.78rem;border-bottom:1px dashed #edf1f5}
.odoo-modal-spec-row:last-child{border-bottom:none}
.odoo-modal-spec-row .lbl{color:#64748b}
.odoo-modal-spec-row .val{font-weight:600;color:#0f172a}
.odoo-modal-table{width:100%;border-collapse:collapse;font-size:.78rem;margin-top:6px}
.odoo-modal-table th{background:#e2e8f0;padding:5px 8px;color:#334155;font-weight:650;text-align:left}
.odoo-modal-table td{padding:5px 8px;border-bottom:1px solid #edf1f5}
.odoo-modal-table tr:last-child td{border-bottom:none;font-weight:700;background:#f1f5f9}

/* Odoo Action Links (Add a line / Catalog) */
.odoo-table-actions{display:flex;align-items:center;gap:18px;padding:12px 6px 8px;border-top:1px solid #f1f5f9;background:#fff}
.odoo-action-link{background:transparent;border:none;color:#005186;font-size:.83rem;font-weight:600;cursor:pointer;padding:4px 8px;border-radius:4px;display:inline-flex;align-items:center;gap:5px;transition:all .15s}
.odoo-action-link:hover{background:#ebf4fb;text-decoration:underline}

/* Inline Route Autocomplete */
.odoo-autocomplete-wrap{position:relative;width:100%}
.odoo-route-search-box{position:relative;display:flex;align-items:center;width:100%}
.odoo-route-search-input{width:100%;min-height:30px;padding:3px 44px 3px 8px;font-size:.82rem;font-weight:600;border:1px solid #cbd5e1;border-radius:4px;background:#fff;transition:border-color .15s}
.odoo-route-search-input:focus{border-color:#005186;outline:none;box-shadow:0 0 0 2px rgba(37,139,207,0.25)}
.odoo-route-input-icons{position:absolute;right:4px;display:inline-flex;align-items:center;gap:2px}
.odoo-icon-btn{background:transparent;border:none;color:#94a3b8;font-size:.8rem;padding:2px 4px;cursor:pointer;border-radius:3px;display:inline-flex;align-items:center;justify-content:center}
.odoo-icon-btn:hover{color:#005186;background:#f1f5f9}

.odoo-autocomplete-dropdown .odoo-dropdown-item{padding:8px 12px;cursor:pointer;border-bottom:1px solid #f8fafc;display:flex;flex-direction:column;gap:3px;transition:background .1s}
.odoo-autocomplete-dropdown .odoo-dropdown-item:hover,.odoo-autocomplete-dropdown .odoo-dropdown-item.active{background:#ebf4fb}
.odoo-dd-title{font-weight:650;color:#0f172a;display:flex;align-items:center;justify-content:space-between;gap:8px}
.odoo-dd-title .price{color:#005186;font-weight:700;font-variant-numeric:tabular-nums}
.odoo-dd-meta{font-size:.73rem;color:#64748b;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.odoo-dd-footer{padding:8px 12px;background:#f8fafc;border-top:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;gap:8px}
.odoo-dd-search-more{color:#005186;font-weight:650;font-size:.78rem;cursor:pointer;background:transparent;border:none;display:inline-flex;align-items:center;gap:4px;padding:2px 4px}
.odoo-dd-search-more:hover{text-decoration:underline}
.odoo-dd-hint{font-size:.7rem;color:#94a3b8;padding:3px 12px 5px;background:#f8fafc;border-top:1px dashed #e2e8f0;text-align:right}
.odoo-dd-empty{padding:12px;text-align:center;color:#64748b;font-size:.78rem;font-style:italic}

/* Full Catalog Modal */
.odoo-catalog-card{max-width:1080px;width:100%}
.odoo-catalog-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.odoo-catalog-pills{display:inline-flex;background:#f1f5f9;border-radius:6px;padding:2px;gap:2px}
.odoo-cat-pill{padding:5px 12px;border:none;background:transparent;font-size:.78rem;font-weight:600;color:#64748b;border-radius:5px;cursor:pointer;transition:all .15s}
.odoo-cat-pill.active{background:#fff;color:#005186;font-weight:700;box-shadow:0 1px 3px rgba(0,0,0,0.06)}
.odoo-cat-search-box{display:flex;align-items:center;flex:1;max-width:460px;min-width:240px;position:relative}
.odoo-cat-search-input{width:100%;height:34px;padding:4px 10px;font-size:.82rem;border:1px solid #cbd5e1;border-radius:6px}
.odoo-cat-search-input:focus{border-color:#005186;outline:none;box-shadow:0 0 0 2px rgba(37,139,207,0.25)}
.odoo-catalog-table-wrap{border:1px solid #e2e8f0;border-radius:6px;overflow-x:auto;max-height:480px;scrollbar-width:thin}
.odoo-catalog-table{width:100%;border-collapse:collapse;font-size:.8rem}
.odoo-catalog-table th{background:#f8fafc;padding:8px 10px;border-bottom:2px solid #cbd5e1;font-size:.74rem;color:#475569;font-weight:700;text-transform:uppercase;position:sticky;top:0;z-index:2}
.odoo-catalog-table td{padding:8px 10px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
.odoo-catalog-row{cursor:pointer;transition:background .1s}
.odoo-catalog-row:hover{background:#f0f7fc}
.odoo-cat-btn-pick{background:#005186;color:#fff;border:none;padding:5px 12px;border-radius:4px;font-size:.76rem;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .15s}
.odoo-cat-btn-pick:hover{background:#003e68}
.odoo-badge-km{display:inline-block;padding:2px 6px;background:#f1f5f9;color:#334155;border-radius:4px;font-size:.72rem;font-weight:600}
.odoo-badge-toll{display:inline-block;padding:2px 6px;background:#eff6ff;color:#1d4ed8;border-radius:4px;font-size:.72rem;font-weight:600}

/* Pricing Costing Search Picker */
.costing-search-picker-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:12px 14px;margin-bottom:12px}
.costing-picker-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;flex-wrap:wrap;gap:8px}
.costing-picker-label{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:.85rem;color:#1e293b}
.costing-count-pill{font-size:.73rem;font-weight:600;color:#005186;background:#ebf4fb;padding:2px 8px;border-radius:12px}
.costing-search-row{display:flex;gap:8px;align-items:center}
.costing-search-row .odoo-route-search-input{height:34px;font-size:.83rem}
.costing-search-row button#apply-costing-history{flex-shrink:0;white-space:nowrap}
.odoo-catalog-card{max-width:1120px;width:95vw}
.costing-selected-banner{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 12px;background:#e0f2fe;border:1px solid #bae6fd;border-radius:6px;font-size:.8rem;color:#0369a1;margin-top:8px}
.costing-selected-banner .btn-clear-costing{background:transparent;border:none;color:#0284c7;font-size:.95rem;cursor:pointer;padding:0 6px;font-weight:bold;line-height:1;border-radius:4px}
.costing-selected-banner .btn-clear-costing:hover{color:#b91c1c;background:rgba(239,68,68,0.1)}

.qb-vat-option{display:flex;align-items:center;gap:8px;cursor:pointer}
.qb-vat-option input{width:auto;min-height:0}
/* Shared quotation option picker. External CSS is required by the app CSP. */
.catalog-backdrop{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.55)}
.catalog-backdrop[hidden]{display:none}
.catalog-backdrop .catalog-card{display:flex;flex-direction:column;width:min(1320px,100%);max-width:100%;height:min(850px,calc(100dvh - 48px));min-height:0;margin:0;background:#fff;color:#172b43;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 24px 70px rgba(15,23,42,.3);overflow:hidden;font-size:15px;line-height:1.45}
.cat-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid #dbe3ed;background:#fff;flex-shrink:0}
.cat-header h2{font-size:21px;line-height:1.3;margin:0;color:#123957}
.cat-header p{font-size:14px;margin:5px 0 0;color:#526176}
#cat-close-btn{min-width:40px;min-height:40px;padding:0;font-size:26px;background:#f1f5f9;color:#334155;border:1px solid #d4dce6}
.cat-controls{padding:16px 24px;flex-shrink:0;background:#f8fafc;border-bottom:1px solid #dbe3ed}
.cat-controls>label{display:block;font-size:14px;font-weight:650;margin-bottom:6px}
.cat-search-box{display:flex;align-items:center;gap:8px}
#cat-search-input{font-size:16px;min-height:44px;flex:1;min-width:0;background:#fff;padding:9px 12px;border:1px solid #aab9c9;border-radius:6px}
.cat-search-box button{font-size:14px;min-height:44px}
.cat-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;font-size:14px}
.cat-filters>span{font-weight:600;color:#526176}
.cat-pill-btn{padding:7px 12px;font-size:14px;min-height:36px;line-height:1.35;border:1px solid #bbc9d7;border-radius:6px;background:#fff;color:#334155}
.cat-pill-btn[aria-pressed=true]{background:#005186;color:#fff;border-color:#005186}
.cat-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 24px;flex-shrink:0;border-bottom:1px solid #dbe3ed;font-size:14px;color:#475569;background:#fff}
.cat-pagination>div{display:flex;align-items:center;gap:12px}
.cat-pagination button{font-size:14px;min-height:36px}
.cat-table-wrap{flex:1;min-height:0;overflow:auto;background:#fff;scrollbar-width:thin}
.cat-table{width:100%;min-width:1080px;table-layout:fixed;font-size:15px;border-collapse:separate;border-spacing:0}
.cat-table th{position:sticky;top:0;z-index:1;background:#edf3f8;color:#334155;font-size:13px;line-height:1.4;text-transform:none;letter-spacing:0;padding:12px 14px;white-space:normal;border-bottom:1px solid #c3d1df}
.cat-table td{font-size:15px;line-height:1.45;padding:16px 14px;color:#334155;border-bottom:1px solid #e2e8f0;vertical-align:middle;overflow-wrap:anywhere}
.cat-table th:nth-child(1){width:13%}
.cat-table th:nth-child(2){width:30%}
.cat-table th:nth-child(3){width:11%}
.cat-table th:nth-child(4){width:14%}
.cat-table th:nth-child(5){width:13%;text-align:right}
.cat-table th:nth-child(6){width:19%}
.cat-table tbody tr:nth-child(even){background:#f8fafc}
.cat-table tbody tr:hover{background:#edf6fc}
.cat-table .cat-code{font-size:14px;font-weight:700;color:#005186}
.cat-lock{display:block;width:fit-content;margin-top:6px;padding:2px 6px;border:1px solid #d4dee8;border-radius:4px;font-size:12px;font-weight:500;background:#f1f5f9;color:#526176}
.cat-name{font-weight:650;color:#172b43;font-size:16px}
.cat-route{margin-top:5px;font-size:14px;color:#526176}
.cat-equipment{font-size:14px}
.cat-table .cat-price{font-size:15px;text-align:right;font-weight:700;color:#005186;white-space:nowrap;font-variant-numeric:tabular-nums}
.cat-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cat-actions button{font-size:14px;min-height:38px;padding:7px 10px;white-space:nowrap}
.cat-action-view{background:#fff;border-color:#b8c8d7;color:#234c6b}
.cat-action-pick{background:#005186;color:#fff;border-color:#005186}
.cat-action-pick:hover{background:#003f69;color:#fff}
.catalog-card button:disabled{opacity:.5;cursor:default}
.catalog-card :is(button,input,[tabindex]):focus-visible{outline:3px solid #258bcf;outline-offset:2px}
.cat-table .cat-message{text-align:center;padding:48px 24px;font-size:16px;color:#526176}
@media(max-width:700px){
 .catalog-backdrop{padding:8px}
 .catalog-backdrop .catalog-card{height:calc(100dvh - 16px);border-radius:8px}
 .cat-header{padding:14px;gap:10px}
 .cat-header h2{font-size:19px}
 .cat-header p{font-size:13px}
 .cat-controls{padding:12px 14px}
 .cat-filters{gap:6px}
 .cat-pagination{padding:10px 14px;flex-wrap:wrap;gap:6px}
 .cat-pagination>div{width:100%;justify-content:space-between}
}

/* Relational PA picker: a bounded popup above the quotation table scroll area. */
#qb-table .qb-option-dropdown{display:none;position:fixed;z-index:1200;overflow:auto;background:#fff;border:1px solid #b8c8d8;border-radius:8px;box-shadow:0 10px 30px #102d4e29;color:#172b45;font-size:14px;text-align:left}
#qb-table .qb-option-dropdown .odoo-dropdown-item{width:100%;margin:0;border:0;border-radius:0;border-bottom:1px solid #e7edf4;background:#fff;text-align:left;white-space:normal;font-size:14px;line-height:1.5;padding:12px}
#qb-table .qb-option-dropdown .odoo-dropdown-item:hover,#qb-table .qb-option-dropdown .active{background:#eaf3ff;outline:2px solid #2878bb;outline-offset:-2px}
#qb-table .qb-option-dropdown .odoo-dd-title{align-items:flex-start;width:100%}
#qb-table .qb-option-dropdown .price{white-space:nowrap}
#qb-table .qb-option-dropdown .odoo-dd-meta{font-size:13px;color:#52647a}
#qb-table .qb-option-dropdown .odoo-dd-footer{flex-wrap:wrap;position:sticky;bottom:0}
#qb-table .qb-option-dropdown .odoo-dd-search-more,#qb-table .qb-option-dropdown .odoo-dd-empty{font-size:14px}
#qb-table .qb-option-dropdown .odoo-dd-hint{font-size:12px;color:#52647a;border:0;padding:0}
#qb-table .odoo-route-search-input{font-size:14px;min-height:36px}

#qb-table .qb-option-dropdown .odoo-dropdown-item{flex-direction:column!important;align-items:stretch!important;gap:5px}
