@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =====================================================
   GLOBAL
===================================================== */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  /* bg-slate-50 */
  color: #0f172a;
  /* text-slate-900 */
  -webkit-font-smoothing: antialiased;
}

/* =====================================================
   SCROLLBAR
===================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.05);
}

/* =====================================================
   FILTER GROUPS
===================================================== */
.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  /* slate-600 */
  margin-bottom: 0.25rem;
}

.filter-group input,
.filter-group select {
  width: 100%;
  background: white;
  border: 1px solid #cbd5e1;
  /* slate-300 */
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: #38bdf8;
  /* sky-400 */
  box-shadow: 0 0 0 1px #38bdf8;
  outline: none;
}

/* =====================================================
   MAIN TABS
===================================================== */
.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: 0.15s;
}

.tab-btn:hover {
  color: #0369a1;
  /* sky-700 */
}

.tab-btn.active {
  background: white;
  color: #0369a1;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: 1px solid #e2e8f0;
  /* slate-200 */
}

/* =====================================================
   KPI CARDS
===================================================== */
.kpi-card {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0.25rem;
  color: #0f172a;
}

/* =====================================================
   CHART PANELS
===================================================== */
.chart-container {
  position: relative;
  width: 100%;
  min-height: 450px;
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

/* =====================================================
   AFFILIATE CARD
===================================================== */
.aff-card {
  text-align: center;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* =====================================================
   SUBTABS
===================================================== */
.subtab-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: 0.15s;
}

.subtab-btn:hover {
  color: #0284c7;
}

.subtab-btn.active {
  background: white;
  color: #0284c7;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: 1px solid #e2e8f0;
}

/* =====================================================
   BUTTONS
===================================================== */
.btn-primary {
  background-color: #0284c7;
  /* sky-600 */
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background-color: #0369a1;
  /* sky-700 */
}

.btn-secondary {
  background: white;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: 0.15s;
}

.btn-secondary:hover {
  background: #f1f5f9;
  /* slate-50 */
}

.btn-danger {
  background-color: #dc2626;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: 0.15s;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

/* =====================================================
   TIMEFRAME MODE SELECTOR
===================================================== */
.tf-mode-container {
  display: flex;
  background: #f1f5f9;
  /* slate-100 */
  padding: 0.125rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.tf-mode-btn {
  flex: 1;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.25rem 0;
  border-radius: 0.375rem;
  color: #64748b;
  /* slate-500 */
  transition: 0.15s;
}

.tf-mode-btn.active {
  background: white;
  color: #0284c7;
  /* sky-600 */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}