.rb_print_btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #e6e6e6;
  color: #333;
  padding: 8px 15px;
  border-radius: 5px;
  width: fit-content;
  font-size: 16px;
  position: absolute;
  top: 80px;
  right: 60px;
  border: 1px solid #ddd;
  cursor: pointer;
}
.rb_print_btn:hover{
  border-color: blue;
  color: #fff;
  background-color: blue;
}
.rb_print_btn:hover svg{fill:#fff;}
@media (max-width: 991px){
    .rb_print_btn {
    padding: 6px 15px;
    font-size: 14px;
     position: relative; 
    top: auto;
    right: auto;
    margin-bottom: 10px;
}
}


body {
  margin: 0;
  font-family: sans-serif;
  background-color: #f3f6fd;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  min-height: 100vh;
}

.login-box {
  width: 400px;
  max-width: 100%;
  height: 400px;
  max-height: 100%;
  margin: auto;
  position: relative;
  padding: 20px;
}

.login-box .footer {
  margin-top: 10px;
  text-align: center;
}

button[type="submit"] {
  display: block;
  margin: 20px auto;
}

body .content {
  margin-left: 0;
  padding: 20px;
  margin-top: 60px !important;
  padding-top: 50px !important;
  width: 100% !important;
  max-width: 100%;
  background: #f3f6fd;
  box-sizing: border-box;
  overflow-x: hidden;
}

.rb_overflow_x {
  max-width: 100% !important;
  overflow-x: auto !important;
}

.section {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.table-container {
  width: 100%;
  overflow-x: auto;
  max-width: 100%;
  margin-top: 10px;
}

.add-product-btn {
  background-color: #28a745;
  width: auto;
  padding: 8px 15px;
}

.add-product-btn:hover {
  background-color: #1e7e34;
}

.total-quantity {
  margin-top: 15px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

h2 {
  margin-top: 0;
  color: #2e63cf;
  font-size: 1.5rem;
}

label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

input[type="text"],
input[type="number"],
textarea,
select,
input[type="file"] {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.9rem;
  resize: vertical;
  box-sizing: border-box;
}

.note-cell {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

#tax {
  width: 40px;
  margin-right: 10px;
}

.form-check.form-switch {
  width: fit-content;
  min-width: 100px;
}

.note-cell:hover::after {
  content: attr(data-full-note);
  position: absolute;
  background-color: #333;
  color: white;
  padding: 6px;
  border-radius: 4px;
  z-index: 10;
  white-space: normal;
  width: 180px;
  left: 0;
  top: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: rgba(0, 0, 0, 0.6);
}

.image-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 15px;
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  text-align: center;
  position: relative;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}

.image-modal-close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.image-modal-close:hover {
  color: black;
}

.filter-container {
  margin-bottom: 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-container label {
  margin-right: 8px;
  font-size: 0.85rem;
}

.filter-container select,
.filter-container input[type="number"],
.filter-container input[type="text"] {
  max-width: 130px;
  font-size: 0.85rem;
}

.filter-container button {
  padding: 6px 12px;
  font-size: 0.85rem;
  width: auto;
  max-width: 150px;
}

/* Navbar styles */
body .navbar {
  width: 100%;
  /* Reduced to 85% */
  background-color: #0078D4;
  color: white;
  padding: 1rem 2rem !important;
  font-family: 'Inter', sans-serif;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  /* Center the navbar */
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.navbar h3 {
  margin: 0;
  font-weight: 600;
  font-size: 1.3rem;
}

.navbar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.navbar ul li {
  position: relative;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
}

.navbar ul li:hover {
  background: #005A9E;
}

.navbar ul li i {
  margin-right: 8px;
}

.navbar .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #005A9E;
  min-width: 200px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1001;
}

.navbar ul li:hover>.submenu {
  display: block;
}

.navbar .submenu li {
  padding: 0.5rem 1.5rem;
  font-size: 0.95rem;
  color: white;
  cursor: pointer;
}

.navbar .submenu li:hover {
  background: #003087;
}

.navbar a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* Hamburger styles */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
  padding: 0.5rem;
  margin-right: 1rem;
  /* Space from edge */
}

button {
  background-color: #2e63cf;
  color: white;
  border: none;
  padding: 10px 16px;
  margin-top: 15px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
  width: 100%;
  max-width: 300px;
}

button:hover {
  background-color: #204eaa;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

h2 {
  margin-top: 0;
  color: #2e63cf;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

table th,
table td {
  padding: 10px;
  border: 1px solid #ddd;
}

input,
textarea,
select,
button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

button {
  background-color: #2e63cf;
  color: white;
  border: none;
  cursor: pointer;
  margin-top: 15px;
}

button:hover {
  background-color: #204eaa;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
  color: black;
  text-decoration: none;
}

.error {
  color: red;
  margin-top: 10px;
}

.success {
  color: green;
  margin-top: 10px;
}

.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a,
.pagination span {
  display: inline-block;
  margin: 0 4px;
  padding: 8px 12px;
  color: #2e63cf;
  text-decoration: none;
  border: 1px solid #2e63cf;
  border-radius: 4px;
  font-weight: 600;
  user-select: none;
}

.pagination a:hover {
  background-color: #2e63cf;
  color: white;
}

.pagination .current-page {
  background-color: #2e63cf;
  color: white;
  pointer-events: none;
}

.btn-edit,
.btn-delete,
.btn-details {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  user-select: none;
  border: none;
}

.btn-edit {
  background-color: #28a745;
  color: white;
}

.btn-edit:hover {
  background-color: #1e7e34;
}

.btn-delete {
  background-color: #dc3545;
  color: white;
}

.btn-delete:hover {
  background-color: #a71d2a;
}

.btn-details {
  background-color: #6c757d;
  color: white;
}

.btn-details:hover {
  background-color: #5a6268;
}

.btn-edit[disabled],
.btn-delete[disabled] {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.6;
}

form.delete-form {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}
.filter-form {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.filter-form select {
  flex: 1;
  min-width: 180px;
  height: 40px;
}

.details-modal-content {
  width: 600px;
}

.details-table {
  margin-top: 15px;
}

.return-invoice {
  color: #dc3545;
  /* Highlight return invoices */
  font-weight: bold;
}

.discount-info {
  margin-top: 10px;
  font-weight: 600;
  color: #2e63cf;
}

.pagination a:hover {
  background-color: #f5f5f5;
}

form.delete-form {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}
.search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.search-container input {
  flex: 1;
  height: 40px;
}

.search-container button {
  width: auto;
  padding: 10px 20px;
}

#products-table {
  width: 100%;
  max-width: 100%;
  min-width: 800px;
  /* Ensure table has a minimum width for content */
}

.processing-row {
  background-color: #fff3cd;
}

.delete-btn {
  cursor: pointer;
  color: red;
}

.table-sm th,
.table-sm td {
  padding: 0.5rem;
}

.invoice-link {
  cursor: pointer;
  color: blue;
  text-decoration: underline;
}

#products-table th,
#products-table td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
  min-width: 60px;
  /* Ensure columns don't collapse too much */
  max-width: 150px;
  /* Limit column width */
}

.status-message {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.9rem;
}

.status-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

img.product-image {
  max-width: 60px;
  max-height: 45px;
  object-fit: contain;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.pagination {
  margin-top: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.pagination a,
.pagination span {
  display: inline-block;
  margin: 0 3px;
  padding: 6px 10px;
  color: #2e63cf;
  text-decoration: none;
  border: 1px solid #2e63cf;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  user-select: none;
}

.pagination a:hover {
  background-color: #2e63cf;
  color: white;
}

.pagination .current-page {
  background-color: #2e63cf;
  color: white;
  pointer-events: none;
}

.btn-edit,
.btn-delete,
.btn-add {
  padding: 5px 8px;
  font-size: 0.85rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  user-select: none;
  border: none;
  min-width: 60px;
}

.btn-edit {
  background-color: #28a745;
  color: white;
}

.btn-edit:hover {
  background-color: #1e7e34;
}

.btn-delete {
  background-color: #dc3545;
  color: white;
}

.btn-delete:hover {
  background-color: #a71d2a;
}

.btn-add {
  background-color: #2e63cf;
  color: white;
  margin-bottom: 15px;
  padding: 8px 12px;
}

.btn-add:hover {
  background-color: #204eaa;
}

form.delete-form {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: rgba(0, 0, 0, 0.5);
}

#editForm textarea {
  min-height: 70px;
}

.modal-content {
  background-color: #fefefe;
  margin: 4% auto 1%;
  padding: 15px;
  border-radius: 8px;
  width: 95%;
  max-width: 1000px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.modal-content form {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
}

.modal-content .close-modal {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.modal-content .close-modal:hover {
  color: black;
}

.note-cell {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.note-cell:hover::after {
  content: attr(data-full-note);
  position: absolute;
  background-color: #333;
  color: white;
  padding: 6px;
  border-radius: 4px;
  z-index: 10;
  white-space: normal;
  width: 180px;
  left: 0;
  top: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: rgba(0, 0, 0, 0.6);
}

.image-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 15px;
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  text-align: center;
  position: relative;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}

.image-modal-close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.image-modal-close:hover {
  color: black;
}

.filter-container {
  margin-bottom: 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-container label {
  margin-right: 8px;
  font-size: 0.85rem;
}

.filter-container select,
.filter-container input[type="number"],
.filter-container input[type="text"] {
  max-width: 130px;
  font-size: 0.85rem;
}

.filter-container button {
  padding: 6px 12px;
  font-size: 0.85rem;
  width: auto;
  max-width: 150px;
}

/* Dashboard specific styles */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: linear-gradient(135deg, #ffffff, #f9f9f9);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

button.accordion-button {
  background-color: #0078d4;
  color: #fff;
}

.card i {
  font-size: 1.8rem;
  color: #2e63cf;
  margin-bottom: 1.2rem;
  display: block;
}

.card h3 {
  margin: 0 0 1.2rem;
  font-size: 1.3rem;
  color: #1a3c8b;
  font-weight: 600;
}

.stat {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: #555;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted #aaa;
  padding-bottom: 7px;
}

.stat span {
  font-weight: 700;
  color: #000;
}

/* Responsive Adjustments */
@media screen and (max-width: 991px) {
  .content {
    padding: 10px;
    padding-top: 80px;
    /* Adjusted for navbar height */
  }

  .navbar {
    padding: 1rem;
  }

  .hamburger {
    display: block;
  }

  .navbar ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    /* Height of navbar */
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    /* Match navbar width */
    background-color: #0078D4;
    z-index: 999;
  }

  .navbar ul.active {
    display: flex;
  }

  .navbar ul li {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #005A9E;
    width: 100%;
  }


  .section {
    padding: 10px;
    margin-bottom: 15px;
  }

  h2 {
    font-size: 1.3rem;
  }

  #products-table {
    font-size: 0.8rem;
  }

  #products-table th,
  #products-table td {
    padding: 5px;
    min-width: 50px;
    max-width: 120px;
  }

  /* Hide non-essential columns on mobile */
  #products-table th:nth-child(9),
  #products-table td:nth-child(9),
  #products-table th:nth-child(10),
  #products-table td:nth-child(10),
  #products-table th:nth-child(11),
  #products-table td:nth-child(11) {
    display: none;
  }

  img.product-image {
    max-width: 50px;
    max-height: 40px;
  }

  .btn-edit,
  .btn-delete,
  .btn-add {
    padding: 4px 6px;
    font-size: 0.8rem;
    min-width: 50px;
  }

  .pagination a,
  .pagination span {
    padding: 5px 8px;
    font-size: 0.8rem;
  }

  .modal-content {
    width: 95%;
    max-height: 80vh;
    padding: 10px;
  }

  .image-modal-content {
    width: 95%;
    max-height: 80vh;
  }

  .filter-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .filter-container select,
  .filter-container input[type="number"],
  .filter-container input[type="text"] {
    max-width: 100%;
    width: 100%;
  }

  .filter-container button {
    width: 100%;
    max-width: 100%;
  }

  .cards {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
}

@media screen and (max-width: 480px) {
  h2 {
    font-size: 1.1rem;
  }

  label {
    font-size: 0.8rem;
  }

  input[type="text"],
  input[type="number"],
  textarea,
  select,
  input[type="file"] {
    font-size: 0.8rem;
    padding: 6px;
  }

  button {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  #products-table th,
  #products-table td {
    font-size: 0.75rem;
    padding: 4px;
    min-width: 40px;
    max-width: 100px;
  }

  .modal-content .close-modal,
  .image-modal-close {
    font-size: 20px;
    top: 8px;
    right: 12px;
  }

  .note-cell {
    max-width: 100px;
  }

  .note-cell:hover::after {
    width: 150px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .card i {
    font-size: 1.6rem;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  .stat {
    font-size: 0.85rem;
  }
}