@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --base-clr: #ffffff;
  --bg-clr: #f5f7ff;
  --hover-clr: #eef1ff;
  --hover-clr-2: #f8f8f8;
  --text-clr: #11121a;
  --accent-clr: #4169E1;
  --btn-hover: #3a5bc0;
  --secondary-text-clr: #35363c;
}

* {
  margin: 0;
  padding: 0;
}

/* ===== Global Android-style scrollbar ===== */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.55);
}


html {
  font-family: Poppins, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-clr);
  color: var(--text-clr);
  display: grid;
  grid-template-columns: auto 1fr;
}

body.dark-theme {
  --base-clr: #1c1f2a;
  --bg-clr: #121420;
  --hover-clr: #262a3a;
  --hover-clr-2: #202433;
  --text-clr: #f1f2f6;
  --secondary-text-clr: #a5a8b6;
  --accent-clr: #5b7cff;
  --btn-hover: #4a66d6;
}

#sidebar {
  box-sizing: border-box;
  height: 100vh;
  width: 250px;
  padding: 5px 1em;
  background-color: var(--base-clr);
  border-right: 1px solid var(--line-clr);
  position: sticky;
  top: 0;
  align-self: start;
  transition: 300ms ease-in-out;
  overflow: hidden;
  text-wrap: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

#sidebar.close {
  padding: 5px;
  width: 56px;
}

#sidebar ul {
  list-style: none;
  height: 95%;
  display: flex;
  flex-direction: column;
}

#sidebar>ul>li:first-child {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  align-items: center;
}



#sidebar ul li.active a {
  color: var(--accent-clr);

  svg {
    fill: var(--accent-clr);
  }
}
#sidebar ul li button.active svg{
  fill: var(--accent-clr);
}
#sidebar ul li button.active span{
  color: var(--accent-clr);
}

#sidebar a,
#sidebar .dropdown-btn,
#sidebar .logo {
  border-radius: .5em;
  padding: .85em .75em;
  text-decoration: none;
  color: var(--text-clr);
  display: flex;
  align-items: center;
  gap: 1em;
  transition: 200ms ease;
}
/* ================= REGULAR WORK ACTIONS ================= */

/* Base button style */
.accept-regular,
.complete-regular {
  padding: 6px 16px;
  border-radius: 50px;
  border: none;
  font-size: 0.85rem;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: 200ms ease;
  white-space: nowrap;
}

/* ACCEPT */
.accept-regular {
  background-color: rgba(65, 105, 225, 0.12); /* blue soft */
  color: #4169E1;
}

.accept-regular:hover {
  background-color: rgba(65, 105, 225, 0.2);
}

/* COMPLETE */
.complete-regular {
  background-color: rgba(255, 159, 28, 0.15); /* orange soft */
  color: #ff9f1c;
}

.complete-regular:hover {
  background-color: rgba(255, 159, 28, 0.25);
}

/* DISABLED STATE */
.accept-regular:disabled,
.complete-regular:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ================= STATUS BADGES ================= */

.status {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Pending */
.status.pending {
  background-color: rgba(108, 117, 125, 0.15);
  color: #6c757d;
}

/* In Progress */
.status.progress {
  background-color: rgba(255, 159, 28, 0.15);
  color: #ff9f1c;
}

/* Completed */
.status.completed {
  background-color: rgba(40, 167, 69, 0.15);
  color: #28a745;
}
.logo {
  font-weight: 600;
  font-size: 1.3rem;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}

.dropdown-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

#sidebar svg {
  flex-shrink: 0;
  fill: var(--text-clr);
}

#sidebar a span,
#sidebar .dropdown-btn span {
  flex-grow: 1;
}

#sidebar a:hover,
#sidebar .dropdown-btn:hover {
  background-color: var(--hover-clr);
}

#sidebar .sub-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: 300ms ease-in-out;

  >div {
    overflow: hidden;
  }
}
#sidebar>ul>li:last-child{
  margin-top: auto;
}
/* #sidebar .logout {
  position: absolute;
  bottom: 2.5rem;
  width: 90%;
} */

