:root {
  --navy: #163e73;
  --blue: #1071b6;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --card: #ffffff;
  --page: #f2f2f7;
  --line: #e5e5ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--page);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --card: #1c1c1e;
    --page: #000000;
    --line: #38383a;
    --navy: #8cb8e8;
  }
}

body { margin: 0; }

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

h1 { font-size: 1.4rem; margin: 0; color: var(--navy); }
h2 { font-size: 1.15rem; margin: 0 0 8px; }

main { max-width: 1000px; margin: 0 auto; padding: 24px; }

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.account { display: flex; align-items: center; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.space-between { justify-content: space-between; margin-top: 0; }
.muted { color: var(--muted); }
.error { color: #c62828; }

textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  color: var(--text);
}

button {
  font: inherit;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: var(--blue);
  color: white;
  cursor: pointer;
}
button.secondary { background: transparent; color: var(--blue); border: 1px solid var(--line); }
button:disabled { opacity: 0.5; cursor: default; }

table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.number { text-align: right; font-variant-numeric: tabular-nums; }

.chart-box { position: relative; height: 320px; }

footer { text-align: center; padding: 24px; font-size: 0.85rem; }
