.receipts-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.receipts-total { display: flex; flex-direction: column; gap: 13px; min-width: 0; padding: 22px; border: 1px solid #d4dfd8; border-radius: 14px; background: white; }
.receipts-total > span { color: #51685e; font-size: 12px; }
.receipts-total > strong { font-size: clamp(22px,2.1vw,31px); line-height: 1.25; letter-spacing: -.025em; }
.receipts-total > strong.large-money { font-size: clamp(18px,1.7vw,26px); }
.receipts-total.confirmed { background: #164b3e; border-color: #164b3e; color: white; }
.receipts-total.confirmed > span { color: #ffffff; }
.receipts-total.late > strong { color: #9f3137; }
.receipts-scope { color: #51685e; font-size: 12px; line-height: 1.8; margin-top: -10px; }
.receipt-tabs { display: flex; gap: 5px; background: #ffffff; border-radius: 25px; padding: 4px; align-self: flex-start; }
.receipt-tabs > button { min-height: 44px; background: transparent; border: 0; border-radius: 23px; padding: 10px 24px; color: #51685e; font-size: 12px; font-weight: 600; }
.receipt-tabs > button:hover { background: #ffffff; color: #21634f; }
.receipt-tabs > button[aria-selected=true] { background: #21634f; color: white; }
.receipt-panel { min-width: 0; }
.receipt-panel:focus { outline: none; }
.receipt-panel:focus-visible { outline: 3px solid #21634f; outline-offset: 4px; border-radius: 12px; }
.receipts-result-count { color: #51685e; font-size: 12px; margin-bottom: 15px; }
.receipts-outstanding, .receipts-history { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.receipt-balance, .receipt-payment { background: white; border: 1px solid #d4dfd8; border-radius: 14px; padding: 22px; min-width: 0; }
.receipt-balance-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.receipt-balance-top > div { min-width: 0; }
.receipt-balance-top h2, .receipt-payment h2 { font-size: 15px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.receipt-balance-top p { color: #51685e; font-size: 12px; line-height: 1.7; margin-top: 5px; overflow-wrap: anywhere; }
.receipt-balance-top .badge { flex-shrink: 0; }
.receipt-shift-meta { display: flex; flex-direction: column; gap: 5px; margin-top: 15px; font-size: 12px; color: #51685e; line-height: 1.6; }
.receipt-amounts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 19px 0 0; }
.receipt-amounts dt { font-size: 12px; color: #51685e; margin-bottom: 7px; }
.receipt-amounts dd { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.receipt-amounts > div:nth-child(2) dd { font-size: 16px; color: #51685e; font-weight: 500; }
.receipt-balance-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; border-top: 1px solid #d4dfd8; padding-top: 15px; }
.receipt-balance-actions .btn { min-height: 44px; font-size: 12px; }
.receipts-empty { display: grid; justify-items: start; gap: 14px; padding: 30px 24px; background: white; border: 1px solid #d4dfd8; border-radius: 14px; }
.receipts-empty h2 { font-size: 19px; line-height: 1.4; }
.receipts-empty p { font-size: 13px; line-height: 1.8; color: #51685e; max-width: 48ch; }
.receipts-empty-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: #21634f; background: #ffffff; }
.receipt-payment-top { display: flex; align-items: center; gap: 13px; }
.payment-confirmed-icon { display: grid; place-items: center; width: 35px; height: 35px; flex-shrink: 0; border-radius: 50%; color: #21634f; background: #ffffff; }
.receipt-payment-top > div { flex: 1; min-width: 0; }
.receipt-payment-top p { color: #51685e; font-size: 12px; margin-top: 5px; }
.receipt-payment-top > strong { font-size: 18px; font-weight: 700; }
.receipt-payment-details { margin-top: 18px; border-top: 1px solid #d4dfd8; padding-top: 11px; color: #51685e; font-size: 12px; }
.receipt-payment-details > summary { min-height: 44px; padding-block: 9px; cursor: pointer; }
.receipt-payment-details > summary:focus-visible { outline: 3px solid #21634f; outline-offset: 3px; }
.receipt-allocation { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 0; border-bottom: 1px solid #d4dfd8; }
.receipt-allocation > div { min-width: 0; }
.receipt-allocation strong { color: #183a30; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.receipt-allocation p { font-size: 12px; line-height: 1.6; margin-top: 5px; overflow-wrap: anywhere; }
.receipt-allocation span { display: block; color: #183a30; margin-top: 7px; font-size: 12px; }
.receipt-payment-notes { font-size: 12px; line-height: 1.8; margin: 15px 0; overflow-wrap: anywhere; }
.receipt-payment-details > .btn { min-height: 44px; margin-top: 12px; }
.receipt-allocation .icon-btn { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
.receipts-register-note { color: #51685e; font-size: 12px; line-height: 1.8; }
.payment-context { background: #ffffff; padding: 17px; border-radius: 12px; margin-bottom: 22px; }
.payment-context h3 { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.payment-context p { color: #51685e; font-size: 12px; line-height: 1.7; margin-top: 6px; overflow-wrap: anywhere; }
.payment-context > div { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 17px; font-size: 12px; }
.payment-context > div > span { color: #51685e; }
.payment-context > div > strong { font-size: 18px; }
.payment-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-radius: 25px; padding: 4px; background: #ffffff; }
.payment-kind-option { min-height: 44px; border: 0; border-radius: 22px; padding: 9px 12px; background: transparent; font-size: 12px; font-weight: 600; color: #51685e; }
.payment-kind-option[aria-pressed=true] { color: white; background: #21634f; }
.payment-kind-option:hover { background: #ffffff; color: #21634f; }
.payment-kind-option[aria-pressed=true]:hover { background: #164b3e; color: white; }
.payment-remaining { color: #21634f; font-size: 12px; line-height: 1.7; margin-top: -8px; }
.payment-remaining[data-invalid=true] { color: #9f3137; }
.app-mode dialog.payment-dialog { width: min(560px,calc(100% - 32px)); height: min(780px,90svh); max-height: 90svh; overflow: hidden; }
.payment-dialog #dialog-content { height: 100%; }
.app-mode .payment-dialog .dialog-body { display: flex; flex-direction: column; height: 100%; padding: 0; }
.app-mode .payment-dialog .dialog-head { flex-shrink: 0; padding: 20px 24px; margin: 0; border-bottom: 1px solid #d4dfd8; }
.payment-dialog #receive-form { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; gap: 0; }
.app-mode .payment-dialog #receive-form > fieldset { min-height: 0; height: 100%; display: flex; flex-direction: column; gap: 0; }
.payment-form-fields { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 18px; padding: 22px 24px; scroll-padding-block: 18px; }
.payment-form-fields > * { flex-shrink: 0; }
.payment-dialog .payment-context { margin-bottom: 0; }
.payment-form-footer { flex-shrink: 0; border-top: 1px solid #d4dfd8; background: white; padding: 14px 24px; }
.app-mode .payment-form-footer .dialog-actions { margin: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; }
.payment-form-footer .field-error:not([hidden]) { padding: 10px 12px; border-radius: 8px; background: #ffffff; margin-bottom: 10px; line-height: 1.6; }
.payment-saving-label { display: none; }
#receive-form[aria-busy=true] .payment-save-label { display: none; }
#receive-form[aria-busy=true] .payment-saving-label { display: inline; }
@media(max-width:1200px) {
  .receipts-outstanding, .receipts-history { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:900px) {
  .app-mode .receipts-workspace .app-content { padding-top: 16px; gap: 14px; }
  .app-mode .receipts-workspace .app-top { align-items: center; flex-wrap: nowrap; gap: 12px; }
  .app-mode .receipts-workspace .app-top > div { flex: 1; min-width: 0; }
  .app-mode .receipts-workspace .app-top h1 { font-size: 24px; }
  .app-mode .receipts-workspace .app-top p { display: none; }
  .receipts-summary { display: flex; flex-direction: column; gap: 0; padding: 6px; background: white; border: 1px solid #d4dfd8; border-radius: 14px; }
  .receipts-total { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px; border: 0; border-radius: 8px; }
  .receipts-total > span { font-size: 12px; }
  .receipts-total > strong { font-size: 20px; }
  .receipts-total > strong.large-money { font-size: 16px; }
  .receipts-scope { margin-top: -6px; font-size: 12px; line-height: 1.5; }
  .receipt-tabs { align-self: stretch; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; }
  .receipt-tabs > button { padding-inline: 5px; min-height: 44px; font-size: 12px; }
  .receipts-result-count { margin-bottom: 10px; }
  .receipt-balance { padding: 16px; }
  .receipt-balance-top h2 { font-size: 14px; line-height: 1.4; }
  .receipt-balance-top p { font-size: 12px; line-height: 1.5; margin-top: 3px; }
  .receipt-balance-top .badge { max-width: 110px; white-space: normal; text-align: center; }
  .receipt-shift-meta { flex-direction: row; flex-wrap: wrap; column-gap: 12px; row-gap: 3px; margin-top: 10px; line-height: 1.5; }
  .receipt-amounts { margin-top: 12px; }
  .receipt-amounts dt { margin-bottom: 4px; }
  .receipt-amounts dd { font-size: 20px; }
  .receipt-amounts > div:nth-child(2) dd { font-size: 16px; }
  .receipt-amounts dd.large-money, .receipt-amounts > div:nth-child(2) dd.large-money { font-size: 13px; }
  .receipt-balance-actions { gap: 8px; margin-top: 12px; padding-top: 10px; }
  .receipt-balance-actions .btn { font-size: 12px; padding-inline: 13px; }
  .receipts-filters { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
  .receipts-filters .filter-input { width: 100%; min-height: 44px; font-size: 16px; }
  .receipt-payment { padding: 18px; }
  .receipt-payment-top { gap: 10px; flex-wrap: wrap; }
  .receipt-payment-top h2 { font-size: 13px; }
  .receipt-payment-top > div { flex: 1 1 calc(100% - 45px); }
  .receipt-payment-top > strong { margin-left: 45px; font-size: 20px; }
  .payment-context > div > strong { font-size: 17px; }
  .app-mode dialog.payment-dialog { position: fixed; width: 100%; max-width: 100%; height: var(--shift-dialog-height,100dvh); max-height: var(--shift-dialog-height,100dvh); inset: var(--shift-dialog-top,0px) 0 auto; margin: 0; border-radius: 0; }
  .app-mode .payment-dialog .dialog-head { padding: calc(13px + env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) 13px max(20px,env(safe-area-inset-left)); }
  .payment-form-fields { padding: 20px max(20px,env(safe-area-inset-right)) 20px max(20px,env(safe-area-inset-left)); }
  .payment-form-footer { padding: 12px max(20px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); }
  .app-mode .payment-form-footer .btn { min-height: 46px; }
}
@media(max-width:360px) {
  .receipt-balance-top { gap: 9px; }
  .receipt-balance-top .badge { max-width: 80px; }
  .receipt-amounts { gap: 10px; }
  .receipt-amounts dd { font-size: 18px; }
  .receipt-amounts > div:nth-child(2) dd { font-size: 15px; }
  .receipt-balance-actions { align-items: stretch; }
  .receipt-balance-actions > .btn { padding-inline: 10px; font-size: 12px; }
  .receipt-balance-actions > [data-action=receive] svg { display: none; }
}
