/**
 * Reusable Components Design System (.card, .btn, .badge, .modal)
 * مجموعة الوكالة التجارية
 */

/* ==========================================================================
   1. Card Components (.card & modifiers)
   ========================================================================== */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--metallic-border, rgba(176, 190, 197, 0.4));
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary, #c8102e);
}

/* بطاقة الوكالة والخدمة داخل الشبكة (Agencies & Services Grid Cards) */
.card--agency,
.card--service {
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 2px;
  cursor: pointer;
  text-align: center;
  background-color: var(--color-surface, #ffffff);
  border: 1px solid var(--metallic-border, rgba(176, 190, 197, 0.45));
  border-radius: var(--radius-md, 8px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  box-sizing: border-box;
}

.card--agency:hover,
.card--service:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
  border-color: var(--color-primary, #c8102e);
}

.card--agency:active,
.card--service:active {
  transform: scale(0.97);
}

.card--agency img,
.card--service img {
  max-width: 95%;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
  display: block;
  margin: 0 auto;
}

.card--agency:hover img,
.card--service:hover img {
  transform: scale(1.04);
}

.card-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-main, #333333);
  line-height: 1.2;
  margin-top: 2px;
  display: block;
}

.card-icon {
  font-size: 1.15rem;
  color: var(--color-primary, #c8102e);
  margin-bottom: 1px;
  display: block;
}

/* ==========================================================================
   2. Button Components (.btn & modifiers)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.78rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
}

.btn:active {
  transform: scale(0.95);
}

/* ==========================================================================
   3D Metallic Gloss Buttons (الأزرار المعدنية المجسمة المعتمدة)
   ========================================================================== */
.btn-metallic {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f5f7fa 40%,
    #e2e8f0 85%,
    #cbd5e1 100%
  );
  border: 1px solid var(--brand-primary, #891811);
  border-radius: var(--radius-sm, 6px);
  box-shadow:
    inset 0 1px 1px #ffffff,
    inset 1px 0 1px rgba(255, 255, 255, 0.8),
    inset -1px -1px 2px rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.08);
  color: var(--metallic-dark, #1a1a1a) !important;
  padding: 3px 6px;
  font-size: 0.76rem;
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.btn-metallic:hover {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #ffffff 50%,
    #edf2f7 85%,
    #d5e0eb 100%
  );
  border-color: var(--brand-primary-light, #e30613);
  box-shadow:
    inset 0 1px 2px #ffffff,
    inset 1px 0 1px rgba(255, 255, 255, 0.9),
    inset -1px -1px 2px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(137, 24, 17, 0.15);
  transform: translateY(-1px);
  color: var(--metallic-dark, #1a1a1a) !important;
}
.btn-metallic:active {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 60%, #94a3b8 100%);
  border-color: var(--brand-primary, #891811);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.05);
  transform: scale(0.97);
}
.btn-metallic i {
  color: #dc2626;
}

/* 1. ALWakalah GROUP Brand Red Metallic (الأحمر الملكي المجسم */
.btn-metallic-red {
  background: linear-gradient(
    180deg,
    #ff3b47 0%,
    #e30613 38%,
    #a00000 80%,
    #70130e 100%
  );
  border: 1px solid #70130e;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 1px 0 1px rgba(255, 255, 255, 0.2),
    inset -1px -1px 2px rgba(0, 0, 0, 0.35),
    0 2px 5px rgba(137, 24, 17, 0.28);
}
.btn-metallic-red:hover {
  background: linear-gradient(
    180deg,
    #ff5c66 0%,
    #f50817 40%,
    #b80000 82%,
    #891811 100%
  );
  border-color: #550d0a;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset -1px -1px 2px rgba(0, 0, 0, 0.4),
    0 4px 10px rgba(227, 6, 19, 0.35);
  transform: translateY(-1px);
  color: #ffffff !important;
}
.btn-metallic-red:active {
  background: linear-gradient(180deg, #891811 0%, #70130e 60%, #4d0906 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transform: scale(0.97);
}

/* 2. ALWakalah GROUP Dark Titanium (الأسود الجرافيتي المعدني) */
.btn-metallic-dark {
  background: linear-gradient(
    180deg,
    #3a3d42 0%,
    #25282c 40%,
    #1a1a1a 85%,
    #0a0a0a 100%
  );
  border: 1px solid #000000;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset -1px -1px 2px rgba(0, 0, 0, 0.6),
    0 2px 5px rgba(0, 0, 0, 0.28);
}
.btn-metallic-dark:hover {
  background: linear-gradient(
    180deg,
    #4b4f55 0%,
    #303439 42%,
    #222222 85%,
    #121212 100%
  );
  border-color: #000000;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.45),
    inset -1px -1px 2px rgba(0, 0, 0, 0.6),
    0 4px 10px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
  color: #ffffff !important;
}
.btn-metallic-dark:active {
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 60%, #000000 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.7),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transform: scale(0.97);
}

/* 3. ALWakalah GROUP Pure Silver Chrome (الفضي الكرومي اللامع) */
.btn-metallic-silver {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f1f5f9 40%,
    #e2e8f0 85%,
    #cbd5e1 100%
  );
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.5));
  color: var(--metallic-dark, #1a1a1a) !important;
  box-shadow:
    inset 0 1px 1px #ffffff,
    inset -1px -1px 2px rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.06);
}
.btn-metallic-silver:hover {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #ffffff 50%,
    #edf2f7 85%,
    #d5e0eb 100%
  );
  border-color: #8c8c8c;
  box-shadow:
    inset 0 1px 2px #ffffff,
    0 3px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}
.btn-metallic-silver:active {
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: scale(0.97);
}

/* 4. ALWakalah GROUP Emerald Green Metallic (الأخضر الزمردي المجسم - للنجاح والاعتماد والتصدير) */
.btn-metallic-green {
  background: linear-gradient(
    180deg,
    #34d399 0%,
    #10b981 38%,
    #059669 82%,
    #047857 100%
  );
  border: 1px solid #065f46;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 1px 0 1px rgba(255, 255, 255, 0.2),
    inset -1px -1px 2px rgba(0, 0, 0, 0.28),
    0 2px 5px rgba(5, 150, 105, 0.25);
}
.btn-metallic-green:hover {
  background: linear-gradient(
    180deg,
    #4ade80 0%,
    #22c55e 40%,
    #16a34a 82%,
    #15803d 100%
  );
  border-color: #047857;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset -1px -1px 2px rgba(0, 0, 0, 0.3),
    0 4px 10px rgba(16, 185, 129, 0.32);
  transform: translateY(-1px);
  color: #ffffff !important;
}
.btn-metallic-green:active {
  background: linear-gradient(180deg, #059669 0%, #047857 60%, #064e3b 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transform: scale(0.97);
}

/* 5. ALWakalah GROUP Sapphire Blue Metallic (الأزرق الياقوتي المجسم - للبيانات والتجهيز والشحن) */
.btn-metallic-blue {
  background: linear-gradient(
    180deg,
    #38bdf8 0%,
    #0284c7 38%,
    #0369a1 82%,
    #075985 100%
  );
  border: 1px solid #0369a1;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 1px 0 1px rgba(255, 255, 255, 0.2),
    inset -1px -1px 2px rgba(0, 0, 0, 0.28),
    0 2px 5px rgba(2, 132, 199, 0.25);
}
.btn-metallic-blue:hover {
  background: linear-gradient(
    180deg,
    #60a5fa 0%,
    #2563eb 40%,
    #1d4ed8 82%,
    #1e40af 100%
  );
  border-color: #1e40af;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset -1px -1px 2px rgba(0, 0, 0, 0.3),
    0 4px 10px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
  color: #ffffff !important;
}
.btn-metallic-blue:active {
  background: linear-gradient(180deg, #0369a1 0%, #075985 60%, #0c4a6e 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transform: scale(0.97);
}

/* 6. ALWakalah GROUP Warm Gold / Amber Metallic (الذهبي الكهرماني المجسم - للانتظار والتنبيهات المميزة) */
.btn-metallic-gold {
  background: linear-gradient(
    180deg,
    #f6d75f 0%,
    #fbb336 38%,
    #ffbd71 82%,
    #f0c416 100%
  );
  border: 1px solid #92400e;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 1px 0 1px rgba(255, 255, 255, 0.3),
    inset -1px -1px 2px rgba(0, 0, 0, 0.28),
    0 2px 5px rgba(217, 119, 6, 0.25);
}
.btn-metallic-gold:hover {
  background: linear-gradient(
    180deg,
    #fef08a 0%,
    #fbbf24 40%,
    #ea580c 82%,
    #c2410c 100%
  );
  border-color: #78350f;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.7),
    inset -1px -1px 2px rgba(0, 0, 0, 0.3),
    0 4px 10px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
  color: #ffffff !important;
}
.btn-metallic-gold:active {
  background: linear-gradient(180deg, #d97706 0%, #b45309 60%, #78350f 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transform: scale(0.97);
}

/* 7. ALWakalah GROUP Royal Amethyst (البنفسجي الملكي المجسم) */
.btn-metallic-indigo {
  background: linear-gradient(
    180deg,
    #c799f9e5 0%,
    #871aed 38%,
    #7e22ce 82%,
    #c799f9e5 100%
  );
  border: 1px solid #581c87;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 1px 0 1px rgba(255, 255, 255, 0.2),
    inset -1px -1px 2px rgba(0, 0, 0, 0.28),
    0 2px 5px rgba(126, 34, 206, 0.25);
}
.btn-metallic-indigo:hover {
  background: linear-gradient(
    180deg,
    #e9d5ff 0%,
    #c084fc 40%,
    #9333ea 82%,
    #6b21a8 100%
  );
  border-color: #3b0764;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset -1px -1px 2px rgba(0, 0, 0, 0.3),
    0 4px 10px rgba(168, 85, 247, 0.32);
  transform: translateY(-1px);
  color: #ffffff !important;
}
.btn-metallic-indigo:active {
  background: linear-gradient(180deg, #7e22ce 0%, #581c87 60%, #3b0764 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transform: scale(0.97);
}

/* 8. ALWakalah GROUP Destructive Ruby Metallic (الأحمر القرمزي المجسم - للحذف والإلغاء الحرج) */
.btn-metallic-danger {
  background: linear-gradient(
    180deg,
    #fca5a5 0%,
    #ef4444 38%,
    #dc2626 82%,
    #991b1b 100%
  );
  border: 1px solid #7f1d1d;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 1px 0 1px rgba(255, 255, 255, 0.2),
    inset -1px -1px 2px rgba(0, 0, 0, 0.3),
    0 2px 5px rgba(220, 38, 38, 0.28);
}
.btn-metallic-danger:hover {
  background: linear-gradient(
    180deg,
    #fecaca 0%,
    #f87171 40%,
    #e11d48 82%,
    #be123c 100%
  );
  border-color: #881337;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset -1px -1px 2px rgba(0, 0, 0, 0.35),
    0 4px 10px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
  color: #ffffff !important;
}
.btn-metallic-danger:active {
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 60%, #450a0a 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transform: scale(0.97);
}

.btn-metallic-brand,
.btn-metallic-print {
  border-color: var(--brand-primary, #891811);
  color: var(--metallic-dark, #1a1a1a);
}
.btn-metallic-brand i,
.btn-metallic-print i {
  color: var(--brand-primary, #891811);
}
.btn-metallic-brand:hover,
.btn-metallic-print:hover {
  border-color: var(--brand-primary-light, #e30613);
  color: var(--metallic-dark, #1a1a1a);
  box-shadow:
    inset 0 1px 2px #ffffff,
    0 3px 8px rgba(227, 6, 19, 0.22);
}

/* أزرار الهيدر الدائرية */
.action-btn-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-surface, #ffffff);
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 4px 10px rgba(0, 0, 0, 0.04));
  transition: var(--transition);
  position: relative;
}

.action-btn-circle:hover {
  background-color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.15);
  transform: translateY(-1px);
}

.action-btn-circle:active {
  transform: scale(0.92);
}

/* ==========================================================================
   3. Badge Components (.badge & counters)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.badge-success {
  background: rgba(22, 163, 74, 0.12);
  color: var(--color-success);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}
.badge-danger {
  background: rgba(220, 38, 38, 0.12);
  color: var(--color-danger);
}

/* شارة الجرس والسلة في الهيدر */
.bell-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ff2a4b, #d90429);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  font-family: var(--font-main, "Cairo", sans-serif);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(217, 4, 41, 0.45);
  pointer-events: none;
  z-index: 5;
}

.cart-badge-count {
  position: absolute;
  top: 6px;
  right: 50%;
  transform: translateX(13px);
  background: linear-gradient(135deg, #ff2a4b, #d90429);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  font-family: var(--font-main, "Cairo", sans-serif);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  box-shadow:
    0 2px 6px rgba(217, 4, 41, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
  border: 1.5px solid #141518;
  z-index: 10;
  pointer-events: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* ==========================================================================
   4. Modals & Overlays (Notifications & Quick Menu)
   ========================================================================== */
.notif-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 13, 16, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 52px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.24s ease;
}

.notif-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.notif-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  border: 1px solid rgba(226, 232, 240, 0.95);
  overflow: hidden;
  transform: translateY(-12px) scale(0.97);
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease;
  display: flex;
  flex-direction: column;
  max-height: calc(85vh - 20px);
}

@media (max-width: 480px) {
  .notif-modal-overlay {
    padding: 8px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 56px);
    align-items: flex-start;
  }
  .notif-card {
    max-width: 100%;
    max-height: calc(82vh - 20px);
    border-radius: 18px;
  }
}

.notif-modal-overlay.open .notif-card {
  transform: translateY(0) scale(1);
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 12px 16px;
  background: linear-gradient(135deg, #1e293b 0%, #2d3748 60%, #3b1a1a 100%);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.notif-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.notif-actions-top {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.mark-read-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.67rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.01em;
}

.mark-read-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.close-notif-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.18s ease;
}

.close-notif-btn:hover {
  background: rgba(220, 38, 38, 0.5);
  border-color: rgba(220, 38, 38, 0.6);
  color: #ffffff;
}

.notif-list {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f8fafc;
  scrollbar-width: thin;
  scrollbar-color: rgba(137, 24, 17, 0.2) transparent;
}

.notif-list::-webkit-scrollbar {
  width: 4px;
}
.notif-list::-webkit-scrollbar-thumb {
  background-color: rgba(137, 24, 17, 0.25);
  border-radius: 4px;
}

.notif-item {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
  color: inherit;
  overflow: visible; /* Allow footer to be displayed */
  margin-bottom: 2px;
}

.notif-item-main-row {
  display: flex;
  align-items: flex-start;
  padding: 10px 12px 8px 12px;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.notif-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  flex-shrink: 0;
  position: relative;
}

.notif-unread-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 4px rgba(245, 158, 11, 0.5);
}

/* شريط الألوان الجانبي لنوع الإشعار */
.notif-item::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #cbd5e1;
  border-radius: 0 12px 12px 0;
  transition: background 0.2s ease;
}
html[dir="ltr"] .notif-item::before {
  right: auto;
  left: 0;
  border-radius: 12px 0 0 12px;
}

.notif-item.has-action {
  cursor: pointer;
}

.notif-item.has-action:hover {
  border-color: rgba(137, 24, 17, 0.25);
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px rgba(137, 24, 17, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

.notif-item.has-action:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.notif-item.unread {
  background: linear-gradient(135deg, #fffdf7 0%, #fff8f8 100%);
  border-color: rgba(245, 158, 11, 0.3);
}

.notif-item.unread::before {
  background: linear-gradient(
    180deg,
    #f59e0b 0%,
    var(--brand-primary, #891811) 100%
  );
}

html[dir="ltr"] .notif-item.unread {
  border-left-color: rgba(245, 158, 11, 0.3);
}

.notif-item-body {
  flex: 1;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notif-item-title {
  font-size: 0.81rem;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.3;
}

.notif-item.unread .notif-item-title {
  color: #1e293b;
}

.notif-item-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
  max-height: 2.8em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* شريط تذييل الإشعار */
.notif-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 14px;
  background: #f8fafc;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.notif-item.unread .notif-item-footer {
  background: rgba(255, 248, 240, 0.8);
  border-top-color: rgba(245, 158, 11, 0.15);
}

.notif-item-time {
  font-size: 0.63rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.notif-item-time::before {
  content: "\f58f";
  font-family: "Bootstrap-icons";
  font-size: 0.6rem;
  opacity: 0.7;
}

/* زر الانتقال - تصميم محسّن */
.notif-jump-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(
    135deg,
    var(--brand-primary, #891811) 0%,
    #c0392b 100%
  );
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(137, 24, 17, 0.3);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.notif-jump-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(137, 24, 17, 0.4);
  color: #ffffff;
}

.notif-jump-btn i {
  font-size: 0.62rem;
  transition: transform 0.18s ease;
}

.notif-jump-btn:hover i {
  transform: translateX(-2px);
}

/* قائمة الخيارات السريعة */
.quick-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 13, 16, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}

.quick-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.quick-menu-card {
  position: fixed;
  background: #ffffff;
  width: 250px;
  max-width: calc(100vw - 20px);
  max-height: calc(82vh - 20px);
  border-radius: 18px;
  padding: 12px 10px 10px 10px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--metallic-border, rgba(176, 190, 197, 0.35));
  transform: translateY(-8px) scale(0.94);
  transform-origin: top right;
  opacity: 0;
  transition:
    transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease;
  direction: rtl;
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html[dir="ltr"] .quick-menu-card {
  left: auto;
  right: 18px;
  transform-origin: top left;
  direction: ltr;
}

.quick-menu-overlay.open .quick-menu-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.quick-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 8px 6px;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.quick-menu-title {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--color-text-muted, #1f2937);
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-menu-close {
  background: #f1f5f9;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #64748b;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.quick-menu-close:hover {
  background: #e2e8f0;
  color: var(--brand-primary, #c8102e);
}

.quick-menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  padding-left: 2px;
  padding-right: 2px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 16, 46, 0.25) transparent;
}

.quick-menu-list::-webkit-scrollbar {
  width: 4px;
}

.quick-menu-list::-webkit-scrollbar-thumb {
  background-color: rgba(200, 16, 46, 0.25);
  border-radius: 4px;
}

.quick-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--color-text-muted, #334155);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  opacity: 0;
  transform: translateX(8px);
  transition:
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.2s ease,
    background-color 0.15s ease,
    color 0.15s ease;
  flex-shrink: 0;
}

html[dir="ltr"] .quick-menu-item {
  transform: translateX(-8px);
}

.quick-menu-overlay.open .quick-menu-item {
  opacity: 1;
  transform: translateX(0);
}

.quick-menu-overlay.open .quick-menu-item:nth-child(1) {
  transition-delay: 0.02s;
}
.quick-menu-overlay.open .quick-menu-item:nth-child(2) {
  transition-delay: 0.04s;
}
.quick-menu-overlay.open .quick-menu-item:nth-child(3) {
  transition-delay: 0.06s;
}
.quick-menu-overlay.open .quick-menu-item:nth-child(4) {
  transition-delay: 0.08s;
}
.quick-menu-overlay.open .quick-menu-item:nth-child(5) {
  transition-delay: 0.1s;
}
.quick-menu-overlay.open .quick-menu-item:nth-child(6) {
  transition-delay: 0.12s;
}
.quick-menu-overlay.open .quick-menu-item:nth-child(7) {
  transition-delay: 0.14s;
}
.quick-menu-overlay.open .quick-menu-item:nth-child(8) {
  transition-delay: 0.16s;
}

.quick-menu-item i {
  font-size: 1.1rem;
  color: var(--brand-primary, #c8102e);
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
}

.quick-menu-item:hover,
.quick-menu-item:active {
  background-color: rgba(200, 16, 46, 0.07);
  color: var(--brand-primary, #c8102e);
  transform: translateX(-2px);
}

html[dir="ltr"] .quick-menu-item:hover,
html[dir="ltr"] .quick-menu-item:active {
  transform: translateX(2px);
}

.quick-menu-item:hover i {
  transform: scale(1.12);
}

.quick-menu-item.danger {
  color: var(--action-destructive, #b71c1c);
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
  padding-top: 8px;
  border-radius: 0 0 10px 10px;
}

.quick-menu-item.danger i {
  color: var(--action-destructive, #b71c1c);
}

.quick-menu-item.danger:hover,
.quick-menu-item.danger:active {
  background-color: rgba(183, 28, 28, 0.08);
  color: var(--action-destructive-hover, #8e1414);
}

/* التجاوب والتكيف مع مختلف الشاشات (الهواتف، الأجهزة اللوحية، الشاشات الكبيرة) */
@media (max-width: 576px) {
  .quick-menu-card {
    width: min(290px, calc(100vw - 24px));
    max-height: min(72vh, 480px);
    border-radius: 16px;
    padding: 10px 8px 8px 8px;
  }
  .quick-menu-item {
    padding: 5px 6px;
    font-size: 0.74rem;
    gap: 8px;
  }
  .quick-menu-item i {
    font-size: 1.05rem;
    min-width: 20px;
  }
}

@media (min-width: 577px) and (max-width: 991px) {
  .quick-menu-card {
    width: 260px;
    max-height: 75vh;
  }
  .quick-menu-item {
    padding: 6px 8px;
    font-size: 0.76rem;
  }
}

@media (min-width: 992px) {
  .quick-menu-card {
    width: 270px;
    max-height: 78vh;
  }
  .quick-menu-item {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Admin Control Panel Components (Tables, Switches, Diagnostics)
   ========================================================================== */

/* Header Bar for Admin Sub-Pages */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(200, 16, 46, 0.1);
}

.admin-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-title-wrap i {
  font-size: 1.6rem;
  color: var(--brand-primary);
}

.admin-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin: 0;
}

.admin-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 2px 0 0 0;
}

/* ==========================================================================
   Unified Horizontal Stats Ribbon (.stats-ribbon-wrapper & .stats-ribbon)
   Single Row Drag-to-Scroll Layout with Scroll Indicator Hints
   ========================================================================== */
.stats-ribbon-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 4px;
  overflow: hidden;
}

.stats-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding: 4px 2px;
  width: 100%;
}

.stats-ribbon.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.stats-ribbon::-webkit-scrollbar {
  display: none;
}

/* Dynamic Scroll Indicator Arrows (< / >) for Horizontal Filter Bars & Ribbons */
.scroll-indicator-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--metallic-border, #cbd5e1);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.14),
    0 1px 2px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--brand-primary, #891811);
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  padding: 0;
  line-height: 1;
}

.scroll-indicator-arrow.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-indicator-arrow:hover {
  background: var(
    --brand-primary-gradient,
    linear-gradient(135deg, #e10606 0%, #891811 100%)
  );
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 3px 10px rgba(137, 24, 17, 0.35);
}

.scroll-indicator-arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.scroll-indicator-arrow.left {
  left: 1px;
}

.scroll-indicator-arrow.right {
  right: 1px;
}

.stat-box {
  background: linear-gradient(180deg, #ebecee 0%, #f4f5f7 60%, #ffffff 100%);
  border: 1px solid rgba(140, 140, 140, 0.35);
  border-radius: var(--radius-md);
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.12),
    inset 0 -1px 1px rgba(255, 255, 255, 0.8),
    0 1px 1px rgba(255, 255, 255, 0.4);
  transition: var(--transition);
  flex-shrink: 0;
  width: auto;
  min-width: 0;
  text-decoration: none;
  white-space: nowrap;
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
}

.stat-box:active {
  transform: scale(0.97);
}

.stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-text-main);
  line-height: 1.1;
}

.stat-val.primary {
  color: var(--brand-primary);
}
.stat-val.success {
  color: #1b5e20;
}
.stat-val.warning {
  color: #d97706;
}
.stat-val.danger {
  color: var(--brand-primary);
}

.stat-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   Unified Advanced Horizontal Filter Bar (.aw-filter-bar, .aw-filter-scroll)
   ========================================================================== */
.aw-filter-bar {
  position: relative;
  background: #ffffff;
  border-top: 1px solid var(--metallic-border);
  border-bottom: 1px solid var(--metallic-border);
  border-left: none;
  border-right: none;
  border-radius: 0;
  padding: 3px 0;
  margin: 2px -4px 4px -4px;
  width: calc(100% + 8px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.aw-filter-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding: 2px 6px;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.aw-filter-scroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.aw-filter-scroll::-webkit-scrollbar {
  display: none;
}

/* Individual Filter Controls (Auto-width according to text content) */
.aw-filter-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.aw-filter-input,
.aw-filter-select {
  padding: 4px 8px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--metallic-border);
  background: #ffffff;
  color: var(--color-text-main);
  font-size: 0.74rem;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  width: auto;
  max-width: none;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.aw-filter-input {
  width: 140px;
}

.aw-filter-input:focus,
.aw-filter-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(137, 24, 17, 0.15);
}

/* Shared Search Input Wrapper & Clear Button (x) */
.aw-search-input-wrap,
.search-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: auto;
}

/* Clean unified search input inside search wrapper: no search icon, clean padding */
.aw-search-input-wrap input.aw-form-input,
.search-input-wrap input.aw-form-input,
.collapsible-filter-card input.aw-form-input[name="search"],
.collapsible-filter-card input[type="text"][name="search"],
.collapsible-filter-card input[type="search"] {
  padding-right: 10px !important;
  padding-left: 26px !important;
}

html[dir="ltr"] .aw-search-input-wrap input.aw-form-input,
html[dir="ltr"] .search-input-wrap input.aw-form-input,
html[dir="ltr"] .collapsible-filter-card input.aw-form-input[name="search"],
html[dir="ltr"] .collapsible-filter-card input[type="text"][name="search"],
html[dir="ltr"] .collapsible-filter-card input[type="search"] {
  padding-right: 26px !important;
  padding-left: 10px !important;
}

.search-clear-btn,
.aw-search-clear-btn {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #18191c;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 4;
}

html[dir="ltr"] .search-clear-btn,
html[dir="ltr"] .aw-search-clear-btn {
  left: auto;
  right: 6px;
}

.search-clear-btn:hover,
.aw-search-clear-btn:hover {
  background: var(--brand-primary, #891811);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 2px 6px rgba(137, 24, 17, 0.45);
}

.search-clear-btn:active,
.aw-search-clear-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.search-clear-btn.visible,
.aw-search-clear-btn.visible {
  display: inline-flex !important;
}

/* ==========================================================================
   Shared Collapsible Advanced Filter Panel (.collapsible-filter-card)
   ========================================================================== */
.collapsible-filter-card {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-width: 0 !important;
  transform: translateY(-8px) scale(0.98);
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    transform 0.32s cubic-bezier(0.34, 1.25, 0.64, 1),
    padding 0.25s ease,
    margin 0.25s ease,
    border-width 0.15s ease;
  box-sizing: border-box;
  pointer-events: none;
}

.collapsible-filter-card.is-open {
  max-height: 500px;
  opacity: 1;
  overflow: visible;
  padding: 4px 6px !important;
  margin-bottom: 8px !important;
  border-width: 1px !important;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.collapsible-filter-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.filter-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.filter-dropdowns-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  width: 100%;
  scrollbar-width: thin;
}

.filter-dropdown-field {
  flex: 1;
  min-width: 110px;
  font-size: 0.74rem;
}

.aw-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.aw-filter-btn.primary {
  background: var(--brand-primary-gradient);
  color: #ffffff;
}

.aw-filter-btn.outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--metallic-border);
}

.aw-filter-btn:active {
  transform: scale(0.95);
}

/* ==========================================================================
   Admin / Subsystem Tabs Navigation (.admin-nav-tabs-wrapper & .admin-nav-tabs)
   ========================================================================== */
.admin-nav-tabs-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
  overflow: hidden;
}

.admin-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 4px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  cursor: grab;
  cursor: -webkit-grab;
  user-select: none;
  -webkit-user-select: none;
  scroll-snap-type: x proximity;
}

.admin-nav-tabs:active,
.admin-nav-tabs.is-dragging {
  cursor: grabbing;
  cursor: -webkit-grabbing;
  scroll-snap-type: none;
}

.admin-nav-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.admin-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.4));
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 1px #ffffff,
    0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-nav-tab:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.admin-nav-tab.active {
  background: var(--brand-primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(137, 24, 17, 0.25);
}

.admin-nav-tab i {
  font-size: 0.74rem;
}

/* ==========================================================================
   Admin Top Control Panel & Section Divider (.admin-top-panel, .section-heading-bar)
   Distinct visually from the detailed cards / data grid section
   ========================================================================== */
.admin-top-panel {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--metallic-border);
  padding: 8px 8px 6px 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
}

.section-heading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 2px 8px 2px;
  padding: 0 2px;
}

.section-heading-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-heading-title i {
  color: var(--brand-primary);
  font-size: 0.78rem;
}

.section-heading-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--metallic-border);
}

