/* ==============================================================================
   Executive 360 — مركز القرار التنفيذي Stylesheet
   Namespace: exec-
   Designed with rich aesthetics, glassmorphism, responsive grid, and RTL layout
============================================================================== */

:root {
  --exec-primary: #0f766e;
  --exec-primary-light: #14b8a6;
  --exec-primary-dark: #115e59;
  --exec-primary-surface: rgba(15, 118, 110, 0.08);
  --exec-accent: #3b82f6;
  --exec-success: #10b981;
  --exec-success-surface: rgba(16, 185, 129, 0.12);
  --exec-warning: #f59e0b;
  --exec-warning-surface: rgba(245, 158, 11, 0.12);
  --exec-danger: #ef4444;
  --exec-danger-surface: rgba(239, 68, 68, 0.12);
  --exec-info: #0284c7;
  --exec-info-surface: rgba(2, 132, 199, 0.12);
  --exec-purple: #8b5cf6;
  --exec-purple-surface: rgba(139, 92, 246, 0.12);
  --exec-card-bg: #ffffff;
  --exec-card-border: #e2e8f0;
  --exec-text-primary: #0f172a;
  --exec-text-secondary: #475569;
  --exec-text-muted: #64748b;
  --exec-card-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
  --exec-card-hover-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
  --exec-radius: 12px;
  --exec-radius-sm: 8px;
  --exec-radius-pill: 9999px;
  --exec-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Container */
.exec-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px clamp(16px, 3.5vw, 48px) 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Section Header Typography */
.exec-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.exec-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  color: var(--exec-text-primary);
  margin: 0;
}

.exec-section-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--exec-radius-sm);
  background: var(--exec-primary-surface);
  color: var(--exec-primary);
  font-style: normal;
  font-size: 18px;
}

.exec-section-subtitle {
  font-size: 14px;
  color: var(--exec-text-muted);
  margin: 4px 0 0;
}

/* Alerts / Notification Banner */
.exec-alert-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--exec-radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}

.exec-alert-banner.exec-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.04));
  border-color: rgba(239, 68, 68, 0.35);
}

.exec-alert-banner.exec-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.04));
  border-color: rgba(16, 185, 129, 0.35);
}

.exec-alert-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.exec-alert-icon {
  font-size: 24px;
}

.exec-alert-text strong {
  display: block;
  font-size: 15px;
  color: var(--exec-text-primary);
}

.exec-alert-text p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--exec-text-secondary);
}

.exec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--exec-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--exec-transition);
  text-decoration: none;
  white-space: nowrap;
}

.exec-btn-primary {
  background: var(--exec-primary);
  color: #fff;
}

.exec-btn-primary:hover {
  background: var(--exec-primary-dark);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.exec-btn-secondary {
  background: #fff;
  border-color: var(--exec-card-border);
  color: var(--exec-text-primary);
}

.exec-btn-secondary:hover {
  background: var(--soft);
  border-color: var(--exec-text-muted);
}

.exec-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==============================================================================
   1. Filters Section
============================================================================== */
.exec-filter-bar {
  background: var(--exec-card-bg);
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 20px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exec-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.exec-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.exec-filter-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--exec-text-secondary);
}

.exec-filter-control {
  height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--exec-text-primary);
  outline: none;
  transition: var(--exec-transition);
}

.exec-filter-control:focus {
  border-color: var(--exec-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.exec-presets-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.exec-preset-btn {
  padding: 7px 14px;
  border-radius: var(--exec-radius-pill);
  background: var(--soft);
  border: 1px solid var(--exec-card-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--exec-text-secondary);
  cursor: pointer;
  transition: var(--exec-transition);
}

.exec-preset-btn:hover {
  background: #e2e8f0;
  color: var(--exec-text-primary);
}

.exec-preset-btn.active {
  background: var(--exec-primary);
  border-color: var(--exec-primary);
  color: #fff;
}

.exec-comparison-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--exec-primary-surface);
  color: var(--exec-primary-dark);
  border-radius: var(--exec-radius-pill);
  font-size: 13px;
  font-weight: 700;
  margin-right: auto;
}