#sidebar .sub-menu.show {
  grid-template-rows: 1fr;
}

.dropdown-btn svg {
  transition: 200ms ease;
}

.rotate svg:last-child {
  rotate: 180deg;
}

#sidebar .sub-menu a {
  padding-left: 2em;
}

#toggle-btn {
  margin-left: auto;
  padding: 1em 11px;
  border: none;
  border-radius: .5em;
  background: none;
  cursor: pointer;
  max-height: 56px;
}

#toggle-btn svg {
  transition: rotate 150ms ease;
}

#toggle-btn:hover {
  background-color: var(--hover-clr);
}

.mobile-close {
  display: none;
}

.desk-close {
  display: block;
}

main {
  min-width: 0;
  /* overflow-x: hidden; */
}

main .topbar {
  width: 100%;
  z-index: 998;
  background-color: var(--base-clr);
  height: 56px;
  position: sticky;
  top: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 12px 20px -12px rgba(0, 0, 0, 0.06);
  padding: 8px 1rem;
  box-sizing: border-box;
  transition: 200ms ease;
}

.topbar .pagetitle {
  font-size: 1.5rem;
  font-weight: 500;
}

.topbar .top-left {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.topbar .top-left .theme-toggler {
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--base-clr);
  transition: 200ms ease;
  cursor: pointer;
}

.topbar .top-left .theme-toggler:hover {
  background-color: var(--hover-clr);
}

.topbar .top-left .theme-toggler svg {
  fill: var(--secondary-text-clr);
}

.topbar .top-left .profile .profile-img {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.topbar .top-left .profile .profile-img img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.topbar .top-left .profile {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: .5rem;
}

.topbar .top-left .profile .profile-details {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.topbar .top-left .profile .profile-details h3 {
  font-size: .9rem;
  font-weight: 600;
}

.topbar .top-left .profile .profile-details p {
  font-size: .75rem;
  color: var(--secondary-text-clr);
}

main #overview {
  padding: 20px;
  padding-top: 0;
}

#overview .overview-head {
  display: flex;
  width: 100%;
  align-items: center;
  margin-bottom: 20px;
  justify-content: space-between;
}

#overview .overview-head h2 {
  font-size: 1.4rem;
  font-weight: 500;
}

#overview .overview-head button,
.add-courier {
  display: flex;
  align-items: center;
  font-family: "poppins", sans-serif;
  outline: none;
  border: none;
  border-radius: 50px;
  gap: 5px;
  font-size: 1rem;
  background-color: var(--accent-clr);
  cursor: pointer;
  color: #ffffff;
  transition: 200ms ease;
  padding: 10px 15px;
}

#overview .overview-head button svg {
  fill: #ffffff;
}

#overview .overview-head button:hover,
.add-courier:hover {
  background-color: var(--btn-hover);
}

#overview .overview-head button svg,
.add-courier svg {
  fill: #fff;
  height: 20px;
  width: 20px;
}

#overview .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

#overview .cards .card {
  background-color: var(--base-clr);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: 200ms ease;
  position: relative;
  transition: 200ms ease;
  cursor: pointer;
}

#overview .cards .card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
}

.cards .card .card-icon {
  position: absolute;
  height: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--accent-clr);
  top: 20px;
  right: 20px;
}

.cards .card .card-icon svg {
  fill: #ffffff;
  height: 24px;
  width: 24px;
}

.cards .card .card-title {
  font-size: 1.15rem;
  font-weight: 500;
}

.cards .card .card-numbers {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.cards .card .card-desc {
  color: var(--secondary-text-clr);
  font-size: .9rem;
}

main #head {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#head .head-title{
  display:  flex;
  justify-content: space-between;
  align-items: center;
}

#head .head-title p {
  font-size: 1.4rem;
  font-weight: 500;
}

#head .section-items {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

