/* AquaFlow 4.06.1.44 — Order workspace. Scoped to preserve other workflows. */
#orders{--order-line:#dce6f0;--order-muted:#586e84;max-width:100%;min-width:0}
#orders .aquaflow-page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:0}
#orders .aquaflow-page-head small{font-size:10px!important;letter-spacing:.08em}
#orders .aquaflow-page-head h2{font-size:24px!important;line-height:1.25;margin:4px 0;color:#15324e}
#orders .aquaflow-page-head .section-note{display:none}
#orders .aquaflow-page-head .btn{min-height:44px;padding:0 16px;border-radius:12px;font-size:14px;flex-shrink:0}
#orders .aquaflow-order-hero{min-height:0!important;padding:16px 18px!important;border-radius:16px!important;box-shadow:none!important;background:linear-gradient(110deg,#0867dc,#168bf4)!important}
#orders .aquaflow-order-hero:after{display:none}
#orders .aquaflow-order-hero>div{gap:4px}
#orders .aquaflow-order-hero small{font-size:10px!important}
#orders .aquaflow-order-hero strong{font-size:22px!important;line-height:1.3;letter-spacing:-.4px}
#orders .aquaflow-order-hero span{font-size:12px;color:#eff7ff}
#orders #order-go-deliveries{display:none}
#orders .order-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
#orders .order-kpi-grid article{min-width:0;min-height:78px;padding:12px!important;border:1px solid var(--order-line);border-top:3px solid #1682ef;border-radius:12px!important;background:#fff!important;box-shadow:none!important}
#orders .order-kpi-grid article:nth-child(2){border-top-color:#bd760f}
#orders .order-kpi-grid article:nth-child(3){border-top-color:#079676}
#orders .order-kpi-grid article:nth-child(4){border-top-color:#7860d6}
#orders .order-kpi-grid small{font-size:10px!important;letter-spacing:0!important;color:var(--order-muted)!important}
#orders .order-kpi-grid strong{font-size:21px!important;margin-top:6px;line-height:1.2;white-space:normal;overflow:visible;letter-spacing:-.5px;overflow-wrap:anywhere}
#orders .order-kpi-grid article:last-child strong{font-size:18px!important}
#orders .order-kpi-grid article>span{display:none}
#orders .order-filter-panel{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:12px;margin-bottom:14px;border:1px solid var(--order-line);border-radius:14px;background:#fff;box-shadow:none;position:static;min-width:0}
#orders .order-filter-tools{display:grid;grid-template-columns:190px minmax(0,1fr);gap:10px;min-width:0;order:-1}
#orders .order-filter-tools label{display:grid;gap:5px;min-width:0;font-size:11px;color:var(--order-muted);font-weight:600}
#orders .order-filter-tools input{display:block;width:100%!important;max-width:100%;min-width:0!important;height:44px!important;margin:0;padding:0 12px;font-size:16px!important;border:1px solid #cbdbea;border-radius:10px;box-sizing:border-box;background:#fff;color:#15324e}
#orders .order-filter-tabs{display:flex;flex-wrap:wrap;gap:6px;overflow:visible;margin:0;padding:0;border:0}
#orders .order-filter-tabs button{flex:0 0 auto;min-height:44px;padding:0 14px;border:1px solid transparent;border-radius:9px;font-size:13px!important;background:#f2f6fa;color:#4f667b;white-space:nowrap}
#orders .order-filter-tabs button.active{background:#e7f1ff;color:#086bdc;border-color:#afd1ff}
#orders .aquaflow-order-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
#orders .aquaflow-order-list>.empty-state{grid-column:1/-1}
#orders .aquaflow-order-card{min-width:0;padding:16px!important;gap:12px!important;border:1px solid var(--order-line);border-radius:14px!important;box-shadow:0 3px 12px #183d6510;overflow:hidden;background:#fff}
#orders .aquaflow-order-card:before{width:3px}
#orders .order-card-head{gap:8px;align-items:flex-start}
#orders .order-card-time{display:grid;gap:3px;min-width:0}
#orders .order-card-time span{font-size:11px;color:var(--order-muted);overflow-wrap:anywhere}
#orders .order-card-time strong{font-size:12px;color:#405a73}
#orders .order-card-badges .status{font-size:10px!important;padding:5px 8px;letter-spacing:0;white-space:normal;text-align:center}
#orders .order-card-customer{padding:0;background:transparent;grid-template-columns:38px minmax(0,1fr) 22px;gap:10px;border-radius:8px}
#orders .order-customer-avatar{width:38px;height:38px;border-radius:11px;font-size:16px}
#orders .order-customer-copy strong{font-size:18px!important;line-height:1.35;overflow-wrap:anywhere}
#orders .order-customer-copy small{font-size:12px!important;letter-spacing:0!important;color:var(--order-muted);white-space:normal}
#orders .order-card-products span{font-size:12px;padding:6px 10px;background:#f3f8ff;border:0;border-radius:8px}
#orders .order-card-products b{font-size:15px}
#orders .order-card-meta{gap:10px;grid-template-columns:1fr 1fr}
#orders .order-card-meta>span{display:grid;gap:5px;background:#f5f8fc;padding:10px;border-radius:10px}
#orders .order-card-meta small{font-size:10px!important;letter-spacing:0!important;color:var(--order-muted)!important}
#orders .order-card-meta strong{font-size:14px;white-space:normal;overflow-wrap:anywhere}
#orders .order-card-meta>span:first-child strong{font-size:18px}
#orders .order-card-actions{display:flex!important;flex-wrap:wrap;gap:8px}
#orders .order-card-actions .mini-btn{flex:1 1 110px;width:auto;min-height:44px!important;font-size:14px;border-radius:10px}
#orders .order-card-actions .order-complete-existing{flex-basis:100%}
#orders .order-more-actions{margin:0;padding-top:0;border-top:1px solid #e8eef5}
#orders .order-more-actions summary{min-height:44px;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--order-muted)}
#orders .order-more-actions .mini-btn{min-height:44px;font-size:13px}
#orders .order-card-note{font-size:12px}
#orders button:focus-visible,#orders input:focus-visible{outline:3px solid #75b6ff;outline-offset:2px}
@media(max-width:700px){
 #orders .aquaflow-order-list{grid-template-columns:minmax(0,1fr)}
 #orders .aquaflow-page-head h2{font-size:20px!important}
 #orders .aquaflow-page-head .btn{padding:0 12px;font-size:13px}
 #orders .order-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #orders .order-kpi-grid article{min-height:70px;padding:10px 12px!important}
 #orders .order-filter-tools{grid-template-columns:minmax(0,1fr)}
 #orders .order-filter-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 #orders .order-filter-tabs button{padding:0 4px;font-size:12px!important;min-width:0}
 #orders .aquaflow-order-card{padding:14px!important}
}
@media(max-width:980px){
 #orders{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
}

/* AquaFlow v4.15.6 compact order rows — collapsed by default, tap to expand. */
#orders .order-card-collapsible {
  display: block;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden;
  border-radius: 13px !important;
}
#orders .order-card-collapsible > summary {
  list-style: none;
}
#orders .order-card-collapsible > summary::-webkit-details-marker { display: none; }
#orders .order-card-summary {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto 16px;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 7px 10px 7px 11px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#orders .order-card-summary .order-customer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 13px;
}
#orders .order-summary-main,
#orders .order-summary-side { min-width: 0; }
#orders .order-summary-main { display: grid; gap: 2px; }
#orders .order-summary-main > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #15324e;
  font-size: 14px;
  line-height: 1.2;
}
#orders .order-summary-main > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #708499;
  font-size: 10px !important;
  line-height: 1.2;
  letter-spacing: 0 !important;
}
#orders .order-summary-side {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
  white-space: nowrap;
}
#orders .order-summary-side > strong { color: #086bdc; font-size: 13px; line-height: 1.2; }
#orders .order-summary-side > small { color: #657d93; font-size: 9px !important; line-height: 1.2; letter-spacing: 0 !important; }
#orders .order-card-collapsible.in_progress .order-summary-side > small { color: #0878ef; }
#orders .order-card-collapsible.completed .order-summary-side > small { color: #079676; }
#orders .order-card-collapsible.failed .order-summary-side > small { color: #b56a08; }
#orders .order-summary-chevron {
  color: #7b90a4;
  font-size: 20px;
  transition: transform .16s ease;
}
#orders .order-card-collapsible[open] .order-summary-chevron { transform: rotate(90deg); }
#orders .order-card-collapsible[open] > .order-card-summary {
  background: #f8fbfe;
  border-bottom: 1px solid #e5edf4;
}
#orders .order-card-expanded {
  display: grid;
  gap: 10px;
  padding: 11px 12px 12px;
}
#orders .order-card-expanded .order-card-customer { padding: 7px; background: #f7faff; }
#orders .order-card-expanded .order-card-products span { padding: 5px 8px; }
#orders .order-card-expanded .order-card-meta > span { padding: 8px; }
#orders .order-card-expanded .order-card-actions .mini-btn { min-height: 38px !important; font-size: 12px; }
#orders .order-card-expanded .order-more-actions summary { min-height: 36px; font-size: 11px; }
#orders .order-card-expanded .order-more-actions .mini-btn { min-height: 38px; font-size: 12px; }

@media (max-width: 700px) {
  #orders .aquaflow-order-list { gap: 7px; }
  #orders .order-card-summary {
    grid-template-columns: 32px minmax(0,1fr) auto 14px;
    min-height: 56px;
    gap: 7px;
    padding: 6px 8px 6px 9px;
  }
  #orders .order-card-summary .order-customer-avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
  #orders .order-summary-main > strong { font-size: 13px; }
  #orders .order-summary-main > small { max-width: 47vw; font-size: 9px !important; }
  #orders .order-summary-side > strong { font-size: 12px; }
  #orders .order-summary-side > small { font-size: 8px !important; }
  #orders .order-card-expanded { gap: 8px; padding: 9px 10px 10px; }
}

/* AquaFlow 4.15.6 compact order workspace v3 — show the list sooner on phones. */
@media (max-width: 700px) {
  #orders.view { margin-top: 7px; }
  #orders .aquaflow-page-head {
    min-height: 42px;
    margin-bottom: 7px;
    gap: 8px;
  }
  #orders .aquaflow-page-head small { display: none; }
  #orders .aquaflow-page-head h2 {
    margin: 0;
    font-size: 18px !important;
    line-height: 1.1;
  }
  #orders .aquaflow-page-head .btn {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
  }

  #orders .aquaflow-order-hero {
    display: flex;
    align-items: center;
    min-height: 54px !important;
    margin: 0 0 7px;
    padding: 8px 12px !important;
    border-radius: 13px !important;
  }
  #orders .aquaflow-order-hero > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    width: 100%;
    gap: 2px 8px;
  }
  #orders .aquaflow-order-hero small { display: none; }
  #orders .aquaflow-order-hero strong {
    min-width: 0;
    font-size: 16px !important;
    line-height: 1.15;
    white-space: nowrap;
  }
  #orders .aquaflow-order-hero span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
    line-height: 1.2;
  }

  #orders .order-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: 0 0 7px;
  }
  #orders .order-kpi-grid article {
    display: grid;
    align-content: center;
    min-height: 52px;
    padding: 6px 4px !important;
    border-top-width: 2px;
    border-radius: 10px !important;
    text-align: center;
  }
  #orders .order-kpi-grid small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 8px !important;
    line-height: 1.1;
  }
  #orders .order-kpi-grid strong,
  #orders .order-kpi-grid article:last-child strong {
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px !important;
    line-height: 1.1;
    letter-spacing: -.25px;
  }
  #orders .order-kpi-grid article:last-child strong { font-size: 11px !important; }

  #orders .order-filter-panel {
    gap: 6px;
    margin-bottom: 8px;
    padding: 7px;
    border-radius: 12px;
  }
  #orders .order-filter-tools {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.45fr);
    gap: 6px;
  }
  #orders .order-filter-tools label {
    gap: 0;
    min-width: 0;
    overflow: hidden;
    font-size: 0;
  }
  #orders .order-filter-tools input {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 12px !important;
    font-weight: 650;
  }
  #orders .order-filter-tools input[type="date"] {
    padding-left: 7px;
    padding-right: 5px;
    font-size: 11px !important;
  }
  #orders .order-filter-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 1px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #orders .order-filter-tabs::-webkit-scrollbar { display: none; }
  #orders .order-filter-tabs button {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 10px !important;
  }

  #orders .aquaflow-order-list { gap: 6px; }
  #orders .order-card-summary {
    grid-template-columns: 30px minmax(0, 1fr) auto 12px;
    min-height: 50px;
    gap: 6px;
    padding: 5px 7px 5px 8px;
  }
  #orders .order-card-summary .order-customer-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 11px;
  }
  #orders .order-summary-main > strong { font-size: 12px; }
  #orders .order-summary-main > small {
    max-width: 46vw;
    font-size: 8.5px !important;
  }
  #orders .order-summary-side > strong { font-size: 11px; }
  #orders .order-summary-side > small { font-size: 7.5px !important; }
  #orders .order-summary-chevron { font-size: 17px; }
}

@media (max-width: 370px) {
  #orders .aquaflow-order-hero span { display: none; }
  #orders .aquaflow-order-hero > div { grid-template-columns: 1fr; }
  #orders .order-kpi-grid small { font-size: 7px !important; }
  #orders .order-kpi-grid strong,
  #orders .order-kpi-grid article:last-child strong { font-size: 10px !important; }
  #orders .order-filter-tools { grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); }
}

