/* ==========================================================================
   NEW NAEEM BOOK DEPOT HASILPUR - POS & ERP SOFTWARE
   Components Stylesheet: Tables, Cards, Inputs, Buttons, Dialogs, Badges
   ========================================================================== */

/* Modern Cards */
.c {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.c:hover {
  box-shadow: var(--shadow-sm);
}

/* Grids */
.g {
  display: grid;
  gap: 16px;
}
.g4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.g2 {
  grid-template-columns: 2fr 1fr;
}
@media (max-width: 950px) {
  .g2 {
    grid-template-columns: 1fr;
  }
}

/* Flex Row Utilities */
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}
.row > * {
  flex: 0 1 auto;
}
.row input,
.row select {
  width: auto;
  min-width: 140px;
}
.row-between {
  justify-content: space-between;
}
.row-center {
  align-items: center;
}

/* Typography & Labels */
.k {
  color: var(--tx-muted);
  font-size: 12px;
  font-weight: 500;
}
.v {
  font-size: 22px;
  font-weight: 800;
  margin-top: 3px;
  letter-spacing: -0.5px;
}
.big {
  font-size: 24px;
  font-weight: 800;
  color: var(--ok);
  letter-spacing: -0.5px;
}
.bad {
  color: var(--bad) !important;
}
.ok {
  color: var(--ok) !important;
}
.font-bold {
  font-weight: 700 !important;
}

h3 {
  margin: 0 0 14px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--tx);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
h3 svg {
  color: var(--ac);
}

/* ==========================================================================
   Modern Buttons
   ========================================================================== */
button,
.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  line-height: 1.2;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xs);
}

button svg,
.btn svg {
  flex-shrink: 0;
}

button:hover,
.btn:hover {
  background: var(--bd-light);
  border-color: #cbd5e1;
  color: var(--tx);
}

button:active,
.btn:active {
  transform: translateY(1px);
}

/* Primary Button */
button.p,
.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #d97706;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.28);
}
button.p:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: #f59e0b;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.38);
}

/* Danger / Delete Button */
button.d,
.btn-danger {
  color: var(--bad) !important;
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}
button.d:hover,
.btn-danger:hover {
  background: var(--bad);
  color: #ffffff !important;
  border-color: var(--bad);
}

/* Small Button */
button.s,
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
input,
select,
textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--tx);
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  width: 100%;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px var(--ac-glow);
}

input::placeholder {
  color: #94a3b8;
}

/* ==========================================================================
   Modern Data Tables
   ========================================================================== */
.w {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--bd);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--bd);
  white-space: nowrap;
  font-size: 13px;
}