#head .left {
  display: flex;
  gap: 20px;
}
#head .left p{
  font-size: 1.4rem;
  font-weight: 500;
}

.head-title .courior-charges{
  display: flex;
  align-items: center;
  gap: 1rem;
}

.courior-charges .charges{
  width: 200px;
  display: flex;
}

.courior-charges .charges span{
  height: 45px;
  background-color: var(--base-clr);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 1rem;
  box-sizing: border-box;
  border-radius: 50px 0 0 50px;
  width: 75%;
  font-size: 1.1rem;
  font-weight: 500;
}
.courior-charges .charges1 span{
    border-radius: 50px;
}
.courior-charges .charges button{
  width: 25%;
  background-color: var(--accent-clr);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-radius: 0 50px 50px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
  transition: 200ms ease;
}
.courior-charges .charges button svg{
  fill: #fff;
}
.courior-charges .charges button:hover{
  background-color: var(--btn-hover);
}

.section-items select {
  padding: 12px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  border-radius: 12px;
  width: 200px;
  border: none;
  outline: none;
  background-color: var(--base-clr);
  color: var(--text-clr);

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: 200ms ease;
}

.section-items select:hover {
  background-color: var(--hover-clr-2);
}

.section-items select option {
  background-color: var(--base-clr);
  color: var(--text-clr);
  padding: 15px;
  cursor: pointer;
}

.section-items input {
  padding: 10px 16px;
  height: 50px;
  width: 50%;
  box-sizing: border-box;
  color: var(--text-clr);
  background: var(--base-clr);
  border: none;
  outline: none;
  font-family: "poppins", sans-serif;
  font-size: 1.1rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: 200ms ease;
}

.section-items input:hover {
  background-color: var(--hover-clr-2);
}

.opening {
  width: 230px;
  display: flex;
}

.opening .current-balance {
  height: 100%;
  width: 75%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  box-sizing: border-box;
  align-items: center;
  padding-left: 20px;
  font-size: 1.2rem;
  cursor: default;
  font-weight: 500;
  color: var(--text-clr);
  justify-content: flex-start;
  background-color: var(--base-clr);
  border-radius: 50px 0 0 50px;
}

.opening .edit-balance {
  width: 25%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  cursor: pointer;
  border: none;
  background-color: var(--accent-clr);
  outline: none;
  border-radius: 0 50px 50px 0;
  align-items: center;
  justify-content: center;
  transition: 200ms ease;
}

.opening .edit-balance:hover {
  background-color: var(--btn-hover);
}

.opening .edit-balance svg {
  fill: #fff;
}

main .records {
  margin: 20px;
  margin-top: 0;
  padding: 20px;
  border-radius: 20px;
  background-color: var(--base-clr);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-height: 65vh;

  max-width: 100%;
  overflow-x: auto;
  /* ✅ scroll here */
  overscroll-behavior-x: contain;
}

.records .records-title p {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.records .records-table {
  width: 100%;
  border-collapse: collapse;
}

.records-table {
  width: max-content;
  /* 🔥 KEY */
  min-width: 800px;
  /* your 11 columns */
  border-collapse: separate;
  border-spacing: 0 10px;
}


/* Table header */
.records-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  color: var(--secondary-text-clr);
  background: transparent;
  white-space: nowrap;
}
/* Table rows */
.records-table tr td {
  background-color: var(--base-clr);
  padding: 14px 16px;
  text-align: center;
  color: var(--text-clr);
  text-wrap: nowrap;
}

.records-table tr td.address-cell {
  text-wrap: wrap;
  min-width: 250px;
}

/* Rounded row corners */
.records-table tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.records-table tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Row hover */
.records-table tr:hover td {
  background-color: var(--hover-clr);
  transition: 200ms ease;
}

.records-table tr.accordion-row:hover td {
  background-color: transparent;
}

.records-table .edit-btn,
.records-table .delete-btn {
  padding: 6px 14px;
  border-radius: 50px;
  border: none;
  font-size: 0.85rem;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: 200ms ease;
}

