.wallet-statements-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.wallet-statements-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.wallet-statements-header h1 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  line-height: 1.08;
}

.wallet-statements-header p {
  max-width: 690px;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.wallet-statements-toolbar {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  gap: 10px;
}

.wallet-statements-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.wallet-statements-toolbar select {
  min-width: 190px;
  height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.wallet-statements-toolbar select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wallet-statements-scope {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel2) 88%, var(--accent) 12%);
  color: var(--muted-light);
  font-size: .86rem;
  line-height: 1.5;
}

.wallet-statements-count {
  display: inline-flex;
  align-items: baseline;
  justify-self: start;
  gap: 9px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.wallet-statements-count strong {
  color: var(--text);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.wallet-statements-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.wallet-statements-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.wallet-statements-table th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .065em;
  text-align: left;
  text-transform: uppercase;
}

.wallet-statements-table th:nth-child(1) { width: 15%; }
.wallet-statements-table th:nth-child(2) { width: 12%; }
.wallet-statements-table th:nth-child(3) { width: 14%; }
.wallet-statements-table th:nth-child(4) { width: 14%; }
.wallet-statements-table th:nth-child(5) { width: 14%; }
.wallet-statements-table th:nth-child(6) { width: 8%; }
.wallet-statements-table th:nth-child(7) { width: 23%; }

.wallet-statements-table td {
  min-width: 0;
  padding: 13px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted-light);
  vertical-align: middle;
}

.wallet-statements-table tr:last-child td { border-bottom: 0; }
.wallet-statements-table tbody tr:hover { background: color-mix(in srgb, var(--panel3) 76%, transparent); }
.wallet-statements-table time { color: var(--muted); font-size: .86rem; }

.wallet-statement-type {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: .86rem;
  font-weight: 700;
}

.wallet-statement-type i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.wallet-statement-type.is-debit i,
.wallet-statement-type.is-withdrawal i { background: var(--danger); }

.wallet-statement-type.is-credit i,
.wallet-statement-type.is-deposit i,
.wallet-statement-type.is-rollback i,
.wallet-statement-type.is-withdrawal_reversal i { background: var(--accent); }

.wallet-statement-type.is-adjustment i { background: var(--action-border); }

.wallet-statement-amount,
.wallet-statement-balance {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wallet-statement-amount.is-negative { color: var(--danger); }
.wallet-statement-amount.is-positive { color: var(--accent); }
.wallet-statement-amount.is-neutral { color: var(--text); }
.wallet-statement-balance { color: var(--text); font-weight: 700; }

.wallet-statement-currency {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel2);
  color: var(--text);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .05em;
}

.wallet-statement-reference {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .78rem;
}

.wallet-statement-reference span,
.wallet-statement-reference small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-statement-reference span { color: var(--muted-light); }
.wallet-statement-reference small { margin-top: 4px; color: var(--muted); }
.wallet-statement-mobile-details { display: none; }

.wallet-statements-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--muted);
  text-align: center;
}

.wallet-statements-state strong { color: var(--text); font-size: 1.05rem; }
.wallet-statements-state p { max-width: 520px; margin: 0; line-height: 1.55; }
.wallet-statements-state.is-error p,
.wallet-statements-inline-error { color: var(--danger); }

.wallet-statements-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: wallet-statements-spin .8s linear infinite;
}

.wallet-statements-inline-error {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--danger) 8%, var(--panel));
  font-size: .86rem;
}

.wallet-statements-more {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

@keyframes wallet-statements-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .wallet-statements-spinner { animation-duration: 1.8s; }
}

@media (max-width: 900px) {
  .wallet-statements-header { align-items: flex-start; flex-direction: column; }
  .wallet-statements-toolbar { width: 100%; }
  .wallet-statements-toolbar label { flex: 1; }
  .wallet-statements-toolbar select { width: 100%; }
}

@media (max-width: 720px) {
  .wallet-statements-toolbar { align-items: stretch; flex-direction: column; }
  .wallet-statements-toolbar .button { justify-content: center; }
  .wallet-statements-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .wallet-statements-table,
  .wallet-statements-table tbody { display: block; }
  .wallet-statements-table thead { display: none; }
  .wallet-statements-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    margin-bottom: 8px;
    padding: 10px 12px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
  }
  .wallet-statements-table td { display: block; padding: 0; border: 0; }
  .wallet-statements-table td::before { display: none; }
  .wallet-statements-table td:nth-child(1) {
    grid-column: 1; grid-row: 2;
    color: var(--muted);
    font-size: .78rem;
  }
  .wallet-statements-table td:nth-child(2) { grid-column: 1; grid-row: 1; }
  .wallet-statements-table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  .wallet-statements-table td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  .wallet-statements-table td:nth-child(4)::before {
    display: inline;
    margin-right: 4px;
    color: var(--muted);
    content: attr(data-label) ":";
    font-size: .68rem;
    font-weight: 750;
  }
  .wallet-statements-table td:nth-child(5) { display:block; grid-column:2; grid-row:3; text-align:right; }
  .wallet-statements-table td:nth-child(5)::before { display:inline; content:attr(data-label) ": "; color:var(--muted); font-size:.68rem; }
  .wallet-statements-table td:nth-child(6),
  .wallet-statements-table td:nth-child(7) { display: none; }
  .wallet-statements-table td.wallet-statement-mobile-details {
    display: block;
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 2px;
  }
  .wallet-statement-disclosure { border-top: 1px solid var(--line-soft); }
  .wallet-statement-disclosure summary {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted-light);
    font-size: .78rem;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
  }
  .wallet-statement-disclosure summary::-webkit-details-marker { display: none; }
  .wallet-statement-disclosure summary::after {
    content: "›";
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform .15s ease;
  }
  .wallet-statement-disclosure[open] summary::after { transform: rotate(-90deg); }
  .wallet-statement-disclosure dl {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 4px 0 8px;
  }
  .wallet-statement-disclosure dl > div {
    display: grid;
    grid-template-columns: minmax(82px, .32fr) minmax(0, 1fr);
    gap: 10px;
  }
  .wallet-statement-disclosure dt {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 750;
    text-transform: uppercase;
  }
  .wallet-statement-disclosure dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--muted-light);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .72rem;
  }
  .wallet-statement-disclosure .wallet-statement-detail-currency {
    color: var(--text);
    font-family: inherit;
    font-weight: 800;
  }
}
.wallet-statements-page { max-width:1424px; margin:0 auto; padding:24px 16px; }
.wallet-statements-more { display:flex; justify-content:center; align-items:center; gap:16px; }
.wallet-statements-table-wrap { overflow-x:auto; }
