* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", sans-serif;
  background: linear-gradient(
    135deg,
    var(--body-bg-start) 0%,
    var(--body-bg-end) 100%
  );
  padding: 20px;
  min-height: 100vh;
}

a {
  .total-section {
    display: none !important;
  }
  text-decoration: none;
  color: rgb(0, 0, 0);
}

.container {
  background-color: var(--surface);
  border-radius: 20px;
  max-width: 1400px;
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 3px solid var(--accent-dark);
}

/* HEADER */
.header {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  padding: 20px 30px;
  border-radius: 17px 17px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--accent-dark);
}

.header h1 {
  color: white;
  font-size: 28px;
  font-weight: bold;
}

.user-badge {
  background-color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 25px;
  color: var(--text);
  font-weight: bold;
  font-size: 16px;
}

/* MAIN */
.main-content {
  padding: 25px;
  display: grid;
  grid-template-columns: 400px 140px 1fr;
  gap: 20px;
  align-items: start;
}

/* LEFT */
.left-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 24px;
  border-radius: 25px;
  border: none;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.action-buttons .btn-accent {
  box-shadow: 0 6px 18px rgba(31, 122, 140, 0.18);
}
.btn {
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.drug-list {
  background-color: var(--surface-alt);
  border-radius: 15px;
  padding: 15px;
  border: 2px solid var(--text-muted);
  min-height: 400px;
  max-height: 600px;
  /* Allow both vertical and horizontal scrolling when content overflows, like stock page */
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  scrollbar-gutter: stable;
}

.drug-list::-webkit-scrollbar {
  width: 8px;
}

.drug-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
  /* Push track to vertical center third */
  margin-top: 33%;
  margin-bottom: 33%;
}

.drug-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  min-height: 40px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.drug-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-dark), var(--accent-light));
  background-clip: content-box;
}

.drug-item {
  margin-bottom: 1px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  padding: 4px 8px;
  border-radius: 5px;
  transition: all 0.3s;
  cursor: pointer;
  /* Keep the drug name on a single line so it can expand the card horizontally */
  white-space: nowrap;
  overflow: visible;
}

.drug-item strong {
  font-weight: bold;
  display: inline-block;
  white-space: nowrap;
  /* allow the strong text to expand horizontally */
  min-width: 0;
}

.drug-item.selected,
.drug-item:hover {
  color: var(--warning) !important;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.search-container {
  margin-top: 10px;
}

.search-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--text-muted);
  border-radius: 10px;
  font-size: 15px;
  background-color: var(--surface);
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 5px rgba(107, 124, 80, 0.3);
}

/* CENTER */
.center-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: start;
  margin-top: 45px;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-btn {
  padding: 16px 8px;
  border-radius: 10px;
  border: none;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
  text-align: center;
  line-height: 1.2;
}

.payment-btn:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.payment-method-status {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #2f3a1f;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border: 1px solid #d5d9c7;
  cursor: pointer;
}
.payment-method-status:hover {
  background: #e5e7eb;
}

.payment-btn.active {
  transform: translateX(5px);
  box-shadow:
    4px 0 0 0 var(--text) inset,
    0 5px 15px rgba(0, 0, 0, 0.25);
  outline: 3px solid rgba(0, 0, 0, 0.35);
  outline-offset: -3px;
}

.btn-cash {
  background-color: var(--border);
  color: var(--text);
}
.btn-credit {
  background-color: #f59e0b;
  color: white;
}
.btn-rssb {
  background-color: var(--warning);
  color: white;
}
.btn-mmi {
  background-color: var(--success);
  color: var(--text);
}
.btn-sanlam {
  background-color: var(--primary);
  color: white;
}
.btn-uap {
  background-color: var(--danger);
  color: white;
}

/* RIGHT */
.right-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cart-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.admin-status-wrap {
  position: relative;
}

.admin-status-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
  position: relative;
}

.admin-status-button:hover {
  transform: scale(1.08);
}

.admin-status-button.level-green {
  background: #22c55e;
}

.admin-status-button.level-yellow {
  background: #facc15;
}

.admin-status-button.level-red {
  background: #ef4444;
  /* stronger base glow */
  box-shadow:
    0 0 10px rgba(239, 68, 68, 0.35),
    0 0 24px rgba(239, 68, 68, 0.14);
  animation: levelRedPulse 2.6s infinite ease-in-out;
}

