/* ✅ إعدادات أساسية */
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: #24996e;
  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: #24996e;
  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: #24996e !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: #24996e !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: #24996e !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 #24996e;
      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:#24996e;
  --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:20%; }
.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; }
}
/* =========================
   Bottom Mobile Nav — Light
   ========================= */

.mbottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1040;
  border-top: 1px solid rgba(0,0,0,.08);
  padding: max(8px, env(safe-area-inset-bottom));
  display: none;
  background: #fff;
  box-shadow: 0 -6px 20px rgba(0,0,0,.06);
}

@media (max-width: 767.98px) {
  .mbottom-nav { display: block; }
  body { padding-bottom: 76px; }
}

.mbottom-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  justify-items: center;
}

/* عناصر القائمة */
.mb-item {
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #2b2f33;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.mb-item i {
  font-size: 22px;
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
}

/* ألوان الأيقونات */
.mb-topup  i { color: #0d6efd; }  /* أزرق */
.mb-wallet i { color: #00bcd4; }  /* فيروزي */
.mb-orders i { color: #e53935; }  /* أحمر */
.mb-notifs i { color: #ff9800; }  /* برتقالي */

/* الشارة */
.mbottom-nav .mb-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: 14px;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff;
}

/* تأثير الهالة عند الضغط أو التفعيل */
.mb-item:active i,
.mb-item.is-active i {
  transform: scale(1.2);
  opacity: 1;
}

.mb-item:active i::after,
.mb-item.is-active i::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.25;
  filter: blur(8px);
  z-index: 0;
}

/* زر الرئيسية */
.mb-home { position: relative; }
.mb-fab {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  transform: translateY(-18px);
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: all 0.25s ease;
}
.mb-fab i {
  font-size: 24px;
  color: #24996e;
  z-index: 1;
}
.mb-fab:active,
.mb-fab.is-active {
  transform: translateY(-18px) scale(1.1);
  box-shadow: 0 0 25px rgba(0, 86, 133, 0.45);
}
.mb-fab:active::after,
.mb-fab.is-active::after {
  content: "";
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #24996e;
  opacity: 0.2;
  filter: blur(8px);
  z-index: 0;
}
/* وميض للصورة مع alternate ليطلع ويرجع بدون ما يطفى فجأة */
#loader-overlay .loader-logo {
  display: block;
  animation-name: loaderBlink;
  animation-duration: 1.2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  will-change: opacity, filter;
}

/* لو في ستايل عم يلغيه، فكّه بهالسطر */
#loader-overlay .loader-logo {
  -webkit-animation: loaderBlink 1.2s ease-in-out infinite alternate !important;
          animation: loaderBlink 1.2s ease-in-out infinite alternate !important;
}

@-webkit-keyframes loaderBlink {
  from { opacity: .35; filter: drop-shadow(0 0 0 rgba(0,86,133,0)); }
  to   { opacity: 1;   filter: drop-shadow(0 0 16px rgba(0,86,133,.45)); }
}
@keyframes loaderBlink {
  from { opacity: .35; filter: drop-shadow(0 0 0 rgba(0,86,133,0)); }
  to   { opacity: 1;   filter: drop-shadow(0 0 16px rgba(0,86,133,.45)); }
}
/* =======================[ Wallet Dashboard — LIGHT THEME ]======================= */

/* ===== ألوان أساسية وتوكِنز ===== */
:root {
  --primary: #0c305b;
  --accent: #28cb69;
  --error: #ef4444;
  --shadow: 0 3px 10px rgba(0,0,0,.1);
  --shadow-sm: 0 2px 6px rgba(0,0,0,.08);
  --radius: 14px;
}

/* ===== البطاقات الإحصائية ===== */
.stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
 word-break: break-word;
}
.stat {
    color:#fff;
  flex: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 150px;
  text-align: center;
  transition: transform .15s ease;
}

.stat.success.light { background: #4caf50; }
.stat.error { background: #dc3545; }
.stat.purple { background: #9c27b0;}
.stat.debt { background: #2196f3;}

.stat h4 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}
.stat h6 {
  margin: 6px 0 0;
  font-weight: 600;
  font-size: 0.85rem;
}
.sup {
  font-size: 0.8rem;
  vertical-align: super;
  margin-right: 3px;
}

/* ===== شريط الأدوات (التاريخ والبحث) ===== */
form.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.toolbar .input input[type="date"] {
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 0.9rem;
}


/* ===== الشرائح (Chips) ===== */
#walletChips {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
#walletChips .chip {
  background: var(--chip-bg);
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}
#walletChips .chip:hover { background: #f9fafb; }
#walletChips .chip.active {
  background: var(--chip-active, #eef2ff);
  border-color: var(--chip-active-border, #c7d2fe);
}
#walletChips .chip small {
  background: #e5e7eb;
  border-radius: 999px;
  padding: 2px 6px;
  margin-right: 6px;
  font-size: 0.75rem;
}
#walletChips .chip small.ok { background: #d1fae5; color: #047857; }
#walletChips .chip small.bad { background: #fee2e2; color: #b91c1c; }

/* ===== شارة الإجمالي ===== */
.sum-wrap { text-align: center; margin-bottom: 8px; }
.sum-chip {
  display: inline-block;
  background: #fff3cd;
  color: #9a6700;
  border: 1px solid #ffe69c;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}

/* ===== قائمة العمليات ===== */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list .item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #eee;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px;
  transition: all .15s ease;
}
.list .item:hover {
  border-color: var(--chip-active-border,#c7d2fe);
}
.item .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item .icon.in  { background: #eafff6; color: var(--accent,#28cb69); }
.item .icon.out { background: #ffefef; color: var(--error,#ef4444); }
.item .content {
  flex: 1;
  margin: 0 10px;
}
.item .content h5 {
  margin: 0;
  font-size: 1rem;
}
.item .content small { color: #666; font-size: 0.8rem; }
.item .amount h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.item .amount h4.pos { color: var(--accent,#28cb69); }
.item .amount h4.neg { color: var(--error,#ef4444); }

/* ===== Mobile-friendly scaling for the wallet list (LARGER VERSION) ===== */
@media (max-width: 600px){

  /* الخط العام أكبر شوي */
  html, body { font-size: clamp(15px, 4.5vw, 18px); }

}

