/* ============================================================
   DASHBOARD REDESIGN — Left Insights Sidebar & Visual Hierarchy
   ------------------------------------------------------------
   كل الكروت والمؤشرات والرسومات متجمعة في قائمة جانبيّة منظمّة على
   الشمال، بألوان داكنة راقية (Dark Emerald/Glassmorphism) مريحة للعين
   ونسق بصري عالي التباين والوضوح لجميع الأرقام والنصوص.
   ============================================================ */

/* ── Lock Dashboard Viewport (Zero Page Scroll / Fixed Map) ── */
body, html {
  overflow-x: hidden !important;
}

/* Ensure map filter toolbar accommodates both rows smoothly without clipping */
.gis-map-toolbar {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  padding: 10px 16px !important;
}

/* Row 2: Filters Bar + Actions Bar */
.gis-map-toolbar .pc {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 50px !important;
  max-height: none !important;
  overflow: visible !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

.gis-map-toolbar .map-filters-inline {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 8px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.gis-map-toolbar .map-filters-inline::-webkit-scrollbar {
  display: none !important;
}

.gis-map-toolbar .map-toolbar-actions-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  margin-bottom: 1px !important;
}

/* لا يجب تحديد display هنا — الـ JS هو المتحكم في إخفاء/إظهار الفلاتر */
.gis-map-toolbar .filter-label-group {
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

/* لما بيظهر الـ JS يخلية flex */
.gis-map-toolbar .filter-label-group.filter-step-visible {
  display: flex !important;
}

/* ── مؤقت: إخفاء فلتر "الفئة" لأنه متحكم فيه من القائمة الجانبية ── */
#data-category-filter-wrap {
  display: none !important;
}

.gis-map-toolbar select.ps, 
.gis-map-toolbar button {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* ── Wrapper: Grid spacing & layout ── */
.gis-dashboard-wrapper {
  grid-template-columns: 1fr 400px;
  align-items: start;
}

@media (max-width: 1300px) {
  .gis-dashboard-wrapper {
    grid-template-columns: 1fr 350px;
  }
}

/* ── السايدبار الرئيسي ── */
.dash-insights-sidebar {
  background: linear-gradient(180deg, #06190e 0%, #092214 50%, #061a0f 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.22) !important;
  border-radius: 18px !important;
  padding: 16px 14px 24px !important;

  position: sticky;
  top: 12px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35) !important;

  scrollbar-width: thin;
  scrollbar-color: rgba(52, 211, 153, 0.35) transparent;

  /* CSS Variables local override for maximum clarity & contrast */
  --t1: #ffffff;
  --t2: #e2e8f0;
  --t3: #a7f3d0;
  --bg: rgba(0, 0, 0, 0.25);
  --sf: rgba(255, 255, 255, 0.055);
  --sf2: rgba(255, 255, 255, 0.09);
  --bd: rgba(255, 255, 255, 0.12);
  --bd2: rgba(255, 255, 255, 0.18);
  --g0: rgba(255, 255, 255, 0.08);
  --shl: none;
  --sh: none;
}

.dash-insights-sidebar::-webkit-scrollbar {
  width: 6px;
}
.dash-insights-sidebar::-webkit-scrollbar-thumb {
  background: rgba(52, 211, 153, 0.35);
  border-radius: 10px;
}
.dash-insights-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(52, 211, 153, 0.65);
}
.dash-insights-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

/* عناوين الأقسام الفاصلة جوه السايدبار */
.dash-insights-heading {
  font-size: 12px;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 4px 6px;
  margin-top: 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dash-insights-heading:first-child {
  margin-top: 0;
  padding-top: 0;
}

/* ── فك التكديس: جعل كل الكروت عمود واحد منظم وواضح ── */
.dash-insights-sidebar .kg.kg-compact,
.dash-insights-sidebar .kpi-columns-grid,
.dash-insights-sidebar .g3,
.dash-insights-sidebar .g2 {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
  grid-template-columns: unset !important;
}

.dash-insights-sidebar .g3 { margin-top: 4px !important; }
.dash-insights-sidebar .dashboard-kpis-wrapper { margin-top: 4px !important; margin-bottom: 4px !important; }
.dash-insights-sidebar .gis-panel { flex: unset; }

/* ── تصميم الكروت Glassmorphic راقي ومريح للعين ── */
.dash-insights-sidebar.gis-kpi-sidebar-compact .kc,
.dash-insights-sidebar .gis-stat-card,
.dash-insights-sidebar .kpi-column-card,
.dash-insights-sidebar .pn.gis-panel,
.dash-insights-sidebar .dashboard-kpis-wrapper,
.dash-insights-sidebar .top-gov-badge-compact {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
  padding: 15px 16px !important;
  border-radius: 16px !important;
  transition: all 0.25s ease !important;
}

.dash-insights-sidebar .kc:hover,
.dash-insights-sidebar .gis-stat-card:hover,
.dash-insights-sidebar .pn.gis-panel:hover {
  border-color: rgba(52, 211, 153, 0.35) !important;
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.12) !important;
}

/* شارة "أعلى محافظة" */
.dash-insights-sidebar .top-gov-badge-compact {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25) 0%, rgba(217, 119, 6, 0.1) 100%) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

