/* --- Global SweetAlert2 Overrides --- */
.swal2-popup {
    width: 350px !important;       
    padding: 1em !important;    
    font-size: 0.9rem !important;
}

.swal2-title {
    font-size: 1.25rem !important;  
}


.swal2-styled.swal2-confirm {
    padding: 0.4em 1.2em !important; 
    font-size: 0.9rem !important;
}

/* --- Invoice Search & Modal Styles --- */
#invoiceSearch {
  min-width: 240px;
  max-width: 320px;
  font-size: 1.05rem;
  padding: 0.38rem 0.7rem;
}

#searchSuggestions {
  max-height: 220px;
  min-width: 240px;
  width: 320px;
  font-size: 0.97rem;
  overflow-y: auto;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.08);
}

.search-suggestion {
  padding: 0.35rem 0.7rem;
}

.search-suggestion strong {
  color: #2563eb;
  font-size: 1em;
}

#viewDetailsBtn {
  border-radius: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.97rem;
  padding: 0.35rem 0.9rem;
  height: 34px;
  margin-top: 0 !important;
  display: none;
}

#detailsModal .modal-content {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 8px 32px rgba(44, 62, 80, 0.18);
}

#detailsModal .modal-header {
  border-bottom: none;
  padding-bottom: 0;
}

#detailsModal .modal-body {
  padding: 2rem 2.5rem;
}

#detailsModal .modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
}

#detailsModal .close {
  font-size: 1.5rem;
  color: #333;
}

@media (max-width: 767.98px) {

  #invoiceTable,
  #invoiceTable thead,
  #invoiceTable tbody,
  #invoiceTable th,
  #invoiceTable tr {
    display: block;
    width: 100%;
  }

  #invoiceTable thead {
    display: none;
  }

  #invoiceTable tr {
    margin-bottom: 1.2rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    background: #fff;
    padding: 0.5rem;
  }

  #invoiceTable td {
    display: block;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    min-height: 40px;
    word-break: break-word;
    white-space: normal;
    background: #fff;
  }

  #invoiceTable td .mobile-value {
    margin-left: 100px;
    display: inline-block;
  }

  #invoiceTable td:before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 0.2rem;
    font-size: 0.98em;
    white-space: pre-line;
    word-break: break-word;
  }

  #invoiceTable td:last-child {
    border-bottom: none;
  }

  .table-responsive {
    font-size: 0.95rem;
  }

  #invoiceTable th,
  #invoiceTable td {
    white-space: nowrap;
    padding: 0.4rem 0.3rem;
  }

  .custom-thead th {
    font-size: 0.95rem;
  }

  .btn,
  .form-control {
    font-size: 1rem;
  }

  .card-body,
  .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, sans-serif;

}


h2 {
  font-size: 26px;
  color: #4d5b6b;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f4f4f4;
  display: flex;
}

body {
  background: ghostwhite;
  color: #333;
  line-height: 1.6;
}

.main-content {
  margin-left: 250px;
  width: 100%;
  transition: margin-left 0.3s ease;
  background-color: #f5f7fa;
  min-height: 100vh;
}

.main-content.expanded {
  margin-left: 60px;
}

/* entry forms */
label {
  font-weight: 600;
  font-size: 12px;
  color: #34495e;
  text-transform: uppercase;
  letter-spacing: 0.08px;
  font-family: "Segoe UI", Roboto, sans-serif;
}

.form-control,
.form-select {
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  background-color: #f9f9f9;
  transition: border-color 0.3s ease, box-shadow 0.2s ease;
}

.form-label {
  text-align: left !important;
  display: block;
  font-family: "Segoe UI", Roboto, sans-serif;
}

.btn-primary {
  background-color: #067905;
  border: none;
  font-weight: 600;
  padding: 10px 25px;
  border-radius: 8px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background-color: #065b03;
}



.custom-orange-btn {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease-in-out;
}