/* AquaFlow v4.15.6 readable-ui-v5 — Orders: larger, clearer mobile layout. */
@media (max-width: 700px) {
  #orders .aquaflow-page-head {
    min-height: 48px !important;
    margin-bottom: 9px !important;
  }
  #orders .aquaflow-page-head h2 { font-size: 22px !important; }
  #orders .aquaflow-page-head .btn {
    min-height: 42px !important;
    padding: 0 13px !important;
    font-size: 13px !important;
  }
  #orders .aquaflow-order-hero {
    min-height: 64px !important;
    margin-bottom: 9px !important;
    padding: 10px 13px !important;
    border-radius: 14px !important;
  }
  #orders .aquaflow-order-hero strong { font-size: 18px !important; }
  #orders .aquaflow-order-hero span { font-size: 11px !important; }

  #orders .order-kpi-grid { gap: 6px !important; margin-bottom: 9px !important; }
  #orders .order-kpi-grid article {
    min-height: 64px !important;
    padding: 8px 5px !important;
    border-radius: 11px !important;
  }
  #orders .order-kpi-grid small { font-size: 9.5px !important; line-height: 1.15 !important; }
  #orders .order-kpi-grid strong,
  #orders .order-kpi-grid article:last-child strong {
    margin-top: 5px !important;
    font-size: 16px !important;
    line-height: 1.15 !important;
  }
  #orders .order-kpi-grid article:last-child strong { font-size: 14px !important; }

  #orders .order-filter-panel { gap: 8px !important; margin-bottom: 10px !important; padding: 8px !important; }
  #orders .order-filter-tools { grid-template-columns: minmax(0,.95fr) minmax(0,1.35fr) !important; gap: 7px !important; }
  #orders .order-filter-tools input,
  #orders .order-filter-tools input[type="date"] {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 10px !important;
    font-size: 16px !important;
    font-weight: 650 !important;
  }
  #orders .order-filter-tabs { gap: 6px !important; }
  #orders .order-filter-tabs button {
    min-height: 40px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    border-radius: 9px !important;
  }

  #orders .aquaflow-order-list { gap: 9px !important; }
  #orders .order-card-summary {
    grid-template-columns: 40px minmax(0,1fr) auto 16px !important;
    min-height: 72px !important;
    gap: 9px !important;
    padding: 9px 10px !important;
  }
  #orders .order-card-summary .order-customer-avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
  }
  #orders .order-summary-main { gap: 4px !important; }
  #orders .order-summary-main > strong { font-size: 16px !important; line-height: 1.2 !important; }
  #orders .order-summary-main > small { max-width: 44vw !important; font-size: 12px !important; line-height: 1.25 !important; }
  #orders .order-summary-side { gap: 3px !important; }
  #orders .order-summary-side > strong { font-size: 15px !important; line-height: 1.2 !important; }
  #orders .order-summary-side > small { font-size: 11px !important; line-height: 1.2 !important; }
  #orders .order-summary-chevron { font-size: 21px !important; }

  #orders .order-card-expanded { gap: 10px !important; padding: 11px 12px 12px !important; }
  #orders .order-card-expanded .order-card-customer { padding: 10px !important; }
  #orders .order-card-expanded .order-customer-copy strong { font-size: 17px !important; }
  #orders .order-card-expanded .order-customer-copy small { font-size: 13px !important; }
  #orders .order-card-expanded .order-card-products span { font-size: 13px !important; padding: 7px 9px !important; }
  #orders .order-card-expanded .order-card-products b { font-size: 14px !important; }
  #orders .order-card-expanded .order-card-meta small { font-size: 10px !important; }
  #orders .order-card-expanded .order-card-meta strong { font-size: 14px !important; }
  #orders .order-card-expanded .order-card-meta > span:first-child strong { font-size: 18px !important; }
  #orders .order-card-expanded .order-card-actions .mini-btn,
  #orders .order-card-expanded .order-more-actions .mini-btn { min-height: 44px !important; font-size: 13px !important; }
}

@media (max-width: 370px) {
  #orders .order-kpi-grid small { font-size: 8.5px !important; }
  #orders .order-kpi-grid strong,
  #orders .order-kpi-grid article:last-child strong { font-size: 13px !important; }
  #orders .order-filter-tools { grid-template-columns: minmax(0,.9fr) minmax(0,1.25fr) !important; }
  #orders .order-summary-main > small { max-width: 40vw !important; }
}


