/* ═══════════════════════════════════════════════════════════════════
   css/advanced-analytics.css — Styling for the Advanced Analytics
   dashboard matching the exact screenshots provided.
   ═══════════════════════════════════════════════════════════════════ */

.advanced-analytics {
  padding: var(--s4);
  background: var(--bg-body); /* Or #f4f6f8 for PLG app style */
  font-family: var(--font-sans);
}

/* Tabs */
.aa-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s5);
  overflow-x: auto;
}
.aa-tab {
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.aa-tab:hover {
  color: var(--text);
}
.aa-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

/* KPI Grid */
.aa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s4);
  margin-bottom: var(--s6);
}
.aa-kpi-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: var(--s5);
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.aa-kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.aa-kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-sans); /* Or inter tight */
}

/* Funnel Table */
.aa-table-container {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow-x: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.aa-table {
  width: 100%;
  border-collapse: collapse;
}
.aa-table th, .aa-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.aa-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}
.aa-table th:first-child, .aa-table td:first-child {
  text-align: left;
  font-weight: 500;
}
.aa-table tbody tr:hover {
  background: #fafafa;
}

/* Heatmap cells */
.heatmap-green {
  background-color: #8ce196; /* Matches the vibrant green in screenshot */
  color: #0b5f16;
  font-weight: 600;
}
.heatmap-red {
  background-color: #f78d8a; /* Matches the vibrant red in screenshot */
  color: #7a100d;
  font-weight: 600;
}
.heatmap-neutral {
  background-color: #f0f0f0;
  color: #555;
}
