:root {
  font-family: "IBM Plex Sans", "Segoe UI", "Trebuchet MS", sans-serif;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #f1f6fc;
  --text: #0f172a;
  --muted: #475569;
  --line: #dbe5f0;
  --line-strong: #c8d6e6;
  --topbar: #0b1326;
  --primary: #0f766e;
  --primary-press: #0f5d57;
  --secondary: #1d4ed8;
  --secondary-press: #1e40af;
  --danger: #b91c1c;
  --warning: #b45309;
  --field-bg: #f7fbff;
  --field-border: #cbd7e4;
  --field-border-hover: #b8c8da;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-soft: 0 16px 34px rgba(15, 23, 42, 0.08);
  --shadow-panel: 0 12px 28px rgba(15, 23, 42, 0.06);
  --shadow-floating: 0 22px 44px rgba(15, 23, 42, 0.12);
  --focus-outline: rgba(14, 165, 233, 0.42);
  --focus-ring: 0 0 0 2px rgba(2, 132, 199, 0.18), 0 10px 24px rgba(15, 23, 42, 0.08);
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 46%, #0f766e 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.72) 18%, transparent 40%),
    radial-gradient(circle at 88% 14%, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 28%),
    linear-gradient(180deg, #f7fafc 0%, #edf3f8 42%, #e4edf8 100%);
  overflow: hidden;
}

html {
  height: 100%;
}

body {
  height: 100%;
}

body.modal-lock #appView {
  pointer-events: none;
}

body.modal-lock .receipt-modal:not(.hidden) {
  pointer-events: auto;
}

#appView {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

input,
select,
button {
  border-radius: var(--radius-sm);
  border: 1px solid var(--field-border);
  font: inherit;
}

input,
select {
  background: linear-gradient(180deg, #ffffff 0%, var(--field-bg) 100%);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  transition: border-color 0.16s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input:hover,
select:hover {
  border-color: var(--field-border-hover);
}

input::placeholder {
  color: #64748b;
}

button {
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
  font-weight: 600;
}

button:not(:disabled) {
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  pointer-events: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus-outline);
  outline-offset: 1px;
  border-color: #0284c7;
  box-shadow: var(--focus-ring);
}

button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

.center-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.center-wrap::before,
.center-wrap::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.center-wrap::before {
  width: 340px;
  height: 340px;
  top: -120px;
  left: -90px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16) 0%, rgba(37, 99, 235, 0) 68%);
}

.center-wrap::after {
  width: 320px;
  height: 320px;
  right: -110px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.16) 0%, rgba(15, 118, 110, 0) 68%);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.login-card {
  width: min(408px, calc(100vw - 32px));
  padding: 26px;
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--brand-gradient);
}

.login-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -54px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0) 68%);
  pointer-events: none;
}

.login-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  justify-self: flex-start;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.login-card h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.login-copy p {
  margin: 0;
  max-width: 34ch;
  color: #52657f;
  font-size: 14px;
  line-height: 1.45;
}

.login-trust-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-trust-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d9e4f2;
  background: rgba(255, 255, 255, 0.85);
  color: #486179;
  font-size: 11px;
  font-weight: 700;
}

.login-field {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.login-field span {
  font-size: 11.5px;
  font-weight: 700;
  color: #5c6f86;
  letter-spacing: 0.02em;
}

.login-card input,
.login-card button {
  min-height: 48px;
  padding: 12px 13px;
}

.login-card input {
  width: 100%;
  border-radius: 13px;
  border-color: #d6e1ee;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-card input::placeholder {
  color: #7a8798;
}

.login-card button {
  position: relative;
  z-index: 1;
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--brand-gradient);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 34px rgba(29, 78, 216, 0.24);
}

.login-card button:hover {
  box-shadow: 0 22px 38px rgba(29, 78, 216, 0.28);
}

.login-footnote {
  position: relative;
  z-index: 1;
  margin: -2px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.error {
  color: var(--danger);
  min-height: 18px;
  font-size: 13px;
  line-height: 1.35;
  position: relative;
  z-index: 1;
  margin: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at top left, rgba(46, 128, 255, 0.22), transparent 28%),
    radial-gradient(circle at right center, rgba(20, 184, 166, 0.18), transparent 22%),
    linear-gradient(120deg, #0b1326 0%, #132345 52%, #1d3563 100%);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 14px 26px rgba(7, 13, 28, 0.2);
}

.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar::before {
  left: -48px;
  top: -56px;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(90, 162, 255, 0.34) 0%, rgba(90, 162, 255, 0) 70%);
}

.topbar::after {
  right: -42px;
  bottom: -72px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.22) 0%, rgba(45, 212, 191, 0) 72%);
}

.brand-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  color: #eef6ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 20px rgba(4, 10, 24, 0.2);
}

.brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-block strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.015em;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.topbar-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 4px 10px;
  border-radius: 999px;
}

#userInfo {
  font-size: 12px;
  letter-spacing: 0.01em;
  color: rgba(233, 243, 255, 0.72);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 22px rgba(4, 10, 24, 0.16);
}

.actions button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 13px 8px 11px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 18px rgba(4, 10, 24, 0.18);
}

.actions button::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.actions button[data-nav-kind="import"]::before {
  background:
    linear-gradient(#ffffff, #ffffff) 50% 28% / 2px 5px no-repeat,
    linear-gradient(#ffffff, #ffffff) 50% 60% / 10px 2px no-repeat,
    linear-gradient(135deg, transparent 50%, #ffffff 0) 37% 46% / 5px 5px no-repeat,
    linear-gradient(225deg, transparent 50%, #ffffff 0) 63% 46% / 5px 5px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.actions button[data-nav-kind="inventory"]::before {
  background:
    linear-gradient(#ffffff, #ffffff) 33% 33% / 4px 4px no-repeat,
    linear-gradient(#ffffff, #ffffff) 67% 33% / 4px 4px no-repeat,
    linear-gradient(#ffffff, #ffffff) 33% 67% / 4px 4px no-repeat,
    linear-gradient(#ffffff, #ffffff) 67% 67% / 4px 4px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.actions button[data-nav-kind="print"]::before {
  background:
    linear-gradient(#ffffff, #ffffff) 50% 28% / 10px 2px no-repeat,
    linear-gradient(#ffffff, #ffffff) 50% 46% / 12px 5px no-repeat,
    linear-gradient(#ffffff, #ffffff) 50% 69% / 8px 2px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.actions button[data-nav-kind="pending"]::before {
  background:
    linear-gradient(#ffffff, #ffffff) 32% 34% / 4px 4px no-repeat,
    linear-gradient(#ffffff, #ffffff) 50% 34% / 4px 4px no-repeat,
    linear-gradient(#ffffff, #ffffff) 68% 34% / 4px 4px no-repeat,
    linear-gradient(#ffffff, #ffffff) 50% 64% / 12px 2px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.actions button[data-nav-kind="logout"]::before {
  background:
    linear-gradient(#ffffff, #ffffff) 36% 50% / 2px 10px no-repeat,
    linear-gradient(#ffffff, #ffffff) 60% 50% / 8px 2px no-repeat,
    linear-gradient(135deg, transparent 50%, #ffffff 0) 66% 40% / 5px 5px no-repeat,
    linear-gradient(225deg, transparent 50%, #ffffff 0) 66% 60% / 5px 5px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
}

#openImportProductsBtn {
  border-color: rgba(105, 223, 190, 0.42);
  background: linear-gradient(145deg, rgba(21, 161, 115, 0.86), rgba(10, 112, 82, 0.86));
}
#openPrintSetupBtn {
  border-color: rgba(156, 199, 255, 0.42);
  background: linear-gradient(145deg, rgba(61, 118, 230, 0.88), rgba(29, 78, 216, 0.86));
}
#openInventoryModalBtn {
  border-color: rgba(144, 197, 244, 0.42);
  background: linear-gradient(145deg, rgba(29, 121, 205, 0.88), rgba(19, 92, 163, 0.88));
}
#openPendingReceiptsBtn {
  border-color: rgba(191, 219, 254, 0.36);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
}
#openPendingReceiptsBtn.has-pending {
  border-color: rgba(250, 204, 21, 0.42);
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.12), rgba(245, 158, 11, 0.22));
  color: #fff7db;
}
#logoutBtn {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
}

.runtime-status-banner {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 20px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.runtime-status-banner::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
}

.runtime-status-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.runtime-status-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.runtime-status-detail {
  font-size: 12px;
  line-height: 1.45;
  color: inherit;
  opacity: 0.88;
}

.runtime-status-detail:empty {
  display: none;
}

.runtime-status-banner.is-offline {
  color: #fff7ed;
  background:
    linear-gradient(120deg, rgba(120, 53, 15, 0.98) 0%, rgba(154, 52, 18, 0.95) 52%, rgba(124, 45, 18, 0.96) 100%);
}

.runtime-status-banner.is-reconnecting {
  color: #fefce8;
  background:
    linear-gradient(120deg, rgba(100, 60, 7, 0.98) 0%, rgba(146, 64, 14, 0.95) 48%, rgba(120, 53, 15, 0.95) 100%);
}

.runtime-status-banner.is-online {
  color: #ecfdf5;
  background:
    linear-gradient(120deg, rgba(6, 95, 70, 0.96) 0%, rgba(15, 118, 110, 0.94) 48%, rgba(21, 128, 61, 0.92) 100%);
}

.checkout-receipt-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  flex-wrap: wrap;
  margin: 12px 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(239, 246, 255, 0.96) 100%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.checkout-receipt-bar::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  background: linear-gradient(145deg, #16a34a, #0f766e);
  box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.12);
}

.checkout-receipt-copy {
  display: grid;
  gap: 4px;
  flex: 1 1 320px;
  min-width: min(100%, 280px);
}

.checkout-receipt-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #0f172a;
}

.checkout-receipt-detail {
  font-size: 12px;
  line-height: 1.55;
  color: #48627d;
}

.checkout-receipt-detail:empty {
  display: none;
}

.checkout-receipt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.checkout-receipt-actions button {
  min-width: 112px;
  box-shadow: none;
}

.print-setup-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 13px;
  border: 1px solid #d9e4f2;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 248, 255, 0.96) 100%);
  color: #17324f;
  cursor: pointer;
}

.print-setup-status-card {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 248, 253, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.print-setup-status-card strong {
  font-size: 13px;
  color: #153356;
}

.print-setup-status-card small {
  font-size: 12px;
  line-height: 1.55;
  color: #58708a;
}

.print-setup-status-card.is-on {
  border-color: rgba(13, 148, 136, 0.26);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.98) 0%, rgba(225, 251, 245, 0.98) 100%);
}

.print-setup-status-card.is-on strong {
  color: #0f5f58;
}

.print-setup-status-card.is-on small {
  color: #16646b;
}

.print-setup-status-card.is-off {
  border-color: rgba(59, 130, 246, 0.22);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(238, 245, 255, 0.98) 100%);
}

.print-setup-status-card.is-off strong {
  color: #1d4f91;
}

.print-setup-status-card.is-off small {
  color: #4f6f96;
}

.print-setup-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #0f766e;
}

.print-setup-toggle span {
  display: grid;
  gap: 4px;
}

.print-setup-toggle strong {
  font-size: 13px;
  color: #153356;
}

.print-setup-toggle small {
  font-size: 12px;
  line-height: 1.5;
  color: #58708a;
}

.workspace {
  display: grid;
  grid-template-columns: 210px 1fr 360px;
  gap: 16px;
  padding: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 254, 0.98) 100%);
  border: 1px solid #d7e1ed;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.07);
  min-height: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.mini-btn {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #d4deec;
  background: linear-gradient(180deg, #ffffff 0%, #eff4fb 100%);
  color: #24476f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
#toggleCatalogLabelModeBtn.active {
  border-color: #e3b341;
  background: linear-gradient(145deg, #fff8de 0%, #ffe39a 100%);
  color: #6f4a00;
  box-shadow: 0 10px 18px rgba(153, 102, 0, 0.18);
}
.catalog-nav-btn {
  min-width: 58px;
}

h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #162d4a;
  letter-spacing: 0.2px;
}

.pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f5d57;
  background: #e8f7f2;
  border: 1px solid #caece2;
  padding: 4px 9px;
  border-radius: 999px;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  color: #20477d;
  background: #eef4ff;
  border: 1px solid #d7e3fa;
  padding: 4px 10px;
  border-radius: 999px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.catalog-search-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.search-row input {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--field-border);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
}

.catalog-search-stack > input {
  width: 100%;
}

.search-row input.credit-collection-search {
  grid-column: 1 / -1;
}

.search-row select {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--field-border);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
}

@media (max-width: 520px) {
  .center-wrap {
    padding: 16px;
  }

  .login-card {
    padding: 20px;
    border-radius: 18px;
  }

  .login-card h1 {
    font-size: 27px;
  }

  .login-trust-row {
    gap: 6px;
  }

  .login-trust-pill {
    font-size: 10px;
    padding: 5px 8px;
  }
}

.held-history-controls #heldHistoryFilterInput {
  grid-column: 1 / -1;
}

.held-history-controls {
  grid-template-columns: 1fr 1fr;
}

.credit-history-controls {
  grid-template-columns: minmax(0, 1fr) 150px 150px auto;
  align-items: center;
  padding: 12px;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.credit-history-controls #creditPhoneFilterInput {
  grid-column: 1 / 2;
}

.credit-history-controls #creditScopeSelect,
.credit-history-controls #creditStatusFilterSelect {
  min-width: 0;
}

.credit-history-controls #resetCreditHistoryFiltersBtn {
  justify-self: end;
  white-space: nowrap;
}

.payment-receipt-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}

.payment-receipt-controls #paymentReceiptSearchInput {
  flex: 0 0 240px;
  min-width: 240px;
}

.payment-receipt-controls #paymentReceiptTypeSelect,
.payment-receipt-controls #paymentReceiptStatusSelect,
.payment-receipt-controls #paymentReceiptMethodSelect,
.payment-receipt-controls #paymentReceiptScopeSelect {
  flex: 0 0 116px;
  min-width: 116px;
}

.payment-receipt-controls #resetPaymentReceiptFiltersBtn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.payment-receipt-date-row {
  grid-template-columns: 132px 132px;
  gap: 6px;
  margin-bottom: 6px;
  justify-content: start;
}

.payment-receipt-date-row input {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  padding: 8px 9px;
}

#creditRangeRow {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #e0e8f3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.held-sales-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 8px;
  padding: 2px;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}

