/* Dashboard-only styles (scoped via #dashboardPage) */

#dashboardPage :is(.fa, .fas, .far, .fal, .fab) {
  color: #131313 !important;
}

/* IB Commission Growth + IB Summary cards */
#dashboardPage .dash-commission-card {
  border-radius: 22px;
  overflow: visible;
  background: #fff;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

#dashboardPage .dash-commission-card .card-header-custom {
  padding-top: 1.25rem;
  padding-bottom: 0.5rem;
}

#dashboardPage .dash-commission-card .card-body-custom {
  padding-top: 0;
} 

#dashboardPage .dash-commission-select {
  width: auto;
  min-width: 9.5rem;
  max-width: 100%;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #131313;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

#dashboardPage .dash-commission-chart {
  height: 280px;
}

#dashboardPage .dash-summary-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#dashboardPage .dash-summary-pill {
  margin-bottom: 0;
  background: #f1f5f9;
  padding: 1rem 1.25rem;
  border: none;
}

#dashboardPage .dash-summary-pill .summary-label {
  font-size: 0.875rem;
}

#dashboardPage .dash-summary-pill .summary-sublabel {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

#dashboardPage .dash-summary-pill .summary-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #131313;
}

/* IB List table */
#dashboardPage .dash-iblist-card {
  border-radius: 22px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  background: #fff;
}

#dashboardPage .dash-iblist-table thead th {
  background: #eef3ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.8rem;
  border-bottom: 0;
  white-space: nowrap;
}

#dashboardPage .dash-iblist-table thead th:first-child {
  border-top-left-radius: 12px;
}

#dashboardPage .dash-iblist-table thead th:last-child {
  border-top-right-radius: 12px;
}

#dashboardPage .dash-iblist-table tbody td {
  font-size: 0.875rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  vertical-align: middle;
}

#dashboardPage .dash-iblist-table tbody tr:nth-child(even) td {
  background: #f4f6f8;
}

/* subtle vertical separators like design */
#dashboardPage .dash-iblist-table th,
#dashboardPage .dash-iblist-table td {
  border-right: 1px dashed rgba(148, 163, 184, 0.35);
}
#dashboardPage .dash-iblist-table th:last-child,
#dashboardPage .dash-iblist-table td:last-child {
  border-right: 0;
}

#dashboardPage .dash-iblist-table tbody tr:last-child td {
  border-bottom: 0;
}

#dashboardPage .dash-status {
  font-weight: 700;
  font-size: 0.75rem;
  min-width: 88px;
}

#dashboardPage .dash-status-active {
  background: rgba(34, 197, 94, 0.18);
  color: #16a34a;
}

#dashboardPage .dash-status-suspended {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
}

#dashboardPage .dash-dots {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  color: #131313;
  background: transparent;
}

#dashboardPage .dash-dots:hover {
  background: #f1f5f9;
}

/* Top Performing IBs */
#dashboardPage .tp-ib-chart .tp-ib-bar {
  position: relative;
  z-index: 1;
}

#dashboardPage .tp-ib-chart .tp-ib-bar-shell {
  position: absolute;
  inset: 0;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  z-index: 0;
}

#dashboardPage .tp-ib-chart .tp-ib-bar-face {
  position: absolute;
  left: 5px;
  right: 5px;
  top: 10px;
  bottom: 0;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#dashboardPage .tp-ib-chart .tp-ib-bar--light .tp-ib-bar-shell {
  background: linear-gradient(180deg, #c8ddff 0%, #dceaff 28%, #e4f0ff 100%);
}

#dashboardPage .tp-ib-chart .tp-ib-bar--light .tp-ib-bar-face {
  background: linear-gradient(180deg, #e8f2ff 0%, #e1effe 42%, #e7f2ff 100%);
}

#dashboardPage .tp-ib-chart .tp-ib-bar--primary .tp-ib-bar-shell {
  background: linear-gradient(180deg, #8eb9ff 0%, #6ea0f5 45%, #4d8aed 100%);
}

#dashboardPage .tp-ib-chart .tp-ib-bar--primary .tp-ib-bar-face {
  background: linear-gradient(180deg, #2a7bff 0%, #0d6efd 38%, #0a58ca 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#dashboardPage .tp-ib-chart .tp-ib-bar-avatar {
  z-index: 2;
  bottom: 10px;
  width: 36px;
  height: 36px;
  object-fit: cover;
}

#dashboardPage .tp-ib-chart .tp-ib-tooltip {
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.08));
}

#dashboardPage .tp-ib-chart .tp-ib-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #fff;
}

/* Responsive: Top Performing IBs (mobile) */
@media (max-width: 575.98px) {
  #dashboardPage .tp-ib-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px; /* room for scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.55) rgba(241, 245, 249, 0.9);
  }

  #dashboardPage .tp-ib-scroll::-webkit-scrollbar {
    height: 6px;
  }

  #dashboardPage .tp-ib-scroll::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.9);
    border-radius: 999px;
  }

  #dashboardPage .tp-ib-scroll::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.55);
    border-radius: 999px;
  }

  /* keep chart readable: allow horizontal scrolling instead of squishing */
  #dashboardPage .tp-ib-chart .tp-ib-bars {
    min-width: 520px;
  }

  #dashboardPage .tp-ib-chart .tp-ib-axis {
    font-size: 0.65rem;
    padding-bottom: 4.2rem !important; /* keep labels aligned with names */
  }

  /* slightly smaller bars on mobile */
  #dashboardPage .tp-ib-chart .tp-ib-bar {
    max-width: 64px !important;
  }

  #dashboardPage .tp-ib-chart .tp-ib-bar-avatar {
    width: 32px;
    height: 32px;
    bottom: 8px;
  }
}