/* Radiating ring using pseudo-element */
.admin-status-button.level-red::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65);
  opacity: 0.9;
  animation: adminRedRadiate 1.6s infinite ease-out;
}

@keyframes adminRedRadiate {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65);
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
  70% {
    box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

@keyframes levelRedPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.admin-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.admin-status-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 360px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  z-index: 30;
  padding: 10px 12px 12px;
  max-height: 56vh;
  overflow-y: auto;
}

.admin-status-popover.hidden {
  display: none;
}

.admin-status-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}

.admin-status-close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #374151;
}

.admin-status-content {
  font-size: 12px;
  line-height: 1.5;
  color: #1f2937;
}

.admin-status-summary {
  font-size: 13px;
  margin-bottom: 8px;
  color: #111827;
}

.admin-status-group {
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eef2f7;
}

.group-header {
  padding: 8px 10px;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0f172a;
}

.group-header.group-blockers {
  background: rgba(239, 68, 68, 0.12);
  border-bottom: 1px solid rgba(239, 68, 68, 0.12);
  color: #7f1d1d;
}
.group-header.group-issues {
  background: rgba(255, 179, 0, 0.12);
  border-bottom: 1px solid rgba(255, 159, 0, 0.14);
  color: #92400e;
}
.group-header.group-monitoring {
  background: rgba(59, 130, 246, 0.12);
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  color: #08306b;
}
.group-header.group-info {
  background: rgba(16, 185, 129, 0.08);
  border-bottom: 1px solid rgba(16, 185, 129, 0.08);
  color: #065f46;
}

.group-body {
  padding: 8px 12px;
  font-size: 12px;
  color: #374151;
}
.group-body ul {
  margin: 0;
  padding-left: 14px;
}
.group-body .empty {
  color: #9ca3af;
  font-style: italic;
}
.count {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
}

/* Collapsible behaviour */
.group-body.collapsed {
  display: none;
}
.group-header .caret {
  margin-left: 8px;
  opacity: 0.7;
  font-size: 12px;
}

/* AdminSystem item severity styles */
.admin-status-content .as-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}
.admin-status-content .as-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 50%;
  flex: 0 0 26px;
  box-shadow: 0 2px 6px rgba(2, 6, 23, 0.06);
}
.admin-status-content .as-msg {
  flex: 1;
  font-size: 13px;
  color: #071227;
  line-height: 1.35;
}
.admin-status-content .as-blockers .as-icon {
  background: #fee2e2;
  color: #991b1b;
}
.admin-status-content .as-issues .as-icon {
  background: #fff7ed;
  color: #b45309;
}
.admin-status-content .as-monitoring .as-icon {
  background: #eff6ff;
  color: #0369a1;
}
.admin-status-content .as-info .as-icon {
  background: #ecfdf5;
  color: #065f46;
}

.admin-status-group {
  border-left: 4px solid rgba(0, 0, 0, 0.03);
}

.group-header {
  cursor: pointer;
}
.group-header:hover {
  opacity: 0.95;
}

.admin-status-content ul {
  margin: 0;
  padding-left: 16px;
}

.admin-status-content .as-item {
  background: linear-gradient(180deg, #ffffff, #fbfbff);
  border: 1px solid rgba(2, 6, 23, 0.05);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.admin-status-content .as-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.08);
  color: #312e81;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin-right: 6px;
}
.admin-status-content .as-details {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
}

.btn-secondary {
  background: linear-gradient(
    135deg,
    var(--accent-light) 0%,
    var(--accent-light) 100%
  );
  color: white;
  padding: 10px 20px;
  font-size: 14px;
}

/* INVOICE AREA */
.invoice-area {
  background: linear-gradient(
    135deg,
    var(--warning) 0%,
    var(--accent-light) 100%
  );
  border-radius: 15px 15px 0 0;
  padding: 18px;
  border: 3px solid var(--text-muted);
  border-bottom: none;
  display: flex;
  flex-direction: column;
}

.invoice-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.invoice-col {
  background-color: var(--danger);
  padding: 10px 6px;
  text-align: center;
  font-weight: bold;
  border-radius: 5px;
  color: var(--text);
  font-size: 14px;
}

#cartItems {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

/* Keep cart items contained and scrollable to prevent the invoice card growing */
#cartItems {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
}

#cartItems::-webkit-scrollbar {
  width: 8px;
}
#cartItems::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-light));
  border-radius: 8px;
}