/* V34.1.5 — Enterprise Order ↔ Delivery linkage */
.order-delivery-bridge{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr);align-items:center;gap:6px;margin:0 0 12px;padding:10px;border:1px solid #d9e6f2;border-radius:14px;background:#fff}
.order-delivery-bridge>i{text-align:center;color:#8ba2b8;font-style:normal;font-weight:900}
.bridge-node{min-width:0;display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;align-items:center;padding:8px;border-radius:11px;background:#f5f8fb;color:#49657d}
.bridge-node>b{grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e4edf6;color:#58738a;font-size:11px}
.bridge-node>strong{font-size:12px;line-height:1.2}.bridge-node>small{font-size:9px;color:#71869a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bridge-node.active{background:#eaf4ff;color:#086bdc}.bridge-node.active>b{background:#0a78ec;color:#fff}.bridge-node.active>small{color:#3f77a8}
.delivery-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.delivery-head-actions .btn{min-height:44px}
.order-linkage-row,.delivery-linkage-banner{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.order-linkage-row{padding:8px 0 0;border-top:1px solid #e8eef5}
.order-source-badge{display:inline-flex;align-items:center;min-height:27px;padding:4px 9px;border-radius:999px;font-size:10px;font-weight:800;background:#eef4fa;color:#49657d}.order-source-badge.quick{background:#fff4dd;color:#9a650d}.order-source-badge.planned{background:#eaf4ff;color:#086bdc}
.order-linkage-row button,.delivery-linkage-banner button{border:0;background:transparent;color:#0878ef;font-weight:800;font-size:11px;cursor:pointer;padding:6px}
.delivery-linkage-banner{margin-bottom:10px;padding:10px 12px;border-radius:12px;background:#eef7ff;border:1px solid #cfe4fa}.delivery-linkage-banner.legacy{background:#f7f8fa;border-color:#e4e8ed}.delivery-linkage-banner span{display:grid;gap:2px;min-width:0}.delivery-linkage-banner small{font-size:9px;color:#6a8298}.delivery-linkage-banner strong{font-size:12px;color:#1e496c;overflow-wrap:anywhere}
.order-lifecycle{display:grid;grid-template-columns:auto 1fr auto 1fr auto 1fr auto;align-items:center;gap:5px;margin:12px 0;padding:12px;border:1px solid #dce8f3;border-radius:14px;background:#f8fbfe}.order-lifecycle>span{display:grid;justify-items:center;gap:4px;min-width:48px;color:#8a9bad}.order-lifecycle>span>b{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#e7edf3;color:#73879a;font-size:11px}.order-lifecycle>span>small{font-size:9px;font-weight:800;white-space:nowrap}.order-lifecycle>i{height:2px;background:#dce6ef}.order-lifecycle>span.done{color:#0878ef}.order-lifecycle>span.done>b{background:#0878ef;color:#fff}.order-lifecycle>span.current{color:#b9780c}.order-lifecycle>span.current>b{background:#f4a928;color:#fff}.order-lifecycle>span.retry{color:#a26411}.order-lifecycle>span.retry>b{background:#f1b44b;color:#fff}.order-source-note{margin:0 0 12px;padding:9px 11px;border-radius:11px;background:#f3f7fb;color:#5a7186;font-size:11px}.order-source-note b{color:#264d70}
#delivery-order-context:not(.is-hidden){display:grid!important;gap:3px;padding:11px 13px;margin:0 0 10px;border:1px solid #cfe3f6;border-radius:13px;background:#eff7ff}#delivery-order-context>span{font-size:9px;font-weight:900;letter-spacing:.06em;color:#0878ef}#delivery-order-context>strong{font-size:13px;color:#174b72}#delivery-order-context>small{font-size:10px;color:#627d94}
@media(max-width:700px){.order-delivery-bridge{grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr) 14px minmax(0,1fr);gap:3px;padding:7px}.bridge-node{grid-template-columns:24px minmax(0,1fr);column-gap:5px;padding:7px 5px}.bridge-node>b{width:24px;height:24px;border-radius:7px;font-size:9px}.bridge-node>strong{font-size:10px}.bridge-node>small{font-size:8px}.delivery-page-head{align-items:flex-start!important}.delivery-head-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.delivery-head-actions .btn{width:100%;padding:0 8px!important;font-size:12px!important}.order-lifecycle{padding:9px 6px;gap:2px}.order-lifecycle>span{min-width:42px}.order-lifecycle>span>small{font-size:8px}.order-linkage-row{align-items:flex-start;flex-direction:column}.delivery-linkage-banner{align-items:flex-start}}

/* V34.1.6 — Order Delivery Control Tower */
#orders .order-control-tower{display:grid;grid-template-columns:minmax(180px,1.4fr) repeat(4,minmax(92px,.7fr));align-items:stretch;gap:7px;margin:0 0 10px;padding:8px;border:1px solid #dbe6f0;border-radius:13px;background:#f9fbfd}
#orders .order-control-tower.is-hidden{display:none!important}
#orders .order-control-tower>div,#orders .order-control-tower>span{display:grid;align-content:center;gap:2px;min-width:0;padding:8px 10px;border-radius:10px;background:#fff;border:1px solid #e4ebf2}
#orders .order-control-tower>div small{font-size:8px!important;letter-spacing:.08em;color:#0878ef;font-weight:900}
#orders .order-control-tower>div strong{font-size:12px;color:#1d425f}
#orders .order-control-tower>span{grid-template-columns:auto 1fr;grid-template-rows:auto;column-gap:7px;align-items:center}
#orders .order-control-tower>span b{grid-row:1/2;font-size:18px;line-height:1;color:#173d5d}
#orders .order-control-tower>span small{font-size:9px!important;letter-spacing:0!important;color:#61788d}
#orders .order-control-tower>span.unassigned{border-left:3px solid #748aa0}
#orders .order-control-tower>span.overdue{border-left:3px solid #d84a4a;background:#fff8f8}
#orders .order-control-tower>span.due{border-left:3px solid #e7a124;background:#fffaf0}
#orders .order-control-tower>span.retry{border-left:3px solid #a46b16;background:#fff9ee}
.order-linkage-badges{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.order-sla-badge{display:inline-flex;align-items:center;min-height:27px;padding:4px 8px;border-radius:999px;font-size:9px;font-weight:850;background:#f2f5f8;color:#607588;border:1px solid #e1e7ed}
.order-sla-badge.overdue{background:#fff0f0;color:#b93434;border-color:#f4c7c7}.order-sla-badge.due{background:#fff5df;color:#9a650d;border-color:#f1d49a}.order-sla-badge.unassigned{background:#f1f4f7;color:#566c80}.order-sla-badge.progress{background:#eaf4ff;color:#0878ef;border-color:#cce2f9}.order-sla-badge.future,.order-sla-badge.scheduled{background:#eef8f4;color:#14765f;border-color:#cfe9df}.order-sla-badge.done{background:#eef8f4;color:#14765f;border-color:#cfe9df}
.order-enterprise-control{display:flex;align-items:stretch;gap:8px;flex-wrap:wrap;margin:0 0 12px;padding:9px;border:1px solid #dae6f1;border-radius:12px;background:#f8fbfd}
.order-enterprise-control>span{display:grid;gap:2px;min-width:100px;padding:7px 9px;border-radius:9px;background:#fff}.order-enterprise-control small{font-size:8px!important;letter-spacing:.06em;color:#6a8195}.order-enterprise-control strong{font-size:11px;color:#244d6c}.order-enterprise-control.overdue{border-color:#efcaca;background:#fff8f8}.order-enterprise-control.due{border-color:#ead4a7;background:#fffaf1}
.order-reconcile.exact{border-color:#cfe8df!important;background:#fbfefd}.order-reconcile.variance{border-color:#edd4a5!important;background:#fffdf8}
.order-reconcile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.order-reconcile-grid>span{display:grid;gap:3px;padding:9px;border:1px solid #e1e9f0;border-radius:10px;background:#fff}.order-reconcile-grid small{font-size:9px!important;letter-spacing:0!important;color:#647b90}.order-reconcile-grid strong{font-size:13px;color:#1b405f}.order-reconcile-grid b{font-size:10px}.order-reconcile-grid b.same{color:#148267}.order-reconcile-grid b.up{color:#a56b0b}.order-reconcile-grid b.down{color:#bd3e3e}
.order-event-timeline{display:grid;gap:0}.order-event-timeline article{display:grid;grid-template-columns:18px minmax(0,1fr);gap:8px;position:relative;padding:6px 0}.order-event-timeline article:not(:last-child):before{content:"";position:absolute;left:8px;top:20px;bottom:-6px;width:2px;background:#dce7f0}.order-event-timeline article>i{width:10px;height:10px;margin:5px 0 0 3px;border-radius:50%;background:#1682ef;box-shadow:0 0 0 3px #e6f2ff;z-index:1}.order-event-timeline article>div{display:grid;gap:2px}.order-event-timeline article strong{font-size:11px;color:#1f4968}.order-event-timeline article span{font-size:9px;color:#71879a}.order-event-timeline article small{font-size:10px!important;letter-spacing:0!important;color:#4f677b}
.aquaflow-order-reschedule-dialog{width:min(94vw,520px);max-width:520px;border:0;border-radius:18px;padding:0;overflow:hidden}.aquaflow-order-reschedule-dialog form{display:grid;gap:14px;padding:18px}.aquaflow-order-reschedule-dialog textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:84px;padding:11px;border:1px solid #cbdbea;border-radius:11px;font:inherit;color:#15324e;background:#fff}.order-reschedule-note{display:grid;gap:3px;padding:10px 12px;border-radius:11px;background:#eef7ff;border:1px solid #cfe3f6}.order-reschedule-note strong{font-size:11px;color:#145781}.order-reschedule-note span{font-size:10px;color:#5d7890}
@media(max-width:700px){#orders .order-control-tower{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:6px}#orders .order-control-tower>div{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:5px 7px}#orders .order-control-tower>div strong{font-size:10px}#orders .order-control-tower>span{display:grid;grid-template-columns:1fr;justify-items:center;text-align:center;padding:6px 3px;gap:2px}#orders .order-control-tower>span b{font-size:15px}#orders .order-control-tower>span small{font-size:7.5px!important}.order-reconcile-grid{grid-template-columns:1fr}.order-linkage-badges{width:100%}.aquaflow-order-reschedule-dialog{width:calc(100vw - 18px);max-height:calc(100vh - 22px)}.aquaflow-order-reschedule-dialog form{padding:14px;gap:11px}}

/* AquaFlow V34.1.7 — ORDER FILTER STATE HARD FIX
   Four mutually-exclusive status buttons. No horizontal touch-scroll layer on
   phones, so Đang giao / Đã giao cannot share or retain the previous hit area. */
#orders #order-filter-tabs[data-active-filter] button.active,
#orders #order-filter-tabs[data-active-filter] button[aria-selected="true"] {
  background:#e7f1ff!important;
  color:#086bdc!important;
  border-color:#afd1ff!important;
  box-shadow:inset 0 0 0 1px rgba(8,107,220,.04)!important;
}
#orders #order-filter-tabs[data-active-filter] button:not([aria-selected="true"]) {
  background:#f2f6fa!important;
  color:#4f667b!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
@media (max-width:700px) {
  #orders #order-filter-tabs {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:5px!important;
    overflow:visible!important;
    padding:0!important;
    touch-action:manipulation;
  }
  #orders #order-filter-tabs button {
    width:100%!important;
    min-width:0!important;
    min-height:40px!important;
    padding:0 3px!important;
    font-size:11px!important;
    line-height:1.1!important;
    touch-action:manipulation;
  }
}
\n\n/* AquaFlow V34.1.8 — ORDER FILTER HARD LOCK\n   Visual selection is derived from the tablist state itself, not from a\n   potentially stale :active/class state retained by iOS WebKit. */\n#orders #order-filter-tabs[data-active-filter] button {\n  -webkit-appearance:none!important;\n  appearance:none!important;\n  -webkit-tap-highlight-color:transparent!important;\n  user-select:none;\n}\n#orders #order-filter-tabs[data-active-filter="active"] button[data-order-filter="active"],\n#orders #order-filter-tabs[data-active-filter="in_progress"] button[data-order-filter="in_progress"],\n#orders #order-filter-tabs[data-active-filter="completed"] button[data-order-filter="completed"],\n#orders #order-filter-tabs[data-active-filter="failed"] button[data-order-filter="failed"] {\n  background:#e7f1ff!important;\n  color:#086bdc!important;\n  border-color:#afd1ff!important;\n  box-shadow:inset 0 0 0 1px rgba(8,107,220,.04)!important;\n}\n#orders #order-filter-tabs[data-active-filter="active"] button:not([data-order-filter="active"]),\n#orders #order-filter-tabs[data-active-filter="in_progress"] button:not([data-order-filter="in_progress"]),\n#orders #order-filter-tabs[data-active-filter="completed"] button:not([data-order-filter="completed"]),\n#orders #order-filter-tabs[data-active-filter="failed"] button:not([data-order-filter="failed"]) {\n  background:#f2f6fa!important;\n  color:#4f667b!important;\n  border-color:transparent!important;\n  box-shadow:none!important;\n}\n#orders #order-filter-tabs button:active { transform:none!important; }\n
/* AquaFlow V34.1.9 — ORDER CARD ENTERPRISE REDESIGN
   Compact, information-complete order card based on the approved enterprise mockup. */
#orders .order-card-enterprise-v2{
  gap:9px!important;
  padding:10px 11px 11px!important;
  background:linear-gradient(180deg,#fff 0%,#fff 78%,#fbfdff 100%);
}
#orders .enterprise-order-head{
  min-height:34px;
  align-items:center!important;
  padding:0 1px 1px;
}
#orders .enterprise-order-head .order-card-time{
  grid-template-columns:auto auto;
  align-items:baseline;
  column-gap:8px;
}
#orders .enterprise-order-head .order-card-time span{
  color:#49657f;
  font-size:10px!important;
  font-weight:900;
  letter-spacing:.035em;
}
#orders .enterprise-order-head .order-card-time strong{
  color:#294d6b;
  font-size:12px!important;
  font-weight:800;
}
#orders .enterprise-order-head .order-card-badges{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
  flex-wrap:wrap;
}
#orders .enterprise-order-head .status{
  min-height:26px;
  display:inline-flex;
  align-items:center;
  padding:4px 9px!important;
  border-radius:999px!important;
  font-size:9px!important;
  font-weight:900!important;
}
#orders .order-card-lifecycle{
  display:grid;
  grid-template-columns:auto minmax(12px,1fr) auto minmax(12px,1fr) auto minmax(12px,1fr) auto;
  align-items:start;
  gap:4px;
  padding:6px 4px 4px;
}
#orders .order-card-lifecycle>span{
  display:grid;
  justify-items:center;
  gap:4px;
  min-width:47px;
  color:#91a1b1;
  text-align:center;
}
#orders .order-card-lifecycle>span i{
  display:grid;
  width:27px;
  height:27px;
  place-items:center;
  border:1px solid #dbe5ef;
  border-radius:50%;
  background:#f2f6fa;
  color:#71869a;
  font-style:normal;
  font-size:10px;
  font-weight:900;
}
#orders .order-card-lifecycle>span small{
  font-size:8px!important;
  line-height:1.15;
  letter-spacing:0!important;
  font-weight:800;
  white-space:nowrap;
}
#orders .order-card-lifecycle>b{
  height:2px;
  margin-top:13px;
  border-radius:999px;
  background:#dce7f0;
}
#orders .order-card-lifecycle>span.done,
#orders .order-card-lifecycle>span.current{color:#0878ef}
#orders .order-card-lifecycle>span.done i{
  border-color:#b9d9fa;
  background:#e8f3ff;
  color:#0878ef;
}
#orders .order-card-lifecycle>span.current i{
  border-color:#0878ef;
  background:#0878ef;
  color:#fff;
  box-shadow:0 0 0 4px rgba(8,120,239,.08);
}
#orders .order-card-lifecycle>span.retry{color:#a36812}
#orders .order-card-lifecycle>span.retry i{
  border-color:#efcb8e;
  background:#fff5e2;
  color:#a36812;
}
#orders .order-card-lifecycle>span.done + b,
#orders .order-card-lifecycle>span.current + b{background:#8fc5fb}
#orders .enterprise-order-customer{
  min-height:58px;
  grid-template-columns:44px minmax(0,1fr) 24px!important;
  gap:10px!important;
  padding:9px 10px!important;
  border:1px solid #e3edf6!important;
  border-radius:12px!important;
  background:linear-gradient(110deg,#f4f9ff,#f8fbfe)!important;
}
#orders .enterprise-order-customer .order-customer-avatar{
  width:42px!important;
  height:42px!important;
  border-radius:12px!important;
  background:#e5f2ff;
  font-size:15px!important;
}
#orders .enterprise-order-customer .order-customer-copy strong{
  font-size:16px!important;
  color:#163a58;
}
#orders .enterprise-order-customer .order-customer-copy small{
  margin-top:2px;
  color:#6d8398!important;
  font-size:11px!important;
}
#orders .order-card-overview-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:32px;
  padding:0 2px;
}
#orders .order-card-overview-line .order-card-product-line{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#58728a;
  font-size:11px;
  font-weight:750;
}
#orders .order-card-overview-line>strong{
  flex:0 0 auto;
  color:#0878ef;
  font-size:20px;
  line-height:1;
  letter-spacing:-.45px;
}
#orders .enterprise-order-linkage{
  min-height:32px;
  padding:7px 0!important;
  border-top:1px solid #e8eff5!important;
  border-bottom:1px solid #edf2f6;
}
#orders .enterprise-order-linkage .order-source-badge,
#orders .enterprise-order-linkage .order-sla-badge{
  min-height:26px;
  padding:4px 8px;
  border-radius:999px;
  font-size:8.5px;
  font-weight:900;
}
#orders .enterprise-order-products{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:0!important;
}
#orders .enterprise-order-products span{
  min-height:30px;
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:5px 9px!important;
  border:1px solid #e1ecf6!important;
  border-radius:9px!important;
  background:#f3f8ff!important;
  color:#365b78;
  font-size:10px!important;
  font-weight:750;
}
#orders .enterprise-order-products b{font-size:13px!important;color:#173e5f}
#orders .enterprise-order-meta{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
  margin:0!important;
}
#orders .enterprise-order-meta>span{
  min-width:0;
  min-height:50px;
  display:grid!important;
  align-content:center;
  gap:3px!important;
  padding:7px 9px!important;
  border:1px solid #e6edf4;
  border-radius:10px!important;
  background:#f7fafc!important;
}
#orders .enterprise-order-meta small{
  color:#72879a!important;
  font-size:8px!important;
  font-weight:850!important;
  letter-spacing:.035em!important;
}
#orders .enterprise-order-meta strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap!important;
  color:#173b59;
  font-size:12px!important;
}
#orders .enterprise-order-meta>span:nth-child(3) strong{
  color:#0878ef;
  font-size:15px!important;
}
#orders .enterprise-order-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:7px!important;
  padding-top:2px;
}
#orders .enterprise-order-actions .mini-btn{
  min-height:42px!important;
  width:100%!important;
  border-radius:11px!important;
  font-size:12px!important;
  font-weight:900!important;
}
#orders .enterprise-order-actions .mini-btn.detail{
  grid-column:auto!important;
  border-color:#cfe0ef!important;
  background:#fff!important;
  color:#315b7d!important;
}
#orders .enterprise-order-actions .mini-btn.detail:before{content:"▤";margin-right:6px;color:#0878ef}
#orders .enterprise-order-actions .mini-btn.primary:before{content:"▣";margin-right:6px}
#orders .enterprise-order-actions [data-order-complete-existing]{
  border-color:#bce5d2!important;
  background:#eefaf4!important;
  color:#087a58!important;
}
#orders .enterprise-order-quick{
  margin-top:0!important;
  padding-top:0!important;
  border-top:1px solid #e8eef5!important;
}
#orders .enterprise-order-quick>summary{
  min-height:36px!important;
  justify-content:flex-start!important;
  padding:0 2px;
  color:#325b7a!important;
  font-size:10px!important;
  font-weight:900!important;
}
#orders .enterprise-order-quick>summary:before{content:"⚡";margin-right:6px;color:#0878ef}
#orders .enterprise-order-quick>summary:after{content:""!important}
#orders .enterprise-order-quick>div{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
  margin-top:2px!important;
}
#orders .enterprise-order-quick .mini-btn{
  min-height:39px!important;
  border-radius:10px!important;
  font-size:11px!important;
  font-weight:850!important;
}
#orders .enterprise-order-quick [data-order-start]{border-color:#c8dffd;background:#edf6ff;color:#0878ef}
#orders .enterprise-order-quick [data-order-start]:before{content:"▶";margin-right:5px}
#orders .enterprise-order-quick [data-order-complete-existing]{border-color:#bde7d4;background:#effbf5;color:#087a58}
#orders .enterprise-order-quick [data-order-complete-existing]:before{content:"✓";margin-right:5px}
#orders .enterprise-order-quick [data-order-fail]:before{content:"↻";margin-right:5px}
#orders .enterprise-order-quick [data-order-edit]:before{content:"✎";margin-right:5px}
#orders .enterprise-order-quick [data-order-cancel]{grid-column:1/-1;border-color:#f1c8cc;background:#fff5f6;color:#c9343f}
#orders .enterprise-order-quick [data-order-cancel]:before{content:"×";margin-right:5px;font-size:15px}
#orders .order-card-enterprise-v2 .order-card-note{
  margin:0;
  border-left-color:#c6dcf0;
  border-radius:0 8px 8px 0;
  background:#f9fbfd;
  padding:7px 9px;
  font-size:10px;
}
@media(max-width:700px){
  #orders .order-card-enterprise-v2{gap:8px!important;padding:9px 10px 10px!important}
  #orders .enterprise-order-head{min-height:31px}
  #orders .enterprise-order-head .order-card-time{column-gap:6px}
  #orders .enterprise-order-head .order-card-time span{font-size:9px!important}
  #orders .enterprise-order-head .order-card-time strong{font-size:11px!important}
  #orders .order-card-lifecycle{gap:2px;padding:4px 0 2px}
  #orders .order-card-lifecycle>span{min-width:41px;gap:3px}
  #orders .order-card-lifecycle>span i{width:25px;height:25px;font-size:9px}
  #orders .order-card-lifecycle>span small{font-size:7.5px!important}
  #orders .order-card-lifecycle>b{margin-top:12px}
  #orders .enterprise-order-customer{min-height:54px;grid-template-columns:40px minmax(0,1fr) 22px!important;padding:7px 8px!important}
  #orders .enterprise-order-customer .order-customer-avatar{width:38px!important;height:38px!important}
  #orders .enterprise-order-customer .order-customer-copy strong{font-size:15px!important}
  #orders .order-card-overview-line>strong{font-size:18px}
  #orders .enterprise-order-meta>span{min-height:46px;padding:6px 8px!important}
  #orders .enterprise-order-actions .mini-btn{min-height:40px!important}
}
@media(max-width:390px){
  #orders .order-card-lifecycle>span small{font-size:7px!important}
  #orders .order-card-lifecycle>span{min-width:37px}
  #orders .enterprise-order-meta strong{font-size:11px!important}
  #orders .enterprise-order-actions .mini-btn{font-size:11px!important}
}