.inventory-tabs-bar {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.inventory-tabs-bar .held-tab-btn {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #d4e0ef;
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
  color: #39567a;
  box-shadow: 0 4px 12px rgba(21, 57, 107, 0.05);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.inventory-tabs-bar .held-tab-btn:hover,
.inventory-tabs-bar .held-tab-btn:focus-visible {
  border-color: #8fb4ea;
  color: #163b70;
  box-shadow: 0 8px 18px rgba(21, 57, 107, 0.12);
  outline: none;
}

.inventory-tabs-bar .held-tab-btn.mode-btn-active {
  background: linear-gradient(180deg, #eff7ff 0%, #d8e9ff 100%);
  border-color: #8fb4ea;
  color: #123b77;
  box-shadow: inset 0 0 0 1px rgba(18, 59, 119, 0.08), 0 8px 18px rgba(21, 57, 107, 0.12);
}

.held-tab-btn {
  min-width: 72px;
  padding: 3px 7px;
  border-radius: 7px;
  border-color: transparent;
  background: transparent;
  color: #4a5a70;
  box-shadow: none;
  font-size: 11px;
}

.held-tab-btn.mode-btn-active {
  background: linear-gradient(180deg, #eff7ff 0%, #d6e9ff 100%);
  border-color: #9dbfe9;
  color: #123b77;
  box-shadow: inset 0 0 0 1px rgba(18, 59, 119, 0.08);
}

.held-utility-btn {
  border-color: #d7e2ef;
  background: linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
  color: #506175;
  box-shadow: none;
}

.held-utility-btn:hover {
  border-color: #c7d6e7;
  background: linear-gradient(180deg, #ffffff 0%, #e6eef7 100%);
}

button[data-action-tone="export"]:not(.primary) {
  border-color: #d2dff3;
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  color: #1f4f8d;
}

button[data-action-tone="export"]:not(.primary):hover {
  border-color: #c0d3ee;
  background: linear-gradient(180deg, #ffffff 0%, #e5f0ff 100%);
}

button[data-action-tone="print"]:not(.primary) {
  border-color: #e8d7b8;
  background: linear-gradient(180deg, #fffdf8 0%, #fff0cf 100%);
  color: #8a5718;
}

button[data-action-tone="print"]:not(.primary):hover {
  border-color: #deca9f;
  background: linear-gradient(180deg, #fffdf8 0%, #ffe7b9 100%);
}

button[data-action-tone="view"]:not(.primary) {
  border-color: #d6e2f8;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  color: #214c84;
}

button[data-action-tone="view"]:not(.primary):hover {
  border-color: #c6d8f4;
  background: linear-gradient(180deg, #ffffff 0%, #e7f0ff 100%);
}

button[data-action-tone="reset"]:not(.primary) {
  border-color: #dbe2ea;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fa 100%);
  color: #5d6d80;
}

button[data-action-tone="reset"]:not(.primary):hover {
  border-color: #cfd8e2;
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
}

button[data-action-tone="close"]:not(.primary) {
  border-color: #d7e2ef;
  background: linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
  color: #506175;
}

button[data-action-tone="close"]:not(.primary):hover {
  border-color: #c7d6e7;
  background: linear-gradient(180deg, #ffffff 0%, #e6eef7 100%);
}

.catalog-search-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.catalog-search-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.catalog-search-copy strong {
  color: #173a6b;
  font-size: 13.5px;
  letter-spacing: 0.15px;
}

.catalog-search-copy small {
  color: #5a6d84;
  font-size: 11.5px;
}

.catalog-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.catalog-search-btn {
  min-height: 34px;
  min-width: 124px;
  text-align: center;
}

.catalog-search-btn.secondary {
  border-color: #d7e1ef;
  background: linear-gradient(145deg, #ffffff 0%, #eef3fb 100%);
  color: #284d83;
  box-shadow: none;
}

.catalog-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.categories-panel,
.checkout-panel {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.category-list {
  display: grid;
  gap: 7px;
}

.category-list button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 0;
  border: 1px solid #d9e3ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
  color: #4a5b70;
  cursor: pointer;
  box-shadow: none;
}

.category-list button.active {
  border-color: #c7d8f3;
  background: linear-gradient(180deg, #f7fbff 0%, #eaf2ff 100%);
  color: #163c76;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #3b82f6, 0 10px 18px rgba(59, 130, 246, 0.08);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 2px 30px 1px;
  scroll-padding-bottom: 28px;
}

.catalog-load-more-bar {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2eaf5;
  background: linear-gradient(180deg, rgba(243, 248, 255, 0.9) 0%, rgba(243, 248, 255, 0.98) 100%);
}

.catalog-load-more-bar .load-more-btn {
  width: 100%;
}

.product-grid-spacer {
  grid-column: 1 / -1;
  height: 0;
  pointer-events: none;
}

.product-grid-note {
  grid-column: 1 / -1;
  border: 1px dashed #bfd2ea;
  background: #eef5ff;
  color: #1d4c86;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.load-more-btn {
  width: 100%;
  padding: 9px 11px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  border: 1px dashed #b8c9e5;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #e8f1ff 100%);
  color: #1d4c86;
  font-weight: 700;
  cursor: pointer;
}

.load-more-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.product-grid-load-more {
  grid-column: 1 / -1;
  margin-bottom: 10px;
  scroll-margin-bottom: 28px;
}

.product-card {
  border: 1px solid #d8e4ef;
  border-radius: 14px;
  padding: 11px 12px 12px;
  min-height: 116px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
  display: grid;
  align-content: start;
  gap: 5px;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(15, 118, 110, 0.28), rgba(37, 99, 235, 0.06));
}

.product-card div {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.35;
  min-height: 0;
  color: #142b46;
  word-break: break-word;
}

.product-card small {
  display: block;
  color: #61748b;
  margin-top: 0;
  font-size: 11px;
  line-height: 1.35;
  min-height: 29px;
  word-break: break-word;
}

.product-card strong {
  display: block;
  color: #0f4b84;
  margin-top: auto;
  padding-top: 4px;
  font-size: 15px;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #bccedf;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.1);
}

.catalog-panel.catalog-label-mode .product-card,
.product-card.product-card-label-mode {
  border-color: #e3c879;
  background: linear-gradient(180deg, #fffef6 0%, #fff5d8 100%);
  box-shadow: 0 14px 24px rgba(140, 92, 10, 0.12);
}

.catalog-panel.catalog-label-mode .product-card:hover,
.product-card.product-card-label-mode:hover {
  border-color: #d39a1d;
}

.muted {
  color: var(--muted);
}

.empty-state {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 24px 18px 20px;
  border: 1px solid #d7e3f2;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(67, 114, 188, 0.1), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: #5a6d84;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 14px 24px rgba(17, 53, 104, 0.04);
}

.empty-state > * {
  position: relative;
  z-index: 1;
}

.empty-state::before {
  content: "";
  z-index: 0;
  width: 74px;
  height: 56px;
  border-radius: 18px;
  transform: rotate(-7deg);
  background:
    linear-gradient(90deg, rgba(91, 146, 231, 0.92) 0 54%, transparent 0) 15px 14px / 44px 4px no-repeat,
    linear-gradient(90deg, rgba(205, 219, 239, 0.98) 0 76%, transparent 0) 15px 25px / 40px 3px no-repeat,
    linear-gradient(90deg, rgba(205, 219, 239, 0.98) 0 66%, transparent 0) 15px 34px / 34px 3px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(235, 243, 255, 0.98) 100%);
  border: 1px solid #d6e2f2;
  box-shadow:
    0 18px 30px rgba(18, 58, 119, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.empty-state::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 28px;
  height: 28px;
  top: calc(50% - 26px);
  left: calc(50% + 6px);
  border-radius: 10px;
  border: 3px solid rgba(255, 255, 255, 0.94);
  background:
    radial-gradient(circle at 40% 38%, rgba(255, 255, 255, 0.54) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.18);
}

.empty-state-compact {
  min-height: 82px;
  padding: 14px 12px;
  border-radius: 12px;
}

.empty-state-compact::before {
  width: 58px;
  height: 44px;
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(91, 146, 231, 0.92) 0 50%, transparent 0) 12px 11px / 34px 3px no-repeat,
    linear-gradient(90deg, rgba(205, 219, 239, 0.98) 0 76%, transparent 0) 12px 19px / 30px 3px no-repeat,
    linear-gradient(90deg, rgba(205, 219, 239, 0.98) 0 62%, transparent 0) 12px 27px / 24px 3px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(235, 243, 255, 0.98) 100%);
}

.empty-state-compact::after {
  width: 20px;
  height: 20px;
  top: calc(50% - 18px);
  left: calc(50% + 8px);
  border-radius: 8px;
}

.empty-state-title {
  max-width: 28ch;
  font-size: 13.5px;
  font-weight: 800;
  color: #173a6b;
  letter-spacing: 0.01em;
}

.empty-state-hint {
  max-width: 34ch;
  font-size: 12px;
  line-height: 1.45;
}

.low {
  display: inline-block;
  justify-self: flex-start;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff4db;
  font-size: 11px;
  color: #8a4f00;
  font-weight: 700;
}

.cart-lines {
  max-height: 368px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
  margin: 4px 0 6px;
}

.quick-add {
  border: 1px solid #dbe4ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}
.customer-box {
  border: 1px solid #dbe4ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}
.customer-box label {
  font-size: 11.5px;
  font-weight: 600;
  color: #5b6f86;
}
.customer-box input {
  padding: 10px 11px;
}

.customer-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.quick-add label {
  font-size: 11.5px;
  font-weight: 600;
  color: #5b6f86;
}

.quick-info {
  color: #49627b;
  min-height: 16px;
}

.quick-add input {
  padding: 10px 11px;
}

.quick-results {
  border: 1px solid #cfd9e5;
  border-radius: 10px;
  background: #ffffff;
  max-height: 280px;
  overflow: auto;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.quick-result-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e9eff7;
  border-radius: 0;
  padding: 8px 10px;
  text-align: left;
  background: #ffffff;
  display: grid;
  gap: 3px;
  cursor: pointer;
}

.quick-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.quick-result-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.quick-result-head {
  display: grid;
  gap: 2px;
}

.quick-result-alias {
  font-size: 10px;
  color: #64748b;
  line-height: 1.25;
}

.quick-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.quick-result-meta-secondary {
  gap: 4px;
}

.quick-result-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #d8e2ef;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  font-size: 10px;
  line-height: 1.2;
}

.quick-result-tag-plain {
  gap: 0;
}

.quick-result-tag-label {
  font-weight: 700;
  color: #0f172a;
}

.quick-result-tag-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quick-result-tag-part {
  background: #e8f0ff;
  border-color: #bfd2ff;
}

.quick-result-tag-brand {
  background: #eefaf3;
  border-color: #cbead7;
}

.quick-result-tag-genuine {
  background: #fff7d6;
  border-color: #f1df92;
}

.quick-result-tag-oem {
  background: #e8f2ff;
  border-color: #bfd6ff;
}

.quick-result-tag-local {
  background: #f4ecff;
  border-color: #dbc7ff;
}

.quick-result-tag-fitment {
  background: #f5f7fb;
  border-color: #d8e0ec;
}

.quick-result-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 5px;
}

.quick-result-stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.quick-result-price {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.quick-result-stock-ok {
  background: #dcfce7;
  color: #166534;
}

.quick-result-stock-low {
  background: #fef3c7;
  color: #92400e;
}

.quick-result-stock-out {
  background: #fee2e2;
  color: #991b1b;
}

.quick-result-add-btn {
  padding: 5px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.quick-result-add-btn:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.quick-result-item:last-child {
  border-bottom: 0;
}

.quick-result-item strong {
  font-size: 13px;
  color: var(--text);
}

.quick-result-item.active,
.quick-result-item:hover {
  background: #eaf3ff;
}

.quick-add-row {
  display: grid;
  grid-template-columns: minmax(34px, 40px) minmax(90px, 1fr) minmax(34px, 40px) minmax(108px, auto);
  gap: 8px;
  align-items: center;
}

.quick-add-row button {
  padding: 9px 12px;
  border: 1px solid var(--secondary);
  background: linear-gradient(180deg, #3b82f6 0%, var(--secondary) 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(29, 78, 216, 0.24);
}

#quickAddBtn {
  min-width: 108px;
  white-space: nowrap;
}

.quick-add-row .qty-step {
  padding: 9px 0;
  border: 1px solid #c3d4ef;
  background: linear-gradient(180deg, #f5f9ff 0%, #dfeeff 100%);
  color: #123a7a;
}

.line {
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  padding: 9px;
  background: #fbfdff;
}

.line-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.line-head > * {
  min-width: 0;
}

.credit-card-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.credit-card-main strong,
.credit-card-main small,
.credit-card-subline {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.credit-card-subline {
  color: #60758f;
}

.held-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.held-age {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #cfe2ff;
  background: #eef5ff;
  color: #184a8b;
  font-size: 11px;
  font-weight: 700;
}
.held-age.warn {
  border-color: #f0d18b;
  background: #fff5dc;
  color: #8a5a00;
}
.held-age.stale {
  border-color: #efb2b2;
  background: #fff0f0;
  color: #9c1f1f;
}

.line-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.line-actions button {
  padding: 4px 8px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.row.payment-row {
  grid-template-columns: 1fr 1fr 1fr;
  padding: 6px;
  border: 1px solid #d9e3ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.row.compact {
  align-items: center;
}

.row.compact label {
  grid-column: 1 / -1;
  font-size: 11.5px;
  font-weight: 600;
  color: #5b6f86;
}

.row select,
.row input,
.row button {
  padding: 9px;
}

.row button.active {
  background: #e5f0ff;
  border-color: #bfd5ff;
  color: #123a7a;
  font-weight: 600;
}

.row.payment-row button {
  padding: 10px 9px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.16px;
  box-shadow: none;
}

.receipt-preference-row {
  grid-template-columns: 1fr 1fr 1fr;
  align-items: stretch;
  padding: 10px;
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.receipt-preference-row label {
  grid-column: 1 / -1;
}

.receipt-preference-row button {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d4e0ec;
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
  color: #294567;
  font-weight: 700;
  box-shadow: none;
}

.receipt-preference-row button.active {
  color: #fff;
  border-color: #0f766e;
  background: linear-gradient(180deg, #14948a 0%, #0f766e 100%);
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.2);
}

.receipt-preference-meta {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.receipt-preference-hint {
  font-size: 12px;
  line-height: 1.5;
  color: #59728a;
  margin-top: 0;
}

#cashBtn {
  border-color: #cfe7db;
  background: #f7fcf9;
  color: #176449;
}

#upiBtn {
  border-color: #d5e1fb;
  background: #f7faff;
  color: #24509a;
}

#creditBtn {
  border-color: #ead9b5;
  background: #fffaf3;
  color: #8a5312;
}

.row.payment-row button.active {
  color: #ffffff;
  border-width: 1px;
}

#cashBtn.active {
  border-color: #0f8054;
  background: linear-gradient(180deg, #1aa36f 0%, #0f7b53 100%);
  box-shadow: 0 10px 18px rgba(15, 123, 83, 0.28);
}

#upiBtn.active {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #3f75ff 0%, #1f52da 100%);
  box-shadow: 0 10px 18px rgba(31, 82, 218, 0.28);
}

#creditBtn.active {
  border-color: #b56900;
  background: linear-gradient(180deg, #e6a128 0%, #c27f0a 100%);
  box-shadow: 0 10px 18px rgba(194, 127, 10, 0.28);
}

.totals {
  border: 1px solid #dbe4ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.totals div {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 3px 0;
  color: #51667d;
}

.totals .grand {
  font-weight: 800;
  font-size: 21px;
  color: #0d3d80;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #d8e4f2;
}

.today-summary {
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfdff 0%, #f3f7ff 100%);
  padding: 12px;
  margin-top: 10px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.today-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #66788c;
}

.today-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.today-summary-grid > div {
  border: 1px solid #dde6f3;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}

.today-summary-grid span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #688095;
}

.today-summary-grid strong {
  font-size: 15px;
  color: #123a7a;
}

.primary {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--primary);
  background: linear-gradient(180deg, #12857d 0%, var(--primary) 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.24);
}

.checkout-panel .action-btn:hover {
  border-color: #c4d4e5;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

#clearBtn,
#holdSaleBtn,
#reprintLastBtn,
#openHeldSalesBtn,
#openReturnSaleBtn,
#openSaleHistoryBtn,
#openAccountsBtn,
#openEodBtn,
#openReportsBtn,
#openMoneyReceivedBtn,
#openCashMovementBtn,
#openCreditHistoryBtn,
#openPaymentReceiptsBtn {
  width: 100%;
  padding: 11px 12px;
  margin-top: 0;
  border-radius: 12px;
}

#clearBtn {
  border: 1px solid #efd3cb;
  cursor: pointer;
  background: #fff6f3;
  color: #963722;
  box-shadow: none;
}
#holdSaleBtn,
#reprintLastBtn,
#openHeldSalesBtn,
#openReturnSaleBtn,
#openSaleHistoryBtn,
#openAccountsBtn,
#openEodBtn,
#openReportsBtn {
  border: 1px solid #d2dce8;
  cursor: pointer;
  background: linear-gradient(180deg, #fafdff 0%, #e7f1ff 100%);
}
.checkout-panel .action-btn {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.1px;
  color: #334a62;
  border-color: #d9e2ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: none;
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.checkout-action-groups {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.checkout-action-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dee6f0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.checkout-action-group-danger {
  background: linear-gradient(180deg, #fffdfb 0%, #fff6f1 100%);
  border-color: #efd9d1;
}

.checkout-action-heading {
  color: #71859b;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 2px;
}

.checkout-action-group .action-btn {
  margin-top: 0;
}
.checkout-panel .action-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
.checkout-panel .action-btn:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.52);
  box-shadow:
    0 0 0 2px rgba(2, 132, 199, 0.24),
    0 10px 18px rgba(15, 23, 42, 0.16);
}
#reprintLastBtn {
  background: #f6f9fd;
  border-color: #d7e2f0;
  color: #344b68;
  box-shadow: none;
}
#reprintLastBtn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}
#holdSaleBtn {
  background: #eefaf4;
  border-color: #cde8da;
  color: #136447;
  box-shadow: none;
}
#openHeldSalesBtn {
  background: #f2f7ff;
  border-color: #d4e1f7;
  color: #1d467f;
  box-shadow: none;
}
#openReturnSaleBtn {
  background: #fff6f2;
  border-color: #efcfca;
  color: #8a3d29;
  box-shadow: none;
}
#openSaleHistoryBtn {
  background: #f7f9fd;
  border-color: #dde5f0;
  color: #314a68;
  box-shadow: none;
}
#openEodBtn {
  background: #f7f4ff;
  border-color: #dcd3f3;
  color: #4d3c8d;
  box-shadow: none;
}
#openReportsBtn {
  background: #f3fbff;
  border-color: #d3e5ee;
  color: #215466;
  box-shadow: none;
}
#openAccountsBtn {
  background: #fafcff;
  border-color: #dbe3ee;
  color: #334a62;
  box-shadow: none;
}
#openMoneyReceivedBtn {
  border: 1px solid #cde7df;
  cursor: pointer;
  background: #eefaf7;
  color: #156753;
  box-shadow: none;
}
#openCashMovementBtn {
  border: 1px solid #ebddba;
  cursor: pointer;
  background: #fffaf1;
  color: #7b5a12;
  box-shadow: none;
}
#openCreditHistoryBtn {
  border: 1px solid #d4e1f7;
  cursor: pointer;
  background: #f1f7ff;
  color: #1a477e;
  box-shadow: none;
}
#openPaymentReceiptsBtn {
  border: 1px solid #dfd5f3;
  cursor: pointer;
  background: #f8f5ff;
  color: #5c4486;
  box-shadow: none;
}
.held-item {
  border: 1px solid #d7e0eb;
  border-radius: 9px;
  background: #fff;
  padding: 6px 7px;
  display: grid;
  gap: 3px;
}

.held-item small {
  font-size: 11px;
  line-height: 1.25;
}

.held-actions {
  display: flex;
  gap: 6px;
}

.held-actions button {
  flex: 1 1 0;
  padding: 7px 10px;
  font-size: 12px;
}

.held-actions .warn-action {
  background: linear-gradient(180deg, #fff4eb 0%, #ffd8be 100%);
  border-color: #efbc92;
  color: #8a4210;
}

.search-row .mode-btn-active {
  background: linear-gradient(180deg, #eff7ff 0%, #d6e9ff 100%);
  border-color: #9dbfe9;
  color: #123b77;
  box-shadow: inset 0 0 0 1px rgba(18, 59, 119, 0.08);
}

.held-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.held-status-badge.cancelled {
  background: #fff3d7;
  color: #8a5a00;
}

.held-status-badge.expired {
  background: #ffe2e2;
  color: #a12121;
}

.held-status-badge.due {
  background: #e6f4ea;
  color: #21653b;
}

.held-status-badge.overdue {
  background: #ffe2e2;
  color: #a12121;
}

.held-status-badge.settled {
  background: #e9eef5;
  color: #4a5e75;
}

.held-status-badge.reversed {
  background: #fce7e7;
  color: #9f1d1d;
}

.shortcut-foot {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dfe8f3;
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(67, 114, 188, 0.08), transparent 46%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  font-size: 12px;
  line-height: 1.48;
  color: #5b6f87;
}

.utility-shell-note {
  padding: 12px 13px;
  border: 1px solid #d8e4f2;
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(50, 103, 181, 0.13), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 20px rgba(15, 51, 101, 0.05);
  font-size: 12.5px;
  line-height: 1.5;
  color: #4f667f;
}

.utility-shell-note-wide {
  max-width: none;
}

.utility-shell-note-compact {
  padding: 10px 12px;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  background: linear-gradient(120deg, #0b1326 0%, #132345 100%);
  color: #fff;
  padding: 10px 12px;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  max-width: 360px;
  font-size: 14px;
}

.receipt-modal {
  position: fixed;
  inset: 0;
  padding: 20px;
  background: rgba(8, 12, 18, 0.5);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  z-index: 1200;
  overscroll-behavior: contain;
}

#receiptModal {
  z-index: 1300;
}

.receipt-wrap {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 18px;
  border: 1px solid #d8e3ef;
  padding: 14px;
  width: min(94vw, 430px);
  box-shadow: 0 28px 56px rgba(20, 28, 40, 0.22);
  overscroll-behavior: contain;
}

.receipt-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.78), rgba(15, 118, 110, 0.68), rgba(37, 99, 235, 0.24));
  pointer-events: none;
}

