:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #211c20;
  background: #f7f5f5;
  --paper: #fff;
  --ink: #211c20;
  --muted: #625860;
  --line: #e5dfe2;
  --accent: #73020c;
  --hover: #fff3f3;
  --accent-text: #751521;
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { background: #f3cdd2; color: #3c0810; }
:focus-visible { outline: 2px solid #9d2a3a; outline-offset: 3px; }
a { color: var(--accent-text); text-underline-offset: .19em; }
a:hover { color: #4e0610; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd { margin: 0; }
strong { font-weight: 650; }
.frame { width: min(100% - 3rem, 1260px); margin-inline: auto; }
.skip { position: fixed; top: 10px; left: 10px; background: #fff; padding: 8px 12px; transform: translateY(-150%); z-index: 2; }
.skip:focus { transform: none; }
.top { background: #45131a; color: #fff; }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { color: #fff; font-size: 1rem; font-weight: 680; letter-spacing: -.012em; text-decoration: none; }
.brand:hover { color: #fff; text-decoration: underline; }
.top :focus-visible { outline-color: #f3cdd2; }
.sign-out { background: transparent; color: #fff; border: 1px solid #ac7881; border-radius: 6px; padding: .44rem .75rem; font-size: .85rem; }
.sign-out:hover { background: #62212c; }
.dashboard { padding-block: 2.25rem 1.5rem; }
.intro, .range { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.intro { margin-bottom: 1.5rem; }
h1 { font-size: 2rem; font-weight: 720; letter-spacing: -.034em; line-height: 1.1; }
.intro p, .login p { margin-top: .45rem; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .53rem .84rem; min-height: 39px; border: 1px solid #d3c6cd; border-radius: 6px; background: var(--paper); color: var(--ink); font-size: .86rem; font-weight: 650; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s; }
.button:hover { color: var(--ink); background: var(--hover); border-color: #b6959c; }
.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.primary:hover { color: #fff; background: #590611; border-color: #590611; }
.filters { display: grid; grid-template-columns: minmax(10rem, 1.3fr) repeat(2, minmax(8.2rem, .9fr)) minmax(7.5rem, .9fr) minmax(7.6rem, .85fr) minmax(10rem, 1.2fr) auto; align-items: end; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.filters > div { min-width: 0; }
label { display: block; margin-bottom: .34rem; font-size: .78rem; font-weight: 650; }
input, select { display: block; min-width: 0; width: 100%; min-height: 39px; padding: .49rem .55rem; border: 1px solid #cfc3ca; border-radius: 6px; background: #fff; color: var(--ink); caret-color: var(--accent); font-size: .83rem; }
input::placeholder { color: #72626a; }
.filter-actions { display: flex; align-items: center; gap: .55rem; font-size: .83rem; }
.range { margin-block: 1.12rem .62rem; color: var(--muted); font-size: .79rem; }
.range a { margin-left: .45rem; font-weight: 650; }
.separator { padding-inline: .2rem; }
.metrics { overflow: hidden; margin-bottom: 1.25rem; border-radius: 12px; border: 1px solid #e4d5d8; background: #fff; }
.metrics-label { background: #f1e6e8; color: #4b2027; padding: .61rem 1rem; font-size: .83rem; font-weight: 700; }
.metrics-label span { float: right; font-variant-numeric: tabular-nums; }
.metrics dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics dl > div { padding: .95rem 1rem 1.05rem; }
.metrics dl > div + div { border-left: 1px solid var(--line); }
.metrics dt { margin-bottom: .31rem; font-size: .82rem; color: var(--muted); }
.metrics dd { font-size: 1.55rem; font-weight: 710; letter-spacing: -.025em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metrics .net { background: #fcf6f7; color: var(--accent-text); }
.panel { margin-top: 1.125rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.panel-heading { padding: 1rem 1rem .85rem; }
.panel-heading h2 { font-size: 1.12rem; letter-spacing: -.017em; }
.panel-heading p { margin-top: .23rem; font-size: .8rem; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .83rem; }
th, td { padding: .69rem 1rem; vertical-align: top; border-top: 1px solid var(--line); }
thead th { font-size: .76rem; white-space: nowrap; color: #544952; background: #f9f6f7; }
tbody th { font-weight: 650; }
tbody tr:hover { background: #fdfafb; }
.breakdown { min-width: 600px; }
.transactions { min-width: 800px; }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.net-cell { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; }
meter { width: clamp(2.8rem, 8vw, 7rem); height: .6rem; accent-color: #8a3544; border: 0; }
meter::-webkit-meter-bar { border: 0; background: #f0e8eb; border-radius: 4px; }
meter::-webkit-meter-optimum-value { background: #8a3544; border-radius: 4px; }
small { display: block; margin-top: .16rem; color: var(--muted); font-size: .73rem; }
.offer { max-width: 25ch; overflow-wrap: anywhere; }
.status { display: inline-block; font-size: .72rem; font-weight: 680; padding: .18rem .44rem; border-radius: 4px; white-space: nowrap; background: #e1f0e7; color: #254c37; }
.status.partial { background: #f7eddb; color: #634610; }
.status.refunded { background: #f0e7eb; color: #684054; }
summary { cursor: pointer; white-space: nowrap; color: var(--accent-text); }
.references { margin-top: .45rem; min-width: 14rem; max-width: 20rem; }
.references div + div { margin-top: .34rem; }
.references dt { font-size: .72rem; color: var(--muted); }
.references dd { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .72rem; }
.muted, .foot { color: var(--muted); }
.empty { padding: 1.35rem 1rem; border-top: 1px solid var(--line); }
.empty h3 { font-size: .96rem; }
.empty p { margin-top: .3rem; margin-bottom: .55rem; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.empty a, .foot { font-size: .8rem; }
.page-nav { padding: .7rem 1rem; display: flex; justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--line); }
.foot { margin-top: 1.25rem; line-height: 1.5; }
.login-frame { width: min(100% - 2rem, 424px); margin: 4.8rem auto; }
.login { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 1.7rem; }
.login form { margin-top: 1.25rem; }
.login input { font-size: 1rem; }
.login button { margin-top: .9rem; width: 100%; }
.login .notice { color: #871b28; }
.error-page { margin-top: 2rem; border: 0; padding-left: 0; }
.error-page p { margin-block: .7rem; }
@media (max-width: 1140px) {
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters .search { grid-column: span 2; }
}
@media (max-width: 660px) {
  .frame { width: calc(100% - 1.5rem); }
  .dashboard { padding-top: 1.45rem; }
  h1 { font-size: 1.65rem; }
  .intro { align-items: flex-start; }
  .intro p { font-size: .84rem; }
  .intro .button { padding-inline: .55rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .7rem; gap: .65rem; }
  .filters .search, .filter-actions { grid-column: span 2; }
  .range { align-items: flex-start; flex-wrap: wrap; gap: .2rem .75rem; }
  .metrics dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics dl > div:nth-child(3) { border-left: 0; }
  .metrics dl > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metrics dl > div { padding: .68rem .75rem; }
  .metrics dd { font-size: 1.2rem; }
  .panel-heading { padding-inline: .75rem; }
  th, td { padding-inline: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
