/* =========================================================
   DASHBOARD SECTION
========================================================= */

.dashboard-section {
  position: relative;
  width: 100%;
  padding: 80px 24px;
  overflow: hidden;

  background:
    linear-gradient(
      135deg,
      #eef1f8 0%,
      #f0f2fb 50%,
      #e8ecf8 100%
    );

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}


/* =========================================================
   BACKGROUND
========================================================= */

.dashboard-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.dashboard-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.dashboard-blob-blue {
  width: 420px;
  height: 420px;

  top: -80px;
  right: -80px;

  background: rgba(191, 219, 254, 0.3);
}

.dashboard-blob-purple {
  width: 340px;
  height: 340px;

  bottom: -60px;
  left: -60px;

  background: rgba(221, 214, 254, 0.25);
}


/* =========================================================
   CONTAINER
========================================================= */

.dashboard-container {
  position: relative;

  width: 100%;
  max-width: 1152px;

  margin: 0 auto;
}


/* =========================================================
   SECTION LABEL
========================================================= */

.dashboard-section-label {
  margin: 0 0 40px;

  text-align: center;

  color: #94a3b8;

  font-size: 13px;
  font-weight: 600;

  letter-spacing: 0.18em;
  text-transform: uppercase;

  opacity: 0;

  animation:
    dashboardFadeUp 0.5s ease forwards;
}


/* =========================================================
   TWO COLUMN GRID
========================================================= */

.dashboard-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 48px;

  align-items: center;
}


/* =========================================================
   LEFT CONTENT
========================================================= */

.dashboard-copy {
  opacity: 0;

  transform: translateX(-20px);

  animation:
    dashboardSlideLeft 0.6s ease 0.1s forwards;
}


/* =========================================================
   TITLE
========================================================= */

