.consumable-modal .field[hidden] {
  display: none;
}
.ink-entry-table { min-width: 1450px; }
.ink-entry-table .field { margin: 0; }
.ink-entry-table .field > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.ink-entry-table td:nth-child(6) .search-select { min-width: 240px; }
.ink-entry-view { min-width: 950px; }
/* Ink uses the shared purchase table, with widths for its own columns. */
.purchase-items.ink-items td:nth-child(2) { min-width: 220px; width: 220px; }
.purchase-items.ink-items td:nth-child(3) { min-width: 180px; width: 180px; }
.purchase-items.ink-items td:nth-child(10) { min-width: 120px; }
.purchase-items.ink-items { min-width: 1300px; }
.purchase-items {
  min-width: 1100px;
}
.purchase-items td:nth-child(2) {
  width: auto;
  min-width: 120px;
  white-space: nowrap;
}
.purchase-items td:nth-child(3) {
  width: 220px;
  min-width: 180px;
}
.purchase-items td:nth-child(n + 4):nth-child(-n + 6) {
  min-width: 115px;
}
.purchase-items td:nth-child(n + 7) {
  min-width: 90px;
  white-space: nowrap;
}
.purchase-items .purchase-calculated {
  min-width: 90px;
  background: var(--bg, #f7f8fb);
  color: var(--text);
  opacity: 1;
}
.purchase-items [data-reference] {
  min-width: 125px;
}

.media-purchase-modal form {
  min-width: 0;
  overflow-x: clip;
}

.media-entry-table {
  min-width: 2200px;
}
.media-entry-table .field {
  margin: 0;
}
.media-entry-table .field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.media-entry-table .search-select {
  min-width: 155px;
}
.media-entry-table input[readonly] {
  background: var(--bg, #f7f8fb);
}
.media-entry-table td:nth-child(8) .search-select {
  min-width: 220px;
}
.media-stock-warning {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e9c780;
  border-radius: 9px;
  background: #fff6df;
  color: #755014;
  font-size: 12px;
  line-height: 1.6;
}
.media-stock-warning[hidden] {
  display: none;
}
.media-stock-warning p {
  margin: 5px 0 0;
}
.media-entry-view {
  min-width: 1750px;
}
.job-locked {
  background: #fff2d9;
  color: #916019;
}

.media-entry-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.media-entry-status.complete {
  background: #e1f5ec;
  color: #23744f;
}
.media-entry-status.pending {
  background: #fff0d5;
  color: #946116;
}

.media-issue-table {
  min-width: 1550px;
}
.media-issue-table .field {
  margin: 0;
}
.media-issue-table .field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.media-issue-table input[readonly] {
  background: var(--bg, #f7f8fb);
}
.media-issue-table td:nth-child(6) {
  min-width: 290px;
}
.issue-roll-choice {
  display: flex;
  align-items: start;
  gap: 4px;
  margin-bottom: 6px;
}
.issue-roll-choice .field {
  flex: 1;
  min-width: 0;
}
.issue-roll-choice .search-select {
  min-width: 220px;
}
.issue-roll-choice .icon-button {
  width: 30px;
  height: 34px;
  color: #c74960;
  flex-shrink: 0;
}
.issue-add-roll {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  color: var(--purple);
  padding: 4px 0;
  font-size: 11px;
}
.issue-add-roll svg,
.covered-excess svg {
  width: 14px;
  height: 14px;
}
.covered-excess {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #27835a;
  font-size: 12px;
  white-space: nowrap;
}
.media-issue-view {
  min-width: 1250px;
}
.reference-status {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.reference-status.used {
  background: #fde7eb;
  color: #b4435a;
}
.reference-status.partial {
  background: #fff0d5;
  color: #946116;
}
.reference-status.not-used {
  background: #e1f5ec;
  color: #23744f;
}

.kraft-entry-table,
.kraft-entry-view {
  min-width: 1480px;
}
.kraft-entry-table .field {
  position: relative;
  margin: 0;
  min-width: 125px;
}
.kraft-entry-table .field > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.kraft-entry-table td:nth-child(9) .search-select {
  min-width: 220px;
}

.reference-status.returned { background: #fce9e9; color: #a73c48; }
.purchase-return-modal .customer-form-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.return-items { min-width: 1300px; }
.return-items .field { min-width: 120px; }
.return-items td:nth-child(3) { min-width: 240px; }
@media (max-width: 900px) { .purchase-return-modal .customer-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .purchase-return-modal .customer-form-grid { grid-template-columns: 1fr; } }

/* Printing uses the Media Entry layout with its nine requested columns. */
.printing-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.media-entry-table.printing-entry-table { min-width: 1320px; }
.printing-entry-table td:nth-child(5) .search-select { min-width: 220px; }
.media-entry-view.printing-entry-view { min-width: 1050px; }
@media (max-width: 1100px) { .printing-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .printing-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .printing-fields { grid-template-columns: 1fr; } }

.media-entry-table.fusing-entry-table { min-width: 1540px; }
.fusing-entry-table td:nth-child(5) .search-select { min-width: 220px; }
.media-entry-view.fusing-entry-view { min-width: 1200px; }

.media-entry-table.outward-entry-table { min-width: 1100px; }
.outward-entry-table td:nth-child(2) .search-select { min-width: 220px; }
.media-entry-view.outward-entry-view { min-width: 950px; }

.bill-split { display: grid; grid-template-columns: minmax(0, 65fr) minmax(0, 35fr); gap: 16px; align-items: start; }
.bill-form-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bill-form-fields .field[hidden] { display: none; }
.bill-form-fields [data-field="reason"] { grid-column: 1 / -1; }
.bill-summary { margin: 0; font-size: 12px; }
.bill-summary > div { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.bill-summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bill-summary .bill-net-total { padding: 14px 12px; background: #f0ebff; color: #7654ca; font-weight: 700; border-radius: 7px; }
.media-entry-table.bill-job-table { min-width: 1400px; }
.bill-view-summary { margin-top: 18px; margin-left: auto; max-width: 400px; }
.media-entry-status.cancelled { background: #f2ede7; color: #9c886a; }
.bill-view-summary h3 { font-size: 14px; }
.bill-notes dd { white-space: pre-wrap; }
.bill-type { display: inline-flex; padding: 5px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.bill-type.amount { background: #e6f4ec; color: #348968; }
.bill-type.without-amount { background: #fff2d9; color: #916019; }
@media (max-width: 900px) { .bill-split { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .bill-form-fields { grid-template-columns: 1fr; } }