/* AquaFlow V34.2.0 — COMPACT ENTERPRISE ORDER LIST
   Staff workspace goes directly from status/search to information-complete
   order rows. Admin keeps Control Tower and management KPIs. */
#orders .order-filter-tabs button{position:relative;display:flex!important;align-items:center;justify-content:center;gap:6px}
#orders .order-filter-tabs button>b{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#e3ebf3;color:#536b81;font-size:10px;line-height:1;font-weight:900}
#orders #order-filter-tabs[data-active-filter="active"] button[data-order-filter="active"]>b,
#orders #order-filter-tabs[data-active-filter="in_progress"] button[data-order-filter="in_progress"]>b,
#orders #order-filter-tabs[data-active-filter="completed"] button[data-order-filter="completed"]>b,
#orders #order-filter-tabs[data-active-filter="failed"] button[data-order-filter="failed"]>b{background:#0878ef;color:#fff}

#orders .order-card-summary-compact-enterprise{
  grid-template-columns:38px minmax(0,1fr) minmax(84px,auto) 14px!important;
  min-height:94px!important;
  padding:9px 10px 9px 11px!important;
  gap:9px!important;
}
#orders .order-card-summary-compact-enterprise .order-customer-avatar{width:36px!important;height:36px!important;border-radius:10px!important;font-size:15px!important}
#orders .order-card-summary-compact-enterprise .order-summary-main{display:grid;gap:2px;align-content:center}
#orders .order-summary-topline{display:flex;align-items:center;gap:7px;min-width:0}
#orders .order-summary-number{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7b8fa2!important;font-size:9px!important;font-weight:800;letter-spacing:.035em!important}
#orders .order-summary-sla{display:inline-flex;align-items:center;max-width:105px;min-height:21px;padding:2px 6px;border:1px solid #dae5ef;border-radius:999px;background:#f4f7fa;color:#60768b;font-size:8.5px;font-style:normal;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#orders .order-summary-sla.overdue{border-color:#ffcaca;background:#fff1f1;color:#c23c3c}
#orders .order-summary-sla.due{border-color:#f0d39d;background:#fff7e7;color:#9f6810}
#orders .order-summary-sla.scheduled,#orders .order-summary-sla.future,#orders .order-summary-sla.done{border-color:#cee8df;background:#eef9f5;color:#14775f}
#orders .order-card-summary-compact-enterprise .order-summary-main>strong{font-size:15px!important;line-height:1.16!important}
#orders .order-summary-phone{font-size:10px!important;color:#647b90!important}
#orders .order-summary-facts{display:flex;align-items:center;gap:8px;min-width:0;margin-top:3px;color:#4d6a84;font-size:10px;line-height:1.15}
#orders .order-summary-facts>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#orders .order-summary-clock{flex:0 0 auto;padding-left:7px;border-left:1px solid #dde7f0;font-weight:800;color:#526d86}
#orders .order-card-summary-compact-enterprise .order-summary-side{align-self:stretch;display:grid;align-content:center;justify-items:end;gap:3px}
#orders .order-card-summary-compact-enterprise .order-summary-side>strong{font-size:15px!important;color:#0878ef}
#orders .order-card-summary-compact-enterprise .order-summary-side>small{max-width:105px;overflow:hidden;text-overflow:ellipsis;font-size:9px!important;color:#637b91}
#orders .order-summary-status{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border-radius:999px;background:#edf5ff;color:#0878ef;font-size:8.5px;font-style:normal;font-weight:850;white-space:nowrap}
#orders .order-summary-status.completed{background:#eaf9f3;color:#14805f}
#orders .order-summary-status.failed{background:#fff4e7;color:#a56b0b}
#orders .order-summary-status.pending,#orders .order-summary-status.assigned{background:#eef5ff;color:#0871df}

/* Staff: compact operational list. Management overview stays on admin. */
.staff-mode #orders .aquaflow-page-head{margin:0 0 8px!important;min-height:34px}
.staff-mode #orders .aquaflow-page-head>div>small,
.staff-mode #orders .aquaflow-page-head .section-note,
.staff-mode #orders .order-manage-only,
.staff-mode #orders .order-delivery-bridge,
.staff-mode #orders .aquaflow-order-hero,
.staff-mode #orders .order-kpi-grid,
.staff-mode #orders .order-control-tower{display:none!important}
.staff-mode #orders .aquaflow-page-head h2{margin:0!important;font-size:24px!important;letter-spacing:-.02em}
.staff-mode #orders .order-filter-panel{gap:8px!important;margin-bottom:9px!important;padding:8px!important;border-radius:13px!important}
.staff-mode #orders .order-filter-tabs{order:-1!important}
.staff-mode #orders .order-filter-tools{order:0!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important}
.staff-mode #orders .order-filter-tools>label:first-child{display:none!important}
.staff-mode #orders .order-filter-tools label{font-size:0!important;gap:0!important}
.staff-mode #orders .order-filter-tools input{height:42px!important;border-radius:10px!important;padding:0 12px 0 12px!important;font-size:14px!important;background:#fbfdff}
.staff-mode #orders .aquaflow-order-list{gap:7px!important}
.staff-mode #orders .order-card-collapsible{border-radius:12px!important;box-shadow:0 2px 8px rgba(24,61,101,.045)!important}

@media(max-width:700px){
  #orders #order-filter-tabs button{gap:3px!important;min-height:38px!important;font-size:10.5px!important;padding:0 2px!important}
  #orders #order-filter-tabs button>b{min-width:17px;height:17px;padding:0 4px;font-size:8.5px}
  #orders .order-card-summary-compact-enterprise{grid-template-columns:34px minmax(0,1fr) minmax(76px,auto) 12px!important;min-height:88px!important;padding:8px 8px 8px 9px!important;gap:7px!important}
  #orders .order-card-summary-compact-enterprise .order-customer-avatar{width:32px!important;height:32px!important;font-size:13px!important}
  #orders .order-card-summary-compact-enterprise .order-summary-main>strong{font-size:14px!important}
  #orders .order-summary-number{font-size:8px!important}
  #orders .order-summary-sla{max-width:82px;min-height:19px;padding:2px 5px;font-size:7.5px}
  #orders .order-summary-phone,#orders .order-summary-facts{font-size:9px!important}
  #orders .order-card-summary-compact-enterprise .order-summary-side>strong{font-size:13px!important}
  #orders .order-card-summary-compact-enterprise .order-summary-side>small{max-width:82px;font-size:8px!important}
  #orders .order-summary-status{min-height:20px;padding:2px 6px;font-size:7.5px}
  .staff-mode #orders{padding-top:2px!important}
  .staff-mode #orders .aquaflow-page-head{margin-bottom:6px!important}
  .staff-mode #orders .order-filter-panel{padding:6px!important;gap:6px!important}
}


/* AquaFlow V34.2.1 — ADMIN COMPACT ENTERPRISE ORDER WORKSPACE (retained) */
/* AquaFlow V34.2.2 — ORDER TAKEOVER EXECUTION */
@media (max-width:700px){
  .admin-mode #orders.view{margin-top:4px!important;padding-top:0!important}
  .admin-mode #orders .aquaflow-page-head{min-height:44px!important;margin:0 0 7px!important;gap:8px!important;align-items:center!important}
  .admin-mode #orders .aquaflow-page-head h2{font-size:24px!important;line-height:1.05!important;letter-spacing:-.035em!important;margin:0!important}
  .admin-mode #orders .aquaflow-page-head>div>small,
  .admin-mode #orders .aquaflow-page-head .section-note{display:none!important}
  .admin-mode #orders .aquaflow-page-head .btn{min-height:40px!important;height:40px!important;padding:0 13px!important;border-radius:11px!important;font-size:12px!important;box-shadow:none!important}

  .admin-mode #orders .order-delivery-bridge{grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr) 12px minmax(0,1fr)!important;gap:2px!important;margin:0 0 7px!important;padding:5px!important;border-radius:12px!important;box-shadow:none!important}
  .admin-mode #orders .bridge-node{grid-template-columns:25px minmax(0,1fr)!important;column-gap:5px!important;padding:5px!important;border-radius:9px!important;min-height:43px!important}
  .admin-mode #orders .bridge-node>b{width:25px!important;height:25px!important;border-radius:7px!important;font-size:9px!important}
  .admin-mode #orders .bridge-node>strong{font-size:10px!important;line-height:1.05!important}
  .admin-mode #orders .bridge-node>small{font-size:7.5px!important;line-height:1.05!important}
  .admin-mode #orders .order-delivery-bridge>i{font-size:13px!important}

  .admin-mode #orders .aquaflow-order-hero{min-height:52px!important;margin:0 0 7px!important;padding:7px 10px!important;border-radius:12px!important;box-shadow:none!important}
  .admin-mode #orders .aquaflow-order-hero>div{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:2px 7px!important;align-items:baseline!important;min-width:0!important}
  .admin-mode #orders .aquaflow-order-hero small{display:none!important}
  .admin-mode #orders .aquaflow-order-hero strong{font-size:16px!important;line-height:1.08!important;white-space:nowrap!important}
  .admin-mode #orders .aquaflow-order-hero span{font-size:9px!important;line-height:1.08!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .admin-mode #orders .aquaflow-order-hero .btn{display:none!important}

  .admin-mode #orders .order-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;margin:0 0 7px!important}
  .admin-mode #orders .order-kpi-grid article{min-height:54px!important;padding:6px 3px!important;border-radius:10px!important;border-top-width:2px!important;text-align:center!important;align-content:center!important;box-shadow:none!important}
  .admin-mode #orders .order-kpi-grid small{font-size:7.5px!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .admin-mode #orders .order-kpi-grid strong,
  .admin-mode #orders .order-kpi-grid article:last-child strong{font-size:14px!important;line-height:1!important;margin-top:4px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .admin-mode #orders .order-kpi-grid article:last-child strong{font-size:11.5px!important}

  .admin-mode #orders .order-control-tower{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;margin:0 0 7px!important;padding:5px!important;border-radius:11px!important;background:#fbfdff!important}
  .admin-mode #orders .order-control-tower>div{grid-column:1/-1!important;display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:24px!important;padding:2px 5px!important;border:0!important;background:transparent!important}
  .admin-mode #orders .order-control-tower>div small{font-size:7px!important;letter-spacing:.08em!important}
  .admin-mode #orders .order-control-tower>div strong{font-size:9px!important}
  .admin-mode #orders .order-control-tower>span{min-height:42px!important;padding:4px 2px!important;border-radius:8px!important;display:grid!important;grid-template-columns:1fr!important;justify-items:center!important;align-content:center!important;text-align:center!important;gap:1px!important}
  .admin-mode #orders .order-control-tower>span b{font-size:14px!important;line-height:1!important}
  .admin-mode #orders .order-control-tower>span small{font-size:6.8px!important;line-height:1!important;white-space:nowrap!important}

  .admin-mode #orders .order-filter-panel{gap:5px!important;margin:0 0 7px!important;padding:6px!important;border-radius:11px!important;box-shadow:none!important}
  .admin-mode #orders .order-filter-tools{order:-1!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important}
  .admin-mode #orders .order-filter-tools>label:first-child{display:none!important}
  .admin-mode #orders .order-filter-tools label{font-size:0!important;gap:0!important}
  .admin-mode #orders .order-filter-tools input{height:38px!important;min-height:38px!important;padding:0 10px!important;border-radius:9px!important;font-size:13px!important;background:#fbfdff!important}
  .admin-mode #orders .order-filter-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;overflow:visible!important;padding:0!important}
  .admin-mode #orders #order-filter-tabs button{min-width:0!important;min-height:35px!important;height:35px!important;padding:0 3px!important;border-radius:8px!important;font-size:9.5px!important;gap:3px!important}
  .admin-mode #orders #order-filter-tabs button>b{min-width:16px!important;height:16px!important;padding:0 3px!important;font-size:8px!important}

  .admin-mode #orders .aquaflow-order-list{gap:6px!important}
  .admin-mode #orders .order-card-summary-compact-enterprise{grid-template-columns:34px minmax(0,1fr) minmax(74px,auto) 11px!important;min-height:82px!important;padding:7px 7px 7px 8px!important;gap:6px!important;border-radius:11px!important}
  .admin-mode #orders .order-card-summary-compact-enterprise .order-customer-avatar{width:32px!important;height:32px!important;border-radius:9px!important;font-size:13px!important}
  .admin-mode #orders .order-card-summary-compact-enterprise .order-summary-main{gap:1px!important}
  .admin-mode #orders .order-card-summary-compact-enterprise .order-summary-main>strong{font-size:14px!important;line-height:1.12!important}
  .admin-mode #orders .order-summary-topline{gap:4px!important}
  .admin-mode #orders .order-summary-number{font-size:7.5px!important}
  .admin-mode #orders .order-summary-sla{min-height:18px!important;max-width:74px!important;padding:1px 5px!important;font-size:7px!important}
  .admin-mode #orders .order-summary-phone,#orders .order-summary-facts{font-size:8.5px!important;line-height:1.15!important}
  .admin-mode #orders .order-card-summary-compact-enterprise .order-summary-side{gap:2px!important}
  .admin-mode #orders .order-card-summary-compact-enterprise .order-summary-side>strong{font-size:13px!important;line-height:1.08!important}
  .admin-mode #orders .order-card-summary-compact-enterprise .order-summary-side>small{font-size:7.5px!important;max-width:76px!important}
  .admin-mode #orders .order-summary-status{min-height:18px!important;padding:1px 5px!important;font-size:7px!important}
  .admin-mode #orders .order-summary-chevron{font-size:16px!important}
}

