:root {
  --brand: #ff3900;
  --brand-2: #ff5100;
  --navy: #001737;
  --navy-2: #0b3a6f;
  --gold: #f9d298;
  --gold-2: #edae67;
  --bg: #f6f7fb;
  --card: #ffffff;
  --line: #e9ebf2;
  --line-2: #dfe3ee;
  --text: #0e1526;
  --text-2: #4b5568;
  --muted: #8b93a7;
  --ok: #12a150;
  --warn: #b26a00;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: 13px; color: inherit; }
a { color: inherit; text-decoration: none; }

.app { display: flex; min-height: 100%; }

/* ---------- 侧边栏 ---------- */
.side {
  width: 208px;
  flex: 0 0 208px;
  background: var(--navy);
  color: #cfd8e6;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
}

.brand-txt { display: flex; flex-direction: column; line-height: 1.35; }
.brand-txt b { color: #fff; font-size: 13px; font-weight: 500; }
.brand-txt span { color: #7f8ea6; font-size: 11px; }

.nav { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: #b9c4d6;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: var(--navy-2); color: #fff; font-weight: 500; box-shadow: inset 2px 0 0 var(--brand); }
.nav-item em {
  font-style: normal;
  font-size: 10px;
  color: #7f8ea6;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 15px;
}

.side-foot {
  padding: 12px 16px 16px;
  font-size: 11px;
  color: #66748c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.5;
}

.side-foot b { color: #b9c4d6; font-weight: 400; }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 56px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.crumb b { color: var(--text); font-weight: 500; font-size: 14px; }
.crumb .sep { color: #c9cfdd; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  background: #fbfcfe;
}

.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); display: inline-block; }
.chip.warn { border-color: #ffe0bd; background: #fff8ef; color: var(--warn); }
.chip.warn i { background: var(--brand-2); }

.btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.btn:hover { border-color: #c3cadb; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: #f0f2f7; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn.danger { color: #c02626; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.content { padding: 20px 24px 40px; max-width: 1240px; width: 100%; }

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff8ef;
  border: 1px solid #ffe0bd;
  color: #8a4d00;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.6;
}

.banner b { color: #6b3a00; font-weight: 500; }
.banner .tag {
  flex: 0 0 auto;
  font-size: 10px;
  border: 1px solid #f3c98f;
  background: #fff;
  border-radius: 4px;
  padding: 0 5px;
  line-height: 16px;
  margin-top: 1px;
}

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.stat span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat b { font-size: 22px; font-weight: 500; letter-spacing: -0.3px; }
.stat b small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; }

/* ---------- 卡片 / 工具条 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.card-head h3 { margin: 0; font-size: 14px; font-weight: 500; }
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.input, .select, .textarea {
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 57, 0, 0.09);
}

.input.search { width: 200px; }
.textarea { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }

.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: #fafbfe;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td { padding: 12px 16px; border-bottom: 1px solid #f1f3f9; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fcfcff; }
.table .num { font-variant-numeric: tabular-nums; }

.ev { display: flex; align-items: center; gap: 10px; }

.ev-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  position: relative;
  overflow: hidden;
}

.ev-mark::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.ev-txt { min-width: 0; }
.ev-txt b { display: block; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ev-txt span { color: var(--muted); font-size: 11px; }

.cell-sub { color: var(--muted); font-size: 11px; }
.price { color: var(--brand); font-weight: 500; font-variant-numeric: tabular-nums; }
.price s { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 4px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status i { width: 5px; height: 5px; border-radius: 50%; }
.status.on { background: #eafaf0; color: #0e8a43; border-color: #c9efd9; }
.status.on i { background: #12a150; }
.status.off { background: #f3f4f8; color: #6b7280; border-color: #e6e8f0; }
.status.off i { background: #9aa2b4; }
.status.draft { background: #fff5e8; color: #a56200; border-color: #ffe2bd; }
.status.draft i { background: #e79a2b; }

.ops { display: flex; gap: 2px; justify-content: flex-end; }

.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text-2); font-weight: 500; margin-bottom: 6px; }

/* ---------- 抽屉 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 33, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 40;
}

.mask.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 880px;
  max-width: 96vw;
  background: var(--card);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: -12px 0 32px rgba(11, 23, 46, 0.12);
}

.drawer.show { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 { margin: 0; font-size: 15px; font-weight: 500; }
.drawer-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 8px; }

.drawer-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.drawer-main { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; }

.drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  background: #fcfcfe;
}

.drawer-foot .hint { font-size: 11px; color: var(--muted); }

/* ---------- 表单 ---------- */
.group { margin-bottom: 22px; }

.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.field label i { color: var(--brand); font-style: normal; margin-left: 2px; }
.field .input, .field .select, .field .textarea { width: 100%; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }

.err { display: none; color: #c02626; font-size: 11px; margin-top: 4px; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: #e88b8b; }
.field.invalid .err { display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}

.chip-check input:checked + span {
  border-color: var(--brand);
  background: #fff2ed;
  color: var(--brand);
}

.swatches { display: flex; gap: 8px; align-items: center; }

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  outline: 1px solid var(--line-2);
  outline-offset: 1px;
}

.swatch.active { border-color: #fff; outline: 2px solid var(--navy-2); }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button {
  border: none;
  background: #fff;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
  border-right: 1px solid var(--line-2);
}
.seg button:last-child { border-right: none; }
.seg button.active { background: var(--navy); color: #fff; }

/* ---------- 票档编辑器 ---------- */
.tiers { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }

/* 区域展示方式：用户可见 / 后台分配 */
.zm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.zm-label { font-size: 12px; color: var(--text-2); }
.zm-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.zm-seg button {
  border: none;
  background: #fff;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
  border-right: 1px solid var(--line-2);
}
.zm-seg button:last-child { border-right: none; }
.zm-seg button.active { background: var(--navy); color: #fff; }
.zm-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
  padding-left: 2px;
}
.zm-hint.on { color: #a6461f; }

.mini-tag {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 57, 0, 0.1);
  color: #c02626;
  font-size: 10px;
  line-height: 1.6;
}

.tier-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 82px 78px 92px 112px 34px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f3f9;
}

.tier-row.head {
  background: #fafbfe;
  padding: 7px 12px;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.tier-row .input { width: 100%; height: 30px; padding: 0 8px; }
.tier-row .cap-hint { font-size: 11px; color: var(--muted); }
.tier-del {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: #b0b7c7;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.tier-del:hover { background: #fdeeee; color: #c02626; }

.tiers-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #fafbfe;
  font-size: 12px;
  color: var(--muted);
}

.tiers-foot b { color: var(--text); font-weight: 500; }

/* ---------- 手机预览 ---------- */
.preview-col { position: sticky; top: 0; }
.preview-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; text-align: center; }

.phone {
  width: 250px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: #f6f7fb;
  padding: 8px;
  overflow: hidden;
}

.phone-screen { border-radius: 16px; overflow: hidden; background: #f6f7fb; }

.p-cover {
  height: 132px;
  position: relative;
  color: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.p-cover .p-mark {
  position: absolute;
  right: 8px;
  bottom: -6px;
  font-size: 62px;
  font-weight: 500;
  opacity: 0.16;
  line-height: 1;
}

.p-tags { display: flex; gap: 5px; flex-wrap: wrap; position: relative; z-index: 1; }
.p-tag {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(2px);
}
.p-heat { font-size: 10px; opacity: 0.86; position: relative; z-index: 1; }

.p-body { padding: 11px 12px 13px; background: #fff; }
.p-title { font-size: 13px; font-weight: 500; line-height: 1.4; height: 36px; overflow: hidden; }
.p-meta { font-size: 10px; color: var(--muted); margin: 6px 0 10px; line-height: 1.6; }
.p-row { display: flex; align-items: flex-end; justify-content: space-between; }
.p-price { color: var(--brand); font-size: 17px; font-weight: 500; }
.p-price small { font-size: 10px; font-weight: 400; }
.p-price em { font-style: normal; font-size: 10px; color: var(--muted); margin-left: 2px; }
.p-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 14px;
}

.p-tiers { margin-top: 10px; border-top: 1px solid #f1f3f9; padding-top: 8px; }
.p-tier { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-2); padding: 3px 0; }
.p-tier b { color: var(--brand); font-weight: 500; }
/* 只卖观赛门票时，预览里就一行，给个区分度 */
.p-tier--single {
  margin-top: 2px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f6f8fd;
  font-size: 10.5px;
  color: var(--text);
}
.p-tier--single span:last-child { color: var(--brand); font-weight: 500; }

/* ---------- 待建模块 ---------- */
.plan { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.plan-card { border: 1px dashed var(--line-2); border-radius: 10px; padding: 14px 16px; background: #fcfcff; }
.plan-card b { display: block; font-weight: 500; margin-bottom: 4px; }
.plan-card p { margin: 0; color: var(--muted); font-size: 12px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: #0e1526;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 90;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .drawer-main { grid-template-columns: 1fr; }
  .preview-col { display: none; }
}

/* ================= 报名管理 ================= */

.col-check { width: 34px; padding-right: 0 !important; }
.col-check input { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; }

.reg-name { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.reg-name .kind {
  font-size: 10px;
  font-weight: 400;
  padding: 0 5px;
  line-height: 15px;
  border-radius: 4px;
  border: 1px solid transparent;
}
.reg-name .kind.team { background: #eef3ff; color: #2b5cb8; border-color: #d6e2fb; }
.reg-name .kind.person { background: #f2f4f8; color: #5b6478; border-color: #e4e8f1; }

.batchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fffaf6;
  border-bottom: 1px solid #ffe6d8;
  font-size: 12px;
  color: #8a4d00;
}

.batchbar b { color: var(--brand); }
.batchbar[hidden] { display: none; }

.side-note { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fbfcff; }
.side-note b { display: block; font-size: 12px; font-weight: 500; margin-bottom: 3px; }
.side-note p { margin: 0 0 12px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.side-note p:last-child { margin-bottom: 0; }

/* ================= 座位分配 ================= */

#seat-head { padding: 0; margin-bottom: 12px; }

.seat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.seat-bar-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.seat-bar-l .lbl { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.seat-bar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 分区对用户隐藏的场次，在座位页顶部提醒一句 */
.seat-note {
  margin: 0 16px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 57, 0, 0.06);
  color: #8c4a2c;
  font-size: 12px;
  line-height: 1.65;
}
.seat-note b { color: #c02626; margin-right: 6px; }

.seat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; align-items: start; }

.seat-side { display: flex; flex-direction: column; overflow: hidden; }

.side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.side-head b { font-size: 13px; font-weight: 500; }
.side-head span { font-size: 11px; color: var(--muted); }

.side-list { max-height: 520px; overflow-y: auto; }

.side-empty { padding: 28px 16px; font-size: 12px; color: var(--muted); line-height: 1.8; text-align: center; }

.reg-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f2f4f9;
  cursor: pointer;
  transition: background 0.12s;
}
.reg-item:hover { background: #fcfcff; }
.reg-item.active { background: #fff5f0; box-shadow: inset 2px 0 0 var(--brand); }

.reg-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.reg-item-top b { font-size: 12px; font-weight: 500; }
.reg-item-top span { font-size: 11px; font-variant-numeric: tabular-nums; }
.reg-item-top .ok { color: var(--ok); }
.reg-item-top .warn { color: #b26a00; }
.reg-item-sub { font-size: 11px; color: var(--muted); margin: 2px 0 6px; }

.bar { height: 3px; border-radius: 2px; background: #eef1f7; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--brand)); }

.side-foot { padding: 10px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); line-height: 1.6; }

.seat-main { padding: 14px 16px 16px; min-width: 0; }

.tier-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

.tier-tab {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.tier-tab em { font-style: normal; font-size: 10px; color: var(--muted); }
.tier-tab.active { border-color: var(--navy-2); background: var(--navy); color: #fff; }
.tier-tab.active em { color: rgba(255, 255, 255, 0.66); }

.legend { display: flex; gap: 16px; font-size: 11px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.lg-free { background: #eef2fa; border: 1px solid #d5dcea; }
.lg-taken { background: #b8c4d8; }
.lg-blocked { background: #d9c39a; }
.lg-mine { background: var(--brand); }

.map-scroll { overflow: auto; max-height: 480px; padding: 4px 2px 8px; }
.seat-map-inner { display: inline-block; min-width: 100%; }

.seat-row { display: flex; align-items: center; gap: 3px; margin-bottom: 3px; }

.row-no {
  width: 26px;
  flex: 0 0 26px;
  text-align: right;
  padding-right: 6px;
  font-size: 10px;
  color: #a9b1c2;
  font-variant-numeric: tabular-nums;
}

.seat {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 3px;
  border: 1px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
}
.seat:hover { transform: scale(1.25); z-index: 2; }

.seat.s-free { background: #e4eaf6; border-color: #d3dbea; }
.seat.s-free:hover { border-color: var(--brand); }
.seat.s-taken { background: #9aa9c2; cursor: pointer; }
.seat.s-blocked { background: #d9c39a; }
.seat.s-mine { background: var(--brand); }

.map-foot { margin-top: 10px; font-size: 11px; color: var(--muted); }

.stat-warn b { color: var(--brand); }

/* ================= 数据导出 ================= */

.note { margin: 0 0 12px; font-size: 12px; color: var(--text-2); line-height: 1.8; }

.counts { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.counts b { color: var(--text); font-weight: 500; }

#export-pre {
  margin: 0;
  background: #0e1526;
  color: #c7d2e5;
  padding: 14px;
  border-radius: 10px;
  overflow: auto;
  max-height: 340px;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .seat-layout { grid-template-columns: 1fr; }
  .side-list { max-height: 260px; }
}

/* ================= 导航分组 ================= */

.nav-group {
  padding: 14px 12px 6px;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.32);
}

.nav { padding-top: 4px; }

.nav-badge {
  margin-left: 6px;
  font-style: normal;
  font-size: 9px;
  line-height: 14px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}

.nav-badge.is-on { background: rgba(18, 163, 124, 0.24); color: #7fe0c4; }

/* ================= 封面画面 ================= */

.cv { position: relative; overflow: hidden; }

.cv::after,
.pat-demo::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pt-grid::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 24px 24px;
}

.pt-diag::after {
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0 6px, transparent 6px 20px);
}

.pt-dots::after {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.34) 1.4px, transparent 2px);
  background-size: 14px 14px;
}

.pt-glow::after {
  background-image: radial-gradient(ellipse at 76% 14%, rgba(255, 255, 255, 0.38), transparent 62%);
}

.pt-wave::after {
  background-image:
    radial-gradient(circle at 18% 118%, rgba(255, 255, 255, 0.2), transparent 46%),
    radial-gradient(circle at 62% 128%, rgba(255, 255, 255, 0.15), transparent 50%),
    radial-gradient(circle at 98% 112%, rgba(255, 255, 255, 0.18), transparent 42%);
}

.pt-rings::after {
  background-image: repeating-radial-gradient(circle at 82% 112%, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 22px);
}

.cover-box { display: flex; gap: 14px; align-items: flex-start; }

.cover-stage {
  width: 148px;
  flex: 0 0 148px;
  display: block;
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #f6f7fb;
}

.cover-stage:hover { border-color: var(--brand); }
.cover-stage:hover .cover-size { color: var(--brand); }

/* 原生 file 控件：留在 DOM 里由 label 触发，视觉上藏起来 */
.cv-file {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

label.cv-pick { cursor: pointer; }

.cover-box.drop-on .cover-stage {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 57, 0, 0.14);
}

.cover-box.drop-on .cover-size { color: var(--brand); }

.cv-thumb {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-mark {
  color: rgba(255, 255, 255, 0.9);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.cover-size {
  display: block;
  padding: 4px 8px;
  font-size: 10px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cover-side { flex: 1; min-width: 0; }
.cover-actions { display: flex; gap: 6px; margin-bottom: 8px; }
.cover-actions .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.cover-hint { font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: 6px; }

.pats { display: flex; gap: 6px; flex-wrap: wrap; }

.pat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  color: var(--text-2);
  line-height: 1;
}

.pat:hover { border-color: #b9c2d4; }
.pat.active { border-color: var(--navy-2); box-shadow: 0 0 0 1px var(--navy-2) inset; color: var(--navy-2); }

.pat-demo {
  width: 38px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2f5f9e, #12305c);
  position: relative;
  overflow: hidden;
  display: block;
}

/* 手机预览里的封面：有图时压一层遮罩，跟小程序 index 轮播同一套参数，
   否则预览里文字看着还行、到真机上就糊了 */
.p-cover.has-img::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image:
    linear-gradient(100deg, rgba(2, 10, 24, 0.7) 0%, rgba(2, 10, 24, 0.42) 46%, rgba(2, 10, 24, 0.1) 78%, rgba(2, 10, 24, 0.26) 100%),
    linear-gradient(180deg, rgba(2, 10, 24, 0.22) 0%, rgba(2, 10, 24, 0) 36%, rgba(2, 10, 24, 0.34) 100%);
}
.p-cover.has-img .p-tag { background: rgba(3, 12, 26, 0.5); }

.p-cover .p-tags,
.p-cover .p-heat { position: relative; z-index: 2; }

/* ================= 资讯 / 商城 ================= */

.ev-mark { position: relative; overflow: hidden; }
.ev-mark.has-img { color: transparent; }

.pin {
  display: inline-block;
  margin-right: 5px;
  padding: 0 4px;
  font-size: 9px;
  line-height: 14px;
  border-radius: 3px;
  background: #fff2ed;
  color: var(--brand);
  vertical-align: 1px;
}

.cell-sub.warn { color: #b26a00; }
.cell-sub.del { text-decoration: line-through; }

.switch-line { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); padding: 7px 0; }
.switch-line input { width: 14px; height: 14px; accent-color: var(--brand); }
.switch-line span { font-size: 12px; }

/* 资讯 / 商品手机预览 */
.n-cover,
.m-cover {
  height: 118px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.n-cover .n-mark,
.m-cover .n-mark {
  font-size: 30px;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.n-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.n-title { font-size: 12px; font-weight: 500; line-height: 1.45; }
.n-sum { font-size: 10px; color: var(--text-2); line-height: 1.6; margin-top: 6px; }
.n-body { margin-top: 8px; border-top: 1px solid #f1f3f9; padding-top: 7px; }
.n-body p { margin: 0 0 5px; font-size: 9px; line-height: 1.7; color: #5b6478; }
.n-body p.dim { color: #b0b7c7; }

.m-price { color: var(--brand); font-size: 18px; font-weight: 500; }
.m-price em { font-style: normal; font-size: 10px; color: var(--muted); text-decoration: line-through; margin-left: 5px; }

.m-specs { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.m-specs span {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
}

/* ================= 社区开关 ================= */

.ch-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 14px;
}

.ch-state.is-off { background: #fbfbfd; border-style: dashed; }

.ch-dot { width: 10px; height: 10px; border-radius: 50%; background: #c8cedb; flex: 0 0 10px; }
.ch-state.is-on .ch-dot { background: #12a37c; box-shadow: 0 0 0 4px rgba(18, 163, 124, 0.14); }

.ch-txt { flex: 1; min-width: 0; }
.ch-txt b { font-size: 14px; font-weight: 500; }
.ch-txt p { margin: 5px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }

.ch-switch { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }

.card.flat { box-shadow: none; }
.card-body { padding: 14px 16px; }

.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-table td { padding: 7px 0; border-bottom: 1px solid #f2f4f9; color: var(--text-2); }
.mini-table td:last-child { text-align: right; color: var(--text); }
.mini-table tr:last-child td { border-bottom: none; }
.mini-table .off { color: var(--brand); }

pre.code {
  margin: 0;
  background: #0e1526;
  color: #c7d2e5;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.75;
  overflow: auto;
}

.steps { display: flex; gap: 10px; margin-top: 14px; }
.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  color: var(--text-2);
}
.step b {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1080px) {
  .two-col { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
}

/* ================= 订单管理 ================= */

.ord-tip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  line-height: 1.8;
  color: #6b3a00;
  background: #fffaf1;
  border: 1px solid #ffe6c2;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.ord-tip b { font-weight: 500; }
.ord-tip code { background: rgba(120, 78, 24, 0.09); padding: 1px 5px; border-radius: 4px; }

/* 列较多，窄屏时允许横向滚动，避免金额/操作列被卡片裁掉 */
#ord-table { overflow-x: auto; }
#ord-table .table { min-width: 840px; }

.stat em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.ord-no { font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.2px; }
.ord-no-lg { font-size: 13px; font-weight: 500; margin-left: 4px; font-variant-numeric: tabular-nums; }

.kind {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  padding: 0 5px;
  line-height: 15px;
  border-radius: 4px;
  border: 1px solid transparent;
  margin-right: 4px;
  vertical-align: 1px;
}
.kind.goods { background: #fff2ed; color: #c2410c; border-color: #ffd9c7; }
.kind.ticket { background: #eef3ff; color: #2b5cb8; border-color: #d6e2fb; }

.status.info { background: #eef3ff; color: #2b5cb8; border-color: #d6e2fb; }
.status.info i { background: #3b6fd4; }
.status.ship { background: #e9f6fb; color: #0b6b8a; border-color: #c9e8f3; }
.status.ship i { background: #1189ad; }
.status.danger { background: #fdeeee; color: #b3261e; border-color: #f8d2d0; }
.status.danger i { background: #d93b32; }

.ord-items { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }

.ord-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 88px 82px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f3f9;
}
.ord-item:last-child { border-bottom: none; }
.ord-item-txt { min-width: 0; }
.ord-item-txt b { display: block; font-weight: 500; font-size: 13px; line-height: 1.4; }
.ord-item-txt span { font-size: 11px; color: var(--muted); }
.ord-item-num { font-size: 11px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.ord-item-sum { text-align: right; font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; }

.ord-amount {
  margin-top: 10px;
  background: #fafbfe;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}
.ord-amount div { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); padding: 3px 0; }
.ord-amount b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.ord-amount .total { border-top: 1px dashed var(--line-2); margin-top: 5px; padding-top: 7px; font-size: 13px; }
.ord-amount .total b { color: var(--brand); font-size: 16px; }

.ord-tl-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  padding: 5px 0;
}
.ord-tl-row i { width: 7px; height: 7px; border-radius: 50%; background: #dfe3ec; margin-left: 2px; }
.ord-tl-row.on { color: var(--text-2); }
.ord-tl-row.on i { background: var(--brand); }
.ord-tl-row b { font-weight: 400; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.ord-side { display: flex; flex-direction: column; gap: 12px; align-self: start; }

.ord-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.ord-block-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 4px 0; align-items: flex-start; }
.kv span { color: var(--muted); flex: 0 0 auto; }
.kv b { font-weight: 400; text-align: right; word-break: break-all; max-width: 68%; line-height: 1.6; }

.kv code, .ord-copy code {
  font-size: 11px;
  background: #f4f6fb;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ord-ship { display: flex; flex-direction: column; gap: 8px; }
.ord-ship .select, .ord-ship .input { width: 100%; }
.ord-ship-ops { display: flex; gap: 8px; }

.ord-empty { font-size: 11px; color: var(--muted); line-height: 1.7; }
.ord-copy { margin-bottom: 6px; }

/* ================= 小屏适配（手机浏览器） ================= */

@media (max-width: 860px) {
  .app { flex-direction: column; }

  /* 侧栏改为顶部横向导航，不再吃掉正文宽度 */
  .side {
    width: 100%;
    flex: none;
    height: auto;
    position: static;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .brand { padding: 10px 12px; }
  .brand-txt span { display: none; }
  .side-foot { display: none; }

  .nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-group { display: none; }
  .nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 12px;
  }
  .nav-item.active { box-shadow: none; }
  .nav-badge { display: none; }

  .topbar { position: static; height: auto; padding: 10px 12px; }
  .crumb { flex-wrap: wrap; }
  .crumb .sep,
  #crumb-sub { display: none; }
  .topbar-right { display: none; }

  .content { padding: 12px 12px 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .banner { font-size: 12px; }

  /* 宽表改为横向滚动，不用挤压列宽 */
  .card { overflow-x: auto; }
  .table { min-width: 640px; }

  /* 抽屉占满屏，内部两栏改单栏 */
  .drawer { width: 100%; max-width: 100vw; }
  .drawer-head,
  .drawer-body,
  .drawer-foot { padding-left: 14px; padding-right: 14px; }
  .drawer-main { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ord-side { align-self: stretch; }
  .ord-item { grid-template-columns: 34px minmax(0, 1fr) 64px; row-gap: 2px; }
  .ord-item-sum { grid-column: 3; }
}

@media (max-width: 860px) {
  /* 单元格不换行，避免窄列把文字压成竖排；宽度交给横向滚动 */
  .table th,
  .table td { white-space: nowrap; }
  .table td .cell-sub,
  .table td .cell-main { white-space: normal; }
  .card { -webkit-overflow-scrolling: touch; }
}

.tbl-hint {
  display: none;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  background: #f7f9fd;
  border-bottom: 1px solid var(--line);
  padding: 6px 12px;
  text-align: right;
}

@media (max-width: 860px) {
  .table th,
  .table td { padding: 10px 12px; font-size: 12px; }
  .tbl-hint { display: block; }
}

@media (max-width: 860px) {
  /* 座位页：左右两栏改单栏，座位图优先 */
  .seat-layout { grid-template-columns: minmax(0, 1fr); }
  .seat-main { order: 1; }
  .seat-side { order: 2; }

  .seat-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .seat-bar-l { width: 100%; }
  .seat-bar-l .select { flex: 1 1 auto; min-width: 0; max-width: none !important; }
  .seat-bar-r { width: 100%; }

  .side-head { padding: 10px 12px; }
}

@media (max-width: 860px) {
  .drawer-foot { justify-content: flex-end; }
  .drawer-foot .hint { display: none; }
  .drawer-foot .btn { flex: 1 1 auto; justify-content: center; }
}

/* ================= 云服务状态 ================= */

.chip.ok { border-color: #bfe6d8; background: #eefaf5; color: #0f7a5c; }
.chip.ok i { background: #12a37c; }

.banner.ok { background: #f1faf6; border-color: #c9e9dd; color: #14614a; }
.banner.ok b { color: #0d5340; font-weight: 500; }
.banner.ok .tag { background: rgba(18, 163, 124, 0.12); color: #0f7a5c; }
.banner.ok code { background: rgba(20, 97, 74, 0.08); }

#cloud-sync { flex: 0 0 auto; }

/* ---------- 登录遮罩 ---------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 18%, #0b3a6f 0%, #001737 72%);
}

.gate.show { display: flex; }

.gate-card {
  width: 100%;
  max-width: 340px;
  background: var(--card);
  border-radius: 16px;
  padding: 32px 26px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.gate-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-card h1 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.gate-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 20px; }

#gate-form { display: flex; flex-direction: column; gap: 10px; }

#gate-pass {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fbfcfe;
  outline: none;
  letter-spacing: 0.1em;
}

#gate-pass:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 57, 0, 0.1);
}

#gate-submit {
  height: 42px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

#gate-submit:hover { background: var(--brand-2); }
#gate-submit:disabled { opacity: 0.7; cursor: default; }

.gate-err { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: #d92b2b; }
.gate-foot { margin-top: 4px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.side-logout {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.side-logout:hover { color: #fff; }

/* ---------- 座位图形状编辑器 ---------- */
.le-mask {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 18, 34, 0.46);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.le-panel {
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(10, 18, 34, 0.28);
  overflow: hidden;
}

.le-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.le-head b { font-size: 14px; font-weight: 500; }
.le-head span { margin-left: 8px; font-size: 12px; color: var(--muted); }

.le-x {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #9aa3b5;
  font-size: 18px;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
}
.le-x:hover { background: #f2f4f9; color: var(--text); }

.le-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 18px 8px;
}

.le-group { display: inline-flex; align-items: center; gap: 6px; }
.le-group--end { margin-left: auto; gap: 8px; }
.le-lbl { font-size: 12px; color: var(--muted); }

.le-num {
  width: 56px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text);
  outline: none;
}
.le-num:focus { border-color: var(--navy-2); }

.le-sel {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-2);
  background: #fff;
  outline: none;
}

.le-tip { padding: 0 18px 8px; font-size: 11px; color: var(--muted); line-height: 1.6; }

.le-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 18px 12px;
}

.le-stage canvas { display: block; margin: 0 auto; cursor: crosshair; user-select: none; }

.le-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fafbfe;
}

.le-stat { font-size: 12px; color: var(--text-2); }
.le-stat b { font-size: 15px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.le-warn { color: #c02626; margin-left: 6px; }
.le-actions { display: flex; gap: 8px; }

/* 票档行里的「座位图」入口 */
.tier-row { grid-template-columns: minmax(0, 1.5fr) 82px 76px 158px 34px; }

.map-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  padding: 4px 9px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.35;
  transition: border-color 0.15s, background 0.15s;
}
.map-btn:hover { border-color: var(--navy-2); background: #f7f9ff; }
.map-btn b { font-size: 12px; font-weight: 500; color: var(--text); }
.map-btn em { font-style: normal; font-size: 10px; color: var(--muted); }
.map-btn.has-map { border-style: solid; border-color: #d6deee; }
.map-btn.irregular b::after {
  content: '异形';
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(31, 79, 216, 0.1);
  color: #1f4fd8;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
}

/* 座位图里没有座位的格子：占位留白，保证上下排对齐 */
.seat-gap {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
}

/* 表单里的补充说明（须知类目写法等） */
.fhint {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.65;
  color: #8b93a7;
}

/* 购票须知：按类目一栏，和详情页 4×2 卡片对应 */
.nc-field > label { display: block; }
.nc-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.nc-item {
  border: 1px solid var(--line, #e6e9f0);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 8px 10px 10px;
}
.nc-item.wide { grid-column: 1 / -1; }
.nc-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.nc-h b { font-size: 12px; font-weight: 500; color: var(--text); }
.nc-off {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #8b93a7;
  cursor: pointer;
  user-select: none;
}
.nc-off input { margin: 0; }
.nc-ta {
  width: 100%;
  min-height: 96px;
  font-size: 12px;
  line-height: 1.6;
  background: #fff;
}
.nc-ta:disabled { background: #f4f5f8; color: #a8afbd; opacity: .6; }
.nc-cnt { margin-top: 4px; font-size: 10px; color: #a8afbd; text-align: right; }
.nc-item.is-off { background: #f7f8fa; }
.nc-item.is-off .nc-h b { color: #a8afbd; }
.nc-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: #8b93a7;
}

/* ================= 免责声明 ================= */

.dsc-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.dsc-switch input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.dsc-switch-t { font-weight: 500; }
.dsc-switch-state { margin-left: auto; font-size: 11px; color: var(--muted); }
.dsc-switch input:checked ~ .dsc-switch-state { color: var(--brand); }

.dsc-hint { margin: 8px 0 10px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.dsc-hint.on { color: #a6461f; }

.dsc-text { border-top: 1px dashed var(--line); padding-top: 12px; }
.dsc-text-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* 预览里的一行提示 */
.p-dsc {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff2ed;
  color: #c2410c;
  font-size: 10px;
}

.mini-tag.dsc { background: #fff2ed; color: #c2410c; }

/* 签名缩略图与大图 */
.dsc-thumb {
  width: 104px;
  height: 46px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: zoom-in;
}

.dsc-shot {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 15, 30, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dsc-shot-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  max-width: min(720px, 92vw);
  max-height: 88vh;
  overflow: auto;
}
.dsc-shot-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.dsc-shot-head b { font-size: 14px; }
.dsc-shot-head span { color: var(--muted); flex: 1; }
.dsc-shot-card img {
  display: block;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* 导出预览：A4 单据按页竖排，先看再存 */
.dsc-doc {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(9, 15, 30, 0.66);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dsc-doc-card {
  background: #fff;
  border-radius: 12px;
  width: min(760px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dsc-doc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.dsc-doc-head b { font-size: 14px; }
.dsc-doc-head span { color: var(--muted); flex: 1; }
.dsc-doc-body {
  padding: 16px;
  overflow: auto;
  background: #f3f4f7;
}
.dsc-doc-body img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 4px;
  margin: 0 auto 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.14);
}
.dsc-doc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.dsc-doc-tip { flex: 1; font-size: 11px; color: var(--muted); line-height: 1.6; }

/* 免责声明导出：范围提示与「未绑定持票人」标记 */
.dsc-scope {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.dsc-scope.warn { color: #b45309; }
.mini-tag.warn { background: #fef2f2; color: #b42318; }
.mono { font-family: "Menlo", "Consolas", monospace; font-size: 12px; letter-spacing: 0.2px; }

/* 签名文字核验：一致/人工通过用绿色，未核验/待复核/作废用红色 */
.mini-tag.ok { background: #eafaf0; color: #0e8a43; }
.mini-tag.muted { background: #f3f4f8; color: #6b7280; }
/* 复核按钮多了，操作列允许换行，别把表格挤出屏幕 */
.ops { flex-wrap: wrap; row-gap: 2px; }
.btn.sm[disabled] { opacity: .45; cursor: not-allowed; }
/* 签名文字列把表格撑宽：给个下限 + 横向滚动，别把姓名/时间挤成竖排 */
.dsc-table table { min-width: 1240px; }
.dsc-table td, .dsc-table th { white-space: nowrap; }
.dsc-table .cell-sub { max-width: 260px; white-space: normal; line-height: 1.5; }
.dsc-table td { vertical-align: top; }
/* 表格横向滚动时操作列固定在右侧：作废/删除永远点得到 */
.dsc-table th:last-child,
.dsc-table td:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -10px 0 10px -10px rgba(15, 23, 42, .18);
}
.dsc-table th:last-child, .dsc-table td:last-child { min-width: 208px; }
.dsc-table .ops { justify-content: flex-end; }

/* ================= 参赛签名台账 ================= */

/* 只看某一队时的过滤条：从报名行进来看签名，别让人忘了当前范围 */
.su-led-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-bottom: 1px dashed var(--line);
  background: #fbfcff;
}

/* 七列 + 签名缩略图，窄屏横向滚动，别把队员姓名挤成竖排 */
#su-led-table { overflow-x: auto; }
#su-led-table table { min-width: 1000px; }
#su-led-table td, #su-led-table th { white-space: nowrap; vertical-align: top; }
#su-led-table .cell-sub { max-width: 200px; white-space: normal; line-height: 1.5; }
#su-led-table .ops { justify-content: flex-end; }

/* 报名列表里的签署进度列 */
#su-sign-table .mini-tag { white-space: nowrap; }

/* 参赛形式：最少人数 ~ 最多人数，两个窄输入夹一个「至」 */
.range-2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.range-2 .input {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.range-t {
  flex-shrink: 0;
  font-size: 12px;
  color: #98a1b3;
}
