:root {
  --bg: #f6f4f1;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #2c5f4e;
  --accent-soft: #e4efe9;
  --border: #e0ddd6;
  --pos: #1b7a3d;
  --neg: #b33a3a;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { width: min(1100px, 100% - 1.5rem); margin-inline: auto; }
.site-header {
  background: var(--accent);
  color: #fff;
  padding: .85rem 0;
  margin-bottom: 1.25rem;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.site-header nav { display: flex; gap: .85rem; flex-wrap: wrap; }
.site-header nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .95rem;
}
.site-header nav a:hover,
.site-header nav a.active { color: #fff; text-decoration: underline; }
main { flex: 1; padding-bottom: 2rem; }
.site-footer {
  padding: 1rem 0;
  color: var(--muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
h1 { font-size: 1.45rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
.muted { color: var(--muted); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  box-shadow: var(--shadow);
}
.card .label { font-size: .8rem; color: var(--muted); }
.card .value { font-size: 1.45rem; font-weight: 700; margin-top: .15rem; }
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
th, td {
  padding: .55rem .7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th { background: var(--accent-soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.spark { color: var(--accent); vertical-align: middle; }
.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: .15rem .45rem;
  border-radius: 999px;
  font-size: .75rem;
}
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  max-width: 520px;
  box-shadow: var(--shadow);
}
label { display: block; font-weight: 600; margin-bottom: .35rem; }
input[type="file"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: .85rem;
  background: #fff;
}
button, .btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: .55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { filter: brightness(1.05); }
.flash {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--accent-soft);
  border: 1px solid #c5ddd0;
}
.flash.err { background: #fdeaea; border-color: #f0c0c0; color: var(--neg); }
.meta { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
@media (max-width: 600px) {
  th, td { padding: .45rem .5rem; font-size: .82rem; }
  .card .value { font-size: 1.2rem; }
}
