/* ============================================================
   دؤوي — تنسيق لوحة الإدارة العامة للمنصة (Admin Dashboard CSS)
   ============================================================ */

/* ── شاشة تسجيل الدخول ────────────────────────────────────────── */
.admin-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0A1F1A, #1e293b);
  padding: var(--space-lg);
  color: white;
}

.admin-auth .auth-brand {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.admin-auth .brand-logo {
  font-size: 72px;
  margin-bottom: var(--space-sm);
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.4));
  animation: pulse 2s infinite ease-in-out;
}

.admin-auth h1 {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(to left, #FFA94D, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-auth p {
  opacity: 0.8;
  font-size: 15px;
  margin-top: 4px;
}

.admin-auth .auth-card {
  background: rgba(30, 41, 59, 0.7);

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.admin-auth .auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  text-align: center;
  color: white;
}

.admin-auth .input-label {
  color: #94a3b8;
}

.admin-auth .input-field {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-auth .input-field:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

/* ── طلبات المحفظة التفاعلية ────────────────────────────────────── */
.requests-list-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.wallet-request-card {
  background: rgba(255, 255, 255, 0.85);


  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  background: var(--bg-container);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.wallet-request-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-secondary);
}

.request-user-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.request-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.request-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.request-user-name {
  font-weight: 700;
  font-size: 16px;
}

.request-meta {
  font-size: 13px;
  color: var(--text-hint);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.request-amount-zone {
  text-align: left;
}

.request-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-primary);
}

.request-amount span {
  font-size: 14px;
  font-weight: 600;
  margin-right: 4px;
}

.request-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  justify-content: flex-end;
}

/* ── مفتاح تفعيل/إيقاف الصيدليات ──────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

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

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

/* ── الأرقام المميزة لـ Admin ────────────────────────────────── */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.report-card {
  background: var(--bg-container);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.report-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.report-icon {
  font-size: 36px;
  margin-bottom: var(--space-sm);
}

.report-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.report-label {
  font-size: 13px;
  color: var(--text-hint);
}

/* ── أنيميشن نبض لشعار الأدمن ─────────────────────────────── */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}


/* Glassmorphism Styles */
.glass-card { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05); }
.card { background: rgba(255, 255, 255, 0.85) !important; backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.05); }


/* ============================================================
   ══ 2026 ADMIN PRO MAX UPGRADE ══
   Stripe Executive Dashboard | Glass Metrics | Smooth Motion
   ============================================================ */

.report-card, .stat-card {
  border-radius: 20px !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6)) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .report-card, [data-theme="dark"] .stat-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.7)) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.report-card:hover, .stat-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 45px -10px rgba(13, 148, 136, 0.2) !important;
}

.report-value, .stat-value {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

/* ============================================================
   🔧 ADMIN DASHBOARD COLOR & FONT DESIGN ALIGNMENT (Surgical Fix)
   ============================================================ */

/* 1. ألوان خلفية شاشة تسجيل الدخول للمدير */
.admin-auth {
  background: linear-gradient(135deg, #0A1F1A, #061511) !important;
}

.admin-auth .auth-card {
  background: #0D221C !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.08) !important;
}

.admin-auth .input-field {
  background: #081E19 !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
  color: #FFFFFF !important;
}

.admin-auth .input-field:focus {
  border-color: #34D89E !important;
  box-shadow: 0 0 0 3px rgba(52, 216, 158, 0.25) !important;
}

/* 2. توحيد خطوط لوحة المدير */
body, button, input, select, textarea, .admin-auth h1, .admin-auth p, .admin-auth h2 {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
}

/* استخدام خط JetBrains Mono للأرقام والنسب والأسعار */
.report-value, 
.stat-value, 
.wallet-request-card strong, 
.percentage-display, 
.number-font, 
td, 
th,
.commission-amount,
.price-display {
  font-family: 'JetBrains Mono', monospace !important;
}

/* 3. تنظيف ألوان التقارير والإحصائيات من أي درجات أزرق */
[data-theme="dark"] .report-card, 
[data-theme="dark"] .stat-card {
  background: linear-gradient(135deg, #0D221C, #081E19) !important;
  border-color: rgba(16, 185, 129, 0.15) !important;
  color: #FFFFFF !important;
}

.report-card, .stat-card {
  background: linear-gradient(135deg, #FFFFFF, #F8FAFC) !important;
  border: 1px solid rgba(16, 185, 129, 0.1) !important;
  box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.06) !important;
}

.report-card:hover, .stat-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 45px -10px rgba(52, 216, 158, 0.15) !important;
}

/* الأزرار في لوحة الإدمن */
.btn-primary, 
button[id*="confirm"], 
button[id*="save"], 
button[class*="primary"],
.confirm-btn {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #FFFFFF !important;
}
.btn-primary:hover,
button[id*="confirm"]:hover,
button[id*="save"]:hover,
.confirm-btn:hover {
  background: #34D89E !important;
  border-color: #34D89E !important;
}

/* ============================================================
   🔧 LOCAL ICONS & DARK THEMING & LEFT SCROLL fixes (Surgical Fix)
   ============================================================ */

/* 0. تهيئة متغيرات الألوان الداكنة لمنع تداخل النصوص السوداء مع الخلفية */
:root {
  --color-primary: #10B981 !important;
  --color-primary-light: #34D89E !important;
  --color-primary-dim: #34D89E !important;
  --color-primary-bg: rgba(16, 185, 129, 0.15) !important;
  --color-secondary: #FFA94D !important;
  --color-secondary-light: #FFA94D !important;
  --bg-page: #0A1F1A !important;
  --bg-body: #0A1F1A !important;
  --bg-card: #0F2921 !important;
  --bg-container: #14332A !important;
  --bg-container-low: #0F2921 !important;
  --bg-container-high: #1A3D33 !important;
  --text-primary: #F8FAFC !important;
  --text-secondary: #9CA3AF !important;
  --text-main: #E2E8F0 !important;
  --border-color: rgba(52, 216, 158, 0.15) !important;
  --border-subtle: rgba(52, 216, 158, 0.1) !important;
}

/* 1. استضافة الأيقونات محلياً لمنع ظهور الحروف الإنجليزية */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('/fonts/material-symbols-dawaei-v1.woff2') format('woff2');
}
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* 2. فرض نظام الألوان الداكن الفخم الزمردي (نفس ألوان واجهة المريض تماماً وإلغاء الأزرق) */
body, 
#admin-dashboard, 
.dashboard, 
.dashboard-main {
  background: #0A1F1A !important;
  color: #FFFFFF !important;
}

/* تعديل الخلفية المتدرجة الجانبية */
.sidebar,
[data-theme="dark"] .sidebar {
  background: #061511 !important;
  border-inline-end: 1px solid rgba(16, 185, 129, 0.15) !important;
}

/* تعديل خلفية الهيدر */
.dashboard-header,
[data-theme="dark"] .dashboard-header {
  background: rgba(10, 31, 26, 0.95) !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15) !important;
}