/* ==============================================================================
   2. KPI Strip (Section 3)
============================================================================== */
.exec-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.exec-kpi-card {
  background: var(--exec-card-bg);
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 20px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: var(--exec-transition);
}

.exec-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--exec-card-hover-shadow);
  border-color: #cbd5e1;
}

.exec-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--exec-primary);
  opacity: 0.8;
}

.exec-kpi-card.kpi-accent::before {
  background: var(--exec-accent);
}

.exec-kpi-card.kpi-success::before {
  background: var(--exec-success);
}

.exec-kpi-card.kpi-warning::before {
  background: var(--exec-warning);
}

.exec-kpi-card.kpi-purple::before {
  background: var(--exec-purple);
}

.exec-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.exec-kpi-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--exec-text-secondary);
}

.exec-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.exec-kpi-icon svg,
.exec-kpi-svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
}

.exec-kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--exec-text-primary);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.exec-kpi-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  border-top: 1px dashed var(--exec-card-border);
  padding-top: 10px;
}

.exec-change-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--exec-radius-pill);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.exec-change-badge.up {
  background: var(--exec-success-surface);
  color: #065f46;
}

.exec-change-badge.down {
  background: var(--exec-danger-surface);
  color: #991b1b;
}

.exec-change-badge.neutral {
  background: var(--soft);
  color: var(--exec-text-muted);
}

.exec-kpi-prev {
  color: var(--exec-text-muted);
}

/* ==============================================================================
   3. What Changed (ماذا تغير؟ - Section 4)
============================================================================== */
.exec-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.exec-insight-card {
  background: #ffffff;
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 18px 20px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--exec-transition);
}

.exec-insight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--exec-card-hover-shadow);
}

.exec-insight-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.exec-insight-card.type-growth .exec-insight-icon-box {
  background: var(--exec-success-surface);
  color: var(--exec-success);
}

.exec-insight-card.type-decline .exec-insight-icon-box {
  background: var(--exec-danger-surface);
  color: var(--exec-danger);
}

.exec-insight-card.type-warning .exec-insight-icon-box {
  background: var(--exec-warning-surface);
  color: var(--exec-warning);
}

.exec-insight-card.type-info .exec-insight-icon-box {
  background: var(--exec-info-surface);
  color: var(--exec-info);
}

.exec-insight-body {
  flex: 1;
}

.exec-insight-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--exec-text-primary);
  margin-bottom: 4px;
}

.exec-insight-desc {
  font-size: 13px;
  color: var(--exec-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ==============================================================================
   4. Decision Queue (يحتاج قرارك الآن - Section 5)
============================================================================== */
.exec-decision-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exec-decision-item {
  background: #ffffff;
  border: 1px solid var(--exec-card-border);
  border-right: 5px solid var(--exec-primary);
  border-radius: var(--exec-radius);
  padding: 16px 20px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: var(--exec-transition);
}

.exec-decision-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--exec-card-hover-shadow);
}

.exec-decision-item.prio-high {
  border-right-color: var(--exec-danger);
}

.exec-decision-item.prio-warn {
  border-right-color: var(--exec-warning);
}

.exec-decision-item.prio-opp {
  border-right-color: var(--exec-success);
}

.exec-decision-item.prio-info {
  border-right-color: var(--exec-info);
}

.exec-decision-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.exec-decision-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--exec-radius-pill);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.exec-decision-badge.prio-high {
  background: var(--exec-danger-surface);
  color: #991b1b;
}

.exec-decision-badge.prio-warn {
  background: var(--exec-warning-surface);
  color: #92400e;
}

.exec-decision-badge.prio-opp {
  background: var(--exec-success-surface);
  color: #065f46;
}

.exec-decision-badge.prio-info {
  background: var(--exec-info-surface);
  color: #075985;
}

