.order-coupon-box{
    border:1px dashed rgba(25,135,84,.35);
    background:#f5fbf7;
    border-radius:12px;
    padding:.75rem .9rem;
}
.order-coupon-box .coupon-title{font-weight:600;color:#146c43;}
.order-coupon-box .coupon-meta{font-size:.875rem;color:#5c636a;}
.order-coupon-box .coupon-discount{font-weight:700;color:#198754;}


.order-create-header{align-items:center;}
.order-create-header .page-title{font-size:1.1rem;}

.order-list-mobile-cards{display:grid;gap:12px;}
.order-list-card{background:#fff;border:1px solid #e5e7eb;border-left:4px solid var(--brand);border-radius:18px;box-shadow:0 2px 8px rgba(15,23,42,.04);overflow:visible;position:relative;}
.order-list-card-link{display:block;padding:14px 14px 12px;text-decoration:none;color:inherit;border-radius:18px;background:#fff;}
.order-list-card-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;padding:0 14px 14px;}
.order-list-card-actions form{margin:0;}
.order-list-card-body-click{cursor:pointer;}
.order-list-mobile-menu .dropdown-menu{min-width:170px;border-radius:14px;padding:6px;z-index:1225;box-shadow:0 18px 40px rgba(15,23,42,.14);}
.order-list-mobile-menu .dropdown-item{border-radius:10px;font-weight:600;padding:.55rem .75rem;}
.order-list-mobile-menu form{margin:0;}
.order-list-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.order-list-row + .order-list-row{margin-top:8px;}
.order-list-row-top{margin-bottom:6px;}
.order-list-no{font-size:.98rem;font-weight:800;color:var(--brand-dark);letter-spacing:.01em;}
.order-list-datetime{font-size:.78rem;color:#64748b;white-space:nowrap;padding-top:2px;}
.order-list-customer{font-size:1rem;font-weight:700;line-height:1.35;color:#0f172a;margin-bottom:6px;}
.order-list-location{font-size:.86rem;color:#64748b;line-height:1.35;min-width:0;}
.order-list-ordered-by{font-size:.84rem;color:#475569;margin-top:8px;}
.order-list-row-bottom{margin-top:10px;align-items:center;}
.order-list-amount{font-size:1rem;font-weight:800;color:#111827;}
.order-list-action-dot{width:34px;height:34px;border-radius:999px;border:1px solid color-mix(in srgb, var(--brand) 18%, #d1d5db);display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb, var(--brand) 7%, #fff);color:var(--brand-dark);}
.order-status-pill{display:inline-flex;align-items:center;justify-content:center;padding:.36rem .72rem;border-radius:999px;font-size:.74rem;font-weight:700;line-height:1;white-space:nowrap;border:1px solid transparent;}
.order-status-draft{background:#f8fafc;border-color:#cbd5e1;color:#475569;}
.order-status-confirmed{background:color-mix(in srgb, var(--brand) 14%, #fff);border-color:color-mix(in srgb, var(--brand) 30%, #d1d5db);color:var(--brand-dark);}
.order-status-partially-reserved{background:#fff7ed;border-color:#fdba74;color:#c2410c;}
.order-status-reserved{background:#ecfeff;border-color:#67e8f9;color:#0f766e;}
.order-status-allocated{background:#f5f3ff;border-color:#c4b5fd;color:#6d28d9;}
.order-status-partially-dispatched{background:#fff7ed;border-color:#fdba74;color:#c2410c;}
.order-status-dispatched{background:#ecfdf5;border-color:#86efac;color:#15803d;}
.order-status-closed{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8;}
.order-status-dispatch-draft{background:#fffbeb;border-color:#fcd34d;color:#b45309;}
.order-status-dispatch-posted{background:#ecfdf5;border-color:#86efac;color:#15803d;}
.order-status-invoiced{background:#dcfce7;border-color:#4ade80;color:#166534;}
.order-status-cancelled{background:#fef2f2;border-color:#fca5a5;color:#dc2626;}
.order-list-card.order-status-draft{border-left-color:#94a3b8;}
.order-list-card.order-status-confirmed{border-left-color:var(--brand);}
.order-list-card.order-status-partially-reserved{border-left-color:#f97316;}
.order-list-card.order-status-reserved{border-left-color:#0ea5e9;}
.order-list-card.order-status-allocated{border-left-color:#7c3aed;}
.order-list-card.order-status-partially-dispatched{border-left-color:#f97316;}
.order-list-card.order-status-dispatched{border-left-color:#16a34a;}
.order-list-card.order-status-closed{border-left-color:#2563eb;}
.order-list-card.order-status-dispatch-draft{border-left-color:#d97706;}
.order-list-card.order-status-dispatch-posted{border-left-color:#16a34a;}
.order-list-card.order-status-invoiced{border-left-color:#15803d;}
.order-list-card.order-status-cancelled{border-left-color:#dc2626;}

@media (max-width: 767.98px){
  .order-create-header{margin-bottom:10px;}
}


.dispatch-line-card{border:1px solid #e5e7eb;border-radius:18px;padding:14px;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.04);}
.dispatch-line-title{font-size:.98rem;font-weight:700;color:#0f172a;}
.dispatch-line-meta{font-size:.82rem;color:#64748b;line-height:1.45;}
.dispatch-balance-actions .form-check{padding:.55rem .85rem;border:1px solid #e5e7eb;border-radius:14px;background:#fff;}
.dispatch-balance-actions .form-check-input:checked{background-color:var(--brand);border-color:var(--brand);}
.dispatch-summary-chip{display:inline-flex;align-items:center;padding:.35rem .7rem;border-radius:999px;background:color-mix(in srgb, var(--brand) 8%, #fff);border:1px solid color-mix(in srgb, var(--brand) 18%, #d1d5db);font-size:.78rem;color:var(--brand-dark);font-weight:600;}
.print-sheet{max-width:1020px;margin:0 auto;background:#fff;}
@media print{
  .app-navbar,.sidebar-shell,.page-header .btn,.btn,.fab-add,.desktop-footer-nav,.global-loader,.toast-container{display:none !important;}
  body{background:#fff;}
  .app-main{padding:0 !important;}
  .page-card,.dispatch-line-card{box-shadow:none !important;border-color:#d1d5db !important;}
}


.order-list-desktop-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap;}
.order-list-desktop-actions .dropdown-menu{min-width:190px;border-radius:14px;padding:6px;box-shadow:0 18px 40px rgba(15,23,42,.14);}
.order-list-desktop-actions .dropdown-item{border-radius:10px;font-weight:600;padding:.55rem .75rem;}
.order-list-desktop-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;padding:0;}
.order-list-desktop-menu .order-list-action-dot{padding:0;width:34px;height:34px;background:#fff;}

.portal-order-list-grid{display:grid;gap:14px;grid-template-columns:1fr;}
.portal-order-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 2px 10px rgba(15,23,42,.05);padding:14px 14px 12px;cursor:pointer;}
.portal-order-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;}
.portal-order-no{font-size:1rem;font-weight:800;color:#0f172a;line-height:1.2;}
.portal-order-date{font-size:.8rem;color:#64748b;margin-top:3px;}
.portal-order-customer{margin-top:10px;font-size:.94rem;font-weight:700;color:#0f172a;line-height:1.35;}
.portal-order-metrics{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:12px;font-size:.84rem;color:#475569;}
.portal-order-summary-line{margin-top:10px;font-size:.88rem;color:#1f2937;line-height:1.4;}
.portal-order-actions{margin-top:12px;display:flex;justify-content:flex-end;}
.portal-material-badge{display:inline-flex;align-items:center;justify-content:center;padding:.42rem .8rem;border-radius:999px;font-size:.74rem;font-weight:700;line-height:1;white-space:nowrap;border:1px solid transparent;}
.portal-material-badge.status-available{background:#ecfdf5;border-color:#86efac;color:#15803d;}
.portal-material-badge.status-partial{background:#fff7ed;border-color:#fdba74;color:#c2410c;}
.portal-material-badge.status-backorder{background:#fef2f2;border-color:#fca5a5;color:#dc2626;}
.portal-material-badge.status-eta{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8;}
.portal-material-badge.status-ready{background:#ecfeff;border-color:#67e8f9;color:#0f766e;}
.portal-material-badge.status-dispatched{background:#f0fdf4;border-color:#86efac;color:#166534;}
.portal-order-overview-card{border-radius:20px;}
.portal-overview-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}
.portal-overview-customer{font-size:1rem;font-weight:700;color:#0f172a;line-height:1.35;}
.portal-overview-summary{margin-top:4px;font-size:.88rem;color:#475569;line-height:1.45;}
.portal-overview-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.portal-metric-chip{border:1px solid #e5e7eb;border-radius:14px;padding:.75rem .8rem;background:#fff;display:flex;flex-direction:column;gap:4px;}
.portal-metric-chip span{font-size:.74rem;color:#64748b;}
.portal-metric-chip strong{font-size:.9rem;color:#0f172a;line-height:1.3;}
.portal-order-items{display:grid;gap:12px;}
.portal-order-item-card{border-radius:18px;}
.portal-item-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}
.portal-item-main{min-width:0;}
.portal-item-title{font-size:.98rem;font-weight:700;color:#0f172a;line-height:1.35;}
.portal-item-meta{margin-top:4px;font-size:.8rem;color:#64748b;line-height:1.35;}
.portal-item-quick-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px;}
.portal-item-quick-row div{display:flex;flex-direction:column;gap:4px;}
.portal-item-quick-row span{font-size:.74rem;color:#64748b;}
.portal-item-quick-row strong{font-size:.92rem;color:#111827;line-height:1.35;}
.portal-item-toggle{font-size:.82rem;font-weight:600;text-decoration:none;margin-top:10px;}
.portal-item-toggle:hover,.portal-item-toggle:focus{text-decoration:none;}
.portal-item-detail-list{display:grid;gap:8px;}
.portal-item-detail{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:.6rem .75rem;border:1px solid #eef2f7;border-radius:12px;background:#f8fafc;font-size:.84rem;}
.portal-item-detail span{color:#64748b;}
.portal-item-detail strong{color:#111827;}
.portal-item-note{font-size:.82rem;line-height:1.45;color:#475569;padding:.1rem .1rem 0;}

@media (min-width: 992px){
  .portal-order-list-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 767.98px){
  .portal-order-card{padding:13px 13px 12px;}
  .portal-order-card-top{align-items:flex-start;}
  .portal-order-no{font-size:.96rem;}
  .portal-overview-top{flex-direction:column;}
  .portal-overview-metrics{grid-template-columns:1fr;}
  .portal-item-head{flex-direction:column;}
  .portal-item-quick-row{grid-template-columns:1fr 1fr;}
}