.custom-orange-btn:hover {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

thead.custom-thead th {
  background-color: #f8fafc !important;
  color: #475569 !important;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 2px solid #e2e8f0;
  font-family: "Segoe UI", Roboto, sans-serif;
  text-align: center;
}



/* Toggle Button */
.toggle-btn {
  position: fixed;
  top: 13px;
  left: 265px; /* Sits in the header area, next to sidebar */
  z-index: 1001;
  font-size: 18px;
  cursor: pointer;
  color: #64748b;
  background-color: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.toggle-btn:hover {
  background-color: #f1f5f9;
  color: #2563eb;
  border-color: #e2e8f0;
}

.toggle-btn.collapsed {
  left: 70px; /* Moves left when sidebar is small */
}

@media (max-width: 576px) {
  .toggle-btn {
    left: 10px;
  }
  .toggle-btn.collapsed {
    left: 10px;
  }
}



/* Sidebar Logo */
.sidebar-logo {
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  background-color: #ffffff;
  padding: 15px 0;
}

.sidebar-logo img {
  max-width: 140px;
  height: auto;
}

/* Sidebar updated*/
.sidebar {
  width: 250px;
  background: #ffffff;
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-size: 14.5px;
  color: #334155;
  border-right: 1px solid #e2e8f0;
  height: 100vh;
  position: fixed;
  top: 0;
  box-shadow: none;
  left: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed ul li a span,
.sidebar.collapsed ul li a .arrow {
  display: none;
}

.sidebar.collapsed ul li a {
  padding: 12px 0;
  justify-content: center;
}

.sidebar.collapsed ul li a i {
  margin-right: 0;
}

.sidebar.collapsed .submenu li a {
  padding: 10px 0;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #475569;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sidebar ul li a i {
  margin-right: 12px;
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: #64748b;
}

.sidebar ul li:hover > a {
  background: #f8fafc;
  color: #2563eb;
  border-left: 3px solid #2563eb;
}

.sidebar ul li:hover > a i {
  color: #2563eb;
}

.sidebar .submenu {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  pointer-events: none;
}

.sidebar .submenu.open {
  opacity: 1;
  max-height: 500px;
  /* adjust height based on content */
  pointer-events: auto;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f1f5f9;
}

.sidebar .submenu li a {
  padding: 10px 20px 10px 48px; /* Indent submenus */
  font-size: 13.5px;
  color: #64748b;
}

.sidebar .submenu li:hover > a {
  color: #2563eb;
  background: transparent;
  border-left: 3px solid transparent; /* No line for subitems */
}



.sidebar .has-submenu .arrow {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.3s;
}

/* sidebar updated on click  */



/* Main Content */
.main-content {
  margin-left: 250px;
  padding: 10px;
  transition: margin-left 0.3s ease;
}

.main-content.expanded {
  margin-left: 60px;
}

/* Responsive Fix */
@media (max-width: 768px) {
  .sidebar {
    left: -250px;
    width: 250px;
    height: 100%;
    position: fixed;
    z-index: 1000;
    transition: left 0.3s ease;
  }

  .sidebar.active {
    left: 0;
  }

  .sidebar.collapsed {
    left: -250px;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .main-content.expanded {
    margin-left: 0 !important;
  }
}


.content-header h2 {
  font-size: 26px;
  color: #4d5b6b;
}

/* stat cards */
.stat-card {
  padding: 20px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-align: center;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card .icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.gradient-1 {
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}

.gradient-2 {
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}

.gradient-3 {
  background: linear-gradient(135deg, #fbc2eb, #a6c1ee);
}

.gradient-4 {
  background: linear-gradient(135deg, #84fab0, #8fd3f4);
}



.card {
  flex: 1 1 calc(25% - 1rem);
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}



.card p {
  font-size: 1rem;
  font-weight: bold;
  color: #2c3e50;
}

/* 
  table {
    border-collapse: separate;
    border-spacing: 0;
  }

  thead th:first-child {
    border-top-left-radius: 10px;
  }

  thead th:last-child {
    border-top-right-radius: 10px;
  }

  .th-index {
    background-color: #f8f9fa;
    padding: 0.5rem;
    text-align: left;
  } */
/* Apply striped rows to all tables */
/* Apply striped rows only to tables inside #responsive-table */
#responsive-table table tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
  /* Light grey */
}

/* Optional: Hover effect only within #responsive-table */
#responsive-table table.table-hover tbody tr:hover {
  background-color: #e0e0e0;
  /* Slightly darker for hover */
}

.invoice-container {
  background: #fff;
  padding: 40px;
  margin: 40px auto;
  border-radius: 16px;
  max-width: 1000px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.07);
}

.invoice-header h3 {
  font-weight: 700;
  color: #343a40;
}

.invoice-header small {
  color: #6c757d;
}

.table th {
  background-color: #f8f9fa;
  color: #343a40;
  font-size: 14px;
}

.table td,
.table th {
  vertical-align: middle;
}

.total-label {
  text-align: right;
}

.total-value {
  text-align: right;
  font-weight: 600;
}

.highlight {
  color: #0d6efd;
  font-size: 1.3rem;
}

.qr-box {
  text-align: center;
  border: 2px dashed #ced4da;
  padding: 20px;
  border-radius: 10px;
}

.footer-note {
  text-align: center;
  color: #6c757d;
  font-size: 14px;
  margin-top: 20px;
}

.btn-wrap {
  text-align: center;
  margin-top: 30px;
}

/* Style the container */
.select2-container--default .select2-selection--single {
  height: 40px;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #f8fafc;
  font-size: 15px;
  transition: all 0.3s ease;
}

/* On focus */
.select2-container--default .select2-selection--single:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Dropdown arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px;
  right: 10px;
}

/* Placeholder text */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #888;
}

/* Dropdown list items */
.select2-container--default .select2-results__option {
  padding: 10px;
  font-size: 15px;
}

/* Highlight on hover */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #007bff;
  color: white;
}


/* Enhanced DataTables Controls */
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 1rem;
  text-align: right;
}