/* ── نصوص وعناوين الكروت ── */
.dash-insights-sidebar.gis-kpi-sidebar-compact .kl,
.dash-insights-sidebar .gis-stat-label,
.dash-insights-sidebar .dashboard-kpi-title {
  font-size: 13.5px !important;
  color: #e2e8f0 !important;
  font-weight: 700 !important;
}

.dash-insights-sidebar .kl i {
  font-size: 13px !important;
  margin-left: 6px;
}

.dash-insights-sidebar .kc.cg .kl i { color: #34d399 !important; }
.dash-insights-sidebar .kc.cr .kl i { color: #f87171 !important; }
.dash-insights-sidebar .kc.cp .kl i { color: #fbbf24 !important; }
.dash-insights-sidebar .kc.cb .kl i { color: #60a5fa !important; }

/* ── الأرقام الرئيسية (High Legibility & Bright Contrast) ── */
.dash-insights-sidebar.gis-kpi-sidebar-compact .kv,
.dash-insights-sidebar .gis-stat-value,
.dash-insights-sidebar .kv[id] {
  font-size: 26px !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  line-height: 1.15 !important;
}

/* التمييز باللون لكل نوع كرت رئيسي */
.dash-insights-sidebar .kc.cg .kv { color: #ffffff !important; }
.dash-insights-sidebar .kc.cr .kv { color: #ffffff !important; }
.dash-insights-sidebar .kc.cp .kv { color: #ffffff !important; }
.dash-insights-sidebar .kc.cb .kv { color: #ffffff !important; }

/* تمييز وحدات التمييز (طن / فدان) */
.dash-insights-sidebar.gis-kpi-sidebar-compact .kv span {
  color: #a7f3d0 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  margin-right: 4px !important;
}

/* ── شارات المؤشرات الفرعية (.ks / .ks-sub) ── */
.dash-insights-sidebar.gis-kpi-sidebar-compact .ks,
.dash-insights-sidebar .gis-stat-sub {
  font-size: 11.5px !important;
  color: #6ee7b7 !important;
  background: rgba(52, 211, 153, 0.12) !important;
  border: 1px solid rgba(52, 211, 153, 0.25) !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  margin-top: 6px !important;
}

/* شارات المخلفات الرطبة والجافة */
.dash-insights-sidebar .kc.gis-kpi #k-wet-residue-sub {
  color: #7dd3fc !important;
  background: rgba(14, 165, 233, 0.15) !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
}
.dash-insights-sidebar .kc.gis-kpi #k-dry-residue-sub {
  color: #fde047 !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

/* أيقونات الخلفية الباهتة للكروت (.ki) */
.dash-insights-sidebar .ki {
  top: 12px !important;
  left: 48px !important;
  font-size: 26px !important;
  opacity: 0.16 !important;
}

/* ── كروت نوع الأراضي (قديمة / جديدة / كلي) ── */
.dash-insights-sidebar .kpi-column-card {
  border-top: 3px solid rgba(255, 255, 255, 0.25) !important;
}

.dash-insights-sidebar .kpi-column-card.old {
  border-top-color: #fbbf24 !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
}
.dash-insights-sidebar .kpi-column-card.old > div:first-child {
  color: #fbbf24 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  padding-bottom: 8px;
}

.dash-insights-sidebar .kpi-column-card.new {
  border-top-color: #34d399 !important;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
}
.dash-insights-sidebar .kpi-column-card.new > div:first-child {
  color: #34d399 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  border-bottom: 1px solid rgba(52, 211, 153, 0.2);
  padding-bottom: 8px;
}

.dash-insights-sidebar .kpi-column-card.total {
  border-top-color: #60a5fa !important;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
}
.dash-insights-sidebar .kpi-column-card.total > div:first-child {
  color: #60a5fa !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  padding-bottom: 8px;
}

/* الأيقونات داخل كروت الأراضي */
.dash-insights-sidebar .kpi-column-card.old .gis-stat-icon {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.18) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}
.dash-insights-sidebar .kpi-column-card.new .gis-stat-icon {
  color: #34d399 !important;
  background: rgba(52, 211, 153, 0.18) !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
}
.dash-insights-sidebar .kpi-column-card.total .gis-stat-icon {
  color: #60a5fa !important;
  background: rgba(96, 165, 250, 0.18) !important;
  border: 1px solid rgba(96, 165, 250, 0.3) !important;
}

/* ── رؤوس البانلز واللوحات الجانبية ── */
.dash-insights-sidebar .ph.gis-ph {
  padding: 10px 4px 12px !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  flex-wrap: wrap;
  align-items: center !important;
}

.dash-insights-sidebar .ph.gis-ph h3 {
  font-size: 15px !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* أيقونات رؤوس البانلز */
.dash-insights-sidebar .pi.pia { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.dash-insights-sidebar .pi.pig { background: linear-gradient(135deg, #10b981, #059669) !important; }
.dash-insights-sidebar .pi.pib { background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important; }
.dash-insights-sidebar .pi.pir { background: linear-gradient(135deg, #ef4444, #b91c1c) !important; }

/* الشارات داخل رؤوس البانلز (Scope Labels) */
.dash-insights-sidebar .ph.gis-ph .tag,
.dash-insights-sidebar #residue-scope-label,
.dash-insights-sidebar #top-items-scope-label {
  background: rgba(52, 211, 153, 0.15) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 8px !important;
}

/* ── جداول البيانات داخل السايدبار ── */
.dash-insights-sidebar table.dt {
  font-size: 13px !important;
  width: 100%;
}
.dash-insights-sidebar table.dt th {
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 8px !important;
}
.dash-insights-sidebar table.dt td {
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 8px !important;
}
.dash-insights-sidebar table.dt tr:hover td {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* ── قوائم الترتيب (أعلى المحافظات / المراكز / المحاصيل) ── */
.dash-insights-sidebar .rna {
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
}
.dash-insights-sidebar .rv {
  color: #34d399 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}
.dash-insights-sidebar .ri2 {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  transition: all 0.2s ease !important;
}
.dash-insights-sidebar .ri2:hover,
.dash-insights-sidebar .ri2.sel {
  background: rgba(52, 211, 153, 0.14) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  transform: translateX(-3px);
}


/* ── الرسم البياني الدائري (Canvas + Layout) ── */

/* حاوية الكانفاس والـ Legend في عمود واحد واضح */
.dash-insights-sidebar .dw {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 6px 0 !important;
}

/* الكانفاس يمتد لعرض الكرت مع حد أقصى */
.dash-insights-sidebar canvas#dc {
  display: block !important;
  margin: 0 auto !important;
  border-radius: 50%;
  max-width: 200px;
  max-height: 200px;
}

/* الـ Legend يمتد لعرض كامل الكرت */
.dash-insights-sidebar #dleg {
  width: 100% !important;
  max-width: 340px !important;
}

/* حين يكون السايدبار بنافذة Expand/Modal → الكانفاس يكبر */
.dash-modal-box canvas#dc {
  max-width: 260px;
  max-height: 260px;
}

/* ── Legend Items ── */
.dash-insights-sidebar .di {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  cursor: default !important;
  transition: background 0.18s ease !important;
}
.dash-insights-sidebar .di:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* الاسم في الـ Legend */
.dash-insights-sidebar .dn {
  color: #e2e8f0 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* النسبة المئوية في الـ Legend */
.dash-insights-sidebar .dp {
  color: #34d399 !important;
  font-size: 12.5px !important;
  font-weight: 900 !important;
  flex-shrink: 0;
}

/* القيمة المركزية */
.dash-insights-sidebar #dcv {
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

/* ── أعمدة المقارنة (Bar List) ── */
.dash-insights-sidebar .brl {
  color: #e2e8f0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.dash-insights-sidebar .brv {
  color: #34d399 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
.dash-insights-sidebar .brt {
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
}

/* ── القوائم المنسدلة وأزرار التحكم ── */
.dash-insights-sidebar .ab {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 5px 12px !important;
  transition: all 0.2s ease !important;
}
.dash-insights-sidebar .ab:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
}
.dash-insights-sidebar select.ps {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 5px 10px !important;
  transition: all 0.2s ease !important;
}
.dash-insights-sidebar select.ps:hover,
.dash-insights-sidebar select.ps:focus {
  border-color: #34d399 !important;
  outline: none !important;
  background: rgba(0, 0, 0, 0.45) !important;
}
.dash-insights-sidebar select.ps option {
  background: #091e12 !important;
  color: #ffffff !important;
  padding: 6px !important;
}

/* ── زر التكبير ── */
.card-expand-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}
.card-expand-btn:hover {
  background: #34d399;
  border-color: #34d399;
  color: #06210f;
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}
.ph.gis-ph .card-expand-btn {
  position: static;
  width: 28px;
  height: 28px;
}

/* إخفاء زرار التكبير لما الكارت يكون مفتوح في الـ modal */
.dash-modal-box .in-modal .card-expand-btn {
  display: none !important;
}

/* ── Modal Popups ── */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 12, 6, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 24px;
}
.dash-modal-box .in-modal {
  width: 100%;
}

/* ── الكروت المركبة (.kpi-column-card) مثل الأراضي القديمة/الجديدة/الكلي داخل الـ Modal ── */
.dash-modal-box .in-modal.kpi-column-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px !important;
}

/* عنوان المجموعة (الأراضي القديمة / الجديدة / إجمالي الأراضي) */
.dash-modal-box .in-modal.kpi-column-card > div:first-child {
  font-size: 24px !important;
  font-weight: 900 !important;
  margin-bottom: 18px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.dash-modal-box .in-modal.kpi-column-card.old > div:first-child {
  color: #fbbf24 !important;
}
.dash-modal-box .in-modal.kpi-column-card.new > div:first-child {
  color: #34d399 !important;
}
.dash-modal-box .in-modal.kpi-column-card.total > div:first-child {
  color: #60a5fa !important;
}

/* الكروت الفرعية (.gis-stat-card) داخل الكرت المركب في الـ Modal */
.dash-modal-box .in-modal.kpi-column-card .gis-stat-card {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 14px !important;
  padding: 16px 20px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

.dash-modal-box .in-modal.kpi-column-card .gis-stat-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  font-size: 22px !important;
  flex-shrink: 0 !important;
}

.dash-modal-box .in-modal.kpi-column-card .gis-stat-label {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}

.dash-modal-box .in-modal.kpi-column-card .gis-stat-value {
  color: #ffffff !important;
  font-size: 34px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.5px !important;
}

.dash-modal-box .in-modal.kpi-column-card .gis-stat-sub {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 3px 12px !important;
  border-radius: 6px !important;
  display: inline-block !important;
  margin-top: 6px !important;
  width: fit-content !important;
}

/* ── الكروت البسيطة (.kc) مثل المخلفات الرطبة والجافة ── */
.dash-modal-box .in-modal.kc {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 16px !important;
  padding: 24px !important;
}
.dash-modal-box .in-modal.kc .kl {
  font-size: 26px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  margin-bottom: 8px !important;
}
.dash-modal-box .in-modal.kc .kv {
  font-size: 54px !important;
  color: #ffffff !important;
  line-height: 1.1 !important;
  letter-spacing: -1px !important;
}
.dash-modal-box .in-modal.kc .kv span {
  font-size: 22px !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.8) !important;
  margin-right: 6px !important;
}
.dash-modal-box .in-modal.kc .ks {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #111111 !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  padding: 4px 14px !important;
  margin-top: 10px !important;
  display: inline-block !important;
}
.dash-modal-box .in-modal .ki {
  opacity: 0.9 !important;
}
.dash-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.dash-modal-box {
  width: min(1080px, 94vw);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #091e12;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.25s ease;
  padding: 26px;
  position: relative;

  --t1: #ffffff;
  --t2: #e2e8f0;
  --t3: #a7f3d0;
  --bg: rgba(0, 0, 0, 0.25);
  --sf: rgba(255, 255, 255, 0.06);
  --sf2: rgba(255, 255, 255, 0.09);
  --bd: rgba(255, 255, 255, 0.14);
  --bd2: rgba(255, 255, 255, 0.18);
  --g0: rgba(255, 255, 255, 0.09);
}
.dash-modal-overlay.open .dash-modal-box {
  transform: scale(1);
}
.dash-modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}
.dash-modal-close:hover {
  background: #ef4444;
}

.dash-modal-box .in-modal.pn.gis-panel {
  background: transparent !important;
  border: none !important;
  padding: 4px !important;
}
.dash-modal-box .in-modal .ph.gis-ph h3 { 
  font-size: 22px !important; 
  font-weight: 800 !important;
  color: #ffffff !important;
}
.dash-modal-box .in-modal .ph.gis-ph .ps {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  height: 38px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 10px !important;
}
.dash-modal-box .in-modal .ph.gis-ph .ps option {
  background: #091e12 !important;
  color: #ffffff !important;
}
.dash-modal-box .in-modal table.dt { font-size: 14px !important; }
.dash-modal-box .in-modal .rna { font-size: 15px !important; }

@media (max-width: 640px) {
  .dash-modal-box { padding: 20px 16px 24px; }
}

/* Filter Flow step transition */
.filter-label-group.filter-step-visible {
  animation: filterStepIn .28s ease;
}
@keyframes filterStepIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESIDUE WET/DRY COMPARE V2 (مقارنة المخلفات الرطبة والجافة)
   ------------------------------------------------------------
   ✅ تعديل: كان الرقم بيتكرر مرتين (جوه الشريط + جنبه باهت) - دلوقتي
   رقم واحد بس، ملوّن، أكبر خط، والأنبوب الملون نفسه بقى أعرض وأوضح.
   ============================================================ */
.residue-tube-v2 {
  height: 22px;
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.residue-tube-seg-v2 {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.residue-pct-row-v2 {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 16px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.residue-rows-v2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.residue-row-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.residue-row-label-v2 {
  font-size: 13.5px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.residue-row-badge-v2 {
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.residue-row-badge-v2 small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
  margin-right: 3px;
}