/* ==========================================================================
   Floating Action Button (FAB) (.aw-fab)
   Positioned at the bottom-left inside the app container (.app-container) above bottom nav
   With 25% Soft Transparency (opacity: 0.75 / hover: 1.0) and official ALWakalah GROUP Brand Gradient
   ========================================================================== */
.aw-fab {
  position: absolute;
  bottom: 76px;
  left: 15px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(
    --brand-primary-gradient,
    linear-gradient(135deg, #e30613 0%, #891811 100%)
  ) !important;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(137, 24, 17, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  z-index: 85;
  text-decoration: none;
  opacity: 0.95; /* شفافية بنسبة 25% واضحة وناعمة */
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
}

html[dir="ltr"] .aw-fab {
  left: auto;
  right: 15px;
}

.aw-fab i {
  font-size: 1.15rem;
  color: #ffffff !important;
  transition: transform 0.25s ease;
}

.aw-fab:hover {
  opacity: 1; /* تصبح واضحة 100% عند التمرير واللمس */
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 22px rgba(137, 24, 17, 0.55);
  border-color: #ffffff;
  color: #ffffff !important;
}

.aw-fab:hover i {
  transform: rotate(90deg);
}

.aw-fab:active {
  transform: scale(0.92);
  opacity: 1;
}

/* Store Search FAB with scroll-based toggle animation */
.store-search-fab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.6) translateY(20px);
  transition:
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    visibility 0.3s ease,
    box-shadow 0.25s ease;
}

