:root {
  --green: #2c6e49;
  --green-dark: #1b4332;
  --green-soft: #d8f3dc;
  --leaf: #52b788;
  --bg: #f7faf7;
  --card: #ffffff;
  --text: #1b2a1f;
  --muted: #5c6b60;
  --line: #dce8df;
  --gold: #c9a84c;
  --danger: #b23a3a;
  --shadow: 0 10px 30px rgba(27, 67, 50, 0.08);
  --radius: 16px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top right, #e9f7ef 0%, transparent 40%),
    radial-gradient(circle at bottom left, #f3efe4 0%, transparent 35%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--green); }
.wrap { width: min(920px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.admin-wrap { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0 3rem; }

.hero { text-align: center; margin-bottom: 1.4rem; }
.hero .badge {
  display: inline-block; background: var(--green-soft); color: var(--green-dark);
  padding: 0.35rem 0.9rem; border-radius: 999px; font-size: 0.9rem; margin-bottom: 0.7rem;
}
.hero h1 { margin: 0 0 0.5rem; font-size: clamp(1.55rem, 4vw, 2.15rem); color: var(--green-dark); }
.hero p { margin: 0.25rem 0; color: var(--muted); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.35rem 1.45rem 1.5rem; margin-bottom: 1rem;
}
.card h2 {
  margin: 0 0 1rem; font-size: 1.15rem; color: var(--green-dark);
  display: flex; align-items: center; gap: 0.5rem;
}
.card h2::before {
  content: ""; width: 8px; height: 1.1em; border-radius: 4px;
  background: linear-gradient(180deg, var(--leaf), var(--green));
}

.field { margin-bottom: 1.1rem; }
label.q { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.hint { font-size: 0.88rem; color: var(--muted); font-weight: 400; }

.opts { display: grid; gap: 0.42rem; }
.opts.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.opt {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.62rem 0.8rem;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfefb; cursor: pointer;
}
.opt:hover { border-color: var(--leaf); background: #f2faf4; }
.opt:has(input:checked) {
  border-color: var(--green); background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--green);
}
.opt input { accent-color: var(--green); width: 1.05rem; height: 1.05rem; }
.opt span { flex: 1; }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.7rem 0.85rem; font: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(44, 110, 73, 0.25); border-color: var(--green);
}
textarea { min-height: 100px; resize: vertical; }

.row-2, .row-3 {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.priority-box {
  background: #f8fbf8; border: 1px dashed var(--line); border-radius: 12px; padding: 0.8rem;
}
.priority-box label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.3rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 1.1rem; }
button, .btn {
  appearance: none; border: none; border-radius: 999px; padding: 0.85rem 1.45rem;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff;
  box-shadow: 0 8px 18px rgba(27, 67, 50, 0.22);
}
.btn-secondary { background: #fff; color: var(--green-dark); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: #fff; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.toast {
  display: none; margin: 1rem auto 0; width: min(920px, calc(100% - 2rem));
  padding: 0.9rem 1rem; border-radius: 12px; background: var(--green-soft);
  color: var(--green-dark); border: 1px solid var(--leaf);
}
.toast.error { background: #fde8e8; color: var(--danger); border-color: #f0b4b4; }
.toast.show { display: block; }
.footer-note { text-align: center; color: var(--muted); font-size: 0.92rem; margin-top: 1.4rem; }

.admin-top {
  display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem; margin-bottom: 1rem;
}
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem; text-align: center; box-shadow: var(--shadow);
}
.stat .n { font-size: 1.75rem; font-weight: 800; color: var(--green-dark); }
.stat .l { color: var(--muted); font-size: 0.9rem; }

.bar-row {
  display: grid; grid-template-columns: minmax(110px, 210px) 1fr 40px;
  gap: 0.55rem; align-items: center; margin-bottom: 0.42rem;
}
.bar-track { height: 12px; background: #eef5ef; border-radius: 999px; overflow: hidden; }
.bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--leaf), var(--green)); border-radius: 999px;
}
.bar-count { font-weight: 700; color: var(--green-dark); text-align: right; }

.filters { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 0.85rem; }
.filters select, .filters input { width: auto; min-width: 150px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td {
  border-bottom: 1px solid var(--line); padding: 0.65rem 0.5rem; text-align: left; vertical-align: top;
}
th { background: #f3faf5; color: var(--green-dark); position: sticky; top: 0; }
tr:hover td { background: #fafdfb; }
.tags { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.tag {
  background: var(--green-soft); color: var(--green-dark); border-radius: 999px;
  padding: 0.12rem 0.5rem; font-size: 0.78rem;
}
.tag.pri { background: #fff4d6; color: #8a6a12; }
.person-name { font-weight: 700; color: var(--green-dark); }
.small { font-size: 0.84rem; color: var(--muted); }
.login-box { max-width: 420px; margin: 3.5rem auto; }
.hidden { display: none !important; }
.course-people { margin-top: 0.35rem; font-size: 0.88rem; color: var(--muted); }

@media (max-width: 640px) {
  .bar-row { grid-template-columns: 1fr; gap: 0.15rem; }
}
