/* Perfiles por tarea. Solo presentación en pantalla; impresión independiente. */
@media screen {
  body.operational-layout main {
    width: 100%; max-width: none; margin: 1.5rem auto;
    padding-inline: clamp(1rem, 2vw, 3rem); min-width: 0;
  }
  .operational-layout .nav-bar { max-width: none; width: 100%; }
  .page-shell { width: 100%; min-width: 0; margin-inline: auto; }
  .page-shell--wide { max-width: none; }
  .page-shell--balanced { max-width: 90rem; }
  .page-shell--workspace { max-width: 120rem; }
  .page-shell--detail { max-width: 100rem; }
  .page-shell--form { max-width: 74rem; }
  .page-shell--compact { max-width: 56rem; }
  .page-shell--document { max-width: 70rem; }
  .page-shell--public { max-width: 75rem; }
  .operational-layout .page-shell > :is(section, article, div) {
    width: 100%; max-width: none; min-width: 0;
  }
  .operational-layout .page-shell > :is(.treasury-dashboard, .payables-page, .supplier-payments-report) {
    position: relative; left: auto; width: 100%; max-width: none;
    margin-inline: 0; transform: none;
  }
  .operational-layout .messages { max-width: none; }
  .page-shell :is(.field-row, .payment-field, .personal-form-field, .busqueda-selector,
    .table-wrap, .purchases-table-wrap, .accounting-table-wrap, form, fieldset) { min-width: 0; }
  .page-shell :is(input:not([type="hidden"]), select, textarea) { max-width: 100%; min-width: 0; }
  .operational-layout .page-shell input:is([type="checkbox"], [type="radio"]) {
    width: 1.1rem; min-width: 1.1rem; max-width: 1.1rem; height: 1.1rem;
    min-height: 1.1rem; max-height: 1.1rem; padding: 0;
    flex: 0 0 auto; vertical-align: middle;
  }
  .page-shell :is(.purchases-heading, .workspace-heading, .personal-module-heading) > div { min-width: 0; }
  .page-shell :is(.purchases-heading, .workspace-heading, .personal-module-heading) > div { max-width: 100%; }
  .page-shell :is(h1, h2, h3, p) { overflow-wrap: anywhere; }
  .page-shell :is(.purchases-heading, .workspace-heading, .personal-module-heading) p { overflow-wrap: anywhere; }
  :is(.page-shell--compact, .page-shell--form) h1 { font-size: clamp(1.65rem, 2vw, 2.15rem); }
  .page-shell--compact .workspace-heading { align-items: start; }
  .visual-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; margin-block: 1rem; }
  .page-shell form.visual-form { display: grid; align-items: start; gap: 1rem 1.25rem; }
  .page-shell form.visual-form > p { margin: 0; }
  .visual-form > :is(p, .field-row) { display: grid; gap: .35rem; align-content: start; margin: 0; }
  .visual-form > :is(h2, h3, aside, .errorlist, .muted-copy, .visual-actions, fieldset) { grid-column: 1 / -1; }
  .visual-form > :is(p, .field-row):has(textarea),
  .visual-form > :is(p, .field-row):has(input[type="checkbox"]) { grid-column: 1 / -1; }
  .visual-form :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) { width: 100%; }
  .visual-form :is(label, small, .helptext) { line-height: 1.45; overflow-wrap: anywhere; }
  .visual-form small, .visual-form .helptext { display: block; color: var(--color-muted); font-size: .82rem; }
  .page-shell form.visual-form input[type="number"] { max-width: 18rem; text-align: right; }
  .page-shell form.visual-form input:is([type="date"], [type="time"]) { max-width: 15rem; }
  .visual-form input[name="codigo"] { max-width: 24ch; }
  .page-shell input:is([type="date"], [type="time"]) { max-width: 15rem; }
  .page-shell input[name="identificacion"] { max-width: 25ch; }
  .page-shell input[name="confianza"] { max-width: 14ch; }
  .page-shell input:is([name="telefono"], [name="telefono_emergencia"]) { max-width: 24ch; }
  .visual-form > button { grid-column: 1 / -1; justify-self: start; width: auto; max-width: 100%; margin: .25rem 0 0; }
  .visual-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.1rem; border: 1px solid #d6dde7; border-radius: .55rem; }
  .visual-form legend { padding-inline: .4rem; font-weight: 750; color: #16436e; }
  .visual-form legend { max-width: 100%; white-space: normal; }
  .visual-form fieldset :is(.visual-wide, .errorlist) { grid-column: 1 / -1; }
  .visual-form .visual-wide { grid-column: 1 / -1; }
  .visual-form .field-row { align-content: start; }
  .visual-check-label { display: flex; align-items: start; gap: .6rem; }
  .visual-form :is(p, .field-row):has(input[type="checkbox"]) label { display: inline; }
  .page-shell form.visual-form > p:has(input[type="checkbox"]) { display: flex; flex-wrap: wrap; align-items: start; gap: .5rem; }
  .visual-form > p:has(input[type="checkbox"]) :is(small, .helptext) { flex-basis: 100%; }
  .visual-form--contained { max-width: 74rem; }
  .visual-content-card { padding: clamp(1rem, 2vw, 2rem); background: #fff; border: 1px solid #d6dde7; border-radius: .65rem; }
  .visual-content-card > p { max-width: 95ch; margin-block: .7rem; }
  .visual-table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; margin-block: .8rem 1.2rem; }
  .visual-table-scroll > table { width: 100%; }
  .operator-client-bar { grid-template-columns: minmax(16rem, 36rem) minmax(12rem, 18rem) auto; justify-content: start; }
  .visual-ledger-form > .visual-form { max-width: 74rem; }
  .page-shell form.visual-ledger-form { display: block; }
  .visual-ledger-form table { min-width: 1100px; width: 100%; border-collapse: collapse; }
  .visual-ledger-form :is(th, td) { padding: .55rem; text-align: left; }
  .visual-ledger-form td input { width: 100%; }
  .visual-ledger-form td input[type="number"] { min-width: 8rem; max-width: 12rem; text-align: right; }
  .visual-ledger-form td:first-child { min-width: 17rem; }
  .visual-ledger-form .button { width: auto; }
  .reception-table { table-layout: fixed; }
  .reception-table th:first-child { width: 20%; }
  .reception-table th:nth-child(2) { width: 17%; }
  .reception-table th:nth-child(3), .reception-table th:nth-child(4),
  .reception-table th:nth-child(5) { width: 7%; }
  .reception-table th:last-child { width: 42%; }
  .reception-table td:not(.amount) { overflow-wrap: anywhere; }
  .reception-table .amount { white-space: nowrap; overflow-wrap: normal; }
}

