:root {
  --bg: #f3efe9;
  --bg-soft: #ece6df;
  --card: #fffcf8;
  --primary: #6f8376;
  --primary-strong: #5a6f63;
  --accent: #b9977b;
  --accent-soft: #d3bca7;
  --rose: #c8a9a5;
  --ink: #3f3a36;
  --muted: #786f68;
  --line: #ddd2c8;
  --ok: #6c8f79;
  --warn: #bf8a5f;
  --danger: #b2655f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, #fbf7f2 0%, #f3efe9 48%),
    linear-gradient(180deg, #f4f0ea 0%, #eee7dd 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 252, 248, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  color: var(--primary-strong);
  letter-spacing: 0.6px;
}

.slogan {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.fun-line {
  margin: 5px 0 0;
  color: #8d6455;
  font-size: 13px;
  font-weight: 600;
}

.layout {
  display: flex;
  min-height: calc(100vh - 74px);
}

.menu {
  width: 236px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #f2ece4 0%, #ede6dd 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  border: 1px solid transparent;
  background: #fffaf4;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s ease;
}

.menu-item:hover {
  border-color: var(--accent-soft);
  transform: translateX(2px);
}

.menu-item.active {
  background: linear-gradient(135deg, var(--primary), #82988a);
  color: #fff;
}

.mi {
  display: inline-block;
  width: 20px;
}

.content {
  flex: 1;
  padding: 16px;
}

.page { display: none; }
.page.active { display: block; }

h2 {
  margin: 4px 0 12px;
  color: var(--primary-strong);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 5px 16px rgba(89, 77, 66, 0.08);
}

.card-title {
  font-weight: 600;
  margin-bottom: 8px;
}
.fun-pill {
  display: inline-block;
  background: #efe1d5;
  border: 1px solid #dbc8b8;
  border-radius: 999px;
  padding: 4px 10px;
  margin-right: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  background: #fffdfa;
  box-shadow: 0 3px 10px rgba(89, 77, 66, 0.06);
}

.table th, .table td {
  border-bottom: 1px solid #efe4d8;
  padding: 10px;
  font-size: 14px;
}

.table th {
  background: #f4ede5;
  color: #675e57;
}

.tag {
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  color: #fff;
  display: inline-block;
}

.pending { background: #8b8f95; }
.submitted { background: #7f9a8a; }
.reviewed { background: #8a7ca1; }
.revise { background: #b58a62; }
.passed { background: #6e947a; }

.overdue {
  color: var(--danger);
  font-weight: 700;
}
.icon-overdue { font-size: 18px; }

.row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.input {
  width: 100%;
  border: 1px solid #d8ccc0;
  border-radius: 10px;
  padding: 9px 10px;
  background: #fffdfa;
  color: var(--ink);
  margin-bottom: 8px;
}

.btn {
  border: 1px solid #d8ccc0;
  border-radius: 10px;
  padding: 9px 14px;
  background: #fffdf9;
  color: var(--ink);
  cursor: pointer;
}

.btn:hover { filter: brightness(0.98); }

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

.btn-warning {
  background: var(--warn);
  color: #fff;
  border-color: var(--warn);
}

.guide {
  white-space: pre-wrap;
  line-height: 1.66;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.person-chip {
  border: 1px solid #d9cec3;
  background: #fffaf4;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.person-chip.active {
  background: #e9f0ea;
  border-color: #9daf9f;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .menu {
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
  }
  .grid2 { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}