.receipt-wrap .panel-head {
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4ebf4;
}

.receipt-wrap .panel-head h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
  color: #142b46;
}

.receipt-wrap .panel-head .badge {
  margin-left: auto;
}

.receipt-preview-wrap {
  width: min(96vw, 560px);
  max-height: 92vh;
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
}

.receipt-preview-meta {
  padding: 11px 12px;
  border: 1px solid #dbe6f2;
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(70, 124, 201, 0.14), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: #5a6d84;
  font-size: 12px;
  line-height: 1.45;
}

.receipt-preview-surface {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #d8e4f0;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(72, 117, 173, 0.12), transparent 38%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(17, 53, 104, 0.05);
}

.receipt-preview-ruler {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6a7f98;
}

.receipt-preview-ruler span:last-child {
  padding: 4px 9px;
  border: 1px solid #d6e2ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #143b71;
  letter-spacing: 0.04em;
}

.receipt-preview-stage {
  display: grid;
  justify-items: center;
  align-content: start;
  padding-bottom: 2px;
}

.receipt-preview-wrap .receipt-actions {
  margin-top: 0;
}

.receipt-preview-wrap .receipt-actions button {
  min-width: 0;
}

#skipReceiptPrintBtn {
  border-color: #d8e2ed;
  background: linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
  color: #42566f;
}

.pending-receipts-wrap {
  width: min(94vw, 760px);
  max-height: 92vh;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.pending-receipts-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.pending-receipt-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe6f2;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(75, 119, 194, 0.1), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 20px rgba(15, 51, 101, 0.05);
}

.pending-receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pending-receipt-head strong {
  font-size: 15px;
  color: #17365f;
}

.pending-receipt-kicker {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7387a0;
}

.pending-receipt-amount {
  font-size: 16px;
  font-weight: 800;
  color: #134f41;
  white-space: nowrap;
}

.pending-receipt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #5b6f87;
}

.pending-receipt-meta span {
  padding: 5px 9px;
  border: 1px solid #d9e4f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.pending-receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-receipt-actions button {
  min-width: 128px;
}

.product-modal-wrap {
  width: min(94vw, 500px);
  max-height: 92vh;
  padding: 16px;
  overflow: auto;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 22px 48px rgba(9, 39, 82, 0.18);
}

.label-qty-wrap {
  width: min(92vw, 420px);
}

.label-qty-preview-name {
  padding: 12px 13px;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(67, 114, 188, 0.12), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 18px rgba(15, 51, 101, 0.05);
  font-size: 18px;
  font-weight: 700;
  color: #123a7a;
  overflow-wrap: anywhere;
}

.label-qty-preview-name::before {
  content: "Selected Product";
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #68819d;
}
.credit-history-wrap {
  width: min(94vw, 700px);
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
  scrollbar-gutter: stable;
}

.money-received-wrap {
  width: min(94vw, 700px);
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  scrollbar-gutter: stable;
}

.payment-receipts-wrap {
  width: min(96vw, 1080px);
  max-height: 90vh;
  padding: 10px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  scrollbar-gutter: stable;
}

.sale-history-wrap {
  width: min(96vw, 1040px);
  max-height: 90vh;
  padding: 10px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  scrollbar-gutter: stable;
}

.sale-history-controls {
  align-items: center;
  padding: 12px;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.sale-history-list {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.sale-history-head,
.sale-history-row {
  display: grid;
  grid-template-columns: 116px minmax(160px, 1.2fr) minmax(110px, 0.8fr) 84px 90px 132px;
  gap: 8px;
  align-items: start;
}

.sale-history-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px 8px;
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 247, 253, 0.98) 100%);
  box-shadow: 0 10px 20px rgba(17, 53, 104, 0.04);
  color: #61758d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sale-history-item {
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 10px 12px;
  min-width: 760px;
  box-shadow: 0 12px 20px rgba(17, 53, 104, 0.04);
}

.sale-history-row {
  cursor: pointer;
}

.sale-history-row:hover,
.sale-history-row:focus-visible {
  outline: none;
  border-radius: 10px;
  background: rgba(229, 239, 255, 0.62);
}

.sale-history-cell {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sale-history-cell span {
  color: #637991;
  font-size: 10.5px;
  line-height: 1.35;
}

.sale-history-cell strong {
  color: #163b70;
  font-size: 12.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.sale-history-cell-qty,
.sale-history-cell-amount {
  justify-items: end;
  text-align: right;
}

.sale-history-cell-amount strong {
  font-size: 15px;
}

.sale-history-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-height: 100%;
}

.sale-history-footer {
  justify-content: space-between;
}

.accounts-wrap {
  width: min(94vw, 920px);
  max-height: 88vh;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 20px 44px rgba(9, 39, 82, 0.16);
}

.accounts-summary-wrap {
  width: min(94vw, 940px);
  max-height: 88vh;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 20px 44px rgba(9, 39, 82, 0.16);
}

.accounts-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.accounts-entry-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 186px;
  padding: 16px;
  border: 1px solid #d8e5f8;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 14px 28px rgba(17, 53, 104, 0.07);
}

.accounts-entry-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, rgba(30, 95, 191, 0.72), rgba(15, 118, 110, 0.42), rgba(30, 95, 191, 0.14));
  pointer-events: none;
}

.accounts-entry-card-head {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e3ebf6;
}

.accounts-entry-card-head strong {
  color: #163b70;
  font-size: 15px;
}

.accounts-entry-card-head span {
  color: #6a7f9c;
  font-size: 12px;
  line-height: 1.45;
}

.accounts-entry-row {
  display: grid;
  gap: 10px;
}

.accounts-entry-row .mini-btn {
  width: 100%;
  justify-content: flex-start;
  min-height: 44px;
  padding-inline: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border-color: #c9daf3;
  color: #214a83;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.06);
}

.accounts-entry-row .mini-btn:hover,
.accounts-entry-row .mini-btn:focus-visible {
  border-color: #92b6e9;
  color: #123b77;
  background: linear-gradient(180deg, #ffffff 0%, #e6f0ff 100%);
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.08);
}

.accounts-type-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.accounts-type-row .mode-btn {
  min-width: 144px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid #d7e3f6;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
  color: #345175;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(17, 53, 104, 0.06);
}

.accounts-type-row .mode-btn:hover,
.accounts-type-row .mode-btn:focus-visible {
  outline: none;
  border-color: #9dbfe9;
  color: #123b77;
  box-shadow: 0 12px 22px rgba(17, 53, 104, 0.11);
}

.accounts-type-row .mode-btn.mode-btn-active {
  background: linear-gradient(180deg, #eff7ff 0%, #d8e9ff 100%);
  border-color: #8fb4ea;
  color: #123b77;
  box-shadow: inset 0 0 0 1px rgba(18, 59, 119, 0.08), 0 12px 22px rgba(17, 53, 104, 0.11);
}

.inventory-shell-note,
.accounts-shell-note,
.statement-shell-note,
#accountsScopeNote {
  padding: 11px 12px;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(70, 124, 201, 0.12), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: #5a6d84;
  font-size: 12px;
  line-height: 1.45;
}

.accounts-summary-list {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #d7e3f6;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(17, 53, 104, 0.06);
}

.accounts-summary-head,
.accounts-summary-row,
.accounts-summary-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 12px;
  align-items: center;
}

.accounts-summary-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #e2ebf7;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 247, 253, 0.98) 100%);
  color: #61758d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.accounts-summary-body {
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.accounts-summary-row {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2fa;
}

.accounts-summary-row-action {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.accounts-summary-row-action:hover {
  background: linear-gradient(180deg, #f9fcff 0%, #f0f6ff 100%);
}

.accounts-summary-row-action:focus-visible {
  outline: none;
  background: linear-gradient(180deg, #f7fbff 0%, #ecf4ff 100%);
  box-shadow: inset 0 0 0 2px rgba(34, 90, 166, 0.18);
}

.accounts-summary-row strong {
  min-width: 0;
  color: #163b70;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.accounts-summary-row span,
.accounts-summary-total strong:last-child {
  justify-self: end;
  color: #163b70;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.accounts-summary-row span {
  min-width: 112px;
  padding: 8px 10px;
  border: 1px solid #dce7f4;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}

.accounts-summary-total {
  padding: 12px 14px;
  border-top: 1px solid #d7e3f6;
  background: linear-gradient(180deg, #f6fbff 0%, #edf5ff 100%);
}

.accounts-summary-total strong {
  color: #123b77;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .accounts-entry-grid {
    grid-template-columns: 1fr;
  }
}

.cash-book-wrap {
  width: min(96vw, 980px);
  max-height: 90vh;
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 20px 44px rgba(9, 39, 82, 0.16);
}

.cash-movement-wrap {
  width: min(96vw, 1120px);
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  gap: 12px;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border: 1px solid #d7e4f4;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(8, 33, 70, 0.18);
}

.cash-book-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.cash-book-controls input {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.cash-movement-shell {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 14px;
  overflow: hidden;
}

.cash-movement-form-card,
.cash-movement-register-card {
  min-height: 0;
  border: 1px solid #d7e4f4;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 28px rgba(13, 47, 93, 0.08);
  padding: 14px;
}

.cash-movement-form-card {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 12px;
  border-color: #cfe0f6;
}

.cash-movement-register-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  background: linear-gradient(180deg, #fcfeff 0%, #f2f7ff 100%);
}

.cash-movement-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dce8f5;
}

.cash-movement-card-head strong {
  display: block;
  color: #163b70;
  font-size: 15px;
  margin-bottom: 3px;
  letter-spacing: 0.01em;
}

.cash-movement-card-head small {
  display: block;
  color: #60758f;
  font-size: 12px;
  line-height: 1.45;
}

.cash-movement-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cash-movement-field {
  display: grid;
  gap: 6px;
}

.cash-movement-field span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #46617e;
}

.cash-movement-field input,
.cash-movement-field select {
  margin: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9d8ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.cash-movement-field-wide {
  grid-column: 1 / -1;
}

.cash-movement-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cash-movement-presets .mini-btn {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border-color: #c8daf7;
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  box-shadow: 0 8px 18px rgba(18, 58, 122, 0.08);
}

.cash-movement-presets .mini-btn.active {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #dbeafe 0%, #b7d2fb 100%);
  color: #0f172a;
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.18);
}

.cash-movement-preset-hint {
  font-size: 12px;
  line-height: 1.45;
  min-height: 44px;
  border: 1px solid #d7e6f7;
  border-left: 4px solid #1f5fbf;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  padding: 10px 12px;
  color: #51657f;
  display: flex;
  align-items: center;
}

.cash-book-list {
  min-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.cash-book-row {
  position: relative;
  border: 1px solid #dbe5f1;
  border-radius: 15px;
  padding: 12px 13px;
  background:
    radial-gradient(circle at top left, rgba(67, 114, 188, 0.09), transparent 46%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  display: grid;
  gap: 7px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 20px rgba(17, 53, 104, 0.04);
}

.cash-book-row::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.72), rgba(15, 118, 110, 0.44));
  opacity: 0.88;
}

.cash-book-row .line-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.cash-book-ref {
  font-size: 11px;
  font-weight: 700;
  color: #1d4ed8;
}

.cash-book-amount {
  font-size: 13px;
  font-weight: 700;
  color: #0b1f3a;
  white-space: nowrap;
}

.cash-book-amount.out {
  color: #b42318;
}

.cash-book-amount.in {
  color: #0f766e;
}

.cash-book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 11px;
  color: #5f738c;
}

.cash-book-running {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 7px;
  border-top: 1px dashed #d7e4f4;
  font-size: 11px;
  font-weight: 700;
  color: #3d5672;
}

.cash-movement-list.payment-receipts-list {
  min-height: 0;
  max-height: none;
  height: 100%;
  border: 1px solid #dce8f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 8px;
}

.cash-movement-wrap .cash-movement-footer {
  position: static;
  bottom: auto;
  margin-top: 0;
  padding-top: 2px;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(3, auto);
  gap: 8px;
  align-items: center;
}

.cash-movement-wrap .cash-movement-footer button {
  flex: 0 0 auto;
  min-width: 108px;
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cash-movement-footer .primary {
  min-width: 120px;
  justify-self: stretch;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
}

#cashMovementModal #printCashMovementBtn,
#cashMovementModal #openCashBookBtn {
  border: 1px solid #c8daf7;
  background: linear-gradient(180deg, #ffffff 0%, #e9f3ff 100%);
  color: #1b4e8d;
  box-shadow: 0 8px 18px rgba(27, 78, 141, 0.1);
}

#cashMovementModal #closeCashMovementBtn {
  border: 1px solid #d6dde8;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  color: #4f5f73;
  box-shadow: 0 8px 16px rgba(79, 95, 115, 0.08);
}

#cashMovementModal #printCashMovementBtn:hover,
#cashMovementModal #openCashBookBtn:hover,
#cashMovementModal #closeCashMovementBtn:hover {
  transform: translateY(-1px);
}

#cashMovementModal #printCashMovementBtn:focus-visible,
#cashMovementModal #openCashBookBtn:focus-visible,
#cashMovementModal #closeCashMovementBtn:focus-visible {
  outline: 3px solid rgba(31, 95, 191, 0.24);
  outline-offset: 1px;
}

.eod-wrap {
  width: min(96vw, 940px);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 20px 44px rgba(9, 39, 82, 0.16);
}

.eod-business-row {
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid #d8e4f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.eod-reconcile-card {
  border: 1px solid #d7e4f4;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(67, 114, 188, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 24px rgba(17, 53, 104, 0.05);
}

.eod-reconcile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.eod-reconcile-head strong {
  display: block;
  color: #163b70;
  font-size: 15px;
  margin-bottom: 2px;
}

.eod-reconcile-head small {
  color: #60758f;
  font-size: 12px;
  line-height: 1.45;
}

.eod-reconcile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#eodExpectedCashInput,
#eodDifferenceInput {
  font-weight: 700;
  color: #163b70;
  background: linear-gradient(180deg, #fbfdff 0%, #eef5ff 100%);
}

.eod-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #dde7f4;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, #ffffff 100%);
}

.eod-footer button {
  flex: 0 0 auto;
  min-width: 118px;
}

#eodReportBox {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#cashMovementList > .empty-state {
  min-height: 180px;
}

#cashBookList > .empty-state {
  min-height: 220px;
}

#eodReportBox > .empty-state {
  min-height: 220px;
}

#eodReportBox .held-item {
  position: relative;
  border: 1px solid #d8e4f2;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(67, 114, 188, 0.1), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  padding: 13px 14px;
  gap: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(17, 53, 104, 0.05);
}

#eodReportBox .held-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.78), rgba(15, 118, 110, 0.48));
  opacity: 0.88;
}

.eod-report-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e1ebf6;
}

.eod-report-title-row strong {
  font-size: 15px;
  color: #163b70;
}

.eod-report-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(238, 244, 255, 0.96);
  color: #1c4f92;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eod-report-inline-note {
  padding: 10px 12px;
  border: 1px dashed #d7e4f4;
  border-radius: 12px;
  background: #f9fbff;
  color: #60758f;
  font-size: 12px;
  line-height: 1.45;
}

