:root {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  color: #29323b;
  background: #f3f6fa;
  font-synthesis: none;
  --ink: #29323b;
  --muted: #637080;
  --line: #dce0e5;
  --primary: #225eae;
  --primary-dark: #174985;
  --paper: #fff;
}
.customer-sheet .form-grid { row-gap: 10px; }
.customer-sheet .field { gap: 4px; }
.customer-sheet input, .customer-sheet select { min-height: 36px; padding: 8px 10px; }
.customer-sheet .receiver-lookup { padding: 10px; margin-bottom: 12px; }
.customer-sheet .form-footer { margin-top: 12px; padding-top: 12px; }
.customer-sheet > .small-note { margin-bottom: 8px; }
@media (min-width: 1100px) {
  .customer-sheet .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.customer-sheet:has(.lookup-options[open]) .form-grid .field:not(:has([name='documentType'], [name='documentNumber'])) { display: none; }
.customer-sheet.customer-conflict .form-grid, .customer-sheet.customer-conflict .receiver-lookup { display: none; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #d7a531;
  outline-offset: 3px;
}
a {
  color: var(--primary);
  text-underline-offset: 3px;
}
p {
  line-height: 1.6;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
h2 {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  background: white;
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
}
.initial-state {
  grid-column: 1 / -1;
  max-width: 640px;
  padding: 80px 24px;
  margin: auto;
  text-align: center;
}
.brand-mark {
  background: #d9f0dd;
  color: #153d34;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.06em;
  flex: 0 0 auto;
}
.sidebar {
  background: #152b46;
  color: #d5dee6;
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
}
.brand-name {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
.brand-subtitle {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 400;
  color: #c0d4c8;
  letter-spacing: 0.04em;
}
.nav-label {
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  padding: 0 14px;
  margin-bottom: 12px;
  color: #a4bfb0;
}
.navigation {
  display: grid;
  gap: 6px;
}
.nav-button {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 0;
  border-radius: 12px;
  color: #d9e7df;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.9rem;
}
.nav-button:hover {
  background: #344957;
}
.nav-button[aria-current='page'] {
  background: #e3eaf1;
  color: #203d53;
  font-weight: 700;
}
.nav-symbol {
  display: inline-grid;
  place-items: center;
  width: 19px;
  font-size: 1rem;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid #386053;
  padding: 22px 10px 0;
  font-size: 0.76rem;
  line-height: 1.55;
}
.sidebar-footer strong {
  display: block;
  color: #ecf4ef;
  margin-bottom: 5px;
}
.main-wrap {
  min-width: 0;
}
.topbar {
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 26px;
  gap: 12px;
}
.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3a6555;
  font-size: 0.75rem;
  white-space: nowrap;
}
.connection::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4c8b63;
}
.connection.offline {
  color: #9c4c26;
}
.connection.offline::before {
  background: #b7683e;
}
.workspace {
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px;
}
.workspace:focus {
  outline: none;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 11px;
}
.subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0;
  max-width: 700px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  min-height: 40px;
}
.button:hover {
  background: #edf3ec;
}
.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.button.primary:hover {
  background: var(--primary-dark);
}
.button.quiet {
  background: transparent;
  border-color: transparent;
  padding: 7px 10px;
  min-height: 34px;
}
.button.danger {
  color: #983e30;
}
.button.small {
  padding: 7px 11px;
  min-height: 34px;
  font-size: 0.78rem;
}
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.notice {
  border: 1px solid #dce3cc;
  background: #f0f3e6;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  line-height: 1.6;
}
.notice p {
  margin: 0;
}
.notice strong {
  color: #3f5835;
}
.notice.warning {
  background: #fcf4e7;
  border-color: #ead9b8;
}
.notice.warning strong {
  color: #785722;
}
.notice.error {
  background: #fff0eb;
  border-color: #e5c6b8;
  color: #883c2e;
}
.notice.info {
  background: #edf4f5;
  border-color: #cfdee0;
}
.notice-marker {
  font-weight: 800;
  color: #62804c;
  flex-shrink: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 15px;
}
.metric-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.metric-number {
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 650;
}
.metric-detail {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 11px 0 0;
}
.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  min-width: 0;
}
.panel:last-child {
  margin-bottom: 0;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}
