* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

body {
  background-color: #f4f6f8;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 100%; /* Full width */
  min-height: 100vh; /* Full height */
  background-color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column; /* Allow child elements to be stacked */
}

header h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
  color: #333;
}

.dashboard {
  margin-bottom: 40px;
}

.dashboard-cards {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.card {
  background-color: #007bff;
  color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.charts {
  margin-bottom: 40px;
  text-align: center;
}

.chart-wrapper {
  margin-bottom: 20px;
  max-width: 600px; /* Adjust max width for the chart */
  margin: 0 auto; /* Center the chart */
}

.chart-wrapper canvas {
  width: 100%; /* Make it responsive */
  height: 200px; /* Adjust the height to make it smaller */
}

.table-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

input[type="text"] {
  padding: 10px;
  width: 70%;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

button {
  padding: 10px 15px;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #218838;
}

.product-list {
  flex-grow: 1; /* Let the product list take the remaining space */
  overflow-y: auto; /* Allow vertical scrolling */
}

.table-wrapper {
  overflow-x: auto;
  height: 100%; /* Allow the table to take up full height */
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
}

table th,
table td {
  padding: 15px;
  border: 1px solid #ddd;
  text-align: left;
}

table th {
  background-color: #007bff;
  color: #fff;
  position: sticky;
  top: 0;
}

table tr:nth-child(even) {
  background-color: #f2f2f2;
}

table tr:hover {
  background-color: #e9e9e9;
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #fff;
}

.badge-due {
  background-color: #ff5733;
}

.badge-ok {
  background-color: #28a745;
}

.badge-warning {
  background-color: #ffcd56;
}

.status-icon {
  font-size: 16px;
  margin-right: 5px;
}

.status-icon.due {
  color: #ff5733;
}

.status-icon.ok {
  color: #28a745;
}

.status-icon.warning {
  color: #ffcd56;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allow buttons to wrap onto a new line */
  max-width: 100%; /* Limit to the container's width */
  overflow-x: auto; /* Enable horizontal scrolling if necessary */
}

.pagination-controls button {
  padding: 8px 12px;
  margin: 5px; /* Add margin to prevent buttons from sticking together */
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap; /* Ensure the buttons don't shrink and force text onto multiple lines */
}

.pagination-controls button.active {
  background-color: #0056b3;
}

.pagination-controls button:hover {
  background-color: #0056b3;
}

.search-bar {
  display: flex;
  justify-content: center;
  width: 100%;
}

.search-bar input {
  padding: 10px;
  width: 50%;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.button-group button {
  padding: 10px 15px;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.button-group button:hover {
  background-color: #218838;
}

.loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 50px;
  color: #007bff;
  z-index: 9999;
  display: block;
}
