:root {
  --bg: #f3f0e8;
  --ink: #1c2430;
  --muted: #5c6775;
  --card: #ffffff;
  --line: #d7d0c3;
  --accent: #0f6b4c;
  --accent-ink: #ffffff;
  --warn: #8a4b08;
  --danger: #9b1c1c;
  --ok: #0f6b4c;
  --shadow: 0 10px 30px rgba(28, 36, 48, 0.08);
  --radius: 14px;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(15, 107, 76, 0.08), transparent 40%),
    linear-gradient(180deg, #f7f4ed 0%, var(--bg) 100%);
  color: var(--ink);
  min-height: 100%;
}
body {
  padding: 1rem;
  line-height: 1.45;
}
a { color: var(--accent); }
.wrap {
  width: min(920px, 100%);
  margin: 0 auto;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}
.brand h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  letter-spacing: -0.02em;
}
.brand p {
  margin: 0;
  color: var(--muted);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
}
.grid {
  display: grid;
  gap: 0.85rem;
}
.grid-2 {
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}
input, select, button, textarea {
  font: inherit;
}
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #fff;
  color: var(--ink);
}
button, .btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
button.secondary, .btn.secondary {
  background: #e8efe9;
  color: var(--accent);
}
button.ghost, .btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.muted { color: var(--muted); font-size: 0.92rem; }
.error {
  background: #fdecec;
  color: var(--danger);
  border: 1px solid #f3c1c1;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 0.75rem 0;
}
.success {
  background: #e8f6ef;
  color: var(--ok);
  border: 1px solid #b9e0cb;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 0.75rem 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
}
.stat strong {
  display: block;
  font-size: 1.4rem;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--muted); font-weight: 700; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #eee;
}
.badge.created { background: #eee; color: #444; }
.badge.invited { background: #fff3d6; color: var(--warn); }
.badge.opened { background: #e7eefc; color: #244a8f; }
.badge.submitted { background: #e8f6ef; color: var(--ok); }
.hidden { display: none !important; }
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.row-actions button, .row-actions a {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}
.hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.82rem;
}