.store-search-fab.visible {
  opacity: 0.95;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.store-search-fab.visible:hover {
  opacity: 1;
  transform: scale(1.08) translateY(-2px);
}

.store-search-fab.active {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.8),
    0 8px 24px rgba(137, 24, 17, 0.6) !important;
  transform: scale(1.06) translateY(-2px);
}

/* Admin Responsive Table (.data-table-container & .data-table) */
.data-table-container {
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--metallic-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.data-table-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
  min-height: 200px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.data-table-scroll-wrapper::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.data-table-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.data-table-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

.data-table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

.data-table-header {
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  background: #fafbfc;
  border-bottom: 1px solid #edf2f7;
  flex-wrap: wrap;
}

.table-search-input {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--metallic-border);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  min-width: 140px;
  width: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
  font-size: 0.76rem;
}

html[dir="ltr"] .data-table {
  text-align: left;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  padding: 6px 8px;
  font-weight: 800;
  color: var(--color-text-muted);
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.72rem;
  letter-spacing: -0.2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.data-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--color-text-main);
  vertical-align: middle;
  font-size: 0.74rem;
  white-space: nowrap;
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

.data-table td.truncate-cell {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Data Table Action Buttons Bar (Single-Row Horizontal Drag-to-Scroll) */
.data-table-actions-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  width: 100%;
}

.data-table-actions-bar.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.data-table-actions-bar::-webkit-scrollbar {
  display: none;
}

.data-table-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.data-table-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--metallic-border);
  background: #ffffff;
  color: var(--color-text-main);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.data-table-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.data-table-btn.danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.data-table-btn.danger:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
}

.data-table-btn.primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

.data-table-btn.primary:hover {
  background: var(--brand-primary-hover);
}

/* Pill Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-pill.success {
  background: #f1f5f9;
  color: var(--color-text-main, #1a1a1a);
  border: 1px solid #e2e8f0;
}
.badge-pill.danger {
  background: #ffebee;
  color: var(--brand-primary, #891811);
  border: 1px solid rgba(137, 24, 17, 0.2);
}
.badge-pill.warning {
  background: #fff3e0;
  color: #ef6c00;
  border: 1px solid rgba(239, 108, 0, 0.2);
}
.badge-pill.info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid rgba(21, 101, 192, 0.2);
}

/* Switch Toggle Component */
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cfd8dc;
  transition: 0.3s;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

html[dir="rtl"] .switch-slider:before {
  left: auto;
  right: 3px;
}

input:checked + .switch-slider {
  background-color: var(--brand-primary);
}

input:checked + .switch-slider:before {
  transform: translateX(20px);
}

html[dir="rtl"] input:checked + .switch-slider:before {
  transform: translateX(-20px);
}

/* Compact Switch Toggle Component (.switch-control--sm) */
.switch-control.switch-control--sm {
  width: 32px;
  height: 18px;
}

.switch-control.switch-control--sm .switch-slider {
  border-radius: 18px;
}

.switch-control.switch-control--sm .switch-slider:before {
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
}

html[dir="rtl"] .switch-control.switch-control--sm .switch-slider:before {
  left: auto;
  right: 2px;
}

.switch-control.switch-control--sm input:checked + .switch-slider:before {
  transform: translateX(14px);
}

html[dir="rtl"]
  .switch-control.switch-control--sm
  input:checked
  + .switch-slider:before {
  transform: translateX(-14px);
}

/* Diagnostic Code Box */
.diagnostic-box {
  background: #1e1e24;
  color: #eceff1;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  margin: 8px 0;
  border-left: 4px solid var(--brand-primary);
}

/* ==========================================================================
   Modern System Dialogs & Confirmations (.aw-dialog-overlay, .aw-toast)
   نظام النوافذ المنبثقة والتنبيهات الموحد التابع للهوية البصرية لمجموعة الوكالة التجارية
   ========================================================================== */
/* Shared Base Overlay */
.aw-overlay,
.aw-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 19, 22, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal, 10000);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.aw-overlay.open,
.aw-dialog-overlay.open {
  opacity: 1;
  visibility: visible;
}

.aw-dialog-card {
  background: var(--color-surface, #ffffff);
  color: var(--color-text-main, #1e293b);
  width: 100%;
  max-width: 410px;
  border-radius: var(--radius-md, 12px);
  box-shadow:
    inset 0 1px 1px #ffffff,
    0 20px 48px rgba(0, 0, 0, 0.35),
    0 4px 14px rgba(137, 24, 17, 0.12);
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.35));
  padding: 18px 18px 14px 18px;
  text-align: center;
  transform: translateY(16px) scale(0.95);
  transition:
    transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.22s ease;
  font-family: "Cairo", sans-serif;
  position: relative;
  overflow: hidden;
}

.aw-dialog-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    #e30613 0%,
    var(--brand-primary, #891811) 50%,
    #70130e 100%
  );
  box-shadow: 0 1px 4px rgba(137, 24, 17, 0.35);
}

.aw-dialog-overlay.open .aw-dialog-card {
  transform: translateY(0) scale(1);
}

/* 3D Metallic Icon Badges for Dialogs */
.aw-dialog-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 2px auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  position: relative;
  box-sizing: border-box;
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 50%, #fca5a5 100%);
  border: 1.5px solid #dc2626;
  color: #dc2626;
  box-shadow:
    inset 0 1.5px 2px #ffffff,
    0 4px 12px rgba(220, 38, 38, 0.25);
}

.aw-dialog-icon-badge.danger {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 50%, #fca5a5 100%);
  border: 1.5px solid #dc2626;
  color: #dc2626;
  box-shadow:
    inset 0 1.5px 2px #ffffff,
    0 4px 12px rgba(220, 38, 38, 0.25);
}

.aw-dialog-icon-badge.warning {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
  border: 1.5px solid #d97706;
  color: #b45309;
  box-shadow:
    inset 0 1.5px 2px #ffffff,
    0 4px 12px rgba(217, 119, 6, 0.25);
}

.aw-dialog-icon-badge.success {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 50%, #86efac 100%);
  border: 1.5px solid #16a34a;
  color: #15803d;
  box-shadow:
    inset 0 1.5px 2px #ffffff,
    0 4px 12px rgba(22, 163, 74, 0.25);
}

.aw-dialog-icon-badge.info {
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
  border: 1.5px solid #0284c7;
  color: #0284c7;
  box-shadow:
    inset 0 1.5px 2px #ffffff,
    0 4px 12px rgba(2, 132, 199, 0.25);
}

