/* -----------------------------------
   Existing Styles (Ensure these are already present)
----------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Rozha+One&display=swap");
/* Reset default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", serif !important;
  background-color: #f4f4f4;
  line-height: 1.6;
}

/* Header Styling */
header {
  background-color: #ffffff;
  color: #fff;
  padding: 10px 0;
  text-align: center;
}

/* Navigation Bar Styling */
.navbar {
  background-color: #42b647;
  z-index: 1000; /* High z-index to ensure it stays on top */
  /* Overflows removed for cleaner display */
}

.navbar div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto; /* Centering the navbar */
  flex-wrap: wrap;
  padding: 0 20px;
}

.navbar a {
  color: #f2f2f2;
  text-decoration: none;
  padding: 10px 20px;
  display: block;
  transition: background-color 0.3s;
}

.navbar a:hover {
  background-color: #ffffffa1;
  color: #f23e14;
  border-radius: 8px;
}

.navbar a.active {
  background-color: #ffffff;
  color: #f23e14;
  border-radius: 8px;
}

/* Hamburger Button - hidden on desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Responsive Settings */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .navbar div {
        justify-content: flex-start; /* Align hamburger to the left */
    }
    .navbar .menu {
        display: none;
        width: 100%; /* Full width */
        position: absolute;
        top: 60px; /* Adjust based on your navbar's height */
        left: 0;
        background-color: #42b647;
        flex-direction: column;
        z-index: 1000; /* Ensuring menu is above all content */
    }
    .navbar .menu a {
        padding: 15px;
        text-align: center;
        color: #000;
        display: block;
    }
}


/* Container Styling */

/* Alert Messages */
.alert {
  padding: 15px;
  background-color: #f8d7da;
  color: #721c24;
  margin-bottom: 20px;
  border-radius: 4px;
}

.success {
  padding: 15px;
  background-color: #d4edda;
  color: #155724;
  margin-bottom: 20px;
  border-radius: 4px;
}

/* Form Styling */
form {
  display: flex;
  flex-direction: column;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

form label {
  margin-top: 10px;
  font-weight: bold;
}

/* Styling for Select Elements */
form select {
  appearance: none;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="%23999" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  cursor: pointer;
  transition: border-color 0.3s;
}

form select:focus {
  border-color: #007bff;
  outline: none;
}

/* Styling for Input Elements */
form input[type="number"],
form input[type="text"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.3s;
}

.text-primary2 {
   
    color: #198754;
}

form input[type="number"]:focus,
form input[type="text"]:focus {
  border-color: #007bff;
  outline: none;
}

/* Styling for Buttons */
form button {
  padding: 10px 15px;
  background: #198754;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 3px;
  margin-top: 15px;
  transition: background-color 0.3s;
}

form button:hover {
  background: #9c2d15;
}

/* Stock Info Display Styles */
.stock-info {
  margin-top: 20px;
  padding: 15px;
  background-color: #e9ecef;
  border-radius: 5px;
  display: none; /* Hidden by default */
}

.stock-info p {
  margin: 5px 0;
  font-size: 16px;
}

.loading {
  display: none;
  font-style: italic;
  color: #555;
}

/* -----------------------------------
   New Styles for products.php
----------------------------------- */

/* Products Table Styling */
.products-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.products-table th,
.products-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.products-table th {
  background-color: #ff4d24;
  color: white;
}

.products-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.products-table tr:hover {
  background-color: #ddd;
}

.products-table a.edit,
.products-table a.delete {
  padding: 5px 10px;
  border-radius: 3px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
}

.products-table a.edit {
  background-color: #28a745;
}

.products-table a.delete {
  background-color: #dc3545;
}

.products-table a.edit:hover {
  background-color: #218838;
}

.products-table a.delete:hover {
  background-color: #c82333;
}

/* Responsive Table */
@media screen and (max-width: 768px) {
  .products-table thead {
    display: none;
  }

  .products-table,
  .products-table tbody,
  .products-table tr,
  .products-table td {
    display: block;
    width: 100%;
  }

  .products-table tr {
    margin-bottom: 15px;
  }

  .products-table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  .products-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    padding-left: 15px;
    font-weight: bold;
    text-align: left;
  }
}

/* Optional: Add Hover Effects for Actions */
.products-table a.edit:hover,
.products-table a.delete:hover {
  opacity: 0.8;
}

/* -----------------------------------
   Existing Styles (Ensure these are already present)
----------------------------------- */

/* ... [Previous CSS] ... */

/* -----------------------------------
   New Styles for statistics.php
----------------------------------- */

/* Statistics Table Styling */
.statistics-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.statistics-table th,
.statistics-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.statistics-table th {
  background-color: #ff4d24;
  color: white;
}

.statistics-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.statistics-table tr:hover {
  background-color: #ddd;
}

/* Responsive Table */
@media screen and (max-width: 768px) {
  .statistics-table thead {
    display: none;
  }

  .statistics-table,
  .statistics-table tbody,
  .statistics-table tr,
  .statistics-table td {
    display: block;
    width: 100%;
  }

  .statistics-table tr {
    margin-bottom: 15px;
  }

  .statistics-table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  .statistics-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    padding-left: 15px;
    font-weight: bold;
    text-align: left;
  }
}

/* Action Button Styling (Optional) */
.statistics-table a.refresh {
  padding: 5px 10px;
  border-radius: 3px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  background-color: #17a2b8;
  transition: background-color 0.3s;
}

.statistics-table a.refresh:hover {
  background-color: #138496;
}

/* Loading Indicator */
.loading-indicator {
  display: none;
  font-style: italic;
  color: #555;
  margin-top: 20px;
}

/* -----------------------------------
   Existing Styles (Ensure these are already present)
----------------------------------- */

/* ... [Previous CSS] ... */

/* -----------------------------------
   New Styles for Summary Boxes in statistics.php
----------------------------------- */

/* Container for Summary Boxes */
.summary-boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 30px;
}

/* Individual Summary Box */
.summary-box {
  background-color: #ff8b001a;
  color: #f23e14;
  flex: 1 1 22%; /* Adjust the width as needed */
  margin: 10px;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-width: 200px; /* Ensure boxes don't get too small on mobile */
}

/* Summary Box Titles */
.summary-box h3 {
  margin-bottom: 10px;
  font-size: 1.2em;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
  color: #000;
}

/* Summary Box Data */
.summary-box p {
  font-size: 1.5em;
  margin: 0;
  font-weight: bold;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .summary-boxes {
    flex-direction: column;
    align-items: center;
  }

  .summary-box {
    flex: 1 1 80%;
  }
}
