:root {
  color-scheme: light dark;
  --credit: #1a7f37;
  --debit: #cf222e;
  --border: #d0d7de;
  --bg-muted: #f6f8fa;
  --bg: #ffffff;
  --text: #1f2328;
  --text-muted: #59636e;
  --alert-bg: #fff8c5;
  --alert-border: #d4a72c;
  --alert-text: #7d5a00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --border: #30363d;
    --bg-muted: #21262d;
    --bg: #0d1117;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --credit: #3fb950;
    --debit: #f85149;
    --alert-bg: #3b2f05;
    --alert-border: #9e6a03;
    --alert-text: #f0c94a;
  }
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  background: var(--bg);
  color: var(--text);
}

h1 {
  font-size: 1.4rem;
}

.filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

th {
  background: var(--bg-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td.amount, th.amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.amount.credit {
  color: var(--credit);
}

.amount.debit {
  color: var(--debit);
}

.empty {
  color: var(--text-muted);
  font-style: italic;
}

.alert {
  background: var(--alert-bg);
  border: 1px solid var(--alert-border);
  color: var(--alert-text);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.alert p {
  margin: 0.25rem 0;
}

h2 {
  font-size: 1.1rem;
  margin-top: 2rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.actions form {
  margin: 0;
}

button {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  background: var(--bg-muted);
  color: var(--text);
}

.btn-confirm {
  border-color: var(--credit);
  color: var(--credit);
}

.btn-reject {
  border-color: var(--debit);
  color: var(--debit);
}
