body {
  position: relative;
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/vecteezy_cute-dogs-seamless-pattern-dog-pattern-design_69146856.png');
  background-repeat: repeat;
  background-size: 300px;
  opacity: 0.1;  /* only the pattern is faint */
  z-index: -1;
}


header {
  background-color: #f9b24e ;
  color: white;
  text-align: center;
  padding: 15px;
}

nav a {
  color: white;
  margin: 0 10px;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

nav .nav-manual-btn {
  background-color: transparent !important;
  color: white;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  font-weight: bold;
  margin: 0 10px;
  font-size: inherit;
  text-decoration: none;
}

nav .nav-manual-btn:hover {
  text-decoration: underline;
}

.dashboard {
  text-align: center;
  margin-top: 50px;
}

button {
  background-color: #f9b24e;
  color: white;
  padding: 10px 20px;
  border: none;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background-color: #e89b38;
}

.manual-btn {
  background-color: #2f80ed;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}

.manual-btn:hover {
  background-color: #1d5bc2;
}

.manual-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10000;
  padding: 20px;
}

.manual-modal-content {
  background: white;
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  padding: 24px 28px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.manual-modal-content h2 {
  margin-top: 0;
}

.manual-list {
  margin: 14px 0 18px;
  padding-left: 20px;
}

.manual-list li {
  margin-bottom: 10px;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 10px;
  background-color: #ffffff; /* match your page's footer color */
  z-index: 9999;
  box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
}

#salesForm {
  margin-top: 30px; /* pushes the inputs and button downward */
}

#product-form {
  margin-top: 30px;
}

#cart {
  width: 90%;
  margin: 20px auto;
  background-color: #ffffffcc;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#cartTableWrapper {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 5px;
  background-color: #fff;
}

#cartTableWrapper::-webkit-scrollbar {
  width: 10px;
}

#cartTableWrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 5px;
}

#cartTableWrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
}

#cartTable th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #f9b24e;
}

#barcodeEntry {
  width: 90%;
  margin: 20px auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

#barcodeEntry input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

#barcodeEntry input[type="number"]::-webkit-outer-spin-button,
#barcodeEntry input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#barcodeEntry input[type="number"] {
  -moz-appearance: textfield;
}

#addBarcodeBtn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background-color: #f9b24e;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

#addBarcodeBtn:hover {
  background-color: #e89b38;
}

#cartTable {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 16px;
}

#cartTable th {
  background-color: #f9b24e;
  color: #fff;
  padding: 10px;
}

#cartTable td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.cart-qty-btn {
  width: 30px;
  height: 30px;
  background-color: #f9b24e;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 0 5px;
}

.cart-qty-btn:hover {
  background-color: #e89b38;
}

.cart-quantity {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  font-weight: bold;
}

#printerStatus {
  margin-top: 10px;
  padding: 5px;
  background-color: #f0f0f0;
  border-radius: 4px;
  font-size: 14px;
}

.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.toast.success {
  background-color: #28a745;
}

.toast.error {
  background-color: #d23f42;
}

.toast.delete {
  background-color: #d23f42;
}

.toast.hide {
  opacity: 0;
  transform: translateY(-12px);
}

.expiration-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.expiration-form button {
  align-self: flex-end;
  padding: 8px 16px;
  font-size: 14px;
  height: 36px;
}

.expiration-text-container {
  margin-top: 8px;
}

.expiration-text {
  display: block;
  font-size: 0.85rem;
  color: #555;
}

.expiration-input {
  width: 100%;
  box-sizing: border-box;
}

.button-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.delete-confirmation,
.dispose-confirmation {
  padding: 10px;
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
  margin-top: 8px;
  animation: slideDown 0.2s ease-out;
}

.delete-confirmation p {
  margin: 0 0 8px 0;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.confirmation-buttons {
  display: flex;
  gap: 8px;
}

.confirm-yes-btn,
.confirm-no-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.confirm-yes-btn {
  background-color: #d23f42;
  color: white;
}

.confirm-yes-btn:hover {
  background-color: #b8353a;
}

.confirm-no-btn {
  background-color: #6c757d;
  color: white;
}

.confirm-no-btn:hover {
  background-color: #5a6268;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hide status messages and other UI elements when printing */
@media print {
  #printerStatus,
  #cart,
  #barcodeEntry,
  header,
  nav,
  .user-info,
  button,
  #productForm {
    display: none !important;
  }

  #receiptArea {
    display: block !important;
    position: static !important;
  }

  body {
    margin: 0;
    padding: 0;
  }
}

/* Suppliers report table centering */
.report-table th,
.report-table td {
  text-align: center;
}

#cancelOrder {
  background-color: #ff4d4d;
  color: white;
  padding: 10px 20px;
  border: none;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

