.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.page-title {
  font-size: 1.5rem;
  color: #2B3674;
  font-weight: bold;
  margin-top: 1.5rem;  
  margin-bottom: 3rem;
}

.metric-card.enhanced {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1.2rem;
  gap: 1rem;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.icon-wrapper {
  background-color: #f4f7fe;
  border-radius: 50%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-wrapper img {
  width: 28px;
  height: 28px;
}

.metric-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-details .label {
  font-size: 14px;
  color: #888;
  margin-bottom: 4px;
}

.metric-details .value {
  font-size: 18px;
  font-weight: 700;
  color: #2B3674;
}

.metric-details .trend {
  font-size: 12px;
  margin-top: 4px;
}

.metric-details .trend.positive {
  color: #3ECF8E;
}

.metric-card.no-icon {
  justify-content: center;
  text-align: center;
}

.metrics-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 2rem;
}

.metric-card.enhanced {
  flex: 1 1 calc(14.28% - 20px);
  min-width: 180px;
  max-width: 220px;
  box-sizing: border-box;
}

.content-wrapper {
  padding-right: 2rem;
  box-sizing: border-box;
}

.chart-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: white;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 16px;
}

.chart-card canvas {
  height: 280px !important;
  width: 100% !important;
}

.chart-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1B2559;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.chart-flex {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.chart-labels {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-labels strong {
  font-size: 1.5rem;
  color: #1B2559;
}

.label-text {
  font-size: 0.875rem;
  color: #64748B;
}

.expense-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.expense-label {
  font-size: 1rem;
  color: #1B2559;
  flex: 1;
}

.expense-bar {
  position: relative;
  background-color: #5DB79E;
  border-radius: 9999px;
  height: 28px;
  flex: 2;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.expense-fill {
  background-color: #024023;
  height: 100%;
  border-radius: 9999px;
}

.expense-value {
  position: absolute;
  right: 12px;
  font-weight: bold;
  color: #1B2559;
  font-size: 0.95rem;
}

.cashflow-card {
  padding: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.cashflow-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cashflow-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.cashflow-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cashflow-pill {
  background-color: #5DB79E;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-weight: 700;
  color: white;
  min-width: 100px;
  text-align: center;
}

.cashflow-label {
  font-size: 1rem;
  color: #1B2559;
  white-space: nowrap;
}

.cashflow-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cashflow-summary {
  background-color: #024023;
  color: white;
  padding: 1.2rem 1.5rem;
  border-radius: 20px;
  text-align: center;
  min-width: 150px;
}

.summary-amount {
  font-size: 1.5rem;
  font-weight: 700;
}

.summary-text {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.ratios-analysis {
  padding: 1.5rem;
}

.ratios-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

#ratiosAnalysisChart {
  flex: 2;
  height: 250px !important;
}

.summary-cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.summary-card {
  background-color: #5DB79E;
  border-radius: 20px;
  padding: 1rem;
  color: white;
  text-align: center;
  font-weight: 600;
}

.summary-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.summary-label {
  font-size: 0.85rem;
  margin-top: 4px;
}

.ratios-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

#ratiosAnalysisChart {
  flex: 1 1 60%;
  min-width: 280px;
  height: 250px !important;
}

.summary-cards {
  flex: 1 1 35%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.summary-card {
  background-color: #5DB79E;
  border-radius: 20px;
  padding: 1rem;
  color: white;
  text-align: center;
  font-weight: 600;
  min-width: 100px;
}

.summary-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.summary-label {
  font-size: 0.85rem;
  margin-top: 4px;
}

.invoice-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}

.invoice-card {
  flex: 1 1 48%;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  padding: 24px;
  min-width: 300px;
}

.invoice-card .chart-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1E1E4B;
}

.invoice-card table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-card th, .invoice-card td {
  text-align: left;
  padding: 12px 8px;
  font-size: 14px;
  color: #1E1E4B;
}

.invoice-card th {
  color: #A0AEC0;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .metric-card.enhanced {
    flex: 1 1 calc(33.33% - 20px);
  }
}

@media (max-width: 768px) {
  .metric-card.enhanced {
    flex: 1 1 calc(50% - 20px);
  }
}