.eod-audit-list {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.eod-audit-item {
  border: 1px solid #dbe7f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  padding: 11px 12px;
  display: grid;
  gap: 6px;
}

.cash-movement-register-card .payment-receipts-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cash-movement-register-card .payment-receipts-summary > div {
  padding: 8px 10px;
  border-radius: 12px;
}

#cashMovementList .cash-book-row,
#cashMovementList .payment-receipt-row {
  border-radius: 14px;
  border-color: #d8e4f4;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 6px 14px rgba(14, 41, 76, 0.05);
}

.inventory-wrap {
  width: min(96vw, 1120px);
  max-height: 92vh;
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 20px 46px rgba(10, 39, 80, 0.16);
}

.inventory-tab {
  min-height: 0;
  display: grid;
  gap: 12px;
  overflow: hidden;
}

#inventoryPurchaseTab,
#inventorySupplierPaymentsTab,
#inventorySuppliersTab,
#inventoryAnalyticsTab {
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  align-content: start;
}

#inventoryPurchaseTab {
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  scrollbar-gutter: stable both-edges;
  padding-right: 6px;
}

#inventoryPurchaseTab > * {
  flex: 0 0 auto;
}

#inventoryPurchaseTab .inventory-grid {
  overflow: visible;
  min-height: max-content;
  align-items: stretch;
  grid-auto-rows: max-content;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 12px;
}

#inventoryPurchaseTab .inventory-purchase-entry-grid {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

#inventoryPurchaseTab .inventory-purchase-entry-grid > .inventory-supplier-master-panel {
  flex: 0 0 360px;
}

#inventoryPurchaseTab .inventory-purchase-entry-grid > .inventory-purchase-line-block {
  flex: 1 1 auto;
}

#inventoryPurchaseTab #inventoryLinesList {
  height: clamp(220px, 28vh, 300px);
  min-height: 220px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: #7fa4d9 #eaf2ff;
  padding: 8px;
  border-radius: 12px;
  border-color: #d4e1f1;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#inventoryPurchaseTab .inventory-purchase-line-block {
  display: flex;
  flex-direction: column;
  align-content: start;
  padding: 12px;
  gap: 6px;
}

#inventoryPurchaseTab .inventory-supplier-master-panel {
  display: flex;
  flex-direction: column;
  align-content: start;
  padding: 12px;
  gap: 8px;
}

#inventoryPurchaseTab .inventory-supplier-master-panel,
#inventoryPurchaseTab .inventory-purchase-line-block {
  border-radius: 14px;
  border-color: #d2deee;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 8px 22px rgba(19, 58, 122, 0.06);
  min-height: max-content;
}

#inventoryPurchaseTab .inventory-supplier-master-panel h4,
#inventoryPurchaseTab .inventory-purchase-line-block h4 {
  padding-bottom: 6px;
  border-bottom: 1px solid #e3ebf6;
  font-size: 14px;
  color: #143b78;
}

#inventoryPurchaseTab .inventory-input-action-row,
#inventoryPurchaseTab .inventory-pair-row,
#inventoryPurchaseTab .inventory-bill-row,
#inventoryPurchaseTab .inventory-line-entry-row {
  gap: 8px;
}

#inventoryPurchaseTab #inventoryProductPickInfo {
  padding: 6px 9px;
  border: 1px solid #deebfa;
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fbff 0%, #eff5ff 100%);
  color: #4f6786;
  font-size: 12px;
}

#inventoryPurchaseTab #inventoryLinesList::-webkit-scrollbar {
  width: 12px;
}

#inventoryPurchaseTab #inventoryLinesList::-webkit-scrollbar-track {
  background: #eaf2ff;
  border-left: 1px solid #d7e4f4;
  border-radius: 10px;
}

#inventoryPurchaseTab #inventoryLinesList::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #94b6e8 0%, #6f96cf 100%);
  border: 2px solid #eaf2ff;
  border-radius: 10px;
}

#inventoryPurchaseTab #inventoryLinesList::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7ea6df 0%, #5f88c6 100%);
}

#inventoryPurchaseTab .inventory-line-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(18, 59, 119, 0.05);
}

#inventoryPurchaseTab .inventory-line-meta {
  color: #5a6f88;
  line-height: 1.45;
}

#inventoryPurchaseTab #inventoryLinesTotal {
  border-radius: 12px;
  border-color: #cfe0f5;
  background: linear-gradient(180deg, #eff6ff 0%, #ddeafb 100%);
  box-shadow: 0 8px 18px rgba(18, 59, 119, 0.08);
  margin-top: 0;
}

#inventoryPurchaseTab .inventory-actions {
  padding-top: 2px;
}

#inventorySuppliersTab {
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.inventory-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  align-content: start;
}

.inventory-block {
  border: 1px solid #d7e4f4;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  box-shadow: 0 12px 24px rgba(17, 53, 104, 0.05);
}

.inventory-block h4 {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e3ebf6;
  font-size: 15px;
  color: #123a7a;
}

.inventory-row {
  display: grid;
  gap: 6px;
}

.inventory-two {
  grid-template-columns: minmax(0, 1fr) auto;
}

.inventory-input-action-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.inventory-pair-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-bill-row {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 180px);
}

.inventory-three {
  grid-template-columns: minmax(88px, 120px) minmax(98px, 130px) auto;
  align-items: center;
}

.inventory-line-entry-row {
  grid-template-columns: minmax(88px, 120px) minmax(108px, 150px) minmax(120px, 136px);
  align-items: center;
  justify-content: start;
}

.inventory-line-entry-row .mini-btn {
  width: 100%;
}

.inventory-adjust-row {
  grid-template-columns: minmax(0, 1fr) minmax(72px, 100px) minmax(120px, 150px) auto;
  align-items: center;
}

.inventory-movement-filters {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 150px) minmax(120px, 132px) minmax(120px, 132px) auto;
  align-items: center;
}

.inventory-register-filters {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) minmax(120px, 132px) minmax(120px, 132px) auto;
  align-items: center;
}

.inventory-analytics-filters {
  grid-template-columns: minmax(180px, 240px) minmax(150px, 180px) minmax(120px, 132px) minmax(120px, 132px) auto auto;
  align-items: center;
}

.inventory-movement-filters,
.inventory-register-filters,
.inventory-analytics-filters,
.cash-book-controls {
  padding: 12px;
  border: 1px solid #d9e4f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 10px 24px rgba(17, 53, 104, 0.06);
}

.inventory-register-actions {
  justify-content: flex-end;
  padding-top: 10px;
  margin-top: 0;
  border-top: 1px solid #e2ebf6;
}

#inventorySupplierSelect,
#inventorySupplierSearchInput,
#inventorySupplierNameInput,
#inventorySupplierPhoneInput,
#inventoryInvoiceNoInput,
#inventoryInvoiceDateInput,
#inventoryPurchaseNoteInput,
#inventoryProductSearchInput,
#inventoryQtyInput,
#inventoryUnitCostInput,
#inventoryAdjustProductInput,
#inventoryAdjustQtyInput,
#inventoryAdjustTypeSelect,
#inventoryAdjustNoteInput,
#inventoryMovementSearchInput,
#inventoryMovementViewSelect,
#inventoryPurchaseListGroupSelect,
#inventoryMovementTypeSelect,
#inventoryMovementFromInput,
#inventoryMovementToInput,
#inventoryHistorySearchInput,
#inventoryHistorySupplierSelect,
#inventoryHistoryFromInput,
#inventoryHistoryToInput,
#inventoryReturnSearchInput,
#inventoryReturnSupplierSelect,
#inventoryReturnFromInput,
#inventoryReturnToInput,
#inventorySupplierPaymentSearchInput,
#inventorySupplierPaymentSupplierSelect,
#inventorySupplierPaymentEntrySupplierSelect,
#inventorySupplierPaymentDateInput,
#inventorySupplierPaymentModeSelect,
#inventorySupplierPaymentTypeSelect,
#inventorySupplierPaymentFromInput,
#inventorySupplierPaymentToInput,
#inventorySupplierPaymentAmountInput,
#inventorySupplierPaymentReferenceInput,
#inventorySupplierPaymentNoteInput,
#inventorySupplierMasterSearchInput,
#inventorySupplierMasterNameInput,
#inventorySupplierMasterPhoneInput,
#inventorySupplierMasterGstinInput,
#inventorySupplierHistorySearchInput,
#inventorySupplierHistoryTypeSelect,
#inventorySupplierHistoryFromInput,
#inventorySupplierHistoryToInput,
#inventoryAnalyticsSupplierSelect,
#inventoryAnalyticsFromInput,
#inventoryAnalyticsToInput {
  padding: 9px 10px;
  border: 1px solid #cfd9e5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

#inventorySupplierMasterAddressInput {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid #cfd9e5;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border-radius: 12px;
  font: inherit;
}

#inventorySupplierSelect,
#inventoryHistorySupplierSelect,
#inventoryReturnSupplierSelect,
#inventorySupplierPaymentSupplierSelect,
#inventorySupplierPaymentEntrySupplierSelect,
#inventoryAnalyticsSupplierSelect {
  width: 100%;
  min-height: 42px;
  font-size: 14px;
  line-height: 1.35;
}

.inventory-placeholder-note,
.inventory-empty-state {
  border: 1px dashed #c9d8eb;
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef5ff 100%);
  color: #4b6078;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

#inventoryProductSearchList {
  display: grid;
  align-content: start;
  min-height: 46px;
  max-height: 170px;
}

.inventory-lines-list {
  min-height: 140px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #d7e4f4;
  border-radius: 10px;
  background: #f8fbff;
  padding: 6px;
  display: grid;
  gap: 6px;
  overscroll-behavior: contain;
}

#inventoryReturnProductList {
  display: grid;
  align-content: start;
  min-height: 46px;
  max-height: 170px;
}

.inventory-return-mode-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.inventory-return-entry-shell {
  display: block;
  margin-bottom: 14px;
}

.inventory-return-entry-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: max-content;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #d9e3f1;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 20px rgba(17, 52, 96, 0.06);
}

.inventory-return-linked-detail {
  display: grid;
  gap: 8px;
}

.inventory-return-linked-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.inventory-return-linked-placeholder {
  border: 1px dashed #c7d8ec;
  border-radius: 9px;
  padding: 12px;
  background: #f8fbff;
  color: #58708b;
  font-size: 12px;
}

.inventory-supplier-payment-bills {
  margin-top: 12px;
  border: 1px solid #d7e4f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.inventory-supplier-payment-open-bills {
  min-height: 180px;
  max-height: 320px;
}

.inventory-supplier-payment-bills .inventory-return-register-head h4 {
  margin-bottom: 2px;
}

.inventory-supplier-payment-bills .inventory-return-register-head p {
  margin: 0;
}

.inventory-supplier-payment-bill-item {
  gap: 8px;
}

.inventory-supplier-payment-bill-amount {
  min-width: 110px;
  text-align: right;
  font-weight: 700;
  color: #0f5132;
}

.inventory-supplier-payment-bill-row {
  align-items: stretch;
}

.inventory-supplier-payment-bill-row input {
  min-width: 0;
}

.inventory-supplier-payment-bill-meta {
  display: grid;
  align-content: center;
  justify-items: end;
  border: 1px solid #d7e4f4;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
  min-width: 120px;
}

.inventory-supplier-payment-bill-meta span {
  font-size: 11px;
  color: #5e7490;
}

.inventory-supplier-payment-bill-meta strong {
  font-size: 14px;
  color: #0f172a;
}

.inventory-line-item {
  border: 1px solid #d6e1ef;
  border-radius: 9px;
  background: #fff;
  padding: 7px 8px;
  display: grid;
  gap: 4px;
}

.inventory-line-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.inventory-line-head strong {
  font-size: 13px;
  color: #123a7a;
  overflow-wrap: anywhere;
}

.inventory-line-meta {
  font-size: 12px;
  color: #4e617a;
}

.inventory-line-remove {
  min-width: 64px;
  padding: 5px 8px;
}

.inventory-total-row {
  border: 1px solid #d7e4f4;
  background: linear-gradient(180deg, #eff6ff 0%, #ddeafb 100%);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  color: #123a7a;
  box-shadow: 0 10px 18px rgba(18, 59, 119, 0.08);
}

.inventory-actions {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid #e2ebf6;
}

.inventory-adjustment-block {
  margin-top: 0;
}

.inventory-movement-list {
  min-height: 260px;
  max-height: 62vh;
}

.inventory-movement-item {
  border: 1px solid #d7e0eb;
  border-radius: 9px;
  background: #fff;
  padding: 7px 8px;
  display: grid;
  gap: 4px;
}

.inventory-supplier-master-grid {
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  overflow: visible;
}

#inventorySuppliersTab .inventory-supplier-master-grid {
  height: auto;
  min-height: 0;
  align-items: start;
  align-content: start;
}

.inventory-supplier-master-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.inventory-supplier-detail-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: auto;
  align-self: start;
  min-height: max-content;
  overflow: visible;
  padding: 12px;
  border-radius: 16px;
  border-color: #cfddf0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 24px rgba(20, 58, 118, 0.06);
}

.inventory-supplier-master-shell {
  padding: 12px;
  gap: 10px;
  border-radius: 16px;
  border-color: #cfddf0;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 24px rgba(20, 58, 118, 0.05);
}

.inventory-pane-head {
  display: grid;
  gap: 4px;
}

.inventory-pane-head h4,
.inventory-supplier-card-head h4,
.inventory-supplier-activity-head h4 {
  margin: 0;
  font-size: 14px;
  color: #153c78;
}

.inventory-pane-head p,
.inventory-supplier-card-head p,
.inventory-supplier-activity-head p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #5d728b;
}

.inventory-supplier-master-search {
  align-items: center;
}

.inventory-supplier-card-shell,
.inventory-supplier-activity-shell {
  border: 1px solid #d7e3f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(18, 60, 119, 0.06);
}

.inventory-supplier-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.inventory-supplier-card-hero {
  border: 1px solid #d7e4f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef5ff 0%, #dfeafc 100%);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.inventory-supplier-card-hero strong {
  font-size: 16px;
  line-height: 1.25;
  color: #143b78;
  overflow-wrap: anywhere;
}

.inventory-supplier-card-hero span {
  font-size: 12px;
  color: #526984;
  overflow-wrap: anywhere;
}

.inventory-supplier-form-grid {
  display: grid;
  gap: 10px;
}

.inventory-supplier-form-section {
  border: 1px solid #e0e8f3;
  border-radius: 12px;
  background: #fcfdff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.inventory-supplier-form-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #69819d;
}

.inventory-supplier-history-actions {
  padding-top: 2px;
  border-top: 1px solid #e2e9f3;
}

.inventory-analytics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-analytics-grid .inventory-block,
.inventory-return-analytics-grid .inventory-block {
  display: flex;
  flex-direction: column;
}

.inventory-analytics-wide {
  grid-column: 1 / -1;
}

.inventory-analytics-trend {
  display: grid;
  gap: 8px;
}

.inventory-analytics-trend-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.inventory-analytics-trend-head strong {
  font-size: 14px;
  color: #163b70;
}

.inventory-analytics-trend-head small {
  font-size: 11px;
  color: #60758f;
  text-align: right;
}

.inventory-analytics-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inventory-analytics-trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #3b5475;
}

.inventory-analytics-trend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.inventory-analytics-trend-chart {
  height: 220px;
  border: 1px solid #d6e1ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 8px;
}

.inventory-analytics-trend-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.inventory-return-trend-point {
  fill: #b42318;
  stroke: #ffffff;
  stroke-width: 0.9;
  pointer-events: none;
}

.inventory-return-trend-point-hit {
  fill: rgba(180, 35, 24, 0.14);
  stroke: #b42318;
  stroke-width: 1.1;
  cursor: pointer;
  transition: fill 120ms ease, stroke-width 120ms ease;
}

.inventory-return-trend-point-hit:hover,
.inventory-return-trend-point-hit:focus-visible {
  fill: rgba(180, 35, 24, 0.24);
  stroke-width: 1.8;
  outline: none;
}

.inventory-analytics-trend-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.inventory-analytics-trend-label-btn {
  border: 1px solid #d6e1ef;
  border-radius: 8px;
  background: #fff;
  padding: 6px 4px;
  font-size: 11px;
  color: #60758f;
  text-align: center;
  cursor: pointer;
  appearance: none;
  font: inherit;
}

.inventory-analytics-trend-label-btn:hover,
.inventory-analytics-trend-label-btn:focus-visible {
  border-color: #8ab2ec;
  color: #163b70;
  box-shadow: 0 0 0 2px rgba(33, 84, 166, 0.12);
  outline: none;
}

.inventory-analytics-trend-label-static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-size: 10px;
  color: #60758f;
  padding: 2px 0;
}

.inventory-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  grid-column: 1 / -1;
}

.inventory-dashboard-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inventory-dashboard-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-dashboard-title-row strong {
  color: #163b70;
  overflow-wrap: anywhere;
}

.inventory-dashboard-meta,
.inventory-dashboard-period,
.inventory-dashboard-card small {
  font-size: 11px;
  color: #60758f;
}

.inventory-dashboard-period {
  text-align: right;
}

.inventory-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  grid-column: 1 / -1;
}

.inventory-dashboard-card {
  border: 1px solid #d7e4f4;
  border-radius: 9px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  padding: 7px 8px;
  display: grid;
  gap: 2px;
}

.inventory-dashboard-card span {
  font-size: 10px;
  color: #60758f;
}