@media (max-width:380px){
  .admin-mode #orders .aquaflow-page-head h2{font-size:22px!important}
  .admin-mode #orders .aquaflow-page-head .btn{padding:0 10px!important;font-size:11px!important}
  .admin-mode #orders .bridge-node>small{display:none!important}
  .admin-mode #orders .order-kpi-grid small{font-size:6.8px!important}
  .admin-mode #orders .order-control-tower>span small{font-size:6.1px!important}
  .admin-mode #orders #order-filter-tabs button{font-size:8.7px!important}
}


/* V34.2.2 — planned driver vs actual executor */
#orders .order-summary-handoff{
  display:inline-flex;align-items:center;max-width:112px;min-height:18px;padding:1px 6px;border-radius:999px;
  background:#fff7e8;border:1px solid #f0d7a6;color:#9a650d;font-size:7.5px;font-style:normal;font-weight:850;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#orders .order-meta-handoff{display:block;margin-top:2px;color:#8a6b2e;font-size:8px;font-style:normal;font-weight:750;line-height:1.15}
#orders .order-takeover-note{margin:8px 0 0;padding:8px 10px;border-radius:9px;background:#fff8ea;border:1px solid #f1ddb3;color:#7d5a1b;font-size:10px;font-weight:700;line-height:1.35}
@media(max-width:700px){
  #orders .order-summary-handoff{max-width:82px;min-height:16px;padding:1px 4px;font-size:6.5px}
  #orders .order-takeover-note{padding:6px 8px;font-size:9px}
}

/* AquaFlow V34.2.6 — DRIVER ORDER COMPACT UI
   Staff-only 1:1 compact layout based on the approved driver mockup.
   Admin keeps the V34.2.1 enterprise control-tower workspace. */
.staff-mode #orders .order-filter-tools{display:none!important}
.staff-mode #orders #order-filter-tabs{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  overflow:visible!important;
  padding:0!important;
}
.staff-mode #orders #order-filter-tabs button[data-order-filter="failed"]{display:none!important}
.staff-mode #orders .order-filter-panel{
  padding:0!important;
  margin:0 0 10px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.staff-mode #orders #order-filter-tabs button{
  min-height:56px!important;
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) 22px!important;
  align-items:center!important;
  gap:6px!important;
  padding:7px 9px!important;
  border:1px solid #d9e6f2!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#5c7389!important;
  box-shadow:0 2px 8px rgba(24,61,101,.035)!important;
  text-align:left!important;
}
.staff-mode #orders #order-filter-tabs button::before{
  content:"○";
  display:grid;
  width:28px;
  height:28px;
  place-items:center;
  border-radius:50%;
  background:#edf4fb;
  color:#668199;
  font-size:17px;
  font-weight:900;
}
.staff-mode #orders #order-filter-tabs button[data-order-filter="in_progress"]::before{content:"▣";font-size:14px}
.staff-mode #orders #order-filter-tabs button[data-order-filter="completed"]::before{content:"✓";font-size:15px}
.staff-mode #orders #order-filter-tabs button>span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px!important;
  font-weight:850;
}
.staff-mode #orders #order-filter-tabs button>b{
  min-width:21px!important;
  width:21px!important;
  height:21px!important;
  padding:0!important;
  background:#edf3f8!important;
  color:#60788e!important;
  font-size:9px!important;
}
.staff-mode #orders #order-filter-tabs[data-active-filter="active"] button[data-order-filter="active"],
.staff-mode #orders #order-filter-tabs[data-active-filter="in_progress"] button[data-order-filter="in_progress"],
.staff-mode #orders #order-filter-tabs[data-active-filter="completed"] button[data-order-filter="completed"]{
  border-color:#b9e2d1!important;
  background:#f2fbf7!important;
  color:#087a58!important;
}
.staff-mode #orders #order-filter-tabs[data-active-filter="active"] button[data-order-filter="active"]::before,
.staff-mode #orders #order-filter-tabs[data-active-filter="in_progress"] button[data-order-filter="in_progress"]::before,
.staff-mode #orders #order-filter-tabs[data-active-filter="completed"] button[data-order-filter="completed"]::before{
  background:#0ca574!important;
  color:#fff!important;
}
.staff-mode #orders #order-filter-tabs[data-active-filter] button[aria-selected="true"]>b{
  background:#e1f6ed!important;
  color:#087a58!important;
}

.staff-mode #orders .staff-order-card-v3426{
  border:1px solid #d7e4ef!important;
  border-left:3px solid #0ca574!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:0 4px 15px rgba(20,60,94,.045)!important;
  overflow:hidden!important;
}
.staff-mode #orders .staff-order-card-v3426.pending,
.staff-mode #orders .staff-order-card-v3426.assigned{border-left-color:#1682ef!important}
.staff-mode #orders .staff-order-card-v3426.in_progress{border-left-color:#1682ef!important}
.staff-mode #orders .staff-order-card-v3426.failed{border-left-color:#d9941b!important}

.staff-mode #orders .staff-order-summary-v3426{
  display:block!important;
  min-height:0!important;
  padding:0!important;
  background:#fff!important;
}
.staff-mode #orders .staff-order-summary-collapsed{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) minmax(82px,auto) 14px;
  align-items:center;
  gap:8px;
  min-height:78px;
  padding:8px 9px;
}
.staff-mode #orders .staff-order-summary-open{display:none}
.staff-mode #orders .staff-order-card-v3426[open]>.staff-order-summary-v3426 .staff-order-summary-collapsed{display:none}
.staff-mode #orders .staff-order-card-v3426[open]>.staff-order-summary-v3426 .staff-order-summary-open{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto auto 14px;
  align-items:center;
  gap:8px;
  min-height:52px;
  padding:8px 10px;
  border-bottom:1px solid #e5edf4;
}
.staff-mode #orders .staff-order-doc-icon{
  display:grid;
  width:28px;
  height:28px;
  place-items:center;
  border-radius:9px;
  background:#edf5ff;
  color:#0878ef;
  font-size:13px;
  font-weight:900;
}
.staff-mode #orders .staff-order-summary-open>strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#60788e;
  font-size:12px;
  letter-spacing:.02em;
}
.staff-mode #orders .staff-order-summary-open>b{
  color:#0878ef;
  font-size:18px;
  line-height:1;
  white-space:nowrap;
}
.staff-mode #orders .staff-order-open-status{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:3px 9px;
  border:1px solid #cfe8df;
  border-radius:999px;
  background:#eef9f5;
  color:#087a58;
  font-size:9px;
  font-style:normal;
  font-weight:900;
  white-space:nowrap;
}
.staff-mode #orders .staff-order-open-status.in_progress{border-color:#cde2f8;background:#edf6ff;color:#0878ef}
.staff-mode #orders .staff-order-open-status.failed{border-color:#efd9ad;background:#fff7e8;color:#9a650d}

.staff-mode #orders .staff-order-expanded-v3426{
  display:grid;
  gap:9px!important;
  padding:10px 11px 11px!important;
  background:#fff;
}
.staff-mode #orders .staff-order-customer-v3426{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) minmax(142px,.95fr);
  align-items:center;
  gap:10px;
  min-width:0;
  padding:4px 2px 8px;
  border-bottom:1px solid #e8eff5;
}
.staff-mode #orders .staff-order-customer-v3426>.order-customer-avatar{
  width:42px!important;
  height:42px!important;
  border-radius:12px!important;
  background:#e7f3ff!important;
  font-size:16px!important;
}
.staff-mode #orders .staff-order-customer-copy{display:grid;gap:2px;min-width:0}
.staff-mode #orders .staff-order-customer-copy>strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#153653;
  font-size:17px;
  line-height:1.15;
}
.staff-mode #orders .staff-order-customer-copy>small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#6f8497;
  font-size:11px!important;
  letter-spacing:0!important;
}
.staff-mode #orders .staff-order-facts-v3426{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px 7px;
  min-width:0;
  padding-left:9px;
  border-left:1px solid #e1eaf2;
}
.staff-mode #orders .staff-order-facts-v3426>b{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#587087;
  font-size:10px;
  font-weight:800;
}
.staff-mode #orders .staff-order-facts-v3426>.source{color:#bd760f}

.staff-mode #orders .staff-order-lifecycle-v3426{
  position:relative;
  grid-template-columns:auto minmax(10px,1fr) auto minmax(10px,1fr) auto minmax(10px,1fr) auto!important;
  gap:3px!important;
  margin:0!important;
  padding:8px 80px 7px 5px!important;
  border:1px solid #e0ebf4;
  border-radius:11px;
  background:#f8fbfe;
}
.staff-mode #orders .staff-order-lifecycle-v3426>span{min-width:40px!important;gap:3px!important}
.staff-mode #orders .staff-order-lifecycle-v3426>span i{width:25px!important;height:25px!important;font-size:9px!important}
.staff-mode #orders .staff-order-lifecycle-v3426>span small{font-size:7.5px!important}
.staff-mode #orders .staff-order-lifecycle-v3426>b{margin-top:12px!important}
.staff-mode #orders .staff-order-lifecycle-status{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  background:#e9f9f2;
  color:#087a58;
  font-size:9px;
  font-style:normal;
  font-weight:950;
  white-space:nowrap;
}
.staff-mode #orders .staff-order-lifecycle-status.in_progress{background:#eaf4ff;color:#0878ef}
.staff-mode #orders .staff-order-lifecycle-status.failed{background:#fff5e5;color:#a26810}
.staff-mode #orders .staff-order-lifecycle-status.pending,
.staff-mode #orders .staff-order-lifecycle-status.assigned{background:#edf5ff;color:#0871df}

.staff-mode #orders .staff-order-meta-v3426{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
.staff-mode #orders .staff-order-meta-v3426>span{
  min-height:54px!important;
  padding:8px 10px!important;
  border:1px solid #e3ebf3!important;
  border-radius:11px!important;
  background:#f7fafc!important;
}
.staff-mode #orders .staff-order-meta-v3426 small{font-size:9px!important}
.staff-mode #orders .staff-order-meta-v3426 strong{font-size:14px!important}
.staff-mode #orders .staff-order-meta-v3426>span:nth-child(3) strong{color:#0878ef!important;font-size:17px!important}

.staff-mode #orders .staff-order-products-v3426{
  display:grid!important;
  grid-template-columns:1fr;
  gap:5px!important;
}
.staff-mode #orders .staff-order-products-v3426 span{
  min-height:40px!important;
  width:100%;
  justify-content:flex-start;
  padding:7px 10px!important;
  border-radius:10px!important;
  box-sizing:border-box;
}
.staff-mode #orders .staff-order-products-v3426 b{font-size:14px!important}
.staff-mode #orders .staff-order-delivery-link-v3426,
.staff-mode #orders .staff-order-source-line-v3426{
  width:100%;
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  box-sizing:border-box;
  padding:7px 10px;
  border:1px solid #e3ebf3;
  border-radius:10px;
  background:#fbfdff;
  color:#0878ef;
  font-size:12px;
  font-weight:850;
  text-align:left;
}
.staff-mode #orders .staff-order-source-line-v3426{color:#657b8f;font-size:10px;font-weight:700}
.staff-mode #orders .staff-order-actions-v3426{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
  padding-top:0!important;
}
.staff-mode #orders .staff-order-actions-v3426 .mini-btn{
  min-height:44px!important;
  border-radius:11px!important;
  font-size:13px!important;
}
.staff-mode #orders .staff-order-actions-v3426 .mini-btn.detail{border-color:#c9ddec!important;background:#fff!important}
.staff-mode #orders .staff-order-actions-v3426 .mini-btn.primary{background:#0878ef!important;border-color:#0878ef!important;color:#fff!important}
.staff-mode #orders .staff-order-actions-v3426 .mini-btn:only-child{grid-column:1/-1}
.staff-mode #orders .staff-order-quick-v3426{margin:0!important}
.staff-mode #orders .staff-order-quick-v3426>summary{min-height:32px!important}