#cancelOrder:hover {
  background-color: #cc0000;
}

#productList td {
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
}

.update-row .last-updated {
    font-size: 12px;
    color: #666;          /* faded gray text */
    padding-left: 10px;   /* optional: indent nicely */
    font-style: italic;
    background-color: #fff8ec; /* subtle background to distinguish sub-row */
}

#productList table tr:hover {
  background-color: transparent;
}

#productList table tr.expiring-row:hover {
  background-color: #fff3e6;
}

#productList table tr.expired-row:hover {
  background-color: #f7c2c2;
}

.expiring-row {
  background: linear-gradient(135deg, #fff7eb 0%, #fdd9a5 100%);
}

.expired-row {
  background: linear-gradient(135deg, #fcdada 0%, #f29a9a 100%);
  color: #7f1d1d;
}

.expired-row:hover {
  background-color: #f2a9a9;
}

.dispose-btn {
  background-color: #d23f42;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.dispose-btn:hover {
  background-color: #b8353a;
}

/* Low stock warning display */
.stock-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.low-stock-warning {
  font-size: 18px;
  color: #d23f42;
  font-weight: bold;
  cursor: help;
}

#productForm {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}


#productForm form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* makes it responsive if screen is small */
}

#productForm input {
  width: 200px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

/* Mobile-only responsive styling */
@media only screen and (max-width: 768px) {
  header {
    padding: 15px 10px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  nav a {
    margin: 4px 6px;
    font-size: 0.95rem;
  }

  #barcodeEntry,
  #cart,
  #productForm {
    width: calc(100% - 24px);
    margin: 15px auto;
  }

  #barcodeEntry {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
  }

  #barcodeEntry input,
  #addBarcodeBtn,
  #processSale,
  #cancelOrder,
  button {
    width: 100%;
  }

  #barcodeEntry input {
    margin-bottom: 10px;
  }

  #cart {
    padding: 12px;
  }

  #cartTable th,
  #cartTable td {
    padding: 8px;
    font-size: 14px;
  }

  #productForm {
    flex-direction: column;
    align-items: stretch;
  }

  #productForm form {
    flex-direction: column;
    align-items: stretch;
  }

  #productForm input,
  #productForm select {
    width: 100%;
  }

  #printerStatus {
    font-size: 13px;
  }
}

/* Filter Section */
.filter-section {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 20px auto;
  padding: 15px;
  background-color: #ffffffcc;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: 90%;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-select {
  width: 180px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  background-color: white;
  cursor: pointer;
  height: 36px;
  box-sizing: border-box;
}

.filter-select:focus {
  border-color: #f9b24e;
  outline: none;
}

.clear-btn {
  background-color: #f9b24e;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  height: 36px;
}

.clear-btn:hover {
  background-color: #e49c2d;
}

#productForm select.product-input:focus {
    border-color: black;         /* match input focus style */
    outline: none;
}

#productForm select.product-input {
    color: #888; /* faded text by default */
}

/* When a valid category is chosen, text turns black */
#productForm select.product-input:valid {
    color: #000;
}

/* Faded text for placeholder */
#productForm select.product-input option[value=""] {
    color: #aaa; /* light gray for placeholder */
}

/* Selected options use normal black text */
#productForm select.product-input option:not([value=""]) {
    color: black;
}

#productForm button {
  background-color: #f9b24e;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#productForm button:hover {
  background-color: #e49c2d; /* darker hover */
}

/* Dashboard Layout - Top center image with three-panel grid */
.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

 .dashboard-top-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(300px, 1fr)); /* equal columns to match bottom panels */
  gap: 24px;
  width: 100%;
  align-items: start;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(300px, 1fr));
  gap: 24px;
  width: 100%;
  align-items: stretch;
}

.dashboard-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
}

.dashboard-panel > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.top-center-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0; /* remove extra padding so card width matches grid column */
  box-sizing: border-box;
  position: relative;
  z-index: 5; /* bring center card above side panels */
  align-items: stretch;
  justify-content: center;
}

/* Center welcome card when it's the only item (employee view) */
.dashboard-top-row > .top-center-card:only-child {
  grid-column: 1 / -1;
}

.panel-supplier-top,
.panel-manager-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Constrain side panels so they don't expand and visually merge with the center card */
.panel-supplier-top {
  max-width: none;
  min-width: 300px;
  width: 100%;
}

.panel-manager-top {
  max-width: none;
  min-width: 300px; /* align with bottom panels' min width */
  width: 100%;
}

/* Ensure side panels appear below the center card so shadows don't visually merge */
.panel-supplier-top,
.panel-manager-top {
  position: relative;
  z-index: 1;
}