.aw-dialog-icon-badge.primary {
  background: linear-gradient(180deg, #fde8e8 0%, #fbd5d5 50%, #f8b4b4 100%);
  border: 1.5px solid var(--brand-primary, #891811);
  color: var(--brand-primary, #891811);
  box-shadow:
    inset 0 1.5px 2px #ffffff,
    0 4px 14px rgba(137, 24, 17, 0.28);
}

.aw-dialog-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--metallic-dark, #0f172a);
  margin: 0 0 4px 0;
  line-height: 1.35;
  font-family: "Cairo", sans-serif;
}

.aw-dialog-desc {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  margin: 0 0 14px 0;
  line-height: 1.5;
  font-family: "Cairo", sans-serif;
  padding: 0 2px;
}

.aw-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
}

.aw-dialog-actions .btn {
  flex: 1;
  height: 34px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.aw-dialog-actions .btn:hover {
  transform: translateY(-1px);
}

/* ALWakalah GROUP Dialog Consequences Summary Card & Visual Identity */
.aw-dialog-consequence-card {
  background: #f8fafc;
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.25));
  border-right: 3.5px solid var(--brand-primary, #891811);
  border-radius: var(--radius-sm, 8px);
  padding: 9px 11px;
  margin: 8px 0 10px 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.73rem;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.aw-dialog-consequence-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 0.73rem;
}

.aw-dialog-consequence-item .aw-consequence-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.aw-dialog-consequence-item strong {
  color: #0f172a;
  font-weight: 800;
}

.aw-dialog-consequence-card.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  border-right-color: #dc2626;
}
.aw-dialog-consequence-card.danger .aw-consequence-icon {
  background: rgba(220, 38, 38, 0.14);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.aw-dialog-consequence-card.primary {
  background: #fdf2f2;
  border-color: rgba(137, 24, 17, 0.18);
  border-right-color: var(--brand-primary, #891811);
}
.aw-dialog-consequence-card.primary .aw-consequence-icon {
  background: rgba(137, 24, 17, 0.12);
  color: var(--brand-primary, #891811);
  border: 1px solid rgba(137, 24, 17, 0.22);
}

.aw-dialog-consequence-card.warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-right-color: #d97706;
}
.aw-dialog-consequence-card.warning .aw-consequence-icon {
  background: rgba(217, 119, 6, 0.14);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.aw-dialog-consequence-card.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-right-color: #16a34a;
}
.aw-dialog-consequence-card.success .aw-consequence-icon {
  background: rgba(22, 163, 74, 0.14);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

/* ALWakalah GROUP Dialog Consequence Note Banner */
.aw-dialog-consequence-note {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  margin-top: 4px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
}

.aw-dialog-consequence-note.danger {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border: 1px dashed rgba(220, 38, 38, 0.35);
}

.aw-dialog-consequence-note.primary {
  background: rgba(137, 24, 17, 0.07);
  color: var(--brand-primary, #891811);
  border: 1px dashed rgba(137, 24, 17, 0.28);
}

.aw-dialog-consequence-note.warning {
  background: rgba(217, 119, 6, 0.08);
  color: #b45309;
  border: 1px dashed rgba(217, 119, 6, 0.35);
}

.aw-dialog-consequence-note.success {
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
  border: 1px dashed rgba(22, 163, 74, 0.35);
}

/* ==========================================================================
   Modern Toast Notifications (.aw-toast)
   التنبيهات العائمة ثلاثية الأبعاد الموحدة باللون الأحمر الملكي لهوية الوكالة التجارية
   ========================================================================== */
.aw-toast-container {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 34px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100005;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 28px);
  max-width: 400px;
  pointer-events: none;
  font-family: "Cairo", sans-serif;
}

.aw-toast {
  background: linear-gradient(
    160deg,
    #ff3b47 0%,
    #e30613 40%,
    #a00000 80%,
    #70130e 100%
  );
  color: #ffffff;
  border-radius: 16px;
  padding: 11px 14px 14px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 1px 0 1px rgba(255, 255, 255, 0.15),
    0 12px 32px rgba(137, 24, 17, 0.42),
    0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  /* تأثير الدخول: سقوط مع ارتداد */
  animation: toastBounceIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  will-change: transform, opacity;
}

/* تأثير الخروج - يُضاف بواسطة JS */
.aw-toast.exiting {
  animation: toastSlideOut 0.32s cubic-bezier(0.4, 0, 1, 1) forwards !important;
  pointer-events: none;
}

.aw-toast::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 50%
  );
  pointer-events: none;
  border-radius: inherit;
}

.aw-toast.success {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 55%, #e8eef5 100%);
  color: var(--color-text-main, #0f172a);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-bottom: 3px solid var(--brand-primary, #891811);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    0 12px 32px rgba(15, 23, 42, 0.14),
    0 4px 10px rgba(137, 24, 17, 0.1);
}

.aw-toast.success .aw-toast-icon-wrap {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.aw-toast.success .aw-toast-icon-wrap i {
  color: #10b981;
}
.aw-toast.success .aw-toast-msg {
  color: #0f172a;
  font-weight: 800;
}
.aw-toast.success .aw-toast-progress {
  background: rgba(203, 213, 225, 0.4);
}
.aw-toast.success .aw-toast-progress-bar {
  background: var(--brand-primary, #891811);
  box-shadow: 0 0 6px rgba(137, 24, 17, 0.4);
}

.aw-toast.danger {
  background: linear-gradient(
    160deg,
    #fca5a5 0%,
    #ef4444 40%,
    #dc2626 80%,
    #991b1b 100%
  );
  border-color: rgba(127, 29, 29, 0.5);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    0 12px 32px rgba(153, 27, 27, 0.38),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

.aw-toast.warning {
  background: linear-gradient(
    160deg,
    #fde68a 0%,
    #f59e0b 40%,
    #d97706 80%,
    #b45309 100%
  );
  border-color: rgba(146, 64, 14, 0.5);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    0 12px 32px rgba(180, 83, 9, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.18);
}

.aw-toast.info {
  background: linear-gradient(
    160deg,
    #7dd3fc 0%,
    #0284c7 40%,
    #0369a1 80%,
    #075985 100%
  );
  border-color: rgba(3, 105, 161, 0.5);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    0 12px 32px rgba(3, 105, 161, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.18);
}

.aw-toast.primary,
.aw-toast.dark {
  background: linear-gradient(
    160deg,
    #ff3b47 0%,
    #e30613 40%,
    #a00000 80%,
    #70130e 100%
  );
  border-color: rgba(112, 19, 14, 0.5);
}

.aw-toast-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 0 -1px 1px rgba(0, 0, 0, 0.15);
}

.aw-toast-icon-wrap i {
  font-size: 1.05rem;
  color: #ffffff;
}

.aw-toast-msg {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.45;
  flex: 1;
  letter-spacing: 0.1px;
}

/* زر الإغلاق اليدوي */
.aw-toast-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.7rem;
  transition: background 0.15s ease;
  pointer-events: auto;
}
.aw-toast-close:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.aw-toast.success .aw-toast-close {
  background: rgba(15, 23, 42, 0.08);
  color: #64748b;
}
.aw-toast.success .aw-toast-close:hover {
  background: rgba(15, 23, 42, 0.15);
  color: #1e293b;
}

.aw-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border-radius: 0 0 16px 16px;
}

.aw-toast-progress-bar {
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  transform-origin: right center;
  animation: toastCountdown linear forwards;
}

html[dir="ltr"] .aw-toast-progress-bar {
  transform-origin: left center;
}

/* ── Keyframes ── */
@keyframes toastCountdown {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* دخول: سقوط من الأعلى مع ارتداد Spring */
@keyframes toastBounceIn {
  0% {
    opacity: 0;
    transform: translateY(-28px) scaleY(0.85) scaleX(0.92);
  }
  55% {
    opacity: 1;
    transform: translateY(6px) scaleY(1.03) scaleX(1.01);
  }
  75% {
    transform: translateY(-3px) scaleY(0.98);
  }
  90% {
    transform: translateY(2px) scaleY(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* خروج: انزلاق للأعلى مع تلاشي وتقلص */
@keyframes toastSlideOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 120px;
    margin-bottom: 0;
  }
  40% {
    opacity: 0;
    transform: translateY(-18px) scale(0.92) scaleX(0.96);
  }
  100% {
    opacity: 0;
    transform: translateY(-24px) scale(0.88);
    max-height: 0;
    margin-bottom: -10px;
  }
}

/* ==========================================================================
   Unified In-Page Form Sheet / Drawer (.aw-form-sheet)
   Displays inside the app-container bounded within the page view.
   Features auto-adaptive height, frosted backdrop, sticky header,
   scrollable body, and action footer.
   ========================================================================== */
.aw-form-sheet {
  position: absolute;
  top: var(--app-header-height, 60px);
  bottom: var(--bottom-nav-height, 72px);
  left: 0;
  right: 0;
  width: auto;
  height: auto;
  margin-left: -6px;
  margin-right: -6px;
  z-index: var(
    --z-sheet,
    150
  ); /* يقع محصوراً بدقة داخل حاوية الصفحة والمحتوى */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0;
}

.aw-form-sheet.open {
  opacity: 1;
  pointer-events: auto;
}

/* Frosted Modal Backdrop (Click to dismiss) */
.aw-form-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
  cursor: pointer;
}

/* Modal Content Container (Spans the content area with fixed header & footer) */
.aw-form-sheet-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%; /* ملء كامل المساحة المتاحة بين الشريط العلوي والشريط السفلي */
  max-height: 100%;
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  background: var(--color-bg-page, #f5f7fa);
  display: flex;
  flex-direction: column;
  border-top-left-radius: var(--radius-md, 20px);
  border-top-right-radius: var(--radius-md, 20px);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  /* حدود معتمدة بالهوية البصرية مع حواف مجسمة */
  border: 1.5px solid var(--brand-primary, #891811);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 -4px 18px rgba(137, 24, 17, 0.15);
  overflow: hidden;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.aw-form-sheet.open .aw-form-sheet-content {
  transform: translateY(0);
}

@media (min-width: 500px) {
  .app-container .aw-form-sheet {
    border-radius: 0;
  }
}

/* Backward compatibility for standalone .aw-form-sheet without .aw-form-sheet-content wrapper */
.aw-form-sheet:not(:has(.aw-form-sheet-content)) {
  background: var(--color-bg-page, #f5f7fa);
  border-top-left-radius: var(--radius-md, 16px);
  border-top-right-radius: var(--radius-md, 16px);
  border: 1.5px solid var(--brand-primary, #891811);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  top: auto;
  bottom: 0;
  max-height: calc(100% - 50px);
  height: auto;
  transform: translateY(100%);
  transition:
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.25s ease;
}

.aw-form-sheet.open:not(:has(.aw-form-sheet-content)) {
  transform: translateY(0);
  opacity: 1;
}

/* In-Page View Transition Panels (Same as orders.php standard) */
.inpage-view-panel {
  animation: fadeInView 0.24s ease-out;
}
@keyframes fadeInView {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Background scroll lock when an in-page sheet is active */
.scrollable-body.has-open-sheet {
  overflow: hidden !important;
  touch-action: none;
}

/* ==========================================================================
   Drag Handle for Bottom Sheets (مقبض السحب لإغلاق النافذة)
   ========================================================================== */
.aw-form-sheet-drag-handle {
  flex-shrink: 0;
  width: 42px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 999px;
  margin: 8px auto 4px auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  position: relative;
}

.aw-form-sheet-drag-handle::after {
  /* منطقة لمس أوسع بكثير من القيمة البصرية */
  content: "";
  position: absolute;
  inset: -10px -30px;
  cursor: grab;
}

.aw-form-sheet-drag-handle:active,
.aw-form-sheet-drag-handle.is-dragging {
  cursor: grabbing;
  background: var(--brand-primary, #891811);
  transform: scaleX(1.2);
}

.aw-form-sheet-drag-handle::after:active {
  cursor: grabbing;
}

/* ==========================================================================
   رأس النافذة (Header) — تصميم بارز معدني 3D مع تدرج وهوية بصرية
   ========================================================================== */
.aw-form-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 7px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 60%, #e2e8f0 100%);
  border-bottom: 2px solid var(--brand-primary, #891811);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  /* تأثير بارز مجسم (Embossed / Raised 3D) */
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 2px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

.aw-form-sheet-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-text-main, #1a1a1a);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 #ffffff;
}

.aw-form-sheet-title i {
  color: var(--brand-primary, #891811);
}

/* Modern Close Button for Form Sheets */
.aw-form-sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  color: var(--color-text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
  margin: 0;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 #ffffff;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  outline: none;
}

.aw-form-sheet-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.5);
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25);
}

.aw-form-sheet-close:active {
  transform: rotate(90deg) scale(0.94);
  background: #fecaca;
}

.aw-form-sheet-close:focus-visible {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

.aw-form-sheet form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

/* ==========================================================================
   محتوى النافذة (Body) — تأثير تجويف محفور (Sunken Recessed Tray)
   ========================================================================== */
.aw-form-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px 12px 10px;
  background: linear-gradient(
    180deg,
    #eaeef3 0%,
    #f1f5f9 12%,
    #f8fafc 85%,
    #e2e8f0 100%
  );
  /* تأثير محفور عميق وثري (Sunken / Inset Carved Groove) */
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.04),
    inset 1px 0 3px rgba(0, 0, 0, 0.03),
    inset -1px 0 3px rgba(0, 0, 0, 0.03);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.aw-form-sheet-body::-webkit-scrollbar {
  width: 5px;
}

.aw-form-sheet-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
}

.aw-form-sheet-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 4px;
}

.aw-form-sheet-body::-webkit-scrollbar-thumb:hover {
  background: var(--brand-primary, #891811);
}

/* ==========================================================================
   تذييل النافذة (Footer) — تصميم بارز معدني 3D مع أزرار الهوية
   ========================================================================== */
.aw-form-sheet-footer {
  flex-shrink: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
  border-top: 2px solid var(--metallic-border, #cbd5e1);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 10;
  /* تأثير بارز للأعلى (Raised 3D) */
  box-shadow:
    0 -4px 14px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 #ffffff;
}

.aw-form-group {
  margin-bottom: 10px;
}

.aw-form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 0.74rem;
  margin-bottom: 4px;
  color: var(--color-text-main);
}

.aw-form-input,
.aw-form-select,
.aw-form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--metallic-border);
  background: #ffffff;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--color-text-main);
  outline: none;
  transition: var(--transition);
}

.aw-form-input:focus,
.aw-form-select:focus,
.aw-form-textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(137, 24, 17, 0.15);
}

/* Disabled Submit Button State */
.btn:disabled,
.btn[disabled] {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* ==========================================================================
   User Avatar Upload / Change / Delete UI (.aw-avatar-upload-wrap)
   ========================================================================== */
.aw-avatar-upload-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px dashed var(--metallic-border);
  padding: 3px 6px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.aw-avatar-preview-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--brand-primary);
  font-size: 1.1rem;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.aw-avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aw-avatar-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.aw-avatar-btns-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.aw-avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--metallic-border);
  color: var(--color-text-main);
  cursor: pointer;
  transition: var(--transition);
}

.aw-avatar-upload-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: #ffffff;
}

