/* Sidebar Links */
.dashboard-menu a {
  display: block;
  padding: 12px 16px;
  font-weight: bold;
  text-decoration: none;
  color: #cbd5e1;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
}

.dashboard-menu a:hover {
  background-color: #475569;
  color: #ffffff;
}

/* 🔥 Active Link Style */
.dashboard-menu a.active {
  background-color: #10b981;  /* Emerald green */
  color: white;
  font-weight: bolder;
  border-left: 4px solid #065f46;
  box-shadow: inset 2px 0 0 #065f46;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px;
  }

  .dashboard-menu {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .dashboard-menu li {
    margin: 0;
  }

  .main-content {
    padding: 10px;
  }
}










/* ===========================
   📋 Product Table Styling
   =========================== */

 .product-list-container {
    padding: 1.2rem;
    background: #fff;
    font-family: "Segoe UI", Tahoma, sans-serif;
  }

  .product-list-container h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #222;
    font-weight: 500;
  }

  .table-wrapper {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
  }

  .product-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    font-size: 0.88rem;
  }

  .product-table thead {
    background-color: #f3f3f3;
  }

  .product-table th,
  .product-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
    white-space: nowrap;
    font-weight: 400;
    color: #333;
  }

  .product-table th {
    font-weight: 500;
    color: #444;
  }

  .product-table td span {
    font-weight: 500;
  }

  .action-btns {
    display: flex;
    gap: 6px;
  }

  .btn {
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
  }

  .btn.edit {
    background-color: #0d6efd;
    color: #fff;
  }

  .btn.delete {
    background-color: #dc3545;
    color: #fff;
    border: none;
  }

  .btn.primary {
    background-color: #198754;
    color: white;
  }

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

  .inline-form {
    display: inline;
  }

  .actions-bar {
    margin-top: 1rem;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  @media (max-width: 768px) {
    .product-list-container {
      padding: 1rem;
    }

    .product-table {
      font-size: 0.8rem;
      min-width: 1000px;
    }

    .btn {
      font-size: 0.75rem;
      padding: 0.3rem 0.5rem;
    }

    .actions-bar {
      flex-direction: column;
    }
  }










/* ===========================
   📊 Sales Report Styling
   =========================== */

.sales-report-container {
  padding: 20px;
  font-family: 'Segoe UI', sans-serif;
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sales-report-container h2,
.sales-report-container h3 {
  font-weight: bold;
  margin-bottom: 1rem;
}

/* 🔍 Date Filter Form */
.date-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 1rem;
}

.date-filter-form label {
  font-weight: bold;
}

.date-filter-form input[type="date"] {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.date-filter-form button {
  background-color: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.date-filter-form button:hover {
  background-color: #1d4ed8;
}

/* 📋 Sales Summary */
.sales-summary-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-size: 15px;
  font-weight: bold;
}

.sales-summary-list li {
  margin-bottom: 6px;
}

/* 🥇 Top Products Table */
.sales-report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
  font-weight: bold;
}

.sales-report-table th,
.sales-report-table td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}

.sales-report-table th {
  background-color: #f1f5f9;
}

/* 📤 Actions */
.report-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-actions .btn {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
  text-align: center;
}

.export-btn {
  background-color: #22c55e;
  color: #fff;
}

.export-btn:hover {
  background-color: #16a34a;
}

.back-btn {
  background-color: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.back-btn:hover {
  background-color: #e5e7eb;
}

/* ===========================
   📱 Responsive Design
   =========================== */

@media screen and (max-width: 768px) {
  .date-filter-form {
    flex-direction: column;
    align-items: flex-start;
  }

  .sales-summary-list {
    font-size: 13px;
  }

  .sales-report-table {
    font-size: 12px;
  }

  .report-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}












/* ============================
   🧾 Invoice List Styling
   ============================ */

.invoice-list-section {
  padding: 20px;
  background-color: #ffffff;
  font-family: 'Segoe UI', sans-serif;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.invoice-list-section h2 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

/* 📄 Main Invoice Table */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-weight: bold;
}

.invoice-table th,
.invoice-table td {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

.invoice-table th {
  background-color: #f1f5f9;
}

.invoice-table td a {
  text-decoration: none;
  color: #2563eb;
  font-weight: bold;
}

.invoice-table td a:hover {
  text-decoration: underline;
}

/* ♻️ Returned Items Table */
.returned-box {
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  padding: 10px;
  margin-top: 5px;
  font-size: 13px;
}

.nested-return-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: normal;
}

.nested-return-table th,
.nested-return-table td {
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  text-align: left;
  white-space: nowrap;
}

.nested-return-table th {
  background-color: #f3f4f6;
  font-weight: bold;
}

/* 📱 Responsive */
@media screen and (max-width: 768px) {
  .invoice-table,
  .nested-return-table {
    font-size: 12px;
  }

  .invoice-list-section {
    padding: 15px;
  }

  .returned-box {
    font-size: 12px;
    overflow-x: auto;
  }

  .invoice-table td,
  .invoice-table th,
  .nested-return-table td,
  .nested-return-table th {
    padding: 6px;
  }
}










/* ============================
   🔁 Return Product Form
   ============================ */

.return-form-section {
  padding: 20px;
  background-color: #ffffff;
  border-radius: 6px;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  max-width: 700px;
  margin: 0 auto;
}

.return-form-section h2 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

/* Form Styling */
.return-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #f9fafb;
  transition: border-color 0.2s;
  font-weight: bold;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  background-color: #ffffff;
}

