:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1f2320;
  --muted: #6b7269;
  --line: #e3e1db;
  --accent: #2f6b4f;
  --accent-2: #dff0e6;
  --warn: #b4682a;
  --warn-bg: #fbe9d8;
  --danger: #b23b3b;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --card: #1e2124;
    --text: #eceae5;
    --muted: #9aa39a;
    --line: #2c2f32;
    --accent: #5fae85;
    --accent-2: #1d3227;
    --warn: #e0a35c;
    --warn-bg: #3a2a16;
    --danger: #e07a7a;
  }
}
:root[data-theme="dark"] {
  --bg: #15171a;
  --card: #1e2124;
  --text: #eceae5;
  --muted: #9aa39a;
  --line: #2c2f32;
  --accent: #5fae85;
  --accent-2: #1d3227;
  --warn: #e0a35c;
  --warn-bg: #3a2a16;
  --danger: #e07a7a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  padding-bottom: 70px;
}
#app { max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { font-size: 18px; margin: 4px 0 16px; }
h2 { font-size: 15px; margin: 0 0 8px; color: var(--muted); font-weight: 600; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); font-size: 13px; }
input, select, button, textarea {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: var(--card);
  color: var(--text);
}
input, select, textarea { width: 100%; margin-bottom: 8px; }
button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: var(--danger); }
button.small { padding: 5px 9px; font-size: 13px; width: auto; }
button:disabled { opacity: .5; cursor: default; }
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--accent);
}
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.list-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; background: var(--card); border-top: 1px solid var(--line);
  z-index: 10;
}
nav.tabs button {
  flex: 1; background: none; color: var(--muted); border-radius: 0;
  padding: 12px 4px; font-size: 12px; font-weight: 500;
}
nav.tabs button.active { color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.check input[type=checkbox] { width: auto; margin: 0; }
.hidden { display: none !important; }
.item-row { display: grid; grid-template-columns: 1fr 70px 60px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.item-row input { margin-bottom: 0; }
.note { font-size: 12px; color: var(--warn); margin-top: -4px; margin-bottom: 6px; }
a { color: var(--accent); }
