/* Shared layout corrections. Business state and printable documents retain their source data. */
.field { align-content:start; grid-auto-rows:max-content; min-width:0; }
.field > input:not([type=checkbox]):not([type=radio]):not([type=file]), .field > select { height:42px; min-height:42px; max-width:100%; }
.field.compact > input:not([type=checkbox]):not([type=radio]), .field.compact > select { height:38px; min-height:38px; }
.field > textarea { align-self:start; }
.form-actions { flex-wrap:wrap; align-items:center; }
.form-actions > .button { flex-shrink:0; white-space:normal; }
.task-item { min-width:0; overflow-wrap:anywhere; }
.task-item > div { min-width:0; }
.task-item-action { flex-wrap:wrap; }
.task-item-action > div:nth-child(2) { flex:1 1 240px; }
.task-item-action > .row-actions { min-width:0; max-width:100%; flex-wrap:wrap; }
.task-item .row-actions { min-width:0; max-width:100%; flex-wrap:wrap; }
.task-item-action .row-actions .button { white-space:normal; }
.business-table-tabs { flex-wrap:wrap; overflow:visible; }
.business-table-tabs button { flex:0 1 auto; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.business-table.readable-table { min-width:0 !important; width:100%; }
.business-table.readable-table th, .business-table.readable-table td { white-space:normal; overflow-wrap:anywhere; min-width:0; }
.business-table.readable-table .table-product { min-width:0; }
.business-table.readable-table .table-product > div { min-width:0; }
.business-table.readable-table .row-actions { min-width:0; flex-wrap:wrap; }
.business-table.readable-table .table-actions { position:static; box-shadow:none; }
.business-table.readable-table .table-actions .button { white-space:normal; }
.record-expander { display:none; }
@media screen {
  .responsive-record-wrap { overflow:visible; box-shadow:none !important; }
  .business-table.responsive-records { display:block; min-width:0 !important; }
  .business-table.responsive-records thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .business-table.responsive-records tbody { display:grid; gap:12px; padding:12px; }
  .business-table.responsive-records tbody tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; width:100%; padding:12px; gap:8px 16px; border:1px solid var(--line); border-radius:10px; background:#fff; }
  .business-table.responsive-records tbody td { position:static !important; display:flex; flex-direction:column; align-items:stretch; gap:4px; padding:4px; min-width:0 !important; width:auto !important; text-align:left; border:0; background:transparent; box-shadow:none; white-space:normal !important; overflow-wrap:anywhere; }
  .business-table.responsive-records tbody td::before { content:attr(data-label); display:block; font-size:12px; line-height:1.5; font-weight:500; color:var(--muted); }
  .business-table.responsive-records tbody td.table-key { font-size:14px; font-weight:700; box-shadow:none; border-right:0; }
  .business-table.responsive-records tbody td.table-key::after { display:none; }
  .business-table.responsive-records td > :is(.status,.badge) { align-self:flex-start; }
  .business-table.responsive-records tbody td.table-actions { grid-column:1/-1; flex-direction:row; align-items:center; flex-wrap:wrap; border-top:1px solid #edf1f5; padding-top:10px; }
  .business-table.responsive-records tbody td.table-actions::before { flex-basis:100%; }
  .business-table.responsive-records tbody td.table-wide-message { display:block; grid-column:1/-1; text-align:center; }
  .business-table.responsive-records tbody td.table-wide-message::before { display:none; }
  .business-table.responsive-records tbody tr:not(.record-open) td.record-secondary { display:none; }
  .business-table.responsive-records tbody td.record-expander { display:block; grid-column:1/-1; padding-top:4px; }
  .business-table.responsive-records tbody td.record-expander::before { display:none; }
  .business-table.responsive-records tbody td input, .business-table.responsive-records tbody td select { max-width:100%; min-width:0; }
  .slip-stage[data-fit-ready] { position:relative; padding:12px; overflow-x:hidden; height:calc(var(--preview-height) + 24px); min-height:0; }
  .slip-stage[data-fit-ready] .slip-preview { transform:scale(var(--preview-scale,1)); transform-origin:top left; margin:0; }
  .slip-stage.slip-actual-size { overflow-x:auto; }
}
.slip-preview-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0 8px; color:var(--muted); }
.payroll-month-cards { display:none; }
.extra-positions { border:1px solid var(--line); border-radius:8px; padding:12px; }
.extra-positions summary { cursor:pointer; font-weight:700; }
.extra-positions-search { margin:12px 0; }
.extra-positions-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:300px; overflow-y:auto; gap:8px; }
.extra-positions-list .organization-extra-position { display:flex; align-items:center; gap:8px; padding:8px; margin:0; background:#f5f8fb; border-radius:6px; }
.extra-positions-list input { width:18px; height:18px; flex:none; }
@media (max-width:820px) {
  .chain { grid-template-columns:repeat(2,minmax(0,1fr)); min-width:0; overflow:visible; gap:10px; }
  .chain-step { min-width:0; white-space:normal; overflow-wrap:anywhere; }
  .chain-step::after { display:none; }
  .payroll-monthly-table { display:none; }
  .payroll-month-cards { display:grid; padding:12px; gap:12px; }
  .payroll-employee-card { border:1px solid var(--line); border-radius:10px; padding:14px; background:#fff; }
  .payroll-employee-card header { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:16px; }
  .payroll-employee-card > p { margin:8px 0; color:var(--muted); }
  .payroll-employee-card summary { cursor:pointer; padding:10px 0; color:var(--blue-700); font-weight:700; }
  .payroll-day-list { display:grid; gap:8px; padding-top:10px; }
  .payroll-day-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 12px; padding:10px; background:#f3f7fb; border-radius:7px; }
  .payroll-day-row small { grid-column:1/-1; }
  .payroll-employee-card:not(.show-empty-days) .payroll-empty-day { display:none; }
}
@media (max-width:600px) {
  .task-item-action { display:grid; grid-template-columns:9px minmax(0,1fr); }
  .task-item-action:not(:has(> .task-mark)) { grid-template-columns:minmax(0,1fr); }
  .task-item-action:not(:has(> .task-mark)) > .row-actions { grid-column:1; }
  .task-item-action > .row-actions { grid-column:2; margin:0; justify-content:flex-start; }
  .task-item .row-actions .button { min-height:38px; }
  .business-table-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:10px; }
  .business-table-tabs button { min-height:42px; padding:8px; }
  .business-table.responsive-records tbody { padding:8px; gap:10px; }
  .business-table.responsive-records tbody tr { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; padding:10px; }
  .business-table.responsive-records tbody td.table-key { grid-column:1/-1; }
  .business-table.responsive-records .table-product { flex-wrap:wrap; }
  .business-table.responsive-records .row-actions .button { min-height:36px; }
  .product-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .product-summary article { min-height:72px; padding:10px; }
  .product-summary strong { font-size:22px; }
  .extra-positions-list { grid-template-columns:1fr; }
  .form-actions { align-items:stretch; }
  .form-actions > :is(input,select) { max-width:100%; }
  .notification-controls .button { min-width:0; max-width:100%; white-space:normal; }
}
@media print {
  .record-expander, .payroll-month-cards, .slip-preview-controls { display:none !important; }
  .payroll-monthly-table { display:block !important; }
  .slip-stage[data-fit-ready] { height:auto !important; overflow:visible !important; }
  .slip-stage[data-fit-ready] .slip-preview { transform:none !important; }
}
/* Personal task homes expose authorized duties without duplicating the overview. */
.personal-feature-group + .personal-feature-group { margin-top: 18px; }
.personal-feature-group h3 { margin: 0 0 10px; font-size: 15px; color: #587086; }
.personal-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.personal-feature-link { min-width: 0; min-height: 48px; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; font-size: 16px; }
@media (min-width: 901px) { .desktop-personal-workspace .personal-authorized-features { display: none; } }

/* Production workflow presentation, desktop and touch screens. */
.production-instructions{white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.55}.production-instructions p{margin:5px 0;color:var(--text-muted,#516579)}.production-timing{display:flex;flex-direction:column;gap:4px;margin:10px 0;font-size:14px}.production-timing small{color:#63778c}.production-pending-group+ .production-pending-group{margin-top:24px}.machine-product-rates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:260px;overflow-y:auto}.production-instructions:empty{display:none}@media(max-width:640px){.machine-product-rates{grid-template-columns:1fr}.production-pending-group .task-item{align-items:stretch;flex-direction:column}.production-pending-group .row-actions{justify-content:flex-start}}
