.aeris-history { --ah-ink:#292633; --ah-muted:#817b8e; --ah-border:#e9e5ef; --ah-purple:#7026ad; color:var(--ah-ink); padding-top:4px; }
.aeris-history .ah-heading { margin-bottom:23px; align-items:center; }
.aeris-history .ah-heading h1 { margin:7px 0 8px; }
.aeris-history .ah-heading p { margin:0; font-size:14px; }
.aeris-history .ah-heading button { height:36px; padding:0 13px; font-size:12px; }
.ah-period-row { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-bottom:22px; }
.ah-periods { display:flex; padding:4px; gap:3px; border-radius:9px; background:#f1eff4; }
.ah-periods button { border:0; border-radius:6px; padding:8px 13px; font:inherit; font-size:12px; color:#797280; background:transparent; cursor:pointer; white-space:nowrap; }
.ah-periods button[aria-pressed="true"] { color:#3c3048; background:white; box-shadow:0 1px 4px #2e174014; }
.ah-dates { display:flex; gap:10px; align-items:center; }
.ah-dates label { display:flex; align-items:center; gap:7px; font-size:11px; color:var(--ah-muted); }
.ah-dates input { height:34px; padding:4px 8px; font:inherit; font-size:12px; border:1px solid var(--ah-border); border-radius:6px; color:var(--ah-ink); background:white; }
.ah-range-hint { font-size:13px; color:var(--ah-muted); margin:-7px 0 18px; }
.ah-error { border:1px solid #f0d9b5; background:#fff8ed; color:#8e6127; font-size:13px; padding:12px 15px; border-radius:8px; margin-bottom:18px; }
.ah-summary { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-bottom:25px; }
.ah-summary .ah-summary-card { padding:16px 15px 14px; border:1px solid var(--ah-border); border-radius:10px; background:#fff; color:var(--ah-ink); text-align:left; cursor:pointer; box-shadow:none; min-width:0; }
.ah-summary-card > span { display:block; font-size:11px; color:#756c80; line-height:1.4; }
.ah-summary-card > strong { display:block; font-size:27px; font-weight:650; letter-spacing:-.7px; margin:9px 0 5px; line-height:1.15; font-variant-numeric:tabular-nums; }
.ah-summary-card > small { display:block; color:#91879b; font-size:10px; line-height:1.55; }
.ah-summary-card.green > strong { color:#298258; }
.ah-summary-card.purple > strong { color:var(--ah-purple); }
.ah-summary-card.amber > strong { color:#a47130; }
.ah-summary .ah-summary-card.is-selected { border-color:#c8addd; background:#faf7fd; }
.ah-summary .ah-summary-card:hover { border-color:#cbb2dc; }
.ah-records { border:1px solid var(--ah-border); border-radius:11px; background:white; overflow:hidden; }
.ah-records-top { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:19px 20px 18px; }
.ah-records-top h2 { margin:0 0 4px; font-size:17px; font-weight:600; letter-spacing:-.2px; }
.ah-records-top p { margin:0; font-size:11px; color:var(--ah-muted); }
.ah-filters { display:flex; align-items:center; gap:9px; flex:1; justify-content:flex-end; }
.ah-filters input { width:min(350px,100%); min-width:150px; }
.ah-filters input,.ah-filters select { height:36px; background:white; border:1px solid #ded6e7; border-radius:7px; padding:7px 11px; font:inherit; font-size:12px; color:#4d4358; }
.ah-filters input::placeholder { color:#a39aa9; }
.ah-filters select { width:175px; flex:none; }
.ah-table-wrap { overflow-x:auto; }
.ah-table { width:100%; border-collapse:collapse; table-layout:fixed; margin:0; }
.ah-table thead { background:#faf9fc; }
.ah-table th { text-align:left; font-size:10px; font-weight:550; color:#93879f; padding:12px 14px; border-bottom:1px solid var(--ah-border); white-space:nowrap; }
.ah-table th:first-child,.ah-table td:first-child { padding-left:20px; width:115px; }
.ah-table th:nth-child(2) { width:auto; }
.ah-table th:nth-child(3) { width:122px; }
.ah-table th:nth-child(4) { width:134px; }
.ah-table th:nth-child(5) { width:146px; }
.ah-table th:nth-child(6) { width:108px; }
.ah-table th:nth-child(7) { width:105px; }
.ah-table td { border-bottom:1px solid #f0ecf5; padding:15px 14px; font-size:12px; vertical-align:middle; }
.ah-table tbody tr:last-child td { border-bottom:0; }
.ah-table tbody tr:hover { background:#fdfbff; }
.ah-table .ah-incoming { background:#fffcf7; }
.ah-table td strong { display:block; font-weight:550; }
.ah-table td small { display:block; font-size:10px; color:var(--ah-muted); margin-top:4px; line-height:1.5; }
.ah-table .ah-date { white-space:nowrap; font-size:11px; }
.ah-table .ah-order strong { font-size:12px; margin-bottom:4px; }
.ah-reference { display:block; font-size:10px; color:#91859d; overflow-wrap:anywhere; line-height:1.45; }
.ah-table .ah-affiliate { color:#85659c; margin-top:4px; }
.ah-amount { font-variant-numeric:tabular-nums; white-space:nowrap; }
.ah-badge { display:inline-flex; align-items:center; padding:4px 7px; font-size:10px; font-weight:500; line-height:1.3; white-space:nowrap; background:#f1eef6; color:#756580; border-radius:5px; }
.ah-badge.green { background:#eaf7ef; color:#2d8554; }
.ah-badge.amber { background:#fff1dc; color:#a16b28; }
.ah-badge.grey { background:#f2f2f5; color:#85808e; }
.ah-receipt { color:#5d4373; font-size:11px; }
.ah-no-receipt,.ah-muted { color:#a196aa; font-size:11px; }
.ah-details-button { white-space:nowrap; border:1px solid #e7ddef; border-radius:6px; background:#fcf9ff; color:#795192; font:inherit; font-size:10px; font-weight:500; padding:6px 9px; cursor:pointer; }
.ah-details-button:hover { background:#f3eafa; border-color:#cdb6de; }
.ah-empty { text-align:center; padding:58px 20px; color:#a094aa; font-size:13px; }
.ah-pagination { padding:13px 20px; display:flex; justify-content:space-between; align-items:center; gap:12px; border-top:1px solid var(--ah-border); color:#968ba0; font-size:11px; }
.ah-pagination > div { display:flex; gap:6px; }
.ah-pagination button { padding:6px 10px; border:1px solid var(--ah-border); background:white; border-radius:6px; color:#6e5b7d; font:inherit; font-size:11px; cursor:pointer; }
.ah-pagination button:disabled { opacity:.4; cursor:default; }
.ah-footer { margin-top:15px; color:#9b90a5; font-size:10px; line-height:1.6; display:flex; justify-content:space-between; flex-wrap:wrap; gap:7px; }
.aeris-history button:focus-visible,.aeris-history input:focus-visible,.aeris-history select:focus-visible,.ah-payment-dialog button:focus-visible { outline:2px solid #a97ac9; outline-offset:3px; }
.ah-payment-dialog { width:min(440px,calc(100% - 36px)); max-height:calc(100dvh - 60px); border:1px solid #e6dfed; border-radius:15px; padding:24px; color:#33283f; box-shadow:0 18px 90px #28133224; }
.ah-payment-dialog::backdrop { background:#26163066; backdrop-filter:blur(2px); }
.ah-payment-dialog header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.ah-payment-dialog h2 { margin:0; font-size:20px; font-weight:600; }
.ah-close { border:0; background:#f2eef6; width:30px; height:30px; border-radius:50%; font-size:23px; line-height:1; color:#897792; cursor:pointer; flex:none; }
.ah-payment-note { font-size:13px; color:#8b7a96; line-height:1.7; margin:15px 0 18px; }
.ah-payment-dialog dl { border-top:1px solid #eee6f4; margin:0; }
.ah-payment-dialog dl > div { display:grid; grid-template-columns:125px minmax(0,1fr); gap:15px; padding:12px 0; font-size:12px; border-bottom:1px solid #f2edf6; }
.ah-payment-dialog dt { color:#91809d; }
.ah-payment-dialog dd { margin:0; text-align:right; overflow-wrap:anywhere; font-weight:500; }
@media(max-width:1450px) and (min-width:981px) { .ah-summary { gap:9px; } .ah-summary .ah-summary-card { padding:14px 11px; } .ah-summary-card > span { font-size:10px; } .ah-summary-card > small { font-size:9px; } .ah-table { min-width:880px; } }
@media(max-width:1150px) { .ah-summary { grid-template-columns:repeat(3,minmax(0,1fr)); } .ah-records-top { align-items:flex-start; } .ah-filters { flex-wrap:wrap; } .ah-filters input { width:100%; } .ah-table { min-width:850px; } }
@media(max-width:650px) {
  .aeris-history .ah-heading { margin-bottom:19px; gap:10px; }
  .aeris-history .ah-heading h1 { font-size:25px; }
  .aeris-history .ah-heading p { font-size:12px; line-height:1.6; max-width:245px; }
  .aeris-history .ah-heading button { font-size:11px; padding:0 10px; }
  .ah-period-row { gap:12px; margin-bottom:17px; }
  .ah-periods { width:100%; justify-content:space-between; gap:0; }
  .ah-periods button { padding:8px 9px; font-size:10px; }
  .ah-dates { width:100%; gap:12px; }
  .ah-dates label { flex:1; min-width:0; display:grid; gap:4px; }
  .ah-dates input { width:100%; min-width:0; box-sizing:border-box; }
  .ah-summary { gap:8px; margin-bottom:18px; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ah-summary .ah-summary-card { padding:13px; border-radius:9px; }
  .ah-summary-card > span { font-size:10px; }
  .ah-summary-card > strong { font-size:25px; margin:7px 0 4px; }
  .ah-summary-card > small { font-size:9px; }
  .ah-records-top { padding:16px 14px; display:block; }
  .ah-records-top h2 { font-size:16px; }
  .ah-filters { margin-top:14px; flex-wrap:nowrap; gap:7px; }
  .ah-filters input { min-width:0; flex:1; padding:7px 9px; font-size:11px; }
  .ah-filters select { width:132px; padding:7px; font-size:11px; }
  .ah-table { min-width:0; display:block; table-layout:auto; }
  .ah-table thead { display:none; }
  .ah-table tbody { display:block; }
  .ah-table tr { display:grid; grid-template-columns:minmax(0,1fr) auto; padding:15px 14px; gap:10px 12px; border-top:1px solid #eee7f3; }
  .ah-table td,.ah-table td:first-child { display:block; padding:0; border:0; width:auto; }
  .ah-table .ah-date { grid-column:1; grid-row:1; color:#91829e; font-size:9px; display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
  .ah-table .ah-date small { display:inline; margin:0; font-size:9px; color:#91829e; }
  .ah-table .ah-date small::before { content:" · "; }
  .ah-table .ah-order { grid-column:1; grid-row:2; }
  .ah-table .ah-order strong { font-size:13px; }
  .ah-table .ah-order .ah-reference { font-size:9px; max-width:240px; }
  .ah-table .ah-order small { font-size:10px; }
  .ah-table .ah-amount { grid-column:2; grid-row:1 / 3; text-align:right; align-self:center; }
  .ah-table .ah-amount strong { font-size:14px; }
  .ah-table .ah-amount small { font-size:10px; }
  .ah-table td[data-label="Payment status"] { grid-column:1; grid-row:3; }
  .ah-table td[data-label="Topup status"] { grid-column:1; grid-row:4; }
  .ah-table td[data-label="Topup status"]::before { content:"Topup"; font-size:9px; color:#a192ac; margin-right:7px; }
  .ah-table td[data-label="Receipt"] { grid-column:2; grid-row:3; text-align:right; align-self:center; }
  .ah-table .ah-paid-at { display:inline; font-size:9px; margin-left:7px; }
  .ah-table .ah-action { grid-column:2; grid-row:4; text-align:right; }
  .ah-badge { font-size:9px; padding:4px 6px; }
  .ah-no-receipt,.ah-receipt { font-size:10px; }
  .ah-details-button { font-size:10px; }
  .ah-pagination { padding:12px 14px; }
  .ah-footer { font-size:9px; display:grid; }
  .ah-payment-dialog { padding:21px; box-sizing:border-box; }
  .ah-payment-dialog h2 { font-size:18px; }
  .ah-payment-dialog dl > div { grid-template-columns:100px minmax(0,1fr); font-size:11px; }
}
/* A received payment remains on hold until an authenticated admin approves. */
.ah-table th:nth-child(7) { width:148px; }
.ah-table td[data-label="Topup status"] .ah-badge { white-space:normal; max-width:132px; }
.ah-row-decisions { display:flex; justify-content:flex-start; gap:5px; margin-bottom:6px; }
.ah-approve-button,.ah-reject-button,.ah-cancel-button { border:1px solid #dfd3e8; border-radius:6px; background:white; padding:6px 9px; color:#715784; font:inherit; font-size:10px; line-height:1.3; cursor:pointer; white-space:nowrap; }
.ah-approve-button { color:white; border-color:#762bad; background:#762bad; }
.ah-approve-button:hover { background:#662095; }
.ah-reject-button { background:#fff; color:#8b5368; border-color:#ead8e1; }
.ah-reject-button:hover { background:#fff5f8; }
.ah-approve-button:disabled,.ah-reject-button:disabled,.ah-cancel-button:disabled { opacity:.5; cursor:default; }
.ah-approval-dialog { margin:auto; width:min(420px,calc(100% - 36px)); max-height:calc(100dvh - 42px); overflow-y:auto; box-sizing:border-box; padding:23px; }
.ah-approval-dialog .ah-payment-note { font-size:12px; margin:14px 0 17px; }
.ah-approval-dialog dl > div { padding:10px 0; font-size:11px; grid-template-columns:124px minmax(0,1fr); gap:10px; }
.ah-decision-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; }
.ah-decision-actions button { font-size:12px; min-height:36px; padding:8px 12px; }
.ah-decision-reason { display:grid; gap:7px; font-size:11px; color:#897494; margin-top:16px; }
.ah-decision-reason textarea { width:100%; box-sizing:border-box; resize:vertical; border:1px solid #e3d9eb; border-radius:7px; padding:9px; font:inherit; font-size:12px; color:#473250; }
.ah-decision-error { font-size:12px; line-height:1.55; color:#a04646; margin:15px 0 0; }
.ah-decision-notice { border:1px solid #d7e7dc; color:#33764f; background:#f4faf6; border-radius:8px; padding:11px 14px; font-size:12px; margin:0 0 16px; }
@media(max-width:650px) {
 .ah-table .ah-action { grid-row:4 / 6; align-self:end; }
 .ah-row-decisions { justify-content:flex-end; }
 .ah-row-decisions button { font-size:10px; padding:7px 9px; }
 .ah-table td[data-label="Topup status"] { min-width:0; }
 .ah-table td[data-label="Topup status"] .ah-badge { max-width:128px; }
 .ah-approval-dialog { padding:20px; border-radius:14px; }
 .ah-approval-dialog dl > div { grid-template-columns:115px minmax(0,1fr); }
}
.review-buttons.wallet-match-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
