/* ============== 全局基础 ============== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
[hidden] { display: none !important; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: #1f2937;
  background: #f1f5f9;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ============== 主题色（蓝/黄/红） ============== */
:root {
  --primary: #1e3a8a;        /* 深蓝 */
  --primary-light: #3b5bd9;
  --primary-dark: #152a66;
  --accent: #fbbf24;          /* 黄 */
  --accent-dark: #d97706;
  --danger: #dc2626;          /* 红 */
  --success: #16a34a;
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --text: #1f2937;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
}

/* ============== 布局 ============== */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ============== 侧边栏 ============== */
.sidebar {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 22px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
#brandLogo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 2px;
  flex-shrink: 0;
}
.brand-text { line-height: 1.2; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.brand-sub { font-size: 11px; opacity: .75; letter-spacing: 2px; margin-top: 2px; }

.nav { flex: 1; padding: 14px 10px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 14px;
  transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
}
.nav-icon { font-size: 16px; }

.sidebar-footer { padding: 16px 18px; border-top: 1px solid rgba(255,255,255,.12); }
.footer-tip { font-size: 12px; opacity: .7; }
.footer-tip.small { font-size: 11px; opacity: .5; margin-top: 4px; }

/* ============== v63：顶部身份横栏 ============== */
.actor-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
  border-bottom: 1px solid #fbbf24;
  font-size: 13px;
  color: #78350f;
}
.actor-bar[hidden] { display: none; }
.actor-bar-main {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.actor-bar-main:hover { color: #92400e; }
.actor-bar-icon { font-size: 15px; }
.actor-bar-arrow {
  margin-left: 10px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(120,53,15,.12);
  transition: background .15s;
}
.actor-bar-main:hover .actor-bar-arrow { background: rgba(120,53,15,.22); }

/* ============== 主内容 ============== */
.content { padding: 24px 32px; overflow-x: hidden; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-actions { display: flex; gap: 10px; align-items: center; }

/* ============== 首页 Hero ============== */
.home-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 60%, #1d4ed8 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.18) 0%, transparent 60%);
  pointer-events: none;
}
#heroLogo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  padding: 8px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  position: relative;
  z-index: 1;
}
.hero-info { flex: 1; position: relative; z-index: 1; }
#teamName { font-size: 28px; margin-bottom: 4px; letter-spacing: 1px; }
.hero-meta { font-size: 13px; opacity: .8; margin-bottom: 22px; letter-spacing: 1.5px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat { text-align: left; }
.hero-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.hero-stat-label { font-size: 12px; opacity: .8; margin-top: 4px; }

/* ============== 卡片 ============== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card-actions { display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px 20px; }
.card-body.no-padding { padding: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
/* v70.4：首页榜单三栏（电脑端），窄屏单列 */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}
@media (max-width: 1000px) { .grid-3 { grid-template-columns: 1fr; } }

/* ============== 按钮 ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  background: #fff;
  color: var(--text);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--primary-dark); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-link {
  background: transparent;
  color: var(--primary);
  border: none;
  padding: 0;
  font-weight: 500;
}
.btn-link:hover { text-decoration: underline; transform: none; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ============== 表单 ============== */
.input-search, .select, .input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  min-width: 0;
}
.input-search { min-width: 220px; }
.input-search:focus, .select:focus, .input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 91, 217, 0.1);
}
.form-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.form-row label { color: var(--text-muted); font-size: 13px; }
.form-row .input, .form-row .select { width: 100%; }
.form-row.full { grid-template-columns: 1fr; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.required::after { content: " *"; color: var(--danger); }

/* ============== 表格 ============== */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.data-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
}
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table .row-actions { display: flex; gap: 6px; }
.data-table .row-actions .btn-sm { padding: 3px 8px; font-size: 12px; }

.empty-row td { text-align: center; color: var(--text-light); padding: 36px 0; font-style: italic; }

/* ============== 徽标 ============== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-processed { background: #dcfce7; color: #166534; }
.badge-yes { background: #dbeafe; color: #1e40af; }
.badge-no { background: #f1f5f9; color: #64748b; }
.badge-win { background: #dcfce7; color: #166534; }
.badge-draw { background: #fef3c7; color: #92400e; }
.badge-lose { background: #fee2e2; color: #991b1b; }
.balance-positive { color: var(--success); font-weight: 600; }
.balance-negative { color: var(--danger); font-weight: 600; }
.balance-zero { color: var(--text-muted); }
/* v45：余额不足 50 元提醒标签——置于余额数字右上角（上标式小标签） */
.bal-tip {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 9px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.4;
  vertical-align: 8px;
  white-space: nowrap;
}

/* ============== 排名列表 ============== */
.ranking-list { padding: 4px 0; }
.ranking-item {
  display: flex;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}
