:root {
  --bg: #0f172a;
  --bg-card: #17203a;
  --accent: #38bdf8;
  --accent-2: #34d399;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --danger: #f87171;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 40px;
  -webkit-tap-highlight-color: transparent;
}

header {
  padding: 24px 20px 12px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.3px;
}

header p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 13px;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  text-align: center;
}

.stat .value {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
}

.stat .label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input {
  background: #0d1526;
  border: 1px solid #263454;
  border-radius: 10px;
  padding: 12px;
  color: var(--text);
  font-size: 16px;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  background: var(--accent);
  color: #06202f;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button:active { opacity: 0.8; }

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #0d1526;
  border-radius: 10px;
  font-size: 14px;
}

.entry .info { display: flex; flex-direction: column; }
.entry .date { color: var(--text-dim); font-size: 12px; }
.entry .amount { color: var(--accent-2); font-weight: 700; }

.entry button.delete {
  background: none;
  color: var(--danger);
  font-size: 18px;
  padding: 0 6px;
  width: auto;
}

h2 {
  font-size: 15px;
  margin: 0 0 14px;
  color: var(--text);
}

canvas { width: 100% !important; }
