/* AquaFlow V34.2.25 — Order / Delivery UI Sync
   Keep Order and Delivery as two workspaces in one enterprise visual system. */
#orders,
#deliveries{
  --od-line:#d9e6f1;
  --od-text:#143653;
  --od-muted:#6d8296;
  --od-blue:#0878ef;
  --od-blue-soft:#eef6ff;
  --od-green:#0aa56f;
  --od-green-soft:#ecfaf4;
  --od-radius:16px;
}

/* Shared page-heading rhythm. */
#orders .aquaflow-page-head,
#deliveries .delivery-page-head{
  margin-bottom:10px!important;
}
#deliveries .delivery-page-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  min-height:64px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#deliveries .delivery-page-head>div:first-child{min-width:0!important}
#deliveries .delivery-page-head>div:first-child>small{
  display:block!important;
  margin:0 0 3px!important;
  color:var(--od-blue)!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.12em!important;
}
#deliveries .delivery-page-head h2{
  margin:0!important;
  color:var(--od-text)!important;
  font-size:24px!important;
  line-height:1.1!important;
  font-weight:950!important;
  letter-spacing:-.03em!important;
}
#deliveries .delivery-page-head .staff-page-note{
  margin:4px 0 0!important;
  color:var(--od-muted)!important;
  font-size:11px!important;
  line-height:1.3!important;
}
#deliveries .delivery-head-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  flex:0 0 auto!important;
}
#deliveries .delivery-head-actions .btn{
  min-height:42px!important;
  height:42px!important;
  padding:0 13px!important;
  border-radius:11px!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
#deliveries .delivery-head-actions .btn.secondary{
  border:1px solid #cbddeb!important;
  background:#fff!important;
  color:#274b69!important;
  box-shadow:0 3px 10px rgba(25,62,91,.035)!important;
}
#deliveries .delivery-head-actions .delivery-create-button{
  border-color:var(--od-blue)!important;
  background:linear-gradient(135deg,#168cff,var(--od-blue))!important;
  color:#fff!important;
  box-shadow:0 7px 16px rgba(8,120,239,.14)!important;
}

/* The same enterprise process bar is used on both pages. */
#orders .enterprise-flow-v34220,
#deliveries .enterprise-flow-v34220{
  margin-bottom:10px!important;
  border-color:var(--od-line)!important;
  border-radius:14px!important;
  box-shadow:0 3px 12px rgba(23,55,89,.035)!important;
}

/* Delivery tools now use the same card language as the Order filter area. */
#deliveries .sepay-reopen-toolbar,
#deliveries .employee-search-panel{
  border:1px solid var(--od-line)!important;
  border-radius:var(--od-radius)!important;
  background:#fff!important;
  box-shadow:0 3px 12px rgba(23,55,89,.035)!important;
}
#deliveries .sepay-reopen-toolbar{
  min-height:58px!important;
  margin:0 0 10px!important;
  padding:9px 10px!important;
}
#deliveries .sepay-reopen-toolbar .btn{
  min-height:40px!important;
  border-radius:11px!important;
  font-weight:900!important;
}
#deliveries .employee-search-panel{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px!important;
  margin:0 0 10px!important;
  padding:8px!important;
}
#deliveries .employee-search-box{
  min-width:0!important;
  min-height:44px!important;
  height:44px!important;
  border:1px solid #c9dbea!important;
  border-radius:12px!important;
  background:#fff!important;
}
#deliveries .employee-search-count{
  min-width:68px!important;
  min-height:44px!important;
  height:44px!important;
  border-radius:12px!important;
  background:var(--od-blue-soft)!important;
  color:#086bcf!important;
  font-weight:900!important;
}