.inventory-dashboard-card strong {
  font-size: 13px;
  color: #163b70;
}

.inventory-supplier-master-list {
  min-height: 420px;
  max-height: 62vh;
  padding: 6px;
  border: 1px solid #d8e3f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#inventorySupplierMasterList.inventory-supplier-master-list {
  min-height: 0;
  max-height: none;
  height: 100%;
}

#inventorySupplierMasterList > .empty-state,
#inventorySupplierHistoryList > .empty-state {
  min-height: 150px;
}

#inventorySupplierMasterList > .empty-state.empty-state-compact,
#inventorySupplierHistoryList > .empty-state.empty-state-compact {
  min-height: 82px;
}

.inventory-supplier-master-item {
  position: relative;
  width: 100%;
  border: 1px solid #d6e1ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  padding: 12px 13px;
  display: grid;
  gap: 8px;
  text-align: left;
  color: inherit;
  min-height: 96px;
  box-shadow: 0 10px 22px rgba(17, 52, 96, 0.06);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.inventory-supplier-master-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, rgba(30, 95, 191, 0.72), rgba(15, 118, 110, 0.42), rgba(30, 95, 191, 0.14));
  pointer-events: none;
}

.inventory-supplier-master-item:hover,
.inventory-supplier-master-item:focus-visible {
  border-color: #8ab2ec;
  box-shadow: 0 14px 28px rgba(18, 63, 121, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.inventory-supplier-master-item.active {
  border-color: #1f5fbf;
  background: linear-gradient(180deg, #f4f8ff 0%, #dfeafc 100%);
  box-shadow: 0 0 0 1px rgba(31, 95, 191, 0.16), 0 14px 28px rgba(31, 95, 191, 0.12);
}

.inventory-supplier-master-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.inventory-supplier-master-title {
  display: grid;
  gap: 4px;
}

.inventory-supplier-master-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a8099;
}

.inventory-supplier-master-head strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  color: #163b70;
}

.inventory-supplier-master-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-supplier-master-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  color: #526984;
}

.inventory-supplier-master-address {
  color: #5b6f86;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.inventory-supplier-status {
  border: 1px solid #cfe2d8;
  background: #eff8f2;
  color: #256a45;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.inventory-supplier-status.inactive {
  border-color: #e7d2d2;
  background: #fff1f1;
  color: #8f3d3d;
}

.inventory-supplier-actions {
  justify-content: flex-end;
}

.inventory-ledger-section-title {
  margin: 2px 0 0;
  color: #163b70;
}

#inventorySupplierHistoryList.inventory-movement-list,
.inventory-analytics-list.inventory-movement-list {
  min-height: 220px;
  max-height: 320px;
}

#inventorySupplierHistoryList.inventory-movement-list {
  min-height: 220px;
  max-height: 300px;
  height: auto;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d8e2ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.inventory-check-row {
  min-height: 41px;
  border: 1px solid #cfd9e5;
  background: #ffffff;
  border-radius: 10px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inventory-check-row input {
  margin: 0;
}

.inventory-movement-item strong {
  color: #123a7a;
  font-size: 13px;
}

.inventory-movement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: #51657f;
}

.inventory-stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.inventory-stock-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.inventory-purchase-secondary {
  font-size: 12px;
  color: #58708b;
}

.inventory-stock-qty {
  flex: 0 0 auto;
  min-width: 72px;
  display: grid;
  justify-items: end;
  text-align: right;
}

.inventory-stock-qty strong {
  font-size: 18px;
  line-height: 1;
  color: #123a7a;
  font-weight: 800;
}

.inventory-stock-qty span {
  font-size: 11px;
  color: #5b6f87;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inventory-purchase-summary {
  margin-bottom: 10px;
  border: 1px solid #d7e4f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
  padding: 10px;
}

.inventory-purchase-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.inventory-purchase-summary-grid > div {
  border: 1px solid #d8e4f3;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 3px;
}

.inventory-purchase-summary-grid span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #637991;
  font-weight: 700;
}

.inventory-purchase-summary-grid strong {
  font-size: 18px;
  color: #123a7a;
}

.inventory-purchase-group {
  border: 1px solid #d7e4f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.inventory-purchase-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.inventory-purchase-group-head h4 {
  margin: 0;
  font-size: 14px;
  color: #123a7a;
}

.inventory-purchase-group-head p {
  margin: 2px 0 0;
  color: #58708b;
  font-size: 12px;
}

.inventory-purchase-group-list {
  display: grid;
  gap: 8px;
}

.inventory-purchase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 110px) minmax(92px, 110px);
  align-items: center;
  gap: 10px;
}

.inventory-purchase-qty {
  min-width: 0;
  display: grid;
  justify-items: end;
  text-align: right;
  gap: 2px;
}

.inventory-purchase-qty strong {
  font-size: 18px;
  line-height: 1;
  color: #123a7a;
  font-weight: 800;
}

.inventory-purchase-qty span {
  font-size: 11px;
  color: #5b6f87;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inventory-purchase-qty small {
  font-size: 11px;
  color: #58708b;
}

.inventory-purchase-suggested strong {
  color: #0f5132;
}

.inventory-history-item {
  gap: 6px;
}

.inventory-history-ledger-head,
.inventory-history-head {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1.2fr) minmax(140px, 1fr) 72px 110px auto;
  gap: 10px;
  align-items: center;
}

.inventory-history-ledger-head {
  border: 1px solid #d7e4f4;
  border-radius: 10px;
  background: #eef4fb;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 800;
  color: #58708b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.inventory-history-head {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fbfdff;
}

.inventory-row-print-trigger {
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.inventory-row-print-trigger:hover {
  background: rgba(242, 248, 255, 0.92);
}

.inventory-row-print-trigger:focus-visible {
  outline: 2px solid #2c64c7;
  outline-offset: 2px;
  background: rgba(242, 248, 255, 0.98);
}

.inventory-history-cell {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inventory-history-cell span {
  font-size: 10px;
  font-weight: 700;
  color: #607790;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inventory-history-cell strong {
  font-size: 13px;
  color: #173b70;
  overflow-wrap: anywhere;
}

.inventory-history-head-main {
  gap: 4px;
}

.inventory-history-cell-qty,
.inventory-history-cell-amount {
  justify-items: end;
  text-align: right;
}

.inventory-history-cell-amount strong {
  font-weight: 800;
  white-space: nowrap;
}

.inventory-history-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-history-toggle {
  min-width: 72px;
  padding: 5px 10px;
}

.inventory-history-detail {
  border-top: 1px solid #dbe6f4;
  padding-top: 8px;
  display: grid;
  gap: 8px;
}

@media (max-width: 980px) {
  .inventory-history-ledger-head {
    display: none;
  }

  .inventory-history-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .inventory-history-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .inventory-history-cell-qty,
  .inventory-history-cell-amount {
    justify-items: start;
    text-align: left;
  }
}

.inventory-history-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inventory-history-detail-grid > div {
  border: 1px solid #d7e4f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 7px 8px;
  display: grid;
  gap: 3px;
}

.inventory-history-detail-grid span {
  font-size: 11px;
  color: #5b6f87;
}

.inventory-history-detail-grid strong {
  font-size: 12px;
  color: #123a7a;
  overflow-wrap: anywhere;
}

.inventory-history-detail-wide {
  grid-column: 1 / -1;
}

.inventory-history-lines {
  border: 1px solid #d7e4f4;
  border-radius: 9px;
  background: #f8fbff;
  padding: 7px;
  display: grid;
  gap: 6px;
}

.inventory-history-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #3f5570;
}

.inventory-history-line {
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inventory-history-line-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inventory-history-line-main strong {
  font-size: 12px;
  color: #123a7a;
  overflow-wrap: anywhere;
}

.inventory-history-line-main small {
  font-size: 11px;
  color: #5d7188;
}

.inventory-history-line-values {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 10px;
  font-size: 12px;
  color: #4d617a;
}

.inventory-history-return-editor {
  display: grid;
  grid-template-columns: auto minmax(72px, 96px);
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  justify-self: end;
  font-size: 12px;
  color: #51657f;
}

.inventory-history-return-editor input,
.inventory-history-return-panel input {
  padding: 8px 9px;
  border: 1px solid #cfd9e5;
  background: #fff;
  min-width: 0;
}

.inventory-history-return-done {
  grid-column: 1 / -1;
  justify-self: end;
  font-size: 12px;
  font-weight: 700;
  color: #4c627b;
}

.inventory-history-return-panel,
.inventory-history-returns {
  border: 1px solid #d7e4f4;
  border-radius: 9px;
  background: #f8fbff;
  padding: 7px;
  display: grid;
  gap: 6px;
}

.inventory-history-return-actions {
  display: flex;
  justify-content: flex-end;
}

.inventory-history-return-entry {
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
  display: grid;
  gap: 4px;
}

.inventory-history-return-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inventory-return-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.inventory-return-row-head strong {
  font-size: 15px;
  line-height: 1.3;
  color: #163b70;
  overflow-wrap: anywhere;
}

.inventory-return-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.reports-wrap {
  width: min(94vw, 920px);
  max-height: 92vh;
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.supplier-statement-wrap {
  width: min(96vw, 980px);
  max-height: 92vh;
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 20px 44px rgba(9, 39, 82, 0.16);
}

.reports-wrap.with-date-row {
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
}

.reports-controls {
  display: grid;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid #d9e4f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 10px 20px rgba(17, 53, 104, 0.04);
}

#creditHistoryScopeNote,
#creditHistoryModeNote,
#moneyReceivedScopeNote,
.reports-scope-note {
  padding: 10px 12px;
  border: 1px solid #e0e8f3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: #5b6f86;
}

.reports-scope-note {
  margin-top: -2px;
  font-size: 12px;
}

.supplier-statement-controls {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) 150px 138px 138px auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d9e4f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 10px 24px rgba(17, 53, 104, 0.06);
}

.reports-controls select,
.reports-date-row input {
  border: 1px solid #d1deef;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 9px 12px;
  font: inherit;
  min-width: 150px;
}

.reports-controls select {
  min-width: 170px;
  max-width: 170px;
}

.supplier-statement-controls input,
.supplier-statement-controls select,
.supplier-statement-controls button,
.customer-statement-controls input,
.customer-statement-controls select,
.customer-statement-controls button {
  margin: 0;
  border: 1px solid #cfd9e5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 10px 12px;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.supplier-statement-controls button,
.customer-statement-controls button {
  white-space: nowrap;
}

#supplierStatementList,
#customerStatementList {
  min-height: 0;
  max-height: 48vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.customer-statement-wrap .account-statement-meta,
.customer-statement-wrap .account-statement-summary {
  margin-top: 0;
}

.reports-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e0e8f3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.reports-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reports-summary-tile {
  border: 1px solid rgba(26, 75, 92, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,250,0.98));
  padding: 12px 14px;
  text-align: left;
  min-width: 126px;
  flex: 1 1 126px;
  box-shadow: 0 12px 22px rgba(17, 53, 104, 0.05);
}

.reports-summary-tile.is-count {
  justify-self: start;
  min-width: 88px;
  padding: 8px 10px;
}

.reports-summary-tile span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #667b93;
}

.reports-summary-tile strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: #16323f;
}

.reports-summary-tile small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.4;
  color: #60758f;
}

.reports-summary-tile-eod.is-closed {
  border-color: rgba(26, 122, 75, 0.22);
  background: linear-gradient(180deg, rgba(244, 252, 247, 0.98), rgba(232, 247, 237, 0.98));
}

.reports-summary-tile-eod.is-open {
  border-color: rgba(171, 115, 0, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 240, 0.98), rgba(252, 243, 216, 0.98));
}

button.reports-summary-tile {
  appearance: none;
  width: 100%;
  cursor: pointer;
}

button.reports-summary-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(22, 50, 63, 0.08);
}

button.reports-summary-tile:focus-visible {
  outline: 3px solid rgba(20, 110, 180, 0.35);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.96), 0 0 0 6px rgba(20, 110, 180, 0.18);
}

.reports-content {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.reports-panel {
  border: 1px solid rgba(26, 75, 92, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
  box-shadow: 0 14px 24px rgba(17, 53, 104, 0.05);
}

.reports-content > .empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
}

.reports-panel h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #16323f;
}

.reports-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(22, 50, 63, 0.08);
  font-size: 12.5px;
}

.reports-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.reports-row strong {
  color: #16323f;
  text-align: right;
}

.reports-row span {
  min-width: 0;
  color: #4d617a;
}

.reports-row small {
  display: block;
  margin-top: 3px;
  color: #6f8298;
}

.reports-footer {
  justify-content: flex-end;
  position: static;
  bottom: auto;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
  border: 1px solid #d9e4f2;
  border-radius: 14px;
  padding: 10px 12px 0;
  margin-top: 0;
}

@media (max-width: 760px) {
  .reports-date-row {
    grid-template-columns: 1fr;
    padding: 0;
  }
}

.customer-master-wrap {
  width: min(95vw, 760px);
  max-height: 88vh;
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  gap: 10px;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 18px 40px rgba(9, 39, 82, 0.15);
}

.customer-master-shell-note {
  padding: 11px 12px;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(70, 124, 201, 0.12), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: #5a6d84;
  font-size: 12px;
  line-height: 1.45;
}

.return-sale-summary {
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.return-sale-wrap {
  width: min(92vw, 620px);
  max-height: 88vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 10px;
  scrollbar-gutter: stable;
}

.return-sale-form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
}

.return-sale-note {
  margin-bottom: 0;
  font-size: 11px;
  line-height: 1.25;
}

.return-sale-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.return-sale-section {
  border: 1px solid #d7e4f4;
  background: #fbfdff;
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 5px;
}

.return-sale-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 2px;
}

.return-sale-row input {
  min-width: 0;
}

.return-sale-row button {
  white-space: nowrap;
}

.return-sale-draft-actions {
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
}

.return-sale-draft-list {
  border: 1px solid #dbe5f2;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  border-radius: 14px;
  min-height: 76px;
  max-height: 170px;
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 8px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.return-sale-draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #d7e4f4;
  border-radius: 8px;
  background: #fff;
  padding: 6px 8px;
}

.return-sale-draft-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.return-sale-draft-main strong {
  color: #163f73;
}

.return-sale-draft-main span {
  font-size: 12px;
  color: #5c6977;
}

.return-sale-lookup-row input {
  min-width: 0;
}

.return-lookup-list {
  min-height: 88px;
  max-height: 150px;
  overflow: auto;
  border: 1px solid #d7e4f4;
  background: #f8fbff;
  border-radius: 10px;
  padding: 6px;
  display: grid;
  gap: 6px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.return-sale-wrap .receipt-actions {
  position: static;
  bottom: auto;
  background: transparent;
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.return-sale-footer {
  margin-top: 2px;
}

.return-sale-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.95rem;
}

.return-sale-summary small {
  color: #5c6977;
  font-size: 0.83rem;
  line-height: 1.35;
}

.customer-master-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d9e4f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 10px 24px rgba(17, 53, 104, 0.06);
}

.customer-master-controls input,
.customer-master-controls select {
  padding: 10px 11px;
  border: 1px solid #cfd9e5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.customer-master-list {
  min-height: 220px;
  max-height: 380px;
  overflow: auto;
  border: 1px solid #d7e4f4;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  gap: 10px;
  overscroll-behavior: contain;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.customer-master-list > .empty-state {
  min-height: 180px;
}

.customer-master-item {
  position: relative;
  width: 100%;
  border: 1px solid #d8e3f1;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  overflow: visible;
  line-height: 1.4;
  align-content: start;
  box-shadow: 0 10px 20px rgba(17, 53, 104, 0.05);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.customer-master-item::after {
  display: none;
}

.customer-master-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, rgba(30, 95, 191, 0.72), rgba(15, 118, 110, 0.42), rgba(30, 95, 191, 0.14));
  pointer-events: none;
}

.customer-master-item:hover,
.customer-master-item:focus-visible {
  border-color: #8ab2ec;
  box-shadow: 0 14px 28px rgba(18, 63, 121, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.customer-master-item.active {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  box-shadow: 0 0 0 1px rgba(29, 78, 216, 0.14), 0 14px 28px rgba(29, 78, 216, 0.12);
}

.customer-master-item-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a8099;
}

.customer-master-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.customer-master-item-head strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  color: #132c49;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding-block: 1px;
}

.customer-master-type {
  justify-self: end;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #375a84;
  background: linear-gradient(180deg, #f7fbff 0%, #e8f0fb 100%);
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid #d7e4f4;
}

.customer-master-item-sub {
  font-size: 13px;
  color: #314563;
}

.customer-master-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-master-item-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  color: #526984;
}

