:root {
  --surface: #fff;
  --text-primary: #29445d;
  --text-secondary: #71859a;
  --border-subtle: #e2e9f0;
  --shadow-card: 0 3px 14px #253c5308;
}

body {
  color: var(--text-primary);
  background: #f3f6fa;
}

#app > header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  box-shadow: 0 2px 10px #253c530d;
}

.workspace {
  min-width: 0;
}

.tabs {
  position: sticky;
  top: var(--header-height, 88px);
  z-index: 10;
  background: #eaf0f6;
}

.tab {
  transition: background-color .15s ease, color .15s ease;
}

.tab:not(.active):hover {
  background: #dce7f1;
  color: #355f82;
}

main {
  padding: clamp(16px, 2.2vw, 30px);
}

.page-title {
  min-height: 48px;
  gap: 16px;
}

.page-title h1 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .1px;
}

.page-title p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.card,
.filter,
.toolbar,
.table-wrap,
.table-foot {
  border-color: var(--border-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.filter {
  gap: 12px;
  padding: 18px;
}

.filter label {
  color: #62798e;
  font-size: 12px;
}

input,
select,
textarea {
  border-color: #d3dee8;
  border-radius: 6px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: #76a7d0;
  box-shadow: 0 0 0 3px #4b89bd1c;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #347fba70;
  outline-offset: 2px;
}

.btn {
  border-radius: 6px;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.btn:not(:disabled):hover {
  border-color: #9fb8d0;
  background-color: #f2f7fb;
}

.btn.primary:not(:disabled):hover {
  border-color: #5e92c3;
  background-color: #5e92c3;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.toolbar {
  border-radius: 8px 8px 0 0;
}

.table-wrap {
  border-radius: 0 0 8px 8px;
}

th {
  background: #f0f5fa;
  color: #526f89;
  font-weight: 600;
}

td {
  color: #52677d;
}

tbody tr {
  transition: background-color .12s ease;
}

.table-foot {
  border-radius: 0 0 8px 8px;
}

.notice {
  gap: 12px;
  border-radius: 7px;
  line-height: 1.7;
}

.badge {
  border-radius: 5px;
  font-weight: 500;
}

dialog {
  border-radius: 10px;
}

.dialog-head {
  background: #f0f5fa;
}

@media (max-width: 900px) {
  main {
    padding: 16px;
  }

  .filter {
    padding: 14px;
  }
}

@media (max-width: 600px) {
  main {
    padding: 12px;
  }

  .page-title {
    flex-wrap: wrap;
  }

  .page-title h1 {
    font-size: 19px;
  }

  .filter {
    align-items: stretch;
  }

  .filter input,
  .filter select {
    max-width: 100%;
  }

  .toolbar,
  .table-foot {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Keep every business panel below the persistent application navigation. */
#app > header { position: sticky; top: 0; z-index: 100; }
#app > .workspace > .tabs { top: var(--header-height, 88px); z-index: 90; }
#app > .workspace > #main { position: relative; z-index: 0; isolation: isolate; }
#main header { position: static; top: auto; z-index: auto; }
#main .order-document-sections { top: calc(var(--header-height, 88px) + 32px); }

/* Align the tab strip and business document with the workspace edges. */
.workspace > .tabs > .workspace-tab-strip { padding-left: 0; }
#app > .workspace > #main:has(> #orderDocument) { padding: 0; }
#main > #orderDocument { margin: 0; width: 100%; max-width: none; min-height: calc(100vh - var(--header-height, 88px) - 32px); }

/* Match the sales list to the edge-aligned order documents. */
#app > .workspace > #main:has(> .sales-orders) { padding: 0; }
#main:has(> .sales-orders) > .page-title { min-height: 60px; margin: 0; padding: 10px 18px; background: #edf4fc; border: 1px solid #d5e1ee; display: flex; align-items: center; justify-content: space-between; }
#main:has(> .sales-orders) > .page-title h1 { margin: 0; font-size: 20px; font-weight: 500; }
#main:has(> .sales-orders) > .page-title p:empty { display: none; }
#main > .sales-orders { margin: 0; width: 100%; }
#orderDocument > .dialog-head > [data-action="dismiss"],
#orderDocument [data-section-back],
#orderDocument [data-car-back] { display: none !important; }
#orderDocument > .dialog-head > .btn:last-child { margin-left: auto; }

#app > .workspace > #main:has(> .unit-payable-review) { padding: 0; }
#main:has(> .unit-payable-review) > .page-title { min-height: 60px; margin: 0; padding: 10px 18px; border: 1px solid #d5e1ee; background: #edf4fc; display: flex; align-items: center; }
#main:has(> .unit-payable-review) > .page-title h1 { margin: 0; font-size: 20px; font-weight: 500; }
#main:has(> .unit-payable-review) > .page-title p:empty { display: none; }
#main > .unit-payable-review { width: 100%; margin: 0; border-radius: 0; box-shadow: none; min-height: calc(100vh - var(--header-height, 88px) - 92px); }
#main > .unit-payable-review > .table-wrap { border-radius: 0; box-shadow: none; }

#main > .unit-payable-review { display: flex; flex-direction: column; }
#main > .unit-payable-review > .menu-pagination { margin-top: auto; border-top: 1px solid #e2e9f0; padding: 8px 12px; display: flex; align-items: center; gap: 10px; }
#main .unit-review-filter { flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding: 4px 0; min-height: 38px; }
#main .unit-review-filter > * { flex-shrink: 0; }
#main .unit-review-filter input,#main .unit-review-filter select,#main .unit-review-filter .btn,#main .unit-review-status button { height: 30px; min-height: 30px; border-radius: 0; padding: 4px 8px; font-size: 12px; }
#main .unit-review-filter select { width: 102px; background: #fff; }
#main .unit-review-filter input[type=date] { width: 128px; }
#main .unit-review-filter input[name=q] { width: 140px; }
#main .unit-review-filter select[name=department] { width: 142px; }
#main .unit-review-filter .btn.primary { background: #139cf5; border-color: #139cf5; color: white; }
#main .unit-review-filter .unit-review-export { background: #4caf50; border-color: #4caf50; color: white; }
#main .unit-review-filter > [hidden] { display: none !important; }

/* Use black text for sidebar navigation and workspace tab labels. */
#navGroups summary,#navGroups details[open] > summary,
#navGroups .nav-item,#navGroups .nav-item.active,#navGroups .nav-item:hover,
#navGroups .nav-item span,#navGroups summary small,#navGroups .nav-item small,
.workspace > .tabs .tab,.workspace > .tabs .tab.active,
.workspace > .tabs .tab:hover,.workspace > .tabs .tab-label { color: #000 !important; }
#main > .unit-payable-review { min-height: calc(100vh - var(--header-height, 88px) - 32px); }

#main .unit-review-filter { justify-content: flex-start; }
#main .unit-review-filter > * { margin: 0; }

/* Enhanced date inputs must not expand to the full toolbar width. */
#main .unit-review-filter > .query-date-input { flex: 0 0 120px; width: 120px; min-width: 120px; max-width: 120px; }
#main .unit-review-filter > .query-date-input input { width: 100%; min-width: 0; max-width: none; }
#main .unit-review-filter .query-calendar-trigger { width: 24px; min-height: 0; height: 24px; padding: 0; }

#app > .workspace > #main:has(> .supplier-payable-details) { padding: 0; }
.supplier-detail-title { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; border:1px solid #d5e1ee; background:#edf4fc; }
.supplier-detail-title h1 { margin:0; font-size:18px; }
.supplier-detail-summary { padding:12px 18px; background:white; border-bottom:1px solid #d5e1ee; color:#000; }
.supplier-order-title { display:flex; align-items:center; gap:14px; padding:10px 12px; background:#edf4fc; color:#000; }
.supplier-order-title span { flex:1; white-space:normal; }
.supplier-order-details .table-wrap { border-radius:0; }
#main .supplier-order-details td { white-space:pre-wrap; }

.supplier-detail-block { margin:0; border:1px solid #d5e1ee; background:white; }
.supplier-detail-block > summary,.supplier-detail-block > h2 { padding:12px 16px; background:#edf4fc; color:#000; font-size:15px; font-weight:600; margin:0; }
.supplier-source-block > summary { cursor:pointer; }
.supplier-source-block > summary::after { content:'展开';float:right;font-size:12px; }
.supplier-source-block[open] > summary::after { content:'收起'; }
.supplier-detail-block [data-supplier-payment-form] .fields { grid-template-columns:repeat(3,minmax(0,1fr));padding:16px;gap:12px; }
.supplier-detail-block [data-supplier-payment-form] .hint,.supplier-detail-block .form-error { padding:0 16px 10px; }
.supplier-detail-block .unit-review-grid details p { margin:6px 0; color:#333; }
@media(max-width:800px){.supplier-detail-block [data-supplier-payment-form] .fields{grid-template-columns:1fr;}}

.supplier-collapsible-block > summary{cursor:pointer}.supplier-collapsible-block > summary::after{content:"展开";float:right;font-size:12px}.supplier-collapsible-block[open] > summary::after{content:"收起"}

/* Supplier detail sections use the compact blue gradient reference bar. */
.supplier-payable-details > .supplier-detail-block { margin: 6px 0 0; border: 1px solid #d0d9df; border-radius: 0; box-shadow: none; }
.supplier-payable-details > .supplier-detail-block > summary { display: flex; align-items: center; min-height: 30px; padding: 6px 12px; border: 0; border-bottom: 1px solid #c6dce7; border-radius: 0; background: linear-gradient(to bottom, #8dd3ef 0%, #a6def2 65%, #d4e9ed 100%); color: #111; font-size: 13px; font-weight: 400; line-height: 18px; list-style: none; }
.supplier-payable-details > .supplier-detail-block > summary::-webkit-details-marker { display: none; }
.supplier-payable-details > .supplier-detail-block > summary::before { content: '›'; width: 14px; margin-right: 6px; color: #111; font-size: 16px; text-align: center; }
.supplier-payable-details > .supplier-detail-block[open] > summary::before { transform: rotate(90deg); }
.supplier-payable-details > .supplier-detail-block > summary::after { margin-left: auto; float: none; color: #345c6e; font-size: 11px; }
.supplier-payable-details > .supplier-detail-block:not([open]) > summary { border-bottom: 0; }

/* Payment application: three fields per row with black text. */
.supplier-detail-block [data-supplier-payment-form] .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.supplier-detail-block [data-supplier-payment-form] .fields > label.wide { grid-column: auto; }
.supplier-detail-block [data-supplier-payment-form] label,
.supplier-detail-block [data-supplier-payment-form] input,
.supplier-detail-block [data-supplier-payment-form] select,
.supplier-detail-block [data-supplier-payment-form] textarea,
.supplier-detail-block [data-supplier-payment-form] .hint { color: #000; }
.supplier-detail-block [data-supplier-payment-form] input::placeholder,
.supplier-detail-block [data-supplier-payment-form] textarea::placeholder { color: #000; opacity: 1; }
.supplier-detail-block [data-supplier-payment-form] select { min-width: 0; width: 100%; }
@media(max-width:650px){.supplier-detail-block [data-supplier-payment-form] .fields{grid-template-columns:1fr;}}

.supplier-detail-block [data-supplier-payment-form] .fields > label { display: flex; flex-direction: row; align-items: center; gap: 6px; min-width: 0; }
.supplier-detail-block [data-supplier-payment-form] .supplier-field-label { flex: 0 0 126px; color: #000; white-space: nowrap; }
.supplier-detail-block [data-supplier-payment-form] .fields > label > input,
.supplier-detail-block [data-supplier-payment-form] .fields > label > select,
.supplier-detail-block [data-supplier-payment-form] .fields > label > textarea { flex: 1 1 0; min-width: 0; width: 0; color: #000; }

#main .order-payable-review .unit-review-grid{min-width:1800px}#main .order-payable-review .unit-review-grid td{max-width:240px;white-space:normal;overflow-wrap:anywhere}#main .order-payable-review .unit-review-grid th{white-space:nowrap}

#main .order-payable-review .unit-review-grid td.order-supplier-cell { padding:0; min-width:180px; }
.order-supplier-entry { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:4px; min-height:30px; padding:5px 8px; border-bottom:1px solid #ddd; background:#fff; }
.order-supplier-entry:nth-child(even) { background:#f2f2f2; }
.order-supplier-entry:last-child { border-bottom:0; }
#main .order-supplier-settlement.cash { color:#f44336; }
#main .order-supplier-settlement.monthly { color:#098a14; }

.supplier-order-title > [data-unit-order-kind] { margin-left: auto; flex-shrink: 0; }

.payable-review-actions{display:inline-flex;gap:8px;white-space:nowrap;align-items:center}
.payable-review-actions button{border:0;border-radius:2px;padding:4px 9px;color:#fff;font:inherit;cursor:pointer;line-height:1.3}
.payable-review-actions .review-approve{background:#2196f3}
.payable-review-actions .review-reject{background:#ff4d36}
.payable-review-actions .review-detail{background:#ffb900}
.payable-review-actions button:disabled{opacity:.45;cursor:default}

.supplier-review-application{padding:14px}
.supplier-review-application .fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.supplier-review-application .fields > label{display:flex;flex-direction:row;align-items:center;gap:6px;min-width:0;color:#000}
.supplier-review-application .supplier-field-label{flex:0 0 110px;white-space:nowrap;color:#000}
.supplier-review-application .fields > label > input{min-width:0;width:0;flex:1 1 0;color:#000}
@media(max-width:800px){.supplier-review-application .fields{grid-template-columns:1fr}}
.payable-review-actions .detail-approve{background:#21a66b}

.supplier-review-application .supplier-review-footer{display:flex;width:100%;justify-content:flex-end;margin-top:14px;padding:0;background:transparent;border:0;box-shadow:none}

#main .unit-review-grid tbody tr.payable-review-approved > td{background:#e8f5e9}
#main .unit-review-grid tbody tr.payable-review-returned > td{background:#eeeeee}

.payment-confirm-entry{border:0;background:#2196f3;color:#fff;border-radius:2px;padding:5px 12px;white-space:nowrap}
.payable-registration{background:#fff}
.payable-registration-head{display:flex;align-items:center;justify-content:flex-end;padding:12px 14px;color:#000}
.payable-registration-head>div{display:flex;gap:10px}.payable-registration .payment-add{background:#4caf50;color:#fff}
.payable-registration td{white-space:nowrap}.payment-posted{color:#168144}
.payment-registration-fields{padding:16px;grid-template-columns:repeat(3,minmax(0,1fr))}
.payment-registration-fields label{display:flex;flex-direction:row;align-items:center;gap:6px;min-width:0}
.payment-registration-fields label>span:not(.query-date-input){white-space:nowrap;flex:0 0 90px;color:#000}
.payment-registration-fields input,.payment-registration-fields select{min-width:0;width:0;flex:1}

.payment-registration-fields label>.query-date-input{flex:1 1 0;min-width:0;width:auto;color:#000}
.payment-registration-fields .query-date-input input{width:100%;min-width:0;flex:none;color:#000}
.submission-demo-actions .submission-demo-submit{background:#1890ff;color:#fff}
.submission-demo-actions button:disabled{opacity:.5;cursor:not-allowed}
.submission-demo-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:8px}
.submission-demo-field{display:flex;min-width:0;align-items:stretch;border:1px solid #ddd;color:#111}
.submission-demo-field>span{display:flex;align-items:center;justify-content:center;flex:0 0 116px;background:#fafafa;border-right:1px solid #ddd;padding:10px}
.submission-demo-field>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;flex:1;padding:8px 12px;overflow-wrap:anywhere}
.submission-demo-field input,.submission-demo-field select,.submission-demo-field textarea{width:100%;min-width:0;border-radius:0;color:#111}
.submission-demo-wide{grid-column:1/-1}
.submission-demo-wide textarea{min-height:64px;resize:vertical}
.submission-demo-upload{position:relative;overflow:hidden;background:#1890ff;color:#fff;border:0;cursor:pointer}
.submission-demo-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}
.submission-demo-detail #submissionDemoForm .unit-review-grid{min-width:1800px}
.submission-demo-detail .table-wrap{max-width:100%;overflow-x:auto}
.submission-demo-detail [data-demo-amount]{width:105px;min-width:0;border-radius:0}
.submission-demo-detail .unit-review-grid td{overflow-wrap:anywhere}
.submission-demo-detail .dialog-foot{position:static;justify-content:flex-end;padding:10px;background:white}
.submission-demo-detail .hint{margin:10px 16px}
#main .submission-demo-query{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;padding:6px 10px;background:#fff;overflow-x:auto;white-space:nowrap}
#main .submission-demo-query>span:not(.query-date-input){flex:0 0 auto;font-size:12px}
#main .submission-demo-query>.query-date-input{flex:0 0 128px;width:128px;min-width:128px}
#main .submission-demo-query input{width:128px;min-width:0;height:28px;padding:3px 6px;border-radius:0;font-size:12px}
#main .submission-demo-query>.query-date-input input{width:100%}
#main .submission-demo-query>[data-demo-q]{flex:0 0 180px;width:180px}
#main .submission-demo-query>.btn{flex:0 0 auto;min-height:28px;height:28px;padding:3px 10px;font-size:12px}
#main .submission-demo-query .query-calendar-trigger{height:24px;width:24px}
.submission-demo-detail .table-wrap tr[hidden]{display:none}
@media(max-width:900px){.submission-demo-info{grid-template-columns:1fr}}

/* Keep the workbench visible at the left edge when other tabs overflow. */
.workspace-tab-strip>.tab:has(>.tab-label[data-page="dashboard"]){position:sticky;left:0;z-index:2;background:#e8eff5}
.workspace-tab-strip>.tab.active:has(>.tab-label[data-page="dashboard"]){background:#fff}


/* Vehicle arrangement: compact two-row query bar, scoped away from other lists. */
#main .vehicle-query{display:grid;grid-template-columns:repeat(6,minmax(112px,1fr)) auto;align-items:center;gap:4px;margin:0;padding:6px 8px;background:#fff;overflow-x:auto;}
#main .vehicle-query.is-expanded{grid-template-columns:repeat(12,minmax(112px,1fr));}
#main .vehicle-query .vehicle-query-field{display:block;position:relative;margin:0;min-width:0;}
#main .vehicle-query:not(.is-expanded) .vehicle-query-extra{display:none;}
#main .vehicle-query input,#main .vehicle-query select{width:100%;min-width:0;height:28px;min-height:28px;padding:3px 7px;margin:0;border:1px solid #9fbaff;border-radius:3px;font-size:12px;line-height:20px;color:#111;background:#fff;box-sizing:border-box;}
#main .vehicle-query input::placeholder{color:#a0a6af;}
#main .vehicle-query .vehicle-query-search input{padding-right:25px;}
#main .vehicle-query .vehicle-query-search>span{position:absolute;right:7px;top:3px;font-size:18px;color:#7d8e9c;pointer-events:none;}
#main .vehicle-query .vehicle-query-actions{display:flex;gap:4px;align-items:center;white-space:nowrap;}
#main .vehicle-query.is-expanded .vehicle-query-actions{grid-column:span 3;}
#main .vehicle-query .btn{flex:0 0 auto;height:26px;min-height:26px;padding:2px 10px;border-radius:3px;font-size:12px;line-height:20px;color:#fff;border:1px solid transparent;}
#main .vehicle-query .vehicle-query-toggle{background:#2879af;border-color:#1b5780;}
#main .vehicle-query .vehicle-query-submit{background:#7773f4;}
#main .vehicle-query .vehicle-query-reset{background:#05ba95;}
#main .vehicle-query .query-date-input{display:block;width:100%;min-width:0;margin:0;}
#main .vehicle-query .query-calendar-trigger{height:26px;width:24px;top:1px;right:1px;transform:none;}

@media(max-width:1750px){#main .vehicle-query.is-expanded{grid-template-columns:repeat(6,minmax(112px,1fr));}}
@media(max-width:1100px){#main .vehicle-query,#main .vehicle-query.is-expanded{grid-template-columns:repeat(3,minmax(110px,1fr));}#main .vehicle-query .vehicle-query-actions{grid-column:span 3;}}
/* Vehicle arrangement selectors and manual multi-row entry. */
#main .vehicle-query .vehicle-picker-trigger,.vehicle-large-dialog .vehicle-picker-trigger{position:absolute;right:2px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;color:#66829f;cursor:pointer;font-size:22px;line-height:1}
#main .vehicle-query .vehicle-picker-trigger:hover,.vehicle-large-dialog .vehicle-picker-trigger:hover{color:#1677ff;background:#e6f2ff}
#main .vehicle-query-actions .vehicle-query-add{background:#2987df;color:#fff;border-color:#2987df}
#main .vehicle-query-actions .vehicle-query-print{background:#7875ee;color:#fff;border-color:#7875ee}
dialog.vehicle-large-dialog{box-sizing:border-box;width:98vw;max-width:2200px;height:92vh;max-height:96vh;margin:auto;padding:0;border:1px solid #abc3df;border-radius:5px;color:#000;background:#fff;overflow:hidden;font-size:13px}
dialog.vehicle-large-dialog[open]{display:flex;flex-direction:column}
dialog.vehicle-large-dialog::backdrop{background:rgb(0 0 0 / 28%)}
.vehicle-large-dialog>header{height:40px;min-height:40px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #dce5ef;position:relative;color:#182b4a}
.vehicle-large-dialog .vehicle-dialog-close{position:absolute;right:10px;top:5px;width:30px;height:30px;font-size:25px;border:0;background:transparent;color:#7a8996;cursor:pointer}
.vehicle-large-dialog .vehicle-picker-query{display:flex;flex-wrap:wrap;gap:4px;padding:10px 12px;margin:0;align-items:center;border-bottom:1px solid #bdd4f0}
.vehicle-large-dialog input,.vehicle-large-dialog select{box-sizing:border-box;min-width:0;height:30px;padding:3px 7px;border:1px solid #9dbaff;border-radius:3px;font:inherit;color:#000;background:#fff}
.vehicle-large-dialog .vehicle-picker-query input,.vehicle-large-dialog .vehicle-picker-query select{width:160px;flex:none}
.vehicle-large-dialog .vehicle-picker-table{flex:1;min-height:0;overflow:auto;margin:0 12px}
.vehicle-large-dialog table{width:100%;border-collapse:collapse;table-layout:auto;color:#000;font-size:13px}
.vehicle-large-dialog table th{height:33px;padding:5px 8px;background:linear-gradient(#edf5ff,#c7e0ff);border:1px solid #a6c3ef;white-space:nowrap;position:sticky;top:0;z-index:1;color:#000;text-align:center}
.vehicle-large-dialog table td{height:32px;padding:4px 7px;border:1px solid #adc7ef;text-align:center;color:#000;overflow-wrap:anywhere}
.vehicle-large-dialog table tbody tr:nth-child(even){background:#f0f0f0}
.vehicle-large-dialog table tbody tr.selected{background:#efd3a3}
.vehicle-large-dialog table tbody tr[data-choice]{cursor:pointer}
.vehicle-large-dialog table input[type=radio]{width:16px;height:16px;padding:0;accent-color:#2287ec}
.vehicle-large-dialog .vehicle-picker-pages{display:flex;justify-content:flex-end;align-items:center;gap:8px;background:#dce5f5;margin:0 12px;padding:5px 8px;min-height:36px;flex-wrap:wrap}
.vehicle-large-dialog .vehicle-picker-pages input{width:56px}
.vehicle-large-dialog .vehicle-picker-pages label{display:flex;align-items:center;gap:4px;color:#000}
.vehicle-large-dialog footer{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:9px 14px;border-top:1px solid #e2e8ef;background:#fff}
.vehicle-large-dialog .btn{font-size:13px;line-height:20px;min-height:30px;padding:3px 12px;border-radius:3px}
.vehicle-large-dialog .primary,.vehicle-large-dialog .vehicle-query-submit{background:#2d8cf0;border-color:#2d8cf0;color:#fff}
.vehicle-large-dialog .vehicle-manual-form{display:flex;flex-direction:column;flex:1;min-height:0;margin:0}
.vehicle-large-dialog .vehicle-manual-toolbar{padding:10px 12px}
.vehicle-large-dialog .vehicle-manual-form table{min-width:1500px;table-layout:fixed}
.vehicle-large-dialog .vehicle-manual-form th:nth-child(1),.vehicle-large-dialog .vehicle-manual-form th:nth-child(2){width:180px}
.vehicle-large-dialog .vehicle-manual-form th:nth-child(6),.vehicle-large-dialog .vehicle-manual-form th:nth-child(7){width:160px}
.vehicle-large-dialog .vehicle-manual-form th:last-child{width:65px}
.vehicle-large-dialog .vehicle-manual-form th:nth-child(10){width:180px}
.vehicle-large-dialog .vehicle-manual-form td{padding:3px}
.vehicle-large-dialog .vehicle-manual-field{position:relative;min-width:0}
.vehicle-large-dialog .vehicle-manual-field input{width:100%;min-width:0}
.vehicle-large-dialog .vehicle-manual-field:has(.vehicle-picker-trigger) input{padding-right:28px}
.vehicle-large-dialog .vehicle-row-delete,.vehicle-large-dialog .vehicle-manual-error{color:#d4380d}
.vehicle-large-dialog .vehicle-manual-error{margin:0;padding:8px 14px;min-height:20px}

/* One sales order per arrangement row, with independent vehicle details. */
#main .vehicle-order-toggle{border:0;background:transparent;color:#1677cc;cursor:pointer;padding:4px 6px;font:inherit;white-space:nowrap}
#main .vehicle-order-toggle:hover{background:#e7f2ff}
#main .vehicle-order-children[hidden]{display:none!important}
#main .vehicle-order-children>td{padding:12px;background:#f1f7ff;white-space:normal}
#main .vehicle-order-detail-wrap{max-width:100%;overflow:auto}
#main .vehicle-order-detail-table{width:100%;min-width:2400px;table-layout:auto;border-collapse:collapse;background:#fff}
#main .vehicle-order-detail-table caption{text-align:left;font-weight:600;color:#000;padding:8px 0}
#main .vehicle-order-detail-table th,#main .vehicle-order-detail-table td{white-space:normal;overflow-wrap:anywhere;min-width:80px;max-width:240px;text-align:center;vertical-align:middle;padding:8px;border:1px solid #ccd8e6;color:#000}
#main .vehicle-order-detail-table th{background:#e8eef6}
#main .vehicle-order-detail-table tr:nth-child(even) td{background:#f7faff}
#main .vehicle-order-detail-table td:nth-child(1){min-width:42px}
@media print{#main .vehicle-order-children[hidden]{display:table-row!important}.vehicle-order-toggle{display:none}}

/* Keep the order summary independent of the expanded vehicle grid. */
#main .arrangement-page .vehicle-order-group-table{table-layout:fixed!important;width:2833px!important;min-width:2833px!important}
#main .vehicle-order-group-table>thead>tr>th,#main .vehicle-order-group-table>tbody>.vehicle-order-parent>td{min-width:0;max-width:none;white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
#main .vehicle-order-group-table>tbody>.vehicle-order-parent>td:nth-child(2){white-space:nowrap;font-variant-numeric:tabular-nums}
#main .vehicle-order-group-table .vehicle-order-expand-cell{padding:0;text-align:center}
#main .vehicle-order-group-table .vehicle-order-toggle{width:30px;height:30px;padding:0;line-height:30px;font-size:18px}
#main .vehicle-order-group-table .vehicle-order-add{white-space:nowrap;margin:0;padding:5px 12px;border-radius:3px;background:#1890ff;color:#fff;border:1px solid #1890ff}
#main .vehicle-order-group-table .vehicle-order-add:disabled{opacity:.45;cursor:not-allowed}
#main .vehicle-order-group-table .vehicle-arrangement-text{min-width:0;max-width:none;max-height:none;overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere}
#main .vehicle-order-group-table .vehicle-arrangement-plain{min-width:0;max-width:none;overflow:hidden}
#main .vehicle-order-group-table>.vehicle-order-children{min-width:0}
#main .vehicle-order-group-table .vehicle-order-detail-wrap{contain:inline-size;box-sizing:border-box;max-width:none;overflow:auto;position:sticky;left:0;border:1px solid #ccd8e6;border-radius:4px;background:#fff}
#main .vehicle-order-group-table .vehicle-order-detail-table{min-width:2400px;margin:0}
#main .vehicle-order-group-table .vehicle-order-detail-table td{max-height:none}

#main .vehicle-order-count{display:block;white-space:nowrap;text-align:center;font-size:11px;line-height:18px;color:#526b85;margin:0 0 3px}
#main .vehicle-order-group-table>tbody>.vehicle-order-parent:hover>td,
#main .vehicle-order-group-table .vehicle-order-detail-table>tbody>tr:hover>td{background:#fff4d9!important}
#main .vehicle-order-group-table .vehicle-order-detail-table{min-width:1800px}

#main .vehicle-order-group-table .vehicle-order-toggle{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:auto;min-width:0;height:26px;min-height:0;padding:3px 8px;line-height:18px;font-size:12px;font-weight:400;white-space:nowrap;border:1px solid #1890ff;border-radius:3px;background:#1890ff;color:#fff;box-sizing:border-box}
#main .vehicle-order-group-table .vehicle-order-toggle:hover,#main .vehicle-order-group-table .vehicle-order-toggle:focus-visible{background:#087dd9;border-color:#087dd9;color:#fff}
#main .vehicle-order-group-table .vehicle-expand-arrow{font-size:11px;line-height:1}
#main .vehicle-order-group-table .vehicle-order-count{margin-top:3px}

#main .vehicle-order-group-table .vehicle-order-toggle{height:22px;min-height:0;padding:1px 6px;font-size:11px;line-height:18px;gap:3px}
#main .vehicle-order-group-table .vehicle-order-toggle:disabled{opacity:.45;cursor:not-allowed}
#main .vehicle-order-group-table .vehicle-order-count{margin:0 0 4px;font-size:12px;line-height:18px;text-align:center}
#main .vehicle-arrangement-table .vehicle-transfer-info{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 10px;white-space:normal;text-align:center;overflow-wrap:anywhere}
#main .vehicle-arrangement-table .vehicle-transfer-info>span{min-width:0;white-space:normal;text-align:center}

#main .vehicle-order-group-table .vehicle-order-add{height:22px;min-height:0;padding:1px 7px;font-size:11px;line-height:18px;border-radius:3px;box-sizing:border-box}
#main #fleetOnlineFilter{display:flex;align-items:center;gap:4px;flex-wrap:nowrap;margin:0;padding:6px 8px;background:#fff;overflow-x:auto;border-bottom:1px solid #dbe5ef}
#main #fleetOnlineFilter .fleet-query-field{display:block;flex:0 1 190px;min-width:112px;margin:0;position:relative}
#main #fleetOnlineFilter .fleet-keyword{flex:1 1 200px;min-width:160px}
#main #fleetOnlineFilter input,#main #fleetOnlineFilter select{display:block;width:100%;min-width:0;height:28px;min-height:28px;padding:3px 7px;margin:0;border:1px solid #9fbaff;border-radius:3px;font-size:12px;line-height:20px;color:#111;background:#fff;box-sizing:border-box}
#main #fleetOnlineFilter input::placeholder{color:#a0a6af}
#main #fleetOnlineFilter .fleet-query-actions{display:flex;flex:0 0 auto;align-items:center;gap:4px;margin-left:auto;white-space:nowrap}
#main #fleetOnlineFilter .fleet-query-actions .btn{flex:0 0 auto;height:26px;min-height:26px;padding:2px 10px;margin:0;border:1px solid transparent;border-radius:3px;font-size:12px;line-height:20px;color:#fff;box-sizing:border-box}
#main #fleetOnlineFilter .fleet-query-submit{background:#7773f4}
#main #fleetOnlineFilter .fleet-query-reset{background:#05ba95}
#main #fleetOnlineFilter .fleet-query-refresh{background:#7875ee}

.vehicle-large-dialog .vehicle-existing-title{margin:16px 0 8px;padding:8px 10px;background:#edf5ff;border:1px solid #a6c3ef;color:#182b4a;font-size:14px;font-weight:600;text-align:left}
.vehicle-large-dialog .vehicle-existing-table input[readonly]{background:#fff;color:#000;cursor:default}
.vehicle-large-dialog .vehicle-existing-table textarea{display:block;width:100%;min-width:0;height:44px;padding:3px 7px;box-sizing:border-box;resize:vertical;border:1px solid #9dbaff;border-radius:3px;background:#fff;color:#000;font:inherit;line-height:18px}
.vehicle-large-dialog .vehicle-manual-tables{padding-bottom:12px}
#main .vehicle-order-group-table .vehicle-order-toggle,#main .vehicle-order-group-table .vehicle-order-toggle:hover,#main .vehicle-order-group-table .vehicle-order-toggle:focus-visible{background:transparent;border:0;box-shadow:none;color:#1890ff}
#main .vehicle-order-group-table .vehicle-order-toggle:hover{text-decoration:underline}

.vehicle-large-dialog .vehicle-existing-title{margin-bottom:0;border-bottom:0}
.vehicle-large-dialog .vehicle-existing-table td{height:28px;padding:2px 5px;font-size:12px;line-height:18px;box-sizing:border-box}
.vehicle-large-dialog .vehicle-existing-value{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}
.vehicle-large-dialog .vehicle-existing-note{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:pre-wrap;max-height:36px;text-align:left}
#modal:has(.fleet-day-detail){width:min(1600px,96vw);max-width:96vw;max-height:94vh}
#modal:has(.fleet-day-detail) .fleet-day-detail{padding:14px;max-height:calc(94vh - 95px);overflow:auto}
#modal:has(.fleet-day-detail) .fleet-selected-jobs{max-height:28vh;overflow:auto}
#modal:has(.fleet-day-detail) .fleet-selected-jobs table{width:100%;min-width:900px}
#modal:has(.fleet-day-detail) .fleet-selected-jobs td{padding:8px;vertical-align:middle}
#modal:has(.fleet-day-detail) .fleet-upcoming-orders{margin-top:18px;border:1px solid #d4e1ef}
#modal:has(.fleet-day-detail) .fleet-upcoming-orders h3{margin:0;padding:10px 12px;background:#edf4fb;color:#315571;font-size:15px}
#modal:has(.fleet-day-detail) .fleet-upcoming-range{margin:0;padding:8px 12px;font-size:12px;color:#526b85}
#modal:has(.fleet-day-detail) .fleet-upcoming-orders .table-wrap{max-height:44vh;overflow:auto}
#modal:has(.fleet-day-detail) .fleet-upcoming-table{width:100%;min-width:1300px;table-layout:fixed}
#modal:has(.fleet-day-detail) .fleet-upcoming-table th{position:sticky;top:0;background:#edf4fb;z-index:1}
#modal:has(.fleet-day-detail) .fleet-upcoming-table th:nth-child(1){width:44px}
#modal:has(.fleet-day-detail) .fleet-upcoming-table th:nth-child(2){width:180px}
#modal:has(.fleet-day-detail) .fleet-upcoming-table th:nth-child(3){width:135px}
#modal:has(.fleet-day-detail) .fleet-upcoming-table th:nth-child(5){width:240px}
#modal:has(.fleet-day-detail) .fleet-upcoming-table th:nth-child(9){width:230px}
#modal:has(.fleet-day-detail) .fleet-upcoming-table td{padding:6px;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
#modal:has(.fleet-day-detail) [data-upcoming-content].form-error{padding:12px}

/* Fixed vehicle arrangement rows; full source text remains available on hover. */
#main .vehicle-order-group-table>tbody>.vehicle-order-parent>td,
#main .vehicle-order-group-table .vehicle-order-detail-table>tbody>tr>td{height:56px;padding:5px 8px;box-sizing:border-box;vertical-align:middle}
#main .vehicle-order-group-table .vehicle-cell-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:20px;max-height:40px;min-width:0;overflow:hidden;white-space:normal;overflow-wrap:anywhere;text-align:center}
#main .vehicle-order-group-table .vehicle-cell-text .vehicle-transfer-info{display:block;line-height:20px}
#main .vehicle-order-group-table .vehicle-arrangement-copy-cell{height:40px;max-height:40px;min-height:0;align-items:center;overflow:hidden}
#main .vehicle-order-group-table .vehicle-arrangement-plain{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:20px;max-height:40px;white-space:pre-wrap;overflow:hidden}
#main .vehicle-order-group-table .vehicle-order-count{margin-bottom:0}

/* Fleet day detail: larger canvas, compact order rows, location suggestions. */
#modal:has(.fleet-day-detail){width:calc(100vw - 32px);max-width:calc(100vw - 32px);height:94vh;max-height:94vh}
#modal:has(.fleet-day-detail) .fleet-day-detail{box-sizing:border-box;height:calc(94vh - 68px);max-height:calc(94vh - 68px);overflow:auto}
#modal:has(.fleet-day-detail) .fleet-upcoming-heading{display:flex;align-items:center;gap:20px;flex-wrap:wrap;background:#edf4fb;padding:10px 12px}
#modal:has(.fleet-day-detail) .fleet-upcoming-heading h3{padding:0;flex:0 0 auto}
#modal:has(.fleet-day-detail) .fleet-upcoming-heading .fleet-upcoming-range{padding:0;margin:0}
#modal:has(.fleet-day-detail) .fleet-location-filter{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 12px;min-height:34px;box-sizing:border-box;color:#526b85;font-size:12px}
#modal:has(.fleet-day-detail) .fleet-location-filter label{display:flex;flex-direction:row;align-items:center;gap:5px;margin:0;white-space:nowrap}
#modal:has(.fleet-day-detail) .fleet-location-filter input{width:14px;height:14px;min-height:0;margin:0}
#modal:has(.fleet-day-detail) .fleet-upcoming-orders .table-wrap{max-height:calc(94vh - 330px)}
#modal:has(.fleet-day-detail) .fleet-upcoming-table{min-width:1500px}
#modal:has(.fleet-day-detail) .fleet-upcoming-table th:last-child{width:80px}
#modal:has(.fleet-day-detail) .fleet-upcoming-table td{height:54px;padding:6px;box-sizing:border-box;vertical-align:middle;min-width:0}
#modal:has(.fleet-day-detail) .fleet-upcoming-cell{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:20px;max-height:40px;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere}
#modal:has(.fleet-day-detail) .fleet-dispatch-placeholder{height:26px;min-height:0;line-height:18px;padding:3px 10px;font-size:12px;border-radius:3px;background:#1890ff;color:#fff;border:0;opacity:.7;cursor:default}
#main .vehicle-order-group-table .vehicle-platform-link{display:inline;padding:0;margin:0;border:0;background:transparent;box-shadow:none;font:inherit;color:#1890ff;white-space:normal;overflow-wrap:anywhere}
#main .vehicle-order-group-table .vehicle-platform-link:hover{text-decoration:underline}

/* Shared compact shell, forms and document spacing. */
:root{--nav-width:248px;--header-height:54px}
#app>header{gap:10px;padding-right:12px;height:var(--header-height)}
#app>header .logo{width:var(--nav-width);height:var(--header-height)}
#app>header .header-brand-logo{width:64px;height:48px}
#app>header .brand{font-size:16px;min-width:0;letter-spacing:0}
#app>header .header-right{gap:8px;flex-shrink:0}
#app>#sidebar{width:var(--nav-width);top:var(--header-height)}
#app>.workspace{margin-left:var(--nav-width);min-width:0}
#app>.workspace>.tabs{height:auto;min-height:32px;padding:2px 4px 0;gap:2px}
#app>.workspace>.tabs .tab{min-height:30px}#app>.workspace>.tabs .tab-label{padding:0 9px}
#app>.workspace>#main{padding:10px;min-width:0;overflow:visible;min-height:calc(100vh - 112px)}
#main>.page-title{margin-bottom:8px;gap:8px;flex-wrap:wrap}#main h1{font-size:18px;margin-bottom:4px}
#main .card-head{height:auto;min-height:36px;padding:6px 10px}
#main :is(.toolbar,.product-toolbar,.fo-toolbar){padding:7px 9px;gap:6px;flex-wrap:wrap}
#main :is(.filter,.filters){padding:8px;gap:6px;flex-wrap:wrap;min-width:0}
#main .table-wrap,#main .fo-table-wrap,#main .pp-table-wrap{max-width:100%;min-width:0}
#main :is(.dashboard-top,.grid){gap:10px;margin-bottom:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
#main .fields,dialog .fields{gap:10px;padding:14px;grid-template-columns:repeat(2,minmax(0,1fr))}
#main .fields label,dialog .fields label{gap:4px;min-width:0}#main .fields input,#main .fields select,dialog .fields input,dialog .fields select{min-width:0}
#main .btn{padding:5px 9px;min-height:28px}.page-title p:empty{display:none}
#main :is(.table-foot,.menu-pagination,.product-pagination){padding:7px 9px;gap:7px;flex-wrap:wrap}
#main :is(.product-source,.product-note,.hint){padding:6px 9px;line-height:1.5}
#main .unit-review-filter{flex-wrap:wrap;overflow:visible;gap:5px}
#main .unit-review-filter>*{flex-shrink:1}
#app>.workspace>footer{padding:6px}
.oa-nav-toggle{flex-shrink:0;white-space:nowrap;padding:5px!important;font-size:12px}
body.oa-nav-collapsed #app>#sidebar{display:none}body.oa-nav-collapsed #app>.workspace{margin-left:0}body.oa-nav-collapsed #app>header .logo{width:72px}
@media(max-width:1100px){#app>header .brand{font-size:14px}}
@media(min-width:761px) and (max-width:900px){:root{--nav-width:216px}}
@media(max-width:760px){:root{--header-height:50px;--nav-width:0px}#app>header .logo{width:52px}#app>header .header-brand-logo{width:46px;height:42px}#app>header .brand{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#app>header{gap:5px;padding-right:6px}#app>header .header-right>span{display:none}#app>#sidebar{display:none;width:248px;z-index:110;box-shadow:4px 0 16px #243e5526}body.oa-nav-open #app>#sidebar{display:flex}#app>.workspace{margin-left:0}#app>.workspace>#main{padding:6px}#main :is(.dashboard-top,.grid){grid-template-columns:minmax(0,1fr)}#main .fields,dialog .fields{grid-template-columns:minmax(0,1fr)}#main .fields>*,dialog .fields>*{grid-column:auto}#main .table-foot{justify-content:flex-start}#main .summary-grid{grid-template-columns:minmax(0,1fr)}}
