/* Transactions and payment details share the compact administration palette. */
.payment-portal{max-width:1440px;margin:0 auto;min-width:0}
.payment-portal [hidden],.portal-dialog [hidden]{display:none!important}
.portal-heading{position:relative;isolation:isolate;overflow:hidden;margin-bottom:20px;padding:24px 26px;border-radius:16px;background:linear-gradient(115deg,#251d42,#35234e 68%,#483055);color:#fff}
.portal-heading::after{content:"";position:absolute;z-index:-1;width:240px;height:240px;right:-100px;top:-140px;border:1px solid #dcc1ff28;border-radius:50%;box-shadow:0 0 0 30px #d8b5ff05,0 0 0 60px #eac5ff05;pointer-events:none}
.portal-kicker{font-size:9px;font-weight:700;color:#c3aedf;letter-spacing:.15em;text-transform:uppercase;margin-bottom:11px}
.payment-portal .portal-heading h1.page{font-size:28px;font-weight:600;color:#fff;margin:0;line-height:1.2}
.payment-portal .portal-heading .sub{font-size:12px;line-height:1.8;max-width:690px;margin:10px 0 0;color:#d8cde6}
.portal-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
.portal-metric{background:#fff;border:1px solid var(--line,#e8e5ed);border-radius:14px;padding:17px 19px;min-width:0}
.portal-metric:first-child{background:#f4effb;border-color:#e2d8f1;color:#6846b4}
.portal-metric-label{font-size:11px;letter-spacing:.02em;color:var(--text2);font-weight:600;line-height:1.5}
.portal-metric:first-child .portal-metric-label{color:#775d99}
.portal-metric-value{font-family:var(--head);font-size:29px;font-weight:600;line-height:1.3;overflow-wrap:anywhere;margin-top:7px;font-variant-numeric:tabular-nums}
.portal-metric-note{font-size:11px;color:var(--text2);margin-top:5px;line-height:1.6}
.portal-metric:first-child .portal-metric-note{color:#775d99}
.portal-panel{border:1px solid var(--line,#e8e5ed);border-radius:15px;background:#fff;overflow:hidden;box-shadow:0 3px 14px #21183703}
.portal-toolbar{display:flex;align-items:flex-end;gap:11px;padding:17px 18px;flex-wrap:wrap;border-bottom:1px solid var(--line,#e8e5ed)}
.portal-toolbar label{display:block;min-width:0}
.portal-toolbar .portal-search{flex:1;min-width:200px}
.portal-toolbar label>span{display:block;font-size:11px;font-weight:600;color:var(--text2);margin-bottom:7px}
.portal-toolbar input,.portal-toolbar select{width:100%;min-width:0;border:1px solid var(--line,#e8e5ed);background:#faf9fc;border-radius:9px;min-height:42px;padding:10px 12px;font:inherit;font-size:12px;color:var(--text)}
.portal-toolbar select{min-width:145px}
.portal-toolbar input:focus,.portal-toolbar select:focus,.portal-refund-form input:focus,.portal-refund-form textarea:focus{border-color:#9273d3;background:#fff;box-shadow:0 0 0 3px #7856c911;outline:none}
.portal-button{border:1px solid var(--line,#e8e5ed);border-radius:9px;padding:10px 14px;font-family:var(--body);font-size:12px;font-weight:700;min-height:42px;background:#fff;color:var(--text);cursor:pointer;line-height:1.6;transition:background .15s,border-color .15s}
.portal-button:hover:not(:disabled){background:#f8f5fc;border-color:#cdbce5}
.portal-button.primary{border-color:#7856c9;background:#7856c9;color:#fff}
.portal-button.primary:hover:not(:disabled){background:#6c49bd;border-color:#6c49bd}
.portal-button.danger{background:#b0394c;border-color:#b0394c;color:#fff}
.portal-button.danger:hover:not(:disabled){background:#9e2e40;border-color:#9e2e40}
.portal-button.ghost{background:#f5f0fb;border-color:#e2d8f1;color:#7150b4}
.portal-button.ghost:hover:not(:disabled){background:#eee6f9;border-color:#cdbce5}
#portalRefundOpen{color:#a33244;border-color:#efd2d9;background:#fffafa}
#portalRefundOpen:hover:not(:disabled){background:#fff0f2;border-color:#e1b6c1}
.portal-button:disabled{opacity:.5;cursor:not-allowed}
.portal-button:focus-visible,.portal-dialog :focus-visible,.portal-toolbar :focus-visible{outline:3px solid #ad91e3;outline-offset:3px}
.portal-table-scroll{overflow-x:auto;overscroll-behavior-x:contain}
.portal-table{width:100%;font-size:12px;border-collapse:collapse}
.portal-table th{font-size:10px;letter-spacing:.04em;vertical-align:bottom;padding:12px 14px;background:#faf9fc;color:var(--text2);font-weight:600;white-space:nowrap}
.portal-table td{padding:15px 14px;vertical-align:top;min-width:0;line-height:1.6}
.portal-table td:first-child{min-width:104px}
.portal-table tr:hover td{background:#fcfaff}
.portal-table strong{font-weight:700;color:var(--text);font-variant-numeric:tabular-nums}
.portal-secondary{display:block;color:var(--text2);font-size:11px;line-height:1.65;margin-top:4px;overflow-wrap:anywhere;max-width:250px}
.portal-ref{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:10px;line-height:1.8;overflow-wrap:anywhere;max-width:220px}
.portal-customer{font-weight:600;overflow-wrap:anywhere;max-width:240px}
.portal-customer .portal-secondary{font-weight:400}
.portal-status{display:inline-block;font-size:10px;font-weight:600;line-height:1.5;padding:4px 8px;border:1px solid transparent;border-radius:6px;background:#f3f0f6;color:#6c627c;white-space:normal;overflow-wrap:anywhere;max-width:100%}
.portal-status[data-tone=success]{background:#edf8f1;border-color:#d6edde;color:#216c49}
.portal-status[data-tone=warning]{background:#fff5e7;border-color:#f2e1c6;color:#8b5c17}
.portal-status[data-tone=error]{background:#fff1f3;border-color:#f2dbe0;color:#a33244}
.portal-status[data-tone=neutral]{background:#f3eefb;border-color:#e8def5;color:#7150a5}
.portal-table .portal-button{white-space:nowrap;min-height:36px;font-size:11px;padding:7px 11px}
.portal-pager{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 18px;border-top:1px solid var(--line,#e8e5ed);font-size:11px;color:var(--text2);line-height:1.6}
.portal-page-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.portal-pager .portal-button{min-height:36px;padding:7px 11px}
.portal-notice{font-size:12px;line-height:1.75;padding:11px 13px;border:1px solid #e2d8f1;background:#f6f2fc;border-radius:10px;margin:0 0 16px;color:#68518d;overflow-wrap:anywhere}
.portal-notice:empty{display:none}
.portal-notice[data-tone=error]{border-color:#efd2d9;background:#fff4f4;color:#a33244}
.portal-notice[data-tone=success]{border-color:#c9ead8;background:#eff9f3;color:#1a7450}
.portal-empty{padding:38px 22px;text-align:center;color:var(--text2);font-size:12px;line-height:1.8}
.portal-dialog{border:0;color:var(--text);background:#f7f7fb;box-shadow:-20px 0 80px #21183726;padding:0;width:min(740px,100%);max-width:100%;height:100%;max-height:100%;margin:0 0 0 auto;overflow-y:auto;overscroll-behavior:contain}
.portal-dialog::backdrop{background:#17112480;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.portal-dialog[open]{display:flex;flex-direction:column}
.portal-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#fff;padding:18px 24px;border-bottom:1px solid var(--line,#e8e5ed);position:sticky;top:0;z-index:2;flex:none}
.portal-dialog-head .portal-kicker{color:#7856a0;margin-bottom:5px}
.portal-dialog-head h2{font-size:21px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.portal-close{border:1px solid var(--line,#e8e5ed);background:#faf9fc;width:40px;height:40px;flex:none;display:grid;place-items:center;border-radius:9px;font-size:24px;line-height:1;color:var(--text2);cursor:pointer}
.portal-close:hover{background:#f1ebf8;border-color:#cdbce5}
.portal-dialog-body{padding:22px 24px 30px;min-width:0}
.portal-detail-top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:19px;flex-wrap:wrap}
.portal-detail-top>div{min-width:0}
.portal-detail-amount{font-family:var(--head);font-size:34px;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.portal-detail-top .portal-status{margin-top:4px}
.portal-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.portal-detail-card{padding:17px 18px;background:#fff;border:1px solid var(--line,#e8e5ed);border-radius:13px;min-width:0}
.portal-detail-card.full{grid-column:1/-1}
.portal-detail-card h3{font-size:14px;font-weight:600;margin-bottom:14px}
.portal-details{display:grid;gap:12px;margin:0}
.portal-details>div{min-width:0}
.portal-details dt{font-size:10px;font-weight:600;letter-spacing:.02em;color:var(--text2);margin-bottom:4px}
.portal-details dd{font-size:12px;line-height:1.75;margin:0;color:var(--text);overflow-wrap:anywhere;white-space:pre-line}
.portal-detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.portal-refund-note{font-size:11px;line-height:1.8;color:var(--text2);margin:13px 0 0;overflow-wrap:anywhere}
.portal-events{list-style:none;padding:0;margin:0;display:grid;gap:18px}
.portal-events li{position:relative;padding-left:19px;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.portal-events li::before{content:"";position:absolute;left:0;top:7px;width:6px;height:6px;background:#ab8aca;border-radius:50%}
.portal-events time{display:block;color:var(--text2);font-size:10px}
.portal-events strong{display:block;font-size:12px;font-weight:600}
.portal-refund-dialog{width:min(510px,calc(100% - 32px));height:auto;max-height:calc(100% - 32px);margin:auto;border-radius:15px;background:#fff;box-shadow:0 30px 100px #16102166}
.portal-refund-dialog .portal-dialog-head{padding:18px 21px}
.portal-refund-dialog .portal-dialog-head h2{font-size:20px}
.portal-refund-dialog .portal-dialog-body{padding:19px 21px 23px}
.portal-refund-total{background:#fcf5f7;border:1px solid #efdce2;border-radius:11px;padding:15px;margin-bottom:16px}
.portal-refund-total p{font-size:11px;color:var(--text2);line-height:1.75}
.portal-refund-total strong{display:block;font-family:var(--head);font-size:29px;font-weight:600;margin:5px 0;color:#96354b;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.portal-refund-form fieldset{min-width:0}
.portal-refund-form label{display:block;font-size:11px;font-weight:600;color:var(--text2);margin-top:14px}
.portal-refund-form input,.portal-refund-form textarea{width:100%;min-width:0;border:1px solid var(--line,#e8e5ed);background:#faf9fc;border-radius:9px;padding:10px 12px;color:var(--text);font:inherit;font-size:13px;margin-top:7px;resize:vertical;min-height:42px}
.portal-refund-form .portal-confirm{display:flex;align-items:flex-start;gap:10px;font-size:11px;line-height:1.8}
.portal-confirm input{width:18px;height:18px;min-height:18px;padding:0;flex:none;margin:2px 0 0;accent-color:#a63b50}
.portal-refund-form .portal-detail-actions{margin:20px 0 0}
.portal-refund-form .portal-notice{margin-top:16px;margin-bottom:0}
.portal-nav-item{padding-left:22px!important}
.portal-nav-item .ic{font-size:12px!important}
.portal-dialog button:disabled{cursor:not-allowed;opacity:.5}
@media(max-width:1200px){
  .portal-table th,.portal-table td{padding:12px 10px}
  .portal-overview{gap:12px}
  .portal-metric{padding:16px}
  .portal-metric-value{font-size:27px}
}
@media(max-width:1100px){
  .portal-table-scroll{overflow:visible}
  .portal-table thead{display:none}
  .portal-table,.portal-table tbody,.portal-table tr{display:block;width:100%}
  .portal-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:17px;border-bottom:1px solid var(--line,#e8e5ed);gap:15px 20px}
  .portal-table tr:last-child{border-bottom:0}
  .portal-table td{display:block;border:0;padding:0!important;min-width:0!important}
  .portal-table td::before{content:attr(data-label);display:block;font-size:10px;letter-spacing:.03em;font-weight:600;color:var(--text2);margin-bottom:5px;text-transform:uppercase}
  .portal-table td[data-label=References]{grid-column:1/-1}
  .portal-ref,.portal-customer,.portal-secondary{max-width:none}
  .portal-table td:last-child{align-self:end}
  .portal-table .portal-button{width:100%;min-height:42px}
  .portal-pager{padding:15px 17px;flex-wrap:wrap}
  .portal-page-actions{margin-left:auto}
}
@media(max-width:600px){
  .portal-heading{padding:21px 20px}
  .payment-portal .portal-heading h1.page{font-size:25px}
  .portal-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .portal-metric:first-child{grid-column:1/-1}
  .portal-metric-value{font-size:26px}
  .portal-metric{padding:15px 16px}
  .portal-toolbar{padding:16px;gap:12px}
  .portal-toolbar .portal-search{min-width:0;flex-basis:100%}
  .portal-toolbar .portal-filter{flex:1}
  .portal-toolbar input,.portal-toolbar select{font-size:16px;min-height:44px}
  .portal-toolbar select{min-width:0}
  .portal-button,.portal-table .portal-button,.portal-pager .portal-button{min-height:44px}
  .portal-dialog-head{padding:15px 16px}
  .portal-dialog-body{padding:18px 16px 26px}
  .portal-close{width:44px;height:44px}
  .portal-detail-grid{grid-template-columns:minmax(0,1fr)}
  .portal-detail-card.full{grid-column:auto}
  .portal-detail-amount{font-size:31px}
  .portal-detail-card{padding:16px}
  .portal-refund-dialog .portal-dialog-head{padding:16px}
  .portal-refund-dialog .portal-dialog-body{padding:16px}
  .portal-refund-form input,.portal-refund-form textarea{font-size:16px}
  .portal-detail-actions .portal-button{flex:1 1 140px}
  .portal-refund-form .portal-detail-actions .portal-button{flex-basis:100%}
  .portal-refund-dialog{max-height:calc(100% - 16px);width:calc(100% - 20px)}
  .portal-dialog-head h2{font-size:20px}
  .portal-page-actions{gap:8px}
  .portal-table tr{padding:16px;gap:15px 14px}
}
@media(max-width:360px){
  .portal-overview{grid-template-columns:minmax(0,1fr)}
  .portal-metric:first-child{grid-column:auto}
  .portal-table tr{grid-template-columns:minmax(0,1fr)}
  .portal-table td[data-label=References]{grid-column:auto}
  .portal-pager{gap:10px}
  .portal-page-actions{margin-left:0;width:100%}
  .portal-page-actions .portal-button{flex:1}
  .portal-page-actions #portalPage{width:100%;order:-1}
}
@media(prefers-reduced-motion:reduce){.portal-button{transition:none}}
@media(forced-colors:active){.portal-heading,.portal-metric:first-child,.portal-status{border:1px solid CanvasText}}