.aw-avatar-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  cursor: pointer;
  transition: var(--transition);
}

.aw-avatar-delete-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

/* ==========================================================================
   26. Collapsible Sections (الأقسام القابلة للطي والتوسيع مع زر منبثق سفلي)
   ========================================================================== */
.collapsible-section {
  position: relative;
  margin-top: 4px;
  margin-bottom: 6px;
}

/* إخفاء قسم الصفحات تلقائياً إذا كان فارغاً ولا يحتوي على بطاقات أو صفحات */
.collapsible-section.pages-section:not(
    :has(
      .collapsible-body .card,
      .collapsible-body a,
      .agencies-grid .card,
      .agencies-grid a
    )
  ) {
  display: none !important;
}

.collapsible-section.is-empty-pages-section {
  display: none !important;
}

.collapsible-section.store-filter-collapsible {
  margin-top: 0;
  scroll-margin-top: 10px;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease;
}

.collapsible-header:hover {
  opacity: 0.85;
}

/* تنسيق مجسم ثلاثي الأبعاد بالألوان المعتمدة (3D Metallic Brand Red) حصرياً لأقسام الصفحات والخدمات */
.pages-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(
    180deg,
    #3a3d42 0%,
    #25282c 40%,
    #1a1a1a 85%,
    #0a0a0a 100%
  );
  border: 1px solid #000000;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset -1px -1px 2px rgba(0, 0, 0, 0.6),
    0 3px 8px rgba(0, 0, 0, 0.28);
  color: #ffffff !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pages-section .section-header:hover {
  background: linear-gradient(
    180deg,
    #ff5c66 0%,
    #f50817 40%,
    #b80000 82%,
    #891811 100%
  );
  border-color: #550d0a;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset -1px -1px 2px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(227, 6, 19, 0.35);
  transform: translateY(-1px);
}

.pages-section .section-header .section-title-wrap i {
  color: #ffffff !important;
  font-size: 0.95rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.pages-section .section-header .section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.pages-section .section-header .section-link,
.pages-section .section-header .section-toggle-btn {
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  user-select: none;
}

.pages-section .section-header .section-link:hover,
.pages-section .section-header .section-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.65);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.pages-section .section-header .section-toggle-btn .toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pages-section.collapsed .section-header .section-toggle-btn .toggle-icon {
  transform: rotate(180deg);
}

