:root{--gold:#b08d55;--red:#8f2d3b;--green:#3f7d5c;--gray:#8d857d;--ink:#332b26;--ink-soft:#77695e;--shadow:0 12px 40px rgba(70,48,30,.12)}
/* ---------- 后台 ---------- */
.admin { min-height: 100vh; background: #f7f8fa; }
.admin-top {
  background: #fff;
  border-bottom: 1px solid #e8ebef;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.admin-brand { font-weight: 700; font-size: 17px; letter-spacing: 1px; }
.admin-brand span { color: var(--gold); }
.admin-main { max-width: 1080px; margin: 0 auto; padding: 20px 14px 60px; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 36px 26px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card p { color: var(--ink-soft); font-size: 13px; margin: 0 0 24px; }

.label { display: block; font-size: 13px; color: var(--ink-soft); margin: 0 0 6px; }
.input, .select, .textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,141,85,.12); }
.textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 2px; }
.tab { white-space: nowrap; border: 0; background: transparent; padding: 9px 15px; border-radius: 9px; color: var(--ink-soft); font-size: 14px; }
.tab.active { background: var(--red); color: #fff; font-weight: 600; }
.panel { background: #fff; border: 1px solid #e8ebef; border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.panel h2 { font-size: 16px; margin: 0 0 16px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.panel-title h2 { margin: 0; }
.muted { color: var(--ink-soft); font-size: 13px; }
.stat-card { background: #fff; border: 1px solid #e8ebef; border-radius: 14px; padding: 18px; }
.stat-label { font-size: 13px; color: var(--ink-soft); }
.stat-value { font-size: 30px; font-weight: 700; margin-top: 8px; line-height: 1.1; }
.stat-value.red { color: var(--red); }
.stat-value.green { color: var(--green); }
.stat-value.gray { color: var(--gray); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; flex: 1; min-width: 180px; }
.toolbar .select { width: auto; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 10px; text-align: left; border-bottom: 1px solid #eef0f3; white-space: nowrap; }
th { color: var(--ink-soft); font-weight: 600; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; }
.pill.pending { background: #f2f3f5; color: #777; }
.pill.attending { background: #e7f4ec; color: var(--green); }
.pill.declined { background: #f6eaea; color: var(--red); }
.row-actions { display: flex; gap: 6px; }
.empty { padding: 40px 10px; text-align: center; color: var(--ink-soft); font-size: 14px; }

.modal-mask { position: fixed; inset: 0; background: rgba(20,16,12,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: #fff; width: 100%; max-width: 480px; border-radius: 16px; padding: 24px; max-height: 88vh; overflow-y: auto; }
.modal h3 { margin: 0 0 18px; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.link-box { display: flex; gap: 8px; margin-top: 8px; }
.link-box .input { font-size: 12px; color: var(--ink-soft); }

.notice { padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.notice.ok { background: #eaf6ee; color: #2f6a4a; }
.notice.err { background: #fbecee; color: #8f2d3b; }
.notice.info { background: #f3f5f8; color: #555; }
.err-list { margin: 8px 0 0; padding-left: 18px; max-height: 220px; overflow-y: auto; }
.drop { border: 2px dashed #dfe3e8; border-radius: 12px; padding: 28px; text-align: center; color: var(--ink-soft); background: #fafbfc; }

@media (max-width: 640px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .admin-main { padding: 14px 10px 50px; }
  .panel { padding: 16px; }
  .invite-name { font-size: 33px; }
  .stat-value { font-size: 25px; }
}