/* Edit */
.records-table .edit-btn {
  background-color: rgba(65, 105, 225, 0.12);
  color: var(--accent-clr);
}
/* Share */
.records-table .share-btn {
  padding: 6px 14px;
  border-radius: 50px;
  border: none;
  font-size: 0.85rem;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: 200ms ease;

  background-color: rgba(34, 197, 94, 0.12); /* soft green */
  color: #22c55e; /* modern share green */
}

/* Hover effect */
.records-table .share-btn:hover {
  background-color: rgba(34, 197, 94, 0.22);
}

.records-table .edit-btn:hover {
  background-color: var(--accent-clr);
  color: #fff;
}

/* Delete */
.records-table .delete-btn {
  background-color: rgba(220, 53, 69, 0.12);
  color: #dc3545;
  margin-left: 6px;
}

.records-table .delete-btn:hover {
  background-color: #dc3545;
  color: #fff;
}
.multi-select-search {
   padding: 8px;
   border-bottom: 1px solid rgba(255,255,255,0.08);
}

.product-search-input {
   width: 95%;
   padding: 6px 8px;
   border-radius: 8px;
   border: none;
   outline: none;
   background: rgba(255,255,255,0.06);
   color: #fff;
   font-size: 13px;
}

/* ================= STATUS BADGES ================= */

.status {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

/* Colors */
.status.pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.status.progress {
  background: rgba(33, 150, 243, 0.15);
  color: #2196f3;
}

.status.completed {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

.status.cancelled {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
}

/* ================= MODAL ================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 18, 26, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 200ms ease;
  z-index: 999;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--base-clr);
  width: 420px;
  max-height: 650px;
  overflow: scroll;
  max-width: 90%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: modalPop 0.25s ease;
  position: relative;
}

@keyframes modalPop {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  position: sticky;
  background-color: var(--base-clr);
  top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-header h3 {
  font-weight: 500;
  font-size: 1.2rem;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--secondary-text-clr);
}

.modal-close:hover {
  color: var(--accent-clr);
}

/* Body */
.modal-body {
  padding: 20px 22px;
  display: grid;
  gap: 14px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-field label {
  font-size: 0.85rem;
  color: var(--secondary-text-clr);
}

.modal-field input {
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  color: var(--text-clr);
  outline: none;
  background: var(--hover-clr-2);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
}

/* Footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background-color: var(--base-clr);
  padding: 18px 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
/* .btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: 0.2s ease;
}

.btn.primary {
  background: var(--accent-clr);
  color: #fff;
}

.btn.primary:hover {
  opacity: 0.9;
}

.btn.secondary {
  background: var(--hover-clr-2);
  color: var(--text-clr);
}

.btn.secondary:hover {
  background: var(--hover-clr);
}

.btn.danger {
  background: #ef4444;
  color: #fff;
}

.btn.danger:hover {
  background: #dc2626;
} */

/* ================= MULTI SELECT ================= */

.multi-select {
  position: relative;
  width: 100%;
  font-family: "Poppins", sans-serif;
}

.multi-select-display {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--hover-clr-2);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-clr);
}

.multi-select-display .placeholder {
  color: var(--secondary-text-clr);
}

/* Dropdown */
.multi-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--base-clr);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: none;
  z-index: 500;
  max-height: 220px;
  overflow-y: scroll;
}

/* Option */
.multi-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: 200ms ease;
}

.multi-option:hover {
  background: var(--hover-clr);
}

.multi-option input {
  accent-color: var(--accent-clr);
}

/* Open state */
.multi-select.open .multi-select-dropdown {
  display: block;
}
/* ===== CUSTOM CHECKBOX ===== */

.multi-option input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--secondary-text-clr);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 200ms ease;
  background: transparent;
}

/* Checkmark */
.multi-option input::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 180ms ease;
  background-color: var(--accent-clr);
  border-radius: 3px;
}

/* Checked state */
.multi-option input:checked {
  border-color: var(--accent-clr);
  background-color: rgba(65, 105, 225, 0.1);
}