.ranking-item:last-child { border-bottom: none; }
.rank-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
/* v70.16：金银铜标识仅全榜真实前 3 名（由 renderHomeBoard 按全榜偏移加类，翻页后其余行普通样式） */
.rank-num-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.rank-num-silver { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.rank-num-bronze { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-weight: 500; }
.rank-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.rank-value { font-size: 18px; font-weight: 700; color: var(--primary); }
.rank-value-unit { font-size: 12px; color: var(--text-muted); margin-left: 4px; font-weight: 400; }
.empty-state { text-align: center; color: var(--text-light); padding: 32px 16px; font-style: italic; }

/* ============== 标签页 ============== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  gap: 4px;
}
.tab {
  background: transparent;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.sub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.sub-tab {
  background: #f1f5f9;
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 14px;
}
.sub-tab.active { background: var(--primary); color: #fff; }

/* ============== 模态框 ============== */
.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn .15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease-out;
}
.modal.wide { max-width: 820px; }
.modal.xwide { max-width: 960px; }
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============== 比赛编辑 - 出勤列表 ============== */
.attendance-list {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.attendance-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
}
.attendance-item:last-child { border-bottom: none; }
/* ============== 号码徽标（全局统一：深蓝底白字方形，同新增比赛页） ============== */
.num-tag {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  vertical-align: middle;
}
.attendance-item .num-tag { width: 26px; height: 26px; font-size: 11px; }
/* 退役/离队球员：号码徽标置灰 */
.num-tag-muted { background: #cbd5e1; color: #f8fafc; }
/* v155：带朋友「X友」虚拟球员无号码——号码位显示横线，灰底以示「非正式号码」 */
.num-tag-guest { background: #94a3b8; color: #f8fafc; }

/* ============== 搜索式下拉（充值录入选择球员） ============== */
.combo { position: relative; }
.combo-drop {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  z-index: 60;
}
.combo-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.combo-item:hover { background: var(--bg); }
.combo-empty { padding: 10px 12px; color: var(--text-muted); font-size: 12px; }
.attendance-item .pname { flex: 1; font-weight: 500; }
.attendance-item .stat-input {
  width: 56px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
}
.attendance-item .stat-label { font-size: 11px; color: var(--text-muted); margin-right: 4px; }
.attendance-item label.chk { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; user-select: none; }
.attendance-item label.chk input { cursor: pointer; }
/* v21：出场选项下拉（紧凑型，适配出勤行内布局） */
.attendance-item .opt-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.attendance-item .opt-sel {
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  color: var(--text);
  max-width: 118px;
  cursor: pointer;
  flex-shrink: 0;
}
.attendance-item .opt-sel:disabled { background: #f8fafc; color: var(--text-light); cursor: not-allowed; }
.attendance-item .opt-sel option[value="__new__"] { color: var(--primary); font-weight: 600; }

.fee-summary {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  text-align: center;
}
.fee-summary-item .v { font-size: 18px; font-weight: 700; color: var(--primary); }
.fee-summary-item .l { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============== 最近比赛 ============== */
.recent-matches { display: flex; flex-direction: column; gap: 8px; }
.recent-match {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  gap: 14px;
}
.recent-match .date-tag {
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.recent-match .date-tag .badge { font-size: 10px; padding: 1px 5px; }
.recent-match .vs { flex: 1; font-weight: 500; }
.recent-match .score { font-weight: 700; color: var(--primary); font-size: 16px; }
.recent-match .venue-chip {
  background: #e0e7ff;
  color: #3730a3;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  flex-shrink: 0;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============== 球衣颜色 ============== */
.color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.25);
  vertical-align: -2px;
}
.color-dot.dot-white { border: 1px solid #cbd5e1; }
.jersey-thumb { display: inline-block; vertical-align: middle; }

.jersey-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.jersey-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  flex-shrink: 0;
}
.jersey-preview-name { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.jersey-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.jersey-swatch {
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 3px;
  line-height: 0;
  transition: all .12s;
  /* v70.27：球衣颜色选择色块增大一倍；v70.29：缩小到 0.8 倍；v70.30：再缩 0.8 倍并与球衣预览一致 */
  width: 19px;
  height: 19px;
  box-sizing: border-box;
}
.jersey-swatch:hover { border-color: #cbd5e1; }
.jersey-swatch.active { border-color: var(--primary); background: #eff6ff; }
.jersey-swatch.swatch-white { background: #fff; border-color: #e2e8f0; }
.jersey-swatch.swatch-white.active { border-color: var(--primary); }

/* ============== 两步建赛提示 ============== */
.step-tip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.step-tip.light {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 12px;
}
/* v27：输入框下方轻量提示词（纯小灰字，不带背景框，不撑高表单行） */
.field-tip {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 5px;
  line-height: 1.45;
}
/* v31：表单行内的提示词对齐到输入框正下方（.form-row 为 130px+1fr 两列网格，
   否则提示词会掉进左侧标签窄列导致排版错乱） */
.form-row .field-tip {
  grid-column: 2;
  align-self: start;
}
/* v87：一格里放多个勾选项 + 提示词时，必须自己包一个容器占住第 2 列。
   否则 .form-row（130px + 1fr）的自动布局会把第 2 个 label 放进左边 130px 的
   标签窄列里（文字被压成竖排），提示词又按 grid-column:2 插到它右侧。 */
.form-row .fm-checks {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* ---- v40：管理员"个人页面"手机端视图（iframe 手机壳） ---- */
.pv-wrap { text-align: center; }
.pv-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.pv-phone {
  display: inline-block;
  width: 420px;
  max-width: 100%;
  border: 8px solid #1f2937;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #f1f5f9;
}
.pv-iframe {
  display: block;
  width: 100%;
  height: 660px;
  border: none;
  background: #f1f5f9;
}

/* ============== 出勤登记（第二步） ============== */
.att-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 3px solid var(--accent);
}
.att-section-title:first-child { margin-top: 0; }

/* ---- v38：进球/助攻数据识别面板 ---- */
.si-box { margin: 10px 0 4px; }
.si-box #siPanel {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--accent-dark);
  border-radius: var(--radius-sm);
  background: #fffbeb;
}
#siText {
  width: 100%;
  resize: vertical;
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
  box-sizing: border-box;
}
.si-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}
.si-tip { font-size: 11px; color: var(--text-muted); }
.si-evlist { border-top: 1px solid #fde68a; }
.si-ev {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #fef3c7;
  font-size: 13px;
  flex-wrap: wrap;
}
.si-score { font-weight: 700; min-width: 40px; color: var(--primary); }
.si-role { font-size: 11px; color: var(--text-muted); }
.si-sel { min-width: 150px; max-width: 220px; }
.si-none-txt { font-size: 12px; color: var(--text-light); }
.si-sum { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.si-warn { font-size: 12px; color: #b45309; margin-top: 4px; }
.si-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}
.si-tag.si-ok { background: #dcfce7; color: #15803d; }
.si-tag.si-mid { background: #fef9c3; color: #a16207; }
.si-tag.si-amb { background: #ffedd5; color: #c2410c; }
.si-tag.si-none { background: #fee2e2; color: #b91c1c; }

/* ---- v99：识别结果——匹配成功纯文本 / 需确认项的原数据比对 ---- */
.si-ok-txt { font-size: 13px; color: var(--text); white-space: nowrap; }
.si-ok-txt b { color: var(--primary); }
.si-ok-tick { font-size: 11px; color: #15803d; }
/* 事件行内出现待确认项时整行轻微高亮，便于扫视定位 */
.si-ev-warn { background: #fffdf5; }
/* 比对块：窄屏自动换行，不挤压事件行 */
.si-cmps {
  flex-basis: 100%;
  width: 100%;
  margin: 2px 0 4px;
  border-left: 2px solid #fdba74;
  padding-left: 8px;
}
.si-cmp {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  line-height: 1.7;
}
.si-cmp-l { color: var(--text-muted); white-space: nowrap; }
.si-cmp-v {
  color: var(--text);
  background: #fef3c7;
  border-radius: 3px;
  padding: 0 4px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.si-cmp-arrow { color: var(--text-light); }
.si-cmp-hit { background: #ffedd5; color: #c2410c; font-family: inherit; }
.si-cmp-lv { color: #a16207; }
.si-cmp.si-cmp-none .si-cmp-hit { background: #fee2e2; color: #b91c1c; }
.si-hint-ok { font-size: 12px; color: #15803d; margin-top: 6px; }

.ext-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.ext-row {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
  font-size: 13px;
}
.ext-row:last-child { border-bottom: none; }
.ext-row .ext-name { flex: 1; font-weight: 500; min-width: 0; }
.ext-row .ext-tip { font-size: 11px; color: var(--text-light); }
.ext-row label.chk { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.ext-empty {
  padding: 12px;
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  font-style: italic;
}
.ext-add {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* ============== 充值明细 ============== */
.recharge-detail {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 8px;
}
.recharge-detail .item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed #e2e8f0;
}
.recharge-detail .item:last-child { border-bottom: none; }
.recharge-detail .item .amt { font-weight: 600; color: var(--success); }
.recharge-detail .item .amt.neg { color: var(--danger); }
.recharge-detail .item .meta { font-size: 11px; color: var(--text-muted); }

/* ============== 提示框 ============== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  animation: slideIn .2s ease-out;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ============== 旧浏览器兼容（CentOS 7 自带 Firefox ESR 等不支持 flex gap） ============== */
@supports not (gap: 10px) {
  .brand > * + * { margin-left: 12px; }
  .nav-item > * + * { margin-left: 10px; }
  .page-actions > * + * { margin-left: 10px; }
  .card-actions > * + * { margin-left: 8px; }
  .card-head > * + * { margin-left: 12px; }
  .home-hero > * + * { margin-left: 32px; }
  .hero-stats > * + * { margin-left: 28px; }
  .row-actions > * + * { margin-left: 6px; }
  .attendance-item > * + * { margin-left: 10px; }
  .modal-foot > * + * { margin-left: 10px; }
  .ranking-item > * + * { margin-left: 12px; }
  .recent-match > * + * { margin-left: 14px; }
  .sub-tabs > * + * { margin-left: 6px; }
  .tabs > * + * { margin-left: 4px; }
  .btn > * + * { margin-left: 6px; }
  .recharge-detail .item > * + * { margin-left: 12px; }
}

/* ============== 响应式 ============== */
@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .nav { display: flex; overflow-x: auto; padding: 10px; }
  .nav-item { white-space: nowrap; }
  .sidebar-footer { display: none; }
  .content { padding: 16px; }
  .home-hero { flex-direction: column; text-align: center; padding: 24px; }
  .hero-stats { justify-content: center; gap: 20px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .fee-summary { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row label { font-size: 12px; }
  /* v31：手机端单列布局，提示词回归第一列（唯一列） */
  .form-row .field-tip { grid-column: 1; }
}

/* ====================================================== */
/* ============== 球员模式（手机端 / 微信） ============== */
/* ====================================================== */
.p-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 40px;
  min-height: 100vh;
  background: #f1f5f9;
}
.p-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 60%, #1d4ed8 100%);
  padding: 28px 20px 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
}
.p-header img.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
  flex-shrink: 0;
}
.p-header .team { flex: 1; }
.p-header .team-name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.p-header .team-sub { font-size: 11px; opacity: .75; letter-spacing: 2px; margin-top: 2px; }
.p-header .mode-tag {
  font-size: 11px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 10px;
  padding: 3px 10px;
  flex-shrink: 0;
}

/* v63.4：顶部 mode-switch 切换器（球员模式 ↔ 管理员模式）
 * 静态标签（当前模式）：白色实底
 * 切换链接（另一种模式）：背景透明 + 箭头 + hover 高亮 */
.p-header .mode-switch { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.p-header .mode-tag-active {
  background: rgba(255,255,255,.95);
  color: #1e3a8a;
  font-weight: 600;
}
.p-header .mode-tag-link {
  background: transparent;
  border-color: rgba(255,255,255,.55);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: background .15s;
}
.p-header .mode-tag-link:hover { background: rgba(255,255,255,.25); }
.p-header .mode-tag-link:active { background: rgba(255,255,255,.35); }
.p-header .mode-tag-arrow { font-size: 13px; line-height: 1; }

.p-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  margin: 14px 14px 0;
  padding: 16px;
}
.p-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.p-card-title .more { font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* 个人信息卡（覆盖在头部下方） */
.p-profile {
  margin-top: -34px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.p-profile .num-tag { width: 44px; height: 44px; border-radius: 4px; font-size: 18px; } /* 同全局 num-tag 样式，仅放大比例 */
.p-profile .info { flex: 1; }
.p-profile .pname { font-size: 19px; font-weight: 700; }
.p-profile .pmeta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.p-profile .pmeta span { margin-right: 10px; }

/* 年度数据 */
.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.p-stat {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.p-stat .v { font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.p-stat .l { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* 财务汇总 */
.p-finance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.p-fin {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  position: relative; /* v46：余额格右上角"要充值啦"标签定位基准 */
}
.p-fin .v { font-size: 17px; font-weight: 700; line-height: 1.2; }
.p-fin .l { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
/* v46.1：球员端余额不足提醒——余额格右上角"外飘角标"（骑跨格子上边缘，压不住余额数字；
   原 top:4px 会与居中的余额数字上半区重叠） */
.p-fin .bal-tip {
  position: absolute;
  top: -7px;
  right: 4px;
  margin-left: 0;
  vertical-align: baseline;
  padding: 1px 5px;
  font-size: 9px;
}

/* 场次/明细列表 */
.p-list { display: flex; flex-direction: column; }
.p-row {
  display: flex;
  align-items: center;
  padding: 10px 2px;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
  font-size: 13px;
}
.p-row:last-child { border-bottom: none; }
.p-row .date { color: var(--text-muted); font-size: 12px; width: 78px; flex-shrink: 0; }
.p-row .mid { flex: 1; min-width: 0; }
.p-row .mid .opp { font-weight: 500; }
.p-row .mid .sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.p-row .right { text-align: right; flex-shrink: 0; }
.p-row .right .score { font-weight: 700; color: var(--primary); font-size: 14px; }
.p-row .right .fee { font-size: 12px; color: var(--danger); }
.p-row .right .fee.free { color: var(--success); }
.mini-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
}
.mini-badge.g { background: #dcfce7; color: #166534; }
.mini-badge.y { background: #fef3c7; color: #92400e; }
.mini-badge.r { background: #fee2e2; color: #991b1b; }

.p-empty { text-align: center; color: var(--text-light); padding: 24px; font-size: 13px; }
.p-error { text-align: center; padding: 60px 24px; }
.p-error .icon { font-size: 40px; color: #cbd5e1; }
.p-error h3 { margin: 12px 0 6px; font-size: 16px; }
.p-error p { font-size: 13px; color: var(--text-muted); }

.p-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 20px;
}

/* 对方球衣颜色点（球员端） */
.p-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.25);
  vertical-align: -1px;
}
.p-dot.dot-white { border-color: #cbd5e1; }
.p-venue {
  display: inline-block;
  font-size: 11px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 1px 8px;
  margin-top: 3px;
}
/* v25：场地可点击（查看地图定位）
   v93：定位入口统一为「📍 定位」胶囊标签，样式对齐小程序 mp-match 的 .loc-btn
        （小程序 rpx ÷ 2：font-size 26→13px、padding 4/16→2/8px、border-radius 24→12px）。
        名称改为纯文本、可点区域收敛到胶囊上，故去掉名称的虚线下划线。 */
.p-venue-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #1e293b;
  cursor: pointer;
  vertical-align: middle;
}
.p-venue-link .p-venue-name { color: inherit; }
.p-venue .p-venue-link { color: #475569; }
/* v93：定位胶囊（网页端与小程序共用的唯一定位标签写法） */
.loc-btn {
  display: inline-block;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.15;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 12px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ============== v21：即将开赛 / 微信报名 ============== */
.p-sign-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #eff6ff;
  color: #1e40af;
  white-space: nowrap;
}
.p-sign-tag.ok { background: #dcfce7; color: #166534; }
.p-sign-tag.wait { background: #fef3c7; color: #92400e; }
/* v33：比赛已取消样式 */
.p-cancelled { opacity: .6; }
.p-cancelled .p-sign-tag, .p-sign-tag.cancel { background: #fee2e2; color: #b91c1c; }
.p-cancel-badge { display: block; margin-top: 3px; font-size: 10px; font-weight: 600; color: #dc2626; background: #fee2e2; border-radius: 4px; padding: 1px 5px; }
.p-sign-stat {
  font-size: 12px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 10px 0 4px;
  text-align: center;
}
/* v22：报名 / 候机名单 */
/* v92：年会晚宴区块（报名页）——与球赛报名表单视觉上分区，青色系呼应「年会」徽标 */
.p-dinner-box {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #99f6e4;
  border-radius: var(--radius);
  background: #f0fdfa;
}
.p-dinner-hd {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #115e59;
  margin-bottom: 8px;
}
.p-dinner-ok {
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
}
.p-dinner-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.p-dinner-check input { cursor: pointer; }
.p-names { margin: 8px 0 0; }
.p-names-t { font-size: 12px; color: #64748b; margin-bottom: 5px; }
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.p-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 12px;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}
.p-chip.wait { background: #fef3c7; color: #92400e; }
/* v49：候机递补转正角标（正式报名 chip 内的"接"） */
.p-promote {
  display: inline-block;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 14px;
  background: #dcfce7;
  color: #15803d;
}

/* ============== v28：比赛分享 ============== */
/* 即将开赛卡片上的"分享球友"入口 */
.p-share-entry {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 1px 9px;
  cursor: pointer;
  white-space: nowrap;
}
/* 分享浮层中的链接展示框 */
.sh-link {
  margin-top: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  color: #475569;
  word-break: break-all;
  text-align: center;
}

/* ============== 球员端手机适配优化 ============== */
@media (max-width: 640px) {
  .p-page { max-width: 100%; }
  .p-header { padding: 20px 14px 16px; gap: 10px; }
  .p-header img.logo { width: 52px; height: 52px; }
  .p-header .team-name { font-size: 15px; }
  .p-card { margin: 12px 12px 0; padding: 14px; border-radius: 12px; }
  .p-profile { margin-top: -26px; gap: 12px; }
  .p-profile .num-tag { width: 40px; height: 40px; font-size: 16px; }
  .p-profile .pname { font-size: 18px; }
  .p-profile .pmeta { font-size: 11px; }
  .p-profile .pmeta span { margin-right: 8px; }
  .p-stats, .p-finance { gap: 8px; }
  .p-stat { padding: 12px 4px; border-radius: 8px; }
  .p-stat .v { font-size: 22px; }
  .p-stat .l, .p-fin .l { font-size: 10px; }
  .p-fin .v { font-size: 15px; }
  /* 列表行加大触控区与字号，符合手机查看习惯 */
  .p-list { font-size: 14px; }
  .p-row {
    padding: 12px 2px;
    gap: 10px;
    min-height: 48px;
    align-items: flex-start;
  }
  .p-row .date { font-size: 12px; width: 64px; line-height: 1.4; }
  .p-row .mid .opp { font-size: 14px; line-height: 1.4; }
  .p-row .mid .sub { font-size: 12px; margin-top: 3px; }
  .p-row .right .score { font-size: 15px; }
  .p-row .right .fee { font-size: 13px; }
  .mini-badge { font-size: 11px; padding: 2px 7px; }
  .p-card-title { font-size: 15px; }
  .p-card-title .more { font-size: 12px; }
  .p-footer { padding: 0 16px 16px; line-height: 1.6; }
}

/* ====================== v3 新增样式 ====================== */
/* 分页条 */
.pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}
.pager:empty { display: none; }
.pager-info { font-size: 12px; color: var(--text-muted); margin-right: auto; }
.pager-size {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  margin-left: 6px;
}
.pager-btn {
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.pager-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-btn.cur { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager-ellipsis { color: var(--text-light); font-size: 12px; padding: 0 2px; }

/* 全场/半场标签 */
.ftype-chip {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  white-space: nowrap;
}

/* 出勤表单：带朋友人数 / 备注输入 */
.attendance-item .guest-inp { width: 62px; }
.attendance-item .note-inp { width: 96px; text-align: left; padding: 4px 8px; }
.attendance-item .stat-label { white-space: nowrap; }

/* 批量扣费：球员多选 */
.batch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 230px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.batch-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}
.batch-pick:hover { border-color: var(--primary); }
.batch-pick input { cursor: pointer; }

/* 手动扣费徽标 */
.badge-warm {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* v92：年会徽标（比赛列表 / 报名页）——与「内部邀请」「发球衣」区分色系 */
.badge-annual {
  background: #ccfbf1;
  color: #115e59;
  border: 1px solid #99f6e4;
  font-weight: 700;
}

/* ============== 球衣自定义调色板 ============== */
.jersey-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
}
.jersey-custom .color-pick {
  width: 34px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px;
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
}
.jersey-custom-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
/* 自定义颜色：命名保存 */
.jersey-name-inp { width: 90px; padding: 4px 8px; font-size: 12px; }
/* 已保存的自定义颜色块（带删除小按钮） */
.jersey-swatch-custom { position: relative; display: inline-flex; }
.jersey-swatch-custom .jersey-swatch { display: inline-flex; }
.jersey-swatch-del {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  line-height: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  text-align: center;
}
.jersey-swatch-del:hover { background: #dc2626; }

/* ============== 出勤登记：整场比分 ============== */
.score-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.score-label { font-size: 13px; font-weight: 600; color: var(--text); }
.score-inp {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}
.score-colon { font-size: 18px; font-weight: 700; color: var(--primary); }
.score-tip { font-size: 11px; color: var(--text-muted); }

/* ============== 场地：多场地号下拉 ============== */
.court-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.court-row { display: flex; align-items: center; gap: 8px; }

/* ============== 场地：定位选择 ============== */
.loc-field { display: flex; align-items: center; gap: 8px; }
.loc-field .input { flex: 1; background: #f8fafc; }
.loc-field .btn { white-space: nowrap; flex-shrink: 0; }

/* 地图选点标记 */
.loc-marker { background: transparent; }
.loc-pin {
  width: 20px;
  height: 20px;
  background: #dc2626;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 1px 6px rgba(15, 23, 42, .45);
}
.loc-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: #fff;
  border-radius: 50%;
}
/* Leaflet 弹窗内地图层级修正（modal 盖住地图控件） */
#locMap { z-index: 0; position: relative; }
#locMap .leaflet-control, #locMap .leaflet-popup { z-index: 900; }
#locMap .leaflet-top, #locMap .leaflet-bottom { z-index: 900; }
/* 独立地图选点浮层：盖在主 modal 之上，保存定位不影响底下表单 */
.loc-mask { z-index: 3000; }

/* ============== 地图搜索结果列表 ============== */
.loc-results {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}
.loc-result-item {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  line-height: 1.45;
}
.loc-result-item:last-child { border-bottom: none; }
.loc-result-item:hover { background: #f8fafc; }

/* ============== 管理端手机适配（增强） ============== */
@media (max-width: 768px) {
  /* 弹窗：贴近全屏，方便操作 */
  .modal-mask { padding: 10px; align-items: stretch; }
  .modal { max-width: 100% !important; max-height: calc(100vh - 20px); }
  .modal-head { padding: 12px 14px; }
  .modal-head h3 { font-size: 15px; }
  .modal-body { padding: 14px; }
  .modal-foot { padding: 10px 14px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; min-width: 100px; }
  .loc-mask { padding: 8px; }
  #locMap { height: 320px !important; }

  /* 侧边导航精简 */
  .brand { padding: 12px 14px; gap: 8px; }
  #brandLogo { width: 36px; height: 36px; border-radius: 6px; }
  .brand-name { font-size: 15px; }
  .nav { padding: 6px 8px; gap: 4px; }
  .nav-item { padding: 8px 12px; font-size: 13px; gap: 6px; }
  .nav-icon { font-size: 13px; }

  /* 主内容与表格 */
  .content { padding: 12px; }
  .page-header h1 { font-size: 18px; }
  .data-table th, .data-table td { padding: 9px 10px; font-size: 12px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .data-table .row-actions { flex-wrap: wrap; }

  /* 出勤登记行：允许换行，避免输入溢出 */
  .attendance-item { flex-wrap: wrap; padding: 10px 8px; }
  .attendance-item .pname { min-width: 60px; }

  /* 首页 */
  .home-hero { padding: 18px 12px; }
  .hero-stats { gap: 12px; }

  /* 比分框与表单 */
  .score-box { flex-wrap: wrap; }
  .input, .select { font-size: 14px; } /* 防止 iOS 聚焦自动放大 */
}

/* ====================== v7：绑定状态徽标 / 系统设置 / 总绑定页 ====================== */
.badge-warn { background: #fef3c7; color: #b45309; }

/* 设置页区块 */
.set-block { padding: 14px 0; border-bottom: 1px dashed var(--border); }
.set-block:last-child { border-bottom: none; }
.set-block-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.set-block-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.6; }

/* 待审核绑定申请 */
.bind-req { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg, #f8fafc); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.bind-req .bind-req-info { flex: 1; }
.bind-req .bind-req-info strong { display: block; font-size: 14px; }
.bind-req .bind-req-time { font-size: 12px; color: var(--text-muted); }
.bind-req.empty { color: var(--text-muted); font-size: 13px; justify-content: center; }

/* 球衣颜色管理面板 */
.jc-panel { padding: 12px 0 4px; border-bottom: 1px dashed var(--border); }
.jc-panel:last-child { border-bottom: none; }
.jc-panel-title { font-weight: 600; font-size: 14px; margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px; }
.jc-count { font-weight: 400; font-size: 12px; color: var(--text-muted); }
.jc-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.jc-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.jc-item.empty { color: var(--text-muted); font-size: 13px; border-style: dashed; }
.jc-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block;
  border: 1px solid rgba(15, 23, 42, .2); flex: none; }
.jc-dot.dot-white { background: #fff; }
.jc-name { font-size: 13px; font-weight: 500; }
.jc-hex { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.jc-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.jc-add .color-pick { width: 40px; height: 30px; border: 1px solid var(--border);
  border-radius: 6px; padding: 1px; background: #fff; cursor: pointer; }
.jc-add .jc-name-inp { width: 130px; }

/* 球员端：确认绑定 / 待审核按钮 */
.p-btn { display: block; width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: #1e3a8a; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.p-btn:disabled { opacity: .6; }
.p-btn-primary { background: #1e3a8a; }

/* v63：球员端「进入管理员模式」按钮 */
.p-admin-entry { padding: 16px 14px 0; }
.p-admin-btn {
  display: block; width: 100%; padding: 12px;
  border: none; border-radius: 10px;
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 8px rgba(30,58,138,.25);
}
.p-admin-btn:hover { background: linear-gradient(90deg, #1e40af 0%, #1d4ed8 100%); }
.p-admin-tip { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

/* 总绑定页 /b/ */
.b-search { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid #e2e8f0; border-radius: 10px; font-size: 14px; margin-bottom: 10px; outline: none; }
.b-search:focus { border-color: #1e3a8a; }
.bind-list { max-height: 60vh; overflow-y: auto; }
.bind-item { display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; margin-bottom: 8px; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 10px; cursor: pointer; text-align: left; }
.bind-item:active { background: #eff6ff; }
/* v70.6：已绑定球员不再提供「进入个人主页」（关闭总二维码进入个人页面） */
.bind-item-disabled { cursor: default; background: #f8fafc; opacity: .9; }
.bind-item-disabled:active { background: #f8fafc; }
/* v70.7：已识别设备确认条（不再静默跳转；本人一键进入 / 非本人清除识别） */
#recognizeBar { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; font-size: 13px; color: #1e3a8a; }
.bind-item .bind-item-name { flex: 1; font-size: 15px; font-weight: 600; color: #0f172a; }
.bind-item .bind-item-go { font-size: 12px; color: #1e3a8a; white-space: nowrap; }
.bind-empty { text-align: center; color: #94a3b8; font-size: 13px; padding: 26px 10px; }
/* v13：已绑定微信的球员置灰不可选 */
.bind-item.bind-disabled { cursor: not-allowed; background: #f1f5f9; opacity: .72; }
.bind-item.bind-disabled:active { background: #f1f5f9; }
.bind-disabled .bind-item-name { color: #64748b; }
.bind-disabled .bind-item-go { color: #94a3b8; }

@media (max-width: 768px) {
  .jc-add .jc-name-inp { width: 110px; }
  .bind-req { flex-wrap: wrap; }
}

/* ===== v8 号码墙（人员管理页上半部） ===== */
.numwall { display: flex; flex-wrap: wrap; gap: 10px; max-height: 200px; overflow: hidden; }
.numwall-empty { color: var(--text-muted); font-size: 13px; padding: 6px 0; }
.numwall-item {
  position: relative; width: 60px; height: 60px; border-radius: 12px;
  background: #f1f5f9; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.numwall-item .numwall-num {
  font-size: 24px; font-weight: 800; color: var(--primary);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.numwall-item:hover {
  background: #fff; border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.numwall-dot {
  position: absolute; top: 5px; right: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: #cbd5e1;
}
.numwall-dot.ok { background: var(--success); }
.numwall-dot.warn { background: #f59e0b; }

/* 号码墙悬停详情浮层 */
.numtip {
  position: fixed; z-index: 1200; width: 316px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 12px 14px;
  pointer-events: none;
}
.numtip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.numtip-head strong { font-size: 15px; color: var(--text); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.numtip-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.numtip-cell { background: #f8fafc; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.numtip-label { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.numtip-val { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.numtip-val.numtip-bal-debt { color: var(--danger); }
.numtip-val.numtip-bal-good { color: var(--success); }
.numtip-val b { font-weight: 700; }

@media (max-width: 768px) {
  .numwall-item { width: 52px; height: 52px; border-radius: 10px; }
  .numwall-item .numwall-num { font-size: 20px; }
  .numwall { max-height: 176px; }
  .numtip { width: 246px; }
  .numtip-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== v9 线下收费标记 + 登录页 ===== */
.tag-offline {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; color: #b45309;
  background: #fef3c7; white-space: nowrap;
}
/* v86：门将模式标记（个人页面不显示余额/扣费；出勤比赛免场租+额外收费本人分摊） */
.tag-gk {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; color: #6d28d9;
  background: #ede9fe; white-space: nowrap;
}
.checkbox-line {
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text);
  cursor: pointer;
}
.checkbox-line input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary);
}

/* 登录页 */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  padding: 20px;
}
.login-box {
  width: 100%; max-width: 360px; background: #fff; border-radius: 16px;
  padding: 36px 28px 28px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo img {
  width: 64px; height: 64px; border-radius: 12px;
}
.login-title {
  font-size: 20px; font-weight: 800; color: var(--text); margin: 12px 0 2px;
}
.login-sub {
  font-size: 13px; color: var(--text-muted); margin-bottom: 24px;
}
.login-form { text-align: left; }
.login-field { margin-bottom: 16px; }
.login-field label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px;
}
.login-field .input {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px;
}
.login-field .input:focus { outline: none; border-color: var(--primary); }
.login-tip {
  min-height: 18px; font-size: 13px; margin-bottom: 8px; text-align: center;
}
.login-btn {
  width: 100%; padding: 11px 0; font-size: 15px; font-weight: 700; border: none;
}
.login-hint {
  margin-top: 20px; font-size: 12px; color: var(--text-muted); line-height: 1.6;
}
/* 登录页底部备案号展示（v33.1：ICP + 公安网备案，登录框内底部居中显示） */
.login-beian {
  margin-top: 20px; font-size: 11px; color: var(--text-muted); line-height: 1.6; text-align: center;
}
.login-beian a { color: inherit; text-decoration: none; }

/* ====================== v11：球员端年度选择 / 分页 / 明细详情 ====================== */
.p-year-title { display: flex; align-items: center; gap: 8px; }
.p-year-sel {
  -webkit-appearance: none; appearance: none;
  border: 1.5px solid #1e3a8a; border-radius: 8px;
  background: #eef2ff; color: #1e3a8a;
  font-size: 13px; font-weight: 700;
  padding: 3px 22px 3px 8px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231e3a8a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
}
.p-pager {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  padding: 10px 2px 2px; font-size: 12px; color: #94a3b8;
}
.p-pager-info { margin-right: 4px; }
.p-pager-btn {
  min-width: 28px; height: 26px; padding: 0 8px;
  border: 1px solid #e2e8f0; border-radius: 6px;
  background: #fff; color: #475569; font-size: 12px;
}
.p-pager-btn.cur { background: #1e3a8a; border-color: #1e3a8a; color: #fff; font-weight: 700; }
.p-pager-btn:disabled { opacity: .4; }
.p-pager-el { padding: 0 2px; color: #cbd5e1; }
.p-row-tap { cursor: pointer; }
.p-row-tap:active { background: #f8fafc; }
.p-arrow {
  font-size: 20px; font-weight: 700; color: #cbd5e1; line-height: 1;
  padding: 0 2px;
}
.p-detail-mask {
  /* v48：inset 简写在 iOS 14.4 及更早的 Safari 不支持（14.5 才支持）——旧机型上
     弹层无定位约束而不可见，表现为"点友谊赛报名没反应"。改用四边全零的兼容写法。 */
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 3000;
  background: rgba(15,23,42,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.p-detail-sheet {
  width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 16px 16px 24px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
}
.p-detail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; border-bottom: 1px solid #eef2f7; margin-bottom: 6px;
}
.p-detail-title { font-size: 15px; font-weight: 800; color: #1e293b; }
.p-detail-close {
  width: 30px; height: 30px; border: none; border-radius: 8px;
  background: #f1f5f9; color: #64748b; font-size: 14px; line-height: 1;
}
.p-detail-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 2px; border-bottom: 1px dashed #eef2f7; font-size: 13px;
}
.p-detail-row:last-child { border-bottom: none; }
.p-detail-row .k {
  flex: 0 0 64px; color: #94a3b8; font-size: 12px; padding-top: 1px;
}
.p-detail-row .v { flex: 1; color: #1e293b; word-break: break-all; }

/* v25：场地地图弹层（点击场地名查看定位，高德 uri iframe） */
.p-map-mask { z-index: 3100; }
.p-map-frame { margin-top: 10px; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }
.p-map-frame iframe {
  display: block; width: 100%; height: 48vh; border: none; background: #eef2f7;
}
.p-map-addr { font-size: 12px; color: #64748b; margin-top: 8px; word-break: break-all; }
.p-map-open {
  display: block; margin-top: 10px; text-align: center;
  font-size: 13px; font-weight: 700; color: #1e40af;
  background: #eff6ff; border-radius: 8px; padding: 9px 0;
}
.p-map-open:active { opacity: .8; }

/* ====================== v12：球员端资料编辑 / 充值明细 ====================== */
/* 个人信息卡：号码与姓名可点击编辑 */
.p-profile .num-tag,
.p-profile .pname { cursor: pointer; }
.p-profile .num-tag:active { transform: scale(.94); }
.p-profile .pname:active { opacity: .7; }
.p-profile .pname::after {
  content: '✎'; font-size: 11px; color: #94a3b8; margin-left: 4px; font-weight: 400;
}
/* 充值总额可点击查看明细 */
.p-fin .v { transition: transform .12s ease; }
.p-fin:active .v { transform: scale(.96); }
/* 资料编辑表单（底部浮层内） */
.p-form-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 2px; border-bottom: 1px dashed #eef2f7;
}
.p-form-row label { flex: 0 0 72px; font-size: 12px; color: #94a3b8; }
/* v22：守门勾选（报名浮层）；v23：整行文本单行显示 */
.p-form-row.p-gk-row .p-gk-label { flex: 0 0 40px; }
/* v92.3：年会「报名踢球」行的 label 是 4 个字（「守门」只有 2 个字），沿用 .p-gk-row 的
   40px 会把「报名踢球」挤成两行、该行比其他表单行高出一截。放宽到 72px（与普通
   .p-form-row label 同宽）并禁止折行，保持与「守门」行等高。 */
.p-form-row.p-kick-row .p-gk-label { flex: 0 0 72px; white-space: nowrap; }
.p-form-row .p-gk-check {
  flex: 1; display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #1e293b; cursor: pointer; user-select: none;
  min-width: 0; white-space: nowrap;
}
.p-form-row .p-gk-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: #2563eb; cursor: pointer; flex: 0 0 auto; }
.p-form-row .p-gk-check span { flex: 0 0 auto; white-space: nowrap; }
.p-form-row .p-input {
  flex: 1; height: 36px; padding: 0 10px; border: 1px solid #e2e8f0;
  border-radius: 8px; font-size: 14px; color: #1e293b; background: #fff;
  outline: none; -webkit-appearance: none;
}
.p-form-row .p-input:focus { border-color: #2563eb; }
/* v31：报名风险告知勾选框 */
.p-risk-box {
  margin-top: 12px; padding: 10px 12px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px;
}
.p-risk-box .p-risk-label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; line-height: 1.6; color: #9a3412;
  cursor: pointer; user-select: none;
}
.p-risk-box .p-risk-label input[type="checkbox"] {
  width: 16px; height: 16px; margin-top: 2px; flex: 0 0 auto;
  accent-color: #ea580c; cursor: pointer;
}
/* 浮层内的明细列表与分页 */
#pdBody .p-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed #eef2f7; }
#pdBody .p-row .date { flex: 0 0 78px; font-size: 12px; color: #94a3b8; }
#pdBody .p-row .mid { flex: 1; min-width: 0; }
#pdBody .p-row .opp { font-size: 14px; font-weight: 700; color: #1e293b; }
#pdBody .p-row .right { flex: 0 0 auto; }
#pdBody .p-row .fee { font-size: 15px; font-weight: 800; }
#pdBody .p-pager { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 10px; }

/* ==================== v19：球迷模式（球队年度数据页） ==================== */
.f-total { text-align: center; padding: 6px 0 2px; }
.f-total-v { font-size: 44px; font-weight: 800; color: var(--primary); line-height: 1.15; }
.f-total-l { font-size: 12px; color: var(--text-muted); margin-top: 2px; letter-spacing: 1px; }
.f-back-btn { margin-top: 14px; background: #eef2ff; color: #1e3a8a; font-weight: 600; }
.f-rank-list .p-empty { padding: 18px 0; text-align: center; font-size: 13px; color: #94a3b8; }
.f-rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid #f1f5f9;
}
.f-rank-row:last-child { border-bottom: none; }
.f-rank-no {
  width: 26px; height: 26px; border-radius: 50%;
  background: #f1f5f9; color: #64748b;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.f-rank-no.r1 { background: #fde68a; color: #92400e; }
.f-rank-no.r2 { background: #e2e8f0; color: #475569; }
.f-rank-no.r3 { background: #fed7aa; color: #9a3412; }
.f-rank-num {
  min-width: 34px; text-align: center; font-size: 13px; font-weight: 700;
  color: #334155; flex-shrink: 0;
}
.f-rank-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; color: #1e293b; }
.f-rank-val { flex-shrink: 0; font-size: 14px; font-weight: 700; color: var(--primary); }
/* v19：球员页「球队年度数据」入口链接 */
.p-team-link {
  display: block; text-align: center;
  margin-top: 12px; padding: 9px 0 2px;
  border-top: 1px dashed #e2e8f0;
  font-size: 13px; font-weight: 600;
  color: #1e3a8a; text-decoration: none;
}
.p-team-link:active { opacity: .7; }

/* v33：站点底部备案号展示 */
.p-footer a {
  color: inherit;
  text-decoration: none;
}
.p-beian {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  padding: 0 0 4px;
  line-height: 1.6;
}
.p-beian a {
  color: inherit;
  text-decoration: none;
}

/* ============== v71：比赛分组（管理端设置 + 球员端展示） ============== */
/* 比赛卡片「分组」按钮的状态后缀 */
.mcard-group-open { color: var(--accent-dark); font-size: 11px; margin-left: 2px; }
.mcard-group-done { color: var(--text-light); font-size: 11px; margin-left: 2px; }

/* 分组设置弹窗 */
.gs-loading { padding: 26px; text-align: center; color: var(--text-muted); }
.gs-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 2px 0 10px; border-bottom: 1px solid var(--border); }
.gs-meta-date { font-weight: 600; }
.gs-meta-opp { color: var(--text-muted); }
.gs-meta-right { margin-left: auto; color: var(--text-muted); font-size: 13px; }
.gs-badge { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--border); color: var(--text-muted); }
.gs-badge.s1 { background: #fef3c7; color: #b45309; }
.gs-badge.s2 { background: #dcfce7; color: #15803d; }

.gs-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 0 8px; }
.gs-toolbar .gs-lbl { color: var(--text-muted); font-size: 13px; }
.gs-count { min-width: 34px; text-align: center; font-weight: 700; font-size: 16px; }
.gs-hint { color: var(--text-light); font-size: 12px; margin-left: 4px; }

/* v91.4：分组列表不再自滚动——改由弹窗主体滚动。
   原来这里 `max-height: 46vh; overflow: auto`，会把小组长的下拉浮层一起裁掉
   （1~2 个分组时容器只有一行高，224px 的下拉只剩 ~80px 可见）。 */
.gs-rows { display: flex; flex-direction: column; gap: 8px; }
.gs-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; background: var(--bg); }
/* v91.4：分组信息合并为一行 —— 分组颜色（序号色块）/ 分组名称 / 分组球衣名称（色板）/ 小组长 */
.gs-row-main { display: grid; grid-template-columns: 26px minmax(96px, 1fr) 150px minmax(190px, 1fr);
  gap: 8px; align-items: center; }
.gs-lead-label { flex: none; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.gs-idx { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 13px; font-weight: 700; }
/* v106：小组长选人顺序（序号输入） */
.gs-pick { display: inline-flex; align-items: center; gap: 4px; }
.gs-pick em { font-style: normal; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.gs-row-mem { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; padding-left: 34px; }
.gs-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 1px 7px; border-radius: 999px; background: var(--border); color: #334155; }
.gs-chip i { font-style: normal; opacity: .65; }
/* v74：带朋友（<球员名>友N）——虚线边框加以区分 */
.gs-chip-guest { border: 1px dashed #cbd5e1; background: #f8fafc; color: #64748b; }
.gs-chip-none { font-size: 12px; color: var(--text-light); }
/* v116（用户需求 1）：**已取消报名**的组员 —— 仍保留在组名单里（位置不丢，恢复报名即回到本组），
 *   灰字 + 删除线，并挂「已取消」小标签；**不计入小组人数**（人数由服务端 count 给出）。
 *   ⚠️ 删除线只加在姓名/号码上：text-decoration 会向后代传播，加在 chip 上会把「已取消」标签也划掉。 */
.gs-chip-cx { background: #f1f5f9; color: #94a3b8; }
.gs-chip-cx .gs-chip-nm { text-decoration: line-through; }
.gs-chip-cx > i { opacity: .45; text-decoration: line-through; }
.gs-chip-tag { font-style: normal; font-size: 10px; line-height: 1.4; padding: 0 5px;
  border-radius: 999px; background: #e2e8f0; color: #64748b; }
/* v116（用户需求 2）：「✕ 移出本组 → 回到待分组」（**仅「分组中」**渲染出来） */
.gs-chip-x { font-style: normal; font-weight: 700; font-size: 11px; line-height: 1;
  width: 15px; height: 15px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: #fee2e2; color: #b91c1c; cursor: pointer; }
.gs-chip-x:hover { background: #fecaca; color: #991b1b; }
/* v116：小组人数（= 有效人数，不含已取消；有已取消者时补「含已取消 N 人」） */
.gs-mem-cnt { font-size: 12px; color: var(--text-muted); align-self: center; white-space: nowrap; }
.gs-mem-cnt em { font-style: normal; color: #94a3b8; }
.gs-empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: 13px; }

.gs-addcolor { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.gs-addcolor .color-pick { width: 40px; height: 32px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: none; padding: 2px; }
.gs-new-name { width: 210px; }

/* v73：分组设置——小组长搜索输入下拉
   v91.4：① 小组长与组名/颜色/球衣名同行（.gs-lead-wrap 是 grid 第 4 列，内部 flex 放「标签 + 输入框」）；
          ② 下拉层改 position: fixed（由 app.js 按输入框位置定位），原因是 absolute 会被
             .gs-rows / .modal-body 的 overflow 裁掉，永远只能露出一小截。 */
.gs-lead-wrap { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.gs-lead-wrap .gs-leader { flex: 1; min-width: 0; }
.gs-lead-drop { position: fixed; z-index: 1300;
  max-height: 224px; overflow-y: auto; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: 0 10px 28px rgba(15, 23, 42, .18); }
.gs-lead-opt { padding: 7px 10px; font-size: 13px; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.gs-lead-opt:hover { background: rgba(30, 58, 138, .08); }
.gs-lead-empty { padding: 9px 10px; font-size: 12px; color: var(--text-muted); }

/* v104：「开始分组」开关（文字左 / 开关右，观感对齐小程序 <switch color="#1e3a8a">） */
.gs-check { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.gs-check .gs-check-t { font-size: 14px; flex: 1; min-width: 0; }
.gs-check em { display: block; font-style: normal; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.gs-check.is-disabled { opacity: .6; cursor: not-allowed; }
/* 开关本体：checkbox 去原生外观 + ::after 作滑块；四边等宽 + 透明 → 选中位移不改变几何尺寸 */
.gs-switch { -webkit-appearance: none; appearance: none; flex: none; width: 46px; height: 26px;
  margin: 0; border: 0; border-radius: 999px; background: #cbd5e1; position: relative;
  cursor: pointer; transition: background .18s ease; }
.gs-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .28);
  transition: transform .18s ease; }
.gs-switch:checked { background: var(--primary); }
.gs-switch:checked::after { transform: translateX(20px); }
.gs-switch:disabled { cursor: not-allowed; }
.gs-switch:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.gs-tip { margin-top: 10px; font-size: 12px; color: var(--text-muted); line-height: 1.6; }
/* v106：「选人顺序」提示行——渲染在「开始分组」开关正下方（需求要求的位置） */
.gs-order { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 8px; font-size: 12px; }
.gs-order-l { color: var(--text-muted); flex: none; }
.gs-order-t { font-weight: 600; color: var(--primary); }
.gs-order-ok { color: #15803d; font-size: 11px; border: 1px solid #bbf7d0;
  background: #f0fdf4; border-radius: 999px; padding: 1px 7px; }
.gs-order-w { color: #b45309; font-size: 11px; border: 1px solid #fde68a;
  background: #fffbeb; border-radius: 999px; padding: 1px 7px; }

/* v108：「选人顺序编排」区——N 行 = N 轮，每行一组顺序（替代 v106 的每组序号输入） */
.gs-rounds-wrap { margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--border, #cbd5e1);
  border-radius: 8px; background: #f8fafc; }
.gs-rounds-title { font-size: 12px; font-weight: 600; color: var(--text, #0f172a); }
.gs-rounds-title em { display: block; font-style: normal; font-weight: 400;
  color: var(--text-muted, #64748b); font-size: 11px; margin-top: 2px; line-height: 1.5; }
.gs-rounds { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.gs-rnd { display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; padding: 4px 6px; }
.gs-rnd-no { flex: none; font-size: 11px; color: var(--text-muted, #64748b);
  min-width: 44px; }
.gs-rnd-seq { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.gs-rnd-arrow { font-style: normal; color: var(--text-muted, #94a3b8); font-size: 11px; }
.gs-rnd-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  border: 1px solid #cbd5e1; border-left-width: 3px; border-radius: 999px;
  padding: 2px 8px; background: #fff; }
.gs-rnd-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gs-rnd-mv { cursor: pointer; font-weight: 700; color: var(--primary, #2563eb);
  font-size: 12px; padding: 0 2px; user-select: none; }
.gs-rnd-mv:hover { text-decoration: underline; }
.gs-rnd-op { flex: none; display: inline-flex; gap: 4px; }
.gs-rnd-btn { cursor: pointer; font-size: 12px; width: 20px; height: 20px; line-height: 18px;
  text-align: center; border: 1px solid var(--border, #cbd5e1); border-radius: 4px;
  background: #fff; color: var(--text, #0f172a); user-select: none; }
.gs-rnd-btn:hover { background: #f1f5f9; }
.gs-rnd-del { color: var(--danger, #dc2626); border-color: #fecaca; }
.gs-rnd-add { margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gs-rnd-hint { font-size: 11px; color: var(--text-muted, #64748b); }
.gs-rounds-warn { margin-top: 6px; font-size: 11px; line-height: 1.6; }
.gs-rnd-warn { display: inline-block; color: #b45309; border: 1px solid #fde68a;
  background: #fffbeb; border-radius: 6px; padding: 3px 8px; }
.gs-rnd-ok { display: inline-block; color: #15803d; border: 1px solid #bbf7d0;
  background: #f0fdf4; border-radius: 6px; padding: 3px 8px; }

@media (max-width: 760px) {
  /* v91.1：三列（序号/组名/颜色）——原两列会让颜色 select 掉进 24px 列被压扁
     v108：v106 的「顺序」列已移除，改为「序号色块 + 组名 + 颜色」三列 */
  .gs-row-main { grid-template-columns: 24px minmax(0, 1fr) 110px; }
  /* v91.4：窄屏四列并排会挤到不可用 → 小组长换行独占整行（桌面端仍为一行） */
  .gs-lead-wrap { grid-column: 1 / -1; }
  .gs-row-mem { padding-left: 0; }
  .gs-new-name { width: 100%; }
  .gs-addcolor { flex-wrap: wrap; }
}
