
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
html, body { overflow-x: hidden; width: 100%; position: relative; scroll-behavior: smooth; background: transparent !important; }
body, button, input, select, textarea, label, h1, h2, h3, h4, p, span, a { font-family: 'Cairo', Tahoma, Arial, sans-serif; }
body { color: #1a1a2e; min-height: 100vh; padding-bottom: 90px; }

/* ✅ الإصلاح: استخدام .main-cards فقط */
.container { max-width: 720px; margin: 160px auto 20px; padding: 15px; width: 100%; display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }
body.cards-hidden > .container.main-cards { display: none !important; }
.header-fixed {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(135deg, #E67E22 0%, #D35400 50%, #A04000 100%);
  color: #fff; padding: 1rem 1rem 1.3rem; text-align: center;
  border-radius: 0 0 35px 35px;
  box-shadow: 0 8px 32px rgba(160,64,0,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  min-height: 130px;
}
.header-content {
  position: relative; z-index: 1; display: flex !important; flex-direction: row !important;
  align-items: center !important; justify-content: space-between !important; gap: 0.8rem; flex-wrap: wrap;
}
.header-logo {
  width: auto !important; height: 42px !important; padding: 0 12px !important;
  background: rgba(255,255,255,0.95); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Aref Ruqaa', serif !important;
  font-size: 14px !important; font-weight: 700 !important;
  border: 2px solid rgba(255,255,255,0.4); backdrop-filter: blur(10px);
  animation: logoFloat 3s ease-in-out infinite; flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(160,64,0,0.2);
  color: #A04000 !important;
}
@keyframes logoFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
.header-title-container { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; min-width: 0; }
.header-title { font-size: 1.15rem !important; font-weight: 800; margin: 0; text-shadow: 0 2px 6px rgba(0,0,0,0.15); line-height: 1.25; color: #fff; white-space: nowrap; }
.header-subtitle { font-size: 0.72rem; opacity: 0.92; margin: 0.2rem 0 0; font-weight: 500; color: rgba(255,255,255,0.95); white-space: nowrap; }
.header-datetime { font-size: 0.68rem; opacity: 0.95; margin-top: 4px; background: rgba(255,255,255,0.25); padding: 3px 10px; border-radius: 15px; backdrop-filter: blur(5px); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.header-logout-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.4); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.header-logout-btn:hover { background: rgba(255,255,255,0.35); transform: scale(1.08); }

.login-screen {
  position: fixed; inset: 0; z-index: 2000;
  background: linear-gradient(135deg, #E67E22 0%, #D35400 50%, #A04000 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-box {
  background: #FFFFFF; border-radius: 24px; padding: 30px 25px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalSlideIn 0.4s ease;
}
@keyframes modalSlideIn { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.login-logo { text-align: center; margin-bottom: 20px; }
.login-logo-icon {
  width: 70px; height: 70px; margin: 0 auto 15px;
  background: linear-gradient(135deg, #E67E22, #D35400);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: #fff;
  box-shadow: 0 8px 25px rgba(230,126,34,0.4);
}
.login-title { font-size: 20px; font-weight: 800; color: #A04000; margin-bottom: 5px; font-family: 'Aref Ruqaa', serif; }
.login-subtitle { font-size: 13px; color: #666; margin-bottom: 25px; text-align: center; }

.main-card {
  background: #FFFFFF; border-radius: 18px; padding: 20px 15px; text-align: center;
  border: 1px solid rgba(230,126,34,0.3); box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transition: all 0.3s ease; cursor: pointer; border-right: 5px solid #E67E22;
  display: flex !important; flex-direction: column !important;
  align-items: center !important; justify-content: center !important;
  gap: 10px !important; min-height: 120px !important;
}
.main-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 36px rgba(230,126,34,0.28); border-right-color: #A04000; }
.main-card:active { transform: scale(0.98); }
.main-card i {
  font-size: 28px !important; width: 56px !important; height: 56px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(230,126,34,0.15), rgba(211,84,0,0.1)) !important;
  color: #A04000 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  border: 1px solid rgba(160,64,0,0.15);
}
.main-card h3 { font-size: 13px !important; font-weight: 700 !important; color: #1a1a2e !important; margin: 0 !important; line-height: 1.3 !important; }
.main-card p { font-size: 10px !important; color: #667085 !important; margin: 0 !important; }

.section-view {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: #fff; z-index: 2000; padding: 20px;
  overflow-y: auto; padding-bottom: 100px;
}
.section-view.active { display: block; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 15px;
  border-bottom: 2px solid rgba(230,126,34,0.2);
}
.section-header h3 { margin: 0; color: #A04000; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.btn-back {
  background: rgba(230,126,34,0.1); color: #A04000;
  border: none; padding: 8px 16px; border-radius: 10px;
  font-family: 'Cairo'; font-weight: 600; font-size: 13px;
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  transition: 0.2s;
}
.btn-back:hover { background: rgba(230,126,34,0.2); transform: translateX(-2px); }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); z-index: 10001; display: none; align-items: center; justify-content: center; padding: 15px; }
.modal.show { display: flex; }
.modal-content { background: #fff; border-radius: 22px; padding: 22px; width: 100%; max-width: 700px; box-shadow: 0 20px 60px rgba(160,64,0,0.3); max-height: 90vh; overflow-y: auto; position: relative; border: 3px solid #E67E22; animation: modalSlideIn 0.3s ease; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid rgba(230,126,34,0.25); }
.modal-header h3 { margin: 0; color: #A04000; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-close { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #E67E22, #D35400); color: #fff; border: none; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.modal-close:hover { transform: scale(1.1); }

.input-group { margin-bottom: 14px; text-align: right; }
.input-group label { display: block; margin-bottom: 6px; font-weight: 700; color: #333; font-size: 13px; }
.input-group input, .input-group select, .input-group textarea { 
  width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #ddd; 
  font-size: 14px; background: #f9f9f9; direction: rtl; 
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { 
  outline: none; border-color: #E67E22; box-shadow: 0 0 0 3px rgba(230,126,34,0.2); background: #fff; 
}
.input-group input[readonly] { background: #FFF5E6; color: #A04000; font-weight: 700; }

.action-btn { 
  padding: 14px 20px !important; border-radius: 14px !important; border: none !important;
  font-weight: 700 !important; font-size: 14px !important; cursor: pointer !important; transition: all 0.2s !important; 
  display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
  width: 100% !important;
}
.action-btn.primary { background: linear-gradient(135deg, #E67E22, #D35400) !important; color: #fff !important; }
.action-btn.success { background: #28a745 !important; color: #fff !important; }
.action-btn.warning { background: #ffc107 !important; color: #111 !important; }
.action-btn.danger { background: #dc3545 !important; color: #fff !important; }
.action-btn.info { background: #17a2b8 !important; color: #fff !important; }
.action-btn.secondary { background: #6c757d !important; color: #fff !important; }
.action-btn:hover { transform: translateY(-2px) !important; opacity: 0.95 !important; box-shadow: 0 6px 20px rgba(0,0,0,0.2) !important; }

.filter-box {
  background: #FFF9F0; padding: 15px; border-radius: 12px; margin-bottom: 15px;
  border: 1px solid rgba(230,126,34,0.3);
}
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.report-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.report-table th { background: linear-gradient(135deg, #E67E22, #D35400); color: #fff; padding: 10px 6px; text-align: center; font-weight: 700; font-size: 11px; }
.report-table td { padding: 8px 6px; border-bottom: 1px solid #eee; text-align: center; font-size: 11px; }
.report-table tr:hover { background: #FFF9F0; }
.report-table tfoot { background: #FFF5E6; font-weight: 700; }
.report-table tfoot td { padding: 10px 6px; }

.data-list { margin-top: 15px; max-height: 400px; overflow-y: auto; }
.data-item { 
  background: #FFFFFF; border-radius: 12px; padding: 12px; margin-bottom: 10px; 
  display: flex; flex-direction: column; align-items: stretch; 
  border: 1px solid rgba(230,126,34,0.25); transition: all 0.2s; border-right: 4px solid #E67E22; 
}
.data-item:hover { background: #FFF9F0; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(230,126,34,0.15); }
.data-item-name { font-weight: 700; color: #1a1a2e; font-size: 14px; margin-bottom: 4px; }
.data-item-detail { font-size: 11px; color: #556070; margin-top: 2px; }

.toast { 
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); 
  background: #FFFFFF; color: #1a1a2e;
  padding: 14px 24px 14px 18px; border-radius: 16px; z-index: 10002; 
  display: none; font-size: 13px; font-weight: 600; 
  animation: toastSlide 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15); border: 2px solid #E67E22;
  min-width: 280px; max-width: 90%; align-items: center; gap: 12px;
}
.toast.show { display: flex; }
.toast-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.toast-content { flex: 1; text-align: right; line-height: 1.4; }
.toast.success { border-color: #28a745; }
.toast.success .toast-icon { background: rgba(40,167,69,0.15); color: #28a745; }
.toast.warning { border-color: #ffc107; }
.toast.warning .toast-icon { background: rgba(255,193,7,0.15); color: #f39c12; }
.toast.error { border-color: #dc3545; }
.toast.error .toast-icon { background: rgba(220,53,69,0.15); color: #dc3545; }
@keyframes toastSlide { from { transform: translateX(-50%) translateY(-50px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

.ios-nav { 
  position: fixed; bottom: 12px; left: 12px; right: 12px; 
  background: #FFFFFF; backdrop-filter: blur(20px); 
  display: flex; justify-content: space-around; padding: 10px 0; 
  border-radius: 26px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
  z-index: 10000; border: 1px solid rgba(230,126,34,0.3); 
}
   .ios-nav a { flex: 1; text-align: center; text-decoration: none; color: #667085; font-size: 11px; font-weight: 600; transition: color 0.2s; }
.ios-nav a i { display: block; font-size: 24px; margin-bottom: 3px; }
.ios-nav a.active { color: #A04000; }
.ios-nav a.active i { color: #E67E22; }

.shop-card {
  background: #FFFFFF; border-radius: 16px; padding: 15px; margin-bottom: 12px;
  border: 2px solid rgba(230,126,34,0.3); transition: all 0.2s;
}
.shop-card:hover { border-color: #E67E22; box-shadow: 0 4px 16px rgba(230,126,34,0.15); }
.shop-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #ddd;
  flex-wrap: wrap; gap: 8px;
}
.shop-card-name { font-weight: 700; font-size: 15px; color: #A04000; }
.shop-card-marketer { font-size: 11px; color: #666; margin-top: 3px; }
.shop-card-balance { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 10px; }
.balance-paid { background: rgba(40,167,69,0.15); color: #28a745; }
.balance-debt { background: rgba(220,53,69,0.15); color: #dc3545; }
.balance-zero { background: rgba(108,117,125,0.15); color: #6c757d; }

@media (max-width: 768px) {
  .header-fixed { padding: 0.9rem 0.8rem 1.1rem; min-height: 115px; border-radius: 0 0 28px 28px; }
  .header-title { font-size: 1.05rem !important; }
  .header-logo { font-size: 12px !important; padding: 0 10px !important; }
  .container { gap: 10px !important; padding: 12px !important; margin-top: 145px !important; }
  .main-card { min-height: 105px !important; padding: 15px 10px !important; }
  .main-card i { width: 48px !important; height: 48px !important; font-size: 22px !important; }
  .main-card h3 { font-size: 12px !important; }
  .section-view { padding: 15px; }
  .section-header h3 { font-size: 16px; }
  .btn-back { padding: 6px 12px; font-size: 12px; }
  .filter-row { grid-template-columns: 1fr; }
  .report-table { font-size: 10px; }
  .report-table th, .report-table td { padding: 6px 3px; font-size: 10px; }
  .modal-content { padding: 15px; }
}
@keyframes shakeIcon { 
    0%, 100% { transform: rotate(0deg); } 
    25% { transform: rotate(-10deg); } 
    75% { transform: rotate(10deg); } 
}
/* تحسين مظهر الشريط السفلي ليتسع لـ 5 أيقونات */
   /* تحسين مظهر الشريط السفلي ليتسع لـ 5 أيقونات */
   .ios-nav a { font-size: 10px !important; }
   .ios-nav a i { font-size: 20px !important; margin-bottom: 2px !important; }
/* ✅ إصلاح مشكلة الشريط السفلي */
.section-view {
    padding-bottom: 120px !important;  /* زيادة المسافة السفلية */
}

.modal-content {
    padding-bottom: 100px !important;  /* زيادة مساحة التمرير داخل المودال */
    margin-bottom: 80px !important;
}

/* ✅ للشاشات الصغيرة */
@media (max-width: 768px) {
    .modal-content {
        max-height: 80vh !important;
        padding-bottom: 80px !important;
    }
    
    .section-view {
        padding-bottom: 140px !important;
    }
}



/* =========================================================
   1. الوضع العادي: خلفية بيضاء + رموز برتقالية واضحة
   ========================================================= */
body {
  background: transparent !important; 
}
.bg-3d-container {
  position: fixed; inset: 0; z-index: -1; /* خلف كل العناصر */
  overflow: hidden; pointer-events: none;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; /* تحت الخلفية المتحركة */
  background: #ffffff; /* هذه هي الخلفية البيضاء النقية */
}

/* شبكة برتقالية واضحة */
.grid-floor {
  position: absolute; top: 0; left: -50%; width: 200%; height: 200%;
  background-image: linear-gradient(rgba(230,126,34,0.35) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(230,126,34,0.35) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: rotateX(70deg) translateY(-50%);
  animation: gridMove 8s linear infinite;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
}
@keyframes gridMove { 0% { transform: rotateX(70deg) translateY(0); } 100% { transform: rotateX(70deg) translateY(60px); } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* خطوط عمودية برتقالية واضحة */
.vertical-lines {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(230,126,34,0.25) 100px, rgba(230,126,34,0.25) 101px);
  animation: verticalMove 15s linear infinite;
}
@keyframes verticalMove { 0% { transform: translateX(0); } 100% { transform: translateX(100px); } }

/* أشكال عائمة برتقالية واضحة */
.floating-shapes { position: absolute; inset: 0; overflow: hidden; }
.shape {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(230,126,34,0.3), transparent 70%);
  animation: floatShape 20s infinite ease-in-out; filter: blur(2px);
}
.shape-1 { width: 300px; height: 300px; top: 10%; left: 10%; animation-duration: 25s; }
.shape-2 { width: 200px; height: 200px; top: 60%; right: 15%; background: radial-gradient(circle, rgba(211,84,0,0.25), transparent 70%); animation-delay: 5s; animation-duration: 30s; }
.shape-3 { width: 250px; height: 250px; bottom: 20%; left: 40%; background: radial-gradient(circle, rgba(230,126,34,0.25), transparent 70%); animation-delay: 10s; animation-duration: 22s; }
.shape-4 { width: 150px; height: 150px; top: 30%; right: 30%; background: radial-gradient(circle, rgba(243,156,18,0.3), transparent 70%); animation-delay: 3s; animation-duration: 28s; }
@keyframes floatShape { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, 50px) scale(0.95); } }

/* أمواج برتقالية واضحة */
.waves { position: absolute; bottom: 0; left: 0; width: 100%; height: 200px; overflow: hidden; }
.wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; background-repeat: repeat-x; background-size: 50% 100%; }
.wave-1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C150,100 350,20 600,60 C850,100 1050,20 1200,60 L1200,120 L0,120 Z' fill='rgba(230,126,34,0.25)'/%3E%3C/svg%3E");
  animation: waveMove 12s linear infinite;
}
.wave-2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C150,100 350,20 600,60 C850,100 1050,20 1200,60 L1200,120 L0,120 Z' fill='rgba(211,84,0,0.2)'/%3E%3C/svg%3E");
  animation: waveMove 8s linear infinite reverse; bottom: -20px;
}
@keyframes waveMove { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* جسيمات برتقالية لتظهر على الخلفية البيضاء */
.particles { position: absolute; inset: 0; overflow: hidden; }
.particle {
  position: absolute; background: rgba(230,126,34,0.6); border-radius: 50%;
  animation: particleFloat 15s infinite linear; box-shadow: 0 0 8px rgba(230,126,34,0.5);
}
@keyframes particleFloat {
  0% { transform: translateY(100vh) translateX(0) scale(0); opacity: 0; }
  10% { opacity: 1; transform: translateY(90vh) translateX(10px) scale(1); }
  90% { opacity: 0.8; }
  100% { transform: translateY(-10vh) translateX(50px) scale(0); opacity: 0; }
}


/* =========================================================
   2. الوضع الليلي: خلفية سوداء بتوهج برتقالي + رموز بيضاء
   ========================================================= */
body.dark-mode {
  background: transparent !important; 
}
body.dark-mode::before {
  /* خلفية سوداء مع توهج برتقالي خفيف في المنتصف */
  background: radial-gradient(circle at center, #1a0f05 0%, #0a0502 40%, #000000 100%) !important;
}

/* تحويل جميع الرموز المتحركة إلى اللون الأبيض في الوضع الليلي */
body.dark-mode .grid-floor {
  background-image: linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px);
}
body.dark-mode .vertical-lines {
  background-image: repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(255,255,255,0.1) 100px, rgba(255,255,255,0.1) 101px);
}
body.dark-mode .shape {
  background: radial-gradient(circle, rgba(255,255,255,0.2), transparent 70%);
}
body.dark-mode .wave-1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C150,100 350,20 600,60 C850,100 1050,20 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E");
}
body.dark-mode .wave-2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C150,100 350,20 600,60 C850,100 1050,20 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E");
}
body.dark-mode .particle {
  background: rgba(255,255,255,0.7);
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

/* الهيدر في الوضع الليلي (أسود بحواف برتقالية متوهجة) */
body.dark-mode .header-fixed {
  background: #000000 !important;
  border: 2px solid #E67E22 !important;
  border-top: none !important;
  border-radius: 0 0 35px 35px !important;
  box-shadow: 0 8px 32px rgba(230, 126, 34, 0.4) !important; /* توهج برتقالي */
}
body.dark-mode .header-title,
body.dark-mode .header-subtitle,
body.dark-mode .header-datetime {
  color: #E67E22 !important;
}

/* باقي عناصر الواجهة في الوضع الليلي */
body.dark-mode .main-card,
body.dark-mode .modal-content,
body.dark-mode .data-item,
body.dark-mode .shop-card,
body.dark-mode .filter-box,
body.dark-mode .login-box {
  background: rgba(15, 15, 15, 0.95) !important;
  border-color: rgba(230,126,34,0.4) !important;
  color: #e0e0e0 !important;
}
body.dark-mode .main-card h3,
body.dark-mode .data-item-name,
body.dark-mode .shop-card-name,
body.dark-mode .modal-header h3,
body.dark-mode .login-title {
  color: #FFD700 !important;
}
body.dark-mode .input-group input,
body.dark-mode .input-group select,
body.dark-mode .input-group textarea {
  background: #111111; color: #fff; border-color: #E67E22;
}
body.dark-mode .ios-nav {
  background: rgba(0, 0, 0, 0.95); border-color: rgba(230,126,34,0.4);
}
body.dark-mode .ios-nav a.active { color: #E67E22; }

/* =========================================================
   2. الوضع الليلي: خلفية سوداء بتوهج برتقالي + رموز بيضاء
   ========================================================= */
body.dark-mode {
  background: #000000 !important;
}
body.dark-mode::before {
  /* خلفية سوداء مع توهج برتقالي خفيف في المنتصف */
  background: radial-gradient(circle at center, #1a0f05 0%, #0a0502 40%, #000000 100%) !important;
}

/* تحويل جميع الرموز المتحركة إلى اللون الأبيض في الوضع الليلي */
body.dark-mode .grid-floor {
  background-image: linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px), 
                    linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px);
}
body.dark-mode .vertical-lines {
  background-image: repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(255,255,255,0.1) 100px, rgba(255,255,255,0.1) 101px);
}
body.dark-mode .shape {
  background: radial-gradient(circle, rgba(255,255,255,0.2), transparent 70%);
}
body.dark-mode .wave-1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C150,100 350,20 600,60 C850,100 1050,20 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E");
}
body.dark-mode .wave-2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C150,100 350,20 600,60 C850,100 1050,20 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E");
}
body.dark-mode .particle {
  background: rgba(255,255,255,0.7);
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

/* الهيدر في الوضع الليلي (أسود بحواف برتقالية متوهجة) */
body.dark-mode .header-fixed {
  background: #000000 !important;
  border: 2px solid #E67E22 !important;
  border-top: none !important;
  border-radius: 0 0 35px 35px !important;
  box-shadow: 0 8px 32px rgba(230, 126, 34, 0.4) !important; /* توهج برتقالي */
}
body.dark-mode .header-title,
body.dark-mode .header-subtitle,
body.dark-mode .header-datetime {
  color: #E67E22 !important;
}

/* باقي عناصر الواجهة في الوضع الليلي لتتناسق مع الخلفية السوداء */
body.dark-mode .main-card,
body.dark-mode .modal-content,
body.dark-mode .data-item,
body.dark-mode .shop-card,
body.dark-mode .filter-box,
body.dark-mode .login-box {
  background: rgba(15, 15, 15, 0.95) !important;
  border-color: rgba(230,126,34,0.4) !important;
  color: #e0e0e0 !important;
}
body.dark-mode .main-card h3,
body.dark-mode .data-item-name,
body.dark-mode .shop-card-name,
body.dark-mode .modal-header h3,
body.dark-mode .login-title {
  color: #FFD700 !important;
}
body.dark-mode .input-group input,
body.dark-mode .input-group select,
body.dark-mode .input-group textarea {
  background: #111111; color: #fff; border-color: #E67E22;
}
body.dark-mode .ios-nav {
  background: rgba(0, 0, 0, 0.95); border-color: rgba(230,126,34,0.4);
}
body.dark-mode .ios-nav a.active { color: #E67E22; }