.multi-option input:checked::before {
  transform: scale(1);
}

/* Option text */
.multi-option span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-clr);
}

/* Hover polish */
.multi-option:hover input {
  border-color: var(--accent-clr);
}
.multi-option input:checked {
  box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.15);
}
/* ================= OTHER OPTION ================= */

/*.other-option {*/
/*  align-items: center;*/
/*}*/
/*.other-toggle{*/
/*  display: flex;*/
/*  align-items: center;*/
/*  gap: 10px;*/
/*}*/
/*.other-option .other-input {*/
/*  display: none;*/
/*  margin-left: 8px;*/
/*  padding: 8px 10px;*/
/*  border-radius: 10px;*/
/*  cursor: text;*/
/*  border: none;*/
/*  outline: none;*/
/*  font-size: 0.9rem;*/
/*  background: var(--hover-clr-2);*/
/*  color: var(--text-clr);*/
/*  flex: 1;*/
/*}*/

/* Show input when checked */
/*.other-option.active .other-input {*/
/*  display: block;*/
/*}*/

/* Reduce checkbox spacing when input visible */
/*.other-option.active {*/
/*  gap: 8px;*/
/*}*/
/* ================= OTHER OPTION (FIXED) ================= */

.other-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
}

.other-option:hover {
  background: var(--hover-clr);
}

/* Input is ALWAYS visible now */
.other-option .other-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 0.9rem;
  background: var(--hover-clr-2);
  color: var(--text-clr);
}

/* Add button */
.add-other-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: var(--accent-clr);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: 200ms ease;
}

.add-other-btn:hover {
  opacity: 0.85;
}

/* Optional inline error (used by JS) */
.other-input.error {
  box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.6);
}

/* ================= PRODUCT TABLE ================= */

.product-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--hover-clr-2);
  border-radius: 14px;
  overflow: hidden;
}

.product-table th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary-text-clr);
  padding: 10px 12px;
  background: rgba(0,0,0,0.03);
}

.product-table td {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text-clr);
}

.product-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.product-table input {
  width: 95%;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  outline: none;
  background: var(--base-clr);
  color: var(--text-clr);
  font-size: 0.9rem;
}
/* ✅ allow dropdown inside product table */
.product-table,
.product-table tr,
.product-table td {
  overflow: visible;
}
/* serial select inside table should behave like modal-field */
.modal-field-inline {
  padding: 0;
  margin: 0;
}

/* ================= SERIAL HISTORY TABLE ================= */

.history-table {
  background: var(--hover-clr-2);
  border-radius: 14px;
  overflow: hidden;
}

/* header */
.history-head {
  display: grid;
  grid-template-columns: 130px 1.5fr 1fr 1fr;
  padding: 12px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-text-clr);
  background: rgba(0,0,0,0.05);
}

/* rows */
.history-row {
  display: grid;
  grid-template-columns: 130px 1.5fr 1fr 1fr;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--text-clr);
  transition: background 150ms ease;
}

.history-row:not(:last-child) {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.history-row:hover {
  background: var(--hover-clr);
}

/* empty state */
.history-empty {
  padding: 18px;
  color: var(--secondary-text-clr);
  text-align: center;
}

/* ================= SEARCH SUGGESTIONS ================= */

.search-box {
  position: relative;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--base-clr);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  z-index: 30;
  display: none;
  overflow: hidden;
}

/* suggestion item */
.search-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 150ms ease;
  color: var(--text-clr);
}

.search-item:hover {
  background-color: var(--hover-clr);
}

/* no result */
.search-empty {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--secondary-text-clr);
}

.search-item {
  padding: 8px 10px;
  cursor: pointer;
}
.search-item:hover {
  background: var(--hover-clr-2);
}
.search-item small {
  display: block;
  opacity: 0.7;
  font-size: 12px;
}
.search-item .muted {
  font-size: 11px;
  opacity: 0.6;
}

/* ===== RADIO BUTTONS (IN / OUT) ===== */