/* Delivery list cards mirror the visual hierarchy of Order cards. */
#deliveries .staff-delivery-list-compact{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:10px!important;
}
#deliveries .staff-delivery-compact.delivery-card-v34225{
  position:relative!important;
  overflow:hidden!important;
  border:1px solid #cce9dc!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 4px 14px rgba(25,62,91,.045)!important;
  contain:none!important;
}
#deliveries .staff-delivery-compact.delivery-card-v34225:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:var(--od-green);
}
#deliveries .delivery-card-v34225>summary.delivery-card-summary-v34225{
  display:block!important;
  min-height:0!important;
  padding:13px 13px 12px 16px!important;
  list-style:none!important;
  cursor:pointer!important;
  background:#fff!important;
}
#deliveries .delivery-card-v34225>summary::-webkit-details-marker{display:none!important}
#deliveries .delivery-card-head-v34225{
  display:grid!important;
  grid-template-columns:auto auto minmax(0,1fr) 26px!important;
  align-items:center!important;
  gap:7px!important;
  min-width:0!important;
  margin-bottom:10px!important;
}
#deliveries .delivery-sequence-v34225{
  display:grid!important;
  place-items:center!important;
  width:30px!important;
  height:30px!important;
  border-radius:10px!important;
  background:#daf4e8!important;
  color:#087a58!important;
  font-size:11px!important;
  font-weight:950!important;
}
#deliveries .delivery-status-v34225{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:30px!important;
  padding:0 10px!important;
  border-radius:999px!important;
  background:#e1f7ed!important;
  color:#087a58!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
#deliveries .delivery-order-number-v34225{
  min-width:0!important;
  color:#173d5d!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:900!important;
  letter-spacing:.05em!important;
  text-align:right!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#deliveries .delivery-card-v34225 .staff-delivery-chevron{
  display:grid!important;
  place-items:center!important;
  width:26px!important;
  height:26px!important;
  color:#71889b!important;
  font-size:21px!important;
  line-height:1!important;
}
#deliveries .delivery-card-customer-v34225{
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
  margin-bottom:10px!important;
}
#deliveries .delivery-customer-avatar-v34225{
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  height:44px!important;
  border-radius:13px!important;
  background:#e9f4ff!important;
  color:var(--od-blue)!important;
  font-size:18px!important;
  line-height:1!important;
  font-weight:950!important;
}
#deliveries .delivery-customer-copy-v34225{
  display:grid!important;
  gap:3px!important;
  min-width:0!important;
}
#deliveries .delivery-customer-copy-v34225>strong{
  color:var(--od-text)!important;
  font-size:18px!important;
  line-height:1.15!important;
  font-weight:950!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#deliveries .delivery-customer-copy-v34225>small{
  max-width:100%!important;
  color:var(--od-muted)!important;
  font-size:11px!important;
  line-height:1.2!important;
  font-weight:700!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#deliveries .delivery-money-v34225{
  display:grid!important;
  justify-items:end!important;
  gap:3px!important;
  min-width:0!important;
  text-align:right!important;
}
#deliveries .delivery-money-v34225>strong{
  color:var(--od-blue)!important;
  font-size:18px!important;
  line-height:1.05!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
#deliveries .delivery-money-v34225>small{
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:850!important;
}
#deliveries .delivery-card-facts-v34225{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:0!important;
  overflow:hidden!important;
  border:1px solid #d9e6f1!important;
  border-radius:13px!important;
  background:#f8fbfe!important;
}
#deliveries .delivery-card-facts-v34225>div{
  display:grid!important;
  align-content:center!important;
  gap:5px!important;
  min-width:0!important;
  padding:9px 10px!important;
}
#deliveries .delivery-card-facts-v34225>div+div{border-left:1px solid #dce7f0!important}
#deliveries .delivery-card-facts-v34225 span{
  min-width:0!important;
  color:#61798e!important;
  font-size:11px!important;
  line-height:1.2!important;
  font-weight:750!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#deliveries .delivery-card-facts-v34225 b{color:#536d83!important;font-weight:900!important}
#deliveries .delivery-card-facts-v34225 .source{color:#9c6500!important;font-weight:900!important}
#deliveries .delivery-card-v34225[open]>summary{background:#fff!important}
#deliveries .delivery-card-v34225[open] .staff-delivery-chevron{transform:rotate(90deg)!important}
#deliveries .delivery-card-expanded-v34225{
  display:grid!important;
  gap:10px!important;
  padding:11px 13px 13px 16px!important;
  border-top:1px solid #e2edf4!important;
  background:#fbfdff!important;
}
#deliveries .delivery-card-expanded-v34225 .staff-delivery-facts{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:7px!important;
}
#deliveries .delivery-card-expanded-v34225 .staff-delivery-facts>span{
  border:1px solid #e2ebf3!important;
  border-radius:11px!important;
  background:#fff!important;
  padding:8px 9px!important;
}
#deliveries .delivery-card-expanded-v34225 .staff-delivery-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:8px!important;
}
#deliveries .delivery-card-expanded-v34225 .staff-delivery-actions button,
#deliveries .delivery-card-expanded-v34225 .sepay-reopen-button{
  min-height:40px!important;
  border-radius:10px!important;
}
#deliveries .empty-state{
  min-height:190px!important;
  display:grid!important;
  place-content:center!important;
  gap:8px!important;
  border:1px dashed #bfd8ee!important;
  border-radius:18px!important;
  background:#fff!important;
  color:#62798e!important;
  text-align:center!important;
}

