:root {
  --paper: #fffdf8;
  --ink: #25312b;
  --muted: #6b756f;
  --line: #e7dfcf;
  --brand: #0b6f45;
  --brand-strong: #075334;
  --accent: #b7822b;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4efe4;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page {
  width: min(720px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  padding: 18px 16px 36px;
}

.admin-page {
  width: min(1180px, 100%);
  padding: 24px 18px 48px;
}

.title {
  margin: 8px 0 18px;
  text-align: center;
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: 0;
}

.hero-image {
  width: 100%;
  display: block;
  margin: 0 0 14px;
  border-radius: 6px;
}

.notice {
  margin: 20px 0 16px;
  padding: 14px 16px;
  border-left: 5px solid var(--brand);
  background: #f7f3e8;
  color: #35443b;
  line-height: 1.7;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 111, 69, 0.13);
}

.button {
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-strong);
}

.button.secondary {
  background: #2d3b34;
}

.button.danger {
  background: #a23b2f;
}

.button.slim {
  padding: 8px 10px;
  font-size: 14px;
}

.button.full {
  width: 100%;
}

.session-info,
.card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.session-info h3,
.card h2,
.card h3 {
  margin: 0 0 12px;
}

.session-info p,
.card p {
  margin: 6px 0;
  line-height: 1.7;
}

.map-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.map-actions a {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  border-radius: 5px;
  padding: 8px 12px;
  background: var(--brand);
}

.map-actions a:last-child {
  background: #236db2;
}

.message {
  display: none;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: #e8f4ec;
  color: #175d39;
}

.message.error {
  background: #fae8e6;
  color: #8f2f25;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  cursor: pointer;
}

.tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

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

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8ef;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.metric strong {
  display: block;
  font-size: 26px;
  color: var(--brand);
}

.stat-table-wrap {
  margin-bottom: 20px;
}

.password-form {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.upload-line {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.upload-line input[type="file"] {
  max-width: 280px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f7f3e8;
}

.session-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}

.hidden {
  display: none;
}

.site-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 860px) {
  .admin-grid,
  .stats-grid,
  .row {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
