:root {
  --navy: #1f3a5c;
  --navy-dark: #16293f;
  --paper: #f6f4ef;
  --ink: #2b2b28;
  --ink-soft: #6b6a63;
  --green: #2f7a4f;
  --green-soft: #eaf3ec;
  --border: #dedad0;
  --amber: #b8873a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Iowan Old Style", "Georgia", serif;
  background: var(--paper);
  color: var(--ink);
}

header.top {
  background: var(--navy);
  color: white;
  padding: 1.5rem 1.75rem;
}

header.top h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  font-family: "Iowan Old Style", Georgia, serif;
}

header.top p {
  margin: 0.25rem 0 0;
  color: #c7d3df;
  font-size: 0.95rem;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-family: -apple-system, sans-serif;
}

.month-nav button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--navy);
}

.month-nav button:disabled { opacity: 0.35; cursor: default; }

.month-nav .current {
  font-size: 1.1rem;
  font-weight: 600;
}

.stat-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.stat {
  flex: 1;
  min-width: 150px;
  background: var(--green-soft);
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
}

.stat.muted { background: #f0ede4; }

.stat .label {
  font-family: -apple-system, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}

.stat .value {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--green);
}

.stat.muted .value { color: var(--ink); }

.comment {
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.5;
  white-space: pre-wrap;
}

canvas { max-width: 100%; }

.login-box {
  max-width: 340px;
  margin: 4rem auto;
  text-align: center;
}

.login-box input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 1rem 0;
  font-family: -apple-system, sans-serif;
}

.login-box button, form.admin-form button {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  font-family: -apple-system, sans-serif;
}

.error-text { color: #a5341f; font-family: -apple-system, sans-serif; font-size: 0.9rem; }

form.admin-form {
  font-family: -apple-system, sans-serif;
}

form.admin-form label {
  display: block;
  margin-bottom: 1rem;
}

form.admin-form label span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

form.admin-form input,
form.admin-form textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.status-msg {
  font-family: -apple-system, sans-serif;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.status-msg.ok { color: var(--green); }
.status-msg.err { color: #a5341f; }

.small-note {
  font-family: -apple-system, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
