[hidden]{display:none!important}
.sales-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.sales-field{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:500}.sales-field input,.sales-field select,.sales-field textarea{font:inherit;width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:6px;padding:10px 12px;background:var(--white);color:var(--ink)}.sales-field input[type=number]{text-align:right;font-variant-numeric:tabular-nums}.sales-field textarea{min-height:95px;resize:vertical}.sales-field input:disabled,.sales-field textarea:disabled{background:var(--paper);color:var(--ink)}.sales-help{font-size:12px;color:var(--muted);font-weight:400}.sales-wide{grid-column:1/-1}.sales-message{font-size:12px;margin-top:14px;white-space:pre-wrap}.sales-toolbar{margin-bottom:14px}.sales-scroll{max-height:560px;scroll-padding-top:70px}.sales-table{border-collapse:separate;border-spacing:0;font-size:11.7px;line-height:19.5px;white-space:nowrap}.sales-table th{height:30px;line-height:18px;padding:5px 12px;z-index:4;top:0;background:var(--table-head)}.sales-table td{height:27px;padding:3px 12px;background:var(--white);color:var(--ink);vertical-align:middle}.sales-table td:first-child{font-weight:400;min-width:220px}.sales-table th:not(:first-child):not(:last-child),.sales-table td:not(:first-child):not(:last-child){text-align:center;font-variant-numeric:tabular-nums}.sales-table th:last-child,.sales-table td:last-child{min-width:180px}.sales-table .sales-locked td{background:#f7f8f8}.sales-table tbody tr:hover td{background:var(--table-hover)}.sales-table .sales-total td{background:var(--table-total);font-weight:600}.sales-table .sales-annual td{position:sticky;top:30px;z-index:3;border-bottom:2px solid var(--muted);padding-top:7px;padding-bottom:7px}.sales-table .sales-month-end td{border-bottom:18px solid var(--paper);padding-top:7px;padding-bottom:7px}.sales-cell{border:0;background:transparent;color:inherit;font:inherit;padding:0;min-height:20px;line-height:19.5px;cursor:pointer}.sales-cell:hover{text-decoration:underline}.sales-dot{font-size:10px;color:var(--accent);margin-left:4px}.sales-confirm.button{font-size:11px;min-height:22px;padding:0 8px;line-height:20px}.sales-check{color:#23704c;font-weight:600}.sales-pending{color:#9a6b06;margin-right:7px}.sales-status{font-size:11px}.sales-note-source{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--soft);padding:12px;border-radius:6px;font-size:12px}.sales-detail-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}#sales-dialog-body{padding:22px 26px}#sales-tooltip{position:fixed;z-index:30;max-width:min(360px,calc(100vw - 24px));padding:12px 14px;background:var(--dark);color:var(--white);border-radius:6px;box-shadow:0 4px 16px #0002;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;pointer-events:none}.sales-audit-entry{padding:12px 0;border-bottom:1px solid var(--line);font-size:12px}.sales-audit-entry pre{overflow-wrap:anywhere}.access-wrap{max-width:680px;margin:40px auto;padding:24px}.access-brand{background:var(--dark);padding:20px;border-radius:10px;margin-bottom:24px}.access-brand img{height:70px;display:block}.access-list{list-style:none;padding:0}.access-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.access-code{width:100%;font:12px monospace;min-height:70px;overflow-wrap:anywhere}.sales-loading-error{color:var(--red)}
@media(max-width:760px){.sales-fields{gap:14px}.sales-field input,.sales-field select,.sales-field textarea{font-size:16px}.sales-table td,.sales-table th{padding-left:10px;padding-right:10px}.sales-table td:first-child{min-width:210px}.access-wrap{margin:12px auto;padding:16px}#sales-dialog-body{padding:18px}}
@media(pointer:coarse){.sales-cell,.sales-confirm.button{min-height:44px}}

main:has(.balance-report, .sales-toolbar) { max-width: 1500px; padding: 16px clamp(10px, 2vw, 26px) 26px; }
.sales-toolbar {
  align-items: center;
  gap: 8px;
  padding-block-end: 12px;
  border-block-end: 1px solid var(--line);
}
.balance-report { max-width: 720px; }
.balance-report .module-heading { margin-bottom: 6px; }
.balance-report #balance-form { max-width: 600px; }
.balance-report #petty-help { font-style: italic; }
.balance-section { border-top: 1px solid var(--line); }
.balance-report .archive-form-actions { position: static; }
.balance-feedback { flex: 1 1 190px; font-size: 12px; }
.balance-report #no-petty { margin-bottom: 0; }
.balance-report .archive-field :is(input, select):disabled { background-color: var(--paper); }

/* Keep the native iPhone date picker inside the same field box as the amount inputs. */
@media (max-width: 760px) {
  .balance-report input[name="date"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    min-inline-size: 0;
    inline-size: 100%;
    max-inline-size: 100%;
    block-size: 44px;
    text-align: start;
  }
  .balance-report input[name="date"]::-webkit-date-and-time-value {
    text-align: start;
    margin: 0;
  }
}