.customer-master-item-meta .customer-master-balance {
  border-color: #cfe0f6;
  background: linear-gradient(180deg, #eff6ff 0%, #ddeafb 100%);
  color: #123b77;
}

.customer-master-load-row {
  display: flex;
  justify-content: center;
}

.customer-master-form {
  border: 1px solid #d7e4f4;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(17, 53, 104, 0.05);
}

.customer-master-form-head {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e3ebf6;
}

.customer-master-form label {
  font-size: 12px;
  color: var(--muted);
}

.customer-master-form input,
.customer-master-form select {
  padding: 9px 10px;
  border: 1px solid #cfd9e5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.customer-master-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.customer-master-duplicates {
  border: 1px solid #d7e4f4;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.customer-master-duplicate-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.customer-master-duplicate-summary .muted {
  flex: 1;
  min-width: 0;
}

.customer-master-duplicate-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.customer-master-duplicate-item {
  border: 1px solid #d8e3f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  padding: 10px 11px;
  display: grid;
  gap: 6px;
}

.customer-master-duplicate-item strong {
  font-size: 12px;
}

.customer-master-duplicate-item small {
  color: #61758f;
  font-size: 11px;
  line-height: 1.35;
}

.customer-master-duplicate-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.payment-receipts-summary {
  margin-bottom: 0;
}

.payment-receipts-list {
  min-height: 240px;
  max-height: 340px;
  padding: 6px;
  gap: 6px;
}

.payment-receipts-footer {
  gap: 6px;
  margin-top: 0;
  padding-top: 0;
  position: static;
  bottom: auto;
  background: transparent;
  justify-content: flex-end;
}

.payment-receipts-footer button {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 7px 10px;
  font-size: 12px;
}

.payment-receipts-wrap .panel-head {
  margin-bottom: 6px;
}

.payment-receipts-wrap .badge {
  padding: 2px 7px;
  font-size: 11px;
}

.payment-receipt-controls input,
.payment-receipt-controls select,
.payment-receipt-controls button {
  margin: 0;
}

.payment-receipt-controls #paymentReceiptSearchInput {
  padding: 11px 12px;
  border: 1px solid #cfd9e5;
  background: var(--surface-2);
}

.payment-receipt-controls #paymentReceiptTypeSelect,
.payment-receipt-controls #paymentReceiptStatusSelect,
.payment-receipt-controls #paymentReceiptMethodSelect,
.payment-receipt-controls #paymentReceiptScopeSelect {
  padding: 11px 12px;
  border: 1px solid #cfd9e5;
  background: var(--surface-2);
}

.payment-receipt-date-row {
  display: grid;
}

.payment-receipt-date-row input {
  border: 1px solid #cfd9e5;
  background: var(--surface-2);
}

.payment-receipts-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
}

.payment-receipts-summary > div {
  flex: 0 1 112px;
  min-width: 0;
  max-width: 118px;
  border: 1px solid #d7e4f4;
  border-radius: 9px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  padding: 6px 7px;
  display: grid;
  gap: 2px;
}

.payment-receipts-summary > div.is-count {
  flex: 0 0 72px;
  max-width: 72px;
  padding: 5px 8px;
}

#inventorySupplierPaymentSummary {
  gap: 4px;
}

#inventorySupplierPaymentSummary > div {
  flex: 0 0 auto;
  max-width: none;
  padding: 4px 7px;
  border-radius: 10px;
}

#inventorySupplierPaymentSummary > div.is-count {
  flex-basis: auto;
  min-width: 0;
}

#inventorySupplierPaymentSummary span {
  font-size: 9px;
  line-height: 1.2;
}

#inventorySupplierPaymentSummary strong {
  font-size: 12px;
  margin-top: 2px;
  line-height: 1.2;
}

.payment-receipts-summary span {
  font-size: 10px;
  color: #60758f;
}

.payment-receipts-summary strong {
  font-size: 13px;
  color: #163b70;
}

#inventoryAnalyticsSummary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

#inventoryReturnAnalyticsBox {
  margin-top: 12px;
  min-height: 0;
  overflow: visible;
  grid-auto-rows: max-content;
  gap: 12px;
}

.inventory-return-analytics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#inventoryReturnsTab {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

#inventoryReturnsTab > * {
  flex: 0 0 auto;
}

#inventoryReturnsTab > .inventory-register-filters {
  border: 1px solid #d9e3f1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  padding: 12px;
  box-shadow: 0 10px 24px rgba(17, 52, 96, 0.06);
}

#inventoryReturnContext,
#inventoryReturnSummary {
  margin-top: 0;
}

#inventoryReturnAnalyticsSummary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#inventoryReturnAnalyticsSummary > div {
  border: 1px solid #d7e4f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #edf4fe 100%);
  padding: 9px 10px;
  display: grid;
  gap: 3px;
}

#inventoryReturnAnalyticsSummary span {
  font-size: 11px;
  color: #60758f;
}

#inventoryReturnAnalyticsSummary strong {
  font-size: 15px;
  color: #163b70;
}

#inventoryReturnAnalyticsSummary small {
  font-size: 11px;
  color: #60758f;
}

.inventory-return-register-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 3px;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(21, 57, 107, 0.08);
}

.inventory-return-register-head h4 {
  margin: 0;
  font-size: 16px;
  color: #163b70;
}

.inventory-return-register-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #5d728d;
}

.inventory-return-register-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#inventoryReturnList {
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  padding: 10px;
  display: grid;
  grid-auto-rows: max-content;
  align-self: start;
  height: max-content;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.inventory-return-insights {
  display: grid;
  gap: 12px;
  border: 1px solid #d8e4f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  padding: 14px;
  box-shadow: 0 10px 24px rgba(17, 52, 96, 0.06);
}

.inventory-return-insights-head {
  display: grid;
  gap: 3px;
}

.inventory-return-insights-head h4 {
  margin: 0;
  font-size: 16px;
  color: #163b70;
}

.inventory-return-insights-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #5d728d;
}

.inventory-return-analytics-grid .inventory-block {
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 24px rgba(17, 52, 96, 0.06);
}

.inventory-return-card {
  border-radius: 16px;
  border: 1px solid #d7e4f3;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 20px rgba(18, 53, 98, 0.06);
  padding: 12px;
  gap: 10px;
}

.inventory-return-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-radius: 12px;
}

.inventory-return-card-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.inventory-return-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a7395;
}

.inventory-return-card-ref {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #60758f;
  font-size: 11px;
}

.inventory-return-card-ref span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: rgba(33, 84, 166, 0.08);
  color: #355b8c;
  padding: 4px 9px;
}

.inventory-return-amount {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4f95 0%, #2e6bc0 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 18px rgba(29, 79, 149, 0.2);
}

.inventory-return-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-return-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #ffffff;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #526984;
}

.inventory-return-note {
  display: grid;
  gap: 5px;
  border: 1px dashed #c7d7ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 11px;
  color: #425870;
  line-height: 1.45;
}

.inventory-return-note-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #60758f;
}

#inventoryReturnMonthsList.inventory-analytics-months,
#inventoryReturnAnalyticsSuppliersList.inventory-analytics-list.inventory-movement-list,
#inventoryReturnAnalyticsProductsList.inventory-analytics-list.inventory-movement-list,
#inventoryReturnList.inventory-movement-list {
  align-self: start;
  height: max-content;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.inventory-analytics-scope {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7e4f4;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  padding: 8px 10px;
}

.inventory-analytics-scope-title {
  font-size: 11px;
  font-weight: 700;
  color: #163b70;
}

.inventory-analytics-scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d6e1ef;
  border-radius: 999px;
  background: #ffffff;
  color: #163b70;
  padding: 4px 9px;
  font-size: 11px;
  min-width: 0;
}

.inventory-analytics-scope-chip span {
  color: #60758f;
  font-weight: 600;
}

#inventoryAnalyticsSummary .inventory-analytics-compare {
  grid-column: 1 / -1;
  border: 1px solid #cfdcf0;
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  padding: 9px 10px;
  display: grid;
  gap: 8px;
}

.inventory-analytics-compare-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.inventory-analytics-compare-head span {
  font-size: 10px;
  color: #60758f;
}

.inventory-analytics-compare-head strong {
  font-size: 14px;
  color: #163b70;
}

.inventory-analytics-compare-head small {
  font-size: 11px;
  color: #46607e;
  text-align: right;
}

.inventory-analytics-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.inventory-analytics-compare-card {
  border: 1px solid #d7e4f4;
  border-radius: 9px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  padding: 7px 8px;
  display: grid;
  gap: 3px;
}

.inventory-analytics-compare-card span {
  font-size: 10px;
  color: #60758f;
}

.inventory-analytics-compare-card strong {
  font-size: 14px;
  color: #163b70;
}

.inventory-analytics-compare-card small {
  font-size: 11px;
  color: #60758f;
}

.inventory-analytics-compare-trend.up {
  color: #0d7a43;
}

.inventory-analytics-compare-trend.down {
  color: #b42318;
}

.inventory-analytics-compare-trend.flat {
  color: #60758f;
}

#inventoryAnalyticsSummary > div {
  border: 1px solid #d7e4f4;
  border-radius: 9px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  padding: 6px 7px;
  display: grid;
  gap: 2px;
}

#inventoryAnalyticsSummary span {
  font-size: 10px;
  color: #60758f;
}

#inventoryAnalyticsSummary strong {
  font-size: 13px;
  color: #163b70;
}

#inventoryAnalyticsSummary small {
  font-size: 11px;
  color: #60758f;
}

#inventorySupplierHistorySummary {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
  margin-top: 2px;
}

#inventorySupplierHistorySummary > div {
  flex: none;
  min-width: 0;
  max-width: none;
}

#inventorySupplierHistorySummary > .inventory-dashboard-head,
#inventorySupplierHistorySummary > .inventory-dashboard-grid,
#inventorySupplierHistorySummary > .inventory-dashboard-footnote {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

#inventorySupplierHistorySummary .inventory-dashboard-card.is-balance {
  border-color: #b7d0f6;
  background: linear-gradient(180deg, #eff5ff 0%, #dfeafa 100%);
}

#inventorySupplierHistorySummary .inventory-dashboard-card.is-credit {
  border-color: #f0d5c9;
  background: linear-gradient(180deg, #fff6f0 0%, #ffe8dc 100%);
}

#inventorySupplierHistorySummary .inventory-dashboard-card.is-balance strong,
#inventorySupplierHistorySummary .inventory-dashboard-card.is-credit strong {
  font-size: 15px;
}

#inventorySupplierHistorySummary .inventory-dashboard-card {
  border-radius: 12px;
  padding: 8px 9px;
  gap: 3px;
}

#inventorySupplierHistorySummary .inventory-dashboard-card span {
  font-size: 10px;
}

#inventorySupplierHistorySummary .inventory-dashboard-card small {
  font-size: 10px;
  line-height: 1.35;
}

#inventorySupplierHistorySummary .inventory-dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-dashboard-footnote {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 2px 2px 0;
  font-size: 11px;
  color: #5f7388;
}

.inventory-dashboard-footnote span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.inventory-supplier-ledger-row {
  border-radius: 16px;
  padding: 12px;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 10px 22px rgba(17, 52, 96, 0.06);
}

.inventory-supplier-ledger-row.is-return {
  border-color: #efd9cf;
  background: linear-gradient(180deg, #fffaf7 0%, #fff1ea 100%);
}

.inventory-supplier-ledger-row.is-payment {
  border-color: #d6e7d8;
  background: linear-gradient(180deg, #f8fff9 0%, #eefbf1 100%);
}

.inventory-supplier-ledger-row.is-debit {
  border-color: #efd9cf;
  background: linear-gradient(180deg, #fffaf7 0%, #fff1ea 100%);
}

.inventory-supplier-ledger-row.is-credit {
  border-color: #c9ddf8;
  background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
}

.inventory-payment-ledger-head {
  display: grid;
  grid-template-columns: 92px minmax(150px, 1.35fr) 64px minmax(112px, 0.9fr) 84px auto;
  gap: 8px;
  align-items: center;
  padding: 0 10px 6px;
  color: #587089;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-supplier-payment-row {
  border-radius: 16px;
  padding: 9px 10px;
  gap: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 18px rgba(17, 52, 96, 0.06);
}

.inventory-supplier-payment-head {
  display: grid;
  grid-template-columns: 92px minmax(150px, 1.35fr) 64px minmax(112px, 0.9fr) 84px auto;
  gap: 8px;
  align-items: center;
  border-radius: 12px;
}

.inventory-supplier-payment-cell {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: #4f6177;
  font-size: 11px;
}

.inventory-supplier-payment-cell strong {
  color: #14345d;
  font-size: 12px;
  line-height: 1.25;
}

.inventory-supplier-payment-cell span {
  color: #6b7d92;
  font-size: 10px;
  line-height: 1.2;
}

.inventory-supplier-payment-cell-date strong {
  font-variant-numeric: tabular-nums;
}

.inventory-supplier-payment-cell-supplier strong,
.inventory-supplier-payment-cell-ref strong {
  overflow-wrap: anywhere;
}

.inventory-supplier-payment-cell-amount {
  justify-items: end;
  text-align: right;
}

.inventory-supplier-payment-cell-amount strong {
  font-size: 13px;
}

.inventory-supplier-payment-actions {
  display: flex;
  justify-content: flex-end;
}

.inventory-supplier-payment-note {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(199, 214, 233, 0.72);
  color: #5f7388;
  font-size: 11px;
  line-height: 1.35;
}

.inventory-supplier-ledger-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border-radius: 12px;
}

.inventory-supplier-ledger-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.inventory-supplier-ledger-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b8098;
}

.inventory-supplier-ledger-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inventory-supplier-ledger-ref {
  font-size: 13px;
  line-height: 1.3;
  color: #163b70;
  overflow-wrap: anywhere;
}

.inventory-ledger-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.inventory-ledger-badge.is-inward {
  border: 1px solid #c9ddf8;
  background: #edf5ff;
  color: #1650a5;
}

.inventory-ledger-badge.is-return {
  border: 1px solid #efd3c8;
  background: #fff1ea;
  color: #9a4d23;
}

.inventory-ledger-badge.is-payment {
  border: 1px solid #c9e3cf;
  background: #eefaf1;
  color: #156b3d;
}

@media (max-width: 980px) {
  .inventory-payment-ledger-head {
    display: none;
  }

  #inventorySupplierHistorySummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #inventorySupplierHistorySummary .inventory-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-supplier-card-head {
    grid-template-columns: 1fr;
  }

  .inventory-supplier-payment-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .inventory-supplier-payment-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .inventory-supplier-payment-cell-amount {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  #inventorySupplierHistorySummary {
    grid-template-columns: 1fr;
  }

  #inventorySupplierHistorySummary .inventory-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.inventory-ledger-badge.is-debit {
  border: 1px solid #efd3c8;
  background: #fff1ea;
  color: #9a4d23;
}

.inventory-ledger-badge.is-credit {
  border: 1px solid #c9ddf8;
  background: #edf5ff;
  color: #1650a5;
}

.inventory-supplier-ledger-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #546a84;
}

.inventory-supplier-ledger-meta {
  gap: 8px;
}

.inventory-supplier-ledger-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 600;
  color: #526984;
}

.inventory-supplier-ledger-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.inventory-supplier-ledger-value {
  border: 1px solid #d9e6f4;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  padding: 7px 9px;
  display: grid;
  gap: 3px;
}

.inventory-supplier-ledger-value span {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #60758f;
}

.inventory-supplier-ledger-value strong {
  font-size: 14px;
  color: #163b70;
}

.inventory-supplier-ledger-value.is-return strong,
.inventory-supplier-ledger-value.is-debit strong {
  color: #9a4d23;
}

.inventory-supplier-ledger-value.is-payment strong,
.inventory-supplier-ledger-value.is-credit strong {
  color: #1650a5;
}

.inventory-supplier-ledger-value.is-balance strong {
  color: #0f4e9a;
}

.inventory-supplier-ledger-note {
  padding: 10px 11px;
  border: 1px dashed #d5e2f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  line-height: 1.45;
  color: #526984;
}

.inventory-supplier-open-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #d8e4f4;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #355b8c;
}

.supplier-ledger-book {
  border: 1px solid #d7e1ec;
  border-radius: 14px;
  overflow: auto;
  background: #fff;
}

.supplier-ledger-book-head,
.supplier-ledger-book-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1.7fr) 96px 110px 110px 128px;
  gap: 0;
}

.supplier-ledger-book-head {
  background: #eef3f8;
  border-bottom: 1px solid #d7e1ec;
}

.supplier-ledger-book-head > div {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a6f87;
}

.supplier-ledger-book-row {
  border-bottom: 1px solid #e7edf4;
}