.supplier-contacts-panel,
.account-creation-panel,
.account-update-panel,
.expiring-products-panel,
.recent-sales-panel {
  background-color: #ffffffcc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.supplier-contacts-panel h3,
.account-creation-panel h3,
.account-update-panel h3,
.expiring-products-panel h3,
.recent-sales-panel h3 {
  margin-top: 0;
}

.supplier-contacts-scroll {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.supplier-contact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  align-items: center;
}

.supplier-contact-row span {
  flex: 1 1 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-delete-btn {
  flex: 0 0 auto;
  background: #d23f42;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
}

.supplier-contact-row:last-child {
  border-bottom: none;
}

.no-suppliers {
  color: #5b5b5b;
  font-size: 0.95rem;
  padding: 8px 0;
}

.expiring-products-panel,
.recent-sales-panel,
.account-creation-panel,
.account-update-panel {
  background-color: #ffffffcc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  flex: 1; /* make panels stretch to fill available height */
}

.account-creation-panel h3,
.account-update-panel h3,
.expiring-products-panel h3,
.recent-sales-panel h3 {
  margin-top: 0;
}

/* Override inline margin-top on account-creation-panel */
.account-creation-panel {
  margin-top: 0 !important;
}

.welcome-card {
  background-color: #ffffffcc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 8px 26px rgba(0,0,0,0.16); /* stronger shadow for clearer separation */
  border: 1px solid #eee;
  box-sizing: border-box;
  min-height: 240px; /* match other panel heights */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* fill the grid column */
  max-width: 100%;
  margin: 0;
}

.welcome-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  min-height: 160px;
  max-height: 210px; /* enlarged image size */
  object-fit: contain;
}

.low-stock-panel {
  background-color: #ffffffcc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  max-height: 600px;
}

.low-stock-panel h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 700;
  color: #d23f42;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.low-stock-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.low-stock-table-header,
.low-stock-row {
  display: grid;
  grid-template-columns: 2fr 1fr 80px;
  gap: 12px;
  align-items: center;
}

.low-stock-table-header {
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  background-color: #f5f7fb;
  font-size: 12px;
  font-weight: 700;
  color: #3a4a62;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.low-stock-list::-webkit-scrollbar {
  width: 6px;
}

.low-stock-list::-webkit-scrollbar-track {
  background: transparent;
}

.low-stock-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.low-stock-list::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

.low-stock-row {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  border-left: 4px solid #f9b24e;
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.low-stock-row:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.low-stock-cell {
  font-size: 13px;
  color: #34405b;
  overflow-wrap: anywhere;
}

.low-stock-cell.stock-cell {
  font-weight: 700;
  color: #c14444;
  text-align: center;
}

.no-low-stock {
  text-align: center;
  color: #4b7c9c;
  padding: 12px;
}

.no-low-stock {
  text-align: center;
  color: #4b7c9c;
  padding: 12px;
}

/* Expiring Products Panel */
.expiring-products-panel {
  background-color: #ffffffcc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 600px;
}

.expiring-products-panel h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 700;
  color: #d23f42;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.expiring-products-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.expiring-products-list::-webkit-scrollbar {
  width: 6px;
}

.expiring-products-list::-webkit-scrollbar-track {
  background: transparent;
}

.expiring-products-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.expiring-products-list::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* Individual Product Rows */
.expiring-product-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.expiring-product-link:hover .expiring-product-row {
  transform: translateX(3px);
}

.expiring-product-row {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  border-left: 4px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.expiring-product-row.expired {
  background: linear-gradient(135deg, #fcdada 0%, #f29a9a 100%);
  border-left-color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.2);
}

.expiring-product-row.expired .product-info strong,
.expiring-product-row.expired .exp-date {
  color: #8b0000;
}

.expiring-product-row.expiring-soon {
  background: linear-gradient(135deg, #fff5e8 0%, #fdd9a5 100%);
  border-left-color: #f59e0b;
}

.expiring-product-row.expiring-future {
  background-color: #f5f5f5;
  border-left-color: #999;
}

.expiring-product-row:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Product Info Section */
.product-info {
  flex: 1;
  text-align: left;
}

.product-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
  word-break: break-word;
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.barcode-badge,
.stock-badge {
  font-size: 12px;
  color: #666;
  background-color: #eee;
  padding: 3px 8px;
  border-radius: 3px;
  width: fit-content;
}

.barcode-badge {
  font-family: monospace;
  font-weight: 600;
}

/* Expiration Info Section */
.expiration-info {
  text-align: right;
  flex-shrink: 0;
}

.status-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.status-badge.expired {
  background-color: #b91c1c;
  color: white;
}

.status-badge.expiring-soon {
  background-color: #f9b24e;
  color: #333;
}

.status-badge.expiring-future {
  background-color: #999;
  color: white;
}

.exp-date {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

/* Empty State */
.no-expiring {
  text-align: center;
  padding: 30px 15px;
  color: #999;
  font-size: 14px;
}

/* Responsive Design */
@media only screen and (max-width: 1024px) {
  .dashboard-content {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .dashboard-right {
    width: 100%;
    max-height: 400px;
  }

  .expiring-products-panel {
    max-height: 400px;
  }
}

@media only screen and (max-width: 768px) {
  .dashboard-content {
    padding: 15px;
    gap: 15px;
  }

  .dashboard-right {
    width: 100%;
  }

  .expiring-products-panel {
    max-height: 300px;
    padding: 15px;
  }

  .expiring-products-panel h3 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .expiring-product-row {
    padding: 10px;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .product-info strong {
    font-size: 13px;
  }

  .barcode-badge,
  .stock-badge {
    font-size: 11px;
  }

  .status-badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  .exp-date {
    font-size: 11px;
  }
}

button {
    margin-right: 5px;
}

/* All editable inputs: borderless, blend into table */
input.editable {
    width: 100%;
    border: none;                  /* remove border */
    outline: none;                 /* remove focus outline */
    background-color: transparent; /* blend with table */
    color: black;
    padding: 2px 4px;
    font-family: inherit;
    font-size: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
}

/* Disabled inputs: keep them plain */
input.editable:disabled {
    background-color: transparent !important;
    color: black !important;
    border: none !important;
    outline: none !important;
}

/* Editing inputs: add border only when editing */
input.editable.editing {
    border: 1px solid #f9b24e !important;
    background-color: #e49c2d !important;
    outline: none !important;
}

table {
    border-collapse: collapse; /* optional for cleaner borders */
}

table, th, td {
    border: none; /* remove table borders */
}

/* Table cells allow text wrap */
td {
    white-space: normal;   /* allow wrapping */
    word-break: break-word; /* break long words if necessary */
    max-width: 200px;       /* optional: limit cell width */
    vertical-align: top;    /* optional: align text to top */
}

.delete-btn {
    background-color: #f9b24e !important;  
    color: white !important;                /* text color */
    padding: 5px 10px !important;
    text-decoration: none !important;       /* remove underline */
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

.delete-btn:hover {
    background-color: #e49c2d !important;  
}

/* Editing mode: show input with border and background */
input.editable.editing,
select.editable.editing {
    border: 1px solid #f9b24e;   /* golden border */
    background-color: #fff8e0;   /* light cream background */
    color: black;                 /* text black */
    padding: 4px 6px;
    border-radius: 4px;
}

/* Show placeholder only when editing */
input.editable.editing::placeholder {
    color: #888;  /* faded placeholder */
}

/* Table selects: hidden normally, show when editing */
select.editable {
    display: none;
}

tr.editing select.editable {
    display: inline-block;
}

/* Category text span: hide during editing */
.category-text {
    display: inline-block;
}
tr.editing .category-text {
    display: none;
}

/* Make Add Product inputs visually consistent */
#productForm input,
#productForm select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
    font-size: 14px;
    color: #000;
}

#productForm input::placeholder {
    color: #888;
}

/* sales styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    margin: 20px;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* Form styling similar to Products page */
form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

form input, form select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

form button:hover {
    background-color: #45a049;
}

/* Table styling similar to Products page */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

table th, table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #4CAF50;
    color: white;
}

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

#productList table tr:hover {
    background-color: transparent;
}

header {
    position: relative; /* needed for absolute positioning of user-info */
}

.user-info {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 14px;
    color: white;
}

.user-info span {
    margin-right: 10px;
    font-weight: bold;
}

.user-info .logout-btn {
    color: white;
    background-color: #e74c3c; /* red button */
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.user-info .logout-btn:hover {
    background-color: #c0392b;
}

.dashboard{
  text-align: center;
  margin-top: 0;
}

.dashboard h2{
  font-size: 32px;
  margin-bottom: 10px;
}

.dashboard-desc{
  color: #555;
  margin-bottom: 30px;
}

.welcome-card{
  width: 460px;
  margin: 0 auto;
  text-align: center;
  padding: 20px;
  min-height: 320px;
}

.welcome-image{
  width: 100%;
  height: auto;   /* allows vertical scaling */
  border-radius: 12px;
  margin: 10px 0;
  object-fit: contain;
}

#scannerInput {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Center specific columns: Price (3), Type (4), Stock (5) */
#productList td:nth-child(3),
#productList td:nth-child(4),
#productList td:nth-child(5),
#productList th:nth-child(3),
#productList th:nth-child(4),
#productList th:nth-child(5) {
    text-align: center;
}