/* ✅ إعدادات أساسية */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: #edf3f8;
  font-family: 'Tajawal', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
html {
  overflow-y: scroll;
    overflow-x: hidden; /* يمنع السكرول العرضي */

}

html::-webkit-scrollbar {
  width: 3px;
}

html::-webkit-scrollbar-thumb {
  background-color: #ff5757;
  border-radius: 3px;
}

/* ✅ السايدبار */
#sidebar {
  width: 280px;
  min-height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1040;
  transition: all 0.3s ease;
}

/* ✅ المحتوى */
#mainContent {
  transition: all 0.3s ease;
  margin-top: 64px;
  margin-right: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ✅ إخفاء السايدبار على الشاشات العريضة */
.sidebar-hidden #sidebar {
  display: none;
}
.sidebar-hidden #mainContent {
  margin-right: 0 !important;
  width: 100% !important;
}

/* ✅ مربع البحث */
.search-wrapper {
  width: 100%;
  max-width: 100%;
  background: #e3ebf2;
  border-radius: 40px;
  padding: 0.6rem 1.2rem;
  margin-bottom: 30px;
}
.search-wrapper input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  text-align: right;
  font-size: 15px;
  color: #333;
}



/* ✅ تنسيق البطاقة */
.category-box a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.3s ease;
  height: 100%;
  background: transparent !important;
  box-shadow: none !important;
}
.category-box a.card:hover {
  transform: scale(1.02);
}

.category-box .card-img-top {
  width: 100%;
  aspect-ratio: 1 / 1; /* ✅ يجعل الصورة مربعة دائمًا */
  object-fit: cover;
  display: block;
  border-radius: 0.5rem 0.5rem 0 0;
}


.category-box .card-body {
  padding: 10px 5px 5px 5px;
  margin: 0;
  text-align: center;
  background: transparent !important;
}

.category-box .card-title {
  color: #ff5757;
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0;
  text-shadow: none;
  background: transparent !important;
}

.category-box {
  height: auto;
}
/* ✅ الموبايل */
@media (max-width: 768px) {
  #sidebar {
    right: -280px;
  }

  .sidebar-visible #sidebar {
    right: 0;
  }

  #mainContent {
    margin-right: 0 !important;
  }

  /* الهيدر */
  .bg-dark {
    right: 0 !important;
  }
}


/* ✅ الهيدر */
.bg-dark {
  background-color: #ff5757 !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  place-content: center;
  position: fixed;
  top: 0;
  right: 280px;
  left: 0;
  z-index: 1030;
  transition: all 0.3s ease;
}

.sidebar-hidden .bg-dark {
  right: 0;
}

.bg-darks {
  background-color: #082c49 !important;
}
.bg-warning {
  background-color: #ffa900 !important;
}
 .logo-link {
    display: inline-block;
  }


  .logo-link:hover {
    transform: scale(1.02);
  }
/* ✅ محتوى الصفحة */
#mainContent {
  transition: all 0.3s ease;
  margin-top: 64px;
  margin-right: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sidebar-hidden #mainContent {
  margin-right: 0 !important;
  width: 100% !important;
}

.card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.card:hover {
  transform: scale(1.02);
}

img {
  max-width: 100%;
  height: auto;
}

/* ✅ الأزرار */
.btn-light {
  color: #004c45;
  font-weight: bold;
}

.btn-success {
  background-color: #ff5757 !important;
  border-color: #fff !important;
  color: white !important;
  font-weight: bold;
}

.btn-success:hover {
  background-color: #fff !important;
  border-color: #092643 !important;
  color: black !important;
}

.btn-success:focus,
.btn-success:active,
.btn-success:focus:active {
  background-color: #ff5757 !important;
  color: white !important;
  border-color: #fff !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ✅ التنقل */
#sidebar .nav-link {
  text-align: right;
  direction: rtl;
  color: #082c49;
}
#sidebar .nav-link:hover {
  background-color: #f0f0f0;
  border-radius: 6px;
}
.nav-link.active {
  background-color: #f1f1f1;
  border-radius: 10px;
}

.logout-hover:hover {
  background-color: #f8d7da !important;
  transition: background-color 0.2s;
}

hr {
  border-color: #e0e0e0;
  opacity: 0.75;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #333;
  transition: background-color 0.3s, transform 0.2s;
  text-decoration: none;
  background-color: transparent;
}
.icon-btn:hover {
  background-color: rgba(0,0,0,0.1);
  transform: scale(1.1);
}
.icon-btn.text-danger {
  color: #ff4757;
}

