/* ============================================================
   JTEL WEB SUITE - MODULE 011 : INVOICE ENTRY - STYLES
   ------------------------------------------------------------
   Folder : 011-invoice-entry/011-invoice-entry.css
   Loaded after 999-common.css, so rules here refine the common
   baseline for this module only. Section notes show the original
   styles.css block each rule came from.

   Build 015 - module-wise split (2026-09-30). No visual change.
   ============================================================ */

/* ---------- from [module-invoice-new] ---------- */

.screen-invoice-new {
  flex-direction: column;
  background: #e8eef2;
}

.invoice-app-header {
  height: 78px;
  flex-basis: 78px;
}

.invoice-workspace {
  padding-bottom: 68px;
}

.invoice-workspace-scroll {
  padding: 16px;
  scroll-behavior: smooth;
}

.invoice-panel {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f7f9fa);
  border: 1px solid #d5dfe5;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.invoice-panel + .invoice-panel,
.invoice-panel + .invoice-summary-layout {
  margin-top: 14px;
}

.invoice-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.invoice-panel-heading h2,
.remarks-panel h2 {
  margin: 4px 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.invoice-panel-heading p {
  margin: 5px 0 0;
  color: #7a8994;
  font-size: 0.69rem;
}

.invoice-date-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.invoice-date-field label {
  color: #6e7f8c;
  font-size: 0.62rem;
  font-weight: 750;
  text-transform: uppercase;
}

.invoice-date-field input {
  height: 38px;
  padding: 0 10px;
  color: #263845;
  background: white;
  border: 1px solid #ccd7de;
  border-radius: 9px;
}

.invoice-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.client-select-card {
  min-height: 96px;
  padding: 15px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  color: #21313d;
  background:
    linear-gradient(155deg, #ffffff 0%, #edf3f6 100%);
  border: 1px solid #cbd8e0;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 16px rgba(18,38,52,0.08);
  text-align: left;
  cursor: pointer;
}

.client-select-card:hover {
  border-color: #90a7b6;
  transform: translateY(-1px);
}

.client-card-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #d84a53, #9f2028);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.30);
  font-weight: 900;
}

.client-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.client-card-copy small {
  color: #81909b;
  font-size: 0.6rem;
  font-weight: 750;
  text-transform: uppercase;
}

.client-card-copy strong {
  margin-top: 5px;
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-copy span {
  margin-top: 5px;
  overflow: hidden;
  color: #71818d;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-action {
  padding: 8px 10px;
  color: #a5252e;
  background: #fae9eb;
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 800;
}

.invoice-header-actions-grid {
  display: grid;
  gap: 10px;
}

.metal-action-button,
.force-apply-card {
  min-height: 43px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eef4f7;
  background:
    linear-gradient(180deg, #617b90 0%, #3b566b 16%, #243f52 100%);
  border: 1px solid #1a3040;
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    0 6px 13px rgba(17,35,48,0.15);
}

.metal-action-button {
  cursor: pointer;
  text-align: left;
}

.metal-action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.10);
  border-radius: 8px;
  font-size: 1rem;
}

.metal-action-button strong,
.force-apply-card strong,
.metal-action-button small,
.force-apply-card small {
  display: block;
}

.metal-action-button strong,
.force-apply-card strong {
  font-size: 0.73rem;
}

.metal-action-button small,
.force-apply-card small {
  margin-top: 3px;
  color: rgba(236,243,247,0.62);
  font-size: 0.59rem;
}

.force-apply-card {
  justify-content: space-between;
  cursor: pointer;
}

.force-apply-card > span:first-child {
  flex: 1;
}

.force-apply-card input {
  position: absolute;
  opacity: 0;
}

.toggle-track {
  width: 42px;
  height: 23px;
  padding: 3px;
  flex: 0 0 42px;
  background: rgba(7,19,27,0.40);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
}

.toggle-knob {
  width: 15px;
  height: 15px;
  display: block;
  background: #d5dfe5;
  border-radius: 50%;
  transition: 160ms ease;
}

.force-apply-card input:checked + .toggle-track {
  background: #a7212a;
}

.force-apply-card input:checked + .toggle-track .toggle-knob {
  transform: translateX(18px);
  background: white;
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: thin;
}

.category-chip {
  min-width: max-content;
  height: 36px;
  padding: 0 14px;
  color: #405461;
  background: linear-gradient(180deg, #ffffff, #e7edf1);
  border: 1px solid #cad6de;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 white;
  font-size: 0.68rem;
  font-weight: 760;
  cursor: pointer;
}

.category-chip.is-active {
  color: white;
  background: linear-gradient(180deg, #dc4b54, #aa222b);
  border-color: #921b23;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 5px 12px rgba(173,34,44,0.18);
}

.product-selector-row {
  display: flex;
  gap: 9px;
}

.product-search-shell {
  position: relative;
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
}

.product-search-icon {
  position: absolute;
  left: 13px;
  color: #728591;
}

.product-search-shell input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 38px;
  color: #23343f;
  background: white;
  border: 1px solid #cbd7df;
  border-radius: 11px;
  outline: 0;
}

.product-search-shell input:focus {
  border-color: #7891a3;
  box-shadow: 0 0 0 3px rgba(95,126,148,0.12);
}

.product-search-shell input:disabled {
  background: #edf1f3;
  cursor: not-allowed;
}

.search-clear-button {
  position: absolute;
  right: 7px;
  width: 31px;
  height: 31px;
  color: #788995;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 1.1rem;
  cursor: pointer;
}

.product-results {
  max-height: 225px;
  margin-top: 10px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 8px;
}

.product-result-button {
  min-height: 64px;
  height: auto;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #263944;
  background: linear-gradient(180deg, #ffffff, #edf2f5);
  border: 1px solid #d0dbe2;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}

.product-result-button:hover {
  border-color: #8fa6b5;
  transform: translateY(-1px);
}

.product-result-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #5e788c, #2d485a);
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 900;
}

.product-result-copy {
  min-width: 0;
}

.product-result-copy strong,
.product-result-copy small {
  display: block;
}

.product-result-copy strong {
  overflow: visible;
  font-size: 0.73rem;
  line-height: 1.28;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.product-result-copy small {
  margin-top: 4px;
  overflow: hidden;
  color: #7b8994;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-result-add {
  color: #a6262f;
  font-size: 0.62rem;
  font-weight: 800;
}

.product-empty-state {
  min-height: 110px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #80909b;
  background: #f0f4f6;
  border: 1px dashed #cbd7df;
  border-radius: 11px;
}

.product-empty-state span {
  font-size: 1.3rem;
}

.product-empty-state strong {
  margin-top: 7px;
  color: #546672;
  font-size: 0.76rem;
}

.product-empty-state small {
  margin-top: 4px;
  font-size: 0.62rem;
}

.invoice-grid-shell {
  position: relative;
  min-height: 180px;
  border: 1px solid #cfd9e0;
  border-radius: 12px;
  overflow: hidden;
}

.invoice-grid-scroll {
  max-height: 330px;
  overflow: auto;
}

.invoice-grid {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 0.66rem;
}

.invoice-grid th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 38px;
  padding: 0 8px;
  color: #edf3f6;
  background: linear-gradient(180deg, #4f687b, #2c4658);
  border-right: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  white-space: nowrap;
}

.invoice-grid td {
  height: 50px;
  padding: 6px 8px;
  color: #324652;
  background: white;
  border-right: 1px solid #e0e7eb;
  border-bottom: 1px solid #dce4e9;
  vertical-align: middle;
}

.invoice-grid tr:nth-child(even) td {
  background: #f7f9fa;
}

.invoice-grid tr.is-refund-row td {
  background: #fff8d9;
}

.invoice-grid tr.has-stock-warning td:first-child {
  box-shadow: inset 4px 0 0 #d7811e;
}

.invoice-grid tr.has-cost-warning td:nth-child(2) {
  background: #fff1e5;
}

.invoice-grid input {
  width: 78px;
  height: 31px;
  padding: 0 7px;
  color: #283b47;
  background: #fff;
  border: 1px solid #cbd7de;
  border-radius: 7px;
  text-align: right;
}

.invoice-grid input:disabled {
  color: #7f8c95;
  background: #edf1f3;
}

.line-item-title {
  max-width: 245px;
  overflow: hidden;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-item-meta {
  margin-top: 3px;
  color: #82909a;
  font-size: 0.55rem;
}

.warning-pill {
  margin-left: 5px;
  padding: 2px 5px;
  color: #9c590e;
  background: #fff0d9;
  border-radius: 999px;
  font-size: 0.49rem;
  font-weight: 800;
}

.warning-pill.cost {
  color: #a12c31;
  background: #fde4e6;
}

.stock-button {
  min-width: 48px;
  padding: 5px 7px;
  color: #355469;
  background: #e8f0f4;
  border: 1px solid #ccdae2;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.line-action-button {
  width: 29px;
  height: 29px;
  color: #355469;
  background: #edf2f5;
  border: 1px solid #d0dbe2;
  border-radius: 7px;
  cursor: pointer;
}

.line-action-button.picture {
  display: inline-grid;
  place-items: center;
  color: #315f78;
  background: linear-gradient(180deg, #f4f9fb, #dceaf1);
  border-color: #bfd2dc;
}

.line-action-button.picture:hover {
  color: #173f56;
  background: linear-gradient(180deg, #ffffff, #cfe2ec);
  border-color: #8fb0c1;
}

.picture-eye-icon {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
  pointer-events: none;
}

.line-action-button.remove {
  color: #a3262f;
  background: #fae9eb;
  border-color: #edc8cc;
}

.grid-empty-state {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #80909b;
}

.grid-empty-state span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #e8eef2;
  border-radius: 11px;
  font-size: 1.1rem;
}

.grid-empty-state strong {
  margin-top: 8px;
  color: #526470;
  font-size: 0.78rem;
}

.grid-empty-state small {
  margin-top: 4px;
  font-size: 0.61rem;
}

.invoice-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.78fr);
  gap: 14px;
}

.remarks-panel textarea {
  width: 100%;
  height: 155px;
  margin-top: 12px;
  padding: 13px;
  resize: none;
  color: #263945;
  background: white;
  border: 1px solid #ccd8df;
  border-radius: 11px;
  outline: 0;
  line-height: 1.55;
}

.remarks-panel textarea:focus {
  border-color: #7891a3;
  box-shadow: 0 0 0 3px rgba(95,126,148,0.12);
}

.remarks-footer {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  color: #87959e;
  font-size: 0.58rem;
}

.invoice-totals-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.totals-card {
  padding: 14px;
}

.totals-card-title {
  margin-bottom: 10px;
  padding-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dbe3e8;
}

.totals-card-title span {
  color: #435765;
  font-size: 0.7rem;
  font-weight: 800;
}

.totals-card-title strong {
  color: #263c4c;
  font-size: 0.88rem;
}

.refund-totals-card .totals-card-title strong {
  color: #9b6814;
}

.totals-row,
.totals-input-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6f7f8a;
  font-size: 0.61rem;
}

.totals-row strong {
  color: #354b59;
}

.totals-input-row input {
  width: 74px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #cbd7df;
  border-radius: 7px;
  text-align: right;
}


/* ---------- from [module-invoice-sales-summary-polish-010] ---------- */

.sales-totals-card {
  padding: 16px 17px 15px;
  background:
    radial-gradient(circle at 100% 0%, rgba(79, 112, 135, 0.10), transparent 38%),
    linear-gradient(180deg, #ffffff, #f5f8fa);
  border-color: #bccbd4;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 7px 18px rgba(24, 48, 65, 0.09);
}

.sales-totals-card .totals-row,
.sales-totals-card .totals-input-row {
  min-height: 35px;
  padding: 2px 1px;
  color: #506572;
  font-size: 0.72rem;
  font-weight: 700;
}

.sales-totals-card .totals-row strong,
.sales-totals-card .totals-input-row input {
  color: #263c4c;
  font-size: 0.88rem;
  font-weight: 850;
}

.sales-totals-card .totals-input-row input {
  width: 94px;
  height: 32px;
  padding: 0 8px;
  background: #ffffff;
  border-color: #b9c9d3;
}

.sales-totals-card .special-discount-value-input {
  color: #2f556c;
}

.sales-totals-card .sales-summary-final-row {
  min-height: 43px;
  margin: 11px -4px -3px;
  padding: 10px 10px 7px;
  border-top: 2px solid #9eb2bf;
  border-bottom: 0;
}

.sales-totals-card .sales-summary-final-row span {
  color: #304b5d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sales-totals-card .sales-summary-final-row strong {
  color: #1f3d50;
  font-size: 1rem;
  font-weight: 900;
}

.final-payable-card {
  grid-column: 1 / -1;
  min-height: 86px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  color: white;
  background:
    radial-gradient(circle at 88% 0%, rgba(223,73,83,0.27), transparent 37%),
    linear-gradient(145deg, #304a5d, #172a37);
  border: 1px solid #11232f;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 8px 18px rgba(19,39,52,0.15);
}

.final-payable-card span {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.final-payable-card strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 1.42rem;
}

.final-payable-card small {
  margin-top: 4px;
  color: rgba(234,241,245,0.62);
  font-size: 0.58rem;
}

.invoice-action-bar {
  position: fixed;
  z-index: 35;
  left: var(--sidebar-width);
  right: 0;
  bottom: var(--footer-height);
  min-height: 58px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(249,251,252,0.97);
  border-top: 1px solid #ccd7df;
  box-shadow: 0 -6px 18px rgba(15,32,45,0.10);
  backdrop-filter: blur(8px);
}

.invoice-validation-message {
  color: #9a6d21;
  font-size: 0.68rem;
  font-weight: 700;
}

.invoice-validation-message.is-valid {
  color: #2d7e59;
}

.invoice-action-buttons {
  display: flex;
  gap: 9px;
}

.invoice-cancel-button,
.invoice-save-button {
  height: 40px;
  padding: 0 17px;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.invoice-cancel-button {
  color: #4d606d;
  background: #edf2f5;
  border: 1px solid #ccd7de;
}

.invoice-save-button {
  min-width: 145px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: white;
  background: linear-gradient(180deg, #dc4b54, #a8212a);
  border: 1px solid #901a22;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    0 7px 14px rgba(174,35,44,0.20);
}

.invoice-save-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.modal-card {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f4f7f9);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  min-height: 72px;
  padding: 14px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fbfc;
  border-bottom: 1px solid #d9e2e8;
}

.modal-header h2 {
  margin: 3px 0 0;
  font-size: 1.05rem;
}

.client-picker-card {
  display: flex;
  flex-direction: column;
}

.client-search-shell {
  position: relative;
  margin: 14px;
  display: flex;
  align-items: center;
}

.client-search-shell span {
  position: absolute;
  left: 13px;
  color: #748792;
}

.client-search-shell input {
  width: 100%;
  height: 44px;
  padding: 0 13px 0 38px;
  border: 1px solid #cbd7df;
  border-radius: 10px;
}

.client-grid-header {
  padding: 9px 14px;
  display: grid;
  grid-template-columns: minmax(250px, 1.3fr) minmax(170px, 0.85fr) minmax(120px, 0.55fr) minmax(90px, 0.4fr);
  gap: 12px;
  color: #70818c;
  background: #eaf0f4;
  border-top: 1px solid #d4dfe6;
  border-bottom: 1px solid #d4dfe6;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-results {
  min-height: 220px;
  max-height: 480px;
  overflow-y: auto;
}

.client-result-row {
  width: 100%;
  min-height: 55px;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: minmax(250px, 1.3fr) minmax(170px, 0.85fr) minmax(120px, 0.55fr) minmax(90px, 0.4fr);
  gap: 12px;
  align-items: center;
  color: #405460;
  background: white;
  border: 0;
  border-bottom: 1px solid #e0e7eb;
  text-align: left;
  cursor: pointer;
}

.client-result-row:hover {
  background: #edf4f7;
}

.client-result-main strong,
.client-result-main small {
  display: block;
}

.client-result-main strong {
  font-size: 0.72rem;
}

.client-result-main small,
.client-result-row > span {
  color: #75858f;
  font-size: 0.61rem;
}

.modal-empty-state {
  padding: 36px;
  color: #7d8c96;
  text-align: center;
  font-size: 0.72rem;
}

.product-picture-card {
  width: min(780px, 100%);
}

.product-picture-stage {
  min-height: 380px;
  max-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(45deg, #e7ecef 25%, transparent 25%),
    linear-gradient(-45deg, #e7ecef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7ecef 75%),
    linear-gradient(-45deg, transparent 75%, #e7ecef 75%),
    #f7f9fa;
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.product-picture-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.product-picture-placeholder {
  padding: 28px;
  color: #71818c;
  background: rgba(255,255,255,0.90);
  border: 1px solid #d2dde4;
  border-radius: 11px;
  font-size: 0.75rem;
}

@media (max-width: 1120px) {
  .product-results {
      grid-template-columns: repeat(2, minmax(210px, 1fr));
    }

  .invoice-summary-layout {
      grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
  .invoice-action-bar {
      left: 0;
    }

  .invoice-header-grid {
      grid-template-columns: 1fr;
    }

  .product-results {
      grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

  .invoice-summary-layout {
      grid-template-columns: 1fr;
    }

  .invoice-totals-stack {
      grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
  .invoice-app-header {
      height: 70px;
      flex-basis: 70px;
    }

  .invoice-workspace-scroll {
      padding: 9px;
    }

  .invoice-panel {
      padding: 13px;
      border-radius: 13px;
    }

  .invoice-panel-heading {
      align-items: stretch;
      flex-direction: column;
      gap: 9px;
    }

  .invoice-date-field {
      max-width: 170px;
    }

  .client-select-card {
      min-height: 88px;
      grid-template-columns: 43px minmax(0, 1fr);
    }

  .client-card-icon {
      width: 43px;
      height: 43px;
    }

  .client-card-action {
      grid-column: 1 / -1;
      justify-self: stretch;
      text-align: center;
    }

  .product-results {
      grid-template-columns: 1fr;
      max-height: 250px;
    }

  .invoice-grid-scroll {
      max-height: 360px;
    }

  .invoice-summary-layout {
      gap: 9px;
    }

  .invoice-totals-stack {
      grid-template-columns: 1fr;
    }

  .final-payable-card {
      grid-column: auto;
    }

  .remarks-panel textarea {
      height: 115px;
    }

  .invoice-action-bar {
      min-height: 66px;
      padding: 7px 9px;
    }

  .invoice-validation-message {
      display: none;
    }

  .invoice-action-buttons {
      width: 100%;
    }

  .invoice-cancel-button,
    .invoice-save-button {
      flex: 1;
    }

  .client-grid-header {
      display: none;
    }

  .client-result-row {
      grid-template-columns: 1fr;
      gap: 4px;
      padding: 11px 13px;
    }

  .modal-card {
      width: 100%;
      height: 100%;
      max-height: none;
      border-radius: 0;
    }

  .client-results {
      max-height: none;
      flex: 1;
    }

  .product-picture-stage {
      max-height: none;
      height: calc(100vh - 72px);
    }
}


/* ---------- from [module-invoice-new-refinement-004] ---------- */

.screen-invoice-new {
  --invoice-header-height: 66px;
}

.screen-invoice-new .invoice-app-header {
  height: var(--invoice-header-height);
  flex-basis: var(--invoice-header-height);
  padding-top: 0;
  padding-bottom: 0;
}

.screen-invoice-new .header-logo-shell {
  width: 128px;
  height: 48px;
}

.screen-invoice-new .header-logo {
  max-height: 38px;
}

.screen-invoice-new .header-welcome-text {
  font-size: 0.92rem;
}

.screen-invoice-new .header-welcome-subtitle {
  font-size: 0.66rem;
}

.invoice-workspace-scroll {
  padding: 10px 12px 82px;
}

.compact-transaction-panel {
  padding: 9px;
}

.compact-transaction-row {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 166px 190px 190px;
  gap: 9px;
  align-items: stretch;
}

.compact-client-card,
.compact-date-card,
.compact-command-card {
  height: 64px;
  min-height: 64px;
}

.compact-client-card {
  padding: 7px 10px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
}

.compact-client-card .client-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.compact-client-card .client-card-copy small {
  font-size: 0.62rem;
}

.compact-client-card .client-card-copy strong {
  margin-top: 2px;
  font-size: 0.88rem;
}

.compact-client-card .client-card-copy span {
  margin-top: 2px;
  font-size: 0.65rem;
}

.compact-client-card .client-card-action {
  padding: 7px 9px;
  font-size: 0.65rem;
}

.compact-date-card {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(155deg, #ffffff, #edf3f6);
  border: 1px solid #cbd8e0;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #fff;
}

.compact-date-card label {
  margin-bottom: 4px;
  color: #71828e;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-date-card input {
  width: 100%;
  height: 31px;
  padding: 0 7px;
  color: #263945;
  background: white;
  border: 1px solid #c8d4dc;
  border-radius: 7px;
  font-size: 0.95rem;
}

.compact-command-card {
  padding: 7px 9px;
  border-radius: 11px;
}

.compact-command-card .metal-action-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.compact-command-card strong {
  font-size: 0.72rem;
}

.compact-command-card small {
  font-size: 0.58rem;
}

.compact-product-panel {
  position: relative;
  z-index: 12;
  margin-top: 8px !important;
  padding: 8px 9px;
  overflow: visible;
}

.compact-product-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.3fr);
  gap: 9px;
  align-items: center;
}

.compact-product-panel .category-strip {
  min-height: 42px;
  padding: 3px 0;
  align-items: center;
}

.compact-product-panel .category-chip {
  height: 34px;
  padding: 0 12px;
  font-size: 0.72rem;
}

.compact-product-panel .product-selector-row {
  position: relative;
}

.compact-product-panel .product-search-shell input {
  height: 40px;
  font-size: 0.78rem;
}

.product-search-shell.is-open input {
  border-color: #708da1;
  box-shadow: 0 0 0 3px rgba(86,116,139,0.12);
}

.product-dropdown {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(180deg, #ffffff, #f4f7f9);
  border: 1px solid #bccbd5;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(11,28,40,0.22);
}

.product-dropdown-head {
  min-height: 31px;
  padding: 0 3px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #71818c;
  border-bottom: 1px solid #dbe4e9;
  font-size: 0.68rem;
}

.product-dropdown .product-results {
  max-height: 190px;
  margin-top: 7px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.product-dropdown .product-result-button {
  min-height: 54px;
  padding: 7px 9px;
}

.product-dropdown .product-result-icon {
  width: 34px;
  height: 34px;
}

.product-dropdown .product-result-copy strong {
  font-size: 0.74rem;
}

.product-dropdown .product-result-copy small {
  font-size: 0.60rem;
}

.product-dropdown .product-empty-state {
  min-height: 90px;
  margin-top: 7px;
}

.invoice-lines-panel {
  margin-top: 8px !important;
  padding: 10px 11px 11px;
}

.invoice-lines-panel .invoice-panel-heading {
  min-height: 31px;
  margin-bottom: 7px;
  align-items: center;
}

.invoice-lines-panel .invoice-panel-heading .section-kicker {
  display: none;
}

.invoice-lines-panel .invoice-panel-heading h2 {
  margin: 0;
  font-size: 0.92rem;
}

.invoice-grid-shell {
  min-height: 245px;
}

.invoice-grid-scroll {
  max-height: clamp(260px, calc(100vh - 335px), 500px);
}

.invoice-grid {
  min-width: 1260px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
}

.invoice-grid th {
  height: 38px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
}

.invoice-grid td {
  height: 48px;
  padding: 5px 8px;
  font-size: 12px;
}

.invoice-grid input {
  width: 82px;
  height: 31px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.line-item-title {
  max-width: 270px;
  font-size: 12.5px;
  font-weight: 700;
}

.line-item-meta {
  margin-top: 3px;
  font-size: 10.5px;
}

.warning-pill {
  font-size: 9px;
}

.stock-button {
  min-width: 52px;
  font-size: 11.5px;
}

.line-action-button {
  width: 31px;
  height: 31px;
  font-size: 13px;
}

.grid-empty-state strong {
  font-size: 12px;
}

.grid-empty-state small {
  font-size: 11px;
}

.invoice-summary-layout {
  margin-top: 9px;
}

@media (max-width: 1280px) {
  .compact-transaction-row {
      grid-template-columns: minmax(300px, 1fr) 154px 170px 174px;
    }

  .compact-product-toolbar {
      grid-template-columns: minmax(260px, 0.8fr) minmax(380px, 1.2fr);
    }

  .product-dropdown .product-results {
      grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 1050px) {
  .compact-transaction-row {
      grid-template-columns: minmax(300px, 1fr) 155px;
    }

  .compact-command-card {
      height: 56px;
      min-height: 56px;
    }

  .compact-product-toolbar {
      grid-template-columns: 1fr;
    }

  .compact-product-panel .category-strip {
      order: 2;
    }

  .invoice-grid-scroll {
      max-height: clamp(250px, calc(100vh - 420px), 440px);
    }
}

@media (max-width: 700px) {
  .screen-invoice-new {
      --invoice-header-height: 62px;
    }

  .compact-transaction-row {
      grid-template-columns: 1fr 145px;
    }

  .compact-client-card {
      grid-column: 1 / -1;
    }

  .compact-command-card {
      height: 52px;
      min-height: 52px;
    }

  .compact-product-panel .category-strip {
      min-height: 38px;
    }

  .product-dropdown {
      position: fixed;
      z-index: 100;
      top: var(--invoice-header-height);
      left: 0;
      right: 0;
      bottom: calc(var(--footer-height) + 66px);
      overflow: hidden;
      border-radius: 0;
    }

  .product-dropdown .product-results {
      max-height: calc(100% - 45px);
      grid-template-columns: 1fr;
    }

  .invoice-grid {
      font-size: 12px;
    }

  .invoice-grid th {
      font-size: 11px;
    }
}


/* ---------- from [module-invoice-new-final-touch-005] ---------- */

.invoice-grid {
  width: 1364px;
  min-width: 1364px;
  table-layout: fixed;
}

.invoice-grid th {
  text-align: center;
  vertical-align: middle;
}

.invoice-grid th,
.invoice-grid td {
  overflow: hidden;
}

.invoice-grid .col-sno {
  width: 44px;
  text-align: center;
}

.invoice-grid .col-stock {
  width: 82px;
  text-align: center;
}

.invoice-grid .col-rate {
  width: 90px;
  text-align: center;
}

.invoice-grid .col-qty {
  width: 72px;
  text-align: center;
}

.invoice-grid .col-refund {
  width: 72px;
  text-align: center;
}

.invoice-grid .col-gross {
  width: 100px;
  text-align: right;
}

.invoice-grid .col-discp {
  width: 100px;
  text-align: center;
}

.invoice-grid .col-discv {
  width: 100px;
  text-align: right;
}

.invoice-grid .col-net {
  width: 100px;
  text-align: right;
}

.invoice-grid .col-actions {
  width: 85px;
  text-align: center;
}

.invoice-grid .col-item {
  width: 419px;
}

.invoice-grid th.col-gross,
.invoice-grid th.col-discv,
.invoice-grid th.col-net {
  text-align: center;
}

.invoice-grid td.col-rate,
.invoice-grid td.col-qty,
.invoice-grid td.col-refund,
.invoice-grid td.col-actions {
  text-align: center;
}

.invoice-grid td.col-gross,
.invoice-grid td.col-discv,
.invoice-grid td.col-net {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.invoice-grid input {
  max-width: 100%;
  margin: 0 auto;
}

.invoice-grid .grid-currency-input {
  width: 78px;
  padding: 0 5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.invoice-grid .grid-quantity-input {
  width: 58px;
  padding: 0 5px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.percent-input-shell {
  position: relative;
  width: 82px;
  margin: 0 auto;
}

.percent-input-shell input {
  width: 82px;
  padding-right: 20px;
  text-align: right;
}

.percent-input-shell > span {
  position: absolute;
  top: 50%;
  right: 7px;
  color: #5e707c;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  transform: translateY(-50%);
}

.grid-money-display {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.line-item-title {
  max-width: none;
}

.invoice-grid-scroll {
  height: 430px;
  max-height: 430px;
  overflow: auto;
}

.invoice-grid thead th {
  position: sticky;
  z-index: 4;
  top: 0;
}

.invoice-grid-footer td {
  position: sticky;
  z-index: 3;
  bottom: 0;
  height: 38px;
  color: #eef4f7;
  background: linear-gradient(180deg, #4b6477, #293f50) !important;
  border-top: 1px solid #172c3b;
  border-bottom: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 800;
}

.invoice-grid-footer .grid-footer-label {
  text-align: left;
  letter-spacing: 0.025em;
}

.invoice-grid-footer .grid-footer-number {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.invoice-grid-footer .grid-footer-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.invoice-grid tbody tr {
  cursor: default;
}

.invoice-grid tbody tr.is-active-row td {
  background: #e9f2f7 !important;
  box-shadow: inset 0 1px 0 #d4e4ed, inset 0 -1px 0 #d4e4ed;
}

.invoice-grid tbody tr.is-refund-row.is-active-row td {
  background: #fff1b8 !important;
}

.line-action-button.picture {
  color: #28556f;
  background: #e5f0f6;
  border-color: #bdd3df;
}

.line-action-button.picture:hover {
  color: white;
  background: linear-gradient(180deg, #5d8198, #31566d);
  border-color: #284b60;
}

.picture-icon {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transform: rotate(90deg);
}

.remarks-panel textarea {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13pt;
}

.invoice-cancel-button,
.invoice-save-button {
  min-width: 174px;
  height: 44px;
  padding-right: 21px;
  padding-left: 21px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14pt;
}

.invoice-action-buttons {
  gap: 12px;
}

@media (max-width: 1500px) {
  .invoice-grid {
      width: 100%;
      min-width: 1114px;
    }

  .invoice-grid .col-item {
      width: auto;
    }
}

@media (max-height: 850px) {
  .invoice-grid-scroll {
      height: 370px;
      max-height: 370px;
    }
}

@media (max-height: 740px) {
  .invoice-grid-scroll {
      height: 315px;
      max-height: 315px;
    }
}

@media (max-width: 700px) {
  .invoice-grid {
      min-width: 1250px;
    }

  .invoice-grid-scroll {
      height: 360px;
      max-height: 360px;
    }

  .invoice-cancel-button,
    .invoice-save-button {
      min-width: 0;
      font-size: 12pt;
    }
}


/* ---------- from [module-invoice-qr-import] ---------- */

.invoice-qr-card {
  width: min(980px, 100%);
}

.invoice-qr-content {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(330px, 0.82fr);
  gap: 0;
}

.qr-camera-panel,
.qr-manual-panel {
  padding: 18px;
}

.qr-camera-panel {
  background: linear-gradient(180deg, #e9eff3, #dfe8ed);
  border-right: 1px solid #cbd7df;
}

.qr-camera-stage {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, #1a2c38, #08131b);
  border: 1px solid #0b1821;
  border-radius: 14px;
  box-shadow: inset 0 0 35px rgba(0,0,0,0.42);
}

.qr-camera-stage video {
  width: 100%;
  height: 330px;
  display: block;
  object-fit: cover;
}

.qr-camera-frame {
  position: absolute;
  width: min(230px, 66%);
  aspect-ratio: 1;
  border: 2px solid rgba(255,255,255,0.88);
  border-radius: 16px;
  box-shadow:
    0 0 0 999px rgba(0,0,0,0.24),
    inset 0 0 0 1px rgba(201,47,56,0.75);
  pointer-events: none;
}

.qr-camera-frame::before,
.qr-camera-frame::after {
  content: "";
  position: absolute;
  width: 45px;
  height: 45px;
  border-color: #e34952;
  border-style: solid;
}

.qr-camera-frame::before {
  top: -3px;
  left: -3px;
  border-width: 4px 0 0 4px;
  border-radius: 14px 0 0 0;
}

.qr-camera-frame::after {
  right: -3px;
  bottom: -3px;
  border-width: 0 4px 4px 0;
  border-radius: 0 0 14px 0;
}

.qr-camera-message {
  position: absolute;
  z-index: 2;
  max-width: 80%;
  padding: 10px 14px;
  color: #ecf3f7;
  background: rgba(16,31,42,0.84);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9px;
  font-size: 0.73rem;
  text-align: center;
}

.qr-camera-actions {
  margin-top: 11px;
  display: flex;
  gap: 9px;
}

.qr-primary-button,
.qr-secondary-button {
  height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.qr-primary-button {
  color: white;
  background: linear-gradient(180deg, #d94750, #a7212a);
  border: 1px solid #8f1a22;
}

.qr-secondary-button {
  color: #405561;
  background: #f4f7f9;
  border: 1px solid #c8d4dc;
}

.qr-primary-button:disabled,
.qr-secondary-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.qr-support-note {
  margin: 10px 0 0;
  color: #6e7f89;
  font-size: 0.62rem;
  line-height: 1.55;
}

.qr-manual-panel {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff, #f5f8fa);
}

.qr-manual-panel > label {
  color: #465b68;
  font-size: 0.7rem;
  font-weight: 800;
}

.qr-manual-input-row {
  position: relative;
  margin-top: 7px;
}

.qr-manual-input-row input {
  width: 100%;
  height: 47px;
  padding: 0 42px 0 13px;
  color: #253946;
  background: white;
  border: 1px solid #c5d2db;
  border-radius: 10px;
  outline: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
}

.qr-manual-input-row input:focus {
  border-color: #6f8da1;
  box-shadow: 0 0 0 3px rgba(85,116,139,0.13);
}

.qr-input-clear {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 33px;
  height: 33px;
  color: #70818d;
  background: #edf2f5;
  border: 0;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.qr-current-context {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 8px;
}

.qr-current-context > div {
  min-width: 0;
  padding: 10px;
  background: #eaf0f4;
  border: 1px solid #d2dde4;
  border-radius: 9px;
}

.qr-current-context span,
.qr-current-context strong {
  display: block;
}

.qr-current-context span {
  color: #788995;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.qr-current-context strong {
  margin-top: 4px;
  overflow: hidden;
  color: #344b59;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-existing-options {
  margin-top: 13px;
  padding: 11px;
  background: #fff8e5;
  border: 1px solid #ead8a4;
  border-radius: 10px;
}

.qr-option-heading {
  display: block;
  margin-bottom: 7px;
  color: #765b1b;
  font-size: 0.64rem;
  font-weight: 800;
}

.qr-radio-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 7px;
  align-items: start;
  padding: 7px;
  color: #465965;
  border-radius: 8px;
  cursor: pointer;
}

.qr-radio-option:hover {
  background: rgba(255,255,255,0.72);
}

.qr-radio-option input {
  margin: 3px 0 0;
  accent-color: var(--jtel-red);
}

.qr-radio-option strong,
.qr-radio-option small {
  display: block;
}

.qr-radio-option strong {
  font-size: 0.67rem;
}

.qr-radio-option small {
  margin-top: 2px;
  color: #7c8a93;
  font-size: 0.57rem;
  line-height: 1.45;
}

.qr-inline-message {
  min-height: 38px;
  margin-top: 10px;
  padding: 8px 9px;
  color: #667984;
  background: #edf2f5;
  border-radius: 8px;
  font-size: 0.65rem;
  line-height: 1.45;
}

.qr-inline-message:empty {
  visibility: hidden;
}

.qr-inline-message.is-error {
  color: #9b2831;
  background: #fae7e9;
}

.qr-inline-message.is-success {
  color: #27724f;
  background: #e4f4ec;
}

.qr-load-button {
  width: 100%;
  min-width: 0;
  margin-top: auto;
  height: 46px;
  font-size: 0.78rem;
}

@media (max-width: 780px) {
  .invoice-qr-card {
      width: 100%;
      height: 100%;
      max-height: none;
      border-radius: 0;
      overflow-y: auto;
    }

  .invoice-qr-content {
      grid-template-columns: 1fr;
    }

  .qr-camera-panel {
      border-right: 0;
      border-bottom: 1px solid #cbd7df;
    }

  .qr-camera-stage,
    .qr-camera-stage video {
      min-height: 260px;
      height: 260px;
    }

  .qr-manual-panel {
      min-height: 370px;
    }
}


/* ---------- from [module-invoice-qr-cross-platform-007] ---------- */

.qr-library-stage {
  min-height: 330px;
  padding: 10px;
  display: block;
}

.invoice-qr-reader {
  width: 100%;
  min-height: 308px;
  overflow: hidden;
  color: #eaf2f6;
  background: #0b1821;
  border-radius: 11px;
}

.invoice-qr-reader video,
.invoice-qr-reader img,
.invoice-qr-reader canvas {
  max-width: 100% !important;
  border-radius: 9px;
}

.invoice-qr-reader > div {
  border: 0 !important;
}

.invoice-qr-reader #qr-shaded-region {
  border-color: rgba(201, 47, 56, 0.65) !important;
}

.invoice-qr-reader button,
.invoice-qr-reader select {
  min-height: 36px;
  margin: 5px;
  padding: 0 11px;
  color: #263b48;
  background: #f3f7f9;
  border: 1px solid #bdccd5;
  border-radius: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
}

.invoice-qr-reader a {
  color: #f18a90 !important;
}

.qr-camera-actions {
  flex-wrap: wrap;
}

.qr-camera-actions > button {
  flex: 1 1 110px;
}

@media (max-width: 780px) {
  .qr-library-stage {
      min-height: 270px;
    }

  .invoice-qr-reader {
      min-height: 248px;
    }
}


/* ---------- from [module-jtel-dialog] ---------- */

#client-select-button {
  position: relative;
  z-index: 14;
  pointer-events: auto;
  touch-action: manipulation;
}


/* ---------- from [module-invoice-special-discount-sync-009] ---------- */

.special-discount-value-row {
  position: relative;
}

.special-discount-value-input {
  width: 112px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.special-discount-value-input:focus {
  border-color: #6f8da1;
  box-shadow: 0 0 0 3px rgba(85,116,139,0.13);
}

.sales-totals-card .special-discount-value-input {
  color: #2f556c;
}

.refund-totals-card .special-discount-value-input {
  color: #9a5e13;
}

@media (max-width: 700px) {
  .special-discount-value-input {
      width: 100%;
    }
}


/* ---------- from [module-invoice-index-polish-011] ---------- */

.invoice-grid tr.has-inactive-warning td {
  box-shadow: inset 0 1px 0 rgba(192, 129, 30, 0.08);
}

.warning-pill.inactive {
  color: #8b5a10;
  background: #fff1c9;
  border-color: #e0bd68;
}


/* ---------- from [invoice-mode-and-retail-tax] ---------- */

.invoice-mode-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 9px 10px;
  background: linear-gradient(180deg, #eef3f6, #dce5eb);
  border: 1px solid #b8c6d0;
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.invoice-mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.invoice-mode-button {
  min-height: 48px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #314656;
  background: linear-gradient(#ffffff, #e3e9ed);
  border: 1px solid #aab9c4;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(25,45,60,.08);
  cursor: pointer;
  transition: 140ms ease;
}

.invoice-mode-button span {
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .035em;
}

.invoice-mode-button small {
  margin-top: 2px;
  color: #71828f;
  font-size: .62rem;
  font-weight: 700;
}

.invoice-mode-button:hover {
  transform: translateY(-1px);
  border-color: #728b9e;
}

.invoice-mode-button.is-active {
  color: #fff;
  border-color: #1e3547;
  background: linear-gradient(#58758c, #2d4b62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 5px 12px rgba(28,54,74,.22);
}

.invoice-mode-button.is-active small {
  color: rgba(255,255,255,.76);
}

.invoice-mode-button.retail-cash.is-active {
  border-color: #246143;
  background: linear-gradient(#4a956c, #236143);
}

.invoice-mode-button.retail-card.is-active {
  border-color: #6a4d19;
  background: linear-gradient(#ae8240, #76531f);
}

.invoice-mode-description {
  max-width: 240px;
  color: #526774;
  font-size: .68rem;
  font-weight: 750;
  line-height: 1.45;
  text-align: right;
}

.sales-tax-row {
  background: #edf7f1;
  border-color: #c6dfcf !important;
}

.sales-tax-row label,
.sales-tax-row span {
  color: #246344;
}

@media (max-width: 900px) {
  .invoice-mode-shell {
      grid-template-columns: 1fr;
    }

  .invoice-mode-description {
      max-width: none;
      text-align: left;
    }
}

@media (max-width: 620px) {
  .invoice-mode-buttons {
      grid-template-columns: 1fr;
    }
}


/* ---------- from [INVOICE-BRANCH-TAX-001] ---------- */

.sales-totals-card input.tax-percent-readonly {
  color: #334c5c;
  background:
    linear-gradient(180deg, #eef3f6, #e4ebef);
  border-color: #c2cfd7;
  box-shadow: inset 0 1px 2px rgba(28, 49, 63, 0.07);
  cursor: not-allowed;
}

.sales-totals-card input.tax-percent-readonly:focus {
  border-color: #c2cfd7;
  box-shadow: inset 0 1px 2px rgba(28, 49, 63, 0.07);
}


/* ---------- from [INVOICE-ORDER-BY-001] ---------- */

.invoice-order-by-field {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.invoice-order-by-field > span {
  color: #435867;
  font-size: 0.7rem;
  font-weight: 850;
}

.invoice-order-by-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: #203440;
  background: #fff;
  border: 1px solid #bdcbd4;
  border-radius: 9px;
  outline: 0;
  transition: 140ms ease;
}

.invoice-order-by-field input:focus {
  border-color: #6c879a;
  box-shadow: 0 0 0 3px rgba(75, 111, 136, 0.13);
}


/* ---------- from [JTEL-INVOICE-ACCESS-TOUCH-016] ---------- */

.invoice-line-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-visibility-control {
  display: flex;
  align-items: center;
}

.stock-visibility-button {
  min-height: 46px;
  padding: 6px 13px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  background: linear-gradient(180deg, #536b7e 0%, #344d61 100%);
  border: 1px solid #263d50;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 4px 10px rgba(24,43,58,.14);
  cursor: pointer;
  touch-action: manipulation;
}

.stock-visibility-button.is-off {
  color: #4c5d69;
  background: linear-gradient(180deg, #f4f6f7 0%, #dfe5e9 100%);
  border-color: #bdc8cf;
}

.stock-visibility-button .stock-control-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.13);
  font-size: 1rem;
}

.stock-visibility-button span:last-child,
.stock-visibility-button strong,
.stock-visibility-button small {
  display: block;
  text-align: left;
}

.stock-visibility-button strong { font-size: .78rem; line-height: 1.1; }

.stock-visibility-button small { margin-top: 2px; font-size: .65rem; opacity: .75; }

.invoice-grid.stock-column-hidden .col-stock {
  display: none !important;
}

.stock-value {
  min-width: 58px;
  min-height: 38px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #324957;
  background: #edf2f5;
  border: 1px solid #cdd8de;
  border-radius: 9px;
  font-weight: 800;
}

.stock-value.is-warning {
  color: #a3262e;
  background: #fbe9eb;
  border-color: #e6b5ba;
}

.screen-invoice-new button,
.screen-invoice-new input,
.screen-invoice-new select,
.screen-invoice-new textarea {
  touch-action: manipulation;
}

.screen-invoice-new .invoice-mode-button,
.screen-invoice-new .metal-action-button,
.screen-invoice-new .small-metal-button,
.screen-invoice-new .header-secondary-button,
.screen-invoice-new .invoice-reset-button,
.screen-invoice-new .invoice-cancel-button,
.screen-invoice-new .invoice-save-button {
  min-height: 48px;
}

.screen-invoice-new .client-select-card,
.screen-invoice-new .compact-date-card,
.screen-invoice-new .force-apply-card {
  min-height: 66px;
}

.screen-invoice-new input[type="text"],
.screen-invoice-new input[type="search"],
.screen-invoice-new input[type="date"],
.screen-invoice-new input[type="number"],
.screen-invoice-new select {
  min-height: 44px;
}

.screen-invoice-new .invoice-grid input {
  min-height: 42px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.screen-invoice-new .line-action-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.screen-invoice-new .invoice-grid th {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.screen-invoice-new .invoice-grid td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.screen-invoice-new .category-button {
  min-height: 44px;
  padding: 8px 15px;
}

.screen-invoice-new .product-option,
.screen-invoice-new .product-result-card {
  min-height: 54px;
}

@media (pointer: coarse) {
  .screen-invoice-new .invoice-panel { padding: 16px; }

  .screen-invoice-new .invoice-mode-button { min-height: 56px; }

  .screen-invoice-new .product-search-shell input { min-height: 50px; }

  .screen-invoice-new .line-action-button { width: 48px; height: 48px; }
}


/* ---------- from [JTEL-INVOICE-BARCODE-COMPACT-017] ---------- */

.compact-product-panel .product-selector-row {
  display: grid;
  grid-template-columns: minmax(290px, .78fr) minmax(360px, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.barcode-scan-group {
  min-width: 0;
}

.barcode-scan-shell {
  min-height: 48px;
  padding: 5px 8px 5px 9px;
  display: grid;
  grid-template-columns: 34px auto minmax(110px, 1fr);
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #f8fafb, #e7edf1);
  border: 1px solid #bdcad3;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #fff;
}

.barcode-scan-shell:focus-within {
  border-color: #627f93;
  box-shadow: 0 0 0 3px rgba(74, 109, 133, .14), inset 0 1px 0 #fff;
}

.barcode-scan-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #566f82, #304b5d);
  border-radius: 8px;
  font-size: 1rem;
}

.barcode-scan-copy strong,
.barcode-scan-copy small {
  display: block;
  white-space: nowrap;
}

.barcode-scan-copy strong {
  color: #263c4a;
  font-size: .72rem;
  line-height: 1.1;
}

.barcode-scan-copy small {
  margin-top: 2px;
  color: #758691;
  font-size: .58rem;
}

.barcode-scan-shell input {
  width: 100%;
  min-width: 0;
  min-height: 36px !important;
  padding: 0 10px !important;
  color: #203743;
  background: #fff;
  border: 1px solid #c6d2da;
  border-radius: 8px;
  outline: 0;
  font-size: .78rem;
  font-weight: 700;
}

.barcode-scan-shell input:disabled {
  color: #8b989f;
  background: #edf1f3;
  cursor: not-allowed;
}

.barcode-scan-message {
  min-height: 15px;
  padding: 2px 4px 0;
  color: #5e7584;
  font-size: .59rem;
  line-height: 1.2;
}

.barcode-scan-message.is-error {
  color: #a3262f;
}

.barcode-scan-message.is-success {
  color: #287452;
}

.screen-invoice-new .invoice-grid td {
  height: auto;
  padding-top: 7px;
  padding-bottom: 7px;
  vertical-align: top;
}

.screen-invoice-new .invoice-grid .col-sno,
.screen-invoice-new .invoice-grid .col-stock,
.screen-invoice-new .invoice-grid .col-gross,
.screen-invoice-new .invoice-grid .col-net {
  padding-top: 15px;
}

.screen-invoice-new .line-item-title {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.28;
}

.screen-invoice-new .line-item-meta {
  margin-top: 4px;
  line-height: 1.25;
}

.screen-invoice-new .line-actions-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.screen-invoice-new .invoice-grid td.col-actions {
  min-width: 102px;
}

@media (max-width: 1180px) {
  .compact-product-panel .product-selector-row {
      grid-template-columns: minmax(260px, .8fr) minmax(320px, 1fr) auto;
    }

  .barcode-scan-shell {
      grid-template-columns: 32px minmax(0, 1fr);
    }

  .barcode-scan-shell input {
      grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
  .compact-product-panel .product-selector-row {
      grid-template-columns: 1fr auto;
    }

  .barcode-scan-group {
      grid-column: 1 / -1;
    }
}

@media (pointer: coarse) {
  .barcode-scan-shell {
      min-height: 54px;
    }

  .barcode-scan-shell input {
      min-height: 44px !important;
    }
}


/* ---------- from [JTEL-INVOICE-ROW-ALIGNMENT-018] ---------- */

.screen-invoice-new .invoice-grid .col-stock {
  width: 90px;
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: top;
}

.screen-invoice-new .stock-value {
  width: 78px;
  min-width: 78px;
  height: 42px;
  min-height: 42px;
  padding: 7px 5px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.screen-invoice-new .invoice-grid .col-actions {
  width: 110px;
  min-width: 110px;
}

.screen-invoice-new .invoice-grid td.col-actions {
  padding-left: 7px;
  padding-right: 7px;
}

@media (pointer: coarse) {
  .screen-invoice-new .stock-value {
      height: 44px;
      min-height: 44px;
    }

  .screen-invoice-new .invoice-grid .col-actions {
      width: 118px;
      min-width: 118px;
    }
}


/* ---------- from [JTEL-INVOICE-FINAL-LAYOUT-019] ---------- */

.screen-invoice-new .invoice-grid-scroll {
  height: clamp(250px, calc(100vh - 430px), 430px);
  max-height: clamp(250px, calc(100vh - 430px), 430px);
  padding-bottom: 0;
  scrollbar-gutter: stable;
}

.screen-invoice-new .invoice-grid-footer td {
  z-index: 6;
  bottom: 0;
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
  line-height: 40px;
}

.screen-invoice-new .invoice-grid-footer .grid-footer-label,
.screen-invoice-new .invoice-grid-footer .grid-footer-number,
.screen-invoice-new .invoice-grid-footer .grid-footer-money {
  vertical-align: middle;
}

.screen-invoice-new .invoice-grid th,
.screen-invoice-new .invoice-grid td {
  box-sizing: border-box;
}

@media (max-width: 700px) {
  .screen-invoice-new .compact-transaction-row {
      grid-template-columns: minmax(0, 1fr) minmax(132px, 145px);
      align-items: start;
    }

  .screen-invoice-new .compact-client-card {
      grid-column: 1 / -1;
      height: auto;
      min-height: 0;
      padding: 9px 10px 10px;
      grid-template-columns: 43px minmax(0, 1fr);
      grid-template-rows: auto auto;
      align-items: center;
      gap: 7px 10px;
      overflow: visible;
    }

  .screen-invoice-new .compact-client-card .client-card-icon {
      grid-column: 1;
      grid-row: 1;
      align-self: center;
    }

  .screen-invoice-new .compact-client-card .client-card-copy {
      grid-column: 2;
      grid-row: 1;
      min-width: 0;
    }

  .screen-invoice-new .compact-client-card .client-card-action {
      position: static;
      grid-column: 1 / -1;
      grid-row: 2;
      width: 100%;
      min-height: 34px;
      margin: 0;
      padding: 8px 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      justify-self: stretch;
      text-align: center;
    }

  .screen-invoice-new .invoice-grid-scroll {
      height: 360px;
      max-height: 360px;
    }
}

@media (min-width: 701px) and (max-height: 820px) {
  .screen-invoice-new .invoice-grid-scroll {
      height: clamp(245px, calc(100vh - 430px), 350px);
      max-height: clamp(245px, calc(100vh - 430px), 350px);
    }
}


/* ---------- from [JTEL-INVOICE-DROPDOWN-TOTALS-020] ---------- */

.screen-invoice-new .invoice-grid-footer td {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding-top: 6px !important;
  padding-bottom: 0 !important;
  vertical-align: top !important;
  line-height: 1.25 !important;
}

.screen-invoice-new .invoice-grid-footer .grid-footer-label,
.screen-invoice-new .invoice-grid-footer .grid-footer-number,
.screen-invoice-new .invoice-grid-footer .grid-footer-money {
  vertical-align: top !important;
  line-height: 1.25 !important;
}

@media (max-width: 700px) {
  .screen-invoice-new .product-search-shell {
      position: relative;
      z-index: 82;
    }

  .screen-invoice-new .product-dropdown {
      position: absolute !important;
      z-index: 120;
      top: calc(100% + 6px) !important;
      left: 0 !important;
      right: 0 !important;
      bottom: auto !important;
      width: 100%;
      max-height: min(310px, 46vh);
      padding: 7px;
      overflow: hidden;
      border-radius: 11px;
      box-shadow: 0 16px 34px rgba(11, 28, 40, 0.25);
    }

  .screen-invoice-new .product-dropdown .product-results {
      max-height: min(245px, 36vh) !important;
      overflow-y: auto;
      overscroll-behavior: contain;
      grid-template-columns: 1fr;
    }

  .screen-invoice-new .product-dropdown .product-empty-state {
      min-height: 90px;
      max-height: 180px;
    }
}


/* ---------- from [JTEL-INVOICE-PHOTOSHOP-LAYOUT-022] ---------- */

.screen-invoice-new .jtel-invoice-command-panel {
  padding: 10px 12px 11px;
  overflow: visible;
}

.screen-invoice-new .jtel-invoice-command-grid {
  --jtel-gap: 10px;
  display: grid;
  grid-template-columns:
    minmax(170px, 196fr)
    minmax(500px, 695fr)
    minmax(220px, 270fr)
    minmax(142px, 150fr);
  grid-template-rows: 60px 65px 45px;
  gap: 8px var(--jtel-gap);
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.screen-invoice-new .jtel-date-zone {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.screen-invoice-new .jtel-date-card {
  width: 100%;
  height: 60px !important;
  min-height: 60px !important;
  padding: 6px 8px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
}

.screen-invoice-new .jtel-date-card input {
  order: 1;
  width: 100%;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
}

.screen-invoice-new .jtel-date-card label {
  order: 2;
  margin: 0 !important;
  font-size: .70rem !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  white-space: normal;
}

.screen-invoice-new .jtel-mode-zone {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 60px !important;
  min-height: 60px !important;
  margin: 0 !important;
  padding: 5px 7px !important;
  min-width: 0;
}

.screen-invoice-new .jtel-mode-buttons {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100%;
  height: 50px;
}

.screen-invoice-new .jtel-mode-buttons .invoice-mode-button {
  width: 100%;
  height: 50px !important;
  min-height: 50px !important;
  min-width: 0;
  margin: 0;
  padding: 4px 8px;
  overflow: hidden;
}

.screen-invoice-new .jtel-mode-buttons .invoice-mode-button span,
.screen-invoice-new .jtel-mode-buttons .invoice-mode-button small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-invoice-new .jtel-mode-description {
  display: none !important;
}

.screen-invoice-new .jtel-client-zone {
  grid-column: 1 / 3;
  grid-row: 2;
  min-width: 0;
}

.screen-invoice-new .jtel-client-card {
  position: relative !important;
  width: 100% !important;
  height: 65px !important;
  min-height: 65px !important;
  margin: 0 !important;
  padding: 7px 90px 7px 10px !important;
  display: grid !important;
  grid-template-columns: 43px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  overflow: hidden !important;
}

.screen-invoice-new .jtel-client-card .client-card-copy {
  min-width: 0;
}

.screen-invoice-new .jtel-client-card .client-card-action {
  position: absolute !important;
  top: 50% !important;
  right: 10px !important;
  width: 72px !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 7px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translateY(-50%) !important;
  white-space: nowrap;
}

.screen-invoice-new .jtel-category-zone {
  grid-column: 3;
  grid-row: 1 / 3;
  min-width: 0;
  height: 133px;
  padding: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, #f4f7f9, #e6edf1);
  border: 1px solid #c9d5dc;
  border-radius: 12px;
}

.screen-invoice-new .jtel-category-strip {
  width: 100%;
  height: 121px;
  max-height: 121px;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.screen-invoice-new .jtel-category-strip .category-chip {
  width: 100%;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  flex: 0 0 38px;
  text-align: left;
}

.screen-invoice-new .jtel-action-zone {
  grid-column: 4;
  grid-row: 1 / 3;
  height: 133px;
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
}

.screen-invoice-new .jtel-right-action,
.screen-invoice-new .jtel-stock-action {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.screen-invoice-new .jtel-right-action {
  padding: 5px 8px !important;
  overflow: hidden !important;
}

.screen-invoice-new .jtel-right-action > span:not(.toggle-track):not(.stock-control-icon),
.screen-invoice-new .jtel-right-action strong,
.screen-invoice-new .jtel-right-action small {
  min-width: 0;
  max-width: 100%;
}

.screen-invoice-new .jtel-right-action strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .67rem !important;
}

.screen-invoice-new .jtel-right-action small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px !important;
  font-size: .53rem !important;
}

.screen-invoice-new .jtel-action-zone .metal-action-icon,
.screen-invoice-new .jtel-action-zone .stock-control-icon {
  width: 29px !important;
  height: 29px !important;
  flex: 0 0 29px !important;
}

.screen-invoice-new .jtel-stock-action > button {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.screen-invoice-new .jtel-search-zone {
  grid-column: 1 / 3;
  grid-row: 3;
  display: grid;
  grid-template-columns: minmax(0, 818fr) minmax(84px, 99fr);
  gap: 9px;
  min-width: 0;
  height: 45px;
}

.screen-invoice-new .jtel-product-search-shell,
.screen-invoice-new .jtel-product-search-shell input {
  width: 100%;
  height: 45px !important;
  min-height: 45px !important;
}

.screen-invoice-new .jtel-refresh-button {
  width: 100%;
  height: 45px !important;
  min-height: 45px !important;
  margin: 0;
}

.screen-invoice-new .jtel-barcode-zone {
  grid-column: 3 / 5;
  grid-row: 3;
  min-width: 0;
  height: 45px;
}

.screen-invoice-new .jtel-barcode-zone .barcode-scan-shell {
  width: 100%;
  height: 45px !important;
  min-height: 45px !important;
  padding-top: 4px;
  padding-bottom: 4px;
}

.screen-invoice-new .jtel-barcode-zone .barcode-scan-shell input {
  height: 35px !important;
  min-height: 35px !important;
}

.screen-invoice-new .jtel-barcode-zone .barcode-scan-message {
  min-height: 0;
  height: 0;
  padding: 0;
  overflow: visible;
}

.screen-invoice-new .jtel-product-search-shell {
  position: relative;
  z-index: 84;
}

.screen-invoice-new .jtel-product-search-shell .product-dropdown {
  left: 0;
  right: 0;
  width: 100%;
}

.screen-invoice-new .invoice-grid-footer tr {
  height: 40px !important;
}

.screen-invoice-new .invoice-grid-footer td {
  display: table-cell !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle !important;
  line-height: 1.2 !important;
}

.screen-invoice-new .invoice-grid-footer .grid-footer-label,
.screen-invoice-new .invoice-grid-footer .grid-footer-number,
.screen-invoice-new .invoice-grid-footer .grid-footer-money {
  vertical-align: middle !important;
  line-height: 1.2 !important;
}

@media (max-width: 1180px) and (min-width: 701px) {
  .screen-invoice-new .jtel-invoice-command-grid {
      grid-template-columns: minmax(155px, .28fr) minmax(430px, 1fr) minmax(210px, .42fr);
      grid-template-rows: 60px 65px auto 45px 45px;
    }

  .screen-invoice-new .jtel-date-zone { grid-column: 1; grid-row: 1; }

  .screen-invoice-new .jtel-mode-zone { grid-column: 2 / 4; grid-row: 1; }

  .screen-invoice-new .jtel-client-zone { grid-column: 1 / 4; grid-row: 2; }

  .screen-invoice-new .jtel-category-zone {
      grid-column: 1 / 3;
      grid-row: 3;
      height: 100px;
    }

  .screen-invoice-new .jtel-category-strip {
      height: 88px;
      max-height: 88px;
    }

  .screen-invoice-new .jtel-action-zone {
      grid-column: 3;
      grid-row: 3;
      height: 100px;
    }

  .screen-invoice-new .jtel-search-zone {
      grid-column: 1 / 4;
      grid-row: 4;
    }

  .screen-invoice-new .jtel-barcode-zone {
      grid-column: 1 / 4;
      grid-row: 5;
    }
}

@media (max-width: 700px) {
  .screen-invoice-new .jtel-invoice-command-panel {
      padding: 9px 10px 10px;
    }

  .screen-invoice-new .jtel-invoice-command-grid {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

  .screen-invoice-new .jtel-date-zone,
    .screen-invoice-new .jtel-mode-zone,
    .screen-invoice-new .jtel-client-zone,
    .screen-invoice-new .jtel-category-zone,
    .screen-invoice-new .jtel-action-zone,
    .screen-invoice-new .jtel-search-zone,
    .screen-invoice-new .jtel-barcode-zone {
      width: 100%;
      height: auto;
      min-height: 0;
    }

  .screen-invoice-new .jtel-date-card {
      height: 60px !important;
    }

  .screen-invoice-new .jtel-mode-zone {
      height: auto !important;
      min-height: 0 !important;
      padding: 7px !important;
    }

  .screen-invoice-new .jtel-mode-buttons {
      height: auto;
      display: flex !important;
      flex-direction: column;
      gap: 7px !important;
    }

  .screen-invoice-new .jtel-mode-buttons .invoice-mode-button {
      height: 48px !important;
      min-height: 48px !important;
    }

  .screen-invoice-new .jtel-client-card {
      height: auto !important;
      min-height: 106px !important;
      padding: 9px 10px !important;
      grid-template-columns: 43px minmax(0, 1fr) !important;
      grid-template-rows: auto 38px !important;
      row-gap: 8px !important;
      overflow: visible !important;
    }

  .screen-invoice-new .jtel-client-card .client-card-icon {
      grid-column: 1;
      grid-row: 1;
    }

  .screen-invoice-new .jtel-client-card .client-card-copy {
      grid-column: 2;
      grid-row: 1;
    }

  .screen-invoice-new .jtel-client-card .client-card-action {
      position: static !important;
      grid-column: 1 / -1;
      grid-row: 2;
      width: 100% !important;
      height: 38px !important;
      min-height: 38px !important;
      transform: none !important;
      justify-self: stretch;
    }

  .screen-invoice-new .jtel-category-zone {
      height: auto;
      max-height: 150px;
    }

  .screen-invoice-new .jtel-category-strip {
      height: auto;
      max-height: 136px;
    }

  .screen-invoice-new .jtel-action-zone {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

  .screen-invoice-new .jtel-right-action,
    .screen-invoice-new .jtel-stock-action,
    .screen-invoice-new .jtel-stock-action > button {
      height: 46px !important;
      min-height: 46px !important;
      flex: 0 0 46px;
    }

  .screen-invoice-new .jtel-search-zone {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

  .screen-invoice-new .jtel-product-search-shell,
    .screen-invoice-new .jtel-product-search-shell input,
    .screen-invoice-new .jtel-refresh-button {
      width: 100%;
      height: 46px !important;
      min-height: 46px !important;
    }

  .screen-invoice-new .jtel-barcode-zone {
      height: auto;
    }

  .screen-invoice-new .jtel-barcode-zone .barcode-scan-shell {
      height: auto !important;
      min-height: 54px !important;
    }

  .screen-invoice-new .jtel-product-search-shell .product-dropdown {
      position: absolute !important;
      top: calc(100% + 6px) !important;
      bottom: auto !important;
      max-height: min(310px, 46vh);
      overflow: hidden;
    }

  .screen-invoice-new .jtel-product-search-shell .product-results {
      max-height: min(245px, 36vh) !important;
      overflow-y: auto;
      grid-template-columns: 1fr;
    }
}


/* ---------- from [JTEL-INVOICE-MOBILE-GRID-023] ---------- */

@media (max-width: 700px) {
  .screen-invoice-new .invoice-grid {
      width: 100% !important;
      min-width: 0 !important;
      table-layout: fixed !important;
    }

  .screen-invoice-new .invoice-grid .col-stock,
    .screen-invoice-new .invoice-grid .col-refund,
    .screen-invoice-new .invoice-grid .col-discp,
    .screen-invoice-new .invoice-grid .col-discv,
    .screen-invoice-new .invoice-grid .col-gross {
      display: none !important;
    }

  .screen-invoice-new .invoice-grid .col-sno {
      width: 7% !important;
    }

  .screen-invoice-new .invoice-grid .col-item {
      width: 39% !important;
    }

  .screen-invoice-new .invoice-grid .col-rate {
      width: 15% !important;
    }

  .screen-invoice-new .invoice-grid .col-qty {
      width: 14% !important;
    }

  .screen-invoice-new .invoice-grid .col-net {
      width: 15% !important;
    }

  .screen-invoice-new .invoice-grid .col-actions {
      width: 10% !important;
      min-width: 0 !important;
    }

  .screen-invoice-new .invoice-grid th,
    .screen-invoice-new .invoice-grid td {
      padding-left: 4px !important;
      padding-right: 4px !important;
      font-size: 11px !important;
    }

  .screen-invoice-new .invoice-grid td {
      vertical-align: middle !important;
    }

  .screen-invoice-new .invoice-grid td.col-item {
      vertical-align: top !important;
      padding-top: 8px !important;
    }

  .screen-invoice-new .invoice-grid .line-item-title {
      max-width: none !important;
      white-space: normal !important;
      overflow: visible !important;
      text-overflow: clip !important;
      overflow-wrap: anywhere !important;
      line-height: 1.22 !important;
    }

  .screen-invoice-new .invoice-grid .line-item-meta {
      margin-top: 3px !important;
      white-space: normal !important;
      line-height: 1.18 !important;
    }

  .screen-invoice-new .invoice-grid input {
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      padding-left: 3px !important;
      padding-right: 3px !important;
      box-sizing: border-box !important;
    }

  .screen-invoice-new .invoice-grid .grid-currency-input,
    .screen-invoice-new .invoice-grid .grid-quantity-input {
      width: 100% !important;
    }

  .screen-invoice-new .line-actions-wrap {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      justify-content: flex-start !important;
      gap: 4px !important;
      white-space: normal !important;
    }

  .screen-invoice-new .line-action-button {
      width: 32px !important;
      height: 32px !important;
      min-width: 32px !important;
      min-height: 32px !important;
    }

  .screen-invoice-new .invoice-grid-footer .col-item {
      width: 39% !important;
    }

  .screen-invoice-new .invoice-grid-scroll {
      overflow-x: hidden !important;
    }
}


/* ============================================================
   [INVOICE-CLIENT-BALANCE-024] START
   Wholesale client account balance + Client Ledger shortcut,
   placed beside the client card in the client zone.
   ============================================================ */

.screen-invoice-new .jtel-client-zone {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.screen-invoice-new .jtel-client-zone .jtel-client-card {
  flex: 1 1 auto;
  min-width: 0 !important;
}

.invoice-client-balance-panel {
  flex: 0 0 262px;
  height: 65px;
  padding: 5px;
  display: flex;
  align-items: stretch;
  gap: 5px;
  background: linear-gradient(155deg, #ffffff 0%, #edf3f6 100%);
  border: 1px solid #cbd8e0;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 16px rgba(18,38,52,0.08);
}

.invoice-client-balance-refresh {
  min-width: 0;
  flex: 1 1 auto;
  padding: 3px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #21313d;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}

.invoice-client-balance-refresh:hover {
  background: rgba(98,127,147,0.08);
}

.invoice-client-balance-refresh small {
  color: #81909b;
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invoice-client-balance-refresh strong {
  margin-top: 2px;
  overflow: hidden;
  color: #263c4c;
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-client-balance-refresh span {
  margin-top: 1px;
  overflow: hidden;
  color: #7a8994;
  font-size: 0.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-client-balance-panel.is-debit .invoice-client-balance-refresh strong {
  color: #a5252e;
}

.invoice-client-balance-panel.is-credit .invoice-client-balance-refresh strong {
  color: #287452;
}

.invoice-client-balance-panel[data-status="loading"] .invoice-client-balance-refresh strong {
  color: #8a98a3;
  font-weight: 700;
}

.invoice-client-balance-panel[data-status="error"] .invoice-client-balance-refresh strong {
  color: #9b6814;
}

.invoice-client-ledger-button {
  flex: 0 0 72px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #eef4f7;
  background: linear-gradient(180deg, #617b90 0%, #3b566b 16%, #243f52 100%);
  border: 1px solid #1a3040;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    0 5px 11px rgba(17,35,48,0.15);
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.invoice-client-ledger-button:hover {
  filter: brightness(1.08);
}

.invoice-client-ledger-icon {
  width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  font-size: 0.8rem;
}

@media (max-width: 1280px) and (min-width: 1181px) {
  .invoice-client-balance-panel {
    flex-basis: 230px;
  }
}

@media (max-width: 700px) {
  .screen-invoice-new .jtel-client-zone {
    flex-direction: column;
  }

  .invoice-client-balance-panel {
    flex: 0 0 auto;
    height: 58px;
  }
}

/* ============================================================
   [INVOICE-CLIENT-BALANCE-024] END
   ============================================================ */


/* ============================================================
   [INVOICE-PHONE-REFINE-025] START  (revision 2)
   1) Invoice Date card adapts to the width it actually receives:
      - wide enough  -> field + caption side by side (field keeps
                        a usable minimum, so it never clips)
      - too narrow   -> caption is dropped, field fills the card
      The same rule works for laptop, tablet and phone widths.
   2) Client picker list: 12 pt Segoe UI Semibold client names.
   ============================================================ */

/* ---- 1) INVOICE DATE ---------------------------------------- */

.screen-invoice-new .jtel-date-zone {
  container-type: inline-size;
  container-name: jtel-date;
}

.screen-invoice-new .jtel-date-card {
  grid-template-columns: minmax(128px, 1fr) auto !important;
}

.screen-invoice-new .jtel-date-card input {
  min-width: 0;
}

/* Card narrower than ~215px: caption off, field takes the full card. */
@container jtel-date (max-width: 214px) {
  .screen-invoice-new .jtel-date-card {
    display: block !important;
    padding: 6px 8px !important;
  }

  .screen-invoice-new .jtel-date-card label {
    display: none !important;
  }

  .screen-invoice-new .jtel-date-card input {
    display: block;
    width: 100%;
    max-width: 100%;
  }
}

/* Older browsers without container queries: drop the caption on
   every screen narrower than a large desktop. */
@supports not (container-type: inline-size) {
  @media (max-width: 1500px) {
    .screen-invoice-new .jtel-date-card {
      display: block !important;
      padding: 6px 8px !important;
    }

    .screen-invoice-new .jtel-date-card label {
      display: none !important;
    }

    .screen-invoice-new .jtel-date-card input {
      display: block;
      width: 100%;
      max-width: 100%;
    }
  }
}

/* Phone: always caption-free, full-width field. */
@media (max-width: 700px) {
  .screen-invoice-new .jtel-date-card {
    display: block !important;
    padding: 6px 8px !important;
  }

  .screen-invoice-new .jtel-date-card label {
    display: none !important;
  }

  .screen-invoice-new .jtel-date-card input {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 46px !important;
    min-height: 46px !important;
    font-size: 1rem;
    text-align: left;
  }
}

/* ---- 2) CLIENT PICKER LIST ---------------------------------- */

.client-picker-card .client-search-shell input {
  height: 48px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12pt;
}

.client-picker-card .client-grid-header {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
}

.client-picker-card .client-result-row {
  min-height: 64px;
  padding: 10px 14px;
  font-family: "Segoe UI", Arial, sans-serif;
}

.client-picker-card .client-result-main strong {
  color: #243a48;
  font-family: "Segoe UI", "Segoe UI Semibold", Arial, sans-serif;
  font-size: 12pt;
  font-weight: 600;
  line-height: 1.3;
}

.client-picker-card .client-result-main small {
  margin-top: 2px;
  font-size: 10pt;
  line-height: 1.35;
}

.client-picker-card .client-result-row > span {
  font-size: 11pt;
  line-height: 1.35;
}

.client-picker-card .modal-empty-state {
  font-size: 12pt;
}

@media (max-width: 620px) {
  .client-picker-card .client-result-row {
    min-height: 72px;
    padding: 13px 14px;
    gap: 4px;
  }
}

/* ============================================================
   [INVOICE-PHONE-REFINE-025] END
   ============================================================ */