.cart-cell {
  background-color: rgba(255, 255, 255, 0.7);
  padding: 10px 6px;
  border-radius: 5px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-cell.empty-row {
  background-color: rgba(255, 255, 255, 0.3);
}
.cart-cell.selected-cart-item {
  background-color: var(--warning);
  border: 2px solid var(--text);
}

.total-section {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.total-label {
  grid-column: 1 / 4;
  background-color: var(--text-muted);
  padding: 14px 16px;
  border-radius: 10px;
  text-align: right;
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
}

.total-value {
  background-color: var(--text-muted);
  padding: 14px 16px;
  border-radius: 10px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
}

/* PAYMENT TOGGLE — Cash/Credit centered */
.toggle-buttons-group {
  display: flex;
  gap: 14px;
  align-items: center;
}

.toggle-btn {
  padding: 12px 36px;
  border-radius: 30px;
  border: none;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
  white-space: nowrap;
}
.toggle-cash {
  background-color: var(--success);
  color: var(--text);
}
.toggle-credit {
  background-color: var(--danger);
  color: white;
}
.csd-chip-credit {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111;
}
.toggle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* PRINT BUTTON */
.print-btn {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-light) 100%
  );
  color: var(--surface);
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  width: 100%;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.print-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.2);
}

.print-btn:disabled {
  background: linear-gradient(135deg, var(--accent), var(--text-muted));
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* BOTTOM ACTIONS */
.bottom-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.action-box {
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
  border: none;
}

.action-box:hover,
.reconciliation-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.action-adjust {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-dark));
  color: white;
}
.action-reports {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-dark));
  color: var(--text);
}
.action-dashboard {
  background: linear-gradient(
    135deg,
    var(--sidebar-bg-start),
    var(--sidebar-bg-end)
  );
  color: white;
}

.reconciliation-btn {
  background-color: var(--warning);
  color: var(--text);
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-weight: bold;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

/* FOOTER */
.footer {
  background: var(--surface);
  padding: 15px;
  text-align: center;
  border-radius: 0 0 17px 17px;
  border-top: 2px solid var(--text-muted);
}

.footer-text {
  color: var(--text);
  font-size: 16px;
}
.footer-link {
  color: var(--primary);
  text-decoration: none;
}
.footer-link:hover {
  text-decoration: underline;
}

/* =============================================
   REDESIGNED MODALS  (matches stock page)
   ============================================= */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── shared overlay ── */
.modal-overlay,
.adjust-qty-modal,
.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.medicine-detail-modal {
  max-width: 620px;
  border: 1px solid rgba(116, 130, 102, 0.18);
  box-shadow: 0 26px 62px rgba(15, 23, 42, 0.18);
}

.medicine-detail-header {
  padding: 18px 22px;
}

.medicine-detail-close {
  min-width: 40px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 26px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.15);
  color: var(--surface);
}

.medicine-detail-body {
  padding: 22px;
}

.medicine-detail-grid {
  display: grid;
  gap: 14px;
}

.medicine-detail-card {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f6fb 100%);
  border: 1px solid #dfeaf8;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.medicine-detail-half {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.medicine-detail-full {
  display: grid;
  gap: 6px;
}

.medicine-detail-label {
  font-size: 11px;
  color: #607087;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.medicine-detail-value {
  font-size: 17px;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.4;
}

.medicine-detail-copy {
  font-size: 13px;
  line-height: 1.6;
  color: #223042;
  white-space: normal;
}

.medicine-detail-actions {
  padding: 0 22px 22px;
  justify-content: flex-end;
}

@media (min-width: 560px) {
  .medicine-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .medicine-detail-full {
    grid-column: 1 / -1;
  }
}

.modal-overlay.active,
.adjust-qty-modal.active,
.confirm-modal.active {
  display: flex;
}

/* ── shared card ── */
.modal-content,
.adjust-qty-content,
.confirm-content {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  width: 90%;
  max-width: 500px;
  max-height: min(84vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s ease;
  border: none;
}

/* Wider modal variant (used for product details grid) */
.modal-content.wide {
  max-width: 920px;
  max-height: min(86vh, 800px);
}

/* Compact details grid inside the wide details modal */
.details-section {
  margin-bottom: 0;
}
.details-section-title {
  font-weight: 600;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 4px;
  line-height: 1.2;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  align-items: start;
}
.details-cell {
  padding: 4px 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  border: 1px solid #e8eef7;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.details-label {
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.details-value {
  color: #111827;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.details-modal-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.details-summary-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.details-summary-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.prescription-field-wrap {
  display: none;
  margin-top: 0;
}

.client-notes-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
}

.client-notes-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.client-notes-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}