.logout-hover:hover {
  background-color: #ffe6e6 !important;
}

/* ✅ الموبايل */
@media (max-width: 768px) {
  #sidebar {
    right: -280px;
    left: auto;
    top: 0;
    position: fixed;
    z-index: 1050;
    height: 100%;
  }
  .sidebar-visible #sidebar {
    right: 0;
  }
  .bg-dark {
    right: 0;
  }
  #mainContent {
    margin-right: 0 !important;
  }
}

/* ✅ الفوتر دائمًا أسفل الصفحة */
footer .footer-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex-direction: row;
}

@media (max-width: 576px) {
  footer .footer-flex {
    flex-wrap: wrap;
    text-align: center;
    gap: 2px;
  }
}


/* ✅ اللودر */
    #loader-overlay {
      position: fixed;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.58);
      top: 0;
      left: 0;
      z-index: 9999;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .loader-wrapper {
      position: relative;
      width: 100px;
      height: 100px;
    }

    .loader-logo {
      width: 60px;
      height: 60px;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      border-radius: 50%;
    }

    .spinner-ring {
      width: 100px;
      height: 100px;
      border: 6px solid #ff5757;
      border-top-color: transparent;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      box-sizing: border-box;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }
#sidebar {
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;           /* فايرفوكس */
  -ms-overflow-style: none;        /* إنترنت إكسبلورر/إيدج القديم */
}

#sidebar::-webkit-scrollbar {
  display: none;                   /* كروم، سفاري، أوبرا */
}
body.sidebar-visible {
  overflow: hidden; /* يمنع تمرير الصفحة */
}

body.sidebar-visible #sidebar {
  overflow-y: auto; /* يسمح بتمرير داخل السايدبار فقط */
  -webkit-overflow-scrolling: touch; /* تحسين السلاسة على iOS */
}


/*
  Orders UI — Cleaned & Organized CSS
  — تم تنظيم الكود، إزالة التكرارات، توحيد الألوان بمتغيرات، وترتيب الميديا كويريز
*/

/* =========================
   0) Variables & Resets
========================= */
:root{
  --bg:#ffffff;
  --border:#e5e7eb;
  --muted:#64748b;
  --text:#0f172a;
  --label-bg:#f7f8fa;
  --chip-bg:#f1f5f9;
  --chip-active:#eef2ff;
  --chip-active-border:#c7d2fe;
  --shadow:0 2px 8px rgba(15,23,42,.06);
  --primary:#ff5757;
  --success:#16a34a;
  --warning:#f59e0b;
  --error:#ef4444;
}

/* =========================
   1) Toolbar & Fields
========================= */
.toolbar-row{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:12px; }
.toolbar-group{ display:flex; align-items:center; gap:10px; width:100%; }
.flex-spacer{ flex:1; }
#searchRow .vfield{ flex:1 1 auto; }

.vfield{ position:relative; background:var(--bg); border:1px solid var(--border); border-radius:12px; padding:6px 10px; min-width:180px; }
.vfield label{ position:absolute; top:-10px; right:10px; background:var(--label-bg); padding:0 6px; font-size:12px; color:var(--muted); }
.vfield input{ width:100%; background:transparent; border:0; outline:0; color:var(--text); }

/* From/To dates (desktop grid) */
#datesRow{ width:100%; }
#datesRow .vfield{ max-width:none !important; width:100%; flex:1 1 auto; }
#datesRow .vfield input{ height:40px; line-height:40px; }

/* =========================
   2) Chips
========================= */
.chips{ display:flex; overflow:auto; gap:8px; padding:8px 0; }
.chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; background:var(--chip-bg); border:1px solid var(--border); color:var(--text); cursor:pointer; white-space:nowrap; transition:.15s; }
.chip small.badge{ background:transparent; border:1px dashed var(--border); border-radius:999px; padding:0 6px; font-size:11px; color:var(--muted); }
.chip.active{ background:var(--chip-active); border-color:var(--chip-active-border); }
.chip.success svg{ color:var(--success); }
.chip.warning svg{ color:var(--warning); }
.chip.error svg{ color:var(--error); }