.radio-group {
  display: flex;
  gap: 16px;
}

.radio-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background-color: var(--hover-clr-2);
  cursor: pointer;
  transition: 200ms ease;
  border: 2px solid transparent;
}

/* Hide default radio */
.radio-card input {
  display: none;
}

/* Custom radio circle */
.radio-custom {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--secondary-text-clr);
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-custom::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-clr);
  opacity: 0;
  transition: 200ms ease;
}

/* Text */
.radio-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-clr);
}

/* Checked state */
.radio-card input:checked+.radio-custom::after {
  opacity: 1;
}

.radio-card input:checked~.radio-text {
  color: var(--accent-clr);
}

.radio-card input:checked~.radio-custom {
  border-color: var(--accent-clr);
}

/* Hover */
.radio-card:hover {
  background-color: var(--hover-clr);
}

/* Optional semantic colors */
.radio-text.in {
  color: #2e7d32;
}

.radio-text.out {
  color: #c62828;
}

.modal-cancel {
  padding: 8px 18px;
  border-radius: 50px;
  border: none;
  background: var(--hover-clr);
  cursor: pointer;
  color: var(--text-clr);
  font-family: "Poppins", sans-serif;
}

.modal-save {
  padding: 8px 18px;
  border-radius: 50px;
  border: none;
  background: var(--accent-clr);
  color: white;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
}

.modal-save:hover {
  background: var(--btn-hover);
}

/* ================= COURIER MODAL RESPONSIVE ================= */

.modal-lg {
  width: 800px;
  max-width: 95%;
}

/* Grid layout */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Full width fields */
.modal-field.full {
  grid-column: span 2;
}

/* Textarea */
.modal-field textarea {
  resize: none;
  min-height: 90px;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  outline: none;
  color: var(--text-clr);
  background: var(--hover-clr-2);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .modal-lg {
    width: 95%;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-field.full {
    grid-column: span 1;
  }
}

/* ===== Modal Select (Product) ===== */
.modal-select {
  width: 100%;
  padding: 12px 16px;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  outline: none;
  background-color: var(--hover-clr-2);
  color: var(--text-clr);
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

/* Option styling (browser-safe) */
.modal-select option {
  padding: 12px;
  background: var(--base-clr);
  color: var(--text-clr);
}

/* ===== ANALYTICS LAYOUT ===== */
.analytics {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 20px;
  padding: 20px;
  padding-top: 0;
}

/* Cards */
.analytics-card {
  background: var(--base-clr);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.analytics-card h3,
.analytics-card h4 {
  margin-bottom: 12px;
  font-weight: 500;
}

/* Right side grid */
.analytics-right {
  width: calc(100% - 20px);
  display: block;
  /* 🔥 single card = full width */
}


.analytics-card.small {
  text-align: center;
}

/* ===== DONUT CHART ===== */

.donut-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 280px;
}

.donut-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--secondary-text-clr);
}

.donut-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* theme colors */
.dot.stock {
  background: #6c7cff;
}

.dot.courier {
  background: #4caf50;
}

.dot.sell {
  background: #ff9800;
}

.dot.price {
  background: #f44336;
}

