/* =====================================================
 * 广州星界足球俱乐部 · 管理端补充样式 (v65)
 * 仅被 index.html 引用（与 styles.css 并行加载）。
 * 职责：
 *   1. 「管理员模式 ⇆ 球员模式」顶部栏样式（v65 取代黄色 actor-bar）
 *   2. 手机端（≤768px）布局适配：侧边栏 → 底部 tabbar、
 *      页头堆叠、表格横向滚动、弹窗全屏化。
 * PC 端（>768px）除 topbar 外零影响——所有布局改动都包在
 * media query 内。
 * ===================================================== */

/* ============== v65：管理员模式顶栏（PC + 手机通用） ============== */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* v70.33：banner 宽度与球员模式保持一致（全宽），padding 与 .p-header 对齐 */
  width: 100%;
  padding: 12px 14px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .15);
}
/* v70.33：与球员模式 .p-header 相同的顶部安全区避让（iPhone 刘海屏） */
@supports (padding: max(0px)) {
  .admin-topbar { padding-top: max(12px, env(safe-area-inset-top)); }
}
.admin-topbar[hidden] { display: none; }
.admin-topbar-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  letter-spacing: .5px;
}
/* v70.34：管理模式左上角队徽 + 队名（样式与球员模式 .p-header 对齐） */
.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.admin-topbar-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .18);
}
.admin-topbar-team { min-width: 0; }
.admin-topbar-name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.3;
  white-space: nowrap;
}
.admin-topbar-sub {
  display: block;
  font-size: 9px;
  opacity: .8;
  letter-spacing: 1.5px;
  margin-top: 1px;
  line-height: 1.3;
  white-space: nowrap;
}
.admin-mode-chip {
  /* v70.32：相对定位——待审核红点（小圆点）锚定在 chip 右上角，位置与球员模式一致 */
  position: relative;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
}
.admin-mode-chip:hover { background: rgba(255, 255, 255, .32); }
.admin-mode-chip:active { transform: scale(.97); background: rgba(255, 255, 255, .42); }
.admin-mode-chip-text { display: inline-flex; align-items: center; gap: 4px; }

