/* ==========================================================================
   Dentaix FLOW — Command Center Section (light + dark)
   ========================================================================== */

.dx-command-section {
  --cc-blue: #0088ff;
  --cc-blue-soft: rgba(0, 136, 255, 0.12);
  --cc-green: #22c55e;
  --cc-amber: #f59e0b;
  --cc-bg: #f4f8ff;
  --cc-surface: rgba(255, 255, 255, 0.92);
  --cc-surface-2: #ffffff;
  --cc-border: rgba(0, 136, 255, 0.12);
  --cc-text: #0b1b33;
  --cc-text-muted: #4a607a;
  --cc-dash-bg: linear-gradient(155deg, #0f1729 0%, #070b14 52%, #0a1224 100%);
  --cc-dash-border: rgba(255, 255, 255, 0.12);
  --cc-card: rgba(255, 255, 255, 0.06);
  --cc-card-border: rgba(255, 255, 255, 0.1);
  --cc-label: rgba(255, 255, 255, 0.55);
  --cc-value: #ffffff;
  position: relative;
  overflow: hidden;
  background: var(--cc-bg);
}

html[data-theme='dark'] .dx-command-section {
  --cc-bg: #030508;
  --cc-surface: rgba(14, 20, 32, 0.6);
  --cc-surface-2: #0e1420;
  --cc-border: rgba(120, 155, 210, 0.14);
  --cc-text: #f4f7ff;
  --cc-text-muted: #9aa8c4;
}

.dx-command-section::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 136, 255, 0.35), transparent);
}

.dx-command-section::after {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 90%);
  height: 280px;
  background: radial-gradient(ellipse, rgba(0, 136, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.dx-command-section > .container {
  position: relative;
  z-index: 2;
}

.dx-cc-copy .sub-title {
  margin-bottom: 12px;
}

.dx-cc-copy .sec-title {
  margin-bottom: 18px;
}

.dx-cc-copy .dx-cc-lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--cc-text-muted);
  margin-bottom: 28px;
}

.dx-cc-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 12px;
}

.dx-cc-bullets li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cc-text);
  font-weight: 500;
}

.dx-cc-bullets li i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cc-blue-soft);
  color: var(--cc-blue);
  font-size: 12px;
  flex-shrink: 0;
}

.dx-cc-wrap {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.dx-cc-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.dx-cc-glow-1 {
  width: 260px;
  height: 260px;
  top: -40px;
  right: -20px;
  background: rgba(0, 136, 255, 0.22);
}

.dx-cc-glow-2 {
  width: 180px;
  height: 180px;
  bottom: 0;
  left: -30px;
  background: rgba(82, 180, 255, 0.14);
}

.dx-cc-dashboard {
  position: relative;
  z-index: 1;
  border-radius: 24px;
  background: var(--cc-dash-bg);
  border: 1px solid var(--cc-dash-border);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 136, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dx-cc-dashboard::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(0, 136, 255, 0.45), transparent 45%, rgba(82, 180, 255, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.dx-cc-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.dx-cc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dx-cc-dot.red { background: #ff5f57; }
.dx-cc-dot.yellow { background: #febc2e; }
.dx-cc-dot.green { background: #28c840; }

.dx-cc-chrome-title {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
}

.dx-cc-body {
  padding: 18px;
}

.dx-cc-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.dx-cc-kpi {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: var(--cc-card);
  border: 1px solid var(--cc-card-border);
}

.dx-cc-kpi-label {
  font-size: 11px;
  color: var(--cc-label);
  margin: 0 0 6px;
  line-height: 1.3;
}

.dx-cc-kpi-value {
  font-family: "Sora", sans-serif;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: var(--cc-value);
  margin: 0;
  letter-spacing: -0.02em;
}

.dx-cc-kpi-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #4ade80;
}

.dx-cc-main {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.dx-cc-panel {
  border-radius: 16px;
  background: var(--cc-card);
  border: 1px solid var(--cc-card-border);
  padding: 14px;
  min-height: 220px;
}

.dx-cc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dx-cc-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.dx-cc-panel-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 136, 255, 0.15);
  color: #9ed0ff;
  border: 1px solid rgba(0, 136, 255, 0.22);
}

.dx-cc-chart-wrap {
  position: relative;
  height: 160px;
}

.dx-cc-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.dx-cc-schedule {
  display: grid;
  gap: 8px;
}

.dx-cc-sched-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dx-cc-sched-item strong {
  display: block;
  font-size: 12px;
  color: #fff;
  font-weight: 600;
}

.dx-cc-sched-item span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}

.dx-cc-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.dx-cc-status.confirmed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.dx-cc-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.dx-cc-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.dx-cc-mini {
  border-radius: 16px;
  background: var(--cc-card);
  border: 1px solid var(--cc-card-border);
  padding: 14px;
  min-height: 120px;
}

.dx-cc-mini-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dx-cc-mini-title i {
  color: var(--cc-blue);
}

.dx-cc-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}

.dx-cc-stat-row strong {
  color: #fff;
  font-size: 12px;
}

.dx-cc-recovery {
  text-align: center;
  padding-top: 8px;
}

.dx-cc-recovery-value {
  font-family: "Sora", sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #4ade80;
  line-height: 1;
  margin: 0;
}

.dx-cc-recovery-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin: 6px 0 0;
}

.dx-cc-feed {
  display: grid;
  gap: 8px;
}

.dx-cc-feed-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
}

.dx-cc-feed-item i {
  color: var(--cc-blue);
  margin-top: 2px;
  flex-shrink: 0;
}

.dx-cc-feed-item time {
  display: block;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
}

.dx-cc-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 10px;
}

.dx-cc-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0088ff, #52b4ff);
  width: 0;
  transition: width 1.2s ease;
}

@media (max-width: 1199px) {
  .dx-cc-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .dx-cc-main {
    grid-template-columns: 1fr;
  }

  .dx-cc-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dx-cc-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .dx-cc-body {
    padding: 14px;
  }

  .dx-cc-copy {
    margin-bottom: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dx-cc-progress-bar {
    transition: none;
  }
}
