/* AquaControl V79.17.21 | Visual adaptation of the supplied Figma video.
   No remote fonts, libraries, polling or data dependencies.
   Existing application IDs, permissions and business workflows are preserved. */
:root {
  --aq-navy: #0b1f36;
  --aq-blue: #2074dc;
  --aq-ink: #17253b;
  --aq-muted: #64748b;
  --aq-line: #e1e6f0;
  --aq-canvas: #f4f5fb;
  --aq-radius: 12px;
  --v7916-header-h: 82px;
  --v7916-sidebar-w: 232px;
}
body.aq-visual { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--aq-ink); background: var(--aq-canvas); }
.aq-visual button, .aq-visual input, .aq-visual select, .aq-visual textarea { font-family: inherit; }
.aq-visual :is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid #649fe9; outline-offset: 3px; }
.aq-visual .topbar { gap: 20px; background: #fff; backdrop-filter: none; box-shadow: none; border-bottom: 1px solid var(--aq-line); }
.aq-visual .topbar-brand { flex: 1; min-width: 0; }
.aq-visual .topbar-brand > div { min-width: 0; }
.aq-visual .brand-logo-small { width: 44px; height: 44px; padding: 2px; box-shadow: none; border: 1px solid var(--aq-line); }
.aq-visual .topbar h2 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -.4px; }
.aq-visual .version-badge { font-size: 10px; font-weight: 600; border: 0; border-radius: 4px; padding: 3px 6px; color: #37638f; background: #edf4fc; }
.aq-visual #sessionInfo { display: block; color: #5d6f84; font-size: 11px; line-height: 1.6; }
.aq-visual .topbar-nav-context { display: none; }
.aq-visual .session-badges { margin: 2px 0 0; gap: 4px; flex-wrap: wrap; }
.aq-visual .session-badges span { padding: 1px 4px; background: #f3f6fa; border: 0; color: #64748b; border-radius: 3px; font-size: 9px; line-height: 1.5; }
.aq-visual .global-search-launcher { min-height: 34px; border-radius: 7px; border: 1px solid var(--aq-line); background: #f8f9fc; box-shadow: none; padding: 6px 9px; }
.aq-visual .global-search-launcher strong { font-size: 11px; font-weight: 500; }
.aq-visual .global-search-launcher kbd { font-size: 9px; }
.aq-visual .status-wrap { width: auto; gap: 8px; flex-wrap: nowrap; }
.aq-visual .status-pill { min-height: 0; padding: 5px 8px; font-size: 10px; border: none; border-radius: 20px; white-space: nowrap; }
.aq-visual #logoutBtn { min-height: 34px; padding: 6px 10px; border: 1px solid var(--aq-line); border-radius: 7px; font-size: 11px; }
.aq-visual .side-menu { background: var(--aq-navy); box-shadow: none; border: 0; gap: 4px; }
.aq-visual .sidebar-brand { display: none; }
.aq-visual .menu-search-wrap { margin: 0 2px 8px; background: var(--aq-navy); }
.aq-visual .menu-search { border-radius: 6px; background: #142c45; border: 1px solid #243b51; min-height: 33px; font-size: 11px; color: #e0e9f3; }
.aq-visual .menu-search::placeholder { color: #a8b9cb; }
.aq-visual .menu-search-hint { font-size: 9px; color: #9cb1c8; }
.aq-visual .menu-group { border: 0; padding: 0; margin-bottom: 3px; }
.aq-visual .menu-group-toggle { color: #99afc6; padding: 6px 10px; min-height: 26px; }
.aq-visual .menu-group-toggle strong { font-size: 10px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.aq-visual .menu-group-toggle small { display: none; }
.aq-visual .menu-group-toggle b { font-size: 14px; color: #8ca4c0; }
.aq-visual .menu-group-items { padding: 0 2px 3px; gap: 3px; }
.aq-visual .menu-group .menu-btn { min-height: 37px; padding: 7px 10px; gap: 9px; font-size: 11.5px; font-weight: 450; color: #c5d1df; background: transparent; border: 1px solid transparent; box-shadow: none; }
.aq-visual .menu-group .menu-btn:hover { color: #fff; background: #17324f; }
.aq-visual .menu-group .menu-btn.active { color: #fff; background: var(--aq-blue); border-color: #3483e8; box-shadow: none; font-weight: 600; }
.aq-visual .menu-group .menu-btn::before { width: 24px; height: 24px; flex-basis: 24px; display: inline-flex; align-items: center; justify-content: center; font: 600 9px "Segoe UI",sans-serif; background: #ffffff0d; border: 0; border-radius: 5px; color: #d2dfed; }
.aq-visual .menu-btn.active::before { background: #ffffff24; color: #fff; }
.aq-visual .menu-btn[data-view="control"]::before { content: "CC"; }
.aq-visual .menu-btn[data-view="sale"]::before { content: "PV"; }
.aq-visual .menu-btn[data-view="delivery"]::before { content: "PD"; }
.aq-visual .menu-btn[data-view="deliveryOrderHistory"]::before { content: "HP"; }
.aq-visual .menu-btn[data-view="production"]::before { content: "PR"; }
.aq-visual .menu-btn[data-view="products"]::before { content: "PT"; }
.aq-visual .menu-btn[data-view="customers"]::before { content: "CL"; }
.aq-visual .menu-btn[data-view="cash"]::before { content: "CP"; }
.aq-visual .menu-btn[data-view="deliveryDriverCuts"]::before { content: "CR"; }
.aq-visual .menu-btn[data-view="receivables"]::before { content: "CX"; }
.aq-visual .menu-btn[data-view="crm"]::before { content: "CM"; }
.aq-visual .menu-btn[data-view="maintenance"]::before { content: "MT"; }
.aq-visual .menu-btn[data-view="finance"]::before { content: "AN"; }
.aq-visual .menu-btn[data-view="history"]::before { content: "HV"; }
.aq-visual .menu-btn[data-view="audit"]::before { content: "AU"; }
.aq-visual .menu-btn[data-view="config"]::before { content: "CF"; }
.aq-visual .menu-btn[data-view="deliverySetup"]::before { content: "CD"; }
.aq-visual .menu-btn[data-view="sync"]::before { content: "BD"; }
.aq-visual .sidebar-footer { margin-top: 16px; padding: 12px; border: 1px solid #20374e; background: #152a41; border-radius: 9px; color: #a4b8cd; font-size: 10px; line-height: 1.6; }
.aq-visual .sidebar-footer strong { color: #edf3fa; font-size: 11px; }
.aq-visual .content { background: var(--aq-canvas); }
.aq-menu-toggle { display: none; }
/* The original workspace DOM stays intact; only visual order changes. */
.aq-visual #deliveryView { display: flex; flex-direction: column; gap: 0; min-width: 0; }
#deliveryView > .view-header { order: 0; }
#deliveryView > .module-workspace-tabs { order: 3; }
#deliveryView > [data-workspace-panel="delivery:live"]:not(.hidden) { display: contents; }
#deliveryView .delivery-stats { order: 1; }
#deliveryView .delivery-service-strip { order: 2; }
#deliveryView .enterprise-live-tabs { order: 4; }
#deliveryView [data-delivery-live-panel], #deliveryView > .module-workspace-panel { order: 5; }
.aq-visual #deliveryView .enterprise-page-header { align-items: center; border: 0; padding: 0; margin: 0 0 24px; gap: 18px; background: transparent; box-shadow: none; }
.aq-visual #deliveryView .enterprise-eyebrow, .aq-order-header .enterprise-eyebrow { color: #397bb9; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.aq-visual #deliveryView .enterprise-page-header h3 { margin: 4px 0 6px; font-size: 28px; color: var(--aq-ink); font-weight: 750; letter-spacing: -.8px; }
.aq-visual #deliveryView .enterprise-page-header p { margin: 0; font-size: 12px; color: var(--aq-muted); line-height: 1.5; }
#deliveryView .header-actions { flex-shrink: 0; gap: 9px; }
#deliveryView .header-actions button { min-height: 39px; border-radius: 8px; padding: 9px 14px; font-size: 12px; font-weight: 600; box-shadow: none; }
#deliveryView #newDeliveryOrderBtn { background: var(--aq-blue); order: 2; }
#deliveryView #newDeliveryOrderBtn::before { content: "+"; margin-right: 7px; font-size: 16px; font-weight: 400; }
#deliveryView #exportDeliveryOrdersBtn { order: 1; border: 1px solid var(--aq-line); background: white; color: var(--aq-ink); }
#deliveryView .shortcut-hint { display: none; }
#deliveryView .delivery-stats { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin: 0 0 12px; padding: 0; background: transparent; border: 0; box-shadow: none; }
#deliveryView .delivery-stats > .aq-kpi { display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; padding: 15px 16px; min-height: 108px; background: #fff; border: 1px solid var(--aq-line); border-radius: 11px; box-shadow: 0 1px 2px #17253b03; }
#deliveryView .aq-kpi-icon { width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 9px; font-weight: 650; color: #2871bd; background: #eaf3fe; }
#deliveryView .aq-kpi-fill .aq-kpi-icon { color: #137c8b; background: #e8f8fb; }
#deliveryView .aq-kpi-route .aq-kpi-icon { color: #344e6c; background: #edf0f5; }
#deliveryView .aq-kpi-late .aq-kpi-icon { color: #aa6c15; background: #fff4e6; }
#deliveryView .aq-kpi-done .aq-kpi-icon { color: #23865c; background: #eaf6ef; }
#deliveryView .delivery-stats strong { font-size: 26px; color: var(--aq-ink); line-height: 1.2; font-weight: 750; font-variant-numeric: tabular-nums; }
#deliveryView .delivery-stats .aq-kpi > span { grid-column: 1/-1; font-size: 12px; color: #2e3e53; font-weight: 600; }
#deliveryView .delivery-stats .aq-kpi > small { grid-column: 1/-1; font-size: 10px; color: var(--aq-muted); line-height: 1.4; }
#deliveryView .delivery-service-strip { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin: 0 0 22px; padding: 0 2px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
#deliveryView .delivery-service-strip > div { background: transparent; box-shadow: none; border-radius: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; border: 0; padding: 0; }
#deliveryView .delivery-service-strip span { text-transform: none; letter-spacing: 0; display: inline; font-size: 10px; color: var(--aq-muted); font-weight: 400; }
#deliveryView .delivery-service-strip strong { font-size: 11px; color: #324762; font-weight: 650; }
#deliveryView .delivery-service-strip p { display: block; background: transparent; box-shadow: none; border: 0; border-radius: 0; margin: 0 0 0 auto; font-size: 9px; color: #64748b; padding: 0; }
#deliveryView .module-workspace-tabs { display: flex; flex-wrap: wrap; gap: 5px; border: 0; border-bottom: 1px solid var(--aq-line); background: transparent; box-shadow: none; padding: 0 0 9px; margin: 0 0 10px; }
#deliveryView .module-workspace-tab, #deliveryView .aq-history-link { min-height: 35px; padding: 8px 13px; border: 1px solid transparent; border-radius: 7px; font-size: 11px; font-weight: 500; background: transparent; color: #637389; box-shadow: none; }
#deliveryView .module-workspace-tab.active { color: #196aba; background: #fff; border-color: var(--aq-line); font-weight: 650; }
#deliveryView .module-workspace-tab:hover, #deliveryView .aq-history-link:hover { background: #fff; color: #196aba; }
#deliveryView .enterprise-live-tabs { gap: 5px; padding: 0; margin: 0 0 16px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
#deliveryView .enterprise-live-tab { flex: 0 0 auto; min-width: 0; min-height: 30px; padding: 5px 10px; font-size: 10px; font-weight: 500; border-radius: 6px; border: 1px solid transparent; color: #586d86; }
#deliveryView .enterprise-live-tab.active { background: #e6eefb; border-color: #d9e5f7; color: #245eaa; box-shadow: none; font-weight: 600; }
#deliveryView .enterprise-live-tab[data-delivery-live-tab="board"] { order: -1; }
#deliveryView .delivery-orders-panel { padding: 0; border: 0; background: transparent; box-shadow: none; margin: 0; min-width: 0; }
#deliveryView .delivery-board-heading { display: flex; align-items: baseline; padding: 0; margin: 0 0 10px; border: 0; gap: 15px; }
#deliveryView .delivery-board-heading .enterprise-eyebrow { display: none; }
#deliveryView .delivery-board-heading h4 { margin: 0; font-size: 12px; color: #304057; font-weight: 600; }
#deliveryView .delivery-board-heading p { margin: 0; font-size: 10px; color: #687b91; }
#deliveryView .delivery-filters { display: grid; grid-template-columns: minmax(135px,1fr) minmax(150px,1fr) minmax(130px,1fr) minmax(200px,2fr); gap: 9px; margin: 0 0 16px; }
#deliveryView #deliveryTerritoryFilter { order: 0; }
#deliveryView #deliveryDriverFilter { order: 1; }
#deliveryView #deliveryStatusFilter { order: 2; }
#deliveryView #deliverySearch { order: 3; }
#deliveryView .delivery-filters :is(input,select) { height: 36px; min-height: 36px; padding: 7px 10px; border: 1px solid var(--aq-line); border-radius: 7px; font-size: 11px; background: #fff; box-shadow: none; }
#deliveryView .delivery-card-board.delivery-kanban-board { width: 100%; display: block; padding: 0 0 8px; min-height: 290px; height: clamp(280px,calc(100dvh - 564px),800px); max-height: none; overflow: auto; border: 0; border-radius: 0; background: transparent; scrollbar-gutter: auto; scrollbar-color: #aebed4 #e8ecf4; }
#deliveryView .delivery-kanban { display: grid; grid-template-columns: repeat(6,minmax(258px,1fr)); gap: 12px; min-width: 100%; width: max-content; height: 100%; padding: 0; align-items: stretch; }
#deliveryView .delivery-kanban-column { --aq-stage: #277cdb; width: 258px; min-width: 258px; display: flex; flex-direction: column; gap: 0; height: 100%; min-height: 270px; border: 1px solid var(--aq-line); border-radius: 10px; background: #ffffff66; overflow: hidden; }
#deliveryView .delivery-kanban-column[data-delivery-kanban-status="Proceso de llenado"] { --aq-stage: #16a0b4; }
#deliveryView .delivery-kanban-column[data-delivery-kanban-status="Proceso de entrega"] { --aq-stage: #233e60; }
#deliveryView .delivery-kanban-column[data-delivery-kanban-status="Retrasado"] { --aq-stage: #d88723; }
#deliveryView .delivery-kanban-column[data-delivery-kanban-status="Proceso de entrega"]do { --aq-stage: #25965e; }
#deliveryView .delivery-kanban-column[data-delivery-kanban-status="Cancelado"] { --aq-stage: #8291a4; }
#deliveryView .delivery-kanban-column > header { position: static; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; flex: 0 0 auto; min-height: 52px; padding: 13px 12px 10px; background: transparent; border: 0; gap: 8px; }
#deliveryView .delivery-kanban-column > header > div { border-left: 3px solid var(--aq-stage); padding-left: 7px; }
#deliveryView .delivery-kanban-column > header strong { font-size: 12px; color: #2d3d53; font-weight: 650; }
#deliveryView .delivery-kanban-column > header small { font-size: 9px; color: #78879c; margin-top: 3px; }
#deliveryView [data-delivery-column-count] { min-width: 23px; padding: 4px 6px; border-radius: 6px; font-size: 10px; color: var(--aq-stage); background: #e9eff8; font-weight: 600; text-align: center; }
#deliveryView .delivery-kanban-pagination { margin: 0; display: flex; flex-basis: 100%; gap: 6px; }
#deliveryView .delivery-kanban-pagination:has(button:first-child:disabled):has(button:last-child:disabled) { display: none; }
#deliveryView .delivery-kanban-pagination .mini-btn { min-height: 26px; padding: 3px 6px; font-size: 10px; border: 1px solid var(--aq-line); background: #fff; }
#deliveryView .delivery-kanban-stack { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-height: 0; max-height: none; overflow: auto; padding: 0 9px 10px; overscroll-behavior: contain; }
#deliveryView .delivery-kanban-empty { margin: 6px 0; padding: 22px 12px; border: 1px dashed #dbe3ef; border-radius: 8px; background: transparent; text-align: center; color: #8694a7; font-size: 11px; }
#deliveryView .delivery-order-card { flex: 0 0 auto; display: flex; flex-direction: column; width: 100%; min-width: 0; gap: 8px; padding: 12px; border: 1px solid var(--aq-line); border-radius: 9px; background: #fff; box-shadow: 0 1px 2px #17253b03; }
#deliveryView .delivery-order-card:hover { border-color: #b9cce4; box-shadow: 0 2px 7px #17253b09; transform: none; }
#deliveryView .delivery-order-card.is-delayed { border-color: #f0d5ae; background: #fff; }
#deliveryView .delivery-card-top { align-items: flex-start; gap: 8px; flex-wrap: wrap; }
#deliveryView .delivery-card-top > div { flex: 1; }
#deliveryView .delivery-card-top strong { color: #2777bf; font-size: 10px; font-weight: 600; overflow-wrap: anywhere; }
#deliveryView .delivery-card-top small { margin-top: 2px; color: #8290a2; font-size: 9px; line-height: 1.3; }
#deliveryView .delivery-time-chip { align-self: flex-start; padding: 3px 5px; max-width: 100%; font-size: 9px; font-weight: 500; line-height: 1.3; }
#deliveryView .delivery-card-customer strong { font-size: 13px; line-height: 1.4; font-weight: 650; color: #26364c; }
#deliveryView .delivery-card-alternate-address { display: block; margin-top: 3px; padding: 5px 7px; border-radius: 6px; background: #f1f6fb; color: #36536f; font-size: 10px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
#deliveryView .delivery-card-order-summary { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px 7px; padding: 0; border: 0; background: none; }
#deliveryView .delivery-card-order-summary strong, #deliveryView .delivery-card-order-summary span { font-size: 10px; color: #65758b; font-weight: 400; }
#deliveryView .aq-card-assignment { display: grid; gap: 3px; padding-top: 2px; }
#deliveryView .aq-card-assignment span { color: #3b536f; font-size: 10px; overflow-wrap: anywhere; }
#deliveryView .aq-card-assignment span::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--aq-stage); margin-right: 6px; vertical-align: middle; }
#deliveryView .aq-card-assignment small { font-size: 9px; color: #8090a4; overflow-wrap: anywhere; }
#deliveryView .aq-card-next button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 31px; padding: 6px 9px; background: #eef5ff; color: #2368ad; border: 1px solid #dfebfa; border-radius: 6px; font-size: 10px; font-weight: 600; box-shadow: none; }
#deliveryView .aq-card-next button:hover { background: #dfecff; }
#deliveryView .aq-card-details { margin: 0; padding: 0; border: 0; border-top: 1px solid #eef1f6; background: transparent; border-radius: 0; }
#deliveryView .aq-card-details > summary { padding: 7px 0 0; cursor: pointer; color: #728198; font-size: 10px; font-weight: 500; min-height: 24px; list-style-position: inside; }
#deliveryView .aq-card-details > summary::marker { font-size: 9px; }
#deliveryView .aq-card-details[open] > summary { color: #276bb0; }
#deliveryView .aq-card-detail-body { display: grid; gap: 9px; padding-top: 10px; }
#deliveryView .aq-card-contact { display: grid; gap: 4px; font-size: 11px; color: #3c526e; }
#deliveryView .aq-card-contact small { font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
#deliveryView .delivery-quick-grid { display: grid; grid-template-columns: 1fr; gap: 7px; }
#deliveryView .delivery-quick-grid label { display: grid; gap: 4px; font-size: 10px; }
#deliveryView .delivery-quick-grid select { height: 33px; min-height: 33px; border-radius: 6px; padding: 5px 7px; font-size: 11px; }
#deliveryView .delivery-card-actions { padding: 0; border: 0; display: grid; gap: 6px; }
#deliveryView .delivery-card-actions :is(button,a) { min-height: 31px; padding: 6px 9px; border-radius: 6px; font-size: 10px; }
#deliveryView .delivery-card-notes { font-size: 10px; line-height: 1.5; margin: 0; }
/* Order capture: native dialog and original form logic. */
.aq-visual #deliveryOrderDialog { width: min(940px,calc(100vw - 36px)); max-width: 940px; max-height: 92dvh; padding: 0; border: 1px solid #dce3ee; border-radius: 15px; box-shadow: 0 28px 90px #06182f38; background: var(--aq-canvas); overflow: auto; }
.aq-visual #deliveryOrderDialog::backdrop { background: #0c203962; backdrop-filter: none; }
.aq-visual #deliveryOrderForm { display: flex; flex-direction: column; gap: 16px; padding: 0 24px; }
.aq-order-header { position: relative; padding: 25px 38px 0 0; background: var(--aq-canvas); }
.aq-order-header h3 { margin: 4px 0 5px; color: var(--aq-ink); font-size: 25px; font-weight: 750; letter-spacing: -.6px; }
.aq-order-header p { margin: 0; color: #748298; font-size: 12px; line-height: 1.5; }
.aq-close-order { position: absolute; right: -7px; top: 16px; width: 35px; height: 35px; min-height: 35px; padding: 0; border: 1px solid var(--aq-line); background: white; color: #5d6e84; font-size: 25px; border-radius: 8px; }
.aq-visual #deliveryOrderDetails { display: flex; flex-direction: column; gap: 16px; }
.aq-visual .aq-form-section { background: white; border: 1px solid var(--aq-line); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 13px; }
.aq-visual .aq-form-section h4 { margin: 0 0 1px; padding-left: 9px; border-left: 3px solid #3186d9; color: #2c3a4f; font-size: 13px; font-weight: 650; }
.aq-visual #deliveryOrderForm label { display: grid; gap: 5px; margin: 0; font-size: 10px; font-weight: 600; letter-spacing: .1px; color: #68798f; }
.aq-visual #deliveryOrderForm :is(input,select,textarea) { border: 1px solid #e1e5f0; border-radius: 6px; min-height: 38px; padding: 8px 10px; background: #f5f6fb; color: #32445b; font-size: 12px; font-weight: 400; }
.aq-visual #deliveryOrderForm input[readonly] { color: #49617a; background: #f1f4fa; }
.aq-visual #deliveryOrderForm .form-grid { display: grid; align-items: end; gap: 13px; margin: 0; }
.aq-visual #deliveryOrderForm .form-grid.two-cols { grid-template-columns: repeat(2,minmax(0,1fr)); }
.aq-visual #deliveryOrderForm .form-grid.three-cols { grid-template-columns: repeat(3,minmax(0,1fr)); }
.aq-visual #deliveryOrderForm .hint { margin: 0; font-size: 10px; line-height: 1.5; font-weight: 400; }
.aq-visual #deliveryOrderForm button { min-height: 37px; padding: 8px 13px; font-size: 11px; border-radius: 7px; font-weight: 600; box-shadow: none; }
.aq-visual #deliveryOrderForm .primary { background: var(--aq-blue); }
.aq-visual #deliveryOrderForm .formula-box { padding: 10px 13px; border: 1px solid #e0e8f4; border-radius: 7px; background: #ecf2fb; color: #607794; font-size: 10px; line-height: 1.5; }
.aq-visual #deliveryOrderForm .delivery-alt-address-box { display: grid; gap: 10px; padding: 11px 12px; border: 1px solid #dce6f3; border-radius: 8px; background: #f8fbff; }
.aq-visual #deliveryOrderForm .delivery-alt-address-toggle { display: flex; grid-template-columns: none; align-items: flex-start; gap: 9px; color: #435a73; cursor: pointer; }
.aq-visual #deliveryOrderForm .delivery-alt-address-toggle input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 2px 0 0; flex: 0 0 16px; accent-color: var(--aq-blue); }
.aq-visual #deliveryOrderForm .delivery-alt-address-toggle span { display: grid; gap: 2px; }
.aq-visual #deliveryOrderForm .delivery-alt-address-toggle strong { font-size: 11px; color: #314a66; }
.aq-visual #deliveryOrderForm .delivery-alt-address-toggle small { font-size: 9px; color: #7b8ea4; font-weight: 400; }
.aq-visual #deliveryOrderForm .delivery-alt-address-fields { display: grid; gap: 10px; padding-top: 2px; }
.aq-visual #deliveryTotalPreview { font-weight: 750 !important; color: #226fba !important; }
.aq-visual #deliveryOrderForm .delivery-order-actions { position: sticky; bottom: 0; margin: 0 -24px; padding: 14px 24px; border-top: 1px solid var(--aq-line); background: #fff; display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; z-index: 2; }
.aq-visual #cancelDeliveryOrderBtn { margin-right: auto; }
.aq-visual #deliveryOrderForm .delivery-inline-customer { margin: 0; padding: 13px; background: #f8faff; border: 1px solid #deebfb; border-radius: 7px; }
@media (min-width:901px) {
  .aq-visual .topbar { padding: 10px 22px; min-height: var(--v7916-header-h); }
  .aq-visual .layout { grid-template-columns: 232px minmax(0,1fr); }
  .aq-visual .side-menu { padding: 15px 12px; }
  .aq-visual .content { padding: 27px 30px 20px; }
}
@media (min-width:1600px) {
  #deliveryView .delivery-kanban-column { width: 276px; min-width: 276px; }
  #deliveryView .delivery-kanban { grid-template-columns: repeat(6,minmax(276px,1fr)); }
}
@media (min-width:901px) and (max-width:1150px) {
  .aq-visual .layout { grid-template-columns: 212px minmax(0,1fr); }
  .aq-visual .content { padding: 20px; }
  .aq-visual .global-search-launcher strong, .aq-visual .global-search-launcher kbd { display: none; }
  .aq-visual #deliveryView .enterprise-page-header { flex-wrap: wrap; gap: 13px; margin-bottom: 18px; }
  #deliveryView .delivery-stats { gap: 8px; }
  #deliveryView .delivery-stats > .aq-kpi { padding: 12px; }
  #deliveryView .delivery-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #deliveryView #deliverySearch { grid-column: 1/-1; }
}
@media (max-width:900px) {
  .aq-visual .topbar { min-height: 76px; flex-wrap: wrap; gap: 7px 12px; padding: 10px 14px; }
  .aq-visual .aq-menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 35px; padding: 7px 10px; font-size: 11px; border: 1px solid var(--aq-line); border-radius: 6px; }
  .aq-visual .layout { display: block; }
  .aq-visual .side-menu { display: none; position: fixed; top: 0; bottom: 0; left: 0; width: min(300px,85vw); max-height: 100dvh; height: 100dvh; padding: 20px 14px; z-index: 80; overflow: auto; }
  .aq-visual.aq-nav-open .side-menu { display: flex; }
  .aq-visual .side-menu .menu-group-items { grid-template-columns: 1fr; }
  .aq-visual .content { padding: 20px 16px; }
  .aq-visual .topbar-brand { flex: 1; }
  .aq-visual .topbar h2 { font-size: 15px; }
  .aq-visual .topbar-actions { margin-left: auto; }
  .aq-visual .global-search-launcher strong, .aq-visual .global-search-launcher kbd { display: none; }
  .aq-visual .session-badges { display: none; }
  .aq-visual .version-badge { display: block; font-size: 9px; }
  .aq-visual #sessionInfo { font-size: 10px; }
  .aq-visual #deliveryView .enterprise-page-header { flex-wrap: wrap; gap: 13px; margin-bottom: 18px; }
  .aq-visual #deliveryView .enterprise-page-header h3 { font-size: 25px; }
  #deliveryView .delivery-stats { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
  #deliveryView .delivery-stats > .aq-kpi { padding: 12px; min-height: 100px; }
  #deliveryView .delivery-service-strip { gap: 9px 18px; margin-bottom: 15px; }
  #deliveryView .delivery-service-strip p { display: block; background: transparent; box-shadow: none; border: 0; border-radius: 0; margin: 0; flex-basis: 100%; }
  #deliveryView .delivery-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #deliveryView .delivery-board-heading { flex-wrap: wrap; gap: 6px; }
  #deliveryView .delivery-board-heading p { text-align: left; }
  #deliveryView .delivery-card-board.delivery-kanban-board { height: 500px; max-height: 72dvh; }
  #deliveryView .enterprise-live-tabs { flex-wrap: wrap; }
}
@media (max-width:520px) {
  .aq-visual .brand-logo-small { width: 33px; height: 33px; }
  .aq-visual .topbar-brand { gap: 7px; }
  .aq-visual .topbar-actions { width: 100%; justify-content: flex-end; }
  .aq-visual .content { padding: 18px 12px; }
  #deliveryView .delivery-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #deliveryView .delivery-stats .aq-kpi:last-child { grid-column: 1/-1; min-height: 78px; }
  #deliveryView .delivery-stats .aq-kpi:last-child > span { grid-column: 1; }
  #deliveryView .delivery-stats .aq-kpi:last-child > small { grid-column: 1; }
  #deliveryView .delivery-stats .aq-kpi:last-child > strong { grid-column: 2; grid-row: 1/4; align-self: center; }
  #deliveryView .delivery-stats .aq-kpi:last-child > i { display: none; }
  #deliveryView .module-workspace-tab, #deliveryView .aq-history-link { font-size: 10px; padding: 7px 9px; }
  #deliveryView .delivery-filters { gap: 8px; }
  #deliveryView #deliverySearch { grid-column: 1/-1; }
  #deliveryView .header-actions { width: 100%; }
  #deliveryView .header-actions button { flex: 1; padding: 8px; font-size: 11px; }
  .aq-visual #deliveryOrderDialog { width: calc(100vw - 16px); max-height: 94dvh; border-radius: 10px; }
  .aq-visual #deliveryOrderForm { padding: 0 12px; gap: 12px; }
  .aq-visual .aq-form-section { padding: 14px; }
  .aq-visual #deliveryOrderForm .form-grid.two-cols, .aq-visual #deliveryOrderForm .form-grid.three-cols { grid-template-columns: 1fr; }
  .aq-visual #deliveryOrderForm .delivery-order-actions { margin: 0 -12px; padding: 12px; }
  .aq-visual #deliveryOrderForm .delivery-order-actions button { flex: 1 1 45%; }
  .aq-visual #saveDeliveryOrderBtn { flex-basis: 100% !important; }
  .aq-order-header h3 { font-size: 23px; }
}
@media (prefers-reduced-motion:reduce) { .aq-visual *, .aq-visual *::before { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .aq-visual .aq-menu-toggle { display: none !important; }
  #deliveryView .delivery-card-board.delivery-kanban-board { height: auto; overflow: visible; }
  #deliveryView .delivery-kanban { display: block; height: auto; }
  #deliveryView .delivery-kanban-column { height: auto; width: auto; margin-bottom: 12px; }
  #deliveryView .delivery-kanban-stack { overflow: visible; }
}

/* Short desktop screens retain both board scrollbars without clipping actions. */
@media (min-width:1151px) and (max-height:850px) {
  .aq-visual .content { padding-top: 16px; }
  .aq-visual #deliveryView .enterprise-page-header { margin-bottom: 14px; }
  .aq-visual #deliveryView .enterprise-page-header h3 { font-size: 25px; margin-top: 2px; }
  #deliveryView .delivery-stats > .aq-kpi { min-height: 92px; padding: 10px 13px; gap: 3px 7px; }
  #deliveryView .delivery-stats strong { font-size: 23px; }
  #deliveryView .delivery-stats { margin-bottom: 8px; }
  #deliveryView .delivery-service-strip { margin-bottom: 10px; }
  #deliveryView .enterprise-live-tabs { margin-bottom: 10px; }
  #deliveryView .delivery-filters { margin-bottom: 10px; }
  #deliveryView .delivery-card-board.delivery-kanban-board { height: clamp(260px,calc(100dvh - 490px),420px); min-height: 260px; }
  #deliveryView .delivery-kanban-column { min-height: 246px; }
}

#deliveryView .delivery-board-heading p { display: block; margin-left: auto; }
#deliveryView .aq-board-navigation { display: inline-flex; flex-shrink: 0; gap: 4px; }
#deliveryView .aq-board-scroll { min-height: 24px; height: 24px; width: 28px; padding: 0; border: 1px solid var(--aq-line); border-radius: 5px; background: white; color: #416689; box-shadow: none; font-size: 15px; }
#deliveryView .aq-board-scroll:hover { background: #e7f0fc; }
@media (min-width:901px) {
  .aq-visual #deliveryOrderDetails { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); align-items: start; }
  .aq-visual #deliveryOrderDetails > .formula-box { grid-column: 1/-1; }
  .aq-visual #deliveryOrderDetails > .aq-form-section { height: 100%; }
}
@media (max-width:520px) {
  #deliveryView .delivery-board-heading p { width: calc(100% - 76px); flex: 1; margin-left: 0; }
  #deliveryView .delivery-board-heading > div:first-child { flex-basis: 100%; }
}


/* V79.17.22.8 · tablero domicilio por fecha + dias con cortes pendientes */
#deliveryView .aq-kpi-pending-cuts {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
#deliveryView .aq-kpi-pending-cuts .aq-kpi-icon { color: #7a4cb5; background: #f2ebfb; }
#deliveryView .aq-kpi-pending-cuts:hover { border-color: #b6c8df; background: #fbfdff; }
#deliveryView .aq-kpi-pending-cuts:focus-visible { outline: 3px solid rgba(39,113,189,.18); outline-offset: 2px; }
#deliveryView .delivery-day-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 12px;
  padding: 11px 14px;
  border: 1px solid var(--aq-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}
#deliveryView .delivery-day-summary { display: flex; align-items: center; gap: 12px; min-width: 0; }
#deliveryView .delivery-day-summary > div { display: grid; gap: 1px; min-width: 0; }
#deliveryView .delivery-day-summary small { font-size: 9px; color: var(--aq-muted); text-transform: uppercase; letter-spacing: .06em; }
#deliveryView .delivery-day-summary strong { font-size: 13px; color: var(--aq-ink); white-space: normal; }
#deliveryView .delivery-day-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf6ef;
  color: #237456;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
  white-space: nowrap;
}
#deliveryView .delivery-day-badge.historical { background: #eef3fb; color: #3f5f86; }
#deliveryView .delivery-day-actions { display: flex; align-items: end; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
#deliveryView .delivery-day-actions label { display: grid; gap: 3px; font-size: 9px; color: var(--aq-muted); font-weight: 650; }
#deliveryView .delivery-day-actions input[type="date"] { min-height: 34px; padding: 6px 9px; border: 1px solid var(--aq-line); border-radius: 7px; background: #fff; color: var(--aq-ink); font-size: 11px; }
#deliveryView .delivery-day-actions .mini-btn { min-height: 34px; }

.delivery-pending-cuts-dialog { width: min(980px, calc(100vw - 32px)); max-width: 980px; border: 0; border-radius: 14px; padding: 0; }
.delivery-pending-cuts-dialog::backdrop { background: rgba(16,31,50,.35); }
.delivery-pending-cuts-shell { padding: 20px; display: grid; gap: 12px; }
.delivery-pending-cuts-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.delivery-pending-cuts-head h3 { margin: 2px 0 4px; }
.delivery-pending-cuts-head p { margin: 0; max-width: 760px; }
.delivery-pending-cuts-summary { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 11px 13px; border: 1px solid var(--aq-line); border-radius: 9px; background: #f8fbff; }
.delivery-pending-cuts-summary strong { color: var(--aq-ink); }
.delivery-pending-cuts-summary span, .delivery-pending-cuts-status { font-size: 11px; color: var(--aq-muted); }
.delivery-pending-cuts-table-wrap { max-height: 430px; overflow: auto; border: 1px solid var(--aq-line); border-radius: 9px; }
.delivery-pending-cuts-table-wrap table { min-width: 820px; margin: 0; }
.delivery-pending-cuts-table-wrap thead th { position: sticky; top: 0; z-index: 1; background: #f7f9fc; }

@media (max-width: 1150px) {
  #deliveryView .delivery-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  #deliveryView .delivery-day-toolbar { align-items: stretch; flex-direction: column; }
  #deliveryView .delivery-day-actions { justify-content: flex-start; }
  #deliveryView .delivery-day-actions label { flex: 1 1 180px; }
  #deliveryView .delivery-day-actions input[type="date"] { width: 100%; min-width: 0; }
  .delivery-pending-cuts-shell { padding: 14px; }
}
