:root {
  --accent: #2d6a4f;
  --accent-light: #d8f3dc;
  --border: #ddd;
  --text: #222;
  --muted: #666;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #fafafa;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: white;
}
.topbar .brand { color: white; text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.topbar nav a { color: white; margin-left: 1rem; }
.admin-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

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

h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }

.tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  vertical-align: middle;
}

.dates, .hint, .qty, .notes, .progress { color: var(--muted); font-size: 0.9rem; }
.notes { display: block; font-style: italic; }

.flashes { list-style: none; padding: 0; }
.flashes li {
  background: #fdecea;
  color: #611a15;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.error { color: #b3261e; }

.stack { display: flex; flex-direction: column; gap: 0.5rem; max-width: 400px; }
.stack input, .stack button { padding: 0.6rem; font-size: 1rem; }
.stack button, .button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.filters { margin: 0.75rem 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filters a {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}
.filters a.selected { background: var(--accent); color: white; border-color: var(--accent); }

.item-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--border);
}
.item-row .item-name { flex: 1; min-width: 120px; }

/* Large tap targets for phone use while loading the car, per spec */
.check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.check input[type=checkbox] {
  width: 1.5rem;
  height: 1.5rem;
}

.link-button {
  background: none;
  border: none;
  color: #b3261e;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.3rem;
  font-size: 0.85rem;
}
.inline-form { display: inline; }

.add-item-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1.5rem;
}
.add-item-form input { padding: 0.5rem; border: 1px solid var(--border); border-radius: 4px; flex: 1; min-width: 100px; }
.add-item-form .qty-input { flex: 0 0 70px; }
.add-item-form button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
}

.trip-list { list-style: none; padding: 0; }
.trip-row {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.trip-row.active { background: var(--accent-light); }
.trip-row a { font-weight: 600; color: var(--text); text-decoration: none; }
.row-actions { display: flex; gap: 0.5rem; margin-left: auto; }
.row-actions form { display: inline; }
.row-actions button {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.empty { color: var(--muted); font-style: italic; padding: 0.5rem 0; }