.client-note-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(90, 107, 66, 0.12);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
}

/* Responsive: collapse columns on narrower screens */
@media (max-width: 920px) {
  .details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .modal-content.wide {
    max-width: 92%;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
}

.confirm-content {
  max-width: 420px;
}

/* ── green gradient header strip ── */
.modal-header-row,
.adjust-qty-header,
.confirm-header {
  background: linear-gradient(
    135deg,
    var(--accent-dark) 0%,
    var(--accent-light) 100%
  );
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--surface);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* item name + stock badge side by side in modal header */
.modal-header-row {
  justify-content: space-between;
}

.modal-header-item {
  font-size: 16px;
  font-weight: 700;
  color: var(--surface);
  flex: 1;
}

.modal-header-stock {
  background: rgba(255, 255, 255, 0.2);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── body ── */
.modal-body,
.adjust-qty-body,
.confirm-body {
  padding: 28px;
  background: var(--surface-alt);
  overflow-y: auto;
  flex: 1 1 auto;
}

/* ── field + label ── */
.modal-quantity-section,
.adjust-qty-section,
.adjust-qty-info {
  margin-bottom: 0;
}

.modal-label,
.adjust-qty-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* ── inputs ── */
.modal-input-qty,
.adjust-qty-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--surface-alt);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.modal-note-block {
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--surface-alt);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

#insuranceModal .modal-content {
  max-width: 700px;
  border: 1px solid rgba(96, 117, 91, 0.2);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.ins-provider-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  background: #f5f7f3;
  border: 1px solid #dae0d7;
  border-radius: 8px;
}

.ins-provider-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.9fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #dfe6df;
  color: var(--text);
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ins-provider-row .ins-prov-label {
  font-weight: 700;
  color: #1f2a2b;
}

.ins-provider-row .ins-prov-key {
  color: #5d6a66;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}

.ins-provider-row .ins-prov-coverage {
  color: var(--text-muted);
  text-align: right;
  font-weight: 600;
}

.modal-separator {
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(116, 130, 102, 0.18),
    rgba(116, 130, 102, 0.02)
  );
  margin: 12px 0 18px;
}

.ins-modal-add-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px;
  background: #f6f8f3;
  border: 1px solid #dde4d9;
  border-radius: 8px;
}

.ins-add-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #586c5d;
}

.ins-add-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.modal-field {
  margin-bottom: 0;
}

@media (max-width: 840px) {
  .ins-add-fields {
    grid-template-columns: 1fr;
  }
}

.modal-warning-block .warning-item {
  margin-bottom: 10px;
}

.modal-input-qty:focus,
.adjust-qty-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 124, 80, 0.15);
}

/* ── button rows ── */
.modal-buttons,
.adjust-qty-buttons,
.confirm-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
}

/* ── shared button base ── */
.modal-btn,
.adjust-qty-btn,
.confirm-btn {
  padding: 11px 28px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}

.modal-btn:hover,
.adjust-qty-btn:hover,
.confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.modal-btn:active,
.adjust-qty-btn:active,
.confirm-btn:active {
  transform: translateY(0);
}

/* cancel = grey */
.modal-btn-cancel,
.adjust-qty-btn-cancel,
.confirm-btn-no {
  background: var(--surface-alt);
  color: var(--text-muted);
}

.modal-btn-cancel:hover,
.adjust-qty-btn-cancel:hover,
.confirm-btn-no:hover {
  background: var(--surface-alt);
}

/* confirm = green */
.modal-btn-add,
.adjust-qty-btn-update {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
  color: var(--surface);
}

/* danger = red */
.confirm-btn-yes {
  background: linear-gradient(135deg, var(--danger), var(--danger));
  color: var(--surface);
}