th {
  color: var(--tx-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #f8fafc;
}

td.n, th.n {
  text-align: right;
}

tfoot td {
  font-weight: 700;
  background: #f8fafc;
  border-top: 2px solid var(--bd);
}

tbody tr {
  transition: background 0.1s ease;
}

tbody tr:hover {
  background: rgba(245, 158, 11, 0.035);
}

/* ==========================================================================
   Modal Dialogs
   ========================================================================== */
dialog {
  background: var(--card);
  color: var(--tx);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 92%;
  padding: 22px 24px;
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

dialog h3 {
  margin: 0 0 16px;
  font-size: 17px;
  border-bottom: 1px solid var(--bd);
  padding-bottom: 10px;
}

dialog label {
  display: block;
  margin: 12px 0 4px;
  color: var(--tx-muted);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   Modern KPI Stat Cards
   ========================================================================== */
.kc {
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kc:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.kc::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.kc .ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #ffffff;
  backdrop-filter: blur(4px);
}
.kc .ic svg {
  width: 24px;
  height: 24px;
}

.kc .k {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.kc .v {
  font-size: 23px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
}

/* Sophisticated Gradients */
.b1 { background: linear-gradient(135deg, #d97706, #b45309); } /* Amber */
.b2 { background: linear-gradient(135deg, #059669, #047857); } /* Emerald */
.b3 { background: linear-gradient(135deg, #2563eb, #1d4ed8); } /* Royal Blue */
.b4 { background: linear-gradient(135deg, #e11d48, #be123c); } /* Rose */
.b5 { background: linear-gradient(135deg, #7c3aed, #6d28d9); } /* Violet */
.b6 { background: linear-gradient(135deg, #db2777, #be185d); } /* Pink */
.b7 { background: linear-gradient(135deg, #0d9488, #0f766e); } /* Teal */
.b8 { background: linear-gradient(135deg, #4f46e5, #4338ca); } /* Indigo */

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-ok {
  background: var(--ok-glow);
  color: var(--ok);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-bad {
  background: var(--bad-glow);
  color: var(--bad);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   POS Thermal Slip Styles (Screen & Print High Contrast)
   ========================================================================== */
.pos-slip-wrapper {
  max-width: 330px;
  width: 100%;
  margin: 0 auto;
  background: #ffffff !important;
  color: #000000 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 14px 16px;
  border: 1px solid #000000;
  border-radius: 4px;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media print {
  .pos-slip-wrapper {
    max-width: 80mm !important;
    width: 80mm !important;
    border: none !important;
    padding: 2mm 3mm !important;
    margin: 0 !important;
    box-shadow: none !important;
  }
}

.pos-slip-inner {
  width: 100%;
}

.pos-slip-header {
  text-align: center;
}

.pos-slip-brand {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #000000;
  text-transform: uppercase;
  line-height: 1.2;
}

.pos-slip-subbrand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #000000;
  margin-top: 1px;
}

.pos-slip-tagline {
  font-size: 9.5px;
  margin-top: 2px;
  color: #333333;
}

.pos-slip-contact {
  font-size: 10.5px;
  margin-top: 4px;
  line-height: 1.35;
  color: #111111;
}

.pos-slip-dashed {
  border-top: 1px dashed #000000;
  margin: 8px 0;
}

.pos-slip-meta {
  font-size: 11px;
  line-height: 1.45;
  color: #000000;
}

.pos-slip-meta div {
  display: flex;
  justify-content: space-between;
}

.pos-slip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.pos-slip-table th {
  border-bottom: 1.5px solid #000000;
  padding: 4px 0;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #000000;
}

.pos-slip-table td {
  padding: 2px 0;
  color: #000000;
}

.pos-slip-table .pos-item-name {
  font-weight: 700;
  font-size: 11.5px;
  padding-top: 4px;
}

.pos-slip-table .pos-item-details td {
  padding-bottom: 4px;
  border-bottom: 1px dotted #ccc;
}

.pos-slip-totals {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  line-height: 1.5;
  color: #000000;
}

.pos-slip-totals .pos-grand-row {
  font-size: 13px;
  font-weight: 900;
  border-top: 1.5px solid #000000;
  border-bottom: 1.5px solid #000000;
}

.pos-slip-totals .pos-grand-row td {
  padding: 4px 0;
}

.pos-slip-totals .pos-due-row {
  font-weight: 800;
}

.pos-slip-footer {
  text-align: center;
  font-size: 10px;
  line-height: 1.4;
  color: #222222;
}

/* ==========================================================================
   Eye-Catching Bordered Receipt & Invoice System
   ========================================================================== */
.receipt-wrapper {
  margin: 0 auto;
  max-width: 820px;
  background: transparent;
  box-sizing: border-box;
}

.receipt-outer-frame {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2.5px solid #0f172a;
  border-top: 6px solid #f59e0b;
  border-radius: 8px;
  padding: 24px 28px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   A4 Invoice Solar Watermark (Full Background Layer)
   ═══════════════════════════════════════════════════════════════════════════ */
.receipt-watermark-wrap {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 82%;
  max-width: 660px;
  opacity: 0.13;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.receipt-watermark-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.receipt-header,
.receipt-divider,
.receipt-meta-grid,
.receipt-items-table,
.receipt-footer-grid,
.receipt-notes-card {
  position: relative;
  z-index: 1;
}

.receipt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.receipt-logo-wrap {
  flex-shrink: 0;
}

.receipt-logo-wrap img {
  height: 68px;
  width: auto;
  object-fit: contain;
  display: block;
}

.receipt-company-info {
  flex: 1;
  text-align: center;
}

.receipt-brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #0f172a;
  text-transform: uppercase;
  line-height: 1.2;
}

.receipt-brand-sub {
  font-size: 11px;
  font-weight: 700;
  color: #d97706;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 3px;
}

.receipt-brand-contact {
  font-size: 11.5px;
  color: #475569;
  margin-top: 4px;
}

.receipt-brand-contact .sep {
  margin: 0 6px;
  color: #94a3b8;
}

.receipt-invoice-badge {
  background: #f8fafc;
  color: #0f172a;
  padding: 8px 14px;
  border-radius: 6px;
  text-align: center;
  min-width: 135px;
  border: 2px solid #0f172a;
  flex-shrink: 0;
}

.receipt-invoice-badge .badge-title {
  color: #d97706;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.receipt-invoice-badge .badge-inv-no {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin: 1px 0;
  color: #0f172a;
}

.receipt-invoice-badge .badge-date {
  font-size: 11px;
  color: #475569;
}

.receipt-divider {
  border-top: 2px solid #0f172a;
  border-bottom: 1.5px solid #f59e0b;
  padding-bottom: 2px;
  margin: 14px 0 16px;
}

.receipt-meta-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.receipt-meta-box {
  background: rgba(248, 250, 252, 0.85);
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
}

.receipt-meta-box.meta-right {
  text-align: right;
}

.receipt-meta-box .meta-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.receipt-meta-box .meta-name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.receipt-meta-box .meta-line {
  font-size: 12px;
  color: #334155;
  margin-top: 2px;
}

.receipt-meta-box .highlight-pay {
  font-weight: 700;
  color: #d97706;
}

.receipt-status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.receipt-status-pill.status-paid {
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #10b981;
}

.receipt-status-pill.status-due {
  background: #fff1f2;
  color: #be123c;
  border: 1.5px solid #f43f5e;
}

.receipt-items-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  border: 1.5px solid #0f172a;
}

.receipt-items-table th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 8px 10px;
  border: 1.5px solid #cbd5e1;
  border-bottom: 2.5px solid #0f172a;
}

.receipt-items-table td {
  padding: 8px 10px;
  font-size: 12px;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.82);
}

.receipt-items-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.82);
}

.receipt-footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  align-items: start;
}

.receipt-terms-box {
  background: rgba(248, 250, 252, 0.85);
  border: 1.5px dashed #cbd5e1;
  border-radius: 6px;
  padding: 10px 14px;
}

.receipt-terms-box .terms-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0f172a;
  margin-bottom: 4px;
}

.receipt-terms-box .terms-list {
  margin: 0;
  padding-left: 18px;
  font-size: 11px;
  color: #475569;
  line-height: 1.45;
}

.receipt-timestamp {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
  font-style: italic;
}

.receipt-totals-table {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
}

.receipt-totals-table td {
  padding: 6px 12px;
  font-size: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.receipt-totals-table .tot-val {
  text-align: right;
  font-weight: 700;
  color: #0f172a;
}

.receipt-totals-table .grand-total-row td {
  background: #f8fafc !important;
  color: #0f172a !important;
  font-size: 14.5px;
  font-weight: 900;
  padding: 8px 12px;
  border-top: 2px solid #0f172a;
  border-bottom: 2px solid #0f172a;
}

.receipt-totals-table .grand-total-row .tot-val {
  color: #f59e0b !important;
}

.receipt-totals-table .balance-row td {
  background: #f8fafc;
  font-weight: 800;
}

.receipt-totals-table .text-bad {
  color: #be123c !important;
}

.receipt-totals-table .text-ok {
  color: #047857 !important;
}

.receipt-totals-table .font-black {
  font-weight: 900 !important;
}

.receipt-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding: 0 10px;
}

.sig-block {
  text-align: center;
  width: 190px;
}

.sig-line {
  border-top: 1.5px dashed #475569;
  margin-bottom: 4px;
}

.sig-title {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.receipt-bottom-bar {
  border-top: 1.5px solid #0f172a;
  margin-top: 16px;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #475569;
}

/* Modal dialog override for receipt preview */
dialog.receipt-modal {
  max-width: 860px;
  width: 95%;
  padding: 16px 20px 24px;
  background: #0b1329;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* Crisp Clean White Theme for Sales Return Dialog */
dialog.sale-return-white-modal {
  max-width: 960px;
  width: 95%;
  padding: 0;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

dialog.sale-return-white-modal::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
}

.return-white-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.return-white-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.return-white-title .ret-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #fca5a5;
  letter-spacing: 0.5px;
}

.return-white-body {
  padding: 18px 22px;
  max-height: calc(88vh - 75px);
  overflow-y: auto;
  background: #ffffff;
}

.return-filter-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.return-filter-grid {
  display: grid;
  grid-template-columns: 140px 180px 1.5fr;
  gap: 12px;
  align-items: flex-end;
}

@media (max-width: 768px) {
  .return-filter-grid {
    grid-template-columns: 1fr;
  }
}

.return-white-input,
.return-white-select {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.return-white-input:focus,
.return-white-select:focus {
  border-color: #dc2626 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.return-meta-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.return-meta-card .meta-k {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.return-meta-card .meta-v {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.return-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.return-items-table th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  padding: 9px 10px !important;
  border-bottom: 2px solid #cbd5e1 !important;
  border-right: 1px solid #e2e8f0 !important;
}

.return-items-table td {
  padding: 9px 10px !important;
  font-size: 12.5px !important;
  color: #1e293b !important;
  border-bottom: 1px solid #f1f5f9 !important;
  border-right: 1px solid #f1f5f9 !important;
  background: #ffffff !important;
}

.return-items-table tr:hover td {
  background: #f8fafc !important;
}

.return-items-table .qty-input {
  background: #ffffff !important;
  color: #b91c1c !important;
  font-weight: 800 !important;
  text-align: center !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 5px !important;
  padding: 5px 6px !important;
  width: 72px !important;
}

.return-items-table .qty-input:focus {
  border-color: #dc2626 !important;
  background: #fff5f5 !important;
}

.return-settle-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 10px;
}

@media (max-width: 800px) {
  .return-settle-card {
    grid-template-columns: 1fr;
  }
}

.return-totals-summary-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

dialog.receipt-modal .receipt-modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Excel Sync Toast Notification */
.excel-sync-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid #10b981;
  color: #f8fafc;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99999;
  transform: translateY(16px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.excel-sync-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.excel-sync-toast svg {
  width: 18px;
  height: 18px;
  color: #10b981;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   New Item Desktop ERP Modal Form (Inspired by Professional POS UI)
   ═══════════════════════════════════════════════════════════════════════════ */
dialog.item-form-dialog {
  max-width: 920px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px 26px;
  background: var(--card);
  border: 1.5px solid var(--bd);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.item-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--bd);
  padding-bottom: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.item-form-header .title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.item-form-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -0.3px;
}
.item-form-header .title-badge {
  font-size: 11px;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 2px 8px;
}
.item-form-header .note-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 420px;
}
.item-form-header .note-wrap label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-muted);
}
.item-form-header .note-wrap input {
  flex: 1;
  margin: 0;
  padding: 6px 12px;
  font-size: 13px;
}

.item-form-grid {
  display: grid;
  gap: 14px;
}

.item-form-section {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
}

.item-form-section-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #475569;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.item-form-field {
  display: flex;
  flex-direction: column;
}
.item-form-field label {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.item-form-field label span.req {
  color: #ef4444;
  font-weight: 900;
  margin-left: 2px;
}
.item-form-field label span.sub-lbl {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}
.item-form-field input,
.item-form-field select {
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13.5px;
  background: #ffffff;
  color: var(--tx);
  outline: none;
  box-sizing: border-box;
  width: 100%;
  transition: all 0.15s ease;
}
.item-form-field input:focus,
.item-form-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.item-code-box {
  background: #fef08a !important;
  border-color: #ca8a04 !important;
  color: #713f12 !important;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Quick Plus Button for Classification (Company, Group, Category, Type) */
.btn-quick-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 20px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.btn-quick-plus:hover {
  background: #1d4ed8;
  transform: scale(1.1);
}

/* Paired Rate + % Discount Fields */
.price-disc-paired {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 6px;
}
.price-disc-paired .field-sub {
  display: flex;
  flex-direction: column;
}
.price-disc-paired .field-sub label {
  font-size: 11px;
  margin: 0 0 3px;
  color: #475569;
  font-weight: 700;
}
.price-disc-paired .field-sub input {
  padding: 7px 8px !important;
  font-size: 14px !important;
}
.disc-pct-input {
  background: #f8fafc !important;
  font-weight: 700 !important;
  text-align: right;
  border-color: #cbd5e1 !important;
}
.disc-pct-input:focus {
  background: #ffffff !important;
  border-color: #2563eb !important;
}

/* Pricing Section Highlight */
.item-pricing-section {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}
.price-print-input {
  border-color: #6366f1 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #4338ca !important;
  background: #ffffff !important;
}
.price-print-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}
.price-rp-input {
  border-color: #10b981 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #047857 !important;
  background: #ffffff !important;
}
.price-rp-input:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}
.price-tp-input {
  border-color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  background: #ffffff !important;
}
.price-tp-input:focus {
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.2) !important;
}
.price-wp-input {
  border-color: #3b82f6 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #1d4ed8 !important;
  background: #ffffff !important;
}
.price-wp-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}
.price-cost-input {
  border-color: #f59e0b !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #b45309 !important;
  background: #fffbeb !important;
}
.price-cost-input:focus {
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

.margin-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.margin-pill.green {
  background: #dcfce7;
  color: #15803d;
}
.margin-pill.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Multi-Barcode Inputs Grid */
.multi-barcode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.barcode-entry-box {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 6px;
}
.barcode-entry-box span.idx {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  min-width: 18px;
}
.barcode-entry-box input {
  border: none !important;
  padding: 5px 4px !important;
  font-family: monospace;
  font-weight: 700;
  font-size: 13px !important;
  box-shadow: none !important;
  width: 100%;
}
.barcode-entry-box input:focus {
  outline: none !important;
}

/* Slabs Tables Grid in Section 5 (Stock & Flags) */
.slabs-container-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1.5px dashed #cbd5e1;
}
@media (max-width: 860px) {
  .slabs-container-grid {
    grid-template-columns: 1fr;
  }
}
.slab-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.slab-card.retail-slab-card {
  border: 1.5px solid #86efac;
  background: #f0fdf4;
}
.slab-card.wholesale-slab-card {
  border: 1.5px solid #93c5fd;
  background: #eff6ff;
}
.slab-card-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.slab-card-title.retail-title {
  color: #047857;
}
.slab-card-title.wholesale-title {
  color: #1d4ed8;
}
.slab-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}
.slab-table th {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 8px;
  background: #f8fafc;
  border-bottom: 1.5px solid #cbd5e1;
  text-align: left;
  color: #334155;
}
.slab-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #e2e8f0;
}
.slab-table tr:last-child td {
  border-bottom: none;
}
.slab-table td.slab-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
}
.slab-table input {
  padding: 5px 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
}
.slab-table input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

/* Checkbox Flags Grid */
.item-flags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 6px;
}
.item-flag-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
}
.item-flag-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Customer Modal Form Layout */
.cust-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-top: 10px;
}
@media (max-width: 640px) {
  .cust-form-grid {
    grid-template-columns: 1fr;
  }
}
.cust-form-field {
  display: flex;
  flex-direction: column;
}
.cust-form-field.full-span {
  grid-column: 1 / -1;
}
.cust-form-field label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cust-form-field label .req {
  color: #ef4444;
  font-weight: 900;
}
.cust-form-field input,
.cust-form-field select {
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13.5px;
  background: #ffffff;
  color: var(--tx);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
.cust-form-field input:focus,
.cust-form-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.cust-type-select {
  font-weight: 800 !important;
  color: #1e40af !important;
  background: #eff6ff !important;
  border-color: #93c5fd !important;
}

/* ==========================================================================
   BULK CASH RECEIPTS & CASH PAYMENTS STYLES (Matching ERP Reference Screen)
   ========================================================================== */
.bulk-tab-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 4px;
  flex-wrap: wrap;
}
.bulk-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px 8px 0 0;
  border: 1.5px solid transparent;
  border-bottom: none;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.bulk-tab-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.bulk-tab-btn.active {
  background: #ffffff;
  color: #047857;
  border-color: #cbd5e1;
  border-bottom: 3px solid #059669;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.03);
}
.bulk-tab-btn.sup-active {
  color: #2563eb;
  border-bottom: 3px solid #2563eb;
}

/* Bulk Sheet Container */
.bulk-sheet-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 16px;
  margin-bottom: 20px;
}
.bulk-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.bulk-sheet-title {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bulk-sheet-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.bulk-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.bulk-meta-item input {
  padding: 5px 8px;
  border: 1.5px solid #94a3b8;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  background: #f8fafc;
}

/* Bulk Grid Table */
.bulk-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  margin-bottom: 14px;
  max-height: 520px;
  overflow-y: auto;
}
.bulk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 750px;
}
.bulk-table th {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  font-weight: 800;
  color: #1e293b;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.bulk-table td {
  border: 1px solid #e2e8f0;
  padding: 2px 4px;
  vertical-align: middle;
}
.bulk-table tr:hover {
  background: #f0fdf4;
}
.bulk-table tr.active-row {
  background: #eff6ff !important;
}

/* Town Yellow Column */
.bulk-town-cell,
.bulk-table td.bulk-town-cell {
  background-color: #fef08a !important;
  color: #713f12;
  font-weight: 700;
  padding-left: 8px;
}

/* Grid Inputs */
.bulk-input {
  width: 100%;
  border: 1px solid transparent;
  padding: 6px 8px;
  font-size: 13px;
  background: transparent;
  outline: none;
  box-sizing: border-box;
  border-radius: 3px;
  font-weight: 500;
}
.bulk-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}
.bulk-amt-input {
  text-align: right;
  font-weight: 800;
  color: #0f172a;
}
.bulk-amt-input:focus {
  color: #1e40af;
}

/* Footer Section */
.bulk-footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
}
.bulk-footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 300px;
  max-width: 600px;
}
.bulk-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bulk-info-lbl {
  font-size: 12.5px;
  font-weight: 800;
  color: #475569;
  min-width: 65px;
}
.bulk-info-val {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  color: #1e293b;
  min-height: 26px;
  font-weight: 600;
}
.bulk-balance-display {
  background: #fee2e2 !important;
  border: 1.5px solid #f87171 !important;
  color: #b91c1c !important;
  font-weight: 900 !important;
  font-size: 14px !important;
  max-width: 180px;
  text-align: right;
  padding: 3px 10px;
}

.bulk-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.bulk-total-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bulk-total-lbl {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}
.bulk-total-box {
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 18px;
  font-weight: 900;
  color: #047857;
  min-width: 160px;
  text-align: right;
}
.bulk-btn-row {
  display: flex;
  gap: 10px;
}
.bulk-btn-save {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 8px 22px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 6px rgba(5,150,105,0.3) !important;
}
.bulk-btn-save-sup {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 8px 22px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3) !important;
}