.supplier-ledger-book-row-action {
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.supplier-ledger-book-row-action:hover {
  background: #f7fbff;
}

.supplier-ledger-book-row-action:focus-visible {
  outline: 2px solid #2c64c7;
  outline-offset: -2px;
  background: #f2f7ff;
}

.supplier-ledger-book-row:last-child {
  border-bottom: 0;
}

.supplier-ledger-book-row > div {
  padding: 11px 12px;
}

.supplier-ledger-book-date,
.supplier-ledger-book-ref {
  font-size: 12px;
  color: #4f657d;
}

.supplier-ledger-book-particulars {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.supplier-ledger-book-particulars strong {
  font-size: 14px;
  line-height: 1.3;
  color: #17385d;
}

.supplier-ledger-book-meta {
  font-size: 12px;
  color: #5d738b;
  overflow-wrap: anywhere;
}

.supplier-ledger-book-note {
  font-size: 12px;
  color: #6b5f3d;
  background: #fff8e8;
  border: 1px solid #efe1b9;
  border-radius: 8px;
  padding: 5px 8px;
}

.supplier-ledger-book-value {
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: #17385d;
}

.supplier-ledger-book-value.is-debit {
  color: #8a4a22;
}

.supplier-ledger-book-value.is-credit {
  color: #1650a5;
}

.supplier-ledger-book-value.is-balance {
  color: #0f3f7a;
}

.inventory-history-context {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.inventory-history-context-main,
.inventory-history-context-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inventory-history-context-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e1ef;
  border-radius: 999px;
  background: #f7fbff;
  color: #163b70;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
}

.inventory-history-context-chip-accent {
  border-color: #9bbbed;
  background: linear-gradient(180deg, #edf5ff 0%, #dbe9fb 100%);
}

.inventory-history-context small {
  color: #60758f;
  font-size: 11px;
}

.inventory-analytics-list {
  min-height: 260px;
  max-height: 52vh;
}

.inventory-analytics-months {
  display: grid;
  gap: 6px;
  min-height: 72px;
  max-height: 30vh;
  overflow: auto;
  min-width: 0;
}

.inventory-analytics-month-row {
  display: grid;
  grid-template-columns: minmax(120px, 144px) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 124px) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #d6e1ef;
  border-radius: 9px;
  background: #fff;
  padding: 8px 9px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.inventory-analytics-month-row:hover {
  border-color: #8ab2ec;
  box-shadow: 0 0 0 2px rgba(33, 84, 166, 0.12);
}

.inventory-return-month-row {
  grid-template-columns: minmax(120px, 144px) minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 124px);
}

.inventory-return-month-drilldown {
  cursor: pointer;
}

.inventory-return-month-drilldown:focus-visible {
  outline: 2px solid #2154a6;
  outline-offset: 2px;
}

.inventory-analytics-month-actions,
.inventory-analytics-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.inventory-analytics-month-actions {
  align-self: stretch;
}

.inventory-analytics-month-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inventory-analytics-month-cell span {
  font-size: 10px;
  color: #60758f;
}

.inventory-analytics-month-cell strong {
  font-size: 13px;
  color: #163b70;
}

.inventory-analytics-month-cell small {
  font-size: 11px;
  color: #60758f;
}

.inventory-analytics-month-change {
  font-weight: 700;
}

.inventory-analytics-month-change.up {
  color: #0d7a43;
}

.inventory-analytics-month-change.down {
  color: #b42318;
}

.inventory-analytics-month-change.flat {
  color: #60758f;
}

.inventory-analytics-item {
  border: 1px solid #d6e1ef;
  border-radius: 9px;
  background: #fff;
  padding: 8px 9px;
  display: grid;
  gap: 5px;
}

.inventory-analytics-filter-card {
  cursor: pointer;
}

.inventory-analytics-filter-card:hover,
.inventory-analytics-filter-card:focus-visible {
  border-color: #8ab2ec;
  box-shadow: 0 0 0 2px rgba(33, 84, 166, 0.12);
  outline: none;
}

.inventory-analytics-filter-card-disabled {
  cursor: default;
}

.inventory-analytics-filter-card-disabled:hover,
.inventory-analytics-filter-card-disabled:focus-visible {
  border-color: #d6e1ef;
  box-shadow: none;
}

.inventory-analytics-action-btn {
  cursor: pointer;
}

.inventory-analytics-action-btn:hover,
.inventory-analytics-action-btn:focus-visible {
  border-color: #8ab2ec;
  box-shadow: 0 0 0 2px rgba(33, 84, 166, 0.12);
  outline: none;
}

.inventory-analytics-action-btn:disabled {
  cursor: default;
  opacity: 0.72;
  box-shadow: none;
}

.inventory-analytics-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.inventory-analytics-item-head strong {
  color: #163b70;
  overflow-wrap: anywhere;
}

.inventory-analytics-item-head span {
  font-size: 12px;
  font-weight: 700;
  color: #2154a6;
}

.payment-receipts-list {
  min-height: 240px;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #d7e4f4;
  background: #f8fbff;
  border-radius: 10px;
  padding: 6px;
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.credit-history-wrap .panel-head {
  margin-bottom: 6px;
}

.credit-history-wrap .badge {
  padding: 2px 7px;
  font-size: 11px;
}

.money-received-wrap .panel-head {
  margin-bottom: 6px;
}

.money-received-wrap .badge {
  padding: 2px 7px;
  font-size: 11px;
}

#creditHistoryScopeNote {
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.2;
}

#moneyReceivedScopeNote {
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.2;
}
.held-sales-wrap {
  width: min(92vw, 620px);
  padding: 10px;
  scrollbar-gutter: stable;
}
.held-sales-wrap .credit-history-list {
  max-height: 340px;
  padding: 6px;
  gap: 6px;
  scrollbar-gutter: stable;
}
.import-modal-wrap {
  width: min(96vw, 860px);
  max-height: 92vh;
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: auto;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: #d7e4f4;
  box-shadow: 0 20px 44px rgba(9, 39, 82, 0.16);
}
.product-form {
  display: grid;
  gap: 12px;
}
.credit-history-list {
  min-height: 140px;
  max-height: none;
  overflow: auto;
  border: 1px solid #dbe5f2;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 10px;
  overflow-wrap: anywhere;
  word-break: break-word;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.money-received-list {
  min-height: 140px;
  max-height: none;
  overflow: auto;
  border: 1px solid #dbe5f2;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 10px;
  overflow-wrap: anywhere;
  word-break: break-word;
  overscroll-behavior: contain;
}

#paymentReceiptsList {
  min-height: 0;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
}
#returnLookupList {
  min-height: 84px;
  max-height: 170px;
  border-style: dashed;
  background: linear-gradient(180deg, #fcfdff 0%, #f3f8ff 100%);
}
.import-progress {
  border: 1px solid #d6e3f3;
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(67, 114, 188, 0.1), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: #1f477b;
  padding: 11px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 18px rgba(17, 53, 104, 0.04);
}
.import-summary {
  min-height: 160px;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(67, 114, 188, 0.08), transparent 48%),
    linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  padding: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 20px rgba(17, 53, 104, 0.04);
  align-content: start;
}

#importProductsSummary > .empty-state {
  min-height: 170px;
}
.import-summary .summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.import-summary .summary-grid > div {
  border: 1px solid #d9e5f3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 10px 11px;
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}
.import-summary .summary-grid span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #60758f;
}
.import-summary .summary-grid strong {
  color: #113f7d;
  font-size: 14px;
}
.import-errors {
  margin-top: 0;
  padding: 12px;
  border: 1px solid #f0d4d1;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffafa 0%, #fff1ef 100%);
  font-size: 12px;
  color: #8b2f14;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.import-errors > div {
  padding-bottom: 6px;
  border-bottom: 1px dashed #efc4be;
}

.import-errors > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.import-summary-note {
  padding: 10px 12px;
  border: 1px dashed #d7e4f4;
  border-radius: 12px;
  background: #f9fbff;
  color: #5e738d;
  font-size: 12px;
  line-height: 1.45;
}
#returnSaleHint {
  padding: 8px 10px;
  margin-top: 8px;
  border: 1px solid #d7e4f4;
  border-radius: 9px;
  background: #f4f9ff;
  color: #24496f;
}
.credit-item {
  border: 1px solid #d7e0eb;
  border-radius: 9px;
  background: #fff;
  padding: 5px 6px;
  max-width: 100%;
  overflow: hidden;
}

.credit-item-history {
  border-color: #d7e3f6;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.credit-item-collection {
  border-color: #d6eadf;
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
}

.credit-item-account-history {
  display: grid;
  gap: 2px;
}

.credit-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

.credit-history-right {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 86px;
}

.credit-item-account-history .credit-card-main strong {
  font-size: 12px;
}

.credit-item-account-history .credit-card-subline {
  font-size: 10px;
}

.credit-account-amount {
  font-size: 12px;
  font-weight: 700;
  color: #0b1f3a;
  white-space: nowrap;
  text-align: right;
  min-width: 86px;
}

.credit-item-account-history .credit-card-label {
  margin-bottom: 1px;
  width: fit-content;
}

.credit-item-account-history .credit-card-meta {
  margin-top: 2px;
  font-size: 10px;
}

.credit-card-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 4px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #eef3fb;
  color: #45617f;
}

.credit-item-collection .credit-card-label {
  background: #e7f6ec;
  color: #1f6a3c;
}

.payment-receipt-item {
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 10px 11px;
  display: grid;
  gap: 8px;
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.payment-receipt-row {
  display: grid;
  grid-template-columns: 148px 94px 112px minmax(180px, 1.5fr) 78px 108px 88px;
  align-items: center;
  gap: 10px;
  min-width: 880px;
}

.payment-receipt-col {
  min-width: 0;
  font-size: 11.5px;
  color: #36506c;
  line-height: 1.35;
}

.payment-receipt-date,
.payment-receipt-ref,
.payment-receipt-link,
.payment-receipt-method,
.payment-receipt-status {
  white-space: nowrap;
}

.payment-receipt-customer {
  display: grid;
  gap: 1px;
}

.payment-receipt-customer strong {
  font-size: 13px;
  color: #0f2b46;
}

.payment-receipt-customer small {
  font-size: 10px;
  color: #5f738c;
}

.payment-receipt-amount {
  font-size: 13px;
  font-weight: 700;
  color: #0b1f3a;
  white-space: nowrap;
  text-align: right;
}

.receipt-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.receipt-status-active {
  background: #e7f6ec;
  color: #1f6a3c;
}

.receipt-status-reversed {
  background: #ffe8e8;
  color: #9b1c1c;
}

.payment-receipt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.payment-receipt-actions button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 12px;
}

.payment-receipt-actions .warn-action {
  background: linear-gradient(180deg, #fff4eb 0%, #ffd8be 100%);
  border: 1px solid #efbc92;
  color: #8a4210;
}

.payment-receipt-meta-line {
  font-size: 10.5px;
  color: #60758f;
  line-height: 1.35;
  padding-top: 6px;
  border-top: 1px dashed #d8e2ef;
}

#reversePaymentMeta {
  margin-bottom: 8px;
  line-height: 1.4;
}

.credit-card-meta {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #5f738c;
}

.credit-card-meta-stack {
  display: grid;
  gap: 2px;
}

.credit-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.credit-history-summary > div {
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  padding: 10px 11px;
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.credit-history-summary span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #60758f;
}

.credit-history-summary strong {
  font-size: 14px;
  color: #163b70;
}

.money-received-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.money-received-summary > div {
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  padding: 10px 11px;
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.money-received-summary span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #60758f;
}

.money-received-summary strong {
  font-size: 14px;
  color: #163b70;
}

.money-received-controls {
  grid-template-columns: minmax(0, 1fr) auto;
}

.money-received-controls #moneyReceivedSearchInput {
  min-width: 0;
}

.money-received-controls #resetMoneyReceivedFiltersBtn {
  justify-self: end;
}

.money-received-footer {
  justify-content: flex-end;
  position: static;
  bottom: auto;
  margin-top: 0;
  padding-top: 0;
}

/* Collections modal layout hardening */
.money-received-wrap {
  width: min(94vw, 700px);
  max-height: min(92vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.money-received-wrap .panel-head {
  margin-bottom: 0;
}

.money-received-wrap .held-sales-tabs {
  margin-bottom: 0;
  align-self: flex-start;
}

.money-received-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.money-received-controls #moneyReceivedSearchInput {
  min-width: 0;
}

.money-received-summary {
  margin: 0;
}

.money-received-list {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  scrollbar-gutter: stable;
}

.money-received-footer {
  margin-top: 0;
  padding-top: 0;
  position: static;
  bottom: auto;
  background: transparent;
  justify-content: flex-end;
}

.money-received-footer button {
  flex: 0 0 auto;
  min-width: 108px;
}

.credit-held-item.collection {
  padding: 11px 12px;
  gap: 6px;
}

.credit-held-item.collection .line-head {
  align-items: flex-start;
  gap: 8px;
}

.credit-held-item.collection .held-head-meta {
  margin-left: auto;
}

.credit-held-item.collection .held-actions {
  margin-top: 2px;
  justify-content: flex-end;
}

.credit-held-item.collection .held-actions button {
  min-width: 108px;
}

.collection-row-meta {
  font-size: 11px;
  line-height: 1.3;
  color: #5f738c;
}

.credit-item-actions {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.credit-item-collection .credit-card-main strong {
  font-size: 12px;
}

.credit-item-collection .credit-card-subline {
  font-size: 10px;
}

.credit-item-collection .credit-card-label {
  margin-bottom: 2px;
}

.credit-received-btn {
  border-color: #0f766e;
  background: linear-gradient(180deg, #139a8f 0%, #0f766e 100%);
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.18);
}

.credit-received-btn:hover {
  border-color: #0c615a;
  background: linear-gradient(180deg, #11887e 0%, #0d655e 100%);
}

.credit-held-item {
  gap: 6px;
  border-radius: 14px;
  padding: 11px 12px;
  box-shadow: 0 10px 18px rgba(17, 53, 104, 0.04);
}

.credit-held-item.history {
  border-color: #d7e3f6;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.credit-held-item.collection {
  border-color: #d6eadf;
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
}

.credit-held-item .credit-card-label {
  margin-bottom: 2px;
  font-size: 9.5px;
  padding: 3px 8px;
}

.credit-held-item strong {
  font-size: 13px;
}

.credit-held-item small {
  font-size: 10.5px;
  line-height: 1.35;
  color: #5f738c;
}

.credit-held-item .held-head-meta {
  gap: 6px;
}

.credit-amount-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: #0b1f3a;
  white-space: nowrap;
}

.credit-held-item .held-actions {
  margin-top: 4px;
}

.credit-held-item .held-actions button {
  flex: 0 0 auto;
  min-width: 126px;
  margin-left: auto;
  min-height: 36px;
}

.account-statement-item {
  border: 1px solid #d7e0eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 10px 11px;
  display: grid;
  gap: 8px;
}

.account-statement-item.debit {
  border-color: #e7d7bb;
  background: linear-gradient(180deg, #fffefb 0%, #fff7ea 100%);
}

.account-statement-item.credit {
  border-color: #d7e7da;
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
}

.account-statement-item.reversal {
  border-color: #f1d3d0;
  background: linear-gradient(180deg, #fffdfd 0%, #fff3f2 100%);
}

.account-statement-meta {
  margin-bottom: 8px;
}

.account-statement-customer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.account-statement-customer-main {
  display: grid;
  gap: 2px;
}

.account-statement-customer strong {
  font-size: 16px;
  color: #17324d;
}

.account-statement-customer span {
  font-size: 12px;
  color: #60758f;
}

.account-statement-kind {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  background: #eef4fb;
  color: #355271;
  white-space: nowrap;
}

.account-statement-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.account-statement-summary > div {
  border: 1px solid #d7e4f4;
  border-radius: 9px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  padding: 8px;
  display: grid;
  gap: 3px;
}

.account-statement-summary span {
  font-size: 11px;
  color: #60758f;
}

.account-statement-summary strong {
  font-size: 14px;
  color: #163b70;
}

.account-statement-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.account-statement-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-statement-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.account-statement-title-row strong {
  font-size: 14px;
  color: #102b47;
}

.account-statement-ref-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #5d728c;
}

.account-statement-values {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 108px;
}

.account-statement-book-values {
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  gap: 7px;
  justify-items: stretch;
  min-width: 300px;
}

.account-statement-value {
  border: 1px solid #d7e4f4;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 7px 9px;
  display: grid;
  gap: 2px;
}

.account-statement-value span {
  font-size: 11px;
  color: #60758f;
}

.account-statement-value strong {
  font-size: 14px;
  color: #163b70;
}

.account-statement-value.is-balance strong {
  color: #0f4e9a;
}

.account-statement-amount {
  font-size: 16px;
  color: #0f2945;
  white-space: nowrap;
}

.account-statement-balance {
  font-size: 11px;
  color: #60758f;
  white-space: nowrap;
}

.account-statement-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #4f657e;
}

.account-statement-note {
  font-size: 11px;
  color: #546a84;
  line-height: 1.35;
}

.account-entry-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-entry-badge.debit {
  background: #fff1df;
  color: #8a4c08;
}

.account-entry-badge.credit {
  background: #e6f4ea;
  color: #21653b;
}

.account-entry-badge.reversal {
  background: #fdecec;
  color: #9a2c23;
}

@media (max-width: 720px) {
  .credit-history-summary,
  .money-received-summary,
  .account-statement-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-statement-customer,
  .account-statement-head {
    grid-template-columns: 1fr;
  }

  .account-statement-values {
    justify-items: start;
    min-width: 0;
  }

  .account-statement-book-values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.product-form label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #60758f;
}
.product-form input,
.product-form select {
  padding: 11px 12px;
  border: 1px solid #d4dfef;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: #163b70;
}

#importProductsFileInput {
  padding: 12px;
  border: 1px dashed #c8d8ed;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
  color: #4d6480;
}

#importProductsFileInput::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 1px solid #d2deee;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
  color: #123a7a;
  font-weight: 700;
  cursor: pointer;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.receipt-80mm {
  width: min(100%, 80mm);
  margin: 0 auto;
  position: relative;
  max-width: 100%;
  font-family: "Courier Prime", "Courier New", Courier, monospace;
  font-size: 12px;
  line-height: 1.42;
  letter-spacing: 0.01em;
  color: #111;
  background: linear-gradient(180deg, #ffffff 0%, #fefefe 100%);
  padding: 10px 11px 12px;
  border: 1px solid #d5dde8;
  border-radius: 16px;
  box-shadow:
    0 22px 32px rgba(15, 23, 42, 0.14),
    0 6px 14px rgba(15, 23, 42, 0.08);
}
.receipt-58mm {
  width: min(100%, 58mm);
  margin: 0 auto;
  position: relative;
  max-width: 100%;
  font-family: "Courier Prime", "Courier New", Courier, monospace;
  font-size: 11px;
  line-height: 1.38;
  letter-spacing: 0.01em;
  color: #111;
  background: linear-gradient(180deg, #ffffff 0%, #fefefe 100%);
  padding: 10px 10px 11px;
  border: 1px solid #d5dde8;
  border-radius: 16px;
  box-shadow:
    0 18px 28px rgba(15, 23, 42, 0.14),
    0 5px 12px rgba(15, 23, 42, 0.08);
}

.receipt-80mm::before,
.receipt-58mm::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, rgba(24, 87, 179, 0.28), rgba(15, 118, 110, 0.24), rgba(24, 87, 179, 0.12));
  pointer-events: none;
}

.receipt-center {
  text-align: center;
}

.receipt-muted {
  color: #526070;
}

.receipt-sep {
  border-top: 1px dashed #8b97a7;
  margin: 8px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 1px 0;
}

.receipt-row > span:last-child {
  text-align: right;
}

.receipt-row.total {
  font-weight: 700;
  font-size: 14px;
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px dashed #a8b3c0;
}

.receipt-product-label {
  display: grid;
  gap: 8px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.receipt-product-label-list {
  display: grid;
  gap: 10px;
}

.receipt-product-label-copy {
  padding-bottom: 8px;
}

.receipt-product-label-sep {
  border-top: 1px dashed #c3ccd8;
}

.receipt-product-label-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.receipt-product-label-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.receipt-product-label-sub,
.receipt-product-label-fitment,
.receipt-product-label-note {
  font-size: 11px;
  color: #444;
  overflow-wrap: anywhere;
}

.receipt-product-label-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.receipt-product-label-meta > div {
  border: 1px solid #cfd7e2;
  border-radius: 6px;
  padding: 6px 7px;
  background: #fafcff;
}

.receipt-product-label-meta span {
  display: block;
  font-size: 10px;
  color: #4a5565;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.receipt-product-label-meta strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.receipt-product-label-barcode {
  padding: 10px 6px 4px;
  border: 1px dashed #9da8b8;
  border-radius: 8px;
  background: #fff;
}

.receipt-product-label-barcode svg {
  display: block;
  width: 100%;
  height: 44px;
}

.receipt-product-label-code {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.receipt-book-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.receipt-book-summary-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.receipt-book-summary > div {
  border: 1px solid #cfd7e2;
  border-radius: 6px;
  padding: 6px 7px;
  background: #fafcff;
}

.receipt-book-summary span {
  display: block;
  font-size: 10px;
  color: #4a5565;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.receipt-book-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.receipt-ledger-book-head {
  display: grid;
  gap: 6px;
  padding: 4px 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px dashed #222;
}

.receipt-ledger-book-head-6 {
  grid-template-columns: 60px minmax(0, 1.2fr) 48px 58px 58px 68px;
}

.receipt-ledger-book-head-5 {
  grid-template-columns: 72px minmax(0, 1.2fr) 48px 48px 60px;
}

.receipt-ledger-book-head-3,
.receipt-ledger-book-line-3 {
  grid-template-columns: minmax(0, 1fr) 72px 72px;
}

.receipt-ledger-book-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 8px;
}

.receipt-ledger-book-main {
  min-width: 0;
}

.receipt-ledger-book-headings {
  display: grid;
  gap: 6px;
  align-items: start;
}

.receipt-ledger-book-headings-3 {
  grid-template-columns: 60px minmax(0, 1fr) 48px;
}

.receipt-ledger-book-headings-2 {
  grid-template-columns: 72px minmax(0, 1fr);
}

.receipt-ledger-book-head-5 span:nth-child(2) {
  position: relative;
  left: -3px;
}

.receipt-ledger-book-headings-2 span:nth-child(2) {
  position: relative;
  left: -2px;
}

.receipt-ledger-book-head span:first-child,
.receipt-ledger-book-head span:nth-child(n + 3),
.receipt-ledger-book-headings-2 span:first-child,
.receipt-ledger-book-headings-3 span:first-child,
.receipt-ledger-book-headings-3 span:last-child,
.receipt-ledger-book-values span,
.receipt-ledger-book-values strong {
  white-space: nowrap;
}

.receipt-ledger-book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 3px;
  font-size: 10px;
  color: #4a5565;
}

.receipt-ledger-book-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.receipt-ledger-book-values > div {
  border: 1px solid #d4dbe6;
  border-radius: 6px;
  padding: 5px 6px;
  text-align: right;
  background: #fff;
}

.receipt-ledger-book-values span {
  display: block;
  font-size: 9px;
  color: #5a6778;
  text-transform: uppercase;
}

.receipt-ledger-book-values strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.receipt-58mm .receipt-ledger-book-head {
  gap: 4px;
  font-size: 9px;
}

.receipt-58mm .receipt-ledger-book-head-5 {
  display: none;
}

.receipt-58mm .receipt-ledger-book-headings {
  gap: 4px;
  font-size: 10px;
}

.receipt-58mm .receipt-ledger-book-headings-2 {
  grid-template-columns: 52px minmax(0, 1fr);
}

.receipt-58mm .receipt-ledger-book-row {
  grid-template-columns: 1fr;
  gap: 4px;
}

.receipt-58mm .receipt-ledger-book-values {
  gap: 3px;
}

.receipt-58mm .receipt-ledger-book-values > div {
  padding: 4px;
}

.receipt-58mm .receipt-ledger-book-values strong {
  font-size: 11px;
}

.receipt-item-ledger-head,
.receipt-item-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 66px 72px;
  gap: 6px;
  align-items: start;
}