/* disabled state */
.modal-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.modal-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ── confirm message ── */
.confirm-message {
  margin-bottom: 24px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

/* ── adjust-qty item label ── */
.adjust-qty-info {
  font-size: 14px;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .center-section {
    order: 2;
    align-self: stretch;
    margin-top: 0;
  }
  .payment-methods {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .payment-btn {
    flex: 1;
    min-width: 120px;
  }
  .right-section {
    order: 3;
  }
  .header h1 {
    font-size: 20px;
  }
  .drug-list {
    max-height: 500px;
  }
  .bottom-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  .print-btn {
    width: 100%;
    margin-left: 0;
  }
  .payment-toggle-section {
    flex-wrap: wrap;
  }
  .toggle-search-wrapper {
    max-width: 100%;
  }
  .toggle-buttons-group {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (min-width: 1920px) {
  .main-content {
    grid-template-columns: 450px 160px 1fr;
  }
}

/* Dropdown list items (used by toggle search dropdown) */
.customer-dropdown-item {
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-alt);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.customer-dropdown-item:last-child {
  border-bottom: none;
}
.customer-dropdown-item:hover {
  background: var(--surface-alt);
}

.cdi-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--surface);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cdi-details {
  flex: 1;
  min-width: 0;
}
.cdi-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.cdi-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cdi-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cdi-badge-cash {
  background: var(--surface-alt);
  color: var(--text-muted);
}
.cdi-badge-rssb {
  background: var(--surface-alt);
  color: var(--warning);
}
.cdi-badge-mmi {
  background: var(--surface-alt);
  color: var(--accent);
}
.cdi-badge-sanlam {
  background: var(--surface-alt);
  color: var(--primary);
}
.cdi-badge-uap {
  background: var(--surface-alt);
  color: var(--danger);
}
.customer-dropdown-empty {
  padding: 18px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* =============================================
   CUSTOMER INFO BAR
   ============================================= */
.customer-info-bar {
  background: linear-gradient(
    135deg,
    var(--surface-alt) 0%,
    var(--surface-alt) 100%
  );
  border-bottom: 2px solid var(--accent-light);
  padding: 10px 30px;
}
.customer-info-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--text);
}
.cib-icon {
  font-size: 15px;
}
.cib-label {
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cib-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--accent-dark);
}
.cib-value {
  font-weight: 600;
  color: var(--text);
}
.cib-sep {
  color: var(--text-muted);
  font-weight: 300;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .center-section {
    order: 2;
    align-self: stretch;
    margin-top: 0;
  }
  .payment-methods {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .payment-btn {
    flex: 1;
    min-width: 120px;
  }
  .right-section {
    order: 3;
  }
  .header h1 {
    font-size: 20px;
  }
  .drug-list {
    max-height: 500px;
  }
  .bottom-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  .print-btn {
    width: 100%;
    margin-left: 0;
  }
}

@media (min-width: 1920px) {
  .main-content {
    grid-template-columns: 450px 160px 1fr;
  }
}
/* =============================================
   CLIENT SEARCH DROPDOWN MODAL
   ============================================= */
.client-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1100;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
  animation: fadeIn 0.2s ease;
}
.client-search-overlay.active {
  display: flex;
}

.client-search-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 560px;
  overflow: hidden;
  animation: slideUp 0.25s ease;
  border: 2px solid var(--accent-light);
}

.csd-header {
  background: linear-gradient(
    135deg,
    var(--accent-dark) 0%,
    var(--accent-light) 100%
  );
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--surface);
  font-size: 16px;
  font-weight: 700;
}

.csd-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--surface);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: inherit;
}
.csd-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.csd-body {
  padding: 18px;
  background: var(--surface-alt);
}

.csd-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 2px solid var(--accent-light);
  border-radius: 12px;
  padding: 0 14px;
  margin-bottom: 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.csd-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 124, 80, 0.15);
}
.csd-search-icon {
  font-size: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.csd-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  padding: 12px 0;
  width: 100%;
  color: var(--text);
}

.csd-list {
  background: var(--surface);
  border-radius: 12px;
  border: 1.5px solid var(--surface-alt);
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.csd-list::-webkit-scrollbar {
  width: 6px;
}
.csd-list::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: 6px;
}

.cdd-not-found {
  padding: 32px 20px;
  text-align: center;
}
.cdd-nf-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.cdd-nf-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.cdd-nf-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.csd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 11px 16px;
  gap: 12px;
}
.csd-footer-hint {
  font-size: 13px;
  color: var(--text-muted);
}
.csd-add-btn {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
  color: var(--surface);
  border: none;
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.csd-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(90, 107, 66, 0.3);
}

/* =============================================
   CHECKOUT STEPS BAR
   ============================================= */
