/* === Orders slide-over (بحال السلة) === */
.orders-overlay{
  position:fixed; inset:0; display:none; background:rgba(0,0,0,.35);
  z-index:1055;
}
.orders-overlay.show{ display:block; }
.orders-panel{
  position:absolute; top:0; right:0; height:100%;
  width:min(420px, 92%); background:#fff; box-shadow:-6px 0 18px rgba(0,0,0,.12);
  transform:translateX(100%); transition:transform .28s ease;
  display:flex; flex-direction:column;
}
.orders-overlay.show .orders-panel{ transform:translateX(0); }
.orders-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-bottom:1px solid #eee; background:#fafafa;
}
.orders-content{ padding:12px; overflow:auto; height:100%; }
.orders-loading{ padding:20px; text-align:center; color:#777; }

/* عناصر اللائحة */
.order-item{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; border:1px solid #eee; border-radius:10px; margin-bottom:10px;
}
.order-left{ display:flex; flex-direction:column; gap:4px; }
.order-id{ font-weight:600; }
.order-meta{ font-size:.9rem; color:#666; }
.order-money{ font-weight:700; }

/* Overlay عام */
.orders-overlay{
  position:fixed; inset:0; display:none; background:rgba(0,0,0,.35); z-index:1055;
}
.orders-overlay.show{ display:block; }

/* الافتراضي: سايدبار من اليمين (ديسكتوب) */
.orders-panel{
  position:absolute; top:0; right:0; height:100%;
  width:min(420px, 92%); background:#fff;
  box-shadow:-6px 0 18px rgba(0,0,0,.12);
  transform:translateX(100%); transition:transform .28s ease;
  display:flex; flex-direction:column;
}
.orders-overlay.show .orders-panel{ transform:translateX(0); }

.orders-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:8px; padding:10px 12px; border-bottom:1px solid #eee; background:#fff;
}
.orders-close{
  border:0; background:#fff; width:36px; height:36px; border-radius:50%;
  font-size:22px; line-height:36px; cursor:pointer;
}
.orders-content{ padding:12px; overflow:auto; height:100%; -webkit-overflow-scrolling:touch; }

/* المسكة (اختياري) */
.sheet-grabber{ width:42px; height:4px; border-radius:9999px; background:#ddd; margin:4px auto; }

/* =========================
   موبايل: Bottom-Sheet
   ========================= */
@media (max-width: 768px){
  .orders-panel{
    position:fixed; left:0; right:0; bottom:0; top:auto;
    width:100%; height:min(95vh, 100%);
    border-top-left-radius:16px; border-top-right-radius:16px;
    box-shadow:0 -10px 30px rgba(0,0,0,.18);
    transform:translateY(110%); /* البداية لتحت */
  }
  .orders-overlay.show .orders-panel{ transform:translateY(0); }
  .orders-header{
    position:sticky; top:0; z-index:2;
    border-top-left-radius:16px; border-top-right-radius:16px;
  }
  .orders-content{
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
  }
}

.order-item{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid #eee; border-radius:10px; margin-bottom:8px; cursor:pointer; }
.order-right{ display:flex; align-items:center; gap:8px; }
.order-item .chev{ display:inline-block; transition:transform .2s ease; font-weight:bold; color: #00A86B;}
.order-card.open .order-item .chev{ transform: rotate(90deg); }

.order-details{ border:1px dashed #e9e9e9; border-radius:10px; padding:8px 10px; margin: -4px 0 12px 0; background:#fff; }
.od-list{ list-style:none; padding:0; margin:0; }
.od-line{ display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #f4f4f4; }
.od-line:last-child{ border-bottom:0; }
.od-line img{ width:48px; height:48px; object-fit:contain; background:#fafafa; border:1px solid #eee; border-radius:8px; }
.od-meta{ flex:1; min-width:0; }
.od-name{ font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.od-qty{ color:#666; font-size:.9rem; }
.od-total{ font-weight:500; white-space:nowrap;color: #666;}
.od-summary{ display:flex; align-items:center; justify-content:space-between; padding-top:8px; font-size:1rem; }
/* نقطة الحالة */
.order-meta{ display:flex; align-items:center; gap:8px; }
.status-dot{
  display:inline-block; width:10px; height:10px; border-radius:50%;
  border:2px solid #fff; box-shadow:0 0 0 1px rgba(0,0,0,.15); vertical-align:middle;
}
.status-dot.s-orange{ background:#ff9800; } /* جديد/قيد الإنجاز */
.status-dot.s-green { background:#2e7d32; } /* مكتمل */
.status-dot.s-red   { background:#e53935; } /* ملغي */
.status-dot.s-gray  { background:#9e9e9e; } /* افتراضي/غير معروف */
