/* assets/style.css */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* 1. Make the html/body full-height and remove margins */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2. Gradient background */
html, body {
  background: linear-gradient(135deg, #fff 0%, #fff 50%, #fff 100%) !important;
  background-attachment: fixed;
  color: #fff;
}

/* 3. Ensure the Dash root container also stretches */
#react-entry-point, /* Dash v2+ root */  
#__dash-root {     /* Dash v1 root */  
  height: 100%;
}

/* 4. Your app’s outer container */
.app-container {
  min-height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* Make the outer control a fixed height/width */
.fixed-dropdown__control {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
}

/* Prevent the tag container from wrapping & growing */
.fixed-dropdown__value-container {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  max-height: 38px !important;
}

/* Optional: hide the horizontal scrollbar track */
.fixed-dropdown__value-container::-webkit-scrollbar {
  height: 4px;
}
.fixed-dropdown__value-container::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 2px;
}

.H1 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-weight: 700;
}

.H2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-weight: 600;
}

/* The fixed‐height, flex‐column sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #000;
  box-sizing: border-box;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #000;
  text-decoration: none;
  margin-bottom: 8px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(61, 198, 195, 0.15);
  box-shadow: 0 2px 4px rgba(61, 198, 195, 0.2);
}

.nav-link--active {
  background-color: #3DC6C3;
  color: #fff;
  box-shadow: 0 2px 8px rgba(61, 198, 195, 0.3);
  font-weight: 600;
}

.nav-link--active:hover {
  background-color: #35B8B5;
  box-shadow: 0 2px 10px rgba(61, 198, 195, 0.4);
}

.nav-icon {
  width: 60px;
  height: 60px;
}

.nav-text {
  font-size: 16px;
}

/* Header styling inside sidebar */
.sidebar-header {
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  color: #fff;
}

/* Footer pushed to bottom automatically */
.sidebar-footer {
  font-size: 0.9rem;
  font-style: italic;
  border-top: 1px solid #fff;
  padding-top: 10px;
}

/* KPI Cards grid */
/* container for all cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
/* individual card styling */
.dashboard-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 16px;

  display: flex;
  flex-direction: column;
  justify-content: space-between; /* keep spacing consistent */
  min-height: 80px; /* optional: equal height cards */
}
/* Title and value styling */
.dashboard-card-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
  flex-shrink: 0;   /* don’t compress title */
}
.dashboard-card-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.2;
  margin-top: auto; /* push value towards bottom for alignment */
}

/* Hover for more “pop” */
.dashboard-card:hover {
  transform: translateY(4px);
  box-shadow: 0 10px 20px #3DC6C3;
}

/* Tabs container */
.custom-tabs {
  margin-top: 16px;
  background-color: #fff;
  font-size: 16px;
  border: none;
  text-align: center;
  height: 50px;
}

/* Base style for each tab */
.custom-tab {
  background-color: #fff !important; /* teal */
  color: #000000;
  height: 50px;
  display: flex !important;
  align-items: center !important;   /* centers text vertically */
  justify-content: center !important; /* centers text horizontally */
  margin-right: 12px;
  border-radius: 15px;
  border: none;
  transition: all 0.2s ease-in-out; /* smooth hover animation */
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-weight: 600;
}

/* Hover effect */
.custom-tab:hover {
  background-color: #3DC6C3 !important; /* bright yellow on hover */
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: translateY(-2px); /* subtle lift on hover */
  color: #fff !important;
}

/* Selected tab style */
.custom-tab--selected {
  background-color: #3DC6C3 !important;
  color: #fff !important;
  border: 3px solid #3DC6C3 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  border-radius: 15px;
}

/* Container for Top20 + Pie */
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; /* Top20 bigger than Pie */
  gap: 16px;
  margin-top: 24px;
}

/* Chart card styling */
.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;
  justify-content: center;
}

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

/* Graph styling */
.chart-card__graph {
  height: 320px;
}

/* Responsive Layout Classes for Tab Content */
.tab-content-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Responsive 2-column grid */
.responsive-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Responsive filter row */
.responsive-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.responsive-filter-row > * {
  flex: 1 1 auto;
  min-width: 150px;
}

/* ✅ Responsive breakpoint for tablets and smaller */
@media (max-width: 1024px) {
  .responsive-grid-2col {
    grid-template-columns: 1fr; /* Stack vertically on tablets */
  }

  .responsive-filter-row {
    flex-direction: column;
  }

  .responsive-filter-row > * {
    width: 100%;
  }
}

/* ✅ Responsive breakpoint for mobile */
@media (max-width: 900px) {
  .chart-grid {
    grid-template-columns: 1fr; /* Stack vertically on small screens */
  }
  .chart-card__graph {
    height: 280px; /* shrink a little on small devices */
  }

  /* Make tabs scrollable on mobile */
  .custom-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }

  .custom-tab {
    margin-right: 8px;
    padding: 10px 15px;
    font-size: 14px;
  }
}

/* Additional responsive adjustments for very small screens */
@media (max-width: 600px) {
  .responsive-grid-2col {
    gap: 12px;
  }

  .tab-content-responsive {
    padding: 10px;
  }

  /* Adjust dropdown widths on mobile */
  .responsive-filter-row .Select {
    min-width: 100%;
  }

  /* Make data tables more readable on mobile */
  .dash-table-container {
    font-size: 12px;
  }
}

