/* LSC 2.24.20 — compact order form and readable payment/application details. */
#workshopOrderForm .order-work-main { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .7rem; }
#workshopOrderForm .order-position-number { color: var(--ui-muted); font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
#workshopOrderForm .order-stamp-field:not(.hidden) { margin: .8rem 0 .2rem 2.7rem; padding: .7rem 1rem; background: var(--ui-surface-soft); border-left: 3px solid var(--ui-accent, #410101); border-radius: 6px; color: var(--ui-text); }
#workshopOrderForm .order-vehicle-total { width: fit-content; max-width: 100%; margin-left: auto; padding: .7rem 1rem; font-size: .95rem; }
#workshopOrderForm .order-summary { width: min(100%, 34rem); margin: 1.1rem auto; padding: 1rem 1.2rem; }
#workshopOrderForm .order-payment-toggle:not([hidden]):not(.hidden) { width: fit-content; max-width: 100%; margin: 1rem auto !important; padding: .75rem 1.2rem !important; justify-content: center; }
#workshopOrderForm .order-payment-toggle[hidden], #workshopOrderForm .order-payment-toggle.hidden { display: none !important; }
.order-unpaid-banner { padding: 1rem 1.3rem; border: 2px solid #a32626; border-radius: 10px; background: #fff0ed; color: #410101; text-align: center; font-weight: 800; }
[data-theme="DARK"] .order-unpaid-banner { background: #410101; border-color: #eb9696; color: #fff0ed; }
#tabReceiptsDialog, #tabReceiptDetailDialog { width: min(52rem, calc(100vw - 2rem)); max-height: calc(100dvh - 3rem); overflow-y: auto; padding: 1.5rem; }
#tabReceiptsContent { display: grid; gap: .6rem; }
#tabReceiptsDialog .receipt-row { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(8rem, 1fr) auto 2.5rem; align-items: center; gap: 1rem; padding: .85rem 1rem; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface-soft); }
.receipt-number { border: 0; padding: .35rem 0; background: transparent; color: var(--ui-accent, #410101); font: inherit; font-weight: 800; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: .25rem; }
.receipt-number:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 4px; }
.receipt-summary { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: 1rem; background: var(--ui-surface-soft); border-radius: 10px; border-left: 4px solid var(--ui-accent); }
.receipt-summary h3, .receipt-summary p { margin: 0; }
.receipt-summary p { grid-column: 1; }
.receipt-summary > strong { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 1.3rem; }
.receipt-order { padding: 1rem 0; border-bottom: 1px solid var(--ui-border); }
.receipt-order h3, .receipt-order h4 { margin: .5rem 0; }
.receipt-order li { padding: .2rem 0; overflow-wrap: anywhere; }
#view-applications > .section-head { align-items: center; flex-wrap: wrap; gap: .75rem; }
#applicationForm { background: var(--ui-surface); padding: 1.5rem; border: 1px solid var(--ui-border); border-radius: 12px; gap: 1.1rem; }
#applicationForm.hidden, #applicationsListArea.hidden { display: none !important; }
#applicationsListArea .table-scroll { overflow: visible; }
#applicationsListArea table { table-layout: fixed; width: 100%; }
#applicationsListArea th:nth-child(1) { width: 9%; }
#applicationsListArea th:nth-child(2) { width: 14%; }
#applicationsListArea th:nth-child(3) { width: 18%; }
#applicationsListArea th:nth-child(4) { width: 5%; }
#applicationsListArea th:nth-child(5) { width: 16%; }
#applicationsListArea th:nth-child(6) { width: 20%; }
#applicationsListArea th:nth-child(7) { width: 18%; }
#applicationsListArea td { vertical-align: top; overflow-wrap: anywhere; white-space: normal; }
#applicationsListArea .application-state { display: grid; gap: .4rem; }
#applicationsListArea .row-actions { justify-content: flex-start; flex-wrap: wrap; }
#applicationsListArea .row-actions .secondary-button { width: 100%; font-size: .78rem; padding: .35rem; }
@media (max-width: 700px) {
  #workshopOrderForm .order-work-main { grid-template-columns: 1.5rem minmax(0, 1fr); }
  #workshopOrderForm .order-work-meta { grid-column: 2; }
  #tabReceiptsDialog .receipt-row { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
  #tabReceiptsDialog .receipt-row > span { grid-column: 1; grid-row: 2; font-size: .85rem; }
  #tabReceiptsDialog .receipt-row > strong { grid-column: 2; grid-row: 1; }
  #tabReceiptsDialog .receipt-row > .icon-action { grid-column: 2; grid-row: 2; }
  #applicationsListArea .table-scroll { overflow-x: auto; }
  #applicationsListArea table { min-width: 850px; }
}