/* ============== 手机端布局（≤768px） ============== */
@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 13px; }

  /* 整体：侧边栏不再占左列，内容全宽 */
  .app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  /* 侧边栏 → 底部固定 tabbar */
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: auto;
    flex-direction: row;
    z-index: 500;
    background: linear-gradient(180deg, #1e3a8a 0%, #172554 100%);
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(15, 23, 42, .18);
  }
  .sidebar .brand { display: none; }          /* logo 区手机不占空间 */
  .sidebar-footer { display: none; }          /* 底部 tip 手机隐藏（已在 tabbar 之下） */
  .sidebar .nav {
    flex: 1;
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar .nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 1 0 auto;
    min-width: 72px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 8px 6px;
    margin: 0;
    border-radius: 0;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
  }
  .nav-icon { font-size: 18px; line-height: 1; }
  .nav-item.active { border-radius: 0; box-shadow: none; }
  .nav-item.active .nav-icon { transform: translateY(-1px); }

  /* 主内容：留出底部 tabbar 高度 */
  .content {
    padding: 12px 10px calc(72px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }

  /* 页头：标题 + 操作区纵向堆叠 */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
  }
  .page-header h1 { font-size: 18px; }
  .page-actions { flex-wrap: wrap; gap: 8px; }
  .page-actions .input-search { flex: 1 1 140px; min-width: 120px; }
  .page-actions .select { min-width: 0; }

  /* 首页 hero：竖排 */
  .home-hero {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    padding: 20px 14px;
  }
  .home-hero::before { display: none; }
  #heroLogo { width: 72px !important; height: 72px !important; }
  .hero-stats { justify-content: center; }

  /* 卡片内边距收紧 */
  .card-body { padding: 12px; }
  .card-head { padding: 12px; flex-wrap: wrap; gap: 8px; }
  .card-head h3 { font-size: 15px; }

  /* 表格：允许横向滑动 + 字号收紧 */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* v70.18：手机宽度下表格查看更清晰——表头吸顶、自然列宽、首列固定、紧凑行距 + 斑马纹 */
  .data-table { font-size: 12px; min-width: 0; width: max-content; }
  .data-table th, .data-table td { padding: 7px 8px; white-space: nowrap; }
  .table-wrap thead th { position: sticky; top: 0; z-index: 3; background: #eef2f7; box-shadow: 0 1px 0 rgba(15, 23, 42, .08); }
  .table-wrap th:first-child, .table-wrap td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; }
  .table-wrap thead th:first-child { z-index: 4; background: #eef2f7; }
  .table-wrap tbody tr:nth-child(even) td { background: #f8fafc; }
  .table-wrap tbody tr:nth-child(even) td:first-child { background: #f8fafc; }
  .row-actions { flex-wrap: wrap; gap: 4px; }

  /* 号码墙：格子收紧 */
  .numwall { gap: 6px; }

  /* 弹窗：近全屏 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
    margin: 0;
  }
  .modal-body { padding: 12px; max-height: calc(92vh - 108px); }
  .modal-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 120px; }

  /* 手机端弹窗内嵌「个人页面」iframe 视图 */
  .pv-phone { width: 100% !important; max-width: 100% !important; }

  /* 子标签 / tabs 横向滚动 */
  .tabs, .sub-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar, .sub-tabs::-webkit-scrollbar { display: none; }

  /* 分页器：允许换行 */
  .pager { flex-wrap: wrap; gap: 4px; }

  /* 表单（弹窗内新增/编辑）：栅格单列 */
  .form-row { grid-template-columns: 1fr !important; gap: 6px 0 !important; }

  /* 排行榜行收紧 */
  .ranking-item { padding: 8px 10px; }
}


/* ===== v68：管理端页面卡片化（球队人员 / 踢球登记 / 场地管理） ===== */
.pcard-grid, .mcard-grid, .vcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.pcard, .mcard, .vcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.pcard:hover, .mcard:hover, .vcard:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
  border-color: var(--primary-light);
}
.pcard.is-inactive, .mcard.is-cancelled { opacity: .62; }
/* v70.51：球员卡片余额少于 0 元 → 整卡红色边框（hover 保持红色，号码墙规则不变） */
.pcard.pcard-debt, .pcard.pcard-debt:hover { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }

/* 球员卡 */
.pcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pcard-head .num-tag { width: 40px; height: 40px; font-size: 18px; flex: none; }
.pcard-title { min-width: 0; }
.pcard-name { font-weight: 700; font-size: 15px; color: var(--text); }
.pcard-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pcard-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pcard-stat { background: #f1f5f9; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.pcard-stat-num { font-size: 15px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.pcard-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 比赛卡 */
.mcard-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.mcard-date { font-weight: 700; color: var(--text); white-space: nowrap; }
.mcard-week { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.mcard-score { font-weight: 700; color: var(--primary); white-space: nowrap; }
.mcard-opp { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.mcard-venue { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.mcard-fee { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.mcard-fee-label { color: var(--text-muted); }
.mcard-fee strong { color: var(--danger); font-size: 15px; }
.mcard-att { color: var(--text-muted); margin-left: auto; }
.mcard-feebar { margin-bottom: 8px; }
.mcard-actions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }

/* 场地卡 */
.vcard-head { margin-bottom: 10px; }
.vcard-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vcard-courts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; min-height: 22px; }
.vcard-meta { border-top: 1px dashed var(--border); padding-top: 10px; margin-bottom: 12px; }
.vcard-meta-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--text-muted); }
.vcard-meta-row strong { color: var(--text); }

@media (max-width: 768px) {
  .pcard-grid, .mcard-grid, .vcard-grid { grid-template-columns: 1fr; }
}

/* ===== v69：号码墙（电脑端显示；微信端隐藏，仅卡片） ===== */
.numwall {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 17px 19px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  margin-bottom: 12px;
  align-items: center;
  /* v70.2：覆盖 styles.css 旧规则 max-height:200px; overflow:hidden ——
     号码多时不再被裁剪，页面可正常滚动查看 */
  max-height: none;
  overflow: visible;
}
.numwall-empty { font-size: 12px; color: #94a3b8; padding: 6px 3px; }
.ntile {
  position: relative;   /* v101：右上角「余额不足」红点的定位锚点 */
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 10px;
  /* v101：边框统一为 2px 透明——各状态只改「边框色 / 底色」，盒模型几何恒等。
     旧方案（v70.15~v100）用 border-top 加粗 3px 表达状态，上下不对称且宽度跳变，
     是「边框难看」的主因；现改为四边等宽、通体透明，无状态的格子彻底无边框。 */
  border: 2px solid transparent;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: transform .1s, box-shadow .15s;
}
.ntile:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(30, 58, 138, .35); }
.ntile:active { transform: scale(.96); }
.ntile-num { font-weight: 700; font-size: 15px; min-width: 26px; text-align: center; color: #fff; }
.ntile-name { font-size: 14px; color: #fff; }
/* ===== v101：号码墙状态配色（六态，底色/边框只表达绑定状态，欠费改为红点修饰） =====
   微信/小程序未绑定      → 灰底 #94a3b8，无边框
   微信网页绑定          → 蓝底 var(--primary)，无边框
   小程序绑定            → 蓝底 + 绿边框 #16a34a
   小程序/微信待审核      → 灰底 + 黄边框 #eab308
   余额不足（欠费）       → 在上述任一状态上叠加「右上角红点」（见 .ntile.is-debt::after）
                           v127：判据 = 余额 **≤ 0**（此前误用「< 50」，余额充足也亮红点）
   优先级：待审核 > 小程序绑定 > 微信网页绑定 > 未绑定 */
.ntile-n { background: #94a3b8; }
.ntile-b { background: var(--primary); }
.ntile-mp { background: var(--primary); border-color: #16a34a; }
.ntile-p { background: #94a3b8; border-color: #eab308; }
.ntile-mp:hover { box-shadow: 0 4px 10px rgba(22, 163, 74, .35); }
.ntile-p:hover { box-shadow: 0 4px 10px rgba(234, 179, 8, .35); }
/* v101：余额不足 → 右上角红点（与绑定状态正交，任何底色上都能叠加）。
   尺寸/位置/配色**逐值对齐 v70.28 的 .pending-badge**（10px / -3px / #ef4444 / 2px 白描边），
   让「红点」在全站只有一种视觉语言；白描边把红点从深蓝/灰底色里“抠”出来，跨状态一致可辨。 */
.ntile.is-debt::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}
/* v70.2：球员卡片"已绑定"徽章与号码墙已绑定号码同色（绿 #047857） */
.pcard-badges .badge-yes { background: #ecfdf5; color: #047857; }
/* v127：球员卡片欠费红框（.pcard-debt，见上 .pcard.pcard-debt）判据同样收敛为余额 ≤ 0，
   与号码墙红点、小程序 players 卡片 debt 三处同口径。 */
@media (max-width: 768px) {
  .numwall { display: none !important; }
}


/* ============== v70.27：比赛结果边框（赢绿 / 平黄 / 输红） ============== */
.mcard.is-win { border-color: #16a34a; }
.mcard.is-draw { border-color: #eab308; }
.mcard.is-lose { border-color: #dc2626; }

/* ============== v70.28/v70.32：管理员模式标签待审核红点（右上角红色小圆点，不带数字；处理完自动消除） ============== */
.pending-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  font-size: 0;
  line-height: 0;
}
.pending-badge[hidden] { display: none; }

/* ===== v70.39：操作日志 / 回收站 ===== */
.log-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.log-detail { max-width: 440px; white-space: normal; word-break: break-all; color: #555; }
#page-recycle .tabs { margin-left: auto; }

/* v70.40：回收站硬删除按钮（覆盖 btn-ghost 的 hover 优先级） */
.btn-ghost.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-ghost.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

/* ===== v70.42：赞助商管理 ===== */
.sp-logo { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.sp-logo.ph {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff;
  font-size: 18px; border-radius: 8px;
}
.vcard-head .vcard-name { display: flex; align-items: center; gap: 8px; }
.sp-biz { color: var(--text-light); font-size: 12px; padding: 2px 0 6px; }
.sp-logo-row { display: flex; align-items: center; gap: 12px; }
.sp-detail-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.sp-detail-head .sp-logo { width: 56px; height: 56px; font-size: 24px; }
.sp-detail-name { font-size: 18px; font-weight: 700; }
.sp-detail-biz { color: var(--text-light); font-size: 13px; margin-top: 2px; }
.sp-detail-stat { font-size: 13px; margin-top: 6px; color: #333; }
.sp-detail-stat b { color: #1e3a8a; }
.sp-player-box {
  max-height: 140px; overflow-y: auto; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.sp-pick-item { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; }
.sp-reg-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ===== v70.44：赞助商列表卡片化（球员为主体） ===== */
/* v70.45：参考球队人员卡片布局（号码+姓名 / 公司名 / 金额+物资次数） */
/* v70.47：赞助商名称加大两个字号（13→15px）；列表一行显示 3 个赞助商（桌面端） */
#sponsorCards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { #sponsorCards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { #sponsorCards { grid-template-columns: 1fr; } }
.sp-card .pcard-head { margin-bottom: 8px; }
.sp-company {
  font-size: 15px; color: #64748b; margin: 6px 0 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-card .pcard-stats { margin-bottom: 2px; }
.sp-card .vcard-actions { margin-top: 10px; }

/* ===== v70.45：球员端展示开关（详情弹窗关联球员右侧） ===== */
.sp-pick-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sp-pick-search { flex: 1 1 280px; position: relative; min-width: 0; }
.sp-show-label {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 13px; color: #334155; cursor: pointer; user-select: none;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px;
}
.sp-show-label input { accent-color: #1e3a8a; width: 15px; height: 15px; }
.sp-show-badge {
  flex: none; font-size: 12px; color: #16a34a; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 6px; padding: 5px 10px;
}

/* ===== v70.43：赞助商详情加宽 + 关联球员可搜索单选 + 登记编辑 ===== */
.modal-wide { max-width: 940px !important; }
.sp-reg-ops { white-space: nowrap; }
.sp-pick-search { position: relative; }
.sp-pick-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  max-height: 190px; overflow-y: auto; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
.sp-pick-list .sp-pick-item {
  display: block; padding: 8px 10px; font-size: 13px; cursor: pointer; border-radius: 6px;
}
.sp-pick-list .sp-pick-item:hover { background: #eef2ff; color: #1e3a8a; }
.sp-pick-chosen {
  display: inline-flex; align-items: center; gap: 4px; background: #eef2ff;
  color: #1e3a8a; border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600;
}
.sp-pick-clear { cursor: pointer; color: #dc2626; margin-left: 4px; font-size: 15px; line-height: 1; }
.sp-pick-chosen[hidden] { display: none; }

/* ===== v81：球衣管理 ===== */
/* 列表卡片：桌面一行 3 个（与赞助商卡片一致） */
#jerseyCards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { #jerseyCards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { #jerseyCards { grid-template-columns: 1fr; } }
/* v87：卡片宽度收窄到 0.8 倍（栅格仍是 3 列，卡片只占单元格的 80%，靠左）；
   v89.2：再缩小三分之一 → 80% × 2/3 ≈ 53%；
   高度不写死——网格项默认 align-self:stretch，行高由内容决定，收窄宽度不会改变高度。 */
#jerseyCards .jcard { width: 53%; justify-self: start; }

.jcard .pcard-head { margin-bottom: 8px; }
.jcard .pcard-head .color-dot { width: 34px; height: 34px; flex: none; }
.jcard-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.jcard-row { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; align-items: baseline; }
.jcard-k { color: var(--text-muted); flex: none; width: 60px; }
.jcard-v { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v83：赞助商 / 关联球员改多行显示（逐项一行，不再被截断成省略号） */
.jcard-row-multi { align-items: flex-start; }
.jcard-row-multi .jcard-v { overflow: visible; white-space: normal; text-overflow: clip; }
.jcard-li { display: block; line-height: 1.6; }
/* v83：卡片上的报名人数（醒目位） */
.jcard-count {
  font-size: 13px; color: var(--text-muted); background: #f1f5f9; border-radius: 8px;
  padding: 5px 10px; margin: 6px 0 4px;
}
.jcard-count b { color: var(--primary); font-size: 15px; margin: 0 2px; }
.jcard-actions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }

/* 状态徽标 */
.jtag { font-size: 11px; border-radius: 6px; padding: 2px 7px; white-space: nowrap; line-height: 1.5; }
.jtag-open { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.jtag-ended { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.jtag-off { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.jtag-muted { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
/* v83：已发球衣（紫） */
.jtag-handout { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }

/* 绿色「发起报名」/ 灰色「重新启用接龙」 */
.btn-green { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-green:hover { background: #15803d; border-color: #15803d; }
.btn-gray { background: #cbd5e1; color: #fff; border-color: #cbd5e1; }
.btn-gray:hover { background: #94a3b8; border-color: #94a3b8; }

/* 详情弹窗 */
.jp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.jp-head .color-dot { width: 34px; height: 34px; flex: none; }
.jp-title { font-size: 17px; font-weight: 700; color: var(--text); }
.jp-year { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.jp-info { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.jp-info-row { display: flex; gap: 12px; font-size: 13px; padding: 4px 0; align-items: baseline; }
.jp-info-k { color: var(--text-muted); flex: none; width: 96px; }
.jp-info-v { color: var(--text); min-width: 0; word-break: break-all; }
.jp-info-v a { color: var(--primary); }
.jp-sect-t {
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.jp-sect-sub { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.jp-sect-t .btn { margin-left: auto; }
.jp-sum .jp-nums { display: flex; flex-wrap: wrap; gap: 5px; }
.jp-num-chip {
  display: inline-block; min-width: 30px; text-align: center; background: #f1f5f9;
  border-radius: 6px; padding: 2px 7px; font-size: 12px; color: var(--text);
}
.jp-total td { font-weight: 700; background: #f8fafc; }
.jp-miss { color: #b45309; font-size: 12px; }
/* v83：详情里的多值（赞助商 / 赞助关联球员）逐项一行 */
.jp-multi { display: block; }
.jp-multi-li { display: block; line-height: 1.7; }
/* v83：报名规则（保留换行原文） */
.jp-rule { display: block; white-space: normal; line-height: 1.7; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.jp-sub-note { font-size: 12px; color: var(--text-muted); }
/* v83：报名规则输入框（textarea 自适应高度，纵向可拉伸） */
textarea.input { min-height: 84px; line-height: 1.6; resize: vertical; font-family: inherit; }

/* 表单：球员多选（v82：占满弹窗整页宽度——宽弹窗 + 自适应多列网格 + 更高滚动区） */
.jp-opt { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.jp-picks {
  /* v87：高度收窄到原来的一半（原 min(52vh, 420px)）——关联球员多时下方「赞助商名字」被推得太远 */
  max-height: min(26vh, 210px); overflow-y: auto; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; width: 100%; box-sizing: border-box;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 16px;
}
/* v83：关联球员选择框改为「多行显示」——两列自适应，一行放两人，姓名不再被截断 */
.jp-picks-multi { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 20px; }
.jp-picks-multi .jp-pick { padding: 3px 0; }
.jp-picks-multi .jp-pick-name { overflow: visible; white-space: normal; text-overflow: clip; }
.jp-pick { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.jp-pick input { accent-color: #1e3a8a; flex: none; }
.jp-pick-num { color: var(--primary); font-weight: 700; min-width: 26px; text-align: right; flex: none; }
.jp-pick-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-color-input { width: 56px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.jp-sample { max-width: 120px; max-height: 90px; border-radius: 8px; border: 1px solid var(--border); }

/* ===== v85：球衣表单「多控件行」改为单列铺满 =====
   .form-row 是 130px + 1fr 两列网格；下含多个控件的行（关联球员选择框、赞助商/码数行、
   文本域、样图）会按自动布局把第 3 个控件丢进 130px 的标签窄列 —— 关联球员选择框因此被挤成
   窄窄一列并出现横向滚动条。这类行统一加 .jp-full 走单列。 */
.form-row.jp-full { grid-template-columns: 1fr; gap: 6px; }
.form-row.jp-full .field-tip { grid-column: 1; }

/* v85：发球衣 · 关联友谊赛选择弹窗 */
.jp-ho-tip { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.6; }
.jp-ho-list {
  display: flex; flex-direction: column; gap: 2px; max-height: min(52vh, 420px);
  overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
}
.jp-ho-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 6px 0; }
.jp-ho-item input { accent-color: #1e3a8a; flex: none; }
.jp-ho-none { color: var(--text-muted); }
.jp-handout-match { color: #6d28d9; font-weight: 600; }

/* v85：比赛「发球衣」徽标（位置与「内部邀请」一致） */
.badge-handout { background: #ede9fe; color: #6d28d9; }

/* v85：线下收费球员的「本场扣费」文案 */
.fee-offline { color: #b45309; font-weight: 600; font-size: 12px; }
/* v86：门将模式球员的「本场扣费」——本人份免场租/额外收费分摊 */
.fee-gk { color: #6d28d9; font-weight: 600; font-size: 12px; }

/* v82：球衣图样缩略图（卡片 + 详情），点击在页面内浮层看大图 */
.jcard-figure { margin: 2px 0 8px; display: flex; align-items: center; gap: 8px; }
.jcard-thumb {
  width: 56px; height: 66px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); background: #f8fafc; cursor: zoom-in;
}
.jcard-figure-tip { font-size: 11px; color: var(--text-muted); }
.jp-figure { display: inline-flex; align-items: center; gap: 8px; }
.jp-figure-thumb {
  max-width: 132px; max-height: 96px; border-radius: 8px;
  border: 1px solid var(--border); cursor: zoom-in; vertical-align: middle;
}
/* 图片浮层：点图片可切到原始尺寸（滚动看细节） */
.img-lightbox {
  position: fixed; inset: 0; z-index: 5000; background: rgba(15, 23, 42, .9);
  display: flex; overflow: auto; padding: 28px;
}
.img-lightbox[hidden] { display: none; }
.img-lightbox img {
  margin: auto; max-width: 92vw; max-height: 88vh; border-radius: 10px;
  background: #fff; cursor: zoom-in;
}
.img-lightbox img.is-actual { max-width: none; max-height: none; cursor: zoom-out; }
.img-lightbox-close {
  position: fixed; top: 18px; right: 22px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: #0f172a;
  font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.img-lightbox-close:hover { background: #fff; }
/* v82：码数列表 / 赞助商名单（逐行编辑，复用场地号的 court-row 版式） */
#jp_sizeRows .sz-code, #jp_sizeRows .sz-label, #jp_sponRows .sp-inp { flex: 1 1 auto; min-width: 0; }

/* ===== v84：场租管理 →「线下收费登记」 =====
   上部球员卡片（号码 / 姓名 / 未收费金额）+ 下部按场次勾选是否收费 */
.off-total { font-size: 13px; color: var(--text-muted); }
.off-total b { color: var(--danger); font-size: 16px; margin-left: 2px; }
.off-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px;
}
.off-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fff;
}
.off-card.due { border-color: #fecaca; background: #fef2f2; }
.off-card.clear { background: #f0fdf4; border-color: #bbf7d0; }
.off-card-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.off-card-name { font-size: 14px; font-weight: 600; color: var(--text); }
.off-card-amt { display: flex; align-items: baseline; gap: 6px; }
.off-card-amt .v { font-size: 20px; font-weight: 700; color: var(--danger); }
.off-card.clear .off-card-amt .v { color: #16a34a; }
.off-card-amt .l { font-size: 11px; color: var(--text-muted); }
.off-card-sub { margin-top: 6px; font-size: 11px; color: var(--text-muted); }
/* v88 需求1：球员卡片可点击 → 弹出该球员的未收金额 + 各场线下收费明细 */
.off-card-click { cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.off-card-click:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .12); transform: translateY(-1px); }
.off-card-click:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.off-card-more { margin-top: 8px; font-size: 11px; color: var(--primary, #2563eb); }
/* 是否收费勾选框 */
.off-chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.off-chk input { width: 16px; height: 16px; cursor: pointer; margin: 0; }
.off-chk input:disabled { cursor: not-allowed; }

/* ====================== v146：队费管理（财务管理 → 队费管理 tab） ====================== */
/* 看板总额格下的收入构成明细行（批量扣费 + 赞助 + 其他收入） */
.fin-break { font-size: 11px; color: var(--text-muted, #64748b); margin-top: 4px; line-height: 1.5; }
/* 收支表凭证缩略图（点击进大图浮层） */
.fin-att {
  width: 44px; height: 44px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border, #e2e8f0); cursor: zoom-in; display: block;
}
.fin-att:hover { border-color: var(--primary, #2563eb); }
/* v155：凭证取图失败占位（带鉴权取图 401/网络失败时不再留白，明确告知） */
.fin-att-fail {
  background: #fef2f2; border-color: #fecaca; border-style: dashed;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #b91c1c; text-align: center; line-height: 1.2;
}
/* 登记弹窗里的凭证预览容器 */
.fin-att-prev { margin-top: 8px; }
.fin-att-prev .fin-att { width: 88px; height: 88px; }

/* ====================== v136：场租数据面板 ====================== */
.rental-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.rstat {
  flex: 1 1 160px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 12px 14px; position: relative; min-width: 0;
}
.rstat .v { font-size: 20px; font-weight: 700; line-height: 1.25; word-break: break-all; }
.rstat .l { font-size: 12px; color: var(--text-muted, #64748b); margin-top: 3px; }
/* 预充值（待核销）格：悬停/键盘聚焦弹出待核销明细 */
.rstat-prepaid { cursor: help; outline: none; }
.rstat-prepaid:hover, .rstat-prepaid:focus { border-color: #f59e0b; background: #fffbeb; }
.rstat-pop {
  display: none; position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 60;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16); padding: 10px 12px;
  max-height: 260px; overflow: auto; cursor: default; text-align: left;
}
.rstat-prepaid:hover .rstat-pop,
.rstat-prepaid:focus .rstat-pop,
.rstat-prepaid.pop-open .rstat-pop { display: block; }
.rstat-pop-hd { font-size: 12px; font-weight: 700; color: #b45309; margin-bottom: 6px; }
.rstat-pop-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 3px 0; border-bottom: 1px dashed #f1f5f9; }
.rstat-pop-row b { color: #16a34a; white-space: nowrap; }
.rstat-pop-note { font-size: 11px; color: var(--text-muted, #64748b); padding: 1px 0 3px 0; }
/* v137：悬浮明细向下弹出，会被 .card 的 overflow:hidden 裁剪 —— 面板卡放开裁剪
   （弹层自身有边框/阴影，视觉不受影响） */
#rentalPanel { overflow: visible; }
/* v138：悬浮明细滚动修复 —— 弹层 top 与格子底边之间有 6px 空隙，鼠标从格子移向弹层
   途中离开格子边界 → :hover 断开 → 弹层消失，永远够不到滚动条。
   用 ::before 把弹层可悬停区向上延伸 8px 补上空隙（弹层是格子的子元素，
   悬停弹层期间父级 :hover 仍然成立，弹层不会关）。 */
.rstat-pop::before {
  content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
