/* Grid: left big, right column stacked */
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(420px, 2fr) minmax(340px, 1fr);
  gap: 16px;
  margin-top: 24px;
  align-items: stretch;
}

/* Right column stacks two pies */
.chart-stack {
  display: grid;
  grid-template-rows: 1fr 1fr; /* two equal-height rows */
  gap: 16px;
  min-width: 0;
}

/* Card + graph base styles (you likely have similar already) */
.chart-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chart-card__title {
  font-weight: 600;
  /*margin-bottom: 8px;*/
  color: #000;
  font-size: 16px;
  text-align: center;
}

.chart-card__graph {
  width: 100%;
  min-height: 240px;
}

/* Taller left chart */
.chart-card--tall .chart-card__graph--tall {
  height: 540px;          /* big top20 - enough for 20 bars */
  min-height: 540px;
}

/* Pies are ~half height of tall chart */
.chart-card__graph--half {
  height: 210px;          /* ~half of 460px */
}

/* Responsiveness */
@media (max-width: 1200px) {
  .chart-card--tall .chart-card__graph--tall { height: 480px; min-height: 480px; }
  .chart-card__graph--half { height: 200px; }
}

@media (max-width: 980px) {
  .chart-grid {
    grid-template-columns: 1fr;     /* stack left+right */
  }
  .chart-stack {
    grid-template-rows: auto auto;  /* keep two pies stacked */
  }
  .chart-card--tall .chart-card__graph--tall { height: 450px; min-height: 450px; }
  .chart-card__graph--half { height: 220px; }  /* slightly larger on narrow */
}

@media (max-width: 640px) {
  .chart-card--tall .chart-card__graph--tall { height: 380px; min-height: 380px; }
  .chart-card__graph--half { height: 200px; }
}

/* Ensure main content can shrink when sidebar toggles */
#page-content { min-width: 0; min-height: calc(100vh - 20px); }

/* Export dropdown styles */
.filters-export-btn {
  background: #3DC6C3;
  color: white;
  border: none;
  height: 40px;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.filters-export-btn:hover {
  background-color: #3DC6C3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.filters-export-btn:active {
  transform: translateY(1px);
}
.filters-export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.export-dropdown-container {
  position: relative;
  display: inline-block;
}

.export-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 120px;
  margin-top: 4px;
}

.export-option-btn {
  width: 100%;
  background: white;
  border: none;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  transition: background 0.2s ease;
}

.export-option-btn:hover {
  background: #f3f4f6;
}

.export-option-btn:first-child {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.export-option-btn:last-child {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* ── Dash DataTable pagination ──────────────────────────────────── */
.dash-table-container .previous-next-container {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
}

.dash-table-container .previous-next-container > button {
  min-width: 36px;
  height: 36px;
  font-size: 16px;
  flex-shrink: 0;
}

/* Page number area: "1 / 155" — force dark text & fixed height to match buttons */
.dash-table-container .page-number {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 36px;
  font-size: 14px;
  color: #374151 !important;
}

.dash-table-container .page-number .last-page {
  color: #374151 !important;
  font-size: 14px;
  line-height: 36px;
}

/* Container holds the absolutely-positioned input — must match input height */
.dash-table-container .current-page-container {
  min-width: 54px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center;
}

.dash-table-container .current-page-shadow {
  min-width: 54px !important;
  height: 36px;
  line-height: 36px;
  color: transparent;
}

/* The editable page input — match container height, not overflow */
.dash-table-container input.current-page {
  min-width: 54px !important;
  height: 36px !important;
  text-align: center;
  font-size: 14px;
  padding: 0 6px !important;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-sizing: border-box;
}