/* ==========================================================================
   CUSTOMER ACCOUNT SUB-MENU & REPORT DROPDOWN STYLES
   ========================================================================== */
.cust-dropdown-container {
  position: relative;
  display: inline-block;
}
.cust-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 1000;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  min-width: 360px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 6px 0;
  margin-top: 4px;
  animation: dropdownFadeIn 0.15s ease-out;
}
.cust-dropdown-menu.show {
  display: block;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.cust-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.12s ease;
  border-left: 3px solid transparent;
}
.cust-dropdown-item:hover {
  background: #f1f5f9;
  color: #047857;
  border-left-color: #059669;
}
.cust-dropdown-item.active-item {
  background: #ecfdf5;
  color: #047857;
  border-left-color: #059669;
  font-weight: 800;
}
.cust-dropdown-header {
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 4px;
}

/* Customer Reports Views */
.cust-report-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 18px;
  margin-bottom: 20px;
}
.cust-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.cust-report-title {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cust-report-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.cust-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cust-filter-item label {
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
}
.cust-filter-item input,
.cust-filter-item select {
  padding: 6px 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  outline: none;
}
.cust-filter-item input:focus,
.cust-filter-item select:focus {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5,150,105,0.15);
}
.cust-report-kpi-bar,
.cust-kpis-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cust-kpi-box {
  flex: 1;
  min-width: 140px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
}
.cust-kpi-box.primary {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.cust-kpi-box.warning {
  background: #fefce8;
  border-color: #fde047;
}
.cust-kpi-lbl {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}
.cust-kpi-val {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  margin-top: 2px;
}
.cust-kpi-val.ok {
  color: #059669;
}
.cust-kpi-val.bad {
  color: #dc2626;
}

/* ==========================================================================
   STOCK TRANSFERS (INWARD / OUTWARD) & STOCK AUDIT STYLES
   ========================================================================== */
.stock-op-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 860px) {
  .stock-op-grid {
    grid-template-columns: 1fr;
  }
}
.stock-panel {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
}
.stock-panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1.5px solid #f1f5f9;
  padding-bottom: 8px;
}
.stock-stat-box {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
}
.stock-stat-box.system {
  background: #eff6ff;
  border-color: #93c5fd;
}
.stock-stat-box.warning {
  background: #fefce8;
  border-color: #fde047;
}
.stock-stat-box.danger {
  background: #fee2e2;
  border-color: #fca5a5;
}
.stock-stat-lbl {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
}
.stock-stat-num {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  margin-top: 2px;
}
.stock-stat-num.blue {
  color: #1d4ed8;
}
.stock-stat-num.green {
  color: #059669;
}
.stock-stat-num.red {
  color: #dc2626;
}
.audit-input-edit {
  width: 90px;
  padding: 4px 8px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  font-weight: 800;
  text-align: right;
  font-size: 13.5px;
  background: #ffffff;
  outline: none;
}
.audit-input-edit:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}
.audit-diff-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 12px;
}
.audit-diff-badge.matched {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.audit-diff-badge.surplus {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}
.audit-diff-badge.shortage {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
