/* Customer Activity, Receipts and Gift Aid screens */

.activity-header-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.activity-search { min-width: 240px; flex: 1; max-width: 340px; }
.activity-filters .btn.active { background: var(--critical-bg); color: var(--critical); border-color: var(--critical); }
.activity-stats .stat-card.critical .stat-value { color: var(--critical); }
.kv a { color: var(--brand); text-decoration: none; }
.kv a:hover { text-decoration: underline; }

/* Receipts: FY-grouped table headers */
tr.group-row td .fy-group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--brand-dark, var(--brand)); }
tr.group-row td .fy-group-head .mono { font-weight: 600; color: var(--muted); }
.receipt-awaiting { margin-bottom: 22px; }
.receipt-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Receipt document preview (HTML mirror of the PDF) */
.receipt-detail-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.receipt-doc {
  position: relative; background: #fff; color: #1f2a27; width: 100%; max-width: 620px; min-height: 780px;
  margin: 0 auto; padding: 30px 34px; border: 1px solid var(--border); border-radius: 4px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; font-size: 0.9rem; line-height: 1.5;
}
.receipt-doc .rd-letterhead { display: flex; gap: 12px; align-items: flex-start; }
.receipt-doc .rd-logo { width: 54px; height: 54px; object-fit: contain; flex: 0 0 auto; }
.receipt-doc .rd-logo-spacer { width: 54px; flex: 0 0 auto; }
.receipt-doc .rd-heading { flex: 1; text-align: center; }
.receipt-doc .rd-main { font-family: 'Sora', 'Inter', sans-serif; font-weight: 700; font-size: 1.25rem; }
.receipt-doc .rd-sub { font-size: 0.82rem; color: #555; margin-top: 2px; white-space: pre-line; }
.receipt-doc hr { border: none; border-top: 2px solid var(--brand); margin: 8px 0 4px; }
.receipt-doc .rd-contact { text-align: center; font-size: 0.72rem; color: #666; line-height: 1.5; }
.receipt-doc .rd-gap-7 { height: 7em; }
.receipt-doc .rd-gap-1 { height: 1em; }
.receipt-doc .rd-gap-8 { height: 6em; }
.receipt-doc .rd-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.receipt-doc .rd-line { margin-bottom: 4px; }
.receipt-doc .rd-line > b { margin-right: 6px; }
.receipt-doc .rd-edit { font: inherit; border: 1px dashed var(--brand); border-radius: 4px; padding: 2px 6px; background: #fbfdfc; color: inherit; max-width: 100%; }
.receipt-doc textarea.rd-edit { width: 100%; min-height: 54px; vertical-align: top; }
.receipt-doc input.rd-edit[type=text] { width: 70%; }
.receipt-doc .rd-footer { margin-top: auto; padding-top: 8px; border-top: 1px solid #dde3dd; text-align: center; font-size: 0.72rem; color: #666; }
.receipt-doc .rd-strike { text-decoration: line-through; }
/* invoice-style layout */
.receipt-doc .rd-topline { text-align: center; font-size: 0.72rem; color: #666; margin: -14px 0 8px; }
.receipt-doc .rd-topline .rd-dot { margin: 0 10px; }
.receipt-doc .rd-title { text-align: center; font-weight: 700; font-size: 1.15rem; margin: 18px 0 16px; letter-spacing: 0.02em; }
.receipt-doc .rd-label { font-size: 0.68rem; font-weight: 700; color: #888; letter-spacing: 0.06em; }
.receipt-doc .rd-from { margin: 18px 0 18px; }
.receipt-doc .rd-from-name { font-weight: 700; font-size: 1rem; margin-top: 2px; }
.receipt-doc .rd-from-addr { color: #444; }
.receipt-doc .rd-table { width: 100%; border-collapse: collapse; }
.receipt-doc .rd-table th { background: var(--brand); color: #fff; text-align: left; padding: 6px 10px; font-size: 0.85rem; }
.receipt-doc .rd-table td { padding: 8px 10px; border-bottom: 1px solid #d6d6d6; vertical-align: top; }
.receipt-doc .rd-table .rd-amt { text-align: right; width: 140px; white-space: nowrap; }
.receipt-doc .rd-table tfoot td { border-top: 2px solid #1f2a27; border-bottom: none; padding-top: 8px; }
.receipt-bar { width: 100%; max-width: 620px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.receipt-bar .rb-left, .receipt-bar .rb-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.receipt-print-frame { position: fixed; width: 0; height: 0; border: 0; visibility: hidden; }
.receipt-modal-doc { max-height: 70vh; overflow: auto; }
.receipt-modal-doc .receipt-doc { min-height: 0; box-shadow: none; }