@media(max-width:760px){
  #orders,
  #deliveries{padding-bottom:calc(106px + env(safe-area-inset-bottom))!important}
  #deliveries .delivery-page-head{
    min-height:62px!important;
    margin:0 0 8px!important;
  }
  #deliveries .delivery-page-head>div:first-child>small,
  #deliveries .delivery-page-head .staff-page-note{display:none!important}
  #deliveries .delivery-page-head h2{
    font-size:28px!important;
    line-height:1!important;
  }
  #deliveries .delivery-head-actions{gap:6px!important}
  #deliveries .delivery-head-actions .btn{
    min-height:44px!important;
    height:44px!important;
    padding:0 11px!important;
    border-radius:11px!important;
    font-size:12px!important;
  }
  #deliveries .delivery-head-actions .btn.secondary{min-width:112px!important}
  #deliveries .delivery-head-actions .delivery-create-button{min-width:126px!important}
  #deliveries .sepay-reopen-toolbar{
    grid-template-columns:auto minmax(0,1fr)!important;
    min-height:58px!important;
  }
  #deliveries .sepay-reopen-toolbar span{
    color:#637b91!important;
    font-size:11px!important;
    line-height:1.3!important;
  }
  #deliveries .employee-search-box,
  #deliveries .employee-search-count{
    min-height:46px!important;
    height:46px!important;
  }
  #deliveries .delivery-card-v34225>summary.delivery-card-summary-v34225{
    padding:12px 11px 11px 15px!important;
  }
  #deliveries .delivery-card-head-v34225{gap:6px!important;margin-bottom:9px!important}
  #deliveries .delivery-sequence-v34225{width:28px!important;height:28px!important;border-radius:9px!important;font-size:10px!important}
  #deliveries .delivery-status-v34225{min-height:28px!important;padding:0 8px!important;font-size:10.5px!important}
  #deliveries .delivery-order-number-v34225{font-size:11px!important}
  #deliveries .delivery-card-customer-v34225{grid-template-columns:42px minmax(0,1fr) auto!important;gap:9px!important}
  #deliveries .delivery-customer-avatar-v34225{width:42px!important;height:42px!important;border-radius:12px!important;font-size:17px!important}
  #deliveries .delivery-customer-copy-v34225>strong{font-size:17px!important}
  #deliveries .delivery-customer-copy-v34225>small{font-size:10.5px!important}
  #deliveries .delivery-money-v34225>strong{font-size:17px!important}
  #deliveries .delivery-card-facts-v34225>div{padding:8px 9px!important;gap:4px!important}
  #deliveries .delivery-card-facts-v34225 span{font-size:10.5px!important}
}

@media(max-width:390px){
  #deliveries .delivery-page-head h2{font-size:25px!important}
  #deliveries .delivery-head-actions .btn.secondary{min-width:104px!important;padding:0 8px!important;font-size:11px!important}
  #deliveries .delivery-head-actions .delivery-create-button{min-width:116px!important;padding:0 9px!important;font-size:11px!important}
  #deliveries .delivery-card-customer-v34225{grid-template-columns:38px minmax(0,1fr) auto!important}
  #deliveries .delivery-customer-avatar-v34225{width:38px!important;height:38px!important;font-size:16px!important}
  #deliveries .delivery-customer-copy-v34225>strong{font-size:15.5px!important}
  #deliveries .delivery-money-v34225>strong{font-size:15.5px!important}
  #deliveries .delivery-card-facts-v34225 span{font-size:9.7px!important}
}

/* V34.2.47 — keep completed delivery cards price-visible like order cards. */
#deliveries .delivery-unit-price-v34247{
  color:#0878ef!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:-.01em!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  line-height:1.25!important;
}
@media (max-width:430px){
  #deliveries .delivery-unit-price-v34247{font-size:9px!important}
}

/* V34.2.48 — quantity + unit price share one product row. */
#deliveries .delivery-product-line-v34248{
  color:#61798e!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  line-height:1.22!important;
}
#deliveries .delivery-product-line-v34248 b{font-weight:900!important}