.panel-description {
  color: var(--muted);
  font-size: 0.83rem;
  margin-bottom: 22px;
}
.setup-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 19px 0;
  border-top: 1px solid #e8ede7;
}
.step-number {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e3db;
  border-radius: 50%;
  font-size: 0.75rem;
  color: #698271;
}
.step-number.complete {
  background: #e4f1df;
  border-color: #e4f1df;
  color: #35643d;
}
.setup-step h3 {
  font-size: 0.87rem;
  margin-bottom: 5px;
}
.setup-step p {
  margin: 0;
  font-size: 0.77rem;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 5px 8px;
  background: #edf1ec;
  color: #57715b;
  white-space: nowrap;
  letter-spacing: 0.015em;
}
.pill.amber {
  background: #f7edd8;
  color: #826531;
}
.pill.dark {
  background: #e2eee4;
  color: #235740;
}
.feature-card {
  background: #e8efe7;
  border-color: #d6e2d5;
}
.feature-card p {
  font-size: 0.86rem;
  color: #4e6958;
}
.feature-card .eyebrow {
  margin-bottom: 16px;
}
.feature-card h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  max-width: 260px;
  margin: 15px 0;
}
.small-note {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.6;
}
.empty-state {
  text-align: center;
  padding: 42px 20px;
}
.empty-glyph {
  width: 48px;
  height: 48px;
  border: 1px solid #d9e4dc;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
  background: #f1f6ef;
  color: #60836a;
  font-size: 1.3rem;
}
.empty-state h2 {
  font-size: 1rem;
}
.empty-state p {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 420px;
  margin: 0 auto 20px;
}
.list-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  align-items: center;
}
.list-toolbar input {
  max-width: 340px;
}
.table-wrap {
  overflow-x: auto;
}
.pricing-profiles { min-width: 1060px; }
.pricing-profiles td:first-child { min-width: 180px; }
.pricing-profiles td:nth-child(3) { min-width: 245px; }
.pricing-profiles td:nth-child(4) { min-width: 94px; }
.pricing-profiles td:nth-child(5), .pricing-profiles td:nth-child(6) { min-width: 145px; }
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.83rem;
}
th {
  color: #6c7c73;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
  white-space: nowrap;
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid #e6ebe5;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.primary-cell {
  font-weight: 650;
}
.secondary-cell {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  margin-top: 4px;
  font-weight: 400;
}
.money,
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field.wide {
  grid-column: 1 / -1;
}
.field label {
  font-size: 0.8rem;
  font-weight: 600;
}
.field-hint {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
input,
select,
textarea {
  border: 1px solid #ccd8d0;
  background: white;
  border-radius: 7px;
  color: var(--ink);
  padding: 10px 12px;
  min-height: 42px;
  width: 100%;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f0f3ee;
  color: #708076;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
.form-section {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.form-section + .form-section {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.form-section legend {
  font-size: 0.96rem;
  font-weight: 650;
  padding: 0;
  margin-bottom: 18px;
}
.form-footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.form-footer .small-note {
  margin: 0;
}
.form-errors:empty {
  display: none;
}
.form-errors {
  margin-top: 18px;
}
.item-rows {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
}
.item-row {
  display: grid;
  grid-template-columns:
    minmax(140px, 2fr) minmax(70px, 0.65fr) minmax(110px, 1fr) minmax(100px, 0.8fr)
    auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fafcf8;
  border-radius: 9px;
}
.item-row .field label {
  font-size: 0.72rem;
}
.item-row .button {
  min-height: 42px;
}
.catalog-add {
  display: flex;
  gap: 12px;
  max-width: 570px;
  margin-bottom: 18px;
}
.catalog-add select {
  min-width: 0;
}
.catalog-add .button {
  white-space: nowrap;
}
.total-box {
  margin-left: auto;
  width: 310px;
  max-width: 100%;
  padding: 20px;
  background: #f2f6f0;
  border-radius: 10px;
}
.total-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.84rem;
  padding: 6px 0;
}
.total-line.grand {
  border-top: 1px solid #d7e3d2;
  margin-top: 11px;
  padding-top: 14px;
  font-weight: 750;
  font-size: 1.1rem;
}
.total-box .small-note {
  margin: 13px 0 0;
}
.draft-summary {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-label {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
.detail-value {
  font-size: 0.88rem;
  font-weight: 600;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 16px;
  position: relative;
  padding-bottom: 29px;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 37px;
  bottom: 7px;
  width: 1px;
  background: var(--line);
}
.timeline h3 {
  font-size: 0.91rem;
}
.timeline p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 7px;
}
.timeline a {
  font-size: 0.8rem;
}
.link-list {
  margin: 18px 0 0;
  padding-left: 18px;
}
.link-list li {
  margin-bottom: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.notifications {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 32px));
}
.toast {
  background: #173f37;
  color: #fff;
  padding: 16px 20px;
  border-radius: 10px;
  font-size: 0.86rem;
  box-shadow: 0 10px 35px #153d3426;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
#print-document {
  display: none;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th {
  background: #f5f6f8;
  color: #536171;
  text-align: left;
  font-weight: 600;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table tbody tr:hover {
  background: #f8fafb;
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table-scroll {
  overflow-x: auto;
}
.payment-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(90px, .7fr) minmax(140px, 1fr) minmax(100px, .7fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}
.payment-row [hidden] { display: none; }
.payment-row .button-row { align-self: end; flex-wrap: wrap; }
.allocation-row {
  display: grid;
  grid-template-columns: 1fr minmax(130px, 200px);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.allocation-row p {
  margin: 0;
}
.treasury-totals {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.treasury-totals p {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .payment-row,
  .allocation-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .workspace {
    padding: 30px 25px;
  }
  .topbar {
    padding-left: 25px;
    padding-right: 25px;
  }
  .two-columns {
    grid-template-columns: 1fr;
  }
  .item-row {
    grid-template-columns: 1fr 1fr 1fr auto;
  }
  .item-row .field:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 18px 16px 12px;
    gap: 18px;
  }
  .brand {
    padding-left: 3px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .navigation {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 5px;
  }
  .nav-button {
    width: auto;
    white-space: nowrap;
    padding: 10px 12px;
  }
  .nav-symbol,
  .nav-label,
  .sidebar-footer {
    display: none;
  }
  .topbar {
    min-height: 55px;
    padding: 12px 20px;
  }
  .workspace {
    padding: 27px 18px;
  }
  .page-heading {
    flex-direction: column;
    gap: 15px;
  }
  .page-heading .button {
    align-self: flex-start;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px 12px;
  }
  .metric-number {
    font-size: 1.7rem;
  }
  .metric-detail {
    font-size: 0.67rem;
  }
  .metric-label {
    font-size: 0.72rem;
  }
  .panel {
    padding: 20px 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-footer .button-row {
    width: 100%;
  }
  .form-footer .button-row .button {
    flex: 1;
  }
  .setup-step {
    gap: 10px;
    grid-template-columns: 29px minmax(0, 1fr);
  }
  .setup-step .button {
    grid-column: 2;
    justify-self: start;
  }
  .notice {
    padding: 14px;
  }
  .list-toolbar {
    flex-wrap: wrap;
  }
  .list-toolbar input {
    max-width: none;
  }
  .draft-summary {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .notifications {
    bottom: 16px;
    right: 16px;
  }
}
@media (max-width: 430px) {
  .item-row {
    grid-template-columns: 1fr 1fr;
  }
  .item-row .button {
    justify-self: end;
  }
  .catalog-add {
    flex-direction: column;
  }
  .breadcrumb {
    font-size: 0.7rem;
  }
  .topbar-actions {
    gap: 2px;
  }
}
/* Presentation only: fiscal totals and authorization remain server-owned. */
.sidebar {
  background: linear-gradient(170deg, #173554, #10243b);
  overflow-y: auto;
}
.brand-mark {
  background: #dbeafe;
  color: #164d8a;
}
.brand-subtitle {
  color: #afc5df;
}
.nav-button {
  border-radius: 8px;
  min-height: 42px;
}
.nav-button[aria-current='page'] {
  background: #fff;
  color: #174985;
  box-shadow: 0 3px 10px #071a3026;
}
.sidebar-footer {
  border-color: #ffffff24;
}
.topbar {
  min-height: 76px;
}
.topbar-context {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.environment-label {
  color: #77501b;
  background: #fff4d9;
  border: 1px solid #ead6a4;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.71rem;
  font-weight: 650;
  width: fit-content;
}
.workspace {
  padding-top: 32px;
  padding-bottom: 48px;
}
.panel,
.metric {
  box-shadow: 0 2px 5px #152b4605;
}
.panel {
  padding: 24px;
}
.panel > h2 {
  margin-bottom: 12px;
}
.button {
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.button:hover {
  background: #eef4fc;
  border-color: #b8cce4;
}
.button.primary {
  box-shadow: 0 2px 3px #17498518;
}
.notice {
  border-radius: 10px;
}
.total-box {
  background: #eef4fc;
  border: 1px solid #dbe6f5;
}
th {
  color: #53687d;
  background: #f3f6fa;
}
input,
select,
textarea {
  border-color: #cbd5e1;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #91aac7;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}
.receiver-lookup {
  background: #f3f7fc;
  border: 1px solid #dce6f3;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 22px;
}
.receiver-lookup .small-note {
  margin: 10px 0 0;
}
.receiver-lookup [role='status']:empty {
  display: none;
}
.receiver-lookup [role='status']:not(:empty) {
  border-top: 1px solid #dce6f3;
  padding-top: 10px;
  color: var(--ink);
}
.lookup-environment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.lookup-environment select {
  max-width: 390px;
  font-weight: 400;
}
.turno-context {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid #cbdcf0;
  border-left: 4px solid var(--primary);
  background: #edf4fd;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.turno-context .eyebrow {
  margin-bottom: 6px;
}
.turno-context h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}
.turno-context p:last-child {
  margin-bottom: 0;
}
.plate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill.plate {
  background: white;
  color: #21394f;
  border: 1px solid #b8cce4;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 9px 13px;
}
.turno-preparation {
  max-width: 1100px;
}
.preparation-section {
  min-width: 0;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 22px 24px 24px;
  margin: 0 0 24px;
}
.preparation-section legend {
  font-weight: 700;
  padding: 0 8px;
  margin-left: -8px;
}
.section-step {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #e6effb;
  color: var(--primary);
  font-size: 0.8rem;
  margin-right: 9px;
}
.vehicle-grid,
.document-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.vehicle-card {
  background: #f8fafc;
  box-shadow: none;
  margin: 0;
  padding: 20px;
}
.vehicle-card h2 {
  display: inline-block;
  letter-spacing: 0.06em;
  border-bottom: 3px solid #b8cce4;
  padding-bottom: 6px;
}
.vehicle-card .field + .field {
  margin-top: 16px;
}
.document-choice {
  padding: 20px;
  border: 1px solid #d9e3ef;
  border-radius: 10px;
  background: #f7faff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.document-choice .button {
  margin-top: auto;
}
.document-actions > .button,
.document-actions > a {
  justify-self: start;
}
.balance-strip {
  padding: 14px 18px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: #f3f7fc;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.sale-total {
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #174985;
}
/* Keep the completed turn, documents and cash actions together at 1280×720. */
.panel.sale-result {
  padding: 16px 18px;
  margin-bottom: 10px;
}
.sale-result h2 {
  margin-bottom: 6px;
}
.sale-result > p {
  margin-bottom: 8px;
  line-height: 1.45;
}
.sale-result .sale-total {
  font-size: 1.25rem;
}
.sale-result .balance-strip {
  padding: 10px 12px;
}
.sale-result .document-actions {
  gap: 8px 12px;
}
.sale-result .document-choice {
  padding: 12px;
}
.sale-result .document-choice h3,
.sale-result .document-choice .small-note {
  margin-bottom: 6px;
}
.sale-result .document-choice .small-note {
  line-height: 1.45;
}
@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
  }
  .topbar-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 760px) {
  .vehicle-grid,
  .document-actions {
    grid-template-columns: 1fr;
  }
  .turno-context {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .preparation-section {
    padding: 18px 16px;
  }
  .lookup-environment {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .lookup-environment select {
    max-width: none;
  }
  .receiver-lookup .button {
    width: 100%;
  }
  .turno-preparation .form-footer > .button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

/* Compact operator layout; fiscal fields remain visible and editable. */
.topbar {
  min-height: 58px;
  padding: 8px 22px;
}
.topbar-context {
  gap: 4px;
}
.workspace {
  padding: 20px 22px 28px;
}
.page-heading {
  margin-bottom: 12px;
  gap: 12px;
}
h1 {
  font-size: 1.45rem;
  margin-bottom: 6px;
}
.panel {
  padding: 18px;
}
.navigation {
  gap: 3px;
}
.nav-button {
  min-height: 38px;
  padding: 8px 12px;
}
.button {
  min-height: 36px;
  padding: 8px 12px;
}
input,
select,
textarea {
  min-height: 36px;
  padding: 7px 10px;
}
.form-grid {
  column-gap: 14px;
  row-gap: 12px;
}
.field {
  gap: 5px;
}
.turno-context {
  padding: 8px 14px;
  margin-bottom: 16px;
}
.turno-context h2 {
  font-size: 1.05rem;
}
.turno-context .eyebrow {
  display: none;
}
.pill.plate {
  font-size: 0.9rem;
  padding: 7px 10px;
}
.preparation-section {
  padding: 10px 14px 12px;
  margin-bottom: 16px;
  border-radius: 9px;
}
.preparation-section legend {
  font-size: 0.95rem;
}
.preparation-section .panel-description {
  margin-bottom: 12px;
}
.section-step {
  width: 22px;
  height: 22px;
  font-size: 0.72rem;
}
.turno-preparation .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.receiver-lookup {
  position: relative;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 14px;
  margin-bottom: 14px;
  border-radius: 7px;
}
.lookup-caption {
  font-size: 0.76rem;
  font-weight: 650;
  color: #174985;
}
.receiver-lookup [role='status'] {
  flex-basis: 100%;
  order: 2;
}
.receiver-lookup .small-note {
  font-size: 0.74rem;
  line-height: 1.45;
  margin-top: 5px;
}
.receiver-lookup [role='status']:not(:empty) {
  border: 0;
  padding-top: 0;
}
.lookup-options {
  margin-top: 0;
}
.lookup-options summary {
  width: fit-content;
  cursor: pointer;
  color: var(--primary);
  font-size: 0.74rem;
  padding: 3px 0;
}
.lookup-options summary:focus-visible {
  outline: 3px solid #d7a531;
  outline-offset: 3px;
}
.lookup-options[open] {
  flex-basis: 100%;
  order: 3;
  border-top: 1px solid #dce6f3;
  margin-top: 8px;
  padding-top: 8px;
}
.lookup-options[open] .button-row {
  margin-top: 8px;
}
.lookup-environment {
  margin: 10px 0 0;
}
.vehicle-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}
.vehicle-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(150px, 200px);
  gap: 14px;
  align-items: end;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.vehicle-plate {
  align-self: center;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.vehicle-card .field + .field {
  margin-top: 0;
}
.turno-preparation .form-footer {
  margin-top: 14px;
  padding-top: 12px;
}
.turno-preparation .form-footer .small-note {
  max-width: 620px;
}
.document-choice {
  padding: 14px;
}
.document-choice .small-note {
  margin-bottom: 10px;
}
.document-actions {
  gap: 12px;
}
.draft-summary {
  gap: 12px 20px;
}
@media (min-width: 761px) and (max-width: 1050px) {
  .turno-preparation .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .workspace {
    padding: 18px 14px 24px;
  }
  .topbar {
    padding: 10px 14px;
  }
  .topbar-actions {
    gap: 8px;
  }
  .turno-preparation .form-grid {
    grid-template-columns: 1fr;
  }
  .vehicle-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }
  .button,
  input,
  select {
    min-height: 44px;
  }
  .receiver-lookup .button {
    width: 100%;
  }
  .turno-context {
    gap: 9px;
  }
  .lookup-environment {
    grid-template-columns: 1fr;
  }
}

.compact-sheet {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  overflow: clip;
  font-size: 0.85rem;
}
.compact-sheet .field { gap: 3px; margin: 0; }
.compact-sheet .field label { font-size: 0.74rem; }
.compact-sheet input, .compact-sheet select { min-height: 32px; padding: 5px 8px; }
.compact-sheet input[readonly] { background: #f5f7fb; }
.sheet-receiver { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sheet-receiver-grid { display: grid; grid-template-columns: 100px 190px minmax(0,1fr); gap: 10px; }
.sheet-secondary-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) 140px; gap: 10px; margin-top: 9px; }
.compact-sheet .receiver-lookup { margin: 8px 0 0; padding: 4px 8px; }
.compact-sheet .receiver-lookup .small-note { margin-top: 3px; }
.sheet-document { display: grid; grid-template-columns: minmax(0,1fr) 160px 110px; align-items: end; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.sheet-pos p { margin: 0; }
.sheet-pos .small-note { margin-bottom: 7px; }
.sheet-services-heading { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; }
.sheet-services-heading .small-note { margin: 0; }
.sheet-services, .sheet-breakdown { table-layout: fixed; width: 100%; }
.sheet-services th, .sheet-services td, .sheet-breakdown th, .sheet-breakdown td { padding: 7px 10px; }
.sheet-services th:first-child { width: 110px; }
.sheet-services th:last-child { width: 170px; text-align: right; }
.sheet-services input { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-services .field label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sheet-price-status { padding: 8px 14px 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.sheet-price-status .notice { flex-basis: 100%; margin: 0; }
.sheet-price-status .small-note { flex: 1; margin: 0; }
.sheet-disclosure { padding: 10px 14px; }
.sheet-disclosure summary { cursor: pointer; color: var(--primary); }
.sheet-disclosure .table-wrap, .sheet-dates { margin-top: 10px; }
.sheet-breakdown th:first-child { width: 45%; }
.sheet-dates { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
.sheet-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: #f5f7fb; border-top: 1px solid var(--line); }
.sheet-footer .small-note { margin: 0 0 2px; }
.sheet-total { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.sheet-footnote { margin: 0; padding: 8px 14px; }
@media (max-width: 850px) {
  .sheet-receiver-grid { grid-template-columns: 90px minmax(0,1fr); }
  .sheet-receiver-grid > :last-child { grid-column: 1 / -1; }
  .sheet-secondary-grid { grid-template-columns: 1fr 1fr; }
  .sheet-secondary-grid > :first-child { grid-column: 1 / -1; }
  .sheet-services th:first-child { width: 85px; }
  .sheet-services th:last-child { width: 130px; }
}
@media (max-width: 600px) {
  .sheet-document { grid-template-columns: minmax(0,1fr) 135px; }
  .sheet-pos { grid-column: 1 / -1; }
  .sheet-pos .small-note { display: inline; margin-right: 8px; }
  .sheet-pos p { display: inline; }
  .sheet-services th, .sheet-services td { padding: 6px; }
  .sheet-services th:first-child { width: 72px; }
  .sheet-services th:last-child { width: 110px; }
  .sheet-services select, .sheet-services input { font-size: 0.76rem; }
  .sheet-dates { grid-template-columns: 1fr; }
  .sheet-breakdown { min-width: 440px; }
}
@media (pointer: coarse) {
  .compact-sheet input, .compact-sheet select, .compact-sheet .button { min-height: 44px; font-size: 16px; }
}

@media print {
  @page {
    size: A4;
    margin: 18mm;
  }
  body {
    background: white;
    color: black;
    font-size: 10pt;
  }
  body > :not(#print-document) {
    display: none !important;
  }
  #print-document {
    display: block !important;
  }
  .print-mark {
    border: 2px solid #333;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 24px;
    font-size: 14pt;
  }
  .print-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
  }
  .print-heading h1 {
    font-size: 19pt;
  }
  .print-heading p {
    margin-bottom: 3px;
    font-size: 10pt;
  }
  #print-document table {
    font-size: 9pt;
  }
  #print-document th,
  #print-document td {
    padding: 9px 6px;
  }
  #print-document thead {
    display: table-header-group;
  }
  #print-document tr {
    break-inside: avoid;
  }
  #print-document .total-box {
    background: none;
    margin-top: 24px;
    break-inside: avoid;
  }
  #print-document .small-note {
    color: #333;
  }
  #print-document .print-footer {
    border-top: 1px solid #999;
    padding-top: 12px;
    margin-top: 30px;
  }
}

.sheet-items th:first-child { width: auto; }
.sheet-items th:nth-child(2) { width: 90px; }
.sheet-items th:nth-child(3) { width: 170px; }
.sheet-items th:last-child, .sheet-manual th:last-child { width: 76px; }
.sheet-manual { min-width: 780px; }
.sheet-manual th:first-child { width: auto; }
.sheet-manual th:nth-child(2) { width: 112px; }
.sheet-manual th:nth-child(3) { width: 88px; }
.sheet-manual th:nth-child(4) { width: 145px; }
.sheet-manual th:nth-child(5) { width: 110px; }
.sheet-manual td:first-child input { text-align: left; }
.sheet-manual-note { margin: 0 14px 8px; }

/* Compact invoice entry: secondary controls stay available without occupying the main sheet. */
.compact-sheet .sheet-receiver { padding: 8px 12px; }
.compact-sheet .sheet-receiver-grid, .compact-sheet .sheet-secondary-grid { gap: 6px 10px; }
.compact-sheet .sheet-secondary-grid { margin-top: 6px; }
.compact-sheet .sheet-price-status:empty { display: none; }
.compact-sheet .sheet-price-status:not(:has(.notice, .small-note)) { display: none; }
.compact-sheet .sheet-price-status { padding: 0; }
.compact-sheet .sheet-item-actions { display: flex; gap: 8px; padding: 5px 10px; }
.compact-sheet .sheet-disclosure { padding: 6px 12px; }
.compact-sheet .sheet-footer { padding: 8px 12px; }
.compact-sheet .sheet-services th, .compact-sheet .sheet-services td { padding: 5px 8px; }
.compact-sheet .sheet-document { grid-template-columns: 1fr 150px 150px auto; padding: 8px 0; }
.compact-sheet .sheet-manual { min-width: 690px; }
.service-table-wrap { overflow: visible; }
.service-picker { position: relative; }
.service-picker input { text-align: left; }
.service-options { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; max-height: 230px; overflow: auto; background: white; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 18px #172d4b22; }
.service-options button { display: block; width: 100%; padding: 8px 10px; border: 0; background: white; text-align: left; font: inherit; cursor: pointer; }
.service-options button:hover, .service-options [aria-selected=true] { background: #eaf2ff; }
.service-options button:disabled { color: #64748b; cursor: not-allowed; }
.service-options [role=status] { display: block; padding: 8px; }
@media (max-width: 850px) {
  .compact-sheet .sheet-document { grid-template-columns: 1fr 1fr; }
  .compact-sheet .sheet-items th:nth-child(2) { width: 72px; }
  .compact-sheet .sheet-items th:nth-child(3) { width: 130px; }
}
@media (min-width: 1050px) and (max-height: 800px) {
  .compact-sheet .sheet-receiver { padding: 6px 10px; }
  .compact-sheet input, .compact-sheet select { min-height: 29px; padding: 4px 7px; }
  .compact-sheet .sheet-total { font-size: 1.25rem; }
}
/* Issuance and collection use the same compact payment editor. */
.payment-pagination { display: flex; align-items: center; gap: 8px; }
.payment-pagination p { margin: 0; }
[hidden] { display: none !important; }
.compact-sheet > .panel { margin: 0; padding: 6px 10px; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.compact-sheet > .panel h2 { font-size: .85rem; margin-bottom: 2px; }
.compact-sheet > .panel > p { margin: 0 0 3px; font-size: .72rem; }
.compact-sheet .payment-row { padding: 3px 0; margin: 0; }
.compact-sheet .payment-row .button-row { flex-wrap: nowrap; }
.compact-sheet .payment-row .button { padding: 4px 6px; min-height: 29px; font-size: .7rem; }
.compact-sheet .payment-components + .button { padding: 3px 7px; min-height: 26px; font-size: .75rem; }
.compact-sheet .balance-strip { padding: 3px 0; margin: 0; font-size: .75rem; border: 0; background: none; }
.treasury-entry > .page-heading { margin-bottom: 8px; }
.treasury-entry > .page-heading .subtitle { display: none; }
.treasury-entry > .panel { margin-top: 6px; }
.treasury-entry .panel { padding: 8px 12px; margin-bottom: 8px; }
.treasury-entry .panel p { margin-bottom: 5px; }
.treasury-entry .field { margin-bottom: 3px; }
.treasury-entry input, .treasury-entry select { min-height: 31px; padding: 4px 7px; }
.treasury-entry .payment-row { margin-bottom: 4px; }
.treasury-entry .form-grid { gap: 8px; }
.sheet-tabs { display: flex; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.sheet-tabs [aria-pressed=true] { background: #eaf2ff; border-color: var(--primary); color: var(--primary); }
.compact-sheet .payment-row { grid-template-columns: minmax(150px,1.2fr) 120px minmax(130px,1fr) 135px auto; }
.compact-sheet .payment-row .field:first-child { grid-column: 1; }
.compact-sheet .payment-row .field:nth-child(2) { grid-column: 2; }
.compact-sheet .payment-row .field:nth-child(3) { grid-column: 3; }
.compact-sheet .payment-row .field:nth-child(4), .compact-sheet .payment-row .field:nth-child(5) { grid-column: 4; }
.compact-sheet .payment-row .button-row { grid-column: 5; }
.treasury-entry .balance-strip { padding: 6px 9px; margin: 4px 0; }
.treasury-entry .panel-description { margin: 0 0 6px; }
.treasury-entry h2 { margin-bottom: 6px; font-size: 1rem; }
.treasury-entry .allocation-row { gap: 8px; }
.treasury-entry .allocation-row p { margin: 0; }
.treasury-entry .payment-row { gap: 6px; }
.treasury-entry > .panel > .panel-description { font-size: .75rem; }
.treasury-entry { padding-bottom: 16px; }
.invoice-review { padding-bottom: 8px; }
.invoice-review > .notice { margin-bottom: 8px; padding: 6px 10px; }
.invoice-review > .panel { padding: 10px 12px; }
.invoice-review > .panel p { margin-bottom: 6px; font-size: .82rem; }
.invoice-review > .panel h3 { margin: 8px 0 5px; }
.invoice-review > .panel > h2 { margin: 0 0 6px; }
.invoice-review > .panel > .panel-description { margin: 0 0 6px; }
.invoice-review > .panel > .notice { margin: 6px 0; padding: 6px 10px; }
.invoice-review > .panel > .button { margin: 3px; }
.invoice-review > .page-heading { margin-bottom: 8px; }
.invoice-review > .page-heading .subtitle { margin-bottom: 0; }
@media (min-width: 1024px) {
  .invoice-review .form-footer { margin-top: 8px; padding-top: 8px; }
  .invoice-review .draft-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px 10px;
    margin-bottom: 10px;
  }
  .invoice-review .detail-label { margin-bottom: 2px; line-height: 1.2; }
  .invoice-review .detail-value { display: block; font-size: .8rem; line-height: 1.25; overflow-wrap: anywhere; }
  .invoice-review .total-box {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    margin-top: 8px;
  }
  .invoice-review .total-line { display: grid; gap: 2px; padding: 0; }
  .invoice-review .total-line.grand {
    border: 0;
    border-left: 1px solid var(--line);
    padding: 0 0 0 12px;
    margin: 0;
    font-size: 1rem;
  }
  .invoice-review td, .invoice-review th { padding: 5px 8px; }
}
/* The labeled rows already identify payment means and allocations in the compact entry step. */
.treasury-entry .treasury-form > .panel > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
/* Payment selection stays beside the document; long combinations use the existing pager. */
.payment-sidebar .payment-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 6px 0; }
.payment-sidebar .payment-shortcuts .button { min-width: 0; padding: 5px 3px; min-height: 28px; font-size: .8rem; white-space: normal; }
.payment-selected { display: grid; gap: 3px; margin-bottom: 5px; }
.payment-selected .button { text-align: left; padding: 3px 6px; font-size: .78rem; }
.payment-sidebar .payment-components .payment-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 5px; padding: 6px 0; border-top: 1px solid var(--line); }
.payment-sidebar .payment-row .field { min-width: 0; margin: 0; }
.payment-sidebar .payment-row .field:first-child { grid-column: 1; }
.payment-sidebar .payment-row .field:nth-child(2) { grid-column: 2; }
.payment-sidebar .payment-row .field:nth-child(3) { grid-column: 1; }
.payment-sidebar .payment-row .field:nth-child(4), .payment-sidebar .payment-row .field:nth-child(5) { grid-column: 2; }
.payment-sidebar .payment-row .button-row { grid-column: 1 / -1; gap: 4px; }
.payment-sidebar .payment-row label { font-size: .76rem; margin-bottom: 2px; }
.payment-sidebar input, .payment-sidebar select { width: 100%; min-width: 0; min-height: 29px; padding: 4px 6px; font-size: .82rem; }
.payment-sidebar .balance-strip { padding: 5px 7px; margin: 5px 0; font-size: .8rem; }
.payment-sidebar .payment-pagination { justify-content: space-between; gap: 4px; margin: 4px 0; }
.payment-sidebar .payment-pagination .button, .payment-sidebar .payment-row .button { padding: 4px 6px; min-height: 27px; font-size: .76rem; }
.payment-sidebar .payment-pagination p { margin: 0; }
.payment-layout > .payment-sidebar { margin: 0; padding: 8px; }
.payment-layout > .payment-sidebar > h2 { margin: 0 0 5px; font-size: 1rem; }
.payment-layout > .payment-sidebar > .panel-description { margin: 0 0 5px; font-size: .78rem; }
.payment-main { min-width: 0; }
.payment-main .sheet-manual { min-width: 0; }
@media (min-width: 1100px) {
  .payment-layout { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 10px; align-items: start; }
  .payment-layout > .payment-submit { grid-column: 1 / -1; }
  .payment-layout > .payment-main { grid-column: 1; grid-row: 1; }
  .payment-layout > .payment-sidebar { grid-column: 2; grid-row: 1; }
  .payment-layout .sheet-manual th:nth-child(2) { width: 88px; }
  .payment-layout .sheet-manual th:nth-child(3) { width: 60px; }
  .payment-layout .sheet-manual th:nth-child(4) { width: 110px; }
  .payment-layout .sheet-manual th:nth-child(5) { width: 83px; }
  .payment-layout .sheet-manual th:last-child { width: 65px; }
  .payment-layout .sheet-receiver-grid { grid-template-columns: 85px 145px minmax(0, 1fr); }
  .payment-layout .sheet-secondary-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 125px; }
  .payment-layout .sheet-document { grid-template-columns: 1fr 115px 105px auto; }
  .treasury-entry .treasury-form > .payment-sidebar > h2 { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
@media (max-width: 1099px) {
  .payment-layout > .payment-sidebar { margin-top: 10px; }
  .payment-layout > .payment-submit { margin-top: 10px; }
}
.payment-selected > [hidden], .payment-components > [hidden] { display: none !important; }
.payment-sidebar .payment-selected .button { white-space: normal; }
.payment-layout .sheet-receiver .sheet-secondary-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.payment-layout .sheet-manual th { white-space: normal; }
.collection-heading h2 { font-size: 1.1rem; margin: 8px 0 4px; }
.collection-heading .small-note { margin-bottom: 10px; }
@media (min-width: 1100px) {
  .payment-layout .sheet-manual th:nth-child(2) { width: 100px; }
  .payment-layout .sheet-manual th:nth-child(4) { width: 125px; }
  .payment-layout .sheet-manual th:nth-child(5) { width: 75px; }
  .payment-layout .sheet-secondary-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 140px; }
}
.workspace:has(> .payment-layout) { padding-bottom: 12px; }
/* Treasury navigation keeps confirmation, history, accounts and totals in separate compact views. */
.treasury-overview { padding-bottom: 12px; }
.treasury-overview > .page-heading { margin-bottom: 10px; }
.treasury-overview > .page-heading h1 { font-size: 1.45rem; }
.treasury-overview > .page-heading .subtitle { margin: 3px 0 0; }
.treasury-overview .panel { padding: 12px; margin-bottom: 10px; }
.treasury-overview h2 { font-size: 1rem; margin: 0 0 8px; }
.treasury-overview .panel-description { margin: 0 0 8px; }
.treasury-toolbar { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.treasury-toolbar .button-row, .treasury-result .button-row { margin: 0; gap: 6px; }
.treasury-view-tabs [aria-pressed=true] { background: #eaf2ff; border-color: var(--primary); color: var(--primary); }
.treasury-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.treasury-pager p { margin: 0; }
.treasury-pager .button { min-height: 29px; padding: 4px 8px; }
.treasury-overview .data-table td, .treasury-overview .data-table th { padding: 6px 8px; }
.treasury-overview .data-table td { overflow-wrap: anywhere; }
.treasury-table { width: 100%; table-layout: fixed; }
.treasury-history th:nth-child(1) { width: 90px; }
.treasury-history th:nth-child(2) { width: 155px; }
.treasury-history th:nth-child(4) { width: 145px; }
.treasury-history th:nth-child(5) { width: 180px; }
.treasury-history .treasury-brief { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.treasury-history td .small-note { margin: 2px 0 0; }
.treasury-history .button-row { flex-wrap: nowrap; gap: 5px; margin: 0; }
.treasury-history .button { min-height: 30px; padding: 4px 7px; }
.treasury-result-heading { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.treasury-result-heading p { margin: 0; }
.treasury-result-total { white-space: nowrap; font-size: 1.5rem; color: var(--primary); }
.treasury-result-party, .treasury-result-reason { overflow-wrap: anywhere; margin: 8px 0; }
.treasury-result-party { font-weight: 600; }
.treasury-result .treasury-view-tabs { margin: 10px 0; }
.treasury-result .treasury-table th:first-child { width: 200px; }
.treasury-result .treasury-table th:nth-child(2) { width: 165px; }
.treasury-result > .small-note { margin: 10px 0; }
.treasury-overview .treasury-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.treasury-overview .treasury-totals p { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .treasury-result-heading { flex-wrap: wrap; }
  .treasury-result .treasury-table th:first-child { width: 28%; }
  .treasury-result .treasury-table th:nth-child(2) { width: 30%; }
  .treasury-overview .treasury-totals { grid-template-columns: 1fr; }
  .treasury-history .data-table, .treasury-history tbody, .treasury-history tr, .treasury-history td { display: block; }
  .treasury-history thead { display: none; }
  .treasury-history td { border: 0; }
  .treasury-history tr { border-bottom: 1px solid var(--line); padding: 5px 0; }
  .treasury-history .treasury-brief { white-space: normal; overflow: visible; }
  .treasury-pager { flex-wrap: wrap; }
}
.treasury-overview p { overflow-wrap: anywhere; }
@media (min-width: 1100px) {
  .payment-layout .sheet-manual-receiver-grid { grid-template-columns: 80px 125px minmax(0,1fr) 145px; }
}
.invoice-delivery-contact { display: grid; grid-template-columns: minmax(190px, 1fr) auto; align-items: end; gap: 4px 10px; margin: 6px 0; }
.invoice-delivery-contact > p { grid-column: 1 / -1; margin: 0; }
.invoice-delivery-contact label { margin: 0; }
.invoice-delivery-status { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.invoice-delivery-status p { margin: 0; }
@media (max-width: 650px) { .invoice-delivery-contact { grid-template-columns: 1fr; } .invoice-delivery-status { flex-wrap: wrap; } }

/* Server lists keep a fixed five-row page at the operator's 1280x720 workstation. */
.list-pagination { justify-content: flex-end; margin-top: 10px; }
.list-pagination p { margin: 0; }
.list-toolbar input[type=search] { min-width: 240px; }

.server-list table { table-layout: fixed; width: 100%; }
.server-list td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 42px; }
.server-list .list-toolbar { align-items: end; }

@media (min-width: 1000px) and (max-height: 760px) {
  .oversight-overview .page-heading { margin-bottom: 8px; }
  .oversight-overview .notice { padding: 7px 10px; margin: 8px 0; }
  .oversight-overview .server-list { padding: 10px; margin: 8px 0; }
  .oversight-overview .server-list td { height: 36px; padding: 7px 10px; }
  .oversight-overview .list-toolbar { margin-bottom: 8px; }
  .oversight-overview .small-note { margin-top: 6px; }
}

.reconciliation-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:8px 0}.reconciliation-summary>div{background:#fff;border:1px solid #d9e2ed;border-radius:6px;padding:8px}.reconciliation-summary span{display:block;font-size:11px}.reconciliation-summary strong{display:block;font-size:17px}.reconciliation-cash{display:flex;align-items:end;gap:10px;margin-top:8px}.reconciliation-cash label{display:grid;gap:3px;font-size:11px}.reconciliation-cash input{max-width:170px}.reconciliation-overview table td,.reconciliation-overview table th{padding:6px 8px}.reconciliation-overview .small-note{margin:5px 0;font-size:11px}
@media(max-width:700px){.reconciliation-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.reconciliation-cash{flex-wrap:wrap}}

@media(min-width:1100px) and (max-height:760px){.reconciliation-overview .page-heading{margin-bottom:6px}.reconciliation-overview .list-toolbar label{display:flex;align-items:center;gap:8px}.reconciliation-overview .notice{margin-bottom:6px;padding:8px 10px}.reconciliation-overview .button-row{margin:4px 0}.reconciliation-overview table td,.reconciliation-overview table th{padding:4px 8px;font-size:12px}.reconciliation-overview .table-wrap{margin:4px 0}.reconciliation-overview .reconciliation-cash input{height:30px}}

.register-toolbar{display:flex;gap:12px;align-items:end;margin:8px 0}.register-toolbar label{display:flex;align-items:center;gap:8px}.register-toolbar input{max-width:175px}.register-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.register-form{display:grid;grid-template-columns:1fr 1fr;gap:8px}.register-form label:has(textarea),.register-form button{grid-column:1/-1}.register-form textarea{min-height:48px;resize:none}.cash-register-overview .table-wrap{margin:6px 0}.cash-register-overview td,.cash-register-overview th{padding:6px}.cash-register-overview .page-heading{margin-bottom:8px}.cash-register-overview .small-note{margin:6px 0}.cash-register-overview .list-pagination{margin:6px 0}.cash-register-overview .button-row{margin:8px 0}.cash-register-overview .reconciliation-summary{margin:8px 0}
@media(max-width:1099px){.register-layout{grid-template-columns:1fr}.register-toolbar{flex-wrap:wrap}}