/* تعديل البطاقات والصناديق لتلائم الهوية البصرية */
.card, 
.panel, 
.stat-card, 
.report-card, 
.glass-card, 
.modal-content, 
.wallet-request-card {
  background: #0F2921 !important;
  border: 1px solid rgba(16, 185, 129, 0.15) !important;
  color: #FFFFFF !important;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.04) !important;
}

/* إخفاء وتصفية أي ألوان زرقاء أو رمادية (Slate/Blue) متبقية */
.dashboard-header, 
.dashboard-main, 
.modal, 
.modal-dialog, 
.modal-body, 
.modal-footer, 
.modal-header,
[data-theme="dark"] .dashboard-header,
[data-theme="dark"] .modal-content {
  background-color: #0A1F1A !important;
}

/* الجداول وقيم الخلايا لتفادي اللون الأسود الافتراضي للمتصفح وضمان سطوع النصوص */
.inventory-table td, 
table td, 
.inventory-table th, 
table th {
  color: #FFFFFF !important;
}
.inventory-table td a, 
table td a {
  color: #34D89E !important;
}

/* حقول الإدخال */
body.admin-body .input-field,
body.admin-body input,
body.admin-body select,
body.admin-body textarea,
.input-field, 
input, 
select, 
textarea {
  background: #081E19 !important;
  border: 1.5px solid rgba(52, 216, 158, 0.2) !important;
  color: #FFFFFF !important;
}

body.admin-body .input-field:focus,
body.admin-body input:focus,
body.admin-body select:focus,
body.admin-body textarea:focus,
.input-field:focus, 
input:focus, 
select:focus, 
textarea:focus {
  border-color: #34D89E !important;
  background: #0A1F1A !important;
  box-shadow: 0 0 0 3px rgba(52, 216, 158, 0.2) !important;
}

