/* =============================================
   StrigLab Dashboard Styles (100vh Layout)
   ============================================= */

/* Main content adjustments for 100vh on dashboard only */
.dashboard-page {
  padding: var(--space-6);
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Main Grid */
.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
}

/* Rows sizing and alignment */
.dash-row-1 {
  display: flex !important;
  width: 100%;
  flex: 0 0 auto;
  gap: var(--space-4) !important;
  margin-bottom: 0 !important;
}

.dash-row-2 {
  display: flex !important;
  width: 100%;
  flex: 0 0 auto;
  gap: var(--space-4) !important;
  margin-bottom: 0 !important;
}

.dash-row-3 {
  display: flex !important;
  width: 100%;
  flex: 1 1 0;
  gap: var(--space-4) !important;
  min-height: 0;
  margin-bottom: 0 !important;
}

.dash-row-4 {
  display: flex !important;
  width: 100%;
  flex: 1 1 0;
  gap: var(--space-4) !important;
  min-height: 0;
  margin-bottom: var(--space-4) !important;
}

.bottom-row {
  flex: 1;
  min-height: 150px; /* Prevent scrollable body from completely collapsing when dashboard is not 100vh */
}

.dashboard-grid .card,
.dashboard-grid .kpi-card,
.dashboard-grid .finance-card,
.dashboard-grid .chart-card {
  flex: 1; /* Make all cards fill the row equally */
  width: 100%;
}

/* Inner Card Layouts */
.chart-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

.flex-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

.chart-body, .meta-summary, .activity-feed {
  flex: 1;
  min-height: 0; /* Important for flex children scrolling */
}

.scrollable-body {
  overflow-y: auto;
  padding-right: var(--space-2);
}

/* Centralized Numbers */
.numbers-body {
  display: flex;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  width: 100%;
}

.big-number {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.number-label {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

/* Authentic Funnel styles (Pill Shape) */
.pill-funnel-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.pill-funnel-row {
  width: 100%;
}

.pill-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
}

.pill {
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pill-label {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Empty texts */
.empty-text {
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  display: block;
}

/* TV Mode adjustments inside Dashboard */
body.tv-mode .dashboard-page {
  height: calc(100vh - 60px);
  padding: var(--space-4);
}

body.tv-mode .dashboard-grid {
  height: 100%;
}
