:root { --brand: #2563eb; --bg: #f3f4f6; --card: #fff; --text: #111827; --muted: #6b7280; --line: #e5e7eb; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0 16px; }
h1 { margin: 0; font-size: 24px; }
h2 { margin: 24px 0 8px; font-size: 18px; }
section { background: var(--card); border-radius: 14px; padding: 20px; box-shadow: 0 4px 20px rgba(0, 0, 0, .06); }
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; font: inherit; background: #fff; color: inherit; }
button { margin-top: 12px; padding: 10px 16px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; width: 100%; }
button.link { margin: 0 0 0 8px; padding: 0; border: 0; background: none; color: var(--brand); text-decoration: underline; font-weight: 400; }
button.danger { color: #991b1b; border-color: #fecaca; margin-top: 8px; }
.note { padding: 10px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 14px; }
.error { color: #991b1b; font-weight: 600; }
.filter { margin-bottom: 8px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .what { min-width: 0; }
.row .app { color: var(--muted); font-size: 13px; }
.row .amount { text-align: right; white-space: nowrap; font-weight: 700; }
.row .state { font-size: 13px; color: var(--muted); }
.row .state.paid, .badge.active { color: #166534; }
.row .state.failed, .badge.canceled { color: #991b1b; }
.badge { font-weight: 600; font-size: 13px; }
.row .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.row .actions button { margin-top: 6px; }
.empty { color: var(--muted); }
[hidden] { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #111827; --card: #1f2937; --text: #f3f4f6; --muted: #9ca3af; --line: #374151; }
  input, select, button { background: #111827; border-color: #4b5563; }
  button.primary { background: var(--brand); border-color: var(--brand); }
  .note { background: #78350f; color: #fde68a; }
}
