 {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  height: 100vh;
  background-color: #f8f9fa;
}

.sidebar {
  width: 220px;
  background: #343a40;
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  font-size: 24px;
  margin-bottom: 30px;
  text-align: center;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  display: flex;
  align-items: center;
  transition: 0.2s ease;
}

.menu a i {
  margin-right: 10px;
  width: 20px;
}

.menu a:hover {
  color: #adb5bd;
}

.content {
  flex: 1;
  padding: 40px;
}

.content h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #343a40;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.styled-table thead {
  background-color: #f8f9fa;
  font-weight: 600;
}

.styled-table th, .styled-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.styled-table tbody tr:hover {
  background-color: #f1f1f1;
}

.add-btn {
  padding: 8px 16px;
  background-color: #5e72e4;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.edit-btn, .delete-btn {
  padding: 6px 10px;
  margin-right: 4px;
  font-size: 13px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.edit-btn {
  background-color: #11cdef;
  color: white;
}

.delete-btn {
  background-color: #f5365c;
  color: white;
}

body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', sans-serif;
}

.form-container {
  width: 100%;
  max-width: 400px;
  margin: 40px auto;
  background: white;
  padding: 30px 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.form-container h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #333;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group input {
  width: 100%;
  padding: 14px 10px 6px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background: transparent;
  transition: border-color 0.3s ease;
}

.form-group label {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 14px;
  color: #6c757d;
  pointer-events: none;
  transition: 0.2s ease all;
}

.form-group input:focus {
  outline: none;
  border-color: #5e72e4;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: -8px;
  left: 10px;
  font-size: 11px;
  color: #5e72e4;
  background: white;
  padding: 0 4px;
}

.form-group select {
  width: 100%;
  padding: 14px 10px 6px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background: white;
  appearance: none;
}

.modal-content .form-group {
  width: 100%;
  margin-bottom: 16px;
}

.modal-content .form-group input,
.modal-content .form-group select {
  width: 100%;
  box-sizing: border-box;
}



.submit-btn {
  width: 100%;
  padding: 12px;
  font-weight: bold;
  background-color: #5e72e4;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.submit-btn:hover {
  background-color: #324cdd;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fff;
  margin: 80px auto;
  padding: 30px 25px 25px 25px; /* top, right, bottom, left */
  border: 1px solid #888;
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
}

.close {
  color: #aaa;
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: black;
}
.styled-select {
  width: 100%;
  padding: 12px 10px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background-color: white;
  appearance: none;
}

.styled-select:focus {
  outline: none;
  border-color: #5e72e4;
}
.form-group.no-float label {
  position: static;
  font-size: 14px;
  color: #6c757d;
  display: block;
  margin-bottom: 6px;
}

.form-group.no-float select {
  margin-top: 0;
}

.styled-select {
  width: 100%;
  padding: 12px 10px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background-color: white;
  appearance: none;
}

.form-group.no-float label {
  position: static;
  font-size: 14px;
  color: #6c757d;
  display: block;
  margin-bottom: 6px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fff;
  margin: 80px auto;
  padding: 30px 25px;
  border: 1px solid #888;
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.modal-content h3 {
  margin-top: 0;
}

.modal-content p {
  font-size: 15px;
  color: #333;
}

.close {
  color: #aaa;
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: black;
}
.recipe-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
}
.sidebar-brand {
  text-align: center;
  padding: 20px 10px;
}

.brand-logo {
  height: 150px;
  object-fit: contain;
  max-width: 100%;
  display: inline-block;
}

.cost-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 30px 0;
  justify-content: flex-start;
}

.cost-tile {
  width: 250px;
  height: 250px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.cost-tile:hover {
  background-color: #f0f0f0;
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.cost-tile i {
  font-size: 48px;
  color: #6c78f5;
  margin-bottom: 16px;
}

.cost-tile span {
  font-size: 18px;
  font-weight: 600;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  max-width: 1700px; /* ensure it's wide enough */
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-group.full-width {
  width: 100%;
  margin-bottom: 16px;
}

.horizontal-form {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.horizontal-form .form-group {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.horizontal-form input {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.horizontal-form {
  gap: 12px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #28a745;
  transition: transform 0.2s ease;
}

.icon-btn:hover {
  transform: scale(1.2);
}

.image-upload-circle img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.image-upload-circle:hover img {
  border-color: #5e72e4;
}


.image-upload-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #ccc;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  cursor: pointer;
  background-color: #f8f9fa;
}

.image-upload-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.upload-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #888;
  text-align: center;
  pointer-events: none;
}

.hidden {
  display: none;
}

.preview-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  display: block;
  aspect-ratio: 1 / 1; /* ✅ Ensures it's always square */
}

.delete-row-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: red;
  font-size: 1.2em;
}

.hidden {
  display: none;
}

.positive { color: green; }
.negative { color: red; }

#addProductModal { transition: opacity .3s ease-in-out; }


.qty-input { width: 80px; text-align: right; }
.prod-select { width: 100%; }
.img-cell    { text-align: center; }