.dashboard-title {
  margin: 0;

  font-size: clamp(38px, 4vw, 52px);

  line-height: 1.05;

  font-weight: 800;

  letter-spacing: -0.035em;

  background:
    linear-gradient(
      135deg,
      #1a8fd1 0%,
      #353a80 35%,
      #7c3aed 65%,
      #4a0750 100%
    );

  -webkit-background-clip: text;
  background-clip: text;

  -webkit-text-fill-color: transparent;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.dashboard-description {
  max-width: 390px;

  margin-top: 16px;

  color: #64748b;

  font-size: 15px;

  line-height: 1.7;
}


/* =========================================================
   FEATURES
========================================================= */

.dashboard-features {
  display: flex;

  flex-direction: column;

  gap: 12px;

  margin-top: 32px;
}


.dashboard-feature {
  display: flex;

  align-items: flex-start;

  gap: 16px;

  padding: 14px 16px;

  border:
    1px solid rgba(255,255,255,0.9);

  border-radius: 16px;

  background:
    rgba(255,255,255,0.6);

  backdrop-filter: blur(10px);

  box-shadow:
    0 2px 8px rgba(15,23,42,0.04);

  opacity: 0;

  transform: translateX(-18px);
}


.dashboard-feature:nth-child(1) {
  animation:
    dashboardSlideLeft 0.45s ease 0.3s forwards;
}

.dashboard-feature:nth-child(2) {
  animation:
    dashboardSlideLeft 0.45s ease 0.4s forwards;
}

.dashboard-feature:nth-child(3) {
  animation:
    dashboardSlideLeft 0.45s ease 0.5s forwards;
}


.feature-icon {
  width: 24px;
  height: 24px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  margin-top: 1px;

  color: #1a5fd4;
}


.feature-text {
  margin: 0;

  color: #334155;

  font-size: 13px;

  line-height: 1.6;

  font-weight: 600;
}


.feature-text span {
  color: #64748b;

  font-weight: 400;
}


/* =========================================================
   DASHBOARD PREVIEW
========================================================= */

.dashboard-preview {
  position: relative;

  opacity: 0;

  transform: translateY(30px);

  animation:
    dashboardPreviewEnter 0.6s ease 0.25s forwards;
}


/* =========================================================
   WINDOW
========================================================= */

.dashboard-window {
  overflow: hidden;

  background:
    rgba(255,255,255,0.8);

  backdrop-filter: blur(16px);

  border:
    1px solid rgba(255,255,255,0.9);

  border-radius: 16px;

  box-shadow:
    0 25px 60px rgba(148,163,184,0.28);
}


/* =========================================================
   WINDOW HEADER
========================================================= */

.window-header {
  height: 48px;

  display: flex;

  align-items: center;

  gap: 8px;

  padding: 0 16px;
}


.window-controls {
  display: flex;

  align-items: center;

  gap: 8px;
}


.window-dot {
  display: block;

  width: 12px;
  height: 12px;

  border-radius: 50%;
}


.window-dot.red {
  background: #ff5f56;
}

.window-dot.yellow {
  background: #ffbd2e;
}

.window-dot.green {
  background: #27c840;
}


.window-title {
  margin-left: 8px;

  color: #475569;

  font-size: 13px;

  font-weight: 600;
}


/* =========================================================
   TABS
========================================================= */

.dashboard-tabs {
  display: flex;

  gap: 8px;

  padding: 12px 16px;

  border-bottom:
    1px solid #e2e8f0;

  background:
    rgba(248,250,252,0.65);
}


.dashboard-tab {
  display: flex;

  align-items: center;

  gap: 8px;

  padding: 10px 16px;

  border:
    1px solid transparent;

  border-radius: 12px;

  background: transparent;

  color: #64748b;

  font-size: 14px;

  font-weight: 500;

  cursor: pointer;

  transition:
    all 0.2s ease;
}


.dashboard-tab:hover {
  color: #475569;

  background:
    rgba(255,255,255,0.6);
}


.dashboard-tab.active {
  color: #334155;

  background: white;

  border-color: #e2e8f0;

  box-shadow:
    0 2px 5px rgba(15,23,42,0.05);
}


/* =========================================================
   CONTENT
========================================================= */

.dashboard-tab-content {
  min-height: 320px;

  background:
    linear-gradient(
      to bottom,
      rgba(248,250,252,0.8),
      rgba(255,255,255,0.6)
    );
}


.dashboard-panel {
  padding: 24px;

  animation:
    dashboardTabIn 0.25s ease forwards;
}


/* =========================================================
   COMMON CARD
========================================================= */

.dashboard-card {
  padding: 16px;

  background: white;

  border:
    1px solid #e2e8f0;

  border-radius: 16px;

  box-shadow:
    0 2px 6px rgba(15,23,42,0.04);
}


.dashboard-card-title {
  margin-bottom: 12px;

  color: #64748b;

  font-size: 11px;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.12em;
}


/* =========================================================
   KPI
========================================================= */

.dashboard-kpi-grid {
  display: grid;

  grid-template-columns:
    repeat(3,1fr);

  gap: 12px;

  margin-bottom: 16px;
}


.dashboard-kpi {
  padding: 16px;

  text-align: center;

  background: white;

  border:
    1px solid #e2e8f0;

  border-radius: 16px;

  box-shadow:
    0 2px 6px rgba(15,23,42,0.04);
}


.dashboard-kpi-label {
  margin-bottom: 8px;

  color: #64748b;

  font-size: 12px;
}


.dashboard-kpi-value {
  font-size: 24px;

  font-weight: 700;
}


/* =========================================================
   LIVE FEED
========================================================= */

.live-feed {
  display: flex;

  flex-direction: column;

  gap: 12px;

  margin-bottom: 16px;
}


.feed-row {
  display: flex;

  align-items: center;

  gap: 12px;
}


.feed-avatar {
  width: 32px;
  height: 32px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      #f1f5f9,
      #e2e8f0
    );

  color: #475569;

  font-size: 11px;

  font-weight: 700;
}


.feed-info {
  flex: 1;

  min-width: 0;
}


.feed-agent {
  color: #475569;

  font-size: 12px;

  font-weight: 500;
}


.feed-track {
  width: 100%;

  height: 6px;

  margin-top: 4px;

  overflow: hidden;

  border-radius: 999px;

  background: #f1f5f9;
}


.feed-progress {
  width: 0;

  height: 100%;

  border-radius: 999px;

  transition:
    width 0.8s ease;
}


.feed-status {
  padding:
    2px 8px;

  border-radius: 999px;

  font-size: 11px;

  font-weight: 500;

  flex-shrink: 0;
}


/* =========================================================
   CALL CHART
========================================================= */

.call-chart {
  height: 48px;

  display: flex;

  align-items: flex-end;

  gap: 6px;
}


.call-chart-bar {
  flex: 1;

  height: 0;

  border-radius:
    6px 6px 3px 3px;

  background:
    linear-gradient(
      to top,
      #3b82f6,
      #8b5cf6
    );

  transition:
    height 0.5s ease;
}


/* =========================================================
   ANALYTICS
========================================================= */

