/*
 * Thanki Dukaan V16.0.2 — UI-only Pro Max preview overlay
 * Scope: visual hierarchy, spacing, responsive layout, forms and tables.
 * Logic/API/IDs/events/calculation code: untouched.
 * Preview activation: body[data-td-ui="pro-max"]
 */

body[data-td-ui="pro-max"] {
  --pm-bg: #f3f7fb;
  --pm-surface: #ffffff;
  --pm-surface-soft: #f8fafc;
  --pm-line: #dce6ef;
  --pm-line-strong: #c8d6e3;
  --pm-text: #102033;
  --pm-muted: #64748b;
  --pm-navy: #071827;
  --pm-navy-2: #0d2a3f;
  --pm-teal: #0f8a78;
  --pm-teal-dark: #087064;
  --pm-green: #22a96f;
  --pm-amber: #f59e0b;
  --pm-red: #dc5a5a;
  --pm-blue: #3b82f6;
  --pm-shadow-sm: 0 3px 12px rgba(15, 35, 55, .06);
  --pm-shadow: 0 16px 40px rgba(15, 35, 55, .10);
  --pm-shadow-lg: 0 26px 70px rgba(5, 28, 47, .16);
  display: grid !important;
  grid-template-columns: 248px minmax(0, 1fr) !important;
  min-height: 100vh !important;
  background: var(--pm-bg) !important;
  color: var(--pm-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

html body[data-td-ui="pro-max"] .aiPurchaseDocumentPanel {
  border: 1px solid #b9ddd8 !important;
  border-top: 4px solid #0f766e !important;
  background: linear-gradient(180deg, #f7fffd 0, #fff 120px) !important;
}

html body[data-td-ui="pro-max"] .aiPurchaseDocumentPanel > summary {
  color: #123b3a;
  font-size: 15px;
  cursor: pointer;
}

html body[data-td-ui="pro-max"] .aiPurchaseHeaderGrid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  margin-top: 14px;
}

html body[data-td-ui="pro-max"] .aiPurchaseColumnMap {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d5e4e8;
  border-radius: 12px;
  background: #f8fafc;
}

html body[data-td-ui="pro-max"] .aiPurchaseColumnMap > summary {
  cursor: pointer;
  color: #24485a;
}

html body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode),
html body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) {
  grid-template-columns: minmax(0, 1fr) !important;
}

html body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) > .sidebar,
html body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) > .sidebar {
  display: none !important;
}
/* V16.0.2 invoice editor placement lock: table-row entry + compact top context */
body[data-td-ui="pro-max"] #userBadge,
body[data-td-ui="pro-max"] .proUiLogicHook {
  display: none !important;
}

body[data-td-ui="pro-max"] .invoiceTopContext {
  display: none !important;
}

body[data-td-ui="pro-max"] .salesRegisterTopContext {
  display: none !important;
}