.checkout-steps {
  display: flex;
  align-items: center;
  padding: 8px 30px 7px;
  background: linear-gradient(
    135deg,
    var(--surface-alt) 0%,
    var(--surface-alt) 100%
  );
  border-bottom: 2px solid var(--surface-alt);
  gap: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: default;
  min-width: 54px;
  position: relative;
}

.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.step-label {
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.25;
  transition: color 0.3s;
}

/* Active step */
.step.step-active .step-circle {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
  color: var(--surface);
  box-shadow: 0 0 0 3px rgba(107, 124, 80, 0.25);
}
.step.step-active .step-label {
  color: var(--accent-dark);
}

/* Done step */
.step.step-done .step-circle {
  background: var(--accent-light);
  color: transparent;
  font-size: 0;
}
.step.step-done .step-circle::after {
  content: "✓";
  position: absolute;
  font-size: 12px;
  color: var(--surface);
  font-weight: 800;
}
.step.step-done .step-label {
  color: var(--accent-dark);
}

/* Locked step */
.step.step-locked .step-circle {
  background: var(--border);
  color: var(--text-muted);
}
.step.step-locked .step-label {
  color: var(--text-muted);
}

/* Connectors */
.step-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 16px;
  transition: background 0.3s;
}
.step-connector.conn-done {
  background: linear-gradient(90deg, var(--accent-light), var(--accent-light));
}

/* ── STEP HINT BAR ── */
.step-hint-bar {
  background: linear-gradient(
    135deg,
    var(--surface-alt) 0%,
    var(--surface-alt) 100%
  );
  border-bottom: 2px solid var(--warning);
  padding: 6px 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--warning);
  font-weight: 600;
}
.shb-icon {
  font-size: 14px;
}

/* ── CHANGE CLIENT BUTTON — kept for legacy compat ── */

/* ── CLIENT TOGGLE SECTION ── */
.payment-toggle-section {
  background-color: var(--accent);
  border: 3px solid var(--text-muted);
  border-top: none;
  border-radius: 0 0 15px 15px;
  padding: 10px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cts-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── CLIENT SECTION LABEL ── */
.cts-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── INLINE CLIENT SEARCH (fills section width) ── */
.client-search-dropdown {
  width: 100%;
}

.csd-inner {
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--accent-light);
}

.csd-body {
  padding: 10px;
  background: var(--surface-alt);
}

.csd-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--accent-light);
  border-radius: 8px;
  padding: 0 10px;
  margin-bottom: 8px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.csd-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(107, 124, 80, 0.15);
}
.csd-search-icon {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.csd-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  font-family: inherit;
  padding: 8px 0;
  width: 100%;
  color: var(--text);
}

/* Filter chips */
.csd-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.csd-chip {
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  color: var(--text-muted);
}
.csd-chip:hover {
  border-color: var(--accent-light);
  color: var(--accent-dark);
}
.csd-chip.active {
  border-color: transparent;
  color: var(--surface);
}
.csd-chip-all.active {
  background: var(--accent-dark);
}
.csd-chip-cash.active {
  background: var(--text-muted);
}
.csd-chip-rssb.active {
  background: var(--warning);
}
.csd-chip-mmi.active {
  background: var(--success);
}
.csd-chip-sanlam.active {
  background: var(--primary);
}
.csd-chip-uap.active {
  background: var(--danger);
}

/* Results list — fixed height so layout doesn't shift */
.csd-list {
  background: var(--surface);
  border-radius: 8px;
  border: 1.5px solid var(--surface-alt);
  height: 160px; /* fixed height */
  overflow-y: auto;
  margin-bottom: 8px;
}
.csd-list::-webkit-scrollbar {
  width: 4px;
}
.csd-list::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: 4px;
}

.cdd-empty {
  padding: 20px 14px;
  text-align: center;
}
.cdd-empty-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.cdd-empty-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.cdd-empty-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Footer */
.csd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 7px 10px;
  gap: 8px;
}
.csd-footer-hint {
  font-size: 11px;
  color: var(--text-muted);
}
.csd-add-btn {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
  color: var(--surface);
  border: none;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.csd-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(90, 107, 66, 0.3);
}

/* ── SELECTED CLIENT CARD ── */
.selected-client-card {
  background: var(--surface);
  border-radius: 10px;
  border: 1.5px solid var(--accent-light);
  overflow: hidden;
}

.scc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--accent-light);
}