.outcome-list {
  display: flex;

  flex-direction: column;

  gap: 12px;
}


.outcome-row {
  display: flex;

  align-items: center;

  gap: 12px;
}


.outcome-label {
  width: 130px;

  flex-shrink: 0;

  color: #475569;

  font-size: 11px;
}


.outcome-track {
  flex: 1;

  height: 8px;

  overflow: hidden;

  border-radius: 999px;

  background: #f1f5f9;
}


.outcome-progress {
  width: 0;

  height: 100%;

  border-radius: inherit;

  transition:
    width 0.7s ease;
}


.outcome-percent {
  width: 32px;

  color: #475569;

  font-size: 11px;

  font-weight: 600;

  text-align: right;
}


/* =========================================================
   DONUT
========================================================= */

.analytics-donut-card {
  display: flex;

  align-items: center;

  gap: 16px;

  margin-top: 16px;
}


.donut-chart {
  width: 72px;
  height: 72px;

  flex-shrink: 0;

  transform: rotate(-90deg);
}


.donut-chart circle {
  fill: none;

  stroke-width: 10;
}


.donut-hole {
  fill: white !important;
}


.donut-value {
  font-size: 9px;

  font-weight: 700;

  fill: #334155;

  transform:
    rotate(90deg);

  transform-origin:
    32px 32px;
}


.donut-legend {
  display: flex;

  flex-direction: column;

  gap: 8px;
}


.legend-item {
  display: flex;

  align-items: center;

  gap: 8px;

  color: #64748b;

  font-size: 11px;
}


.legend-dot {
  width: 10px;
  height: 10px;

  flex-shrink: 0;

  border-radius: 50%;
}


/* =========================================================
   ANALYTICS KPI
========================================================= */

.analytics-kpis {
  display: grid;

  grid-template-columns:
    repeat(2,1fr);

  gap: 12px;

  margin-top: 16px;
}


.analytics-kpi {
  padding: 16px;

  text-align: center;

  background: white;

  border:
    1px solid #e2e8f0;

  border-radius: 16px;

  box-shadow:
    0 2px 6px rgba(15,23,42,0.04);
}


.analytics-kpi-label {
  margin-bottom: 8px;

  color: #64748b;

  font-size: 11px;
}


.analytics-kpi-value {
  color: #334155;

  font-size: 16px;

  font-weight: 700;
}


/* =========================================================
   AUTOMATION
========================================================= */

.automation-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  margin-bottom: 16px;
}


.automation-title {
  color: #94a3b8;

  font-size: 11px;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.12em;
}


.flow-presets {
  display: flex;

  gap: 6px;

  flex-wrap: wrap;
}


.flow-preset {
  padding:
    5px 10px;

  border: none;

  border-radius: 6px;

  background: #f1f5f9;

  color: #64748b;

  font-size: 9px;

  font-weight: 500;

  cursor: pointer;

  transition:
    all 0.2s ease;
}


.flow-preset:hover {
  background: #e2e8f0;
}


.flow-preset.active {
  background: #334155;

  color: white;
}


/* =========================================================
   FLOW CANVAS
========================================================= */

.flow-canvas {
  position: relative;

  width: 100%;

  height: 360px;

  overflow: hidden;

  border-radius: 12px;

  background-color: #f8f9fb;

  background-image:
    radial-gradient(
      circle,
      #c8cfe0 1px,
      transparent 1px
    );

  background-size: 22px 22px;
}


.flow-svg {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  pointer-events: none;

  z-index: 1;
}


.flow-node {
  position: absolute;

  width: 210px;

  background: white;

  border-radius: 16px;

  border: 2px solid;

  box-shadow:
    0 2px 12px rgba(0,0,0,0.07);

  z-index: 3;

  transition:
    transform 0.25s ease;
}


.flow-node:hover {
  transform: translateY(-2px);
}


/* =========================================================
   FLOW NODE HEADER
========================================================= */

.flow-node-header {
  display: flex;

  align-items: center;

  gap: 8px;

  padding: 10px 12px;

  border-bottom: 1px solid;

  border-radius:
    14px 14px 0 0;
}


.flow-node-icon {
  width: 20px;
  height: 20px;

  border-radius: 7px;

  display: flex;

  align-items: center;

  justify-content: center;
}


.flow-node-title {
  font-size: 11px;

  font-weight: 600;
}


/* =========================================================
   FLOW NODE BODY
========================================================= */