/* Button */
.submit-btn {
  padding: 12px;
  background-color: #2563eb;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: #1d4ed8;
}

/* Responsive */
@media (max-width: 600px) {
  .return-form-section {
    padding: 15px;
  }

  .return-form-section h2 {
    font-size: 18px;
  }

  .form-group input,
  .form-group textarea {
    font-size: 13px;
  }

  .submit-btn {
    font-size: 14px;
  }
}










/* ============================
   ➕ Add Product Form
   ============================ */

.product-form-container {
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-form-container h2 {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

/* Form Layout */
.product-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Group Styles */
.form-group {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
}

.form-group.full {
  flex: 1 1 100%;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #f9fafb;
  transition: border-color 0.2s ease-in-out;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #2563eb;
  background-color: #ffffff;
  outline: none;
}

/* Submit Button */
button[type="submit"] {
  padding: 12px;
  background-color: #2563eb;
  color: white;
  font-weight: bold;
  font-size: 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

button[type="submit"]:hover {
  background-color: #1e40af;
}

/* Back Link */
.back-link {
  text-align: center;
  margin-top: 20px;
}

.back-link a {
  color: #2563eb;
  text-decoration: none;
  font-weight: bold;
}

.back-link a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .product-form {
    flex-direction: column;
  }

  .form-group {
    flex: 1 1 100%;
  }

  .product-form-container h2 {
    font-size: 18px;
  }

  button[type="submit"] {
    font-size: 14px;
  }
}









/* ============================
   ✏️ Edit Product Form
   ============================ */

.product-edit-container {
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-edit-container h2 {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

/* Edit Form */
.product-edit-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-edit-form input,
.product-edit-form textarea {
  padding: 12px;
  font-size: 14px;
  font-weight: bold;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #f9fafb;
  transition: border-color 0.2s ease-in-out;
}

.product-edit-form input:focus,
.product-edit-form textarea:focus {
  border-color: #2563eb;
  background-color: #ffffff;
  outline: none;
}

/* Submit Button */
.product-edit-form button[type="submit"] {
  padding: 12px;
  background-color: #2563eb;
  color: white;
  font-weight: bold;
  font-size: 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.product-edit-form button[type="submit"]:hover {
  background-color: #1e40af;
}

/* Responsive */
@media (max-width: 600px) {
  .product-edit-container {
    padding: 15px;
  }

  .product-edit-form input,
  .product-edit-form textarea,
  .product-edit-form button {
    font-size: 14px;
  }

  .product-edit-container h2 {
    font-size: 18px;
  }
}









/* ============================
   📊 Sales Dashboard Styling
   ============================ */

.sales-dashboard-container {
  max-width: 800px;
  margin: 30px auto;
  padding: 25px;
  background-color: #ffffff;
  border-radius: 8px;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sales-dashboard-container h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

/* Stats List */
.sales-stats {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  font-weight: bold;
}

.sales-stats li {
  padding: 12px 15px;
  margin-bottom: 10px;
  background-color: #f3f4f6;
  border-left: 4px solid #2563eb;
  border-radius: 4px;
}

/* Navigation Links */
.sales-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: bold;
}

.sales-links a {
  padding: 10px 16px;
  text-decoration: none;
  background-color: #2563eb;
  color: white;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.sales-links a:hover {
  background-color: #1e3a8a;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .sales-dashboard-container {
    padding: 15px;
  }

  .sales-dashboard-container h2 {
    font-size: 20px;
  }

  .sales-links {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-links a {
    text-align: center;
  }
}







/* ================================
   👥 Cashier Management Styling
   ================================ */

.cashier-management-container {
  max-width: 800px;
  margin: 30px auto;
  padding: 25px;
  background-color: #ffffff;
  border-radius: 8px;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cashier-management-container h2,
.cashier-management-container h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

/* Add Cashier Form */
.cashier-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 25px;
}

.cashier-form input {
  padding: 10px;
  font-size: 16px;
  flex: 1 1 200px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.cashier-form button {
  padding: 10px 18px;
  font-weight: bold;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cashier-form button:hover {
  background-color: #059669;
}

/* Table Styling */
.cashier-table {
  width: 100%;
  border-collapse: collapse;
  font-weight: bold;
}

.cashier-table th,
.cashier-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.cashier-table th {
  background-color: #f3f4f6;
}

.delete-btn {
  background-color: #ef4444;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.delete-btn:hover {
  background-color: #b91c1c;
}

/* Back Link */
.cashier-management-container a {
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
  font-weight: bold;
  color: #2563eb;
}

.cashier-management-container a:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .cashier-form {
    flex-direction: column;
    align-items: stretch;
  }

  .cashier-form input,
  .cashier-form button {
    width: 100%;
  }
}










/* ================================
   🍎 POS - New Sale Styling
   ================================ */

/* 📦 General POS Container Styling */
.pos-container {
  padding: 1rem;
  max-width: 100%;
  box-sizing: border-box;
}

/* 📋 Product Table Scrollable on Small Screens */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 130px; /* Leaves space for sticky footer */
}

.product-table {
  width: 100%;
  border-collapse: collapse;
}

.product-table th,
.product-table td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: center;
}

.product-table th {
  background: #f2f2f2;
  font-weight: bold;
}

.low-stock {
  color: red;
  font-weight: bold;
}

/* 📌 Sticky Summary Section at Bottom */
/* Mobile Bottom Drawer */
.bottom-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  border-top: 2px solid #ccc;
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  transform: translateY(90%);
}

.bottom-drawer.open {
  transform: translateY(0%);
}

.drawer-toggle {
  width: 100%;
  background: #333;
  color: #fff;
  font-weight: bold;
  padding: 12px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.drawer-content {
  padding: 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.bottom-drawer .summary-box,
.bottom-drawer .payment-method,
.bottom-drawer .selected-items-box {
  margin-bottom: 16px;
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background-color: #28a745;
  border: none;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}

.checkout-btn:hover {
  background-color: #218838;
}








/* 📄 General Receipt Container */
.receipt-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  color: #000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 🧾 Title */
.receipt-container h2 {
  text-align: center;
  margin-bottom: 20px;
}

/* 🧍‍♂️ Meta Info */
.receipt-meta p {
  margin: 4px 0;
  font-size: 14px;
}

/* 📦 Tables */
.table-wrapper {
  overflow-x: auto;
  margin-top: 15px;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.receipt-table th,
.receipt-table td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  text-align: left;
}

.receipt-table thead {
  background-color: #f5f5f5;
}

/* ♻️ Returned Items Table */
.returned-table th {
  background-color: #ffe8e8;
}

/* 💵 Total */
.total-amount {
  font-size: 16px;
  font-weight: bold;
  margin-top: 20px;
  text-align: right;
}

/* 🔘 Action Buttons */
.receipt-actions {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.receipt-actions button,
.receipt-actions a {
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  background-color: #007bff;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.receipt-actions button:hover,
.receipt-actions a:hover {
  background-color: #0056b3;
}

/* 📱 Mobile View */
@media (max-width: 600px) {
  .receipt-container {
    padding: 15px;
  }

  .receipt-table th,
  .receipt-table td {
    font-size: 13px;
    padding: 5px 6px;
  }

  .receipt-meta p {
    font-size: 13px;
  }

  .receipt-actions {
    flex-direction: column;
    align-items: stretch;
  }
}









@media print {
  body * {
    visibility: hidden;
  }

  .receipt-container,
  .receipt-container * {
    visibility: visible;
  }

  .receipt-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 58mm; /* XPrinter 58mm paper */
    font-size: 12px;
    background: white;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
  }

  .receipt-container h2 {
    text-align: center;
    font-size: 16px;
    margin: 0 0 10px 0;
  }

  .receipt-meta p {
    font-size: 12px;
    margin: 2px 0;
  }

  .table-wrapper {
    overflow: visible;
    margin: 0;
  }

  table.receipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
  }

  .receipt-table th,
  .receipt-table td {
    padding: 3px;
    border: none;
    text-align: left;
  }

  .returned-table th {
    font-weight: bold;
    border-bottom: 1px dashed #000;
  }

  .receipt-actions {
    display: none !important; /* Hide all action buttons/links */
  }

  .total-amount {
    text-align: right;
    font-weight: bold;
    font-size: 13px;
    margin-top: 10px;
  }

  a, button {
    display: none !important;
  }
}










.sales-history-wrapper {
  padding: 20px;
  max-width: 100%;
  margin: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 5px #ccc;
}

.cashier-filter {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cashier-filter label {
  font-weight: 600;
}

.cashier-filter select {
  padding: 5px 10px;
  font-size: 14px;
}

.section-title {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 18px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 20px;
}

.sales-table thead {
  background: #f0f0f0;
  font-weight: bold;
}

.sales-table th,
.sales-table td {
  padding: 10px;
  border: 1px solid #ddd;
  vertical-align: top;
  text-align: left;
}

.sales-table td strong {
  font-weight: bold;
  color: #000;
}

.product-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.product-list li {
  margin-bottom: 6px;
}

.product-list.returned li {
  color: #b00;
  font-size: 13px;
}

@media (max-width: 768px) {
  .sales-table th,
  .sales-table td {
    padding: 8px 6px;
    font-size: 13px;
  }

  .cashier-filter {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .sales-history-wrapper {
    padding: 10px;
  }

  .sales-table th,
  .sales-table td {
    font-size: 12px;
  }

  .product-list li {
    font-size: 12px;
  }

  .cashier-filter select {
    width: 100%;
  }
}