.pages-section .section-header .badge {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.collapsible-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.collapsible-title-wrap i {
  color: var(--color-primary);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.collapsible-title-wrap .section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin: 0;
}

.collapsible-chevron {
  display: none;
}

.collapsible-body {
  overflow: hidden;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
  max-height: 1000px;
  opacity: 1;
}

.collapsible-section.collapsed .collapsible-body {
  max-height: 0 !important;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

/* Bottom Divider with Primary Brand Color & Smooth Edge Fade Effect */
.collapsible-toggle-bar {
  position: relative;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    rgba(137, 24, 17, 0) 0%,
    rgba(137, 24, 17, 0.25) 12%,
    rgba(137, 24, 17, 0.75) 30%,
    var(--brand-primary, #891811) 50%,
    rgba(137, 24, 17, 0.75) 70%,
    rgba(137, 24, 17, 0.25) 88%,
    rgba(137, 24, 17, 0) 100%
  );
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.collapsible-toggle-bar:hover {
  background: linear-gradient(
    90deg,
    rgba(137, 24, 17, 0) 0%,
    rgba(137, 24, 17, 0.4) 12%,
    rgba(137, 24, 17, 0.9) 30%,
    var(--brand-primary, #891811) 50%,
    rgba(137, 24, 17, 0.9) 70%,
    rgba(137, 24, 17, 0.4) 88%,
    rgba(137, 24, 17, 0) 100%
  );
}

.collapsible-toggle-badge {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 22px;
  background: var(--aw-logo-dark-gray, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(137, 24, 17, 0.28);
  color: #ffffff;
  font-size: 0.72rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  z-index: 2;
}

.section-header .collapsible-toggle-badge {
  position: static;
  transform: none;
  width: 26px;
  height: 22px;
  flex-shrink: 0;
}

.collapsible-toggle-bar:hover .collapsible-toggle-badge {
  background: var(--brand-primary-hover, #70130e);
  border-color: rgba(255, 255, 255, 0.7);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(137, 24, 17, 0.45);
  transform: translateY(-50%) scale(1.1);
}

.collapsible-toggle-badge:hover,
.section-header .collapsible-toggle-badge:hover {
  background: var(--brand-primary-hover, #70130e);
  border-color: rgba(255, 255, 255, 0.7);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(137, 24, 17, 0.45);
  transform: scale(1.08);
}

.collapsible-toggle-badge i {
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Arrow points UP when expanded, points DOWN when collapsed */
.collapsible-section .collapsible-toggle-badge i,
.collapsible-filter-card.is-open
  ~ .collapsible-toggle-bar
  .collapsible-toggle-badge
  i,
.collapsible-toggle-bar.is-expanded .collapsible-toggle-badge i {
  transform: rotate(180deg);
}

.collapsible-section.collapsed .collapsible-toggle-badge i,
.collapsible-filter-card:not(.is-open)
  ~ .collapsible-toggle-bar
  .collapsible-toggle-badge
  i,
.collapsible-toggle-bar.is-collapsed .collapsible-toggle-badge i {
  transform: rotate(0deg);
}

/* ==========================================================================
   Global Section Visibility Controls (التحكم العام بإظهار / إخفاء الأقسام)
   ========================================================================== */
html.aw-hide-quick-nav .aw-quick-nav-section,
body.aw-hide-quick-nav .aw-quick-nav-section,
html.aw-hide-quick-nav .collapsible-section:has(.admin-nav-tabs-wrapper),
html.aw-hide-quick-nav .collapsible-section:has(.nav-tabs-wrapper) {
  display: none !important;
}

html.aw-hide-stats .aw-stats-section,
body.aw-hide-stats .aw-stats-section,
html.aw-hide-stats .collapsible-section:has(.stats-ribbon-wrapper),
html.aw-hide-stats .collapsible-section:has(.stats-ribbon) {
  display: none !important;
}

html.aw-hide-search .aw-search-section,
body.aw-hide-search .aw-search-section {
  display: none !important;
}

/* Scrollable container with fixed max height */
.scrollable-y-container {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.scrollable-y-container::-webkit-scrollbar {
  width: 4px;
}

.scrollable-y-container::-webkit-scrollbar-track {
  background: transparent;
}

.scrollable-y-container::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

.scrollable-y-container::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

/* Audit log list item styling & hover */
.audit-log-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm, 6px);
  background: #fafbfc;
  border: 1px solid #f1f5f9;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.audit-log-item:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.audit-log-details-btn {
  padding: 4px 8px;
  font-size: 0.72rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid #e2e8f0;
  color: var(--color-text-muted, #64748b);
  background: #ffffff;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.audit-log-details-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(137, 24, 17, 0.05);
}

/* ==========================================================================
   ALWakalah GROUP Official 3D Metallic Cards & Sunken Groove Trays (.card-metallic-3d, .notif-admin-item)
   البطاقات المعدنية المجسمة المعتمدة ذات التجويف المحفور بكامل العرض
   ========================================================================== */
.card-metallic-3d,
.notif-admin-item {
  display: flex;
  flex-direction: column;
  padding: 3px 6px;
  background: linear-gradient(
    180deg,
    #3a3a3a 0%,
    #2a2a2a 30%,
    #1e1e1e 65%,
    #141414 100%
  );
  border: 1px solid rgba(140, 140, 140, 0.35);
  border-radius: var(--radius-sm, 6px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 1px 0 1px rgba(255, 255, 255, 0.1),
    inset -1px -1px 2px rgba(0, 0, 0, 0.55),
    0 3px 8px rgba(0, 0, 0, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.6);
  margin-bottom: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-family: "Cairo", sans-serif;
}

.card-metallic-3d:hover,
.notif-admin-item:hover {
  border-color: rgba(180, 180, 180, 0.55);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.22),
    inset 1px 0 1px rgba(255, 255, 255, 0.14),
    inset -1px -1px 2px rgba(0, 0, 0, 0.6),
    0 5px 14px rgba(0, 0, 0, 0.55),
    0 2px 4px rgba(0, 0, 0, 0.65);
  transform: translateY(-1px);
}

.card-metallic-3d.unread,
.notif-admin-item.unread {
  border-right: 4px solid var(--brand-primary, #891811);
  border-color: var(--brand-primary, #891811);
  background: linear-gradient(
    180deg,
    #3e2020 0%,
    #2c1515 30%,
    #1f0e0e 65%,
    #150808 100%
  );
}

html[dir="ltr"] .card-metallic-3d.unread,
html[dir="ltr"] .notif-admin-item.unread {
  border-right: 1px solid var(--brand-primary, #891811);
  border-left: 4px solid var(--brand-primary, #891811);
}

.notif-item-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 2px 4px 4px 4px;
}

.notif-item-leading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}

.notif-checkbox-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notif-checkbox {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--brand-primary, #891811);
  border-radius: 4px;
}

.notif-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.notif-icon-badge.orders,
.notif-icon-badge.success {
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border-color: #34d399;
}

.notif-icon-badge.wallet,
.notif-icon-badge.primary {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  color: var(--brand-primary, #891811);
  border-color: #f87171;
}

.notif-icon-badge.offers,
.notif-icon-badge.warning {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-color: #fbbf24;
}

.notif-icon-badge.system,
.notif-icon-badge.info {
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
  color: #075985;
  border-color: #60a5fa;
}

.notif-admin-item .notif-item-body {
  flex: 1;
  width: 100%;
  padding: 2px 4px 4px 4px;
  text-align: right;
}

.notif-admin-item .notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 3px;
}

.notif-admin-item .notif-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-primary, #891811);
  box-shadow: 0 0 6px rgba(227, 6, 19, 0.8);
  flex-shrink: 0;
  display: inline-block;
}

.notif-admin-item .notif-item-title {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--metallic-dark, #1a1a1a);
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-admin-item .notif-item-time {
  font-size: 0.66rem;
  color: var(--color-text-muted, #5a5a5a);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  font-weight: 700;
}

.notif-admin-item .notif-item-desc {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary, #475569);
  margin: 0 0 4px 0;
  line-height: 1.42;
  word-break: break-word;
}

/* ==========================================================================
   Separated Floating Action Island (القسم السفلي المنفصل عائمًا خارج حدود البطاقة)
   ========================================================================== */
.item-card-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.card-debossed-footer,
.interactive-card .notif-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 6px 12px;
  margin-top: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
  border: 1px solid rgba(140, 140, 140, 0.45);
  border-radius: var(--radius-sm, 8px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px #ffffff,
    inset 0 -1px 2px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 10;
}

/* When inside interactive collapsible card: completely detached floating island */
.interactive-card .notif-item-footer,
.interactive-card .card-debossed-footer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  border-width: 0;
  transform: translateY(-8px) scale(0.97);
  transition:
    max-height 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    padding 0.25s ease,
    margin 0.25s ease,
    border-width 0.1s ease,
    box-shadow 0.3s ease;
  pointer-events: none;
}

/* Expanded state: Floating detached island outside card boundaries with brand accent notch and deep metallic shadow */
.interactive-card.expanded .notif-item-footer,
.interactive-card.expanded .card-debossed-footer {
  max-height: 260px;
  height: auto;
  opacity: 1;
  overflow: visible;
  padding: 6px 10px;
  margin-top: 6px; /* فاصل بصري واضح يفصل الدرج تماماً عن جسم البطاقة الخارجي */
  border: 1px solid var(--brand-primary, #891811);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 55%, #e2e8f0 100%);
  box-shadow:
    0 10px 24px rgba(137, 24, 17, 0.16),
    0 3px 8px rgba(0, 0, 0, 0.09),
    inset 0 1px 2px #ffffff;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* الأنيق: مؤشر ربط بصري صغير (Arrow Indicator Notch) يربط الجزيرة العائمة بالبطاقة */
.interactive-card.expanded .notif-item-footer::before,
.interactive-card.expanded .card-debossed-footer::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 28px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-top: 1px solid var(--brand-primary, #891811);
  border-right: 1px solid var(--brand-primary, #891811);
  transform: rotate(-45deg);
  box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.03);
}

html[dir="ltr"] .interactive-card.expanded .notif-item-footer::before,
html[dir="ltr"] .interactive-card.expanded .card-debossed-footer::before {
  right: auto;
  left: 28px;
  border-right: none;
  border-left: 1px solid var(--brand-primary, #891811);
  transform: rotate(45deg);
}

.card-debossed-leading,
.notif-footer-leading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.card-debossed-actions,
.notif-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
  cursor: grab;
  user-select: none;
  touch-action: pan-x;
  padding: 1px 2px;
}

.card-debossed-actions.is-dragging,
.notif-item-actions.is-dragging {
  cursor: grabbing !important;
  user-select: none !important;
}

.card-debossed-actions::-webkit-scrollbar,
.notif-item-actions::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.btn-metallic.active-reacted {
  border-color: var(--brand-primary, #891811) !important;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f1f5f9 55%,
    #e2e8f0 100%
  ) !important;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(137, 24, 17, 0.15) !important;
  font-weight: 800 !important;
}

.notif-category-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  background: #ffffff;
  color: var(--metallic-dark, #1a1a1a);
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.4));
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow:
    inset 0 1px 1px #ffffff,
    0 1px 3px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Unified Status Badges (شارة الحالة الموحدة بدون ألوان اعتباطية أو خضراء) */
.badge-status {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-text-muted, #64748b);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #f1f5f9;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  white-space: nowrap;
}
.badge-status.active,
.badge-status.badge-status-active {
  color: var(--metallic-dark, #1e293b);
  background: #f8fafc;
  border-color: #cbd5e1;
  font-weight: 800;
}
.badge-status.active i,
.badge-status.badge-status-active i {
  color: var(--brand-primary, #891811);
  font-size: 0.38rem;
}
.badge-status.inactive,
.badge-status.badge-status-inactive {
  color: var(--color-text-muted, #94a3b8);
  background: #f1f5f9;
  border-color: #e2e8f0;
  font-weight: 700;
}
.badge-status.inactive i,
.badge-status.badge-status-inactive i {
  color: var(--color-text-muted, #94a3b8);
  font-size: 0.38rem;
}
.badge-status.danger,
.badge-status.badge-status-danger {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
  font-weight: 800;
}
.badge-status.danger i,
.badge-status.badge-status-danger i {
  color: #dc2626;
  font-size: 0.38rem;
}

/* 3D Sunken / Debossed Metallic Ribbon (تأثير التجويف المحفور 3D لشريط الملخص الداخلي) */
.card-debossed-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 4px 8px;
  background: linear-gradient(180deg, #ebecee 0%, #f4f5f7 60%, #ffffff 100%);
  border: 1px solid rgba(140, 140, 140, 0.35);
  border-radius: var(--radius-sm, 6px);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.12),
    inset 0 -1px 1px rgba(255, 255, 255, 0.8),
    0 1px 1px rgba(255, 255, 255, 0.4);
  font-size: 0.73rem;
  overflow: hidden;
}

.notif-item-actions .btn,
.card-debossed-actions .btn {
  white-space: nowrap !important; /* منع التفاف النص داخل الأزرار نهائياً */
  flex-shrink: 0; /* منع انكماش الأزرار */
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Floating Bulk Action Bar (شريط الإجراءات المجمعة العائم بانزلاق مجسم ناعم) */
.bulk-action-bar {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(100px) scale(0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  width: calc(100% - 24px);
  max-width: 420px;
  background: linear-gradient(135deg, #24272c 0%, #1a1a1a 60%, #0d0d0d 100%);
  color: #ffffff;
  border-radius: var(--radius-sm, 6px);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 95;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.45, 0.64, 1),
    opacity 0.28s ease,
    visibility 0.35s ease;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.bulk-action-bar.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.filter-chip-tab {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--metallic-border);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.filter-chip-tab:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.filter-chip-tab.active {
  background: var(--brand-primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(137, 24, 17, 0.3);
}

.filter-chip-tab .chip-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 5px;
  border-radius: 10px;
  font-size: 0.66rem;
}

.filter-chip-tab.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ==========================================================================
   Collapsible Card Action Drawer (.card-actions-drawer & .interactive-card)
   Default State = Collapsed (max-height: 0). Expands on Card Click.
   ========================================================================== */
.interactive-card {
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.interactive-card.expanded {
  border-color: rgba(137, 24, 17, 0.4) !important;
  box-shadow: 0 4px 14px rgba(137, 24, 17, 0.08) !important;
}

/* Card Actions Drawer with Manual Handle & Horizontal Scroll */
.card-actions-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
  transition:
    max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    margin-top 0.25s ease,
    padding-top 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.interactive-card.expanded .card-actions-drawer {
  max-height: 260px;
  height: auto;
  opacity: 1;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(137, 24, 17, 0.15);
}

/* Manual Drawer Drag/Grab Handle */
.drawer-drag-handle {
  width: 38px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 4px;
  margin: 0 auto 5px auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-x;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    width 0.2s ease;
}

.drawer-drag-handle:active {
  cursor: grabbing;
}

.interactive-card:hover .drawer-drag-handle {
  background: var(--color-primary, #891811);
  transform: scaleX(1.15);
}

/* Horizontal Scroll Container for Action Buttons with Hidden Scrollbar & Drag-to-Scroll */
.drawer-buttons-scroll {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 2px 2px 4px 2px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE & Edge */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.drawer-buttons-scroll:active,
.drawer-buttons-scroll.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.drawer-buttons-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

.drawer-buttons-scroll .btn {
  flex-shrink: 0;
  scroll-snap-align: start;
  white-space: nowrap;
}

/* Main Page Actions Toolbar */
.page-actions-toolbar {
  display: flex;
  align-items: center;
  border: 1px dashed var(--metallic-border, rgba(176, 190, 197, 0.35));
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding: 6px 4px;
  margin-bottom: 4px;
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  scrollbar-width: none;
}
.page-actions-toolbar::-webkit-scrollbar {
  display: none;
}
.action-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8fafc;
  color: var(--color-text-main, #1e293b);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
}
.action-tool-btn:hover {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--color-primary, #891811);
  transform: translateY(-1px);
}
.action-tool-btn.primary {
  background: var(--color-primary, #891811);
  color: #ffffff;
  border-color: var(--color-primary, #891811);
  box-shadow: 0 2px 8px rgba(137, 24, 17, 0.25);
}
.action-tool-btn.primary:hover {
  background: var(--color-primary-neon, #a31811);
  color: #ffffff;
}
.action-tool-btn.success {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.action-tool-btn.success:hover {
  background: #d1fae5;
  color: #047857;
}
.action-tool-btn.danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.action-tool-btn.danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.action-tool-btn.active {
  background: var(--color-primary, #891811);
  color: #ffffff;
  border-color: var(--color-primary, #891811);
}

/* Product Gallery Components */
.gallery-dropzone {
  border: 2px dashed rgba(137, 24, 17, 0.35);
  background: #faf7f7;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
  margin-bottom: 12px;
}
.gallery-dropzone:hover,
.gallery-dropzone.dragover {
  border-color: var(--color-primary);
  background: #fff0f0;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
  direction: rtl; /* Force RTL sequence display (right to left) */
}
html[dir="ltr"] .gallery-grid {
  direction: ltr;
}
.gallery-item-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.gallery-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
}
.gallery-item-card.is-primary {
  border: 2px solid var(--color-primary);
}
.gallery-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
}
.gallery-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-thumb-wrap:hover img {
  transform: scale(1.05);
}
.gallery-primary-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  height: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
}
html[dir="ltr"] .gallery-primary-badge {
  right: auto;
  left: 6px;
}
.gallery-order-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  height: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  z-index: 3;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  line-height: 1;
}
.gallery-order-badge:hover {
  background: var(--color-primary);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.06);
  box-shadow: 0 3px 8px rgba(137, 24, 17, 0.4);
}
html[dir="ltr"] .gallery-order-badge {
  left: auto;
  right: 6px;
}
.gallery-sort-box {
  display: none;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  padding: 2px 4px;
  border-radius: 5px;
  border: 1.5px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(137, 24, 17, 0.2);
  height: 24px;
  box-sizing: border-box;
  animation: fadeInScale 0.14s ease-out;
}
.gallery-sort-box.show {
  display: inline-flex;
}
.gallery-sort-input {
  width: 36px;
  height: 20px;
  min-height: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  padding: 0 2px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  line-height: 18px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.gallery-sort-input::-webkit-outer-spin-button,
.gallery-sort-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.gallery-sort-input:focus {
  border-color: var(--color-primary);
  background: #ffffff;
}
.gallery-sort-btn-save {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 3px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  padding: 0;
  line-height: 1;
}
.gallery-sort-btn-save:hover {
  background: var(--brand-primary-hover, #70130e);
}
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.gallery-item-actions {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 4px 2px;
  background: #fdfdfd;
  border-top: 1px solid #f0f0f0;
}
.gallery-btn-action {
  background: none;
  border: none;
  font-size: 0.8rem;
  color: #64748b;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gallery-btn-action:hover {
  color: var(--color-primary);
  background: #fee2e2;
}
.gallery-btn-action.btn-del:hover {
  color: #dc2626;
  background: #fee2e2;
}
.gallery-btn-action.btn-star:hover {
  color: #f59e0b;
  background: #fef3c7;
}
.gallery-lightbox-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  box-sizing: border-box;
  background: radial-gradient(
    circle at center,
    rgba(18, 19, 26, 0.96) 0%,
    rgba(7, 8, 12, 0.99) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10500; /* أعلى من النوافذ العادية والشيتس */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px
    calc(env(safe-area-inset-bottom, 0px) + 14px) 14px;
  user-select: none;
  direction: ltr; /* لضمان اتجاه أدوات التحكم */
  overflow: hidden;
  font-family: "Cairo", sans-serif;
}

.gallery-lightbox-modal.open {
  display: flex;
  animation: lbFadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Lightbox Glassmorphic Top Toolbar */
.lb-header {
  width: 100%;
  max-width: 1100px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md, 12px);
  color: #ffffff;
  z-index: 20;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  position: relative;
}

.lb-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  min-width: 0;
  padding: 2px 2px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.lb-toolbar::-webkit-scrollbar {
  height: 3px;
}

.lb-toolbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.lb-toolbar:active {
  cursor: grabbing;
}

/* Close Button Fixed Wrapper (مستقل وثابت دائماً لا يتأثر بتمرير أو سحب الأدوات) */
.lb-close-fixed-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  margin-left: 2px;
}

/* Lightbox Action Buttons - 3D Metallic Glass Buttons */
.lb-btn {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.06) 100%
  );
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  outline: none;
}

.lb-btn:hover {
  background: linear-gradient(180deg, #ff3b47 0%, #e30613 45%, #891811 100%);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    0 4px 14px rgba(227, 6, 19, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.lb-btn:active {
  transform: translateY(0) scale(0.95);
}

.lb-btn.lb-btn-close {
  background: linear-gradient(
    180deg,
    rgba(220, 38, 38, 0.35) 0%,
    rgba(153, 27, 27, 0.45) 100%
  );
  border-color: rgba(239, 68, 68, 0.6);
  color: #fecaca;
}

.lb-btn.lb-btn-close:hover {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.6);
}

/* Lightbox Media Body Stage */
.lb-body {
  position: relative;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px 0;
  min-height: 0;
}

.lb-media-stage {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  max-height: calc(100dvh - 130px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.lb-media-stage img {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  max-height: calc(100dvh - 130px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md, 12px);
  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  user-select: none;
  -webkit-user-drag: none;
  transition: box-shadow 0.2s ease;
}

.lb-media-stage video {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  max-height: calc(100dvh - 130px);
  width: auto;
  height: auto;
  border-radius: var(--radius-md, 12px);
  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.15);
  outline: none;
  background: #000000;
}

/* Bottom Info Badge (عرض البيانات: العداد + اسم الصنف في أسفل يسار شاشة المعاينة) */
.lb-bottom-info-badge {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  direction: rtl;
  max-width: calc(100% - 28px);
  pointer-events: auto;
  animation: lbFadeIn 0.3s ease-out;
}

.lb-counter {
  background: linear-gradient(135deg, #ff3b47 0%, #e30613 40%, #891811 100%);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 2px 8px rgba(227, 6, 19, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  letter-spacing: 0.3px;
}

.lb-title {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 3D Floating Next / Prev Navigation Buttons */
.lb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.85) 0%,
    rgba(15, 23, 42, 0.95) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 25;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  outline: none;
}

.lb-nav-btn:hover {
  background: linear-gradient(135deg, #ff3b47 0%, #e30613 40%, #891811 100%);
  border-color: #ffffff;
  transform: translateY(-50%) scale(1.12);
  box-shadow:
    0 8px 24px rgba(227, 6, 19, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.lb-nav-btn:active {
  transform: translateY(-50%) scale(0.94);
}

.lb-nav-prev {
  right: 14px;
  left: auto;
}

.lb-nav-next {
  left: 14px;
  right: auto;
}

html[dir="ltr"] .lb-nav-prev {
  left: 14px;
  right: auto;
}

html[dir="ltr"] .lb-nav-next {
  right: 14px;
  left: auto;
}

@media (max-width: 768px) {
  .gallery-lightbox-modal {
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px
      calc(env(safe-area-inset-bottom, 0px) + 10px) 8px;
  }
  .lb-header {
    padding: 4px 6px;
    border-radius: 10px;
  }
  .lb-close-fixed-wrap {
    padding-left: 4px;
    margin-left: 2px;
  }
  .lb-bottom-info-badge {
    bottom: 8px;
    left: 8px;
    padding: 4px 10px;
    max-width: calc(100% - 16px);
  }
  .lb-title {
    max-width: 180px;
    font-size: 0.74rem;
  }
  .lb-counter {
    font-size: 0.68rem;
    padding: 2px 7px;
  }
  .lb-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.86rem;
  }
  .lb-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }
  .lb-nav-prev {
    right: 6px;
    left: auto;
  }
  .lb-nav-next {
    left: 6px;
    right: auto;
  }
  html[dir="ltr"] .lb-nav-prev {
    left: 6px;
    right: auto;
  }
  html[dir="ltr"] .lb-nav-next {
    right: 6px;
    left: auto;
  }
  .lb-media-stage {
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
  }
  .lb-media-stage img,
  .lb-media-stage video {
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    border-radius: 8px;
  }
}

/* ==========================================================================
   Profile Hero Card & Visual Identity Components (.profile-hero-card)
   ========================================================================== */
.profile-hero-card {
  background: var(
    --brand-primary-gradient,
    linear-gradient(135deg, #e10606 0%, #891811 100%)
  );
  border-radius: var(--radius-md);
  padding: 3px 6px;
  color: #ffffff;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(137, 24, 17, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  text-align: center;
  overflow: hidden;
}

.profile-hero-card::before {
  content: "";
  position: absolute;
  top: -30px;
  left: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.22) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 800;
  background: var(
    --metallic-silver-gradient,
    linear-gradient(135deg, #e0e0e0 0%, #bfbfbf 50%, #9e9e9e 100%)
  );
  color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.profile-hero-role-badge i {
  color: var(--brand-primary, #891811);
  font-size: 0.72rem;
}

.profile-hero-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 800;
  background: #ffffff;
  color: var(--brand-primary, #891811);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Unified Alert Components (.aw-alert, .aw-alert-success, .aw-alert-danger)
   ========================================================================== */
.aw-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 8px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.aw-alert-success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.aw-alert-danger {
  background: #fef2f2;
  color: var(--brand-primary, #891811);
  border-color: #fecaca;
}

.aw-alert-warning {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.aw-alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* ==========================================================================
   Store Showcase - Compact 2-Column Responsive Layout
   ========================================================================== */
.store-products-grid,
.store-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 142px), 1fr));
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .store-products-grid,
  .store-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
}

@media (min-width: 1200px) {
  .store-products-grid,
  .store-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 12px;
  }
}

.store-empty-state {
  grid-column: 1 / -1;
  padding: 16px 6px;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--metallic-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.store-empty-state i {
  font-size: 2.2rem;
  color: var(--metallic-silver);
  margin-bottom: 8px;
  display: inline-block;
}

.store-empty-state h3 {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--color-text-main);
  margin-bottom: 4px;
}

.store-empty-state p {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.product-card {
  background: linear-gradient(
    179deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 250, 252, 0.95) 100%
  );
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition:
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.22s ease,
    background 0.22s ease;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.02);
  padding: 0;
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.25));
  display: flex;
  flex-direction: column;
  min-width: 135px;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.product-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 10px 24px rgba(137, 24, 17, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.06);
  border-color: rgba(137, 24, 17, 0.45);
  background: linear-gradient(
    179deg,
    #ffffff 0%,
    rgba(254, 242, 242, 0.4) 100%
  );
}

.product-card-stage {
  height: 140px;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(241, 245, 249, 0.75) 100%
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  overflow: hidden;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.product-card-stage img.product-image {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.3s ease,
    opacity 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

/* Default Logo as subtle Watermark (شبه شفاف كعلامة مائية أنيقة) */
.product-card-stage img.product-image.is-placeholder,
.product-card-stage img.product-image[src*="logo_app_b.png"] {
  max-width: 60%;
  max-height: 60%;
  opacity: 0.28;
  filter: grayscale(10%) contrast(90%);
  mix-blend-mode: multiply;
}

.product-card:hover .product-card-stage img.product-image {
  transform: scale(1.08);
}

.product-card:hover .product-card-stage img.product-image.is-placeholder,
.product-card:hover
  .product-card-stage
  img.product-image[src*="logo_app_b.png"] {
  opacity: 0.42;
  transform: scale(1.05);
}

/* Dual Top Action Buttons (Favorite & Quick Add) Vertical on Right */
.card-top-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

html[dir="ltr"] .card-top-actions {
  right: auto;
  left: 6px;
}

.card-top-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
  pointer-events: auto;
  padding: 0;
}

.card-top-btn:hover {
  transform: scale(1.08);
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.card-top-btn:active {
  transform: scale(0.94);
}

/* زر المفضلة */
.card-top-btn.fav-btn {
  color: #94a3b8;
}

.card-top-btn.fav-btn i {
  color: inherit;
  font-size: 0.85rem;
  line-height: 1;
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.card-top-btn.fav-btn:hover {
  color: var(--brand-primary-red, #e30613);
  border-color: rgba(227, 6, 19, 0.25);
}

/* عند تفعيل المفضلة: الزر يبقى بخلفيته الأنيقة والقلب فقط يتحول للأحمر */
.card-top-btn.fav-btn.active {
  border-color: rgba(225, 29, 72, 0.25);
}

.card-top-btn.fav-btn.active i,
.card-top-btn.fav-btn i.bi-heart-fill {
  color: #e11d48 !important;
  font-size: 0.88rem;
  animation: awHeartPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .card-top-btn {
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(51, 65, 85, 0.7);
}

[data-theme="dark"] .card-top-btn:hover {
  background: rgba(30, 41, 59, 1);
}

[data-theme="dark"] .card-top-btn.fav-btn.active i,
[data-theme="dark"] .card-top-btn.fav-btn i.bi-heart-fill {
  color: #fb7185 !important;
}

@keyframes awHeartPop {
  0% {
    transform: scale(0.75);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* زر الإضافة إلى السلة (+) متناسق وواضح دون مبالغة */
.card-top-btn.add-cart-btn {
  color: var(--brand-primary-red, #e30613);
}

.card-top-btn.add-cart-btn i,
.card-top-btn.add-cart-btn i.bi-plus-lg {
  font-size: 0.92rem !important;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-text-stroke: 0.4px currentColor;
  transition: transform 0.16s ease;
}

.card-top-btn.add-cart-btn:hover {
  color: #ffffff;
  background: var(--brand-primary-red, #e30613);
  border-color: var(--brand-primary-red, #e30613);
}

.card-top-btn.add-cart-btn:hover i {
  transform: scale(1.1);
}

[data-theme="dark"] .card-top-btn.add-cart-btn {
  color: #f87171;
}

[data-theme="dark"] .card-top-btn.add-cart-btn:hover {
  background: var(--brand-primary-red, #e30613);
  color: #ffffff;
}

.card-metrics-stack {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: flex;
  gap: 4px;
  z-index: 4;
}

html[dir="ltr"] .card-metrics-stack {
  left: auto;
  right: 6px;
}

.card-metric-tag {
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(208, 209, 220, 0.6);
  color: #475569;
  font-size: 0.58rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  backdrop-filter: blur(4px);
}

/* 3D Debossed / Engraved Product Card Meta (القسم السفلي لكرت الصنف بالتنسيق المحفور الموحد) */
.product-card-meta {
  text-align: center;
  margin: 0px;
  padding: 6px 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f5f7fa 40%,
    #e2e8f0 85%,
    #cbd5e1 100%
  );

  border: 1px solid rgba(140, 140, 140, 0.35);
  border-radius: 0px;
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.08),
    inset 0 -1px 1px #ffffff,
    0 1px 1px rgba(255, 255, 255, 0.85);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.product-card:hover .product-card-meta {
  border-color: rgba(137, 24, 17, 0.35);
  background: linear-gradient(180deg, #e2e8f0 0%, #edf2f7 50%, #ffffff 100%);
  box-shadow:
    inset 0 2px 4px rgba(137, 24, 17, 0.06),
    inset 0 -1px 1px #ffffff,
    0 1px 2px rgba(255, 255, 255, 0.9);
}

.product-card-meta .card-item-name {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--color-text-main, #1a1a1a);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  transition: color 0.18s ease;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.product-card:hover .product-card-meta .card-item-name {
  color: var(--brand-primary, #891811);
}

.product-card-meta .card-item-price {
  font-size: 0.86rem;
  color: var(--brand-primary, #891811);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  font-family: monospace, var(--font-family);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Modern Product Detail Modal Styling */
.detail-hero-stage {
  position: relative;
  height: 230px;
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid var(--metallic-border);
}

.detail-hero-stage img,
.detail-hero-stage video {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease;
}

/* Modal Hero Nav Arrows (Prev/Next) */
.detail-hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--metallic-border);
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.18s ease;
  padding: 0;
  line-height: 1;
}

.detail-hero-nav-btn:hover {
  background: #ffffff;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(137, 24, 17, 0.2);
}

.detail-hero-nav-btn:active {
  transform: translateY(-50%) scale(0.94);
}

.detail-hero-nav-btn.prev-btn {
  right: 6px;
}

.detail-hero-nav-btn.next-btn {
  left: 6px;
}

html[dir="ltr"] .detail-hero-nav-btn.prev-btn {
  right: auto;
  left: 6px;
}

html[dir="ltr"] .detail-hero-nav-btn.next-btn {
  left: auto;
  right: 6px;
}

/* Media Gallery Horizontal Strip */
.media-gallery-grid {
  display: flex;
  gap: 8px;
  margin: 2px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  cursor: grab;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-primary, #891811) #f1f5f9;
}

.media-gallery-grid:active {
  cursor: grabbing;
}

.media-gallery-grid::-webkit-scrollbar {
  height: 5px;
}

.media-gallery-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.media-gallery-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.media-gallery-grid::-webkit-scrollbar-thumb:hover {
  background: var(--brand-primary, #891811);
}

.media-gallery-item {
  position: relative;
  /* width: 145px; */
  min-width: 95px;
  height: 95px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--metallic-border);
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.22s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.media-gallery-item:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(137, 24, 17, 0.15);
}

.media-gallery-item.active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(227, 6, 19, 0.25);
}

.media-gallery-item img,
.media-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.media-gallery-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
}

html[dir="ltr"] .media-gallery-badge {
  right: auto;
  left: 4px;
}

.detail-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin: 6px 0;
}

.detail-metric-box {
  padding: 4px 8px;
  background: #ffffff;
  border: 1px solid var(--metallic-border);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease;
  min-height: 28px;
}

.detail-metric-box:hover {
  border-color: #cbd5e1;
}

.detail-metric-box-info {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.detail-metric-box i {
  font-size: 0.82rem;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.detail-metric-box small {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.detail-metric-box b {
  font-size: 0.76rem;
  color: var(--color-text-main);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

#productDetailsModal .aw-form-sheet-body {
  padding-bottom: 96px;
}

.detail-tabs-nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--metallic-border);
  margin-bottom: 10px;
  padding-bottom: 4px;
}

.detail-tab-btn {
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  padding: 4px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
}

.detail-tab-btn.active {
  color: var(--brand-primary);
  background: rgba(227, 6, 19, 0.08);
  font-weight: 800;
}

/* Shopping Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10020;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.28s ease;
}

.cart-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 380px;
  max-width: 92vw;
  background: #ffffff;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
  z-index: 10025;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

html[dir="ltr"] .cart-drawer-panel {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.25);
}

.cart-drawer-overlay.open .cart-drawer-panel {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--metallic-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}

.cart-item-card {
  display: flex;
  gap: 8px;
  padding: 3px 6px;
  border: 1px solid var(--metallic-border);
  border-radius: var(--radius-sm, 10px);
  background: #ffffff;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  position: relative;
}

.cart-item-card:hover {
  border-color: rgba(200, 16, 46, 0.3);
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.06);
}

.cart-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 3px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cart-item-unit-badge {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 700;
}

.cart-item-price {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--brand-primary, #891811);
  font-family: monospace, inherit;
}

.cart-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--metallic-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f8fafc;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cart-qty-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-main);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.cart-qty-btn:hover {
  background: #fee2e2;
  color: var(--brand-primary);
}

.cart-qty-val {
  width: 20px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 900;
  color: var(--color-text-main);
}

.cart-item-delete-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: #fff1f2;
  color: #e11d48;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.74rem;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.08);
}

.cart-item-delete-btn:hover {
  background: #e11d48;
  color: #ffffff;
  border-color: transparent;
  transform: scale(1.08);
  box-shadow: 0 3px 8px rgba(225, 29, 72, 0.25);
}

.cart-item-delete-btn:active {
  transform: scale(0.92);
}

.cart-drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--metallic-border);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Global ALWakalah GROUP Info Tooltip Component (.aw-tooltip-wrap, .aw-tooltip-btn, .aw-tooltip-bubble)
   ========================================================================== */
.aw-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.aw-tooltip-btn {
  background: none;
  border: none;
  padding: 3px;
  color: var(--brand-primary, #891811);
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  line-height: 1;
}
.aw-tooltip-btn:hover {
  color: var(--brand-primary-red, #e10606);
  transform: scale(1.18);
}
.aw-tooltip-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  max-width: 260px;
  background: #0f172a;
  color: #f8fafc;
  padding: 3px 6px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 1050;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: right;
  direction: rtl;
  animation: awTooltipFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.aw-tooltip-bubble.show {
  display: block;
}
.aw-tooltip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 12px;
  border-width: 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}
.aw-tooltip-close {
  position: absolute;
  top: 5px;
  left: 7px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.78rem;
  padding: 2px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.aw-tooltip-close:hover {
  color: #ffffff;
}
@keyframes awTooltipFade {
  from {
    opacity: 0;
    transform: translate(50%, 4px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(50%, 0) scale(1);
  }
}

/* ==========================================================================
   Global Feedback & Suggestion System Badges & Components
   ========================================================================== */
.badge-status-new {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-status-in_progress {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-status-resolved {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge-status-closed {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.badge-status-rejected {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.priority-dot-urgent {
  color: #dc2626;
}
.priority-dot-high {
  color: #f59e0b;
}
.priority-dot-medium {
  color: #3b82f6;
}
.priority-dot-low {
  color: #10b981;
}

.type-chip-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.type-chip {
  padding: 4px 8px;
  border: 1px solid var(--metallic-border, #cbd5e1);
  border-radius: var(--radius-sm, 8px);
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  transition: all 0.18s ease;
}
.type-chip input {
  display: none;
}
.type-chip.active {
  border-color: var(--brand-primary, #891811);
  background: #fff5f5;
  color: var(--brand-primary, #891811);
  box-shadow: 0 2px 5px rgba(137, 24, 17, 0.12);
}

.feedback-history-card,
.feedback-manage-card {
  background: #ffffff;
  border: 1px solid var(--metallic-border, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.feedback-history-card:hover,
.feedback-manage-card:hover {
  border-color: var(--brand-primary, #891811);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Product Description & Specifications Rich Display Cards
   ========================================================================== */
.product-info-rich-card {
  background: #ffffff;
  border: 1px solid var(--metallic-border, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.product-info-rich-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.product-info-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--metallic-border, #e2e8f0);
  font-size: 0.76rem;
  font-weight: 800;
  color: #1e293b;
}

.product-info-card-header i {
  color: var(--brand-primary, #891811);
  font-size: 0.85rem;
}

.product-info-card-body {
  padding: 8px 10px;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-line;
}

.product-specs-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-spec-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
}

.product-spec-tag-pill b {
  color: #0f172a;
  font-weight: 700;
}

/* Multilingual Form Input Tabs (تنسيق حقول الإدخال متعددة اللغات) */
.multilang-input-group {
  background: #f8fafc;
  border: 1px solid var(--metallic-border, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  padding: 8px;
  margin-bottom: 6px;
}

.multilang-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.multilang-tab-btn {
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.multilang-tab-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.multilang-tab-btn.active {
  background: var(--brand-primary, #891811);
  color: #ffffff !important;
  border-color: var(--brand-primary, #891811);
  box-shadow: 0 1px 3px rgba(137, 24, 17, 0.25);
}

.multilang-tab-pane {
  display: none;
}

.multilang-tab-pane.active {
  display: block;
}

/* ==========================================================================
   Product Comments & Interactive Discussion System (نظام تعليقات المنتجات)
   ========================================================================== */
.product-comments-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--metallic-border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comments-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-input-box {
  position: relative;
  background: #f8fafc;
  border: 1px solid var(--metallic-border, #cbd5e1);
  border-radius: var(--radius-md, 10px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.comment-input-box:focus-within {
  border-color: var(--brand-primary, #891811);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(137, 24, 17, 0.08);
}

.comment-textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  color: #1e293b;
  resize: none;
  outline: none;
  min-height: 38px;
  max-height: 80px;
}

.comment-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.comment-char-counter {
  font-weight: 700;
  color: #64748b;
  transition: color 0.2s;
}

.comment-char-counter.limit-near {
  color: #d97706;
}

.comment-char-counter.limit-max {
  color: #dc2626;
}

.comment-item {
  background: #ffffff;
  border: 1px solid var(--metallic-border, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.comment-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.comment-item.active-selected {
  border-color: var(--brand-primary, #891811);
  background: #fffafa;
  box-shadow: 0 0 0 2px rgba(137, 24, 17, 0.15);
}

.comment-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comment-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  border: 1px solid rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.comment-author-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
}

.comment-author-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.comment-date {
  font-size: 0.7rem;
  color: #94a3b8;
}

.comment-body-text {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
  word-break: break-word;
}

.comment-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.comment-reactions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.comment-reaction-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.comment-reaction-btn.reacted-agree {
  background: #ecfdf5;
  border-color: #10b981;
  color: #059669;
  font-weight: 700;
}

.comment-reaction-btn.reacted-disagree {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
  font-weight: 700;
}

.comment-replies-link {
  font-size: 0.72rem;
  color: var(--brand-primary, #891811);
  font-weight: 600;
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-replies-link:hover {
  text-decoration: underline;
}

.comment-replies-container {
  margin-top: 8px;
  padding-right: 12px;
  border-right: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-reply-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm, 8px);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Modern Metallic Loading Spinner for Comments */
.comments-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  color: var(--color-text-muted, #64748b);
  font-size: 0.76rem;
  font-weight: 700;
}

.aw-comment-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid #e2e8f0;
  border-top-color: var(--brand-primary, #891811);
  border-right-color: var(--brand-primary, #891811);
  border-radius: 50%;
  animation: awSpinnerRotate 0.75s linear infinite;
  box-shadow: 0 1px 3px rgba(137, 24, 17, 0.15);
}

@keyframes awSpinnerRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Cookie Consent Banner &Global Styles
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 460px);
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.35));
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.16),
    0 2px 8px rgba(137, 24, 17, 0.08);
  border-radius: var(--radius-md, 16px);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 99999;
  direction: rtl;
  text-align: right;
  font-family: var(--font-family, "Cairo", sans-serif);
  animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 25px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: right;
}

.cookie-icon {
  font-size: 1.6rem;
  color: var(--brand-primary, #891811);
  flex-shrink: 0;
}

.cookie-content p {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  color: var(--color-text-main, #1a1a1a);
  flex: 1;
}

.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  gap: 8px;
}

.cookie-actions .btn,
.cookie-actions button {
  flex: 1;
  min-height: 38px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm, 10px);
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  text-decoration: none;
}

.cookie-actions .btn:active,
.cookie-actions button:active {
  transform: scale(0.97);
}

.btn-cookie-accept {
  background: var(
    --brand-primary-gradient,
    linear-gradient(135deg, #e30613 0%, #891811 100%)
  ) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(137, 24, 17, 0.28) !important;
}

.btn-cookie-accept:hover {
  background: var(--brand-primary-hover, #70130e) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(137, 24, 17, 0.35) !important;
}

.btn-cookie-update {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f5f7fa 40%,
    #e2e8f0 85%,
    #cbd5e1 100%
  ) !important;
  border: 1px solid var(--brand-primary, #891811) !important;
  color: var(--metallic-dark, #1a1a1a) !important;
  box-shadow:
    inset 0 1px 1px #ffffff,
    inset 1px 0 1px rgba(255, 255, 255, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.btn-cookie-update:hover {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #ffffff 50%,
    #edf2f7 85%,
    #d5e0eb 100%
  ) !important;
  border-color: var(--brand-primary-light, #e30613) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(137, 24, 17, 0.15) !important;
}

.btn-cookie-decline {
  background: transparent !important;
  color: var(--color-text-muted, #5a5a5a) !important;
  border: 1px solid var(--metallic-border, rgba(140, 140, 140, 0.35)) !important;
}

.btn-cookie-decline:hover {
  background: rgba(140, 140, 140, 0.08) !important;
  color: var(--color-text-main, #1a1a1a) !important;
}

.pwa-install-nav-btn {
  position: relative;
  animation: pwaPulse 2.5s infinite;
}

@keyframes pwaPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@media (max-width: 480px) {
  .cookie-banner {
    bottom: 12px;
    width: calc(100% - 20px);
    padding: 14px 12px;
    gap: 10px;
  }
  .cookie-content {
    gap: 8px;
  }
  .cookie-actions {
    gap: 6px;
  }
  .cookie-actions .btn,
  .cookie-actions button {
    font-size: 0.74rem;
    padding: 6px 4px;
    min-height: 36px;
    gap: 4px;
  }
}

/* ============================================================
   Facebook-Style Threaded Comments Layout
   ============================================================ */
.comments-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fb-comment-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  position: relative;
  animation: fadeInComment 0.2s ease;
}
.fb-comment-wrap.reply-target-active .fb-comment-bubble {
  border: 1.5px solid var(--brand-primary, #891811);
  background: #fffaf9;
}
@keyframes fadeInComment {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fb-comment-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.fb-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--brand-primary, #891811) 0%,
    #c0392b 100%
  );
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.fb-comment-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.fb-comment-thread-line {
  width: 2px;
  flex: 1;
  min-height: 16px;
  background: linear-gradient(to bottom, #d1d5db 0%, transparent 100%);
  margin-top: 3px;
  border-radius: 2px;
}
.fb-comment-content-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fb-comment-bubble {
  background: #f0f2f5;
  border-radius: 0 12px 12px 12px;
  padding: 7px 11px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.fb-reply-bubble {
  border-radius: 0 10px 10px 10px;
  background: #f8fafc;
}
.fb-comment-bubble-header {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.fb-comment-author {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
}
.fb-comment-role-badge {
  font-size: 0.62rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  background: rgba(137, 24, 17, 0.1);
  color: var(--brand-primary, #891811);
}
.fb-comment-text {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.45;
  word-break: break-word;
}
.fb-comment-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 0 2px;
}
.fb-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: none;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.fb-action-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.fb-action-btn.fb-action-agreed {
  color: #16a34a;
}
.fb-action-btn.fb-action-disagreed {
  color: #dc2626;
}
.fb-action-btn.fb-action-delete {
  color: #dc2626;
  margin-right: auto;
}
.fb-action-btn.fb-action-delete:hover {
  background: #fef2f2;
}

.fb-action-count {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
}
.fb-comment-time {
  font-size: 0.66rem;
  color: #94a3b8;
  padding: 0 4px;
  white-space: nowrap;
}

.fb-view-replies-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary, #891811);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s ease;
  margin-top: 2px;
}
.fb-view-replies-btn:hover {
  background: rgba(137, 24, 17, 0.06);
  text-decoration: underline;
}

.fb-replies-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-right: 4px;
}

.fb-reply-wrap {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  animation: fadeInComment 0.2s ease;
}
.fb-reply-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.fb-reply-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.fb-reply-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.fb-reply-content-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ==========================================================================
   Role Management Modal & Permission Matrix Components (.role-modal-...)
   ========================================================================== */
.role-modal-info-card {
  background: #ffffff;
  border: 1px solid var(--metallic-border, #cbd5e1);
  border-radius: var(--radius-md, 12px);
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.role-modal-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-text-main, #0f172a);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.role-modal-card-header i {
  color: var(--brand-primary, #891811);
  font-size: 0.95rem;
}

.role-modal-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.role-modal-switch-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm, 8px);
  padding: 7px 10px;
  transition: var(--transition, all 0.2s ease);
  box-sizing: border-box;
  width: 100%;
}

.role-modal-switch-box:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.role-perm-matrix-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.role-perm-group-card {
  background: #ffffff;
  border: 1px solid var(--metallic-border, #cbd5e1);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.role-perm-group-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.role-perm-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  box-sizing: border-box;
  width: 100%;
}

.role-perm-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--color-text-main, #0f172a);
  min-width: 0;
  overflow: hidden;
}

.role-perm-group-title i {
  color: var(--brand-primary, #891811);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.role-perm-group-title span:first-of-type {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-perm-group-count {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--color-text-muted, #64748b);
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.role-perm-items-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  background: #fafbfc;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.role-perm-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  color: var(--color-text-main, #0f172a);
  background: #ffffff;
  padding: 6px 8px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid #e2e8f0;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.role-perm-checkbox-item:hover {
  border-color: var(--brand-primary, #891811);
  background: #fffafa;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(137, 24, 17, 0.07);
}

.role-perm-checkbox-item:has(input[type="checkbox"]:checked) {
  background: #fff8f8;
  border-color: rgba(137, 24, 17, 0.35);
}

.role-perm-checkbox-item input[type="checkbox"] {
  accent-color: var(--brand-primary, #891811);
  cursor: pointer;
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.role-perm-item-content {
  min-width: 0;
  flex: 1 1 0%;
  line-height: 1.25;
  overflow: hidden;
}

.role-perm-item-name {
  font-weight: 800;
  font-size: 0.72rem;
  color: #1e293b;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.role-perm-item-desc {
  font-size: 0.62rem;
  color: var(--color-text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  display: block;
}

@media (max-width: 360px) {
  .role-modal-field-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .role-perm-items-grid {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px;
  }
}