@media screen and (max-width: 760px) {
  .visual-form, .visual-form fieldset { grid-template-columns: minmax(0, 1fr); }
  .page-shell .operator-client-bar { grid-template-columns: minmax(0, 1fr); }
  .page-shell .operator-client-bar .button { justify-self: start; }
  .page-shell .caja-payment-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-shell .caja-report-filter { display: grid; grid-template-columns: minmax(0, 1fr); }
  .page-shell .caja-report-filter :is(label, input, select) { width: 100%; min-width: 0; }
  .page-shell :is(.purchases-heading, .workspace-heading) { flex-wrap: wrap; }
  .page-shell :is(.purchases-heading, .workspace-heading) .button { max-width: 100%; white-space: normal; }
}

@media screen and (max-width: 1100px) {
  .operational-layout main { margin-block: 1rem; }
  .reception-summary { grid-template-columns: 1fr; }
  .reception-table { min-width: 0; }
  .reception-table thead { display: none; }
  .reception-table tbody, .reception-table tr { display: block; }
  .reception-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: .5rem; border-bottom: 2px solid #cbd5e1; }
  .reception-table td { display: block; width: auto; border: 0; padding: .5rem; }
  .reception-table td:first-child, .reception-table td:nth-child(2),
  .reception-table .reception-quantity { grid-column: 1 / -1; }
  .reception-table .amount { text-align: left; }
  .reception-table .amount::before { content: attr(data-label); display: block; color: #526074; font-size: .8rem; }
  .reception-controls { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
  .reception-footer { align-items: stretch; flex-direction: column; }
}