.receipt-item-ledger-head {
  padding: 4px 0;
  border-bottom: 1px dashed #222;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.receipt-item-ledger-row {
  padding: 6px 0;
  border-bottom: 1px dashed #d4dbe6;
}

.receipt-item-ledger-row:last-child {
  border-bottom: 0;
}

.receipt-item-ledger-item {
  min-width: 0;
}

.receipt-item-ledger-item strong {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: #132a45;
  overflow-wrap: anywhere;
}

.receipt-item-ledger-value {
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
  color: #132a45;
}

.receipt-item-ledger-head-3,
.receipt-item-ledger-row-3 {
  grid-template-columns: minmax(0, 1fr) 42px 78px;
}

.receipt-58mm .receipt-item-ledger-head,
.receipt-58mm .receipt-item-ledger-row {
  grid-template-columns: minmax(0, 1fr) 30px 52px 56px;
  gap: 4px;
}

.receipt-58mm .receipt-item-ledger-head {
  font-size: 9px;
}

.receipt-58mm .receipt-item-ledger-item strong {
  font-size: 11px;
}

.receipt-58mm .receipt-item-ledger-value {
  font-size: 10px;
}

.receipt-58mm .receipt-item-ledger-head-3,
.receipt-58mm .receipt-item-ledger-row-3 {
  grid-template-columns: minmax(0, 1fr) 28px 58px;
}

.receipt-ledger-book-line {
  display: grid;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
}

.receipt-ledger-book-line span,
.receipt-ledger-book-line strong {
  display: block;
}

.receipt-ledger-book-line strong {
  text-align: right;
}

.receipt-accounting-note {
  margin-top: 3px;
  font-size: 10px;
  color: #475569;
  line-height: 1.35;
}

.receipt-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.98) 24%);
  padding-top: 10px;
  border-top: 1px solid #e6edf6;
}

.receipt-actions button {
  flex: 1;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
}

/* Keep modal-specific footers from inheriting sticky footer behavior */
.payment-receipts-wrap .payment-receipts-footer,
.money-received-wrap .money-received-footer,
.credit-history-wrap .receipt-actions,
.reports-wrap .reports-footer,
.inventory-wrap .receipt-actions,
.return-sale-wrap .return-sale-footer {
  position: static;
  bottom: auto;
  margin-top: 0;
  padding-top: 0;
  background: transparent;
  border-top: 0;
}

.payment-receipts-wrap .payment-receipts-footer button,
.money-received-wrap .money-received-footer button {
  flex: 0 0 auto;
}

#paymentReceiptsList {
  padding-bottom: 10px;
}

#paymentReceiptsList .load-more-btn {
  margin-bottom: 2px;
}

@media print {
  body * {
    visibility: hidden !important;
  }
  #receiptPrint,
  #receiptPrint * {
    visibility: visible !important;
  }
  #receiptPrint {
    position: absolute;
    left: 0;
    top: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    width: auto;
    box-shadow: none;
    background: #fff;
    max-width: none;
  }
  #receiptPrint::before,
  #receiptPrint::after {
    content: none !important;
    display: none !important;
  }
  @page {
    size: auto;
    margin: 4mm;
  }
}

@media (max-width: 1180px) {
  .cash-movement-shell {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .cash-book-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cash-movement-form-grid {
    grid-template-columns: 1fr;
  }

  .cash-movement-register-card {
    min-height: 320px;
  }

  .cash-movement-wrap .cash-movement-footer {
    grid-template-columns: 1fr;
  }

  .cash-movement-wrap .cash-movement-footer button {
    width: 100%;
  }

  .eod-reconcile-grid {
    grid-template-columns: 1fr;
  }

  .inventory-tabs-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .customer-master-controls {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .return-sale-row {
    grid-template-columns: 1fr;
  }
  .credit-history-controls {
    grid-template-columns: 1fr;
  }

  .money-received-controls {
    grid-template-columns: 1fr;
  }

  .credit-history-controls #resetCreditHistoryFiltersBtn {
    justify-self: stretch;
  }

  .money-received-controls #resetMoneyReceivedFiltersBtn {
    justify-self: stretch;
  }

  .inventory-grid,
  .inventory-supplier-master-grid,
  .inventory-analytics-grid,
  .inventory-return-analytics-grid {
    grid-template-columns: 1fr;
  }

  .inventory-dashboard-head,
  .inventory-dashboard-grid,
  #inventoryAnalyticsSummary {
    grid-template-columns: 1fr;
  }

  #inventoryReturnAnalyticsSummary {
    grid-template-columns: 1fr;
  }

  .inventory-purchase-summary-grid,
  .inventory-purchase-row {
    grid-template-columns: 1fr;
  }

  .inventory-purchase-qty {
    justify-items: start;
    text-align: left;
  }

  .inventory-return-card-top,
  .inventory-analytics-month-row,
  .inventory-analytics-compare-head,
  .inventory-analytics-compare-grid {
    grid-template-columns: 1fr;
  }

  .inventory-return-register-head {
    grid-template-columns: 1fr;
  }

  .inventory-return-row-head {
    grid-template-columns: 1fr;
  }

  .inventory-supplier-ledger-head,
  .inventory-supplier-ledger-values {
    grid-template-columns: 1fr;
  }

  .supplier-ledger-book-head,
  .supplier-ledger-book-row {
    min-width: 760px;
  }

  .inventory-analytics-month-actions,
  .inventory-analytics-card-actions,
  .inventory-return-row-actions,
  .inventory-return-register-actions {
    justify-content: flex-start;
  }

  .inventory-return-amount {
    justify-self: flex-start;
  }

  .inventory-analytics-trend-head {
    grid-template-columns: 1fr;
  }

  .inventory-analytics-trend-head small {
    text-align: left;
  }

  .inventory-analytics-trend-labels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-dashboard-period {
    text-align: left;
  }

  .inventory-two,
  .inventory-three,
  .inventory-input-action-row,
  .inventory-pair-row,
  .inventory-bill-row,
  .inventory-line-entry-row,
  .inventory-adjust-row,
  .inventory-movement-filters,
  .inventory-register-filters,
  .inventory-analytics-filters,
  .supplier-statement-controls {
    grid-template-columns: 1fr;
  }

  #inventoryPurchaseTab .inventory-grid {
    min-height: max-content;
    overflow: visible;
  }

  #inventoryPurchaseTab .inventory-purchase-entry-grid {
    display: grid;
  }

  #inventorySupplierPaymentsTab,
  #inventorySuppliersTab {
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
  }

  #inventoryPurchaseTab .inventory-block,
  #inventorySupplierPaymentsTab .inventory-grid,
  #inventorySuppliersTab .inventory-grid,
  #inventoryAnalyticsTab .inventory-grid,
  #inventoryReturnsTab .inventory-grid {
    min-height: max-content;
    overflow: visible;
  }

  #inventoryPurchaseTab .inventory-block,
  #inventorySupplierPaymentsTab .inventory-block,
  #inventorySuppliersTab .inventory-block,
  #inventoryAnalyticsTab .inventory-block,
  #inventoryReturnsTab .inventory-block {
    overflow: visible;
  }

  #inventorySuppliersTab .inventory-supplier-master-grid,
  .inventory-supplier-master-panel,
  .inventory-supplier-detail-block {
    height: auto;
  }

  .inventory-supplier-detail-block {
    overflow: visible;
  }

  #inventorySupplierMasterList.inventory-supplier-master-list {
    min-height: 420px;
    max-height: 62vh;
    height: auto;
  }

  #inventorySupplierHistoryList.inventory-movement-list {
    min-height: 240px;
    max-height: 360px;
    height: auto;
  }

  .payment-receipt-controls {
    grid-template-columns: 1fr;
  }

  .payment-receipt-controls #resetPaymentReceiptFiltersBtn {
    justify-self: stretch;
  }

  .payment-receipt-date-row {
    grid-template-columns: 1fr;
  }

  .catalog-search-status {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-search-actions {
    width: 100%;
  }

  .catalog-search-btn {
    flex: 1 1 0;
    min-width: 0;
  }
  .product-grid {
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
  .checkout-panel .action-btn {
    min-height: 44px;
  }
}

@media (max-width: 1180px) {
  .payment-receipt-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    align-items: start;
    min-width: 0;
  }

  .payment-receipt-col {
    white-space: normal;
  }

  .payment-receipt-amount {
    text-align: left;
  }

  .payment-receipt-date-row input {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .reports-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .brand-block {
    width: 100%;
  }

  .brand-meta {
    gap: 6px;
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
    padding: 5px;
  }

  .actions button {
    flex: 1 1 142px;
    justify-content: center;
    min-width: 0;
  }

  .checkout-receipt-bar {
    margin: 10px 14px 0;
    padding: 14px;
  }

  .checkout-receipt-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .checkout-receipt-actions button {
    flex: 1 1 138px;
    min-width: 0;
  }

  .receipt-preference-row {
    grid-template-columns: 1fr;
  }

  .print-setup-toggle {
    grid-template-columns: 1fr;
  }

  .print-setup-toggle input {
    margin-top: 0;
  }

  .receipt-book-summary,
  .receipt-book-summary-2 {
    grid-template-columns: 1fr;
  }

  .receipt-ledger-book-head-6,
  .receipt-ledger-book-head-5,
  .receipt-ledger-book-headings-3,
  .receipt-ledger-book-headings-2,
  .receipt-ledger-book-row {
    grid-template-columns: 1fr;
  }

  .receipt-ledger-book-values,
  .receipt-ledger-book-line-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .customer-master-item-head,
  .inventory-supplier-master-head {
    grid-template-columns: 1fr;
  }

  .customer-master-type,
  .inventory-supplier-status,
  .inventory-supplier-open-chip {
    justify-self: start;
  }

  .cash-book-controls,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .product-modal-wrap .receipt-actions,
  .import-modal-wrap .receipt-actions,
  .cash-book-wrap .payment-receipts-footer,
  .eod-footer {
    flex-wrap: wrap;
  }

  .product-modal-wrap .receipt-actions button,
  .import-modal-wrap .receipt-actions button,
  .cash-book-wrap .payment-receipts-footer button,
  .eod-footer button {
    flex: 1 1 100%;
    min-width: 0;
  }

  .eod-report-title-row,
  .cash-book-row .line-head,
  .cash-book-running {
    flex-direction: column;
    align-items: flex-start;
  }

  .receipt-modal {
    padding: 12px;
  }

  .receipt-preview-wrap {
    width: min(calc(100vw - 24px), 560px);
    max-height: 94vh;
    padding: 12px;
    gap: 9px;
  }

  .receipt-preview-meta {
    padding: 10px 11px;
    font-size: 11.5px;
  }

  .receipt-preview-surface {
    padding: 12px 10px;
    border-radius: 16px;
  }

  .receipt-preview-wrap .receipt-actions {
    flex-wrap: wrap;
  }

  .receipt-preview-wrap .receipt-actions button {
    flex: 1 1 100%;
  }

  .pending-receipt-head,
  .pending-receipt-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pending-receipt-actions button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .inventory-tabs-bar {
    grid-template-columns: 1fr;
  }

  .reports-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-date-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .receipt-modal {
    padding: 8px;
  }

  .receipt-wrap {
    border-radius: 16px;
    padding: 12px;
  }

  .receipt-preview-wrap {
    width: min(calc(100vw - 16px), 560px);
    gap: 8px;
  }

  .receipt-preview-ruler {
    margin-bottom: 10px;
    font-size: 10px;
  }

  .receipt-preview-ruler span:last-child {
    padding: 3px 8px;
  }

  .receipt-preview-surface {
    padding: 10px 8px;
    border-radius: 14px;
  }

  .receipt-80mm,
  .receipt-58mm {
    padding: 8px 8px 9px;
    border-radius: 14px;
    box-shadow:
      0 16px 24px rgba(15, 23, 42, 0.12),
      0 4px 10px rgba(15, 23, 42, 0.07);
  }

  .receipt-80mm::before,
  .receipt-58mm::before {
    border-radius: 14px 14px 0 0;
  }
}