.scc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
  color: var(--surface);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scc-details {
  flex: 1;
  min-width: 0;
}
.scc-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scc-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.scc-change-btn {
  flex-shrink: 0;
  background: rgba(90, 107, 66, 0.12);
  border: 1.5px solid var(--accent-light);
  color: var(--accent-dark);
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  white-space: nowrap;
}
.scc-change-btn:hover {
  background: rgba(90, 107, 66, 0.25);
}

.scc-fields {
  display: flex;
  gap: 0;
  padding: 8px 12px;
  background: var(--surface-alt);
}

.scc-notes-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px 10px;
  background: var(--surface-alt);
  border-top: 1px solid var(--accent-light);
}

.scc-notes-val {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.scc-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 10px;
  border-right: 1px solid var(--accent-light);
}
.scc-field:last-child {
  border-right: none;
  padding-right: 0;
}

.scc-field-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent-dark);
}
.scc-field-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── PAYMENT MISMATCH WARNING ── */
.scc-mismatch {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface-alt);
  border-top: 1.5px solid var(--warning);
}

.scc-mismatch-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.scc-mismatch-body {
  flex: 1;
}

.scc-mismatch-msg {
  font-size: 12px;
  color: var(--warning);
  line-height: 1.4;
  margin-bottom: 7px;
}
.scc-mismatch-msg strong {
  color: var(--warning);
}

.scc-mismatch-actions {
  display: flex;
  gap: 6px;
}

.scc-mismatch-btn {
  padding: 5px 12px;
  border-radius: 12px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
}

.scc-btn-switch {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
  color: var(--surface);
}
.scc-btn-switch:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(90, 107, 66, 0.3);
}

.scc-btn-keep {
  background: var(--surface-alt);
  color: var(--text-muted);
}
.scc-btn-keep:hover {
  background: var(--surface-alt);
}

/* Remove old overlay/absolute dropdown styles */
.client-search-overlay {
  display: none !important;
}
.csd-arrow {
  display: none;
}

/* ── CLIENT SECTION LABEL ── */
.cts-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}

.client-search-dropdown {
  width: 100%;
}

.csd-collapse-btn {
  margin-left: auto;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: var(--surface);
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: background 0.2s ease;
}

.csd-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.csd-collapse-label {
  white-space: nowrap;
}

.client-search-dropdown.collapsed .csd-inner {
  display: none;
}

/* ── PRINT ROW (print + new sale + analyse) ── */
.print-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  margin-bottom: 1.25rem;
}

.print-row > * {
  flex: 1 1 0;
  min-width: 0;
}

.print-row .print-btn,
.print-row .new-sale-btn,
.print-row .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 16px;
  font-size: 13px;
}

.print-row:not(.has-client) .print-btn,
.print-row:not(.has-client) #analyseCartBtn {
  flex: 1 1 0;
}

.print-row.has-client .print-btn,
.print-row.has-client #analyseCartBtn,
.print-row.has-client .new-sale-btn {
  flex: 1 1 0;
}

/* ── NEW SALE BUTTON ── */
.new-sale-btn {
  background: linear-gradient(
    135deg,
    var(--accent-light) 0%,
    var(--accent) 100%
  );
  color: var(--surface);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}
.new-sale-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.2);
}
.private-modal-header {
  background: linear-gradient(
    135deg,
    var(--text) 0%,
    var(--text-muted) 100%
  ) !important;
}
.private-modal-desc {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.private-modal-desc p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.private-modal-total {
  background: var(--text);
  color: var(--surface);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.modal-btn-confirm {
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  color: var(--surface);
}
.modal-btn-confirm:hover {
  background: linear-gradient(135deg, var(--text), var(--text));
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ── INLINE QTY EDIT ── */
.qty-inline-input {
  width: 100%;
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  background: var(--surface);
  color: var(--text);
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 124, 80, 0.2);
  appearance: textfield;
  -moz-appearance: textfield;
}
.qty-inline-input::-webkit-outer-spin-button,
.qty-inline-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── DOCTOR FIELD (inside selected client card) ── */
.scc-doctor-column {
  display: grid;
  grid-template-columns: auto 1fr;

  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-alt);
  border-top: 1px solid var(--accent-light);
}

.scc-doctor-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

.scc-doctor-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 10px;
}

.scc-doctor-input {
  flex: 1;
  border: 1.5px solid var(--accent-light);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.scc-doctor-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(107, 124, 80, 0.15);
}
.scc-doctor-input::placeholder {
  color: var(--text-muted);
}