.exec-decision-text strong {
  display: block;
  font-size: 15px;
  color: var(--exec-text-primary);
  margin-bottom: 3px;
}

.exec-decision-text p {
  margin: 0;
  font-size: 13px;
  color: var(--exec-text-secondary);
  line-height: 1.5;
}

.exec-decision-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==============================================================================
   5. Trend Section & 6. Growth Quality
============================================================================== */
.exec-charts-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .exec-charts-split {
    grid-template-columns: 1fr;
  }
}

.exec-chart-card {
  background: var(--exec-card-bg);
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 24px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.exec-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.exec-chart-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--exec-text-primary);
  margin: 0;
}

.exec-tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--soft);
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius-sm);
  gap: 4px;
}

.exec-tab {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--exec-text-secondary);
  cursor: pointer;
  transition: var(--exec-transition);
}

.exec-tab:hover {
  color: var(--exec-text-primary);
}

.exec-tab.active {
  background: #ffffff;
  color: var(--exec-primary-dark);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.exec-canvas-wrap {
  position: relative;
  width: 100%;
  height: 340px;
}

/* Growth Quality Bars */
.exec-growth-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exec-growth-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exec-growth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.exec-growth-name {
  color: var(--exec-text-primary);
}

.exec-growth-pct {
  font-family: inherit;
  font-weight: 800;
}

.exec-growth-bar-track {
  height: 10px;
  background: var(--soft);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  display: flex;
}

.exec-growth-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease-out;
}

/* ==============================================================================
   7. Change Drivers (محركات التغيير - Section 8)
============================================================================== */
.exec-drivers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .exec-drivers-grid {
    grid-template-columns: 1fr;
  }
}

.exec-driver-col {
  background: #ffffff;
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 20px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exec-driver-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--exec-card-border);
}

.exec-driver-head.growth {
  color: var(--exec-success);
}

.exec-driver-head.decline {
  color: var(--exec-danger);
}

.exec-driver-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exec-driver-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--soft);
  border-radius: var(--exec-radius-sm);
  transition: var(--exec-transition);
}

.exec-driver-row:hover {
  background: #f1f5f9;
}

.exec-driver-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--exec-text-primary);
  flex: 1;
}

.exec-driver-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.exec-driver-amount {
  font-weight: 800;
  color: var(--exec-text-primary);
}

/* ==============================================================================
   8. Executive Salesman View (Section 9)
============================================================================== */
.exec-table-card {
  background: #ffffff;
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 20px;
  box-shadow: var(--exec-card-shadow);
  overflow: hidden;
}

.exec-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 14px;
}

.exec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  text-align: right;
}

.exec-table th {
  background: var(--soft);
  color: var(--exec-text-secondary);
  font-weight: 800;
  padding: 12px 14px;
  border-bottom: 2px solid var(--exec-card-border);
  white-space: nowrap;
}

.exec-table td {
  padding: 14px;
  border-bottom: 1px solid var(--exec-card-border);
  color: var(--exec-text-primary);
  white-space: nowrap;
  vertical-align: middle;
}

.exec-table tr:hover td {
  background: rgba(15, 118, 110, 0.02);
}

.exec-unassigned-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.06), rgba(2, 132, 199, 0.02));
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: var(--exec-radius);
  padding: 16px 20px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.exec-unassigned-card strong {
  color: var(--exec-text-primary);
  font-size: 15px;
}

.exec-unassigned-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ==============================================================================
   9. Customer Risks & Opportunities (Section 10)
============================================================================== */
.exec-cust-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.exec-cust-nav-btn {
  padding: 8px 16px;
  border-radius: var(--exec-radius-pill);
  border: 1px solid var(--exec-card-border);
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  color: var(--exec-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--exec-transition);
}

.exec-cust-nav-btn:hover {
  background: var(--soft);
}

.exec-cust-nav-btn.active {
  background: var(--exec-primary);
  border-color: var(--exec-primary);
  color: #fff;
}

.exec-cust-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.exec-cust-card {
  background: #ffffff;
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 18px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: var(--exec-transition);
}