/* =========================
   3) Buttons
========================= */
.btn-plain{ background:var(--bg); border:1px solid var(--chip-active-border); color:#1e293b; border-radius:12px; padding:8px 12px; cursor:pointer; }
.btn-icon{ background:var(--bg); border:1px solid var(--chip-active-border); color:#1e293b; border-radius:999px; width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; }

/* Mini FAB-like button */
.v-btn-like-fab{ display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:50%; background:var(--primary); color:#fff; border:0; cursor:pointer; box-shadow:0 3px 10px rgba(15,23,42,.15); transition: transform .12s ease, box-shadow .12s ease; }
.v-btn-like-fab .v-icon__svg{ width:20px; height:20px; fill:#fff; }

/* =========================
   4) Order item (list row)
========================= */
.order-item{ display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--bg); border:1px solid var(--border); border-radius:14px; padding:10px 12px; transition:.12s; text-decoration:none; color:inherit; box-shadow:var(--shadow); }
.order-item:hover{ border-color:var(--chip-active-border); transform:translateY(-1px); }
.order-left h6{ margin:0 0 2px 0; font-weight:800; color:var(--text); }
.order-left .subtitle{ color:var(--muted); font-size:12px; }
.order-center{ display:flex; gap:14px; align-items:center; }
.state-dot svg{ width:18px; height:18px; }
.state-dot.success svg{ color:var(--success); }
.state-dot.warning svg{ color:var(--warning); }
.state-dot.error svg{ color:var(--error); }
.order-center small{ color:var(--muted); display:block; }
.order-right h3{ margin:0; width:80px; text-align:center; color:var(--text); }
.order-right small{ color:var(--muted); display:block; }

/* =========================
   5) Status badges (details)
========================= */
.badge-state{ border-radius:999px; padding:6px 10px; font-weight:700; min-width:86px; text-align:center; }
.badge-state.pending{ background:#fff7ed; color:#c2410c; border:1px solid #fed7aa; }
.badge-state.processing{ background:#fffbeb; color:#a16207; border:1px solid #fde68a; }
.badge-state.completed{ background:#ecfdf5; color:var(--success); border:1px solid #bbf7d0; }
.badge-state.rejected{ background:#fef2f2; color:var(--error); border:1px solid #fecaca; }

/* =========================
   6) In-page views & details
========================= */
#ordersListView{ display:block; padding-top:2rem; }
#orderDetailsView{ display:none; }
.details-card{ background:var(--bg); border:1px solid var(--border); border-radius:16px; }
.details-head{ display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); padding:12px 14px; }
.details-body{ padding:14px; }
.row-field{ background:var(--bg); border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:10px; display:flex; justify-content:space-between; gap:10px; }
.row-field .label{ color:var(--muted); }
.copy-btn{ border:1px solid var(--border); background:var(--bg); color:var(--text); border-radius:8px; font-size:13px; padding:6px 10px; cursor:pointer; }
.pill{ display:inline-flex; align-items:center; gap:8px; background:#f8fafc; border:1px solid var(--border); border-radius:999px; padding:6px 10px; font-size:12px; color:var(--text); }

/* =========================
   7) Utilities
========================= */
.order-center .status-row{ justify-items:center; }
.c-player{ overflow-wrap:anywhere; }

/* =========================
   8) Media queries
========================= */
/* ≥992px (desktop) */
@media (min-width:992px){
  /* Dates grid */
  #datesRow{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .order-center .status-row{ min-width:220px; }
}

/* <992px (tablet & below) */
@media (max-width:991.98px){
  .order-center .status-row{ min-width:0 !important; }
}

/* ≤768px */
@media (max-width:768px){
  .order-right h3{ width:65px; }
}

/* ≤600px (mobile) */
@media (max-width:600px){
  /* Typography scale */
  .order-left h6{ font-size:clamp(12px, 3.5vw, 14px); }
  .order-left .subtitle,
  .order-right small,
  .status-row small{ font-size:clamp(10px, 3.2vw, 12px); }
  .order-center .state-dot svg{ width:14px; height:14px; }
  /* Layout tweaks */
  .c-player{ overflow-wrap:anywhere; }
  .order-center .status-row{ grid-template-rows:22px 18px 18px; min-width:0; }
}

/* ≤380px (extra small) */
@media (max-width:380px){
  body, .orders-shell{ font-size:12px; }
  .order-left h6{ font-size:13px; }
  .order-right .price-big{ font-size:13px; }
  .status-row small.ltr{ font-size:10px; }
  .v-btn-like-fab{ width:34px; height:34px; }
}
