/* Delivery-first layouts. DOM order, reading order and visual order match. */
#deliveryAdminView > *, .orders-panel > * { order: 0 !important; min-width: 0; }
.admin-intro { padding: 18px 22px; }
.admin-intro h1 { font-size: 1.6rem; }
.admin-intro p { margin-bottom: 0; }
.order-query-panel { margin-bottom: 18px; padding: 18px 22px 10px; }
.order-query-panel .list-head { display: grid; gap: 14px; }
.order-query-panel .list-controls { justify-content: flex-start; max-width: none; width: 100%; }
.order-query-panel .admin-search { flex: 2 1 290px; }
.order-query-panel .list-controls > label:not(.admin-search) { flex: 1 1 150px; }
.order-query-panel .order-quick-filters { padding: 0 0 8px; }
.order-query-panel .active-filter-summary { margin: 0 0 4px; font-size: .875rem; }
#orderQueryTitle, #workflowTitle { scroll-margin-top: 92px; }
.list-export-actions, .map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.list-export-actions a { display: inline-flex; align-items: center; min-height: 42px; }
.map-tools { margin-top: 12px; }
.map-panel .map-route-status { margin: 12px 0 0; }
.map-panel .map-scope-note { margin: 0 0 12px; }
.map-head { flex-wrap: wrap; }
.map-controls { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.map-controls select { min-width: 0; }
.map-controls label { flex: 1 1 190px; }
.map-controls button { flex: 0 1 auto; white-space: normal; }
.map-layout, .map-list-item { min-width: 0; }
.map-list { contain: inline-size; }
.map-list-main strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.map-order-detail { grid-column: 2 / -1; font-size: 1rem; overflow-wrap: anywhere; }
.map-order-detail summary { cursor: pointer; min-height: 40px; padding-block: 9px; }
.map-order-detail p { margin: 7px 0; }
.map-order-detail b { font-size: 1.2rem; }
.map-route-actions { grid-column: 3; grid-row: 1; }
.map-selected { background: #fff3e4; outline: 2px solid #d96c1f; outline-offset: -2px; }
.map-scope-note { font-size: .875rem; line-height: 1.5; }
.map-scope-note button, .workflow-panel button, .order-extra button { min-height: 42px; padding: 7px 12px; border: 1px solid #cbd4df; border-radius: 9px; color: #193552; background: white; font: inherit; }
.order-quick-filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 8px; }
.order-quick-filters button { min-height: 42px; padding: 8px 12px; border: 1px solid #cbd4df; border-radius: 999px; color: #193552; background: white; font: inherit; font-size: .9rem; font-weight: 750; }
.order-quick-filters button:focus-visible { outline: 3px solid #f58a40; }
.active-filter-summary { margin: 0 22px 10px; color: #55657a; font-size: .85rem; overflow-wrap: anywhere; }
.list-controls { flex-wrap: wrap; }
.list-controls > label { min-width: 0; }
.order-query-panel:not(.filters-expanded) .list-controls > label.order-detail-filter { display: none; }
.list-control-label { font-size: .85rem; }
.delivery-item-summary { margin-block: 4px 12px; padding: 11px 14px; }
.delivery-item-summary > summary { cursor: pointer; min-height: 30px; padding: 5px; font-weight: 800; }
.delivery-item-summary[open] > summary { margin-bottom: 12px; }
.batch-toolbar { display: flex; flex-wrap: wrap; }
.batch-toolbar select { width: auto; flex: 1 1 170px; max-width: 250px; }
.batch-toolbar small { width: 100%; text-align: left; }
.select-all-control { display: flex; gap: 8px; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 800; }
.select-all-control input, .order-checkbox { width: 22px; height: 22px; }
.order-address strong { font-size: 1.125rem !important; }
.order-address > span, .order-item-line { font-size: 1rem !important; line-height: 1.5; }
.order-extra { width: 100%; font-size: .875rem; }
.order-extra summary { min-height: 36px; padding-block: 8px; color: #3c536e; cursor: pointer; }
.order-extra strong, .order-extra span { display: block; margin-bottom: 6px; }
.order-extra .row-actions { margin-top: 8px; }
.completion-message-order { min-height: 42px; border: 1px solid #b5d1c0; border-radius: 8px; color: #176740; background: #f0fcf5; padding: 7px 12px; font: inherit; }
.sms-count { font-size: .875rem; color: #2e6549; }
.sms-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.sms-actions > * { flex: 1 1 160px; white-space: normal; text-align: center; }
.dialog-notice { padding: 12px; background: #fff6e8; line-height: 1.5; border-radius: 10px; }
.workflow-panel { margin-bottom: 18px; padding: 20px; }
.workflow-panel .panel-head { padding: 0 0 12px; }
.workflow-panel h3 { font-size: 1.1rem; margin-top: 24px; }
.workflow-scope { color: #526579; font-size: .9rem; }
.settlement-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.settlement-summary > div { display: grid; gap: 7px; padding: 13px; background: #f4f7fa; border-radius: 12px; }
.settlement-summary strong { font-size: 1.2rem; overflow-wrap: anywhere; }
.workflow-list { display: grid; gap: 8px; max-height: 500px; overflow: auto; }
.workflow-list article { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid #dae2ec; border-radius: 12px; }
.workflow-list p { margin: 7px 0; overflow-wrap: anywhere; }
.workflow-list small { color: #526579; }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.load-mismatch { color: #a03920; font-weight: 750; }
.workflow-empty { color: #637084; padding: 10px; }
/* Driver: large field text and a single prominent next stop. */
.driver-work-status { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; align-items: center; }
.driver-work-status button { min-height: 42px; border: 1px solid #d0dbe5; border-radius: 10px; background: white; color: #254565; font: inherit; padding: 8px 12px; }
.driver-next-stop { margin: 14px 0; padding: 20px; background: #fff; border: 2px solid #ef813e; border-radius: 18px; box-shadow: 0 6px 22px #102a3d0a; }
.next-stop-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 850; color: #a84916; }
.driver-next-stop h2 { font-size: 1.4rem; line-height: 1.45; margin: 15px 0 4px; overflow-wrap: anywhere; }
.next-stop-detail { font-size: 1.2rem; font-weight: 750; margin: 5px 0 14px; }
.next-stop-door, .next-stop-payment { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin: 9px 0; border-radius: 10px; background: #f3f6fa; }
.next-stop-door button { font: inherit; font-size: 1.25rem; font-weight: 850; color: #142e4c; background: none; border: 0; min-height: 40px; overflow-wrap: anywhere; }
.next-stop-payment strong { font-size: 1.25rem; }
.next-stop-payment.due { background: #fff0df; color: #984414; }
.next-stop-items { list-style: none; padding: 0; margin: 14px 0; font-size: 1.05rem; }
.next-stop-items li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e5ebf1; }
.next-stop-items label { display: flex; gap: 10px; align-items: center; width: 100%; }
.next-stop-items input { width: 23px; height: 23px; flex-shrink: 0; }
.next-stop-items label strong { margin-left: auto; }
.driver-item-aggregate-counts, .delivery-item-aggregate-counts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.next-stop-items li span { overflow-wrap: anywhere; }
.next-stop-items strong { flex-shrink: 0; }
.next-stop-note { padding: 12px; background: #fff8df; border-radius: 9px; font-size: 1.05rem; }
.next-stop-actions { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.next-stop-actions > * { grid-column: span 2; min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; padding: 8px 5px; border: 1px solid #d4dce4; background: white; color: #173650; border-radius: 10px; font: inherit; font-weight: 750; text-align: center; text-decoration: none; }
.next-stop-actions > [data-next-tmap], .next-stop-actions > [data-next-kakao] { grid-column: span 3; font-size: clamp(.8rem, 3.3vw, .95rem); }
.next-stop-actions > [data-next-tmap] { background: #eb6f27; color: white; border-color: #eb6f27; }
.next-stop-actions > [data-next-kakao] { background: #fee500; color: #191919; border-color: #fee500; }
.next-stop-actions > [data-next-process] { grid-column: span 4; background: #eb6f27; color: white; border-color: #eb6f27; }
.next-stop-actions > [data-next-cancel-start] { grid-column: 1 / -1; }
.cancel-start-button { grid-column: 1 / -1; min-height: 48px; padding: 12px; border: 1px solid #d4dce4; border-radius: 10px; background: #f4f7fa; color: #173650; font: inherit; font-weight: 750; }
.cancel-start-button:disabled { opacity: .5; cursor: wait; }
.driver-item-summary > summary, #driverMapSection > summary { cursor: pointer; padding: 5px; font-size: 1rem; font-weight: 800; min-height: 36px; }
.driver-item-summary[open] > summary, #driverMapSection[open] > summary { margin-bottom: 14px; }
.route-order-tools { margin-top: 12px; border-top: 1px solid #dce3eb; }
.route-order-tools > summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 750; }
.delivery-item-preview { font-size: 1rem !important; line-height: 1.55; }
.delivery-item-preview > span { white-space: normal; overflow-wrap: anywhere; }
.delivery-item-preview small, .delivery-item-preview em { font-size: .85rem; }
.delivery-info h3 { font-size: 1.125rem; }
.delivery-info p { font-size: 1rem; }
.copy-code, .items-box .item-line { font-size: 1.125rem; }
.delivery-card.completed { opacity: 1; background: #f7faf8; }
.detail-address, .door-code-value { font-size: 1.25rem; }
.driver-work-dialog { width: min(550px,calc(100vw - 24px)); max-height: 90dvh; overflow: auto; border: 0; border-radius: 18px; padding: 20px; color: #182d46; }
.driver-work-dialog::backdrop { background: #10203688; }
.driver-work-dialog label { display: grid; gap: 8px; margin: 14px 0; }
.driver-work-dialog select, .driver-work-dialog input, .driver-work-dialog textarea { box-sizing: border-box; width: 100%; min-height: 46px; border: 1px solid #c8d4df; border-radius: 9px; padding: 9px; font: inherit; background: white; }
.driver-work-dialog button { min-height: 46px; padding: 8px 14px; border-radius: 9px; border: 1px solid #d1dbe6; color: #1d3d5f; background: #f3f7fb; font: inherit; }
.driver-work-dialog .load-check-row { display: grid; grid-template-columns: minmax(0,1fr) 115px; align-items: center; }
.load-check-row small { display: block; margin-top: 5px; }
@media(max-width:1000px) {
  .map-head { display: grid; gap: 12px; }
  .map-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .map-controls > * { min-width: 0; width: 100%; }
  .map-controls { grid-template-columns: minmax(0,1fr) auto; align-items: end; }
  .map-controls .map-filter-control { grid-column: auto; }
}
@media(max-width:760px) {
  .order-query-panel { padding: 14px; margin-bottom: 12px; }
  .order-query-panel .list-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .order-query-panel .list-controls > label, .order-query-panel .list-controls input, .order-query-panel .list-controls select { min-width: 0; }
  .map-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .map-tools button { min-width: 0; white-space: normal; min-height: 44px; }
  .list-export-actions > button { flex: 1; }
  .admin-intro { padding: 14px; gap: 12px; }
  .admin-intro .eyebrow, .admin-intro h1, .admin-intro p { display: none; }
  .admin-stats { min-width: 0; width: 100%; }
  .admin-stats > div { padding: 9px 7px; }
  .admin-stats strong { font-size: 1.25rem; }
  .admin-topbar { padding-block: 12px; }
  .admin-view-tabs button { padding-inline: 12px; }
  .order-table td { display: block; min-width: 0; }
  .order-table td::before { display: none; }
  .order-table .order-primary { display: flex; flex-wrap: wrap; align-items: center; column-gap: 9px; }
  .order-primary .delivery-schedule { flex-basis: 100%; }
  .order-table .order-action-content { display: flex; flex-wrap: wrap; align-items: center; }
  .order-table .order-action-content > .order-extra { width: auto; margin-left: auto; }
  .order-table .order-action-content > .order-extra[open] { width: 100%; }
  .batch-toolbar:not(.has-selection) > :not(.select-all-control):not(#selectedOrderCount) { display: none; }
  .order-table .order-driver-cell { padding-block: 6px; }
  .order-table .order-driver-cell small { display: none; }
  .order-table td { padding-block: 8px; }
  .order-table .order-action-content { gap: 7px; }
  .completion-detail, .proof-link { font-size: .875rem; }
  .batch-toolbar { padding: 10px 14px; gap: 7px; }
  .batch-toolbar > .select-all-control { width: 100%; }
  .batch-toolbar > button { flex: 1 1 120px; white-space: normal; }
  .order-quick-filters { padding-inline: 14px; }
  .workflow-panel { padding: 14px; }
  .settlement-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .driver-next-stop { padding: 15px; }
  .next-stop-actions { font-size: .95rem; }
  .delivery-card-main { grid-template-columns: 42px minmax(0,1fr); }
  .delivery-meta { grid-column: 2; display: grid; grid-template-columns: 1fr auto; gap: 6px; min-width: 0; max-width: none; text-align: left; }
  .delivery-item-preview { grid-column: 1 / -1; }
}
.admin-driver-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid #edc28c; background:#fff4e3; color:#663900; }
.admin-driver-banner[hidden] { display:none; }
.admin-driver-banner > div { display:grid; gap:4px; }
.admin-driver-banner span { font-size:.85rem; line-height:1.5; }
.admin-driver-banner a { flex-shrink:0; color:inherit; font-weight:700; }
@media (max-width:600px) { .admin-driver-banner { align-items:flex-start; flex-direction:column; } }