/* Responsive */
@media (max-width: 1024px) {
  .analytics {
    grid-template-columns: 1fr;
  }

  .analytics-right {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .analytics-right {
    grid-template-columns: 1fr;
  }
}

/* ================= LOGIN PAGE ================= */

.login-page {
  min-height: 100vh;
  background-color: var(--bg-clr);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Container */
.login-container {
  width: 100%;
  padding: 20px;
}

/* Card */
.login-card {
  max-width: 400px;
  margin: auto;
  background-color: var(--base-clr);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
}

/* Logo */
.login-logo {
  height: 80px;
  width: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 10px auto;
}

.login-logo img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* Heading */
.login-card h2 {
  font-weight: 600;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--secondary-text-clr);
  margin-bottom: 25px;
}

/* Fields */
.login-field {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 6px;
  margin-bottom: 18px;
}

.login-field label {
  font-size: 0.85rem;
  color: var(--secondary-text-clr);
}

.login-field input {
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  outline: none;
  background-color: var(--hover-clr-2);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  color: var(--text-clr);
}

/* Button */
.login-btn {
  width: 100%;
  padding: 12px;
  border-radius: 50px;
  border: none;
  background-color: var(--accent-clr);
  color: #fff;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: 200ms ease;
  margin-top: 10px;
}

.login-btn:hover {
  background-color: var(--btn-hover);
}

.login-error {
  color: #d32f2f;
  background: #fdecea;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}
/* Password field wrapper */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Input spacing for icon */
.password-wrap input {
  width: 100%;
  padding-right: 44px;
}

/* Toggle icon */
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 15px;
  color: var(--secondary-text-clr);
  opacity: 0.8;
  user-select: none;
  transition: opacity 150ms ease, color 150ms ease;
}

/* Hover effect */
.toggle-password:hover {
  opacity: 1;
  color: var(--text-clr);
}

/* Optional focus polish */
.password-wrap input:focus + .toggle-password {
  color: var(--accent-clr);
}

/* ================= MOBILE SIDEBAR ================= */

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-btn svg {
  fill: var(--text-clr);
}
/* ================= ACCORDION TABLE ================= */

.accordion-row td {
  padding: 0 !important;
}

.acc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--base-clr);
  border-radius: 12px;
  transition: 200ms ease;
}

.acc-header:hover {
  background: var(--hover-clr);
}

.product-name {
  font-weight: 500;
  font-size: 1rem;
}

.acc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc-count {
  width: 100px;
  padding:8px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-family: Poppins;
  font-size: 1.1rem;
  background: var(--hover-clr-2);
  color: var(--text-clr);
  text-align: center;
}

.acc-save {
  padding: 8px 14px;
  border-radius: 50px;
  border: none;
  font-family: Poppins;
  background: var(--accent-clr);
  color: #fff;
  cursor: pointer;
}

.acc-save:hover {
  background: var(--btn-hover);
}

.acc-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
}
.acc-toggle svg{
  fill: var(--text-clr);
  transition: transform 200ms ease;
}

/* Body */
.acc-body {
  display: none;
  padding: 12px 18px 18px;
}

.accordion-row.open .acc-body {
  display: block;
}

.accordion-row.open .acc-toggle svg {
  transform: rotate(180deg);
}

/* Sub rows */
.acc-subrow {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}

.acc-subrow:last-child {
  border-bottom: none;
}

.acc-subrow span {
  font-weight: 500;
  color: var(--secondary-text-clr);
}

.acc-subrow input {
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: var(--hover-clr-2);
  color: var(--text-clr);
}
/* ===== MAIN ACCORDION GRID ===== */

.acc-grid {
  display: grid;
  grid-template-columns: 160px 1fr 260px;
  align-items: center;
  gap: 16px;
}

/* Column styling */
.acc-col {
  font-size: 0.95rem;
}

/* Date column */
.acc-date {
  color: var(--secondary-text-clr);
  font-weight: 500;
}

/* Product name */
.acc-product {
  font-weight: 600;
  color: var(--text-clr);
}

/* Actions column */
.acc-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
/* ✅ Hover only on main accordion header */
.acc-header:hover {
  background-color: var(--hover-clr);
}
/* ❌ No hover effect on sub rows */
.acc-subrow:hover {
  background-color: transparent;
}
/* ================= DIV TABLE ================= */

.accordion-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Header */
.table-header {
  display: grid;
  grid-template-columns: 160px 1fr 260px;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--secondary-text-clr);
}

/* Body wrapper */
.table-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Row */
.accordion-row {
  background: var(--base-clr);
  border-radius: 12px;
  overflow: hidden;
}

/* Main row */
.acc-header {
  cursor: pointer;
}

/* Grid alignment (header + rows SAME GRID) */
.acc-grid {
  display: grid;
  grid-template-columns: 160px 1fr 260px;
  align-items: center;
  padding: 14px 18px;
}

