:root {
  --ink: #20262b;
  --muted: #68727a;
  --line: #e1e5e8;
  --bg: #f4f2ed;
  --surface: #ffffff;
  --green: #1f6b57;
  --dark: #263238;
  --amber: #a76f24;
  --red: #b95845;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1240px;
  background: var(--bg);
  color: var(--ink);
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 24px 18px;
}

.brand {
  padding: 4px 8px 24px;
}

.brand b,
.brand span,
.sidebar button {
  display: block;
}

.brand b {
  font-size: 24px;
}

.brand span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: #435057;
  text-align: left;
  font-weight: 700;
}

.sidebar button.active {
  background: #edf5f1;
  color: var(--green);
}

.admin {
  margin-left: 236px;
  padding: 28px 34px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.topbar p,
.topbar h1 {
  margin: 0;
}

.topbar p {
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.topbar h1 {
  margin-top: 7px;
  font-size: 30px;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stats button,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.stats button {
  padding: 18px;
  text-align: left;
}

.stats span,
.stats em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.stats b {
  display: block;
  margin: 9px 0 7px;
  font-size: 28px;
}

.grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 16px;
}

.views {
  min-height: 520px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  padding: 18px;
}

.panel.wide {
  grid-column: span 1;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head.compact {
  align-items: center;
}

.panel h2,
.panel p {
  margin: 0;
}

.panel h2 {
  font-size: 18px;
}

.panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  color: var(--muted);
  text-align: left;
  font-weight: 700;
}

th,
td {
  border-top: 1px solid #edf0f1;
  padding: 13px 10px;
}

thead th {
  border-top: 0;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.tag.green {
  background: #edf5f1;
  color: var(--green);
}

.tag.amber {
  background: #fff5e6;
  color: var(--amber);
}

.tag.red {
  background: #fff0ed;
  color: var(--red);
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-list button,
.group-card {
  border: 1px solid #edf0f1;
  border-radius: 10px;
  padding: 13px;
  background: #fffdf9;
  text-align: left;
}

.review-list b,
.review-list span,
.review-list em {
  display: block;
}

.review-list b {
  font-size: 15px;
}

.review-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.review-list em {
  margin-top: 8px;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.group-card + .group-card {
  margin-top: 10px;
}

.group-card {
  cursor: pointer;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}

.row span {
  color: var(--green);
}

.bar {
  height: 9px;
  margin-top: 12px;
  border-radius: 999px;
  background: #e4e8e5;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font-weight: 800;
}

.group-admin {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.group-admin article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fffdf9;
}

.group-admin article button {
  margin-top: 14px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline button {
  display: grid;
  grid-template-columns: 160px 1fr 90px;
  gap: 12px;
  align-items: center;
  border-color: #edf0f1;
  background: #fffdf9;
  text-align: left;
}

.timeline b,
.timeline span,
.timeline em {
  display: block;
}

.timeline span {
  color: var(--muted);
}

.timeline em {
  color: var(--red);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.settings {
  max-width: 760px;
}

.settings label {
  display: block;
  margin-top: 14px;
}

.settings label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(32, 38, 43, .34);
}

.modal.show {
  display: flex;
}

.modal-card {
  position: relative;
  width: 520px;
  border-radius: 14px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(32, 38, 43, .2);
}

.modal-card .close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
}

.modal-card p,
.modal-card h2 {
  margin: 0;
}

.modal-card p {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.modal-card h2 {
  margin-top: 7px;
  font-size: 24px;
}

#modalBody {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
}

#modalBody ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  transform: translateY(20px);
  opacity: 0;
  border-radius: 10px;
  padding: 13px 16px;
  background: var(--dark);
  color: #fff;
  font-weight: 800;
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}
