:root {
  --bg: #eef3ea;
  --ink: #1c2a1a;
  --muted: #5c6b58;
  --card: #fffdf8;
  --accent: #2f6b3a;
  --accent-2: #c48a2a;
  --line: #d5e0d0;
  --danger: #a33b2b;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(#d7e4f0, var(--bg)); color: var(--ink); min-height: 100vh; }
.nav {
  position: fixed; inset: 0 auto 0 0; width: 240px; background: #14331c; color: #f4efe4;
  padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; overflow: auto;
}
.brand {
  font-weight: 700; padding: 0.5rem 0.75rem 1rem; color: #f4efe4; text-decoration: none;
  display: flex; align-items: center; gap: 0.4rem;
}
.brand-wordmark { height: 28px; width: auto; }
.brand-suffix { opacity: 0.85; }
.login-wordmark { height: 40px; width: auto; display: block; margin: 0 auto 0.5rem; }
.card-icon { width: 32px; height: 32px; border-radius: 8px; display: block; }
.card-icon--placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line); font-size: 1.1rem;
}
.nav-item {
  color: #d7e8d4; text-decoration: none; padding: 0.45rem 0.75rem; border-radius: 8px; border: 0;
  background: transparent; text-align: left; cursor: pointer; font: inherit;
}
.nav-item.active, .nav-item:hover { background: #21532c; color: #fff; }
.logout { margin-top: auto; color: #f0c9c2; }
.main { margin-left: 240px; padding: 1.5rem 2rem 3rem; }
.top { display: flex; justify-content: space-between; align-items: baseline; }
h1 { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.card {
  background: var(--card); border-radius: 16px 16px 8px 8px; padding: 1rem 1.25rem;
  box-shadow: 0 8px 24px rgba(28, 42, 26, 0.08); margin-bottom: 1rem;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 0.55rem 1rem;
  cursor: pointer; font-weight: 600;
}
button.secondary { background: #4d5d4a; }
button.danger { background: var(--danger); }
label { display: flex; flex-direction: column; gap: 0.25rem; margin: 0.5rem 0; font-size: 0.9rem; }
input, select, textarea {
  padding: 0.5rem 0.65rem; border-radius: 8px; border: 1px solid var(--line); font: inherit;
}
.login-body { display: grid; place-items: center; }
.login-card { width: min(420px, 92vw); background: var(--card); padding: 2rem; border-radius: 20px; }
.error { color: var(--danger); }
.flash { background: #eef8e8; padding: 0.6rem 0.8rem; border-radius: 8px; margin-bottom: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }
.stat { background: var(--card); padding: 1rem; border-radius: 12px; }
.stat b { display: block; font-size: 1.4rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.5rem; }