@media(max-width:430px){
  .staff-mode #orders .aquaflow-page-head{min-height:38px!important;margin-bottom:7px!important}
  .staff-mode #orders .aquaflow-page-head h2{font-size:19px!important}
  .staff-mode #orders .aquaflow-page-head .btn{min-height:36px!important;height:36px!important;padding:0 10px!important;font-size:11px!important}
  .staff-mode #orders #order-filter-tabs{gap:6px!important}
  .staff-mode #orders #order-filter-tabs button{grid-template-columns:25px minmax(0,1fr) 19px!important;gap:4px!important;min-height:52px!important;padding:6px!important}
  .staff-mode #orders #order-filter-tabs button::before{width:24px;height:24px;font-size:14px}
  .staff-mode #orders #order-filter-tabs button>span{font-size:10.5px!important}
  .staff-mode #orders #order-filter-tabs button>b{width:19px!important;min-width:19px!important;height:19px!important;font-size:8px!important}
  .staff-mode #orders .staff-order-summary-collapsed{grid-template-columns:34px minmax(0,1fr) minmax(72px,auto) 12px;gap:6px;min-height:72px;padding:7px}
  .staff-mode #orders .staff-order-summary-collapsed>.order-customer-avatar{width:32px!important;height:32px!important;font-size:13px!important}
  .staff-mode #orders .staff-order-card-v3426[open]>.staff-order-summary-v3426 .staff-order-summary-open{grid-template-columns:27px minmax(0,1fr) auto auto 12px;gap:6px;min-height:48px;padding:7px 8px}
  .staff-mode #orders .staff-order-doc-icon{width:25px;height:25px;border-radius:8px;font-size:11px}
  .staff-mode #orders .staff-order-summary-open>strong{font-size:10px}
  .staff-mode #orders .staff-order-summary-open>b{font-size:16px}
  .staff-mode #orders .staff-order-open-status{min-height:23px;padding:3px 7px;font-size:8px}
  .staff-mode #orders .staff-order-expanded-v3426{gap:7px!important;padding:8px!important}
  .staff-mode #orders .staff-order-customer-v3426{grid-template-columns:38px minmax(0,1fr) minmax(122px,.95fr);gap:8px;padding:3px 1px 7px}
  .staff-mode #orders .staff-order-customer-v3426>.order-customer-avatar{width:36px!important;height:36px!important;font-size:14px!important}
  .staff-mode #orders .staff-order-customer-copy>strong{font-size:15px}
  .staff-mode #orders .staff-order-customer-copy>small{font-size:10px!important}
  .staff-mode #orders .staff-order-facts-v3426{gap:4px 5px;padding-left:7px}
  .staff-mode #orders .staff-order-facts-v3426>b{font-size:8.5px}
  .staff-mode #orders .staff-order-lifecycle-v3426{padding:7px 68px 6px 3px!important}
  .staff-mode #orders .staff-order-lifecycle-v3426>span{min-width:34px!important}
  .staff-mode #orders .staff-order-lifecycle-v3426>span i{width:23px!important;height:23px!important}
  .staff-mode #orders .staff-order-lifecycle-v3426>span small{font-size:6.7px!important}
  .staff-mode #orders .staff-order-lifecycle-status{right:6px;min-height:25px;padding:3px 7px;font-size:8px}
  .staff-mode #orders .staff-order-meta-v3426>span{min-height:49px!important;padding:7px 8px!important}
  .staff-mode #orders .staff-order-meta-v3426 small{font-size:8px!important}
  .staff-mode #orders .staff-order-meta-v3426 strong{font-size:12px!important}
  .staff-mode #orders .staff-order-meta-v3426>span:nth-child(3) strong{font-size:15px!important}
  .staff-mode #orders .staff-order-products-v3426 span,
  .staff-mode #orders .staff-order-delivery-link-v3426,
  .staff-mode #orders .staff-order-source-line-v3426{min-height:37px!important}
  .staff-mode #orders .staff-order-actions-v3426 .mini-btn{min-height:42px!important;font-size:12px!important}
}

@media(max-width:370px){
  .staff-mode #orders .staff-order-customer-v3426{grid-template-columns:36px minmax(0,1fr)}
  .staff-mode #orders .staff-order-facts-v3426{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));padding:6px 0 0;border-left:0;border-top:1px solid #e6eef5}
  .staff-mode #orders .staff-order-facts-v3426>b{text-align:center}
  .staff-mode #orders .staff-order-lifecycle-v3426{padding-right:3px!important;padding-bottom:36px!important}
  .staff-mode #orders .staff-order-lifecycle-status{right:50%;top:auto;bottom:5px;transform:translateX(50%)}
}
.staff-mode #orders .staff-order-actions-v3426 .staff-open-delivery{background:#0878ef!important;border-color:#0878ef!important;color:#fff!important}

/* ========================================================================== 
   AquaFlow V34.2.7 — ADMIN + DRIVER ORDER UI
   - One compact list language for Admin and Driver.
   - Four explicit states: Cần giao / Đang giao / Đã giao / Hẹn lại.
   - Detail dialog keeps essential data above the fold; advanced audit/reconcile
     is still available without forcing every driver to scroll through it.
   ========================================================================== */

/* Mobile order workspace: go straight to status -> cards. Enterprise metrics
   remain in the DOM/data model, but no longer consume the driver's/admin's
   working viewport on a phone. */
@media(max-width:760px){
  #orders .order-delivery-bridge,
  #orders .aquaflow-order-hero,
  #orders .order-kpi-grid,
  #orders .order-control-tower{display:none!important}
  #orders .aquaflow-page-head{min-height:44px!important;margin:2px 0 8px!important;align-items:center!important}
  #orders .aquaflow-page-head>div>small,
  #orders .aquaflow-page-head .section-note{display:none!important}
  #orders .aquaflow-page-head h2{font-size:25px!important;line-height:1.05!important;letter-spacing:-.035em!important;margin:0!important}
  #orders .aquaflow-page-head .btn{min-height:40px!important;height:40px!important;padding:0 13px!important;border-radius:11px!important;font-size:12px!important;box-shadow:none!important}
  #orders .order-filter-panel{margin:0 0 9px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;gap:6px!important}
  #orders .order-filter-tools{display:none!important}
  #orders #order-filter-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;overflow:visible!important;padding:0!important}
  #orders #order-filter-tabs button,
  .staff-mode #orders #order-filter-tabs button,
  .admin-mode #orders #order-filter-tabs button{
    display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;justify-items:start!important;gap:4px!important;
    min-width:0!important;min-height:42px!important;height:42px!important;padding:5px 7px!important;border:1px solid #dce7f1!important;border-radius:11px!important;
    background:#fff!important;color:#5d7489!important;box-shadow:0 2px 7px rgba(25,62,99,.035)!important;font-size:10px!important;font-weight:850!important;text-align:left!important
  }
  #orders #order-filter-tabs button::before{display:none!important}
  #orders #order-filter-tabs button>span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:10px!important;font-weight:850!important}
  #orders #order-filter-tabs button>b{min-width:18px!important;width:auto!important;height:18px!important;padding:0 5px!important;border-radius:999px!important;background:#edf3f8!important;color:#60788e!important;font-size:8px!important}
  #orders #order-filter-tabs button[data-order-filter="failed"]{display:grid!important}
  #orders #order-filter-tabs[data-active-filter="active"] button[data-order-filter="active"],
  #orders #order-filter-tabs[data-active-filter="in_progress"] button[data-order-filter="in_progress"],
  #orders #order-filter-tabs[data-active-filter="completed"] button[data-order-filter="completed"]{
    border-color:#b9e2d1!important;background:#f2fbf7!important;color:#087a58!important
  }
  #orders #order-filter-tabs[data-active-filter="failed"] button[data-order-filter="failed"]{
    border-color:#f1cf93!important;background:#fff7e9!important;color:#a76408!important
  }
  #orders #order-filter-tabs[data-active-filter] button[aria-selected="true"]>b{background:#e1f6ed!important;color:#087a58!important}
  #orders #order-filter-tabs[data-active-filter="failed"] button[data-order-filter="failed"]>b{background:#ffedc8!important;color:#9a5d05!important}
  #orders .aquaflow-order-list{gap:8px!important}
}

/* Unified compact list card */
#orders .order-list-card-v3427{
  display:grid;gap:8px;position:relative;min-width:0;padding:11px!important;border:1px solid #dbe7f1!important;border-left:3px solid #1682ef!important;border-radius:15px!important;
  background:#fff!important;box-shadow:0 4px 15px rgba(20,60,94,.045)!important;overflow:visible!important
}
#orders .order-list-card-v3427.completed{border-left-color:#0ca574!important;border-color:#cfe9df!important}
#orders .order-list-card-v3427.failed{border-left-color:#e49a1c!important;border-color:#efd5a4!important;background:linear-gradient(180deg,#fffdfa,#fff)!important}
#orders .order-list-card-v3427.in_progress{border-left-color:#0878ef!important}
#orders .order-list-card-top-v3427{display:grid;grid-template-columns:auto minmax(0,1fr) 32px;align-items:center;gap:8px;min-height:28px}
#orders .order-list-card-top-v3427>small{justify-self:end;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6d8397!important;font-size:9px!important;font-weight:850!important;letter-spacing:.03em!important}
#orders .order-list-status-v3427{display:inline-flex;align-items:center;gap:4px;min-height:25px;padding:3px 8px;border-radius:999px;background:#edf5ff;color:#0878ef;font-size:9px;font-weight:900;white-space:nowrap}
#orders .order-list-status-v3427.completed{background:#e9f9f2;color:#087a58}
#orders .order-list-status-v3427.failed{background:#fff1d8;color:#a76408}
#orders .order-list-status-v3427.in_progress{background:#eaf4ff;color:#0878ef}
#orders .order-list-menu-v3427{position:relative;justify-self:end}
#orders .order-list-menu-v3427>summary{list-style:none;display:grid;width:30px;height:30px;place-items:center;border:0;border-radius:0;background:transparent;box-shadow:none;color:#61798f;font-size:12px;font-weight:950;cursor:pointer}
#orders .order-list-menu-v3427>summary::-webkit-details-marker{display:none}
#orders .order-list-menu-v3427>div{position:absolute;z-index:20;right:0;top:34px;display:grid;grid-template-columns:1fr;gap:5px;width:152px;padding:7px;border:1px solid #dce7f1;border-radius:11px;background:#fff;box-shadow:0 12px 32px rgba(31,61,91,.16)}
#orders .order-list-menu-v3427 .mini-btn{min-height:36px!important;width:100%!important;font-size:10px!important;border-radius:8px!important}
#orders .order-list-customer-v3427{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0}
#orders .order-list-customer-v3427>.order-customer-avatar{width:42px!important;height:42px!important;border-radius:12px!important;background:#e9f4ff!important;color:#0878ef!important;font-size:16px!important}
#orders .order-list-customer-copy-v3427{display:grid;gap:3px;min-width:0}
#orders .order-list-customer-copy-v3427>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#102f4b;font-size:17px;line-height:1.15}
#orders .order-list-customer-copy-v3427>small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#667e93!important;font-size:10px!important;letter-spacing:0!important}
#orders .order-list-money-v3427{align-self:start;color:#0878ef;font-size:18px;line-height:1.15;white-space:nowrap}
#orders .order-list-facts-v3427{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:7px 8px;border:1px solid #e4edf4;border-radius:10px;background:#fbfdff}
#orders .order-list-facts-v3427>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#587087;font-size:10px;font-weight:800}
#orders .order-list-facts-v3427>.source{color:#95610c}
#orders .order-list-facts-v3427>.handoff{color:#9a650d}
#orders .order-list-retry-v3427{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid #f1d8aa;border-radius:9px;background:#fff8ea;color:#875b13;font-size:10px;line-height:1.3}
#orders .order-list-retry-v3427>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#orders .order-list-retry-v3427>small{flex:0 0 auto;color:#a16b10!important;font-size:9px!important;font-weight:850!important}
#orders .order-list-actions-v3427{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#orders .order-list-actions-v3427 .mini-btn{width:100%!important;min-height:41px!important;border-radius:10px!important;font-size:12px!important;font-weight:900!important}
#orders .order-list-actions-v3427 .mini-btn.detail{border-color:#cfe0ef!important;background:#fff!important;color:#315b7d!important}
#orders .order-list-actions-v3427 .mini-btn.primary{background:#0878ef!important;border-color:#0878ef!important;color:#fff!important}
#orders .order-list-actions-v3427 .mini-btn:only-child{grid-column:1/-1}

/* V34.2.7 compact detail */
#order-detail-dialog .order-detail-content{gap:9px!important}
#order-detail-dialog .order-detail-customer-v3427{grid-template-columns:52px minmax(0,1fr) auto!important;gap:10px!important;padding:11px 12px!important;border-radius:15px!important;background:linear-gradient(145deg,#f6fbff,#fff)!important}
#order-detail-dialog .order-detail-customer-v3427 .order-detail-avatar{width:50px!important;height:50px!important;border-radius:14px!important}
#order-detail-dialog .order-detail-customer-copy-v3427{display:grid;gap:2px;min-width:0}
#order-detail-dialog .order-detail-customer-copy-v3427 strong{font-size:17px!important;line-height:1.15!important}
#order-detail-dialog .order-detail-customer-copy-v3427 span,
#order-detail-dialog .order-detail-customer-copy-v3427 small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#60778d!important;font-size:11px!important;line-height:1.25!important}
#order-detail-dialog .order-detail-customer-v3427 .order-detail-call{grid-column:auto!important;min-height:36px!important;padding:0 10px!important;font-size:11px!important}

#order-detail-dialog .order-detail-kpis-v3427{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
#order-detail-dialog .order-detail-kpis-v3427>span{min-height:57px!important;align-content:center!important;gap:3px!important;padding:8px 10px!important;border:1px solid #edf2f6;border-radius:12px!important;background:#f7f9fc!important}
#order-detail-dialog .order-detail-kpis-v3427 small{font-size:8.5px!important;line-height:1.1!important;letter-spacing:.08em!important;color:#8293a5!important}
#order-detail-dialog .order-detail-kpis-v3427 strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px!important;line-height:1.2!important;color:#163754}
#order-detail-dialog .order-detail-kpis-v3427>span:nth-child(4) strong{color:#0878ef;font-size:16px!important}
#order-detail-dialog .order-detail-kpis-v3427>.status-completed strong{color:#087a58}
#order-detail-dialog .order-detail-kpis-v3427>.status-failed strong{color:#a76408}

#order-detail-dialog .order-detail-lifecycle-v3427{grid-template-columns:auto minmax(8px,1fr) auto minmax(8px,1fr) auto minmax(8px,1fr) auto!important;gap:3px!important;margin:0!important;padding:7px 8px!important;border:1px solid #dfe9f2!important;border-radius:12px!important;background:#f9fbfd!important}
#order-detail-dialog .order-detail-lifecycle-v3427>span{min-width:45px!important;gap:3px!important}
#order-detail-dialog .order-detail-lifecycle-v3427>span b{width:28px!important;height:28px!important;font-size:10px!important}
#order-detail-dialog .order-detail-lifecycle-v3427>span small{font-size:7.5px!important;line-height:1!important}
#order-detail-dialog .order-detail-lifecycle-v3427>i{margin-top:13px!important}

