/* ✅ Inventory CSS */

#inventoryTab {
  font-family: Arial, sans-serif;
  background: #f2f2f2;
  margin: 0;
  padding: 0;
}

#inventoryTab .container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

/* Sidebar */
#inventoryTab .sidebar {
  width: 250px;
  background-color: #fff;
  padding: 20px;
  border-right: 1px solid #ccc;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
}

#inventoryTab .sidebar h3 {
  margin-top: 0;
  font-size: 18px;
  color: #333;
}

#inventoryTab .sidebar a {
  display: block;
  color: #007bff;
  text-decoration: none;
  margin: 6px 0;
}

#inventoryTab .sidebar a:hover {
  text-decoration: underline;
}

/* Main Content */
#inventoryTab .main-content {
  flex-grow: 1;
  padding: 30px;
  background: #f2f2f2;
}

#inventoryTab .form-section {
  background: white;
  padding: 25px 30px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  max-width: 700px;
  width: 100%;
}

/* Labels and Inputs */
#inventoryTab label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}

#inventoryTab input[type="number"],
#inventoryTab select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

#inventoryTab input[type="number"]:focus,
#inventoryTab select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 3px #aad4ff;
}

/* Aligned Checkboxes */
#inventoryTab .checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 10px;
}

#inventoryTab .checkbox-row input[type="checkbox"] {
  transform: scale(1.2);
  margin: 0;
  cursor: pointer;
}

#inventoryTab .checkbox-row label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
}

/* Disabled Inputs */
#inventoryTab input[disabled],
#inventoryTab select[disabled] {
  background-color: #eee;
  cursor: not-allowed;
}

/* Buttons */
#inventoryTab button {
  padding: 10px 20px;
  font-size: 16px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}

#inventoryTab button:hover {
  background: #0056b3;
}

/* Result */
#inventoryTab #inventoryResult {
  background: #e7f3ff;
  padding: 20px;
  margin-top: 20px;
  border-radius: 10px;
  color: #003366;
  font-size: 15px;
}

/* Chart */
#inventoryTab canvas#volumeChart {
  max-width: 300px;
  margin: 20px auto;
  display: block;
}

/* Footnote */
#inventoryTab .footnote {
  font-size: 12px;
  color: #555;
  margin-top: 10px;
  display: none;
}

#inventoryTab .footnote.active {
  display: block;
}

/* Hide Elements */
#inventoryTab .hidden {
  display: none !important;
}

/* ✅ Input Grid for Grouped Fields */
#inventoryTab .input-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

#inventoryTab .input-group {
  display: flex;
  flex-direction: column;
}

#inventoryTab .input-group label {
  font-weight: 500;
  margin-bottom: 5px;
  color: #333;
}

/* 🔁 Responsive Grid Collapse */
@media (max-width: 1200px) {
  #inventoryTab .input-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  #inventoryTab .input-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  #inventoryTab .input-grid {
    grid-template-columns: 1fr;
  }
}

/* ✅ Bulk Modal Upload */
#bulkModal {
  display: none;
  position: fixed;
  top: 5%;
  left: 5%;
  right: 5%;
  bottom: 5%;
  background: #fff;
  border: 1px solid #aaa;
  padding: 20px;
  box-shadow: 0 0 12px #aaa;
  z-index: 999;
  overflow: auto;
  max-height: 90vh;
}

#bulkModal.show {
  display: block;
}

#bulkResultsTable table {
  width: 100%;
  border-collapse: collapse;
}

#bulkResultsTable th,
#bulkResultsTable td {
  border: 1px solid #888;
  padding: 6px;
  text-align: center;
}

#closeBtnBulk {
  float: right;
  background: crimson;
  color: white;
  border: none;
  padding: 5px 10px;
}

/* Spinner Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile Button Handling */
@media (max-width: 768px) {
  #inventoryTab .container {
    flex-direction: column;
  }

  #inventoryTab .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #ccc;
    position: relative;
  }

  #inventoryTab .main-content {
    padding: 20px;
  }

  #inventoryTab .form-section {
    padding: 20px;
    margin-top: 10px;
    box-shadow: none;
    border-radius: 8px;
  }

  #inventoryTab input,
  #inventoryTab select {
    font-size: 13px;
    padding: 8px;
  }

  #inventoryTab button {
    width: 100%;
    padding: 10px;
  }
}
.hidden {
  display: none;
}

