.operations-stack { display: grid; gap: 22px; min-width: 0; }
.operations-toolbar { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.segmented-tabs { display: flex; gap: 3px; background: #eaeaf0; border: 1px solid #e0e0e7; padding: 4px; border-radius: 9px; }
.segmented-tabs button { padding: 9px 13px; border-radius: 6px; font-size: 12px; color: #666671; }
.segmented-tabs button.active { background: #fff; color: #30303a; box-shadow: 0 1px 4px #24243317; }
.route-stats { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.operations-filters { display: flex; gap: 15px; flex-wrap: wrap; align-items: end; padding: 0 22px 22px; }
.operations-filters label { min-width: 150px; flex: 1; font-size: 12px; }
.operations-filters input, .operations-filters select { font-size: 13px; min-height: 40px; }
.operations-filters .primary { min-height: 40px; }
.courier-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: 0 22px 22px; }
.courier-card { border: 1px solid #e4e4ec; border-radius: 12px; padding: 19px; background: #fafafc; }
.courier-card-head { display: flex; gap: 12px; align-items: center; }
.courier-avatar { width: 42px; height: 42px; background: #e5edfa; color: #4773af; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.courier-card p { font-size: 12px; color: #74747f; margin-top: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.courier-card-actions { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dispatch-table { min-width: 740px; }
.dispatch-address { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; margin-top: 7px; max-width: 350px; }
.dispatch-status { padding: 5px 8px; background: #f1f1f6; color: #646470; border-radius: 6px; font-size: 11px; white-space: nowrap; display: inline-block; }
.status-in_transit { background: #eaf2fc; color: #2467af; }
.status-delivered { background: #e9f3ed; color: #35744b; }
.status-incident { background: #fff0e8; color: #a45130; }
.dispatch-actions { display: grid; gap: 10px; justify-items: start; }
.unassigned-list { padding: 0 22px 15px; }
.unassigned-list article { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px 0; border-top: 1px solid #eeeef3; }
.unassigned-list strong { font-size: 13px; }
.unassigned-list p { margin-top: 7px; font-size: 12px; color: #74747f; line-height: 1.6; }
.dispatch-event { padding: 14px 0; border-bottom: 1px solid #e5e5ec; }
.dispatch-event p { margin-top: 9px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.dispatch-event small { display: block; margin-top: 9px; color: #74747f; line-height: 1.7; }
.dispatch-assignment-section { border: 1px solid #e2e7f0; border-radius: 10px; padding: 17px; background: #f7f9fd; display: grid; gap: 13px; }
.dispatch-assignment-section h3 { color: #344a6c; }
.delivery-dispatch-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; background: #f7f9fd; border-top: 1px solid #e3e7ef; }
.delivery-dispatch-card p { font-size: 12px; color: #6e7482; line-height: 1.7; margin-top: 8px; }
.report-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.reports-page .table-toolbar { flex-wrap: wrap; }
.report-result .table-toolbar p { max-width: 680px; }
.report-result table { min-width: 620px; }
.report-result td { overflow-wrap: anywhere; }
.aging-green { --age-ink: #28633f; --age-fill: #edf7f0; --age-border: #bad9c4; --age-dot: #39965a; }
.aging-orange { --age-ink: #8a4d10; --age-fill: #fff5e8; --age-border: #edcda3; --age-dot: #d78828; }
.aging-red { --age-ink: #a13c37; --age-fill: #fff0ef; --age-border: #e9bab6; --age-dot: #ce5750; }
.aging-unknown { --age-ink: #656575; --age-fill: #f2f2f7; --age-border: #d6d6e1; --age-dot: #9191a3; }
.aging-badge, .client-info > .aging-badge {
  display: inline-flex; width: fit-content; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--age-fill); color: var(--age-ink); border: 1px solid var(--age-border);
  border-radius: 6px; padding: 4px 7px; font-size: 11px; line-height: 1.5; font-weight: 500;
}
.aging-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--age-dot); flex-shrink: 0; }
.account-card.aging-card:not(.aging-none) { border-left: 3px solid var(--age-dot); }
.account-card > .aging-badge { margin-top: 13px; }
.client-info > .aging-badge { font-size: 9px; padding: 2px 5px; }
.aging-note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: -7px 0 20px; }
.aging-note > span:last-child { color: #74747f; font-size: 11px; }
.aging-report-panel { display: grid; gap: 16px; }
.aging-report-counts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.aging-counter { display: grid; gap: 10px; background: var(--age-fill); border: 1px solid var(--age-border); border-radius: 12px; padding: 17px; color: var(--age-ink); }
.aging-counter > span { font-size: 12px; }
.aging-counter strong { font-size: 23px; letter-spacing: -.6px; }
.aging-counter small { font-size: 11px; }
.aging-report-panel > label { max-width: 310px; font-size: 12px; }
.aging-report-panel > p { font-size: 12px; color: #74747f; line-height: 1.7; }
.aging-report-row > td:first-child { border-left: 3px solid var(--age-dot); }
.report-result table:has(.aging-report-row) { min-width: 1040px; }
.aging-report-row > td:first-child { min-width: 155px; }
.aging-report-row > td:nth-child(2), .aging-report-row > td:nth-child(3) { min-width: 145px; }
.aging-report-row > td:nth-child(6) { min-width: 160px; }
.address-editor { border: 1px solid #e1e4ec; border-radius: 11px; padding: 16px; }
.address-editor .section-heading { margin-bottom: 9px; gap: 12px; flex-wrap: wrap; }
.address-editor .section-heading h3 { font-size: 14px; }
.address-editor-row { display: grid; grid-template-columns: minmax(100px,.7fr) minmax(0,1.5fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid #e8e8ef; }
.address-editor-row:last-child { border-bottom: 0; padding-bottom: 0; }
.address-editor-row label { font-size: 12px; }
.address-editor-row textarea { resize: vertical; }
.address-row-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.address-primary { flex-direction: row; align-items: center; gap: 8px; }
.address-primary input { width: auto; margin: 0; }
.shipping-address-fields { display: grid; gap: 13px; }
.shipping-address-fields textarea[readonly] { background: #f5f6fa; color: #454552; }
tr[data-item-colored=true] > td { background: var(--item-color); color: var(--item-ink); border-bottom-color: var(--item-rule); }
tr[data-item-colored=true] td :is(strong,small,p,.row-number,.amount-cell,.recent-customer,.text-button) { color: var(--item-ink); }
tr[data-item-colored=true] td :is(.numeric,.product-description,.warehouse-cell) { color: var(--item-ink); }
tr[data-item-colored=true] .icon-button { background: #fffffff0; color: #454552; margin: 1px; }
tr[data-item-colored=true] .icon-button.danger-text { color: #b4322b !important; }
tr[data-item-colored=true] .text-button { text-decoration: underline; }
@media(max-width:600px){.address-editor-row{grid-template-columns:minmax(0,1fr)}.address-editor{padding:13px}}
@media(max-width:700px){.aging-report-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.aging-counter strong{font-size:21px}.account-name .aging-badge{font-size:10px}}
.route-public-wrap { max-width: 760px; width: calc(100% - 36px); margin: 0 auto; padding-bottom: 25px; }
.route-public-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid #e2e2e8; padding: 18px 0; }
.route-public-header .public-brand { width: 165px; }
.route-public-title { padding: 30px 0 20px; }
.route-public-title h1 { font-size: 29px; }
.route-public-title p { margin-top: 10px; color: #74747f; font-size: 14px; text-transform: capitalize; }
.route-public-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.route-public-controls #refresh-route { margin-left: auto; }
.route-stops { display: grid; gap: 14px; }
.route-stop { background: #fff; border: 1px solid #e2e2e8; border-radius: 13px; padding: 23px; box-shadow: 0 2px 6px #1d1d1f03; }
.route-stop h2 { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.route-stop p { font-size: 15px; color: #60606c; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 12px; }
.route-public-foot { margin-top: 25px; font-size: 11px; color: #7b7b88; text-align: center; }
.sidebar { overflow-y: auto; }
.sidebar-bottom { padding-top: 24px; }
@media (max-height: 820px) and (min-width: 701px) { .sidebar-foot { display: none; } .sidebar .local-card { display: none; } }
@media (max-width: 1100px) { .courier-cards { grid-template-columns: minmax(0,1fr); } .report-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) {
  .sidebar nav { overflow-x: auto; justify-content: space-between; }
  .sidebar .nav-item { padding: 10px 8px; flex-shrink: 0; }
  .route-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-stats .stat > strong { font-size: 20px; }
  .operations-filters { padding: 0 16px 16px; gap: 12px; }
  .operations-filters label { min-width: 120px; }
  .operations-toolbar > .primary { width: 100%; }
  .segmented-tabs { width: 100%; }
  .segmented-tabs button { flex: 1; font-size: 11px; }
  .courier-cards { padding: 0 16px 16px; }
  .unassigned-list article, .delivery-dispatch-card { flex-wrap: wrap; }
  .route-public-header .public-brand { width: 135px; }
}
@media print {
  body:has(.reports-page) { background: #fff; }
  #toast, dialog { display: none !important; }
  body:has(.reports-page) .sidebar, body:has(.reports-page) .topbar, body:has(.reports-page) .page-top,
  .reports-page .operations-filters, .reports-page .report-tabs, .reports-page button, .reports-page > .products-card:first-child { display: none !important; }
  body:has(.reports-page) .workspace-body { margin: 0; width: 100%; padding: 0; }
  body:has(.reports-page) .content-layout { display: block; margin: 0; }
  .reports-page .report-stats { display: none; }
  .aging-report-panel > label { display: none; }
  .aging-counter, .aging-badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  tr[data-item-colored=true] > td { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .report-result table { min-width: 0; font-size: 10px; }
  .report-result .table-scroll { overflow: visible; }
  .report-result th { white-space: normal; }
  .report-result thead { display: table-header-group; }
  .report-result tr { break-inside: avoid; }
  .route-public-controls, .route-public-foot { display: none; }
}
.status-cancelled { background: #f2f2f5; color: #565662; }
.delivery-void-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); }
.delivery-void-action p { color: var(--secondary-text); font-size: 12px; margin: 4px 0 0; }
#no-courier-warning .statement-actions { margin-top: 10px; }
.cash-desk { margin-bottom: 16px; }
.dispatch-cash { display: block; margin-top: 6px; color: var(--secondary-text); }
.route-stop .route-cash { color: #164e83; }