#order-detail-dialog .order-detail-chip-row-v3427{display:flex;align-items:center;gap:5px;min-width:0;overflow-x:auto;scrollbar-width:none;padding:0 1px}
#order-detail-dialog .order-detail-chip-row-v3427::-webkit-scrollbar{display:none}
#order-detail-dialog .order-detail-chip-row-v3427>span,
#order-detail-dialog .order-detail-chip-row-v3427>button{display:inline-flex;flex:0 0 auto;align-items:center;min-height:30px;padding:4px 9px;border:1px solid #e0e9f1;border-radius:999px;background:#f7fafc;color:#60788e;font:inherit;font-size:9px;font-weight:850}
#order-detail-dialog .order-detail-chip-row-v3427>.source{color:#0878ef;background:#edf6ff;border-color:#d3e6fb}
#order-detail-dialog .order-detail-chip-row-v3427>.retry{color:#9a650d;background:#fff7e8;border-color:#f0d7a6}
#order-detail-dialog .order-detail-chip-row-v3427>button{color:#0878ef;cursor:pointer}

#order-detail-dialog .order-detail-control-grid-v3427{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px;border:1px solid #e2ebf3;border-radius:12px;background:#fbfdff}
#order-detail-dialog .order-detail-control-grid-v3427>span{display:grid;gap:3px;min-width:0;padding:6px 7px;border-radius:9px;background:#fff}
#order-detail-dialog .order-detail-control-grid-v3427 small{font-size:7.5px!important;letter-spacing:.08em!important;color:#8193a4!important}
#order-detail-dialog .order-detail-control-grid-v3427 strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173a58;font-size:10.5px;line-height:1.2}

#order-detail-dialog .order-detail-products-section-v3427,
#order-detail-dialog .order-detail-note-section-v3427{padding:10px 11px!important;border-radius:13px!important}
#order-detail-dialog .order-detail-section-head-v3427{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
#order-detail-dialog .order-detail-section-head-v3427>strong{font-size:10px;letter-spacing:.08em;color:#173a58}
#order-detail-dialog .order-detail-section-head-v3427>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#657b90;font-size:9px;font-weight:800}
#order-detail-dialog .order-detail-products-v3427{display:grid;gap:0}
#order-detail-dialog .order-detail-products-v3427>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:6px 0;border-top:1px solid #edf2f6}
#order-detail-dialog .order-detail-products-v3427>div:first-child{border-top:0}
#order-detail-dialog .order-detail-products-v3427>div>span{display:grid;grid-template-columns:28px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;align-items:center;min-width:0}
#order-detail-dialog .order-detail-products-v3427>div>span>b{grid-row:1/3;display:grid;width:28px;height:28px;place-items:center;border-radius:8px;background:#edf6ff;color:#0878ef;font-size:10px}
#order-detail-dialog .order-detail-products-v3427>div>span>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173a58;font-size:11px}
#order-detail-dialog .order-detail-products-v3427>div>span>small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#71869a!important;font-size:8.5px!important;letter-spacing:0!important}
#order-detail-dialog .order-detail-products-v3427>div>em{color:#173a58;font-size:10px;font-style:normal;font-weight:900;white-space:nowrap}

#order-detail-dialog .order-detail-note-section-v3427.retry{border-color:#f0d7a6!important;background:#fffaf1!important}
#order-detail-dialog .order-reschedule-summary-v3427{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:5px;border-top:1px solid #f2dfba}
#order-detail-dialog .order-reschedule-summary-v3427>strong{min-width:0;color:#7f570e;font-size:10.5px;line-height:1.3}
#order-detail-dialog .order-reschedule-summary-v3427>small{flex:0 0 auto;color:#9d6b13!important;font-size:8px!important;letter-spacing:0!important;text-align:right}
#order-detail-dialog .order-detail-note-section-v3427 .order-detail-note{margin:0!important;color:#526b81!important;font-size:10px!important;line-height:1.35!important}

#order-detail-dialog .order-detail-advanced-v3427{border:1px solid #e2ebf3;border-radius:12px;background:#fbfdff;overflow:hidden}
#order-detail-dialog .order-detail-advanced-v3427>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:37px;padding:0 11px;color:#436079;font-size:10px;font-weight:900;cursor:pointer}
#order-detail-dialog .order-detail-advanced-v3427>summary::-webkit-details-marker{display:none}
#order-detail-dialog .order-detail-advanced-v3427>summary::after{content:"＋";color:#0878ef;font-size:13px}
#order-detail-dialog .order-detail-advanced-v3427[open]>summary::after{content:"−"}
#order-detail-dialog .order-detail-advanced-body-v3427{display:grid;gap:7px;padding:0 9px 9px}
#order-detail-dialog .order-detail-mini-section-v3427{display:grid;gap:6px;padding:8px;border-radius:10px;background:#fff}
#order-detail-dialog .order-detail-mini-section-v3427>small{font-size:8px!important;font-weight:900!important;letter-spacing:.08em!important;color:#6f8498!important}
#order-detail-dialog .order-detail-mini-section-v3427 .order-detail-people{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
#order-detail-dialog .order-detail-mini-section-v3427 .order-detail-people span{padding:7px!important;font-size:8px!important}
#order-detail-dialog .order-detail-mini-section-v3427 .order-detail-people strong{font-size:10px!important}
#order-detail-dialog .order-detail-mini-section-v3427 .order-reconcile-grid{gap:5px!important}
#order-detail-dialog .order-detail-mini-section-v3427 .order-reconcile-grid>span{padding:6px!important}
#order-detail-dialog .order-detail-delivery-moment-v3427{margin:0;color:#647b90;font-size:9px}
#order-detail-dialog .order-detail-mini-section-v3427 .order-event-timeline{max-height:150px;overflow:auto}
#order-detail-dialog .order-detail-mini-section-v3427 .order-event-timeline article{padding:6px 0!important}
#order-detail-dialog .order-detail-mini-section-v3427 .order-event-timeline strong{font-size:10px!important}
#order-detail-dialog .order-detail-mini-section-v3427 .order-event-timeline span,
#order-detail-dialog .order-detail-mini-section-v3427 .order-event-timeline small{font-size:8px!important}

#order-detail-dialog .order-detail-reschedule-action-v3427{border-color:#f0d7a6!important;background:#fff8e9!important;color:#9a650d!important}

@media(max-width:760px){
  #order-detail-dialog.af-global-fullscreen-dialog>.af-global-dialog-scroll{padding-left:12px!important;padding-right:12px!important}
  #order-detail-dialog .order-detail-head{min-height:84px!important;padding:10px 2px 8px!important}
  #order-detail-dialog .order-detail-head small{font-size:9px!important;letter-spacing:.13em!important}
  #order-detail-dialog .order-detail-head h2{margin-top:3px!important;font-size:22px!important;line-height:1.08!important}
  #order-detail-dialog .order-detail-head .muted{margin:4px 0 0!important;font-size:11px!important;line-height:1.2!important}
  #order-detail-dialog .order-detail-content{padding-bottom:8px!important;overflow:visible!important}
  #order-detail-dialog.af-global-fullscreen-dialog .order-detail-actions{grid-template-columns:minmax(88px,.8fr) minmax(0,2fr)!important;grid-auto-rows:50px!important;gap:7px!important;padding:8px 12px calc(8px + env(safe-area-inset-bottom))!important}
  #order-detail-dialog.af-global-fullscreen-dialog #order-detail-primary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;width:100%!important}
  #order-detail-dialog.af-global-fullscreen-dialog #order-detail-primary>.btn:only-child{grid-column:1/-1}
  #order-detail-dialog.af-global-fullscreen-dialog .order-detail-actions .btn{min-height:50px!important;font-size:13px!important;border-radius:12px!important}
}

@media(max-width:430px){
  #orders #order-filter-tabs{gap:5px!important}
  #orders #order-filter-tabs button,
  .staff-mode #orders #order-filter-tabs button,
  .admin-mode #orders #order-filter-tabs button{min-height:40px!important;height:40px!important;padding:4px 5px!important}
  #orders #order-filter-tabs button>span{font-size:9px!important}
  #orders .order-list-card-v3427{gap:7px;padding:9px!important;border-radius:13px!important}
  #orders .order-list-card-top-v3427{grid-template-columns:auto minmax(0,1fr) 29px;gap:6px}
  #orders .order-list-status-v3427{min-height:23px;padding:3px 7px;font-size:8px}
  #orders .order-list-menu-v3427>summary{width:28px;height:28px}
  #orders .order-list-customer-v3427{grid-template-columns:38px minmax(0,1fr) auto;gap:8px}
  #orders .order-list-customer-v3427>.order-customer-avatar{width:36px!important;height:36px!important;font-size:14px!important}
  #orders .order-list-customer-copy-v3427>strong{font-size:15px}
  #orders .order-list-customer-copy-v3427>small{font-size:9px!important}
  #orders .order-list-money-v3427{font-size:16px}
  #orders .order-list-facts-v3427{gap:4px;padding:6px 7px}
  #orders .order-list-facts-v3427>span{font-size:8.5px}
  #orders .order-list-retry-v3427{padding:6px 7px;font-size:9px}
  #orders .order-list-actions-v3427 .mini-btn{min-height:39px!important;font-size:11px!important}

  #order-detail-dialog .order-detail-customer-v3427{grid-template-columns:46px minmax(0,1fr)!important;padding:9px 10px!important}
  #order-detail-dialog .order-detail-customer-v3427 .order-detail-avatar{width:44px!important;height:44px!important}
  #order-detail-dialog .order-detail-customer-v3427 .order-detail-call{display:none!important}
  #order-detail-dialog .order-detail-kpis-v3427>span{min-height:52px!important;padding:7px 9px!important}
  #order-detail-dialog .order-detail-kpis-v3427 small{font-size:7.8px!important}
  #order-detail-dialog .order-detail-kpis-v3427 strong{font-size:12.5px!important}
  #order-detail-dialog .order-detail-kpis-v3427>span:nth-child(4) strong{font-size:14.5px!important}
  #order-detail-dialog .order-detail-lifecycle-v3427{padding:6px 4px!important}
  #order-detail-dialog .order-detail-lifecycle-v3427>span{min-width:39px!important}
  #order-detail-dialog .order-detail-lifecycle-v3427>span b{width:25px!important;height:25px!important}
  #order-detail-dialog .order-detail-lifecycle-v3427>span small{font-size:6.7px!important}
  #order-detail-dialog .order-detail-control-grid-v3427{gap:4px;padding:6px}
  #order-detail-dialog .order-detail-control-grid-v3427>span{padding:5px}
  #order-detail-dialog .order-detail-control-grid-v3427 strong{font-size:9px}
  #order-detail-dialog .order-detail-products-section-v3427,
  #order-detail-dialog .order-detail-note-section-v3427{padding:9px!important}
}


/* ========================================================================== 
   AquaFlow V34.2.8 — DRIVER RESCHEDULE + DETAIL ACTION ROW
   - Fix the V34.2.6 staff rule that still hid the dedicated Hẹn lại tab.
   - Keep 4 order states visible on both Admin and Driver.
   - On mobile order detail, Đóng / Hẹn lại / Giao đơn share one fixed row.
   ========================================================================== */
@media(max-width:760px){
  .staff-mode #orders #order-filter-tabs{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  .staff-mode #orders #order-filter-tabs button[data-order-filter="failed"]{
    display:grid!important;
  }
  #order-detail-dialog.af-global-fullscreen-dialog .order-detail-actions{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-rows:52px!important;
    align-items:stretch!important;
    gap:7px!important;
    padding:8px 12px calc(8px + env(safe-area-inset-bottom))!important;
  }
  #order-detail-dialog.af-global-fullscreen-dialog #order-detail-primary{
    display:contents!important;
  }
  #order-detail-dialog.af-global-fullscreen-dialog .order-detail-actions>.btn,
  #order-detail-dialog.af-global-fullscreen-dialog #order-detail-primary>.btn{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:52px!important;
    height:52px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:13px!important;
    font-size:13px!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #order-detail-dialog.af-global-fullscreen-dialog #order-detail-primary>.btn:last-child:not(:only-child){
    grid-column:auto!important;
    width:100%!important;
  }
  #order-detail-dialog.af-global-fullscreen-dialog #order-detail-primary>.btn:only-child{
    grid-column:2 / 4!important;
  }
}
@media(max-width:360px){
  #order-detail-dialog.af-global-fullscreen-dialog .order-detail-actions{
    gap:5px!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }
  #order-detail-dialog.af-global-fullscreen-dialog .order-detail-actions>.btn,
  #order-detail-dialog.af-global-fullscreen-dialog #order-detail-primary>.btn{
    padding:0 5px!important;
    font-size:12px!important;
  }
}

/* ========================================================================== 
   AquaFlow V34.2.10 — IPHONE ORDER COMMAND CENTER
   High-density enterprise order management inspired by the approved iPhone
   concept: 4 status cards, operational filters, search, scan-friendly cards.
   ========================================================================== */