.exec-cust-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--exec-card-hover-shadow);
}

.exec-cust-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.exec-cust-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--exec-text-primary);
}

.exec-cust-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--exec-radius-pill);
}

.exec-cust-metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--exec-text-secondary);
}

.exec-cust-metric-row strong {
  color: var(--exec-text-primary);
}

/* ==============================================================================
   10. Comparison Workspace (Section 11)
============================================================================== */
.exec-compare-card {
  background: #ffffff;
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 24px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exec-compare-selectors {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  background: var(--soft);
  padding: 16px;
  border-radius: var(--exec-radius-sm);
}

.exec-compare-columns {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .exec-compare-columns {
    grid-template-columns: 1fr;
  }
}

.exec-compare-side {
  background: #ffffff;
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exec-compare-side.side-a {
  border-top: 4px solid var(--exec-primary);
}

.exec-compare-side.side-b {
  border-top: 4px solid var(--exec-accent);
}

.exec-compare-side-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--exec-text-primary);
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--exec-card-border);
}

.exec-compare-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
}

.exec-compare-metric span {
  color: var(--exec-text-secondary);
}

.exec-compare-metric strong {
  color: var(--exec-text-primary);
  font-weight: 800;
}

.exec-compare-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  color: var(--exec-text-muted);
}

/* ==============================================================================
   11. Current Debt Snapshot (Section 12)
============================================================================== */
.exec-debt-section-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

@media (max-width: 960px) {
  .exec-debt-section-grid {
    grid-template-columns: 1fr;
  }
}

.exec-debt-summary-box {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius);
  padding: 24px;
  box-shadow: var(--exec-card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.exec-debt-stat-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exec-debt-stat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--exec-text-muted);
}

.exec-debt-stat-val {
  font-size: 28px;
  font-weight: 800;
  color: #b91c1c;
}

.exec-debt-notice {
  font-size: 12px;
  color: var(--exec-text-muted);
  background: var(--soft);
  padding: 10px;
  border-radius: var(--exec-radius-sm);
  line-height: 1.5;
}

/* ==============================================================================
   Loading & Skeletons
============================================================================== */
.exec-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: execShimmer 1.5s infinite;
  border-radius: var(--exec-radius-sm);
}

@keyframes execShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.exec-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border: 2px dashed var(--exec-card-border);
  border-radius: var(--exec-radius);
}

.exec-empty-state h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--exec-text-primary);
  margin-bottom: 8px;
}

.exec-empty-state p {
  color: var(--exec-text-muted);
  font-size: 14px;
  margin-bottom: 18px;
}

/* Tooltip & Micro-helpers */
.exec-tooltip {
  cursor: help;
  border-bottom: 1px dotted var(--exec-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==============================================================================
   13. Executive 360 SVG Icons System
============================================================================== */
.exec-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.exec-icon-sm {
  width: 14px;
  height: 14px;
}

.exec-icon-md {
  width: 20px;
  height: 20px;
}

.exec-icon-lg {
  width: 28px;
  height: 28px;
}

.exec-icon-xl {
  width: 48px;
  height: 48px;
}

.exec-inline-icon {
  display: inline-block;
  vertical-align: -0.15em;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  stroke: currentColor;
}

.exec-kpi-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.exec-section-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.exec-status-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.exec-upload-icon {
  width: 44px;
  height: 44px;
  stroke: currentColor;
}

/* Alert Icon Container Alignment */
.exec-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* KPI icon accent theming */
.exec-kpi-icon {
  color: var(--exec-primary);
  background: var(--exec-primary-surface);
}

.exec-kpi-card.kpi-accent .exec-kpi-icon {
  color: var(--exec-accent);
  background: rgba(59, 130, 246, 0.1);
}

.exec-kpi-card.kpi-success .exec-kpi-icon {
  color: var(--exec-success);
  background: var(--exec-success-surface);
}

.exec-kpi-card.kpi-warning .exec-kpi-icon {
  color: var(--exec-warning);
  background: var(--exec-warning-surface);
}

.exec-kpi-card.kpi-purple .exec-kpi-icon {
  color: var(--exec-purple);
  background: var(--exec-purple-surface);
}

/* Micro RTL spacing & alignments */
.exec-debt-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.exec-unassigned-card strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==============================================================================
   14. Dynamic Analysis Workspace — التحليل الديناميكي
   Uses existing design tokens only. No new colors, no new shadows.
============================================================================== */

/* Presets quick-access row */
.exec-dynamic-presets-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.exec-dynamic-presets-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--exec-text-secondary);
  white-space: nowrap;
}

