:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #E8611A;
  --brand-dark: #c4501a;
  --brand-orange: #E8611A;
  --brand-orange-dark: #c4501a;
  --ok: #047857;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
.wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }
.narrow { max-width: 640px; }
.topbar {
  background: linear-gradient(135deg, #E8611A, #f97c3c);
  color: #fff;
  padding: 26px 16px;
  border-radius: 0 0 18px 18px;
  box-shadow: var(--shadow);
}
.topbar { text-align: center; }
.topbar h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.topbar h1 .event-name, .topbar h1 .admin-label { display: block; }
.topbar h1 .admin-label { margin-top: 3px; font-size: 18px; font-weight: 700; letter-spacing: 2px; opacity: .96; }
.topbar p { margin: 8px 0 0; opacity: .92; font-size: 14px; }
.topbar .event-time { margin: 10px 0 0; font-size: 17px; font-weight: 600; letter-spacing: .3px; }
.topbar .event-place { margin: 5px 0 0; font-size: 14px; font-weight: 600; }
.topbar .event-address { margin: 3px 0 0; font-size: 13px; opacity: .82; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 14px; font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid.one { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
/* 展位需求：长文案自动换行，避免原生下拉框溢出屏幕 */
.booth-options { display: flex; flex-direction: column; gap: 10px; }
.booth-option {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 9px;
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 400;
  transition: border-color .15s, background .15s;
}
.booth-option:hover { border-color: var(--brand); }
.booth-option.selected { border-color: var(--brand); background: rgba(232,97,26,.06); }
.booth-option input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
  opacity: 0; pointer-events: none;
}
.booth-radio {
  flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px;
  border: 2px solid #b8bec8; border-radius: 50%; position: relative;
}
.booth-option.selected .booth-radio { border-color: var(--brand); }
.booth-option.selected .booth-radio::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand);
}
.booth-option input:focus-visible + .booth-radio { outline: 2px solid rgba(232,97,26,.3); outline-offset: 2px; }
.booth-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.booth-title { font-weight: 600; color: var(--text); }
.booth-desc { font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.booth-desc .price { color: #d93025; font-weight: 700; }
/* 自定义下拉：弹层与输入框左右严格对齐，不越出左侧竖线 */
.select-wrap { position: relative; }
.select-trigger {
  width: 100%; padding: 11px 12px; border: 1px solid #d1d5db; border-radius: 9px;
  background: #fff; color: var(--text); font-size: 15px; font-weight: 400; font-family: inherit;
  display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer;
}
.select-trigger:focus { outline: 2px solid rgba(232,97,26,.25); border-color: var(--brand); }
.select-value.placeholder { color: #9ca3af; }
.select-arrow { font-size: 12px; color: #6b7280; }
.select-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  border: 1px solid #d1d5db; border-radius: 9px; background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.12); z-index: 60;
  max-height: 260px; overflow-y: auto;
}
.select-wrap.open .select-menu { display: block; }
.select-option { padding: 10px 12px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.select-option:hover, .select-option.active { background: rgba(232,97,26,.08); color: var(--brand); }
.native-select { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; pointer-events: none; }
.export-format { width: 176px; flex: 0 0 auto; }
/* 后台自定义字段编辑器 */
.cf-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 8px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cf-row .field label { font-size: 12px; }
.cf-row input, .cf-row select { padding: 8px 10px; font-size: 14px; }
.cf-row .select-trigger { padding: 8px 10px; font-size: 14px; border-radius: 9px; }
.cf-row .select-option { padding: 8px 10px; }
.cf-check { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; }
.cf-check input { width: 15px; height: 15px; padding: 0; accent-color: var(--brand); }
.cf-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
@media (max-width: 640px) { .cf-row { grid-template-columns: 1fr; } }
/* 报名页自定义字段选项 */
.choice-options { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-option { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 400; }
.choice-option.selected { border-color: var(--brand); background: rgba(232,97,26,.06); }
.choice-option input { width: 15px; height: 15px; padding: 0; margin: 0; accent-color: var(--brand); }
input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(232,97,26,.25); border-color: var(--brand); }
textarea { min-height: 84px; resize: vertical; }
button {
  border: 0;
  border-radius: 9px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--brand-orange); color: #fff; }
.btn-primary:hover { background: var(--brand-orange-dark); }
.btn-light { background: #fff7ed; color: var(--brand-orange-dark); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-muted { background: #f3f4f6; color: var(--muted); }
.btn-block { width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.notice {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-top: 12px;
  background: #fff7ed;
  color: var(--brand-dark);
}
.notice.ok { background: #ecfdf5; color: var(--ok); }
.notice.warn { background: #fffbeb; color: var(--warn); }
.notice.error { background: #fef2f2; color: var(--danger); }
.hidden { display: none !important; }
.meta { font-size: 13px; color: var(--muted); }
.pill { display: inline-block; background: #fff7ed; color: var(--brand-dark); padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tabs button { background: #e5e7eb; color: var(--muted); }
.tabs button.active { background: var(--brand); color: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: #f9fafb; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 26px; color: var(--brand); }
.stat span { font-size: 13px; color: var(--muted); }
.overview-subtitle { margin-top: 18px; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: #0f172a; }
.session-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.session-stat span { display: block; line-height: 1.45; overflow-wrap: anywhere; }
.overview-lines { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 24px; margin-top: 16px; }
.overview-line { display: flex; align-items: flex-start; gap: 14px; margin-top: 0; }
.overview-label { flex: 0 0 auto; font-size: 14px; font-weight: 700; color: #0f172a; padding-top: 5px; }
.mini-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-tag { display: inline-flex; align-items: center; gap: 6px; background: #f8fafc; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.mini-tag b { color: var(--brand); font-size: 15px; }
/* 两列网格中需要独占整行的字段 */
.grid .field-full { grid-column: 1 / -1; }

/* 自定义日期时间选择器：弹层严格贴住输入框左边缘，避免原生 picker 错位 */
.dt-wrap { position: relative; }
.dt-input {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 9px;
  background: #fff; font-size: 14px; cursor: pointer; color: #111827; font-family: inherit;
}
.dt-input.placeholder { color: #9ca3af; }
.dt-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,97,26,.12); }
.dt-panel {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 80;
  width: 292px; max-width: calc(100vw - 44px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,.16); padding: 12px 12px 10px;
}
.dt-panel.hidden { display: none; }
.dt-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dt-cal-head .dt-ym { font-size: 14px; font-weight: 700; color: #111827; }
.dt-nav {
  border: none; background: #f3f4f6; width: 26px; height: 26px; border-radius: 7px;
  cursor: pointer; font-size: 15px; line-height: 1; color: #374151; padding: 0;
}
.dt-nav:hover { background: #e5e7eb; }
.dt-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.dt-week span { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.dt-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dt-day {
  border: none; background: transparent; height: 32px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: #111827; padding: 0;
}
.dt-day:hover { background: #fff1e8; }
.dt-day.other { color: #c3c8d0; }
.dt-day.today { box-shadow: inset 0 0 0 1px var(--brand); }
.dt-day.active { background: var(--brand); color: #fff; font-weight: 700; }
.dt-time {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}
.dt-time select {
  width: auto; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 13px; background: #fff;
}
.dt-time .dt-colon { font-weight: 700; color: var(--muted); }
.dt-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.dt-foot button {
  border: none; background: #f3f4f6; padding: 7px 12px; border-radius: 8px;
  font-size: 13px; cursor: pointer; color: #374151;
}
.dt-foot button:hover { background: #e5e7eb; }
.dt-foot button.dt-ok { background: var(--brand); color: #fff; font-weight: 600; flex: 1; }
.dt-foot button.dt-ok:hover { background: var(--brand-dark); }

/* 子账号在线状态 */
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.on { background: #e8f7ee; color: #0f7b3f; }
.status-pill.off { background: #f3f4f6; color: #6b7280; }
.log-detail { max-width: 380px; word-break: break-all; }
.user-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; }
#qrcode, #cancelQr { background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.login-box { max-width: 400px; margin: 60px auto; }
.login-box .card { margin-top: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .session-grid { grid-template-columns: 1fr; }
  .topbar { padding: 22px 14px; }
  .topbar h1 { font-size: 21px; line-height: 1.4; word-break: break-all; }
  .topbar h1 .admin-label { font-size: 15px; margin-top: 2px; letter-spacing: 1px; }
  .topbar p, .topbar .event-place, .topbar .event-address { font-size: 13px; }
  .topbar .event-time { font-size: 15px; }
  .card { padding: 16px; border-radius: 12px; }
  .wrap { padding: 16px 12px 48px; }
  .actions { flex-direction: column; }
  .actions > button, .actions > a, .actions > .export-format { width: 100%; }
  .row-between { align-items: flex-start; flex-direction: column; }
  .upload-btn { align-self: stretch; text-align: center; }
  table { font-size: 12px; }
  th, td { padding: 8px 6px; }
  .modal { padding: 16px; }
  .modal h2 { font-size: 18px; }
}

@media (min-width: 641px) {
  .wrap.narrow { max-width: 680px; }
}