/* Hover only on main row */
.acc-header:hover {
  background-color: var(--hover-clr);
}

/* Columns */
.acc-date {
  color: var(--secondary-text-clr);
  font-weight: 500;
}

.acc-product {
  font-weight: 600;
}

.acc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Accordion body */
.acc-body {
  display: none;
  padding: 12px 18px 18px;
  background: var(--hover-clr-2);
}

.accordion-row.open .acc-body {
  display: block;
}

/* Sub rows */
.acc-subrow {
  display: flex;
  justify-content: space-between;
  padding: 8px 15px;
}

.acc-subrow span {
  font-weight: 500;
  color: var(--secondary-text-clr);
}

/* ===== Sub-row inputs (refined) ===== */

.acc-subrow input {
  width: 50%;
  height: 32px;
  font-family: Poppins;
  font-size: 1.1rem;
  padding: 4px 8px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;

  background-color: var(--base-clr);
  color: var(--text-clr);

  transition: 
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

/* Focus – clear but light */
.acc-subrow input:focus {
  outline: none;
  border-color: var(--accent-clr);
  background-color: var(--base-clr);
  box-shadow: 0 0 0 2px rgba(65, 105, 225, 0.15);
}
/* ================= FILTER STATUS BADGE ================= */
.status-filter {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: capitalize;
  letter-spacing: 0.3px;
  line-height: 1.4;
}

/* Charged */
.status-filter.charged {
  background: rgba(34, 197, 94, 0.15);   /* green soft */
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

/* Free */
.status-filter.free {
  background: rgba(59, 130, 246, 0.15);  /* blue soft */
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* Returned */
.status-filter.returned {
  background: rgba(239, 68, 68, 0.15);   /* red soft */
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}


/* Responsive tweak */
@media (max-width: 768px) {
  .acc-grid {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .acc-actions {
    justify-content: space-between;
  }
}


/* Mobile view */
@media (max-width: 900px) {

  body {
    grid-template-columns: 1fr;
  }

  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transform: translateX(-100%);
    width: 260px;
    height: 100vh;
  }

  #sidebar.close {
    transform: translateX(-100%);
  }

  #sidebar:not(.close) {
    transform: translateX(0);
  }

  main {
    width: 100%;
  }

  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .topbar {
    height: 56px;
    padding: 6px 12px;
    gap: 10px;
    justify-content: flex-start;
  }

  /* Title smaller & centered vertically */
  .topbar .pagetitle {
    font-size: 1.3rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: auto;
    /* 🔥 push everything else right */
    text-align: left;
  }

  /* Left group tighter */
  .topbar .top-left {
    gap: 10px;
  }

  /* Hamburger button (from earlier step) */
  .hamburger-btn {
    height: 40px;
    width: 40px;
    border-radius: 50%;
  }

  .hamburger-btn:hover {
    background-color: var(--hover-clr);
  }

  /* Theme toggle stays usable */
  .topbar .top-left .theme-toggler {
    height: 36px;
    width: 36px;
  }

  /* Profile section compact */
  .topbar .top-left .profile {
    gap: 0;
  }

  /* Hide text, keep avatar */
  .topbar .top-left .profile .profile-details {
    display: none;
  }

  .topbar .top-left .profile .profile-img {
    height: 36px;
    width: 36px;
  }

  .mobile-close {
    display: block;
  }

  .desk-close {
    display: none;
  }

  #head .head-title{
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  #head .head-title p{
    font-size: 1.2rem;
  }
  #head .head-title .courior-charges p{
    display: none;
  }
  #head .section-items {
    flex-direction: column-reverse;
    gap: 20px;

  }
  #head .left{
    justify-content: space-between;
  }
  .section-items select{
    width: 40%;
  }
  .section-items input {
    width: 100%;
  }
  .opening{
    width: 150px;
  }
  .opening .current-balance{
    font-size: 1rem;
  }
}