/* Toolbar: Controls row inside chart card */
.exec-dynamic-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  padding: 16px;
  background: var(--soft, #f8fafc);
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius-sm);
  margin-bottom: 4px;
}

/* Individual control group (label + select) */
.exec-dynamic-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 160px;
}

.exec-dynamic-control label {
  font-size: 13px;
  font-weight: 700;
  color: var(--exec-text-secondary);
}

/* Select inside toolbar inherits exec-filter-control sizing */
.exec-dynamic-select {
  height: 38px;
  padding: 6px 12px;
  font-size: 13px;
}

/* Dynamic Analysis Inline Validation */
.exec-dyn-validation {
  margin: 6px 0 10px;
  padding: 8px 14px;
  background: var(--exec-danger-surface, rgba(239, 68, 68, 0.08));
  color: #991b1b;
  border-radius: var(--exec-radius-sm, 6px);
  font-size: 13px;
  font-weight: 700;
}

/* Loading overlay (absolute-positioned inside chart card) */
.exec-dynamic-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--exec-radius);
  z-index: 10;
}

.exec-dynamic-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--exec-text-secondary);
}

/* Spinner using CSS animation — no external library */
.exec-dynamic-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--exec-card-border);
  border-top-color: var(--exec-primary);
  border-radius: 50%;
  animation: execDynSpin 0.8s linear infinite;
}

@keyframes execDynSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Comparison legend below toolbar */
.exec-dyn-compare-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--exec-text-muted);
  flex-wrap: wrap;
  margin-top: 6px;
}

.exec-dyn-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 5px;
  flex-shrink: 0;
}

/* Multi-Select Metric Dropdown */
.exec-multi-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exec-multi-select-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.exec-multi-select-arrow {
  flex-shrink: 0;
  margin-right: 4px;
  transition: transform 0.2s;
}

.exec-multi-select-toggle[aria-expanded="true"] .exec-multi-select-arrow {
  transform: rotate(180deg);
}

.exec-multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--exec-card-border);
  border-radius: var(--exec-radius-sm);
  box-shadow: var(--exec-card-shadow);
  max-height: 280px;
  overflow-y: auto;
  margin-top: 4px;
}

.exec-multi-select-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--exec-text-primary);
  transition: background 0.15s;
}

.exec-multi-select-item:hover:not(.disabled) {
  background: var(--exec-primary-surface);
}

.exec-multi-select-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.exec-multi-select-item.checked {
  background: var(--exec-primary-surface);
}

.exec-multi-select-item input[type="checkbox"] {
  accent-color: var(--exec-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  pointer-events: none;
}

.exec-multi-select-limit-msg {
  font-size: 12px;
  color: #b45309;
  padding: 4px 8px;
  margin-top: 4px;
  background: var(--exec-warning-surface);
  border-radius: var(--exec-radius-sm);
}

/* Responsive: On tablet, toolbar wraps to 2-per-row */
@media (max-width: 1024px) {
  .exec-dynamic-control {
    min-width: 140px;
  }
}

/* On mobile: stack controls */
@media (max-width: 640px) {
  .exec-dynamic-toolbar {
    flex-direction: column;
    gap: 12px;
  }

  .exec-dynamic-control {
    width: 100%;
    min-width: unset;
  }

  .exec-dynamic-presets-row {
    gap: 6px;
  }
}