:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #e2e8f0;
}

.app-header {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  margin-bottom: 1rem;
}

.hidden { display: none; }

label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem;
  font-size: 1rem;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}

button.danger { background: #dc2626; }

.month-controls,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: end;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.summary-grid > div {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.75rem;
}

#purchaseList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#purchaseList li {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.5rem 0;
}

.signature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

canvas {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 100%;
  max-width: 320px;
  background: #fff;
  touch-action: none;
}

@media (min-width: 700px) {
  .signature-grid {
    grid-template-columns: 1fr 1fr;
  }
}