.flow-node-body {
  padding:
    10px 12px;

  color: #94a3b8;

  font-size: 10px;

  line-height: 1.6;
}


/* =========================================================
   FLOW TRANSITIONS
========================================================= */

.flow-transitions {
  padding:
    0 12px 10px;

  border-top: 1px solid;
}


.flow-transition-title {
  margin:
    8px 0 6px;

  font-size: 9px;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}


.flow-transition {
  display: flex;

  align-items: center;

  gap: 6px;

  margin-bottom: 4px;

  padding:
    6px 8px;

  border: 1px solid;

  border-radius: 8px;

  background: white;
}


.flow-transition-dot {
  width: 6px;
  height: 6px;

  flex-shrink: 0;

  border-radius: 50%;
}


.flow-transition-text {
  flex: 1;

  color: #94a3b8;

  font-size: 9.5px;
}


.flow-transition-port {
  width: 12px;
  height: 12px;

  flex-shrink: 0;

  border: 2px solid;

  border-radius: 50%;
}


/* =========================================================
   FLOW INPUT PORT
========================================================= */

.flow-input-port {
  position: absolute;

  top: -10px;
  left: -10px;

  width: 20px;
  height: 20px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 2px solid;

  border-radius: 50%;

  background: white;
}


.flow-input-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;
}


/* =========================================================
   LIVE BADGE
========================================================= */

.flow-live-badge {
  position: absolute;

  top: 12px;
  right: 12px;

  display: flex;

  align-items: center;

  gap: 6px;

  padding:
    4px 8px;

  border:
    1px solid #e2e8f0;

  border-radius: 8px;

  background:
    rgba(255,255,255,0.9);

  font-size: 8px;

  font-weight: 600;

  color: #475569;

  z-index: 5;
}


.flow-live-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #4ade80;

  animation:
    dashboardPulse 1.5s infinite;
}


/* =========================================================
   FLOW STATS
========================================================= */

.flow-stats {
  position: absolute;

  bottom: 12px;
  left: 12px;

  display: flex;

  gap: 12px;

  padding:
    6px 10px;

  border:
    1px solid #e2e8f0;

  border-radius: 8px;

  background:
    rgba(255,255,255,0.9);

  font-size: 8px;

  color: #64748b;

  z-index: 5;
}


.flow-stats strong {
  color: #334155;
}


/* =========================================================
   FLOATING BADGE
========================================================= */

.live-calls-badge {
  position: absolute;

  right: -12px;
  bottom: -12px;

  display: flex;

  align-items: center;

  gap: 8px;

  padding:
    8px 12px;

  border:
    1px solid #f1f5f9;

  border-radius: 12px;

  background: white;

  box-shadow:
    0 8px 25px rgba(15,23,42,0.12);

  color: #475569;

  font-size: 11px;

  font-weight: 600;

  z-index: 10;
}


.live-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #4ade80;

  animation:
    dashboardPulse 1.5s infinite;
}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes dashboardFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes dashboardSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}


@keyframes dashboardPreviewEnter {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes dashboardTabIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes dashboardPulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}


/* =========================================================
   MOVING FLOW DOT
========================================================= */

.flow-moving-dot {
  fill: currentColor;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

  .dashboard-grid {
    grid-template-columns: 1fr;

    gap: 50px;
  }

  .dashboard-copy {
    max-width: 700px;

    margin: 0 auto;

    text-align: center;
  }

  .dashboard-description {
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard-feature {
    text-align: left;
  }

  .dashboard-preview {
    width: 100%;

    max-width: 700px;

    margin: 0 auto;
  }

}


@media (max-width: 600px) {

  .dashboard-section {
    padding:
      60px 16px;
  }

  .dashboard-title {
    font-size: 38px;
  }

  .dashboard-tabs {
    overflow-x: auto;
  }

  .dashboard-tab {
    white-space: nowrap;

    padding:
      9px 12px;

    font-size: 12px;
  }

  .dashboard-panel {
    padding: 16px;
  }

  .dashboard-kpi-grid {
    gap: 6px;
  }

  .dashboard-kpi {
    padding: 12px 6px;
  }

  .dashboard-kpi-value {
    font-size: 20px;
  }

  .dashboard-kpi-label {
    font-size: 10px;
  }

  .outcome-label {
    width: 105px;
  }

  .flow-canvas {
    height: 340px;
  }

  .automation-header {
    align-items: flex-start;

    flex-direction: column;
  }

  .live-calls-badge {
    right: 8px;
  }

}