body[data-td-ui="pro-max"] .purchaseRegisterTopContext,
body[data-td-ui="pro-max"] .purchaseTopContext,
body[data-td-ui="pro-max"] .itemMasterTopContext,
body[data-td-ui="pro-max"] .partyMasterTopContext,
body[data-td-ui="pro-max"] .orderCenterTopContext,
body[data-td-ui="pro-max"] .businessReportsTopContext {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#sales.active:not(.invoiceMode)) .topbar {
  min-height: 82px !important;
  margin: 0 0 18px !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
  background: linear-gradient(100deg, #063d3c 0%, #075b52 55%, #0f9f88 100%) !important;
  box-shadow: 0 12px 30px rgba(7, 44, 57, .18) !important;
}

body[data-td-ui="pro-max"]:has(#sales.active:not(.invoiceMode)) .topbar > div:first-child,
body[data-td-ui="pro-max"]:has(#sales.active:not(.invoiceMode)) .topbar #refreshBtn,
body[data-td-ui="pro-max"]:has(#sales.active:not(.invoiceMode)) .topbar #logoutBtn,
body[data-td-ui="pro-max"]:has(#sales.active:not(.invoiceMode)) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#sales.active:not(.invoiceMode)) .topbar > .actions {
  width: 100% !important;
  display: block !important;
}

body[data-td-ui="pro-max"]:has(#sales.active:not(.invoiceMode)) .salesRegisterTopContext {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(180px, 1.45fr) repeat(4, minmax(118px, 1fr)) minmax(122px, .75fr) !important;
  align-items: stretch !important;
  gap: 9px !important;
}

body[data-td-ui="pro-max"] .salesRegisterTopTitle,
body[data-td-ui="pro-max"] .salesRegisterTopContext article {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .salesRegisterTopTitle {
  padding-left: 7px !important;
  border-color: transparent !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] .salesRegisterTopTitle span,
body[data-td-ui="pro-max"] .salesRegisterTopContext article span {
  color: #a7ede1 !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .salesRegisterTopTitle strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -.04em !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .salesRegisterTopContext article strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .salesRegisterTopContext #showInvoiceBtn {
  min-width: 122px !important;
  min-height: 52px !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: #075c54 !important;
  box-shadow: 0 9px 20px rgba(3, 48, 45, .18) !important;
  font-weight: 950 !important;
}

body[data-td-ui="pro-max"]:has(#purchases.active:not(.purchaseMode)) .topbar {
  min-height: 82px !important;
  margin: 0 0 18px !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
  background: linear-gradient(100deg, #5c2608 0%, #a94412 55%, #e97824 100%) !important;
  box-shadow: 0 12px 30px rgba(103, 45, 10, .18) !important;
}

body[data-td-ui="pro-max"]:has(#purchases.active:not(.purchaseMode)) .topbar > div:first-child,
body[data-td-ui="pro-max"]:has(#purchases.active:not(.purchaseMode)) .topbar #refreshBtn,
body[data-td-ui="pro-max"]:has(#purchases.active:not(.purchaseMode)) .topbar #logoutBtn,
body[data-td-ui="pro-max"]:has(#purchases.active:not(.purchaseMode)) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#purchases.active:not(.purchaseMode)) .topbar > .actions {
  width: 100% !important;
  display: block !important;
}

body[data-td-ui="pro-max"]:has(#purchases.active:not(.purchaseMode)) .purchaseRegisterTopContext {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(180px, 1.45fr) repeat(4, minmax(118px, 1fr)) minmax(122px, .75fr) !important;
  align-items: stretch !important;
  gap: 9px !important;
}

body[data-td-ui="pro-max"] .purchaseRegisterTopTitle,
body[data-td-ui="pro-max"] .purchaseRegisterTopContext article {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid rgba(255, 255, 255, .19) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .09) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .purchaseRegisterTopTitle {
  padding-left: 7px !important;
  border-color: transparent !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] .purchaseRegisterTopTitle span,
body[data-td-ui="pro-max"] .purchaseRegisterTopContext article span {
  color: #ffdfc2 !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .purchaseRegisterTopTitle strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -.04em !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .purchaseRegisterTopContext article strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .purchaseRegisterTopContext #showPurchaseBtn {
  min-width: 122px !important;
  min-height: 52px !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: #9a3b0d !important;
  box-shadow: 0 9px 20px rgba(72, 28, 5, .2) !important;
  font-weight: 950 !important;
}

/* Item Master Pro register header */
body[data-td-ui="pro-max"]:has(#items.active) .topbar {
  min-height: 82px !important;
  margin: 0 0 18px !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
  background: linear-gradient(100deg, #0a326f 0%, #155ac4 55%, #2f7ff0 100%) !important;
  box-shadow: 0 12px 30px rgba(19, 78, 155, .2) !important;
}

body[data-td-ui="pro-max"]:has(#items.active) .topbar > div:first-child,
body[data-td-ui="pro-max"]:has(#items.active) .topbar #refreshBtn,
body[data-td-ui="pro-max"]:has(#items.active) .topbar #logoutBtn,
body[data-td-ui="pro-max"]:has(#items.active) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#items.active) .topbar > .actions {
  width: 100% !important;
  display: block !important;
}

body[data-td-ui="pro-max"]:has(#items.active) .itemMasterTopContext {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(170px, 1.35fr) repeat(4, minmax(100px, .86fr)) minmax(128px, 1.05fr) minmax(112px, .7fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body[data-td-ui="pro-max"] .itemMasterTopTitle,
body[data-td-ui="pro-max"] .itemMasterTopContext article {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .itemMasterTopTitle {
  padding-left: 7px !important;
  border-color: transparent !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] .itemMasterTopTitle span,
body[data-td-ui="pro-max"] .itemMasterTopContext article span {
  color: #cbe2ff !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .itemMasterTopTitle strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -.04em !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .itemMasterTopContext article strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 17px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .itemMasterTopContext #showItemFormBtn {
  min-width: 112px !important;
  min-height: 52px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: #1658b5 !important;
  box-shadow: 0 9px 20px rgba(8, 48, 105, .22) !important;
  font-weight: 950 !important;
}

/* Party Master Pro register header */
body[data-td-ui="pro-max"]:has(#parties.active) .topbar {
  min-height: 82px !important;
  margin: 0 0 18px !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
  background: linear-gradient(100deg, #31205f 0%, #5b36a8 54%, #7c4fe0 100%) !important;
  box-shadow: 0 12px 30px rgba(65, 39, 119, .2) !important;
}

body[data-td-ui="pro-max"]:has(#parties.active) .topbar > div:first-child,
body[data-td-ui="pro-max"]:has(#parties.active) .topbar #refreshBtn,
body[data-td-ui="pro-max"]:has(#parties.active) .topbar #logoutBtn,
body[data-td-ui="pro-max"]:has(#parties.active) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#parties.active) .topbar > .actions {
  width: 100% !important;
  display: block !important;
}

body[data-td-ui="pro-max"]:has(#parties.active) .partyMasterTopContext {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(170px, 1.35fr) repeat(5, minmax(106px, 1fr)) minmax(116px, .72fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body[data-td-ui="pro-max"] .partyMasterTopTitle,
body[data-td-ui="pro-max"] .partyMasterTopContext article {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .partyMasterTopTitle {
  padding-left: 7px !important;
  border-color: transparent !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] .partyMasterTopTitle span,
body[data-td-ui="pro-max"] .partyMasterTopContext article span {
  color: #ded1ff !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .partyMasterTopTitle strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -.04em !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .partyMasterTopContext article strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 17px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .partyMasterTopContext #showPartyFormBtn {
  min-width: 116px !important;
  min-height: 52px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: #56309f !important;
  box-shadow: 0 9px 20px rgba(42, 25, 82, .22) !important;
  font-weight: 950 !important;
}

body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) .topbar {
  min-height: 76px !important;
  margin: 0 0 18px !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
  background: linear-gradient(100deg, #3f1c08 0%, #8f360f 52%, #c75b17 100%) !important;
  box-shadow: 0 12px 30px rgba(91, 35, 7, .2) !important;
}

body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) .topbar > div:first-child,
body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) .topbar #refreshBtn,
body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) .topbar #logoutBtn,
body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) .topbar > .actions {
  width: 100% !important;
  display: block !important;
}

body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) .purchaseTopContext {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(105px, .9fr) minmax(78px, .62fr) minmax(145px, 1.2fr) minmax(100px, .8fr) minmax(112px, .92fr) repeat(3, minmax(92px, .72fr)) repeat(2, minmax(42px, .34fr)) minmax(90px, .72fr) auto !important;
  align-items: stretch !important;
  gap: 7px !important;
}

body[data-td-ui="pro-max"] .purchaseTopTitle,
body[data-td-ui="pro-max"] .purchaseTopNumber,
body[data-td-ui="pro-max"] .purchaseTopControl,
body[data-td-ui="pro-max"] .purchaseTopMetric {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(255, 255, 255, .17) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .purchaseTopTitle {
  padding-left: 5px !important;
  border-color: transparent !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] .purchaseTopTitle span,
body[data-td-ui="pro-max"] .purchaseTopNumber span,
body[data-td-ui="pro-max"] .purchaseTopControl span,
body[data-td-ui="pro-max"] .purchaseTopMetric span {
  color: #ffddbf !important;
  font-size: 8px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .purchaseTopTitle strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 17px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .purchaseTopNumber strong,
body[data-td-ui="pro-max"] .purchaseTopMetric strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .purchaseTopTotal strong { font-size: 18px !important; }

body[data-td-ui="pro-max"] .purchaseTopControl { gap: 4px !important; }
body[data-td-ui="pro-max"] .purchaseTopControl input,
body[data-td-ui="pro-max"] .purchaseTopControl select {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 3px 7px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, .95) !important;
  color: #3b1a08 !important;
  font-size: 10px !important;
  font-weight: 850 !important;
}

body[data-td-ui="pro-max"] .purchaseTopActions {
  display: flex !important;
  align-items: stretch !important;
}

body[data-td-ui="pro-max"] .purchaseTopActions .ghostBtn {
  min-height: 100% !important;
  padding: 8px 13px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #7d300d !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .topbar {
  min-height: 76px !important;
  margin: 0 0 18px !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
  background: linear-gradient(100deg, #072c39 0%, #075b52 100%) !important;
  box-shadow: 0 12px 30px rgba(7, 44, 57, .18) !important;
}

body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .topbar > div:first-child,
body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .topbar #refreshBtn,
body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .topbar #logoutBtn,
body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .topbar > .actions {
  width: 100% !important;
  display: block !important;
}

body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .invoiceTopContext {
  width: 100% !important;
  display: grid !important;
  grid-template-columns:
    minmax(110px, 1fr)
    minmax(88px, .7fr)
    minmax(180px, 1.6fr)
    minmax(112px, 1fr)
    minmax(118px, 1.1fr)
    minmax(96px, .85fr)
    minmax(96px, .85fr)
    minmax(44px, .42fr)
    minmax(44px, .42fr)
    minmax(92px, .8fr)
    auto !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body[data-td-ui="pro-max"] .invoiceTopTitle,
body[data-td-ui="pro-max"] .invoiceTopNumber,
body[data-td-ui="pro-max"] .invoiceTopControl,
body[data-td-ui="pro-max"] .invoiceTopMetric {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 8px 11px !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .invoiceTopTitle {
  padding-left: 6px !important;
  border-color: transparent !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] .invoiceTopTitle span,
body[data-td-ui="pro-max"] .invoiceTopNumber span,
body[data-td-ui="pro-max"] .invoiceTopControl span,
body[data-td-ui="pro-max"] .invoiceTopMetric span {
  color: #a7ede1 !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .invoiceTopTitle strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  letter-spacing: -.035em !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .invoiceTopNumber strong,
body[data-td-ui="pro-max"] .invoiceTopMetric strong {
  margin-top: 2px !important;
  color: #fff !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .invoiceTopTotal strong {
  font-size: 19px !important;
}

body[data-td-ui="pro-max"] .invoiceTopControl {
  gap: 4px !important;
  margin: 0 !important;
}

body[data-td-ui="pro-max"] .invoiceTopControl input,
body[data-td-ui="pro-max"] .invoiceTopControl select {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 25px !important;
  padding: 2px 4px !important;
  border: 0 !important;
  border-radius: 6px !important;
  outline: 0 !important;
  background: rgba(255, 255, 255, .94) !important;
  color: #123245 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
}

body[data-td-ui="pro-max"] .invoiceTopActions {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body[data-td-ui="pro-max"] .invoiceTopActions button,
body[data-td-ui="pro-max"] .topbar .invoiceTopActions button:not(.primary) {
  min-height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .09) !important;
  color: #fff !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel {
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable {
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #cadbe2 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 44, 61, .08) !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll {
  min-height: 280px !important;
  overflow: auto !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll table {
  width: 100% !important;
  min-width: var(--invoice-table-min-width, 100%) !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

@media (min-width: 761px) {
  html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll table {
    min-width: var(--invoice-table-min-width, 100%) !important;
  }
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll th:nth-child(1),
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll td:nth-child(1) { width: 35% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll th:nth-child(2),
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll td:nth-child(2) { width: 8% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll th:nth-child(3),
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll td:nth-child(3) { width: 8% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll th:nth-child(4),
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll td:nth-child(4) { width: 12% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll th:nth-child(5),
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll td:nth-child(5) { width: 17% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll th:nth-child(6),
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll td:nth-child(6) { width: 11% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll th:nth-child(7),
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll td:nth-child(7) { width: 9% !important; }

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="item"] { width: 31% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="qty"],
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="free"] { width: 7% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="rate"] { width: 10% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="discount"] { width: 14% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="gst"] { width: 8% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="total"] { width: 13% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="action"] { width: 10% !important; }
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-sale-column-header],
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-sale-column-cell],
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll .uiDynamicLineCell { width: 104px !important; }

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll thead [data-invoice-col="item"],
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll tbody td[data-invoice-col="item"] {
  position: sticky !important;
  left: 0 !important;
  z-index: 4 !important;
  box-shadow: 8px 0 14px rgba(15, 35, 55, .07) !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll tbody td[data-invoice-col="item"] {
  background: #fff !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll .invoiceEntryRow td[data-invoice-col="item"] {
  background: #f8fbfc !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll thead [data-invoice-col="action"],
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll tbody td[data-invoice-col="action"] {
  position: sticky !important;
  right: 0 !important;
  z-index: 4 !important;
  background: #fff !important;
  box-shadow: -8px 0 14px rgba(15, 35, 55, .07) !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll .invoiceEntryRow td[data-invoice-col="action"] {
  background: #f8fbfc !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll thead th {
  height: 38px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  background: #0d2238 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel #invoiceLinesBody tr:only-child:not(:has(button, small, .overrideBadge)) {
  display: none !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow td {
  height: 56px !important;
  padding: 7px !important;
  border: 0 !important;
  border-bottom: 1px solid #d9e5ea !important;
  background: #f8fbfc !important;
  vertical-align: middle !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow input,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow select {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 9px !important;
  border: 1px solid #c8d9e0 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #132f43 !important;
  font-weight: 800 !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow .posItemPick {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  display: block !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow #lineItemSearch {
  padding-right: 48px !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow .discountPair {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  gap: 5px !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow #lineTotalPreview {
  display: block !important;
  color: #0b5f55 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow #lineGstPreview,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .uiGstLineCell {
  display: block !important;
  color: #b45309 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceOptionalCell.hidden,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel [data-sale-column-header].hidden,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .uiDynamicLineCell.hidden {
  display: none !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow #addLineBtn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 8px !important;
  border-radius: 9px !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryOptionsRow td,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceOptionalRow td {
  padding: 0 !important;
  border: 0 !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions {
  min-height: 38px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 5px 8px !important;
  border-bottom: 1px solid #e1e9ed !important;
  background: #f7fafb !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions .fieldMenu {
  position: relative !important;
  width: auto !important;
  border: 0 !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions .fieldMenu summary {
  min-height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 6px 9px !important;
  border: 1px solid #cedce2 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions .fieldMenu:not([open]) .posFieldToggles {
  display: none !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions .fieldMenu[open] .posFieldToggles {
  position: absolute !important;
  left: 0 !important;
  top: calc(100% + 6px) !important;
  z-index: 40 !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions .posInfoStrip {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 8px 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions .posInfoStrip > span,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions .posInfoStrip > label {
  margin: 0 !important;
  color: #526b7c !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceOptionalFields {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 7px !important;
  padding: 8px !important;
  border-bottom: 1px solid #e1e9ed !important;
  background: #f8fbfc !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceOptionalFields input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceOptionalRow:not(:has(input:not(.hidden))) {
  display: none !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel #invoiceLinesBody td:last-child button {
  width: 100% !important;
  min-width: 0 !important;
  padding: 6px 3px !important;
  font-size: 9px !important;
}

@media (max-width: 1180px) {
  body[data-td-ui="pro-max"]:has(#sales.active:not(.invoiceMode)) .salesRegisterTopContext {
    display: flex !important;
    overflow-x: auto !important;
  }

  body[data-td-ui="pro-max"] .salesRegisterTopTitle { flex: 0 0 180px !important; }
  body[data-td-ui="pro-max"] .salesRegisterTopContext article { flex: 0 0 128px !important; }
  body[data-td-ui="pro-max"] .salesRegisterTopContext #showInvoiceBtn { flex: 0 0 124px !important; }

  body[data-td-ui="pro-max"]:has(#purchases.active:not(.purchaseMode)) .purchaseRegisterTopContext,
  body[data-td-ui="pro-max"]:has(#purchases.active.purchaseMode) .purchaseTopContext {
    display: flex !important;
    overflow-x: auto !important;
  }

  body[data-td-ui="pro-max"] .purchaseRegisterTopTitle { flex: 0 0 190px !important; }
  body[data-td-ui="pro-max"] .purchaseRegisterTopContext article { flex: 0 0 132px !important; }
  body[data-td-ui="pro-max"] .purchaseRegisterTopContext #showPurchaseBtn { flex: 0 0 128px !important; }
  body[data-td-ui="pro-max"] .purchaseTopTitle { flex: 0 0 122px !important; }
  body[data-td-ui="pro-max"] .purchaseTopNumber { flex: 0 0 88px !important; }
  body[data-td-ui="pro-max"] .purchaseTopControl { flex: 0 0 132px !important; }
  body[data-td-ui="pro-max"] .purchaseTopMetric { flex: 0 0 58px !important; }
  body[data-td-ui="pro-max"] .purchaseTopTotal { flex-basis: 100px !important; }
  body[data-td-ui="pro-max"] .purchaseTopActions { flex: 0 0 128px !important; }

  body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .invoiceTopContext {
    display: flex !important;
    overflow-x: auto !important;
  }

  body[data-td-ui="pro-max"] .invoiceTopTitle { min-width: 122px !important; }
  body[data-td-ui="pro-max"] .invoiceTopNumber { min-width: 94px !important; }
  body[data-td-ui="pro-max"] .invoiceTopControl { min-width: 112px !important; }
  body[data-td-ui="pro-max"] .invoiceTopMetric { min-width: 56px !important; }
  body[data-td-ui="pro-max"] .invoiceTopActions { min-width: 170px !important; }
}

@media (max-width: 760px) {
  html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll table {
    min-width: max(720px, var(--invoice-table-min-width, 720px)) !important;
  }

  body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .topbar {
    padding: 7px !important;
  }

  body[data-td-ui="pro-max"]:has(#sales.active.invoiceMode) .invoiceTopContext {
    display: flex !important;
    overflow-x: auto !important;
    gap: 7px !important;
  }

  body[data-td-ui="pro-max"] .invoiceTopTitle { min-width: 140px !important; }
  body[data-td-ui="pro-max"] .invoiceTopNumber { min-width: 112px !important; }
  body[data-td-ui="pro-max"] .invoiceTopControl { min-width: 118px !important; }
  body[data-td-ui="pro-max"] .invoiceTopMetric { min-width: 68px !important; }
  body[data-td-ui="pro-max"] .invoiceTopTotal { min-width: 126px !important; }
  body[data-td-ui="pro-max"] .invoiceTopActions { min-width: 230px !important; }

  body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceOptionalFields {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* Static preview shell only: authentication is deliberately not executed. */
body[data-td-preview="static"] > .loginScreen,
body[data-td-preview="static"] > dialog {
  display: none !important;
}

body[data-td-ui="pro-max"] .tdPreviewBadge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(15, 23, 42, .94);
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .24);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  pointer-events: none;
}

body[data-td-ui="pro-max"] .tdPreviewBadge span {
  color: #99f6e4;
  font-size: 10px;
}

body[data-td-ui="pro-max"] #sales .tdStatus {
  display: inline-flex;
  align-items: center;
  min-width: 62px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

body[data-td-ui="pro-max"] #sales .tdStatus.due {
  background: #fee2e2;
  color: #b91c1c;
}

body[data-td-ui="pro-max"] #sales .tdStatus.partial {
  background: #fef3c7;
  color: #92400e;
}

body[data-td-ui="pro-max"] #sales .tdStatus.paid {
  background: #d1fae5;
  color: #047857;
}

body[data-td-ui="pro-max"] #sales .tdAmountDue {
  color: #b91c1c;
  font-weight: 900;
}

body[data-td-ui="pro-max"] #sales .tdRowAction {
  min-height: 32px !important;
  padding: 6px 12px !important;
  border-color: #b7d6d2 !important;
  color: #0f766e !important;
  background: #f0fdfa !important;
  font-weight: 800 !important;
}

body[data-td-ui="pro-max"] * {
  box-sizing: border-box;
}

/* Professional navigation shell */
body[data-td-ui="pro-max"] .sidebar {
  position: sticky !important;
  top: 0 !important;
  z-index: 70 !important;
  width: 248px !important;
  height: 100vh !important;
  padding: 18px 14px 22px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background:
    radial-gradient(circle at 20% 4%, rgba(34, 197, 153, .18), transparent 24%),
    linear-gradient(180deg, #081b2b 0%, #071421 54%, #06111c 100%) !important;
  border-right: 1px solid rgba(148, 202, 207, .14) !important;
  box-shadow: 18px 0 50px rgba(6, 20, 33, .14) !important;
  color: #e9f7f4 !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 202, 207, .30) transparent;
}

body[data-td-ui="pro-max"] .sidebar .brand {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 11px !important;
  margin: 0 0 18px !important;
  padding: 2px 4px 18px !important;
  border-bottom: 1px solid rgba(203, 239, 234, .12) !important;
}

body[data-td-ui="pro-max"] .sidebar .mark {
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, #20b99c, #0a7b70) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  box-shadow: 0 12px 25px rgba(20, 184, 166, .28) !important;
}

body[data-td-ui="pro-max"] .sidebar .brand h1 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  font-weight: 850 !important;
  letter-spacing: -.025em !important;
}

body[data-td-ui="pro-max"] .sidebar nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

body[data-td-ui="pro-max"] .sidebar .navGroupLabel {
  display: block !important;
  margin: 16px 8px 6px !important;
  color: #7fa0b2 !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: .13em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .sidebar nav button,
body[data-td-ui="pro-max"] .sidebar nav .navLink {
  position: relative !important;
  width: 100% !important;
  min-height: 39px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 9px 11px 9px 29px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: #bed0da !important;
  box-shadow: none !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 720 !important;
  text-align: left !important;
  text-decoration: none !important;
  transform: none !important;
}

body[data-td-ui="pro-max"] .sidebar nav button::before,
body[data-td-ui="pro-max"] .sidebar nav .navLink::before {
  content: "" !important;
  position: absolute !important;
  left: 12px !important;
  width: 7px !important;
  height: 7px !important;
  border: 2px solid #618292 !important;
  border-radius: 50% !important;
  background: transparent !important;
  transition: .18s ease !important;
}

body[data-td-ui="pro-max"] .sidebar nav button:hover,
body[data-td-ui="pro-max"] .sidebar nav .navLink:hover {
  background: rgba(203, 239, 234, .07) !important;
  border-color: rgba(203, 239, 234, .10) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .sidebar nav button.active {
  background: linear-gradient(135deg, rgba(15, 138, 120, .96), rgba(11, 102, 95, .96)) !important;
  border-color: rgba(153, 246, 228, .28) !important;
  color: #fff !important;
  box-shadow: 0 11px 24px rgba(4, 75, 70, .30) !important;
  font-weight: 850 !important;
}

body[data-td-ui="pro-max"] .sidebar nav button.active::before,
body[data-td-ui="pro-max"] .sidebar nav .navLink:hover::before {
  border-color: #8af1df !important;
  background: #8af1df !important;
  box-shadow: 0 0 0 4px rgba(138, 241, 223, .12) !important;
}

/* Main workspace and top command bar */
body[data-td-ui="pro-max"] main {
  min-width: 0 !important;
  min-height: 100vh !important;
  padding: 0 !important;
  background:
    radial-gradient(circle at 96% 4%, rgba(15, 138, 120, .07), transparent 23%),
    linear-gradient(180deg, #f7fafc 0%, var(--pm-bg) 100%) !important;
}

body[data-td-ui="pro-max"] .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  min-height: 72px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 12px 24px !important;
  background: rgba(255, 255, 255, .94) !important;
  color: var(--pm-text) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pm-line) !important;
  box-shadow: 0 8px 28px rgba(15, 35, 55, .055) !important;
  backdrop-filter: blur(18px) !important;
}

body[data-td-ui="pro-max"] .topbar h2 {
  margin: 0 !important;
  color: var(--pm-text) !important;
  font-size: 24px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  letter-spacing: -.045em !important;
  text-shadow: none !important;
}

body[data-td-ui="pro-max"] .topbar .actions {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

body[data-td-ui="pro-max"] .topbar .badge {
  max-width: 360px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding: 8px 12px !important;
  border: 1px solid var(--pm-line) !important;
  border-radius: 999px !important;
  background: #f7fafc !important;
  color: #42566a !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-td-ui="pro-max"] .topbar button,
body[data-td-ui="pro-max"] .topbar button:not(.primary) {
  min-height: 40px !important;
  padding: 9px 14px !important;
  border: 1px solid var(--pm-line-strong) !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #25394d !important;
  box-shadow: var(--pm-shadow-sm) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body[data-td-ui="pro-max"] .topbar button.primary,
body[data-td-ui="pro-max"] .topbar #newInvoiceBtn {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--pm-teal), var(--pm-teal-dark)) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(15, 138, 120, .24) !important;
}

body[data-td-ui="pro-max"] main > section.view.active {
  display: block !important;
  min-height: calc(100vh - 72px) !important;
  padding: 22px 24px 42px !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] main > section.view:not(.active) {
  display: none !important;
}

/* Shared cards, controls and tables for every ERP screen */
body[data-td-ui="pro-max"] .panel,
body[data-td-ui="pro-max"] .toolbar,
body[data-td-ui="pro-max"] .tableWrap,
body[data-td-ui="pro-max"] .inlineForm,
body[data-td-ui="pro-max"] .bulkActionBar,
body[data-td-ui="pro-max"] .metrics article,
body[data-td-ui="pro-max"] .salesStats article {
  border: 1px solid var(--pm-line) !important;
  border-radius: 16px !important;
  background: var(--pm-surface) !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

body[data-td-ui="pro-max"] .panel {
  margin-bottom: 14px !important;
  padding: 18px !important;
}

body[data-td-ui="pro-max"] .panelHead {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
}

body[data-td-ui="pro-max"] .panelHead h3,
body[data-td-ui="pro-max"] .panel h3 {
  margin: 0 !important;
  color: var(--pm-text) !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: -.03em !important;
}

body[data-td-ui="pro-max"] .eyebrow {
  margin: 0 0 5px !important;
  color: #6a8395 !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  font-weight: 950 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] button,
body[data-td-ui="pro-max"] .linkBtn,
body[data-td-ui="pro-max"] .fileAction {
  border-radius: 11px !important;
  font-weight: 820 !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease !important;
}

body[data-td-ui="pro-max"] button:hover,
body[data-td-ui="pro-max"] .linkBtn:hover,
body[data-td-ui="pro-max"] .fileAction:hover {
  transform: translateY(-1px) !important;
}

body[data-td-ui="pro-max"] button.primary,
body[data-td-ui="pro-max"] .primary {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--pm-teal), var(--pm-teal-dark)) !important;
  color: #fff !important;
  box-shadow: 0 11px 23px rgba(15, 138, 120, .20) !important;
}

body[data-td-ui="pro-max"] input,
body[data-td-ui="pro-max"] select,
body[data-td-ui="pro-max"] textarea {
  min-height: 42px !important;
  border: 1px solid var(--pm-line-strong) !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: var(--pm-text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

body[data-td-ui="pro-max"] input::placeholder,
body[data-td-ui="pro-max"] textarea::placeholder {
  color: #8b9bab !important;
}

body[data-td-ui="pro-max"] input:focus,
body[data-td-ui="pro-max"] select:focus,
body[data-td-ui="pro-max"] textarea:focus {
  outline: 0 !important;
  border-color: var(--pm-teal) !important;
  box-shadow: 0 0 0 4px rgba(15, 138, 120, .12) !important;
}

body[data-td-ui="pro-max"] .tableWrap {
  min-width: 0 !important;
  overflow: auto !important;
  padding: 0 !important;
}

body[data-td-ui="pro-max"] table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 4 !important;
  padding: 12px 13px !important;
  border: 0 !important;
  border-bottom: 1px solid #d7e4eb !important;
  background: #eaf4f3 !important;
  color: #294557 !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  letter-spacing: .065em !important;
  text-align: left !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] tbody td {
  padding: 12px 13px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf2f6 !important;
  background: #fff !important;
  color: #24384c !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  vertical-align: middle !important;
}

body[data-td-ui="pro-max"] tbody tr:nth-child(even) td {
  background: #fbfdfe !important;
}

body[data-td-ui="pro-max"] tbody tr:hover td {
  background: #f1faf8 !important;
}

/* Sales Pro Max register */
body[data-td-ui="pro-max"] #sales.active {
  --sales-accent: #0a8a75;
  --sales-deep: #07352f;
}

body[data-td-ui="pro-max"]:has(#sales.active) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"] #sales .salesHero {
  min-height: 88px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin: 0 0 14px !important;
  padding: 18px 22px !important;
  overflow: hidden !important;
  border: 1px solid rgba(129, 230, 205, .16) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 88% 15%, rgba(82, 226, 185, .25), transparent 23%),
    linear-gradient(135deg, #082b2a 0%, #0a5f55 58%, #108a75 100%) !important;
  box-shadow: var(--pm-shadow-lg) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] #sales .salesHero .eyebrow {
  color: #a7f3df !important;
}

body[data-td-ui="pro-max"] #sales .salesHero h2 {
  max-width: 650px !important;
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(22px, 1.7vw, 27px) !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
  letter-spacing: -.055em !important;
}

body[data-td-ui="pro-max"] #sales .salesHero #showInvoiceBtn {
  flex: 0 0 auto !important;
  min-height: 48px !important;
  padding: 12px 18px !important;
  border: 1px solid rgba(255, 255, 255, .42) !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: #07594e !important;
  box-shadow: 0 14px 30px rgba(2, 37, 34, .25) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-td-ui="pro-max"] #sales .salesStats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 0 14px !important;
}

body[data-td-ui="pro-max"] #sales .salesStats article {
  position: relative !important;
  min-height: 98px !important;
  margin: 0 !important;
  padding: 17px 18px !important;
  overflow: hidden !important;
  border-left: 4px solid var(--sales-accent) !important;
  border-radius: 15px !important;
  background: linear-gradient(145deg, #fff, #f9fcfc) !important;
  box-shadow: 0 10px 28px rgba(15, 35, 55, .075) !important;
}

body[data-td-ui="pro-max"] #sales .salesStats article::before {
  content: "" !important;
  position: absolute !important;
  top: 14px !important;
  right: 15px !important;
  width: 29px !important;
  height: 29px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(15, 138, 120, .16), rgba(34, 169, 111, .08)) !important;
}

body[data-td-ui="pro-max"] #sales .salesStats article:nth-child(2) {
  border-left-color: var(--pm-blue) !important;
}

body[data-td-ui="pro-max"] #sales .salesStats article:nth-child(3) {
  border-left-color: var(--pm-amber) !important;
}

body[data-td-ui="pro-max"] #sales .salesStats article:nth-child(4) {
  border-left-color: var(--pm-green) !important;
}

body[data-td-ui="pro-max"] #sales .salesStats span {
  display: block !important;
  color: #6d8293 !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .10em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #sales .salesStats strong {
  display: block !important;
  margin-top: 10px !important;
  color: #122638 !important;
  font-size: 25px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: -.055em !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterToolbar {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.8fr) minmax(150px, .7fr) minmax(145px, .65fr) !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 0 12px !important;
  padding: 10px !important;
  border: 1px solid var(--pm-line) !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterToolbar > * {
  width: 100% !important;
  margin: 0 !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterTable {
  max-width: 100% !important;
  min-height: 210px !important;
  border-radius: 15px !important;
  box-shadow: var(--pm-shadow) !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterTable table {
  min-width: 810px !important;
  table-layout: auto !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterTable th:last-child,
body[data-td-ui="pro-max"] #sales .salesRegisterTable td:last-child {
  position: sticky !important;
  right: 0 !important;
  z-index: 6 !important;
  min-width: 96px !important;
  background: #f6fafb !important;
  box-shadow: -10px 0 22px rgba(15, 35, 55, .07) !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterTable tbody tr:not(:has(button, a)) td:not(:first-child) {
  display: none !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterTable tbody tr:not(:has(button, a)) {
  display: block !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterTable tbody tr:not(:has(button, a)) td:first-child {
  width: 100% !important;
  min-height: 176px !important;
  display: grid !important;
  place-items: center !important;
  padding: 48px 20px !important;
  color: #718397 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-align: center !important;
  background: linear-gradient(180deg, #fff, #f9fcfd) !important;
}

body[data-td-ui="pro-max"] #sales .salesRegisterTable tbody tr:not(:has(button, a)) td:first-child::before {
  content: none !important;
  display: none !important;
}

body[data-td-ui="pro-max"] .financeModuleHeader.panel {
  border: 0 !important;
  border-radius: 0 0 15px 15px !important;
  background: linear-gradient(135deg, #073c3a, #0f766e) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 118, 110, .16) !important;
}

body[data-td-ui="pro-max"] .financeModuleHeader.panel h2 { color: #fff !important; }
body[data-td-ui="pro-max"] .financeModuleHeader.panel .eyebrow { color: #99f6e4 !important; }

/* POS mode: preserve all controls/IDs while improving visual density */
body[data-td-ui="pro-max"] #sales.invoiceMode {
  padding: 14px 16px 28px !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode .salesHero,
body[data-td-ui="pro-max"] #sales.invoiceMode .salesStats,
body[data-td-ui="pro-max"] #sales.invoiceMode .salesRegisterToolbar,
body[data-td-ui="pro-max"] #sales.invoiceMode .salesRegisterTable {
  display: none !important;
}

body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel {
  display: block !important;
}

body[data-td-ui="pro-max"] #invoicePanel.posInvoicePanel {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #cfe0e7 !important;
  border-radius: 20px !important;
  background: #eef4f6 !important;
  box-shadow: var(--pm-shadow-lg) !important;
}

body[data-td-ui="pro-max"] #invoicePanel .modernPosHeader {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto auto !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 17px 19px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(135deg, #071827, #075c54) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] #invoicePanel .modernPosHeader h3 {
  color: #fff !important;
  font-size: 22px !important;
}

body[data-td-ui="pro-max"] #invoicePanel .modernPosHeader .eyebrow,
body[data-td-ui="pro-max"] #invoicePanel .modernPosHeader small {
  color: #bcece3 !important;
}

body[data-td-ui="pro-max"] #invoicePanel .posShell {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 31%) !important;
  gap: 12px !important;
  padding: 12px !important;
}

body[data-td-ui="pro-max"] #invoicePanel .posWorkArea,
body[data-td-ui="pro-max"] #invoicePanel .proCheckout {
  min-width: 0 !important;
}

body[data-td-ui="pro-max"] #invoicePanel .posTopStrip {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-td-ui="pro-max"] #invoicePanel .posTopStrip label,
body[data-td-ui="pro-max"] #invoicePanel .posTopStrip input,
body[data-td-ui="pro-max"] #invoicePanel .posTopStrip select {
  min-width: 0 !important;
  width: 100% !important;
}

body[data-td-ui="pro-max"] #invoicePanel .posTopStrip,
body[data-td-ui="pro-max"] #invoicePanel .proItemEntry,
body[data-td-ui="pro-max"] #invoicePanel .posInfoStrip,
body[data-td-ui="pro-max"] #invoicePanel .proCheckout {
  border: 1px solid #d6e4e9 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

body[data-td-ui="pro-max"] #invoicePanel .proItemEntry {
  top: 76px !important;
  z-index: 20 !important;
  grid-template-columns: minmax(210px, 1fr) 64px 64px 78px minmax(102px, .55fr) 64px !important;
  gap: 8px !important;
  padding: 10px !important;
}

body[data-td-ui="pro-max"] #invoicePanel .proBillTable {
  min-height: 300px !important;
  border-radius: 14px !important;
}
/* Invoice editor Pro Max - register visual is intentionally untouched */
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .modernPosHeader {
  grid-template-columns: minmax(190px, 1fr) auto auto !important;
  gap: 12px !important;
  padding: 14px 17px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .modernPosTitle .eyebrow {
  margin: 0 0 3px !important;
  color: #8ce7d4 !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .modernPosTitle h3 {
  margin: 0 !important;
  font-size: 23px !important;
  letter-spacing: -.035em !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .modernPosHeaderStats {
  display: grid !important;
  grid-template-columns: 72px 72px minmax(170px, 1fr) !important;
  gap: 8px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posHeaderStat,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posHeaderTotal {
  min-height: 54px !important;
  display: grid !important;
  align-content: center !important;
  padding: 8px 11px !important;
  border: 1px solid rgba(255, 255, 255, .17) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .09) !important;
  box-shadow: none !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posHeaderStat span,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posHeaderTotal span {
  color: #9be8d9 !important;
  font-size: 8px !important;
  font-weight: 950 !important;
  letter-spacing: .11em !important;
  text-transform: uppercase !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posHeaderStat strong {
  color: #fff !important;
  font-size: 17px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posHeaderTotal strong {
  color: #fff !important;
  font-size: 22px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .modernPosActions {
  flex-wrap: nowrap !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .modernPosActions button {
  min-height: 38px !important;
  padding: 8px 12px !important;
  white-space: nowrap !important;
  border-color: rgba(255, 255, 255, .24) !important;
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTopStrip,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proItemEntry {
  gap: 9px !important;
  padding: 13px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTopStrip::before,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proItemEntry::before {
  grid-column: 1 / -1 !important;
  display: block !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid #e1ebef !important;
  color: #263d50 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTopStrip::before {
  content: "Invoice details" !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proItemEntry::before {
  content: "Add items" !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTopStrip label {
  gap: 6px !important;
  color: #617589 !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .065em !important;
  text-transform: uppercase !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTopStrip input,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTopStrip select,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proItemEntry input,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proItemEntry select {
  min-height: 41px !important;
  border-color: #cad9e0 !important;
  border-radius: 10px !important;
  background: #fbfdfe !important;
  color: #183247 !important;
  font-weight: 750 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .pickWithAction {
  gap: 7px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel #quickAddPartyBtn {
  min-width: 56px !important;
  min-height: 41px !important;
  border-color: #a7d8ce !important;
  background: #ecfdf8 !important;
  color: #087265 !important;
  font-weight: 900 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proItemEntry {
  top: 68px !important;
  background: #fff !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel #lineItemSearch {
  font-weight: 800 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel #addLineBtn {
  min-height: 41px !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(10, 138, 117, .18) !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posInfoStrip {
  min-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px 16px !important;
  padding: 10px 13px !important;
  color: #607589 !important;
  background: #f8fbfc !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable {
  min-height: 270px !important;
  overflow: auto !important;
  background: #fff !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable thead th {
  height: 42px !important;
  color: #dce8ee !important;
  font-size: 9px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  background: #0e1e32 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proCheckout {
  align-self: start !important;
  padding: 13px !important;
  overflow: hidden !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proCheckout::before {
  content: "Invoice summary" !important;
  display: block !important;
  margin: -13px -13px 12px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid #dce8ed !important;
  color: #263d50 !important;
  background: #f7fafb !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posCustomerCard {
  padding: 11px 12px !important;
  border: 1px solid #d7e4e9 !important;
  border-radius: 11px !important;
  background: #fff !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posCustomerCard span {
  color: #718496 !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posLineTotal {
  margin: 9px 0 !important;
  padding: 11px 12px !important;
  border: 1px solid #bce7dd !important;
  border-radius: 11px !important;
  color: #096b60 !important;
  background: #ecfdf8 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTotals {
  display: grid !important;
  gap: 0 !important;
  padding: 4px 0 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTotals > span {
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 8px 4px !important;
  border-bottom: 1px solid #edf2f4 !important;
  color: #516579 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTotals .billDiscountControl {
  display: grid !important;
  grid-template-columns: 1fr 58px 84px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTotals .billDiscountControl select,
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTotals .billDiscountControl input {
  min-height: 34px !important;
  padding: 5px 8px !important;
  border-radius: 9px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTotals .grandTotal {
  margin-top: 4px !important;
  color: #0f2c3f !important;
  font-size: 14px !important;
  font-weight: 950 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTotals .grandTotal strong {
  font-size: 19px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posTotals .balanceDue {
  color: #9a3412 !important;
  background: #fff7ed !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posPayments {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid #dde7eb !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posPayments .panelHead {
  padding: 0 0 9px !important;
  background: transparent !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posPayments .panelHead h4 {
  color: #263d50 !important;
  font-size: 13px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posPayments button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 10px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceQtyOverrideBox {
  margin-top: 10px !important;
  padding: 10px !important;
  border: 1px dashed #cad8df !important;
  border-radius: 10px !important;
  background: #fafcfd !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel #invoiceNotes {
  min-height: 64px !important;
  margin-top: 10px !important;
  border-radius: 10px !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posSaveBtn {
  width: 100% !important;
  min-height: 46px !important;
  margin-top: 10px !important;
  border-radius: 11px !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  box-shadow: 0 12px 24px rgba(10, 138, 117, .20) !important;
}
/* Integrated line-entry/table card */
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable {
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #d6e4e9 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable .posLineTools {
  min-height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 8px 11px 0 !important;
  border: 0 !important;
  background: #fff !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable .fieldMenu {
  margin: 0 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable .fieldMenu summary {
  color: #607589 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable .proItemEntry {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  margin: 0 !important;
  padding: 8px 11px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable .proItemEntry::before {
  content: none !important;
  display: none !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable .posInfoStrip {
  min-height: 42px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  border: 0 !important;
  border-top: 1px solid #e7eef1 !important;
  border-bottom: 1px solid #dce7eb !important;
  border-radius: 0 !important;
  background: #f8fbfc !important;
  box-shadow: none !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll {
  min-height: 260px !important;
  max-width: 100% !important;
  overflow: auto !important;
  background: #fff !important;
}
body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll table {
  min-width: 720px !important;
  margin: 0 !important;
}

/* Item Master professional workspace */
body[data-td-ui="pro-max"] #items .itemToolbar {
  position: relative !important;
  grid-template-columns: minmax(360px, 1fr) auto auto auto !important;
  gap: 9px !important;
  margin: 0 0 14px !important;
  padding: 11px !important;
  border: 1px solid #d8e3ef !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

body[data-td-ui="pro-max"] #items .itemToolbar #itemSearch {
  min-height: 42px !important;
  border-color: #cbd9e8 !important;
  background: #f8fbff !important;
}

body[data-td-ui="pro-max"] #items .itemToolbar .checkLine {
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 1px solid #d7e2ed !important;
  border-radius: 10px !important;
  background: #fbfdff !important;
  color: #40546a !important;
}

body[data-td-ui="pro-max"] #items .itemToolbar #showBulkEditBtn,
body[data-td-ui="pro-max"] #items .itemImportTools > summary {
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 8px 13px !important;
  border: 1px solid #cbd9e8 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #20364d !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  list-style: none !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #items .itemImportTools {
  position: relative !important;
}

body[data-td-ui="pro-max"] #items .itemImportTools > summary::-webkit-details-marker {
  display: none !important;
}

body[data-td-ui="pro-max"] #items .itemImportTools > summary::after {
  content: "▾" !important;
  margin-left: 8px !important;
  color: #5d7190 !important;
}

body[data-td-ui="pro-max"] #items .itemImportMenu {
  position: absolute !important;
  z-index: 30 !important;
  top: calc(100% + 7px) !important;
  right: 0 !important;
  width: 230px !important;
  display: grid !important;
  gap: 7px !important;
  padding: 10px !important;
  border: 1px solid #d3dfeb !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 18px 42px rgba(26, 55, 91, .16) !important;
}

body[data-td-ui="pro-max"] #items .itemImportMenu .compactAction {
  width: 100% !important;
  min-height: 38px !important;
  justify-content: flex-start !important;
  text-align: left !important;
  border-radius: 9px !important;
  background: #f8fbff !important;
  color: #253b53 !important;
}

body[data-td-ui="pro-max"] #items #itemBulkBar {
  display: none !important;
}

body[data-td-ui="pro-max"] #items #itemBulkBar.hasSelection {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 0 12px !important;
  padding: 9px 11px !important;
  border-color: #bdd5f4 !important;
  background: #f5f9ff !important;
}

body[data-td-ui="pro-max"] #items .itemEditor {
  scroll-margin-top: 96px !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 1px solid #d8e3ef !important;
  border-top: 4px solid #246ed1 !important;
  border-radius: 16px !important;
  background: #f6f9fd !important;
  box-shadow: 0 20px 50px rgba(24, 74, 137, .11) !important;
}

body[data-td-ui="pro-max"] #items .itemEditor > .panelHead {
  margin: 0 !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid #dce6f1 !important;
  border-radius: 12px 12px 0 0 !important;
  background: linear-gradient(90deg, #edf5ff 0%, #fff 62%) !important;
}

body[data-td-ui="pro-max"] #items .itemEditor > .panelHead h3 {
  color: #123f7b !important;
  font-size: 20px !important;
  font-weight: 950 !important;
}

body[data-td-ui="pro-max"] #items .itemEditorGrid {
  grid-template-columns: minmax(620px, 1fr) minmax(280px, 320px) !important;
  gap: 14px !important;
  padding: 14px !important;
}

body[data-td-ui="pro-max"] #items .itemEditorMain,
body[data-td-ui="pro-max"] #items .itemEditorSide {
  gap: 14px !important;
}

body[data-td-ui="pro-max"] #items .formSection {
  border: 1px solid #d8e3ef !important;
  border-radius: 13px !important;
  background: #fff !important;
  box-shadow: 0 7px 20px rgba(30, 73, 120, .05) !important;
}

body[data-td-ui="pro-max"] #items .itemIdentitySection {
  border-top: 3px solid #2f7ee6 !important;
}

body[data-td-ui="pro-max"] #items .itemPricingSection {
  border-top: 3px solid #10a873 !important;
}

body[data-td-ui="pro-max"] #items .formSection .sectionHead h4 {
  color: #263b51 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
}

body[data-td-ui="pro-max"] #items .formSection .sectionHead span {
  color: #71839a !important;
  font-size: 10px !important;
  font-weight: 750 !important;
}

body[data-td-ui="pro-max"] #items .itemEditor label {
  color: #344b63 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}

body[data-td-ui="pro-max"] #items .itemEditor input,
body[data-td-ui="pro-max"] #items .itemEditor select,
body[data-td-ui="pro-max"] #items .itemEditor textarea {
  border-color: #cbd8e6 !important;
  border-radius: 9px !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #items .itemEditor input:focus,
body[data-td-ui="pro-max"] #items .itemEditor select:focus,
body[data-td-ui="pro-max"] #items .itemEditor textarea:focus {
  border-color: #2c78dc !important;
  box-shadow: 0 0 0 3px rgba(44, 120, 220, .12) !important;
}

body[data-td-ui="pro-max"] #items .itemPricingSection .formGrid {
  grid-template-columns: repeat(3, minmax(145px, 1fr)) !important;
}

body[data-td-ui="pro-max"] #items .itemAdvancedSection,
body[data-td-ui="pro-max"] #items .itemQuickMasters {
  padding: 0 !important;
  overflow: hidden !important;
}

body[data-td-ui="pro-max"] #items .itemAdvancedSection > summary,
body[data-td-ui="pro-max"] #items .itemQuickMasters > summary {
  margin: 0 !important;
  padding: 12px !important;
  cursor: pointer !important;
  list-style: none !important;
}

body[data-td-ui="pro-max"] #items .itemAdvancedSection > summary::-webkit-details-marker,
body[data-td-ui="pro-max"] #items .itemQuickMasters > summary::-webkit-details-marker {
  display: none !important;
}

body[data-td-ui="pro-max"] #items .itemAdvancedSection > summary::after,
body[data-td-ui="pro-max"] #items .itemQuickMasters > summary::after {
  content: "+ Open" !important;
  margin-left: auto !important;
  color: #2769c5 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

body[data-td-ui="pro-max"] #items .itemAdvancedSection[open] > summary::after,
body[data-td-ui="pro-max"] #items .itemQuickMasters[open] > summary::after {
  content: "Close" !important;
}

body[data-td-ui="pro-max"] #items .itemAdvancedSection > .formGrid,
body[data-td-ui="pro-max"] #items .itemQuickMasters > .quickMaster {
  padding: 0 12px 12px !important;
}

body[data-td-ui="pro-max"] #items .itemPhotoSection {
  border-top: 3px solid #2d77dc !important;
  background: #fff !important;
  color: #263b51 !important;
}

body[data-td-ui="pro-max"] #items .itemPhotoSection .sectionHead h4,
body[data-td-ui="pro-max"] #items .itemPhotoSection .sectionHead span {
  color: #263b51 !important;
}

body[data-td-ui="pro-max"] #items .itemPhotoBox {
  aspect-ratio: 4 / 3 !important;
  border: 1px dashed #9eb8d6 !important;
  border-radius: 11px !important;
  background: #f2f7fd !important;
}

body[data-td-ui="pro-max"] #items .itemPhotoBox span {
  color: #72879e !important;
  font-weight: 800 !important;
}

body[data-td-ui="pro-max"] #items .itemPhotoSection .filePick {
  border: 1px solid #bdd1e7 !important;
  background: #edf5ff !important;
  color: #1b5bac !important;
  font-weight: 900 !important;
}

body[data-td-ui="pro-max"] #items .itemEditor > .itemEditorFooter {
  margin: 0 !important;
  padding: 13px 18px !important;
  border-top: 1px solid #dce6f1 !important;
  border-radius: 0 0 12px 12px !important;
  background: rgba(255, 255, 255, .97) !important;
}

body[data-td-ui="pro-max"] #items .itemTableWrap {
  overflow: auto !important;
  border: 1px solid #d6e2ef !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

body[data-td-ui="pro-max"] #items .itemRegisterTable {
  min-width: 900px !important;
}

body[data-td-ui="pro-max"] #items .itemRegisterTable thead th {
  padding: 11px 10px !important;
  border-bottom: 0 !important;
  background: #0d294a !important;
  color: #e8f3ff !important;
  font-size: 9px !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #items .itemRegisterTable tbody td {
  padding: 10px !important;
  border-bottom: 1px solid #e7edf4 !important;
}

@media (max-width: 1500px) {
  body[data-td-ui="pro-max"]:has(#items.active) .itemMasterTopContext {
    display: flex !important;
    overflow-x: auto !important;
  }
  body[data-td-ui="pro-max"] .itemMasterTopTitle { flex: 0 0 170px !important; }
  body[data-td-ui="pro-max"] .itemMasterTopContext article { flex: 0 0 112px !important; }
  body[data-td-ui="pro-max"] .itemMasterTopContext #showItemFormBtn { flex: 0 0 112px !important; }
  body[data-td-ui="pro-max"] #items .itemEditorGrid {
    grid-template-columns: minmax(0, 1fr) 280px !important;
  }
}

@media (max-width: 900px) {
  body[data-td-ui="pro-max"] #items .itemToolbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
  body[data-td-ui="pro-max"] #items .itemToolbar #itemSearch {
    grid-column: 1 / -1 !important;
  }
  body[data-td-ui="pro-max"] #items .itemEditorGrid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 650px) {
  body[data-td-ui="pro-max"] #items .itemToolbar,
  body[data-td-ui="pro-max"] #items .itemPricingSection .formGrid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-td-ui="pro-max"] #items .itemToolbar #itemSearch {
    grid-column: auto !important;
  }
}

/* Party Master professional workspace */
body[data-td-ui="pro-max"] #parties .partyToolbar {
  grid-template-columns: minmax(320px, 1fr) minmax(190px, 230px) minmax(130px, 165px) !important;
  gap: 10px !important;
  margin: 0 0 14px !important;
  padding: 11px !important;
  border: 1px solid #d9e3ee !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

body[data-td-ui="pro-max"] #parties .partyEditor {
  margin: 0 0 16px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #d9e3ee !important;
  border-top: 4px solid #6d42c7 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 18px 44px rgba(58, 37, 104, .1) !important;
}

body[data-td-ui="pro-max"] #parties .partyEditor > .panelHead {
  margin: 0 !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid #e3eaf2 !important;
  background: linear-gradient(90deg, #f8f5ff 0%, #fff 62%) !important;
}

body[data-td-ui="pro-max"] #parties .partyEditor > .panelHead h3 {
  color: #2d1a55 !important;
  font-size: 19px !important;
  font-weight: 950 !important;
}

body[data-td-ui="pro-max"] #parties .partyEditorGrid {
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr) !important;
  gap: 0 !important;
}

body[data-td-ui="pro-max"] #parties .partyEditorGrid > section {
  padding: 18px !important;
}

body[data-td-ui="pro-max"] #parties .partyEditorGrid > section + section {
  border-left: 1px solid #e3eaf2 !important;
  background: #fbfcff !important;
}

body[data-td-ui="pro-max"] #parties .partyEditor h4 {
  margin: 0 0 13px !important;
  color: #25364a !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #parties .partyEditor label {
  color: #33475c !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}

body[data-td-ui="pro-max"] #parties .partyEditor input,
body[data-td-ui="pro-max"] #parties .partyEditor select,
body[data-td-ui="pro-max"] #parties .partyEditor textarea {
  border-color: #cedae7 !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #parties .partyEditor input:focus,
body[data-td-ui="pro-max"] #parties .partyEditor select:focus,
body[data-td-ui="pro-max"] #parties .partyEditor textarea:focus {
  border-color: #7652c8 !important;
  box-shadow: 0 0 0 3px rgba(118, 82, 200, .12) !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleChooser {
  display: block !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #ded7f0 !important;
  border-radius: 12px !important;
  background: #faf8ff !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleChooser > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 11px 13px !important;
  color: #402773 !important;
  cursor: pointer !important;
  list-style: none !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleChooser > summary::-webkit-details-marker {
  display: none !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleChooser > summary::after {
  content: "+ Add another role" !important;
  color: #6842b7 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleChooser[open] > summary::after {
  content: "Done" !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleChooser > summary span {
  margin-left: auto !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: #ede7fb !important;
  color: #6c4ba8 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleOptions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 0 12px 12px !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleOptions .checkLine {
  margin: 0 !important;
  padding: 7px 9px !important;
  border: 1px solid #dcd4ee !important;
  border-radius: 9px !important;
  background: #fff !important;
  font-size: 10px !important;
}

body[data-td-ui="pro-max"] #parties .partyRoleOptions .partyPrimaryRoleHidden {
  display: none !important;
}

body[data-td-ui="pro-max"] #parties .partyEditor > .itemEditorFooter {
  margin: 0 !important;
  padding: 13px 18px !important;
  border-top: 1px solid #e3eaf2 !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #parties .partyTable {
  border: 1px solid #d9e3ee !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

@media (max-width: 1180px) {
  body[data-td-ui="pro-max"]:has(#parties.active) .partyMasterTopContext {
    display: flex !important;
    overflow-x: auto !important;
  }
  body[data-td-ui="pro-max"] .partyMasterTopTitle { flex: 0 0 170px !important; }
  body[data-td-ui="pro-max"] .partyMasterTopContext article { flex: 0 0 118px !important; }
  body[data-td-ui="pro-max"] .partyMasterTopContext #showPartyFormBtn { flex: 0 0 116px !important; }
}

@media (max-width: 980px) {
  body[data-td-ui="pro-max"] #parties .partyEditorGrid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-td-ui="pro-max"] #parties .partyEditorGrid > section + section {
    border-top: 1px solid #e3eaf2 !important;
    border-left: 0 !important;
  }
}

@media (max-width: 720px) {
  body[data-td-ui="pro-max"] #parties .partyToolbar {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-td-ui="pro-max"] #parties .partyEditorGrid > section {
    padding: 14px !important;
  }
  body[data-td-ui="pro-max"] #parties .partyEditor .formGrid.twoCols {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Business Reports Pro header: GST is consolidated here; sidebar remains single-source navigation. */
body[data-td-ui="pro-max"]:has(#reports.active) .topbar {
  min-height: 82px !important;
  margin: 0 0 18px !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
  background: linear-gradient(100deg, #191b4d 0%, #3730a3 54%, #0e7490 100%) !important;
  box-shadow: 0 12px 30px rgba(30, 27, 75, .22) !important;
}

body[data-td-ui="pro-max"]:has(#reports.active) .topbar > div:first-child,
body[data-td-ui="pro-max"]:has(#reports.active) .topbar #refreshBtn,
body[data-td-ui="pro-max"]:has(#reports.active) .topbar #logoutBtn,
body[data-td-ui="pro-max"]:has(#reports.active) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#reports.active) .topbar > .actions {
  width: 100% !important;
  display: block !important;
}

body[data-td-ui="pro-max"]:has(#reports.active) .businessReportsTopContext {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(190px, 1.4fr) repeat(3, minmax(96px, .7fr)) minmax(180px, 1fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body[data-td-ui="pro-max"] .businessReportsTopTitle,
body[data-td-ui="pro-max"] .businessReportsTopContext article,
body[data-td-ui="pro-max"] .businessReportsTopContext .businessReportsPeriod,
body[data-td-ui="pro-max"] .businessReportsDates {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .businessReportsTopTitle {
  padding-left: 7px !important;
  border-color: transparent !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] .businessReportsTopTitle span,
body[data-td-ui="pro-max"] .businessReportsTopContext article span,
body[data-td-ui="pro-max"] .businessReportsTopContext label > span {
  color: #c7d2fe !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .businessReportsTopTitle strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -.04em !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .businessReportsTopTitle small,
body[data-td-ui="pro-max"] .businessReportsTopContext article small {
  margin-top: 4px !important;
  overflow: hidden !important;
  color: #dceafe !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .businessReportsTopContext article strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

body[data-td-ui="pro-max"] .businessReportsTopContext select,
body[data-td-ui="pro-max"] .businessReportsTopContext input {
  width: 100% !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  margin-top: 5px !important;
  padding: 4px 7px !important;
  border: 1px solid rgba(255, 255, 255, .28) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .95) !important;
  color: #24285b !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body[data-td-ui="pro-max"] .businessReportsDates {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
}

body[data-td-ui="pro-max"] .businessReportsDates label { min-width: 0 !important; }

body[data-td-ui="pro-max"] .businessReportsPeriod,
body[data-td-ui="pro-max"] .businessReportsDates,
body[data-td-ui="pro-max"] .businessReportsTopActions #exportReportsBtn {
  display: none !important;
}

body[data-td-ui="pro-max"] .businessReportsTopActions {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
}

body[data-td-ui="pro-max"] .businessReportsTopActions > * {
  min-width: 0 !important;
  min-height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 7px !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
  text-align: center !important;
  text-decoration: none !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .businessReportsTopActions #exportReportsBtn {
  border-color: #fff !important;
  background: #fff !important;
  color: #3730a3 !important;
}

body[data-td-ui="pro-max"] #gst.mergedLegacyView { display: none !important; }
body[data-td-ui="pro-max"] #reports.active:before { display: none !important; content: none !important; }
body[data-td-ui="pro-max"] #reports.active {
  display: grid !important;
  gap: 16px !important;
  min-width: 0 !important;
  padding: 0 18px 18px !important;
  overflow-x: hidden !important;
  background: #edf2f7 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportStudioGrid {
  display: grid !important;
  grid-template-columns: minmax(410px, .9fr) minmax(520px, 1.25fr) !important;
  gap: 16px !important;
  align-items: start !important;
  min-width: 0 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogPanel,
body[data-td-ui="pro-max"] #reports.active .reportOutputPanel,
body[data-td-ui="pro-max"] #reports.active .reportSnapshotCard,
body[data-td-ui="pro-max"] #reports.active .reportLedgerCard {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #d8e2ea !important;
  border-radius: 17px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(30, 41, 59, .08) !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogHead,
body[data-td-ui="pro-max"] #reports.active .reportOutputHead,
body[data-td-ui="pro-max"] #reports.active .reportCardHead {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 15px 17px !important;
  border-bottom: 1px solid #e5eaf0 !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogHead h3,
body[data-td-ui="pro-max"] #reports.active .reportOutputHead h3,
body[data-td-ui="pro-max"] #reports.active .reportCardHead h3 {
  margin: 3px 0 0 !important;
  color: #18243a !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  letter-spacing: -.025em !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogHead p,
body[data-td-ui="pro-max"] #reports.active .reportOutputHead p {
  margin: 3px 0 0 !important;
  color: #6b7b8c !important;
  font-size: 11px !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCountBadge,
body[data-td-ui="pro-max"] #reports.active .reportLiveBadge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 9px !important;
  border: 1px solid #c7d2fe !important;
  border-radius: 999px !important;
  background: #eef2ff !important;
  color: #4338ca !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #reports.active .reportLiveBadge i {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .12) !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogPanel {
  max-height: 720px !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
}

body[data-td-ui="pro-max"] #reports.active .reportGroup {
  display: block !important;
  padding: 12px 14px 3px !important;
  border-bottom: 1px solid #edf1f5 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportGroup:last-child { border-bottom: 0 !important; }
body[data-td-ui="pro-max"] #reports.active .reportGroup h4 {
  margin: 0 0 8px !important;
  color: #596579 !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogGrid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogGrid button {
  position: relative !important;
  min-height: 64px !important;
  display: block !important;
  margin: 0 !important;
  padding: 10px 11px !important;
  border: 1px solid #dce3ea !important;
  border-radius: 11px !important;
  background: #f9fbfc !important;
  color: #253247 !important;
  box-shadow: none !important;
  text-align: left !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogGrid button:before { content: none !important; }
body[data-td-ui="pro-max"] #reports.active .reportCatalogGrid button:after {
  content: attr(data-report-help) !important;
  display: block !important;
  margin-top: 4px !important;
  color: #7b8798 !important;
  font-size: 9px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCatalogGrid button:hover,
body[data-td-ui="pro-max"] #reports.active .reportCatalogGrid button.active {
  border-color: #818cf8 !important;
  background: #eef2ff !important;
  color: #3730a3 !important;
  transform: none !important;
}

body[data-td-ui="pro-max"] #reports.active .gstReportGroup {
  background: linear-gradient(180deg, #f8fafc, #eefcfa) !important;
}

body[data-td-ui="pro-max"] #reports.active .reportOutputPanel { min-height: 620px !important; }
body[data-td-ui="pro-max"] #reports.active .reportContextToolbar {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(110px, 1fr)) auto !important;
  gap: 8px !important;
  align-items: end !important;
  padding: 11px 13px !important;
  border-bottom: 1px solid #e5eaf0 !important;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9) !important;
}

body[data-td-ui="pro-max"] #reports.active .reportContextToolbar.hidden,
body[data-td-ui="pro-max"] #reports.active .reportShareToolbar.hidden,
body[data-td-ui="pro-max"] #reports.active .reportContextToolbar .hidden { display: none !important; }

body[data-td-ui="pro-max"] .gstClassificationDialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: #14202b;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
body[data-td-ui="pro-max"] .gstClassificationDialog::backdrop { background: rgba(7, 20, 31, .64); backdrop-filter: blur(3px); }
body[data-td-ui="pro-max"] .gstClassificationShell { display: grid; gap: 14px; padding: 18px; background: #f8fbfc; }
body[data-td-ui="pro-max"] .gstClassificationShell > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #dbe5e8; }
body[data-td-ui="pro-max"] .gstClassificationShell h2 { margin: 2px 0 0; font-size: 21px; }
body[data-td-ui="pro-max"] .gstClassificationNotice { margin: 0; padding: 10px 12px; border: 1px solid #b9d7d1; border-radius: 11px; background: #eaf8f4; color: #28554c; font-size: 12px; font-weight: 700; }
body[data-td-ui="pro-max"] .gstClassificationGrid,
body[data-td-ui="pro-max"] .gstClassificationSubgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
body[data-td-ui="pro-max"] .gstClassificationGrid label { display: grid; gap: 5px; color: #51606d; font-size: 11px; font-weight: 800; }
body[data-td-ui="pro-max"] .gstClassificationGrid .span2 { grid-column: 1 / -1; }
body[data-td-ui="pro-max"] .gstClassificationGrid input,
body[data-td-ui="pro-max"] .gstClassificationGrid select,
body[data-td-ui="pro-max"] .gstClassificationGrid textarea { width: 100%; min-width: 0; border: 1px solid #cddadd; border-radius: 10px; background: #fff; padding: 10px 11px; color: #10212f; }
body[data-td-ui="pro-max"] .gstClassificationGrid .hidden { display: none !important; }
body[data-td-ui="pro-max"] .gstMetaStatus { min-height: 38px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #dbe5e8; color: #51606d; font-size: 12px; }
body[data-td-ui="pro-max"] .gstClassificationShell > footer { display: flex; justify-content: flex-end; }
@media (max-width: 620px) {
  body[data-td-ui="pro-max"] .gstClassificationGrid,
  body[data-td-ui="pro-max"] .gstClassificationSubgrid { grid-template-columns: 1fr; }
  body[data-td-ui="pro-max"] .gstClassificationSubgrid > * { grid-column: auto; }
}

body[data-td-ui="pro-max"] #reports.active .reportContextTitle {
  min-width: 0 !important;
  display: none !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-self: stretch !important;
  padding: 8px 10px !important;
  border-left: 3px solid #4f46e5 !important;
  border-radius: 9px !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #reports.active .reportContextTitle span,
body[data-td-ui="pro-max"] #reports.active .reportContextToolbar label > span {
  color: #6b7280 !important;
  font-size: 8px !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #reports.active .reportContextTitle strong {
  margin-top: 4px !important;
  overflow: hidden !important;
  color: #252660 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #reports.active .reportContextToolbar label {
  min-width: 0 !important;
  display: grid !important;
  gap: 5px !important;
  margin: 0 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportContextToolbar .reportSearchFilter {
  grid-column: 1 / -1 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportContextToolbar input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 7px 9px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #243047 !important;
  font-size: 11px !important;
}

body[data-td-ui="pro-max"] #reports.active .reportContextToolbar input:focus {
  border-color: #6366f1 !important;
  outline: 3px solid rgba(99, 102, 241, .12) !important;
}

body[data-td-ui="pro-max"] #reports.active .reportFilterActions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
}

body[data-td-ui="pro-max"] #reports.active .reportFilterActions button {
  min-height: 38px !important;
  padding: 7px 11px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #reports.active .reportFilterActions .primary {
  background: #3730a3 !important;
  color: #fff !important;
  border-color: #3730a3 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportShareToolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 9px 13px !important;
  border-bottom: 1px solid #e5eaf0 !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #reports.active .reportResultSummary {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body[data-td-ui="pro-max"] #reports.active .reportResultSummary span {
  padding: 5px 8px !important;
  border-radius: 999px !important;
  background: #eef2ff !important;
  color: #4338ca !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #reports.active .reportResultSummary strong {
  overflow: hidden !important;
  color: #5d6879 !important;
  font-size: 10px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #reports.active .reportShareActions {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

body[data-td-ui="pro-max"] #reports.active .reportShareActions button {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #reports.active .reportShareActions #reportExcelBtn {
  border-color: #86efac !important;
  background: #f0fdf4 !important;
  color: #166534 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportShareActions #reportWhatsAppBtn {
  border-color: #99f6e4 !important;
  background: #f0fdfa !important;
  color: #0f766e !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportPanel.hidden { display: none !important; }
body[data-td-ui="pro-max"] #reports.active .gstr2bImportPanel {
  display: grid !important;
  gap: 10px !important;
  padding: 13px !important;
  border-bottom: 1px solid #dbe5e8 !important;
  background: linear-gradient(180deg, #f7fffd 0%, #f8fafc 100%) !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportHead {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportHead h3 {
  margin: 2px 0 0 !important;
  color: #17314a !important;
  font-size: 16px !important;
  font-weight: 950 !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bSafetyBadge {
  padding: 6px 9px !important;
  border: 1px solid #f5c36b !important;
  border-radius: 999px !important;
  background: #fff8e7 !important;
  color: #8a4b08 !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportControls {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) 140px auto auto !important;
  gap: 8px !important;
  align-items: end !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportControls label,
body[data-td-ui="pro-max"] #reports.active .gstr2bConfirmation label {
  min-width: 0 !important;
  display: grid !important;
  gap: 5px !important;
  color: #617080 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportControls input,
body[data-td-ui="pro-max"] #reports.active .gstr2bConfirmation input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 7px 9px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #243047 !important;
  font-size: 10px !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportControls button {
  min-height: 38px !important;
  padding: 7px 12px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportControls .primary {
  border-color: #0f766e !important;
  background: #0f766e !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportStatus {
  min-height: 35px !important;
  padding: 9px 11px !important;
  border: 1px solid #dbe5e8 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #51606d !important;
  font-size: 10px !important;
  font-weight: 750 !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportStatus.ready {
  border-color: #86efac !important;
  background: #f0fdf4 !important;
  color: #166534 !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportStatus.blocked {
  border-color: #fecaca !important;
  background: #fff1f2 !important;
  color: #b42318 !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats.hidden,
body[data-td-ui="pro-max"] #reports.active .gstr2bConfirmation.hidden,
body[data-td-ui="pro-max"] #reports.active .gstr2bImportPreviewTable.hidden { display: none !important; }

body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(74px, 1fr)) !important;
  gap: 7px !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats article {
  min-width: 0 !important;
  padding: 8px 9px !important;
  border: 1px solid #dce5ea !important;
  border-radius: 9px !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats span,
body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats strong { display: block !important; }
body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats span { color: #6b7280 !important; font-size: 8px !important; font-weight: 900 !important; text-transform: uppercase !important; }
body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats strong { margin-top: 3px !important; color: #102a43 !important; font-size: 15px !important; font-weight: 950 !important; }

body[data-td-ui="pro-max"] #reports.active .gstr2bConfirmation {
  display: grid !important;
  grid-template-columns: minmax(230px, 1fr) auto !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 10px !important;
  border: 1px dashed #e6ae48 !important;
  border-radius: 10px !important;
  background: #fffbeb !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bConfirmation strong {
  align-self: center !important;
  color: #854d0e !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 10px !important;
  overflow-wrap: anywhere !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportPreviewTable {
  max-height: 270px !important;
  overflow: auto !important;
  border: 1px solid #dce5ea !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #reports.active .gstr2bImportPreviewTable table { min-width: 780px !important; }
body[data-td-ui="pro-max"] #reports.active .gstr2bImportPreviewTable th { position: sticky !important; top: 0 !important; z-index: 1 !important; background: #102a43 !important; color: #fff !important; }
body[data-td-ui="pro-max"] #reports.active .gstr2bImportPreviewTable th,
body[data-td-ui="pro-max"] #reports.active .gstr2bImportPreviewTable td { padding: 7px 8px !important; font-size: 9px !important; white-space: nowrap !important; }
body[data-td-ui="pro-max"] #reports.active .gstr2bImportHistory { color: #64748b !important; font-size: 9px !important; font-weight: 700 !important; }

body[data-td-ui="pro-max"] #reports.active .reportCenterOutput {
  min-height: 535px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 18px !important;
  color: #6b7b8c !important;
  text-align: center !important;
}

body[data-td-ui="pro-max"] #reports.active .reportOutputPanel:has(#reportContextToolbar:not(.hidden)) .reportCenterOutput {
  min-height: 365px !important;
}

body[data-td-ui="pro-max"] #reports.active .reportCenterOutput:has(.reportResultTable) {
  display: block !important;
  min-height: 0 !important;
  text-align: left !important;
}

body[data-td-ui="pro-max"] #reports.active .reportEmptyIcon {
  display: grid !important;
  place-items: center !important;
  width: 46px !important;
  height: 46px !important;
  margin-bottom: 4px !important;
  border-radius: 14px !important;
  background: #eef2ff !important;
  color: #4338ca !important;
  font-size: 18px !important;
  font-weight: 950 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportResultTable {
  width: 100% !important;
  max-height: 610px !important;
  margin: 0 !important;
  overflow: auto !important;
  border: 1px solid #e1e7ee !important;
  border-radius: 12px !important;
}

body[data-td-ui="pro-max"] #reports.active .reportSnapshotGrid,
body[data-td-ui="pro-max"] #reports.active .reportLedgerGrid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  min-width: 0 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportSnapshotCard .tableWrap,
body[data-td-ui="pro-max"] #reports.active .reportLedgerCard .tableWrap {
  max-width: 100% !important;
  max-height: 330px !important;
  overflow: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body[data-td-ui="pro-max"] #reports.active .reportSnapshotCard table,
body[data-td-ui="pro-max"] #reports.active .reportLedgerCard table { min-width: 620px !important; }

body[data-td-ui="pro-max"] #reports.active .reportLedgerFilter {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid #e8edf2 !important;
  background: #f8fafc !important;
}

body[data-td-ui="pro-max"] #reports.active .reportLedgerFilter select,
body[data-td-ui="pro-max"] #reports.active .reportLedgerFilter button {
  min-height: 38px !important;
  margin: 0 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportLedgerFilter button {
  background: #3730a3 !important;
  color: #fff !important;
  border-color: #3730a3 !important;
}

@media (max-width: 1320px) {
  body[data-td-ui="pro-max"]:has(#reports.active) .businessReportsTopContext {
    grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(88px, .65fr)) minmax(170px, 1fr) !important;
  }
  body[data-td-ui="pro-max"] .businessReportsTopTitle { grid-column: auto !important; }
  body[data-td-ui="pro-max"] .businessReportsDates { grid-column: span 2 !important; }
  body[data-td-ui="pro-max"] .businessReportsTopActions { grid-column: auto !important; }
}

@media (max-width: 1040px) {
  body[data-td-ui="pro-max"] #reports.active .reportStudioGrid { grid-template-columns: 1fr !important; }
  body[data-td-ui="pro-max"] #reports.active .reportCatalogPanel { max-height: none !important; }
  body[data-td-ui="pro-max"] #reports.active .reportOutputPanel { min-height: 480px !important; }
  body[data-td-ui="pro-max"] #reports.active .reportCenterOutput { min-height: 395px !important; }
  body[data-td-ui="pro-max"] #reports.active .reportContextToolbar { grid-template-columns: 1fr 1fr !important; }
  body[data-td-ui="pro-max"] #reports.active .reportContextTitle,
  body[data-td-ui="pro-max"] #reports.active .reportContextToolbar .reportSearchFilter { grid-column: 1 / -1 !important; }
  body[data-td-ui="pro-max"] #reports.active .reportShareToolbar { align-items: flex-start !important; flex-direction: column !important; }
  body[data-td-ui="pro-max"] #reports.active .gstr2bImportControls { grid-template-columns: 1fr 1fr !important; }
  body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats { grid-template-columns: repeat(3, minmax(74px, 1fr)) !important; }
}

@media (max-width: 720px) {
  body[data-td-ui="pro-max"]:has(#reports.active) .businessReportsTopContext { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body[data-td-ui="pro-max"] .businessReportsTopTitle,
  body[data-td-ui="pro-max"] .businessReportsDates,
  body[data-td-ui="pro-max"] .businessReportsTopActions { grid-column: 1 / -1 !important; }
  body[data-td-ui="pro-max"] .businessReportsTopActions { grid-template-columns: 1fr 1fr !important; }
  body[data-td-ui="pro-max"] .businessReportsTopActions #exportReportsBtn { grid-column: 1 / -1 !important; }
  body[data-td-ui="pro-max"] #reports.active { padding: 0 8px 8px !important; }
  body[data-td-ui="pro-max"] #reports.active .reportCatalogGrid,
  body[data-td-ui="pro-max"] #reports.active .reportSnapshotGrid,
  body[data-td-ui="pro-max"] #reports.active .reportLedgerGrid { grid-template-columns: 1fr !important; }
  body[data-td-ui="pro-max"] #reports.active .reportContextToolbar { grid-template-columns: 1fr !important; }
  body[data-td-ui="pro-max"] #reports.active .reportContextTitle,
  body[data-td-ui="pro-max"] #reports.active .reportContextToolbar .reportSearchFilter { grid-column: auto !important; }
  body[data-td-ui="pro-max"] #reports.active .reportShareActions { width: 100% !important; display: grid !important; grid-template-columns: 1fr 1fr !important; }
  body[data-td-ui="pro-max"] #reports.active .gstr2bImportControls,
  body[data-td-ui="pro-max"] #reports.active .gstr2bConfirmation { grid-template-columns: 1fr !important; }
  body[data-td-ui="pro-max"] #reports.active .gstr2bImportStats { grid-template-columns: repeat(2, minmax(74px, 1fr)) !important; }
}

/* Order Center Pro header: one app header, sidebar preserved, no duplicate hero. */
body[data-td-ui="pro-max"]:has(#orders.active) .topbar {
  min-height: 82px !important;
  margin: 0 0 18px !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
  background: linear-gradient(100deg, #082f3d 0%, #0b5961 55%, #0f8b7e 100%) !important;
  box-shadow: 0 12px 30px rgba(8, 47, 61, .2) !important;
}

body[data-td-ui="pro-max"]:has(#orders.active) .topbar > div:first-child,
body[data-td-ui="pro-max"]:has(#orders.active) .topbar #refreshBtn,
body[data-td-ui="pro-max"]:has(#orders.active) .topbar #logoutBtn,
body[data-td-ui="pro-max"]:has(#orders.active) .topbar #newInvoiceBtn {
  display: none !important;
}

body[data-td-ui="pro-max"]:has(#orders.active) .topbar > .actions {
  width: 100% !important;
  display: block !important;
}

body[data-td-ui="pro-max"]:has(#orders.active) .orderCenterTopContext {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(158px, 1.15fr) repeat(5, minmax(88px, .72fr)) minmax(286px, 1.55fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body[data-td-ui="pro-max"] .orderCenterTopTitle,
body[data-td-ui="pro-max"] .orderCenterTopContext article {
  position: relative !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] .orderCenterTopTitle {
  padding-left: 7px !important;
  border-color: transparent !important;
  background: transparent !important;
}

body[data-td-ui="pro-max"] .orderCenterTopTitle span,
body[data-td-ui="pro-max"] .orderCenterTopContext article span {
  color: #bff8ee !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] .orderCenterTopTitle strong {
  margin-top: 3px !important;
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -.04em !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .orderCenterTopTitle small,
body[data-td-ui="pro-max"] .orderCenterTopContext article small {
  margin-top: 4px !important;
  overflow: hidden !important;
  color: #d7f5f1 !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .orderCenterTopContext article strong {
  margin-top: 3px !important;
  overflow: hidden !important;
  color: #fff !important;
  font-size: 17px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .orderCenterTopContext article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #2dd4bf;
}

body[data-td-ui="pro-max"] .orderCenterTopContext article.pending::before { background: #fbbf24; }
body[data-td-ui="pro-max"] .orderCenterTopContext article.success::before { background: #34d399; }
body[data-td-ui="pro-max"] .orderCenterTopContext article.danger::before { background: #fb7185; }
body[data-td-ui="pro-max"] .orderCenterTopContext article.value::before { background: #38bdf8; }
body[data-td-ui="pro-max"] .orderCenterTopContext article.ai::before { background: #c4b5fd; }

body[data-td-ui="pro-max"] .orderCenterTopActions {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 6px !important;
}

body[data-td-ui="pro-max"] .orderCenterTopActions > * {
  min-width: 0 !important;
  min-height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 7px !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
  text-align: center !important;
  text-decoration: none !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] .orderCenterTopActions #reloadOrderCenterBtn {
  border-color: #fff !important;
  background: #fff !important;
  color: #0b5961 !important;
}

@media (max-width: 1180px) {
  body[data-td-ui="pro-max"]:has(#orders.active) .orderCenterTopContext {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  body[data-td-ui="pro-max"] .orderCenterTopTitle,
  body[data-td-ui="pro-max"] .orderCenterTopActions { grid-column: 1 / -1 !important; }
}

@media (max-width: 720px) {
  body[data-td-ui="pro-max"]:has(#orders.active) .orderCenterTopContext {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body[data-td-ui="pro-max"] .orderCenterTopContext article.value { grid-column: 1 / -1 !important; }
  body[data-td-ui="pro-max"] .orderCenterTopActions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Other screens inherit the same system without changing structure */
body[data-td-ui="pro-max"] #items.active { --pm-view-accent: #2563eb; }
body[data-td-ui="pro-max"] #parties.active { --pm-view-accent: #7c3aed; }
body[data-td-ui="pro-max"] #purchases.active { --pm-view-accent: #e56b1f; }
body[data-td-ui="pro-max"] #orders.active { --pm-view-accent: #0891b2; }
body[data-td-ui="pro-max"] #payments.active { --pm-view-accent: #16a34a; }
body[data-td-ui="pro-max"] #accounting.active { --pm-view-accent: #475569; }
body[data-td-ui="pro-max"] #gst.active { --pm-view-accent: #dc4949; }
body[data-td-ui="pro-max"] #reports.active { --pm-view-accent: #4f46e5; }
body[data-td-ui="pro-max"] #catalog.active { --pm-view-accent: #be305d; }

body[data-td-ui="pro-max"] #purchases .purchaseRegisterPanel {
  width: 100% !important;
}

body[data-td-ui="pro-max"] #purchases .purchaseRegisterToolbar {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.8fr) minmax(150px, .7fr) minmax(145px, .65fr) !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 0 12px !important;
  padding: 10px !important;
  border: 1px solid var(--pm-line) !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

body[data-td-ui="pro-max"] #purchases .purchaseRegisterToolbar > * {
  width: 100% !important;
  margin: 0 !important;
}

body[data-td-ui="pro-max"] #purchases .purchaseRegisterTable {
  max-width: 100% !important;
  min-height: 210px !important;
  border-radius: 15px !important;
  box-shadow: var(--pm-shadow) !important;
}

body[data-td-ui="pro-max"] #purchases .purchaseRegisterTable table {
  min-width: 900px !important;
  table-layout: auto !important;
}

body[data-td-ui="pro-max"] #purchases .purchaseRegisterTable th:last-child,
body[data-td-ui="pro-max"] #purchases .purchaseRegisterTable td:last-child {
  position: sticky !important;
  right: 0 !important;
  z-index: 6 !important;
  min-width: 104px !important;
  background: #fff8f2 !important;
  box-shadow: -10px 0 22px rgba(87, 38, 9, .07) !important;
}

body[data-td-ui="pro-max"] #purchases:not(.purchaseMode) #purchasePanel {
  display: none !important;
}

body[data-td-ui="pro-max"] #purchases.purchaseMode {
  padding: 14px 16px 28px !important;
}

body[data-td-ui="pro-max"] #purchases.purchaseMode .purchaseRegisterPanel {
  display: none !important;
}

body[data-td-ui="pro-max"] #purchases.purchaseMode #purchasePanel {
  display: block !important;
}

body[data-td-ui="pro-max"] #purchasePanel.purchaseInvoicePanel {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #efd9c8 !important;
  border-radius: 20px !important;
  background: #fff7f0 !important;
  box-shadow: var(--pm-shadow-lg) !important;
}

body[data-td-ui="pro-max"] #purchasePanel > .proUiLogicHook {
  display: none !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseShell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(215px, 21%) !important;
  gap: 12px !important;
  padding: 12px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseWorkArea,
body[data-td-ui="pro-max"] #purchasePanel .purchaseCheckout {
  min-width: 0 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierStrip {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, .8fr) !important;
  gap: 10px !important;
  margin: 0 0 10px !important;
  padding: 11px !important;
  border: 1px solid #ecd8c8 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow-sm) !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierStrip label,
body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierStrip input,
body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierStrip select {
  min-width: 0 !important;
  width: 100% !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchasePartyControl {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 7px !important;
  margin-top: 5px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchasePartyControl #purchaseQuickAddPartyBtn {
  width: auto !important;
  min-width: 102px !important;
  padding: 0 12px !important;
  border-color: #e8b995 !important;
  color: #87360e !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseQuickPartyBox {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .55fr) auto auto !important;
  gap: 7px !important;
  padding: 9px !important;
  border: 1px dashed #e4b994 !important;
  border-radius: 10px !important;
  background: #fff8f1 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseQuickPartyBox.hidden {
  display: none !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseQuickPartyBox button {
  width: auto !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseBillTable {
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 1px solid #e7d5c8 !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: var(--pm-shadow) !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll table {
  width: 100% !important;
  min-width: var(--purchase-table-min-width, 100%) !important;
  table-layout: auto !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll thead th {
  height: 37px !important;
  padding: 8px 9px !important;
  border-bottom: 0 !important;
  background: #32190b !important;
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="item"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="item"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-ui-purchase-role="item"] {
  min-width: 250px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="hsn"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="hsn"] {
  min-width: 74px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="qty"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="free"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="qty"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="free"] {
  min-width: 58px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="rate"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="rate"] {
  min-width: 78px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="discount"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="discount"] {
  min-width: 118px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="gst"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="gst"] {
  min-width: 64px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="total"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="total"] {
  min-width: 88px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-col="action"],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-col="action"] {
  width: 62px !important;
  min-width: 62px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll th[data-purchase-column-header],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll td[data-purchase-column-cell],
body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll .uiDynamicPurchaseCell {
  min-width: 96px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLinesScroll tbody td {
  padding: 8px 9px !important;
  vertical-align: middle !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow td {
  background: #fffaf6 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow input,
body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow select,
body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  margin: 0 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow td[data-purchase-col="item"] {
  position: relative !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow .purchaseItemPick {
  position: relative !important;
  min-width: 205px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow .purchaseItemControl {
  display: grid !important;
  grid-template-columns: minmax(190px, 1fr) auto !important;
  align-items: center !important;
  gap: 6px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow .purchaseItemPick > #purchaseScanCode {
  padding-right: 42px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow .purchaseItemPick > .scanInsideBtn {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  z-index: 3 !important;
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 1px solid #7fd4c4 !important;
  border-radius: 8px !important;
  background: #eafff8 !important;
  color: #007d6c !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow .purchaseItemPick > .scanInsideBtn .scannerGlyph {
  width: 16px !important;
  height: 16px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow .purchaseQuickAdd {
  width: auto !important;
  min-width: 68px !important;
  min-height: 40px !important;
  padding: 4px 9px !important;
  border-color: #f1c5a5 !important;
  color: #9a3b0d !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow #purchaseLineHsnPreview,
body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow #purchaseLineGstPreview {
  min-width: 64px !important;
  padding: 7px !important;
  text-align: center !important;
  font-weight: 850 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow .discountPair {
  display: grid !important;
  grid-template-columns: 42px minmax(68px, 1fr) !important;
  gap: 4px !important;
  min-width: 112px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseEntryRow #addPurchaseLineBtn {
  background: #c65516 !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLineOptions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 10px !important;
  border-top: 1px solid #f0dfd2 !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseFieldChooser {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-width: 0 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseFieldChooser > strong {
  flex: 0 0 auto !important;
  color: #5e321d !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseFieldChooser .posFieldToggles {
  position: static !important;
  display: flex !important;
  flex: 1 1 auto !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseFieldChooser .posFieldToggles label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  width: auto !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border: 1px solid #ead6c6 !important;
  border-radius: 8px !important;
  background: #fffaf6 !important;
  color: #62432f !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseFieldChooser .posFieldToggles input {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLineHint {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  color: #7b604e !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseLineHint #purchaseUpdateItemMasterBtn {
  flex: 0 0 auto !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  border-color: #e5ad83 !important;
  color: #8f380e !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseCheckout {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: start !important;
  gap: 10px !important;
  padding: 11px !important;
  border: 1px solid #ead8ca !important;
  border-radius: 15px !important;
  background: #f9f5f1 !important;
}

body[data-td-ui="pro-max"] #purchases.purchaseMode #purchasePanel .purchaseCheckout > * {
  grid-column: 1 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierCard,
body[data-td-ui="pro-max"] #purchasePanel .purchasePayments,
body[data-td-ui="pro-max"] #purchasePanel .purchaseTotals {
  border: 1px solid #ead8ca !important;
  border-radius: 13px !important;
  background: #fff !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierCard {
  display: grid !important;
  gap: 4px !important;
  padding: 11px 12px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierCard span {
  color: #8b6b54 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierCard strong {
  color: #351d0e !important;
  font-size: 13px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseTotals {
  padding: 8px 5px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseTotals .grandTotal {
  margin: 3px -1px !important;
  padding: 10px 9px !important;
  border-radius: 10px !important;
  background: #32190b !important;
  color: #fff !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseTotals .grandTotal strong { color: #fff !important; }
body[data-td-ui="pro-max"] #purchasePanel .purchaseTotals .balanceDue { color: #9a3b0d !important; }

body[data-td-ui="pro-max"] #purchasePanel .purchasePayments {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  padding: 10px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchasePayments .panelHead {
  grid-column: 1 / -1 !important;
  min-height: 28px !important;
  padding: 0 0 7px !important;
  border-bottom: 1px solid #eee1d8 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchasePayments label {
  min-width: 0 !important;
  color: #694c39 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchasePayments input,
body[data-td-ui="pro-max"] #purchasePanel .purchasePayments select {
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 4px !important;
}

body[data-td-ui="pro-max"] #purchasePanel #purchaseNotes {
  min-height: 68px !important;
}

body[data-td-ui="pro-max"] #purchasePanel .purchaseSaveBtn {
  width: 100% !important;
  min-height: 52px !important;
  background: #b94a12 !important;
  color: #fff !important;
  font-weight: 950 !important;
}

@media (max-width: 980px) {
  body[data-td-ui="pro-max"] #purchasePanel .purchaseShell {
    grid-template-columns: 1fr !important;
  }

  body[data-td-ui="pro-max"] #purchasePanel .purchaseCheckout {
    grid-template-columns: 1fr !important;
  }

  body[data-td-ui="pro-max"] #purchasePanel .purchaseCheckout > * {
    min-width: 0 !important;
  }

  body[data-td-ui="pro-max"] #purchasePanel .purchaseSaveBtn,
  body[data-td-ui="pro-max"] #purchasePanel #purchaseSaveMessage { grid-column: 1 !important; }
}

@media (max-width: 680px) {
  body[data-td-ui="pro-max"] #purchases .purchaseRegisterToolbar,
  body[data-td-ui="pro-max"] #purchasePanel .purchaseSupplierStrip,
  body[data-td-ui="pro-max"] #purchasePanel .purchaseCheckout {
    grid-template-columns: 1fr !important;
  }

  body[data-td-ui="pro-max"] #purchasePanel .purchaseLineOptions {
    grid-template-columns: 1fr !important;
  }

  body[data-td-ui="pro-max"] #purchasePanel .purchaseQuickPartyBox {
    grid-template-columns: 1fr !important;
  }

  body[data-td-ui="pro-max"] #purchasePanel .purchaseFieldChooser,
  body[data-td-ui="pro-max"] #purchasePanel .purchaseLineHint {
    align-items: stretch !important;
    flex-direction: column !important;
  }
}

body[data-td-ui="pro-max"] section.view.active:not(#sales):not(#dashboard) > .panel:first-of-type,
body[data-td-ui="pro-max"] section.view.active:not(#sales):not(#dashboard) > .toolbar:first-of-type,
body[data-td-ui="pro-max"] section.view.active:not(#sales):not(#dashboard) > .inlineForm:first-of-type {
  border-top: 4px solid var(--pm-view-accent, var(--pm-teal)) !important;
}

body[data-td-ui="pro-max"] section.view.active:not(#sales) thead th {
  border-bottom-color: var(--pm-view-accent, var(--pm-teal)) !important;
}

body[data-td-ui="pro-max"] .reportGrid,
body[data-td-ui="pro-max"] .dashGridTwo {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body[data-td-ui="pro-max"] #reports.active .reportGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-td-ui="pro-max"] #reports.active .reportGrid > * {
  min-width: 0 !important;
}

body[data-td-ui="pro-max"] #reports.active .reportGrid .tableWrap {
  overflow-x: auto !important;
}

/* Responsive tablet */
@media (max-width: 1120px) {
  body[data-td-ui="pro-max"] {
    grid-template-columns: 220px minmax(0, 1fr) !important;
  }

  body[data-td-ui="pro-max"] .sidebar {
    width: 220px !important;
  }

  body[data-td-ui="pro-max"] .topbar .badge {
    display: none !important;
  }

  body[data-td-ui="pro-max"] #sales .salesHero {
    min-height: 118px !important;
  }

  body[data-td-ui="pro-max"] #sales .salesStats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-td-ui="pro-max"] #purchases .purchaseStats,
  body[data-td-ui="pro-max"] #reports.active .reportGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-td-ui="pro-max"] #invoicePanel .modernPosHeader {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile: compact bottom module rail, no hidden logic */
@media (max-width: 820px) {
  body[data-td-ui="pro-max"] {
    display: block !important;
    padding-bottom: 78px !important;
  }

  body[data-td-ui="pro-max"] .sidebar {
    position: fixed !important;
    inset: auto 0 0 !important;
    z-index: 90 !important;
    width: auto !important;
    height: 72px !important;
    padding: 7px 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 0 !important;
    border-top: 1px solid #d6e4e9 !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 -14px 34px rgba(15, 35, 55, .13) !important;
    backdrop-filter: blur(18px) !important;
  }

  body[data-td-ui="pro-max"] .sidebar .brand,
  body[data-td-ui="pro-max"] .sidebar .navGroupLabel {
    display: none !important;
  }

  body[data-td-ui="pro-max"] .sidebar nav {
    width: max-content !important;
    min-width: 100% !important;
    height: 100% !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
  }

  body[data-td-ui="pro-max"] .sidebar nav button,
  body[data-td-ui="pro-max"] .sidebar nav .navLink {
    width: auto !important;
    min-width: 82px !important;
    height: 55px !important;
    justify-content: center !important;
    padding: 7px 8px !important;
    border: 1px solid #e2eaf0 !important;
    border-radius: 15px !important;
    background: #f7fafc !important;
    color: #4b6072 !important;
    font-size: 10px !important;
    text-align: center !important;
  }

  body[data-td-ui="pro-max"] .sidebar nav button::before,
  body[data-td-ui="pro-max"] .sidebar nav .navLink::before {
    display: none !important;
  }

  body[data-td-ui="pro-max"] .sidebar nav button.active {
    background: linear-gradient(135deg, var(--pm-teal), var(--pm-teal-dark)) !important;
    color: #fff !important;
  }

  body[data-td-ui="pro-max"] .topbar {
    min-height: 62px !important;
    padding: 10px 12px !important;
  }

  body[data-td-ui="pro-max"] .topbar h2 {
    font-size: 19px !important;
  }

  body[data-td-ui="pro-max"] .topbar .actions {
    max-width: 60% !important;
    overflow-x: auto !important;
  }

  body[data-td-ui="pro-max"] .topbar button {
    min-width: max-content !important;
    padding: 8px 10px !important;
    font-size: 10px !important;
  }

  body[data-td-ui="pro-max"] main > section.view.active {
    min-height: calc(100vh - 134px) !important;
    padding: 12px 10px 24px !important;
  }

  body[data-td-ui="pro-max"] #sales .salesHero {
    min-height: 0 !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    padding: 20px !important;
  }

  body[data-td-ui="pro-max"] #sales .salesHero h2 {
    font-size: 24px !important;
  }

  body[data-td-ui="pro-max"] #sales .salesStats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-td-ui="pro-max"] #sales .salesStats article {
    min-height: 88px !important;
    padding: 14px !important;
  }

  body[data-td-ui="pro-max"] #sales .salesStats strong {
    font-size: 21px !important;
  }

  body[data-td-ui="pro-max"] #sales .salesRegisterToolbar {
    grid-template-columns: 1fr !important;
  }

  body[data-td-ui="pro-max"] .reportGrid,
  body[data-td-ui="pro-max"] .dashGridTwo {
    grid-template-columns: 1fr !important;
  }

  body[data-td-ui="pro-max"] #invoicePanel .proItemEntry {
    position: static !important;
    grid-template-columns: 1fr 72px 72px !important;
  }

  body[data-td-ui="pro-max"] #invoicePanel .proItemEntry .posItemPick {
    grid-column: 1 / -1 !important;
  }

  body[data-td-ui="pro-max"] #invoicePanel .posShell {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  body[data-td-ui="pro-max"] #sales .salesStats {
    grid-template-columns: 1fr 1fr !important;
  }

  body[data-td-ui="pro-max"] #sales .salesHero #showInvoiceBtn {
    width: 100% !important;
  }

  body[data-td-ui="pro-max"] .topbar .actions button:not(#newInvoiceBtn) {
    display: none !important;
  }

  /* Order Center keeps its operational actions visible on mobile. */
  body[data-td-ui="pro-max"]:has(#orders.active) .topbar .orderCenterTopActions > * {
    display: inline-flex !important;
  }
}

/* Invoice line table: natural height, HSN-first column order and compact checkout. */
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proBillTable {
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
}

html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posWorkArea {
  grid-template-rows: auto !important;
  align-content: start !important;
}

html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain !important;
  background: #fff !important;
}

html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll table {
  min-width: var(--invoice-table-min-width, 100%) !important;
  margin: 0 !important;
}

html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="item"] { width: 28% !important; }
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="hsn"] { width: 8% !important; }
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="qty"],
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="free"] { width: 6% !important; }
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="rate"] { width: 9% !important; }
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="discount"] { width: 13% !important; }
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="gst"] { width: 8% !important; }
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="total"] { width: 12% !important; }
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLinesScroll [data-invoice-col="action"] { width: 10% !important; }

html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceEntryRow #lineHsnPreview,
html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .uiHsnLineCell {
  display: block !important;
  color: #075c54 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceLineOptions {
  position: relative !important;
  width: 100% !important;
  min-height: 38px !important;
  margin: 0 !important;
  border-top: 1px solid #e1e9ed !important;
}

html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceQuickPaymentMode {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 92px !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 8px 0 10px !important;
  color: #425b6b !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .invoiceQuickPaymentMode select {
  width: 92px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 6px 8px !important;
  border: 1px solid #c8d9e0 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #132f43 !important;
  font-weight: 850 !important;
}

@media (min-width: 981px) {
  html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .posShell {
    grid-template-columns: minmax(0, 1fr) minmax(215px, 21%) !important;
    gap: 12px !important;
  }

  html body[data-td-ui="pro-max"] #sales.invoiceMode #invoicePanel .proCheckout {
    padding: 10px !important;
  }
}