/* إصلاح خلفية ولون نصوص الحقول التلقائية (Autofill) في كروم ومتصفحات أندرويد */
body.admin-body input:-webkit-autofill,
body.admin-body input:-webkit-autofill:hover, 
body.admin-body input:-webkit-autofill:focus,
body.admin-body textarea:-webkit-autofill,
body.admin-body textarea:-webkit-autofill:hover,
body.admin-body textarea:-webkit-autofill:focus,
body.admin-body select:-webkit-autofill,
body.admin-body select:-webkit-autofill:hover,
body.admin-body select:-webkit-autofill:focus {
  -webkit-text-fill-color: #FFFFFF !important;
  -webkit-box-shadow: 0 0 0px 1000px #081E19 inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* 3. حل مشكلة تجمد السكرول وتثبيت القائمة الجانبية في الجهة اليمنى بالتوافق التام */
html,
body,
html.admin-body, 
body.admin-body {
  overflow: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: auto !important;
  height: auto !important;
  min-height: 100vh !important;
}

body.admin-body .dashboard {
  display: block !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
}

body.admin-body #admin-dashboard.hidden,
body.admin-body .dashboard.hidden {
  display: none !important;
}

body.admin-body .dashboard-main {
  overflow: visible !important;
  height: auto !important;
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
}

body.admin-body .panel, 
body.admin-body .orders-panel, 
body.admin-body .inventory-panel, 
body.admin-body .content-panel {
  overflow: visible !important;
  overflow-y: visible !important;
  height: auto !important;
  flex: none !important; /* إلغاء التمدد القسري للسماح للوحة بالنمو الطبيعي */
}

body.admin-body .sidebar {
  position: fixed !important;
  height: 100vh !important;
  overflow-y: auto !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 240px !important;
  z-index: 1000 !important;
}

body.admin-body .dashboard-main {
  margin-right: 240px !important;
  width: calc(100% - 240px) !important;
}

/* دعم شاشات الموبايل لوحة الإدارة بالتوافق التام */
@media (max-width: 768px) {
  body.admin-body .sidebar {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
  }
  body.admin-body .dashboard-main {
    margin-right: 0 !important;
    width: 100% !important;
  }
}

/* تحسين توافق محاذاة شارات وأزرار الشريط الجانبي في اللغة العربية للمتصفحات القديمة */
body.admin-body .sidebar-btn {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  text-align: right !important;
}

body.admin-body .sidebar-badge {
  margin-right: auto !important; /* دفع الشارة إلى اليسار في وضع RTL */
  margin-left: 0 !important;
}

/* تجنب تعميم اللون الأبيض على شارات الحالة الملونة لضمان وضوح تباينها */
body.admin-body .badge-green {
  color: #34D89E !important;
  background-color: rgba(52, 216, 158, 0.15) !important;
}

body.admin-body .badge-red {
  color: #EF4444 !important;
  background-color: rgba(239, 68, 68, 0.15) !important;
}

/* ── تحسين تباين وجمالية جداول العمولات والمخزون للإدارة العامة ── */
html[data-theme="dark"] .admin-body .inventory-table th,
html[data-theme="dark"] .admin-body table th,
.admin-body[data-theme="dark"] .inventory-table th,
.admin-body[data-theme="dark"] table th,
.admin-body .inventory-table th,
.admin-body table th {
  background-color: #102e26 !important; /* خلفية زمردية داكنة متناسقة مع الهوية */
  color: #34D89E !important; /* أخضر فاتح للتسميات */
  font-weight: 700 !important;
  font-size: 13px !important;
  border-bottom: 2px solid rgba(52, 216, 158, 0.3) !important;
  text-align: right !important;
  padding: 14px 16px !important;
}

html[data-theme="dark"] .admin-body .inventory-table td,
html[data-theme="dark"] .admin-body table td,
.admin-body[data-theme="dark"] .inventory-table td,
.admin-body[data-theme="dark"] table td,
.admin-body .inventory-table td,
.admin-body table td {
  color: #FFFFFF !important; /* نصوص بيضاء نقية لسهولة القراءة الكلية */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 13.5px !important;
  padding: 14px 16px !important;
}

html[data-theme="dark"] .admin-body .inventory-table tr:hover td,
html[data-theme="dark"] .admin-body table tr:hover td,
.admin-body[data-theme="dark"] .inventory-table tr:hover td,
.admin-body .inventory-table tr:hover td {
  background-color: rgba(16, 185, 129, 0.08) !important;
}

/* تنسيق متقدم للقيم داخل تقرير العمولات المفصل */
html[data-theme="dark"] .admin-body #commissions-tbody td,
.admin-body #commissions-tbody td {
  color: #e2e8f0 !important; /* رمادي فاتح للخلايا الافتراضية */
}

/* عمود رقم المعاملة الفريد */
html[data-theme="dark"] .admin-body #commissions-tbody td:first-child,
.admin-body #commissions-tbody td:first-child {
  color: #ffffff !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

/* عمود الصيدلية */
html[data-theme="dark"] .admin-body #commissions-tbody td:nth-child(2),
.admin-body #commissions-tbody td:nth-child(2) {
  font-weight: 600 !important;
  color: #ffffff !important;
}

/* عمود مبلغ الطلب الكلي */
html[data-theme="dark"] .admin-body #commissions-tbody td:nth-child(3),
.admin-body #commissions-tbody td:nth-child(3) {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 600 !important;
  color: #e2e8f0 !important;
}

/* عمود نسبة العمولة */
html[data-theme="dark"] .admin-body #commissions-tbody td:nth-child(4),
.admin-body #commissions-tbody td:nth-child(4) {
  font-weight: 600 !important;
  color: #ffaa4d !important; /* كهرماني تنبيهي متناسق مع شارات التنبيه */
}

/* عمود صافي ربح المنصة */
html[data-theme="dark"] .admin-body #commissions-tbody td:nth-child(5),
.admin-body #commissions-tbody td:nth-child(5) {
  color: #34D89E !important; /* أخضر فاتح مشع وواضح جداً */
  font-weight: 700 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 14.5px !important;
}

/* عمود التاريخ والوقت */
html[data-theme="dark"] .admin-body #commissions-tbody td:last-child,
.admin-body #commissions-tbody td:last-child {
  color: #94a3b8 !important; /* لون جانبي واضح وغير مشوش */
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12.5px !important;
}