#orders .order-status-board-v3430 button>small,
#orders .order-status-board-v3430 button>i{display:block}
#orders .order-status-board-v3430 button>i{font-style:normal}
#orders .order-command-filters-v3430,
#orders .order-command-search-v3430{display:flex}
#orders .order-command-card-v3430{position:relative;display:grid;gap:8px;min-width:0}
#orders .order-command-head-v3430{display:grid;grid-template-columns:34px auto auto minmax(0,1fr) 30px;align-items:center;gap:7px;min-width:0}
#orders .order-command-head-v3430>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#123553;font-size:12px}
#orders .order-command-seq-v3430{display:grid;width:32px;height:28px;place-items:center;border-radius:9px;background:#1a84f5;color:#fff;font-size:11px;font-weight:950}
#orders .order-command-status-v3430{display:inline-flex;align-items:center;justify-content:center;min-height:26px;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}
#orders .order-command-status-v3430.need{background:#e9f4ff;color:#0878ef}
#orders .order-command-status-v3430.progress{background:#fff0da;color:#d87500}
#orders .order-command-status-v3430.done{background:#e7f8ef;color:#008b5d}
#orders .order-command-status-v3430.retry{background:#f2eaff;color:#7c3df0}
#orders .order-command-time-v3430{justify-self:end;display:inline-flex;align-items:center;min-height:27px;padding:3px 9px;border-radius:999px;background:#eef5fb;color:#4b6b86;font-size:9px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
#orders .order-command-time-v3430.overdue{background:#ffe8e8;color:#d92626}
#orders .order-command-time-v3430.due{background:#edf6ff;color:#0878ef}
#orders .order-command-time-v3430.progress{background:#fff1dd;color:#d87500}
#orders .order-command-time-v3430.done{background:#e8f8ef;color:#008b5d}
#orders .order-command-time-v3430.retry{background:#f4ecff;color:#7c3df0}
#orders .order-command-body-v3430{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(128px,.8fr);gap:10px;min-width:0}
#orders .order-command-customer-v3430{display:grid;gap:5px;min-width:0}
#orders .order-command-customer-name-v3430{display:flex;align-items:center;gap:10px;min-width:0}
#orders .order-command-customer-name-v3430>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#102f4b;font-size:16px}
#orders .order-command-customer-name-v3430>span{flex:0 0 auto;color:#668096;font-size:10px}
#orders .order-command-customer-v3430>p{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#5f788e;font-size:10px}
#orders .order-command-products-v3430{display:flex;align-items:center;gap:12px;color:#597188;font-size:10px}
#orders .order-command-products-v3430 b{color:#173a58}
#orders .order-command-finance-v3430{display:grid;align-content:center;gap:4px;padding-left:10px;border-left:1px solid #e2ebf3;min-width:0}
#orders .order-command-finance-v3430>strong{color:#173a58;font-size:16px;white-space:nowrap}
#orders .order-command-finance-v3430>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#60798f;font-size:9px}
#orders .order-command-finance-v3430>span.paid{color:#07955f}
#orders .order-command-finance-v3430>span.retry{color:#8c56c9}
#orders .order-command-finance-v3430>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173a58;font-size:10px}
#orders .order-command-finance-v3430>small{display:inline-flex;width:max-content;max-width:100%;padding:3px 7px;border-radius:999px;background:#f1f5f8;color:#5f7487!important;font-size:8px!important;font-weight:800!important;letter-spacing:0!important}
#orders .order-command-handoff-v3430{color:#9a650d!important;font-size:8px!important}
#orders .order-command-retry-v3430{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid #dfc9fb;border-radius:9px;background:#faf6ff;color:#7141ad;font-size:9px}
#orders .order-command-retry-v3430>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#orders .order-command-retry-v3430>b{flex:0 0 auto;font-size:8px;white-space:nowrap}
#orders .order-command-actions-v3430{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
#orders .order-command-actions-v3430 .mini-btn{display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;width:100%!important;min-height:39px!important;padding:0 6px!important;border:1px solid #d8e4ee!important;border-radius:9px!important;background:#fff!important;color:#173a58!important;font-size:10px!important;font-weight:850!important;white-space:nowrap!important;text-decoration:none!important;overflow:hidden!important;text-overflow:ellipsis!important}
#orders .order-command-actions-v3430 .order-command-primary-v3430{background:#1688f5!important;border-color:#1688f5!important;color:#fff!important}
#orders .order-command-card-v3430{padding:10px 11px!important;border:1px solid #dbe7f1!important;border-left:4px solid #1682ef!important;border-radius:14px!important;background:#fff!important;box-shadow:0 5px 18px rgba(24,62,99,.06)!important}
#orders .order-command-card-v3430.progress{border-left-color:#ff9d11!important}
#orders .order-command-card-v3430.done{border-left-color:#20b77e!important}
#orders .order-command-card-v3430.retry{border-left-color:#8b48f5!important}
#orders .order-command-card-v3430.progress .order-command-seq-v3430{background:#ffa012}
#orders .order-command-card-v3430.done .order-command-seq-v3430{background:#26b77f}
#orders .order-command-card-v3430.retry .order-command-seq-v3430{background:#8b48f5}
#orders .order-command-empty-v3430{min-height:150px!important;border:1px dashed #c7d9e8!important;border-radius:15px!important;background:#fff!important}

@media(max-width:760px){
  #orders{padding-top:2px!important}
  #orders .aquaflow-page-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:end!important;min-height:54px!important;margin:0 0 8px!important}
  #orders .aquaflow-page-head>div>small{display:block!important;color:#0878ef!important;font-size:8px!important;letter-spacing:.11em!important;font-weight:900!important}
  #orders .aquaflow-page-head h2{font-size:22px!important;line-height:1.05!important;margin:2px 0 0!important}
  #orders .aquaflow-page-head .order-command-subtitle-v3430{display:block!important;margin:4px 0 0!important;color:#657d93!important;font-size:10px!important;line-height:1.15!important}
  #orders .aquaflow-page-head .btn{min-height:42px!important;height:42px!important;padding:0 13px!important;border-radius:11px!important;font-size:12px!important}
  #orders .order-delivery-bridge,#orders .aquaflow-order-hero,#orders .order-kpi-grid,#orders .order-control-tower{display:none!important}

  #orders .order-command-panel-v3430{display:grid!important;gap:8px!important;margin:0 0 10px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  #orders .order-status-board-v3430,
  .staff-mode #orders .order-status-board-v3430,
  .admin-mode #orders .order-status-board-v3430{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;overflow:visible!important;padding:0!important}
  #orders .order-status-board-v3430 button,
  .staff-mode #orders .order-status-board-v3430 button,
  .admin-mode #orders .order-status-board-v3430 button{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:25px auto auto auto!important;justify-items:center!important;align-content:center!important;gap:2px!important;min-width:0!important;min-height:94px!important;height:auto!important;padding:7px 4px!important;border:1px solid #dbe7f1!important;border-radius:12px!important;background:#f7fbff!important;color:#0878ef!important;box-shadow:none!important;text-align:center!important}
  #orders .order-status-board-v3430 button::before{display:none!important}
  #orders .order-status-board-v3430 button>i{display:grid!important;width:24px;height:24px;place-items:center;border-radius:7px;background:#1688f5;color:#fff;font-size:11px;font-style:normal;font-weight:950}
  #orders .order-status-board-v3430 button>span{font-size:10px!important;font-weight:900!important;white-space:nowrap!important;color:inherit!important}
  #orders .order-status-board-v3430 button>b{display:block!important;width:auto!important;min-width:0!important;height:auto!important;padding:0!important;background:transparent!important;color:inherit!important;font-size:18px!important;line-height:1!important;font-weight:950!important}
  #orders .order-status-board-v3430 button>small{display:block!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#5f7890!important;font-size:7px!important;line-height:1!important;font-weight:750!important;letter-spacing:0!important}
  #orders .order-status-board-v3430 button[data-order-filter="in_progress"]{background:#fffaf1!important;color:#b86500!important;border-color:#f5dfbb!important}
  #orders .order-status-board-v3430 button[data-order-filter="in_progress"]>i{background:#ff9d11}
  #orders .order-status-board-v3430 button[data-order-filter="completed"]{background:#f2fbf7!important;color:#087b58!important;border-color:#caeadd!important}
  #orders .order-status-board-v3430 button[data-order-filter="completed"]>i{background:#20b77e}
  #orders .order-status-board-v3430 button[data-order-filter="failed"]{display:grid!important;background:#faf6ff!important;color:#7441c9!important;border-color:#e2d3fa!important}
  #orders .order-status-board-v3430 button[data-order-filter="failed"]>i{background:#8b48f5}
  #orders .order-status-board-v3430[data-active-filter="active"] button[data-order-filter="active"],
  #orders .order-status-board-v3430[data-active-filter="in_progress"] button[data-order-filter="in_progress"],
  #orders .order-status-board-v3430[data-active-filter="completed"] button[data-order-filter="completed"],
  #orders .order-status-board-v3430[data-active-filter="failed"] button[data-order-filter="failed"]{box-shadow:inset 0 0 0 1.5px currentColor,0 4px 12px rgba(22,91,154,.05)!important;transform:none!important}

  #orders .order-command-filters-v3430{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr)) 44px!important;gap:5px!important;min-width:0}
  .staff-mode #orders .order-command-filters-v3430{grid-template-columns:repeat(2,minmax(0,1fr)) 44px!important}
  #orders .order-command-filters-v3430>label{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;min-width:0;min-height:40px;padding:0 6px;border:1px solid #dbe7f1;border-radius:10px;background:#fff;color:#355872}
  #orders .order-command-filters-v3430>label>span{display:grid;place-items:center;font-size:11px;color:#0878ef}
  #orders .order-command-filters-v3430 select,#orders .order-command-filters-v3430 input{min-width:0;width:100%;height:36px;padding:0;border:0;background:transparent;color:#173a58;font:inherit;font-size:9px;font-weight:800;outline:none;text-overflow:ellipsis}
  #orders .order-command-date-v3430{grid-template-columns:18px minmax(0,1fr)!important;padding:0 4px!important;overflow:hidden}
  #orders .order-command-date-v3430 input{color:transparent!important;font-size:0!important;position:relative}
  #orders .order-command-date-v3430 input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
  #orders #order-driver-filter-wrap.is-hidden{display:none!important}

  #orders .order-command-search-v3430{display:grid!important;grid-template-columns:28px minmax(0,1fr) 30px!important;align-items:center!important;min-height:45px;padding:0 6px;border:1px solid #dbe7f1;border-radius:11px;background:#fff;box-shadow:0 2px 7px rgba(25,62,99,.025)}
  #orders .order-command-search-v3430>span{display:grid;place-items:center;color:#173a58;font-size:18px}
  #orders .order-command-search-v3430>input{width:100%;min-width:0;height:42px;border:0;background:transparent;color:#173a58;font:inherit;font-size:11px;outline:none}
  #orders .order-command-search-v3430>input::placeholder{color:#8ba0b3}
  #orders .order-command-search-v3430>button{display:grid;width:28px;height:28px;place-items:center;border:0;border-radius:8px;background:#f3f7fa;color:#71869a;font-size:16px}

  #orders .aquaflow-order-list{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  #orders .order-command-card-v3430{gap:7px;padding:9px!important;border-radius:13px!important}
  #orders .order-command-head-v3430{grid-template-columns:30px auto auto minmax(0,1fr) 28px;gap:5px}
  #orders .order-command-seq-v3430{width:29px;height:25px;border-radius:8px;font-size:9px}
  #orders .order-command-head-v3430>strong{font-size:10px}
  #orders .order-command-status-v3430{min-height:23px;padding:3px 8px;font-size:8.5px}
  #orders .order-command-time-v3430{min-height:23px;padding:3px 7px;font-size:8px}
  #orders .order-command-body-v3430{grid-template-columns:minmax(0,1.5fr) minmax(112px,.75fr);gap:7px}
  #orders .order-command-customer-name-v3430{gap:7px}
  #orders .order-command-customer-name-v3430>strong{font-size:14px}
  #orders .order-command-customer-name-v3430>span{font-size:8.5px}
  #orders .order-command-customer-v3430>p{font-size:8.5px}
  #orders .order-command-products-v3430{gap:9px;font-size:8.5px}
  #orders .order-command-finance-v3430{gap:3px;padding-left:7px}
  #orders .order-command-finance-v3430>strong{font-size:14px}
  #orders .order-command-finance-v3430>span,#orders .order-command-finance-v3430>b{font-size:8.5px}
  #orders .order-command-finance-v3430>small{font-size:7px!important;padding:2px 6px}
  #orders .order-command-actions-v3430{gap:5px}
  #orders .order-command-actions-v3430 .mini-btn{min-height:37px!important;padding:0 4px!important;border-radius:8px!important;font-size:8.5px!important}
}

@media(max-width:390px){
  #orders .order-status-board-v3430 button,
  .staff-mode #orders .order-status-board-v3430 button,
  .admin-mode #orders .order-status-board-v3430 button{min-height:88px!important;padding:6px 2px!important}
  #orders .order-status-board-v3430 button>span{font-size:9px!important}
  #orders .order-status-board-v3430 button>b{font-size:16px!important}
  #orders .order-status-board-v3430 button>small{font-size:6.4px!important}
  #orders .order-command-actions-v3430{grid-template-columns:repeat(2,minmax(0,1fr))}
  #orders .order-command-body-v3430{grid-template-columns:minmax(0,1fr) 105px}
  #orders .order-command-customer-name-v3430>span{display:none}
}
#orders .order-command-actions-v3430.count-1{grid-template-columns:1fr}
#orders .order-command-actions-v3430.count-2{grid-template-columns:repeat(2,minmax(0,1fr))}
#orders .order-command-actions-v3430.count-3{grid-template-columns:repeat(3,minmax(0,1fr))}
#orders .order-command-actions-v3430.count-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:390px){
  #orders .order-command-actions-v3430.count-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  #orders .order-command-actions-v3430.count-4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