.dataTables_wrapper .dataTables_filter input {
  padding: 10px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  background-color: #fff;
  color: #333;
  margin-left: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Enhanced DataTables Pagination */
.dataTables_wrapper .dataTables_paginate {
  text-align: right;
  margin-top: 20px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 8px 14px;
  margin: 0 4px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background-color: #eff6ff;
  color: #2563eb !important;
  border-color: #bfdbfe;
}

/* Active Page */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background-color: #2563eb !important;
  color: #fff !important;
  border: 1px solid #2563eb;
}

/* Optional: Length Menu & Info Styling */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info {
  color: #666;
  margin-top: 10px;
}

/* all table resposnive */
@media only screen and (max-width:800px) {

  #responsive-table tbody,
  #responsive-table tr,
  #responsive-table td {
    display: block;
  }

  #responsive-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  #responsive-table td:before {
    content: attr(data-title);
    position: absolute;
    left: 10px;
    /* adjust for padding */
    top: 10px;
    font-weight: bold;
    width: 45%;
    /* control width of the label */
    white-space: nowrap;
  }

  #responsive-table td {
    position: relative;
    padding-left: 55%;
    /* creates space between label and value */
    padding-top: 10px;
    padding-bottom: 10px;
    box-sizing: border-box;
  }

  #responsive-table tr {
    border-bottom: 2px solid #2563eb;
  }
}

.template-download-link {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s;
}

.template-download-link:hover {
  color: #0056b3;
}


/* loginsignup page */

.lg-container {
  height: 100vh;
  width: 100%;
  background: url('../images/lg-bg.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Wrapper for the form with blurred glass effect */
.auth-wrapper {
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 40px 30px;
  animation: slideFadeIn 0.8s ease;
}

/* Optional animation */
@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input styles */
.auth-input {
  width: 100%;
  padding: 12px 14px;
  margin: 12px 0;
  border: none;
  border-radius: 6px;
  font-size: 14px;
}

/* Submit button */
.auth-button {
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  background-color: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.auth-button:hover {
  background-color: #1d4ed8;
}

/* Link text */
.auth-link {
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
  color: #fff;
}

.auth-link a {
  color: #fbd49d;
  text-decoration: underline;
}

/* notification pannel */
.notification-panel {
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  width: 320px;
  position: fixed;
  top: 60px;
  right: 0;
  padding: 0;
  border-left: 1px solid #ddd;
  z-index: 1050;
  border-radius: 8px 0 0 8px;
}

.notification-body {
  max-height: 80vh;
  overflow-y: auto;
}

.notification-header {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  background: #f9f9f9;
}


/* img preview for add products */
#preview img {
  height: 200px;
  /* Fixed height */
  object-fit: cover;
  /* Crop to fill */
  width: 80%;
  /* Responsive to container width */
  border-radius: 10px;
  /* Optional: rounded corners */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  /* Optional: soft shadow */
}


.img-thumbnail {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
}

table td {
  text-align: center;
}

.custom-thead th {
  border: 1px solid #dee2e6 !important;
  background-color: #e9f1ff;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6 !important;
}

.circular-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ccc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body {
  background: #f8f9fa;
  font-family: 'Segoe UI', sans-serif;
}

.invoice-box {
  background: white;
  padding: 30px;
  margin: 30px auto;
  border-radius: 10px;
  max-width: 1200px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
}

/* .table th, .table td {
      vertical-align: middle;
    } */
.btn-download {
  margin: 20px auto;
  display: block;
}