/* ===== 四季挥拍活动活动系统 - 移动优先样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #2f7d31;
  --primary-dark: #256628;
  --bg: #f3f6f3;
  --card: #ffffff;
  --text: #222;
  --text-1: #222;
  --text-2: #666;
  --line: #e3e8e3;
  --danger: #d64541;
  --warn: #e6a817;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ===== 通用卡片与表单 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin: 10px 4px;
}
.form { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-top: 6px;
  margin-bottom: 2px;
}
.field-label:first-of-type, .field-label + select, .field-label + input { margin-top: 0; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  outline: none;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--primary); }
.form input[type="number"] { -moz-appearance: textfield; }
.form-row {
  display: flex;
  gap: 8px;
}
.form-row input {
  flex: 1;
  min-width: 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px;
  border: none; border-radius: 8px;
  font-size: 15px; cursor: pointer;
  background: #eef2ee; color: var(--text);
  transition: opacity .15s, transform .1s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:active { background: var(--primary-dark); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 6px; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.msg { min-height: 20px; color: var(--danger); font-size: 13px; margin-top: 8px; text-align: center; }
.msg.ok { color: var(--primary); }

/* ===== 登录页 ===== */
.view { min-height: 100vh; }
#auth-view { display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { max-width: 380px; width: 100%; text-align: center; padding: 28px 24px; }
.logo { font-size: 42px; }
.auth-card h1 { font-size: 22px; margin: 6px 0 2px; color: var(--primary); }
.subtitle { color: var(--text-2); font-size: 13px; margin-bottom: 16px; }

.tabs { display: flex; background: #eef2ee; border-radius: 8px; padding: 3px; margin-bottom: 14px; }
.tab { flex: 1; padding: 8px; border: none; background: transparent; border-radius: 6px; font-size: 15px; cursor: pointer; }
.tab.active { background: #fff; font-weight: 600; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.radio-row { display: flex; gap: 16px; justify-content: center; font-size: 14px; }

/* ===== 主界面布局 ===== */
#main-view { max-width: 720px; margin: 0 auto; padding-bottom: 70px; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--primary); color: #fff;
  padding: 10px 14px;
}
.brand { font-weight: 700; font-size: 17px; }
.userbox { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.userbox .btn { color: #fff; padding: 3px 8px; }
.userbox .btn:active { background: rgba(255,255,255,.2); }

.tabbar {
  position: sticky; top: 46px; z-index: 40;
  display: flex; background: #fff;
  border-bottom: 1px solid var(--line);
}
.tabnav {
  flex: 1; padding: 11px 0; border: none; background: transparent;
  font-size: 15px; color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabnav.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.panel { display: none; padding: 10px 8px 20px; }
.panel.active { display: block; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; }
.panel-head h2 { font-size: 17px; }
.label { font-size: 12px; color: var(--text-2); padding: 3px 8px; background: #eef2ee; border-radius: 20px; }
.empty-tip { color: var(--text-2); text-align: center; padding: 30px 10px; font-size: 14px; }

/* ===== 活动列表 ===== */
.activity-list { margin-top: 4px; }
.activity-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px; margin: 8px 4px;
  cursor: pointer;
}
.activity-item:active { background: #f7faf7; }
.activity-main { flex: 1; min-width: 0; }
.activity-title { font-weight: 600; font-size: 15px; }
.activity-meta { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.activity-count { text-align: right; font-size: 13px; color: var(--primary); font-weight: 600; }
.chip { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 6px; vertical-align: 1px; }
.chip.open { background: #e8f5e8; color: var(--primary); }
.chip.playing { background: #fff4db; color: var(--warn); }
.chip.closed { background: #f0f0f0; color: #999; }

/* ===== 报名区 ===== */
.signup-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.member-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 16px;
  background: #eef2ee; font-size: 14px;
}
.member-chip.confirmed { background: #d9ecd9; }
.member-chip.queue { background: #f7f0dd; color: var(--text-2); }
.member-chip .gender { font-size: 12px; }
.member-chip .chip-cancel-proxy {
  cursor: pointer; margin-left: 4px; color: #c0392b; font-weight: 700;
  border: none; background: transparent; padding: 0 3px; font-size: 13px; line-height: 1;
}
.member-chip .chip-cancel-proxy:hover { background: #fdecea; border-radius: 4px; }
.member-chip .remove-x { cursor: pointer; margin-left: 2px; color: var(--danger); font-weight: 700; }
.member-chip.can-drag { cursor: grab; }
.member-chip.can-drag:active { cursor: grabbing; }

/* ===== 场地区 ===== */
.court-area { margin-top: 6px; }
.court {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px; margin: 8px 4px;
  border-left: 4px solid var(--primary);
}
.court-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.court-name { font-weight: 600; }
.court-people { list-style: none; min-height: 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.court-people li {
  padding: 6px 12px; background: #eef4ff; border-radius: 16px;
  font-size: 14px; cursor: grab; user-select: none;
}
.court-people li.dragging { opacity: .4; }
.court-people li.over { outline: 2px dashed var(--primary); }
.court-empty { color: var(--text-2); font-size: 13px; line-height: 40px; }

/* 待安排成员池 */
#pool-area {
  min-height: 46px; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px; background: #f7faf7; border-radius: 10px;
  border: 1px dashed var(--line); margin-top: 8px;
}
.pool-tip { color: var(--text-2); font-size: 12px; width: 100%; }

/* ===== 对局卡片 ===== */
.match-card {
  background: #fffbea; border: 1px solid #f0e2b3;
  border-radius: 10px; padding: 10px 12px; margin: 10px 4px 0;
}
.match-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.match-head .court-flag { font-weight: 600; color: #9a7d14; }
.match-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.match-cell { text-align: center; }
.match-cell .nick { font-size: 13px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-cell input { width: 58px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.match-cell .y-label { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.match-actions { display: flex; gap: 8px; margin-top: 8px; }
.match-actions .btn { flex: 1; }

/* ===== 结算区 ===== */
.final-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.final-grid .item label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.final-grid .item input { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.final-note textarea { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; min-height: 52px; }

/* 账单表 */
.bill-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2px; border-bottom: 1px dashed var(--line);
}
.bill-row:last-child { border-bottom: none; }
.bill-nick { font-weight: 500; }
.bill-sub { font-size: 12px; color: var(--text-2); }
.bill-amount { font-weight: 700; color: var(--primary); }
.bill-amount.pos { color: var(--danger); }
.summary-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding: 3px 0; }
.summary-line b { color: var(--text); }

/* ===== 排行表 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--line); }
th { color: var(--text-2); font-weight: 500; font-size: 13px; }
tr.rank-top td { font-weight: 600; }
.rank-1 { color: #d4a017; }
.rank-2 { color: #7a8a99; }
.rank-3 { color: #c07a3a; }

/* ===== 我的账单 ===== */
.mybill-item { padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.mybill-item:last-child { border-bottom: none; }
.mybill-head { display: flex; justify-content: space-between; align-items: center; }
.mybill-title { font-weight: 600; }
.mybill-date { font-size: 12px; color: var(--text-2); }

/* ===== 弹层 ===== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-body {
  background: #fff; border-radius: 14px;
  width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto;
  padding: 16px;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { font-size: 17px; }

/* 设置区 */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.setting-row input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }

/* 系数输入 */
.coeff-chip { display: inline-flex; align-items: center; gap: 4px; margin: 4px; padding: 4px 8px; background: #f3f6f3; border-radius: 8px; font-size: 13px; }
.coeff-chip input { width: 52px; padding: 3px 5px; border: 1px solid var(--line); border-radius: 5px; text-align: center; font-size: 13px; }

/* 本次结算系数编辑区（V1.5 #4：仅本次活动生效） */
.coeff-editor { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 6px; padding: 8px; background: #f8faf8; border: 1px solid var(--line); border-radius: 8px; }
.coeff-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.coeff-nick { font-size: 13px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coeff-row input[type="number"].coeff-input { width: 60px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; text-align: center; font-size: 13px; }
.coeff-row.coeff-row-temp { background: #fffdf5; border-color: #f0e6c8; }

/* ===== 确认参与勾选区 ===== */
.confirm-box { margin-top: 10px; padding: 10px; background: #f8faf8; border: 1px solid var(--line); border-radius: 8px; }
.confirm-list { display: flex; flex-wrap: wrap; gap: 8px; }
.confirm-item { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; font-size: 14px; cursor: pointer; user-select: none; }
.confirm-item.checked { background: var(--primary); color: #fff; border-color: var(--primary); }
.confirm-item input { margin: 0; }

/* 代人报名/临时用户标记 */
.proxy-tag { display: inline-block; margin-left: 2px; padding: 0 4px; font-size: 10px; background: #e8eef8; color: #4a6fa5; border-radius: 4px; }
.temp-tag { display: inline-block; margin-left: 2px; padding: 0 4px; font-size: 10px; background: #fff3e0; color: #c47e00; border-radius: 4px; }

/* ===== 场地号输入框 ===== */
.court-no-input { max-width: 70px; font-size: 15px; }

/* ===== 管理员列表 ===== */
.admin-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; margin: 4px 0; background: #f3f6f3; border-radius: 8px; font-size: 14px; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff;
  padding: 10px 18px; border-radius: 22px;
  font-size: 14px; z-index: 300;
  max-width: 86vw; text-align: center;
  animation: toastin .2s ease;
}
@keyframes toastin { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%); } }

/* 管理标识 */
.admin-only { font-size: 12px; color: var(--text-2); }

/* ===== 俱乐部列表 ===== */
.club-list { display: flex; flex-direction: column; gap: 10px; }
.club-item { padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.club-head { display: flex; align-items: center; gap: 8px; }
.club-name { font-size: 17px; font-weight: 600; }
.club-meta { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.member-section h4 { font-size: 15px; margin-bottom: 8px; }

/* ===== 账单弹窗（手机竖屏截屏友好） ===== */
.bill-modal-card {
  background: #fff; border-radius: 12px; padding: 0;
  max-width: 420px; margin: 0 auto;
}
.bill-modal-head { text-align: center; padding: 16px 12px 8px; }
.bill-modal-title { font-size: 18px; font-weight: 700; color: var(--text); }
.bill-modal-date { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.bill-modal-summary {
  display: flex; justify-content: center; gap: 0;
  margin: 8px 12px; padding: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
}
.bill-sum-item {
  flex: 1; text-align: center; padding: 10px 4px;
  border-right: 1px solid var(--line);
}
.bill-sum-item:last-child { border-right: none; }
.bill-sum-item.total { background: #f0f7f0; }
.bill-sum-label { display: block; font-size: 12px; color: var(--text-2); }
.bill-sum-val { display: block; font-size: 16px; font-weight: 700; margin-top: 2px; }
.bill-sum-item.total .bill-sum-val { color: var(--primary); font-size: 18px; }
.bill-modal-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.bill-modal-table th {
  background: #f3f6f3; padding: 8px 6px; font-size: 13px; font-weight: 600;
  border-bottom: 2px solid var(--line);
}
.bill-modal-table th:first-child { text-align: left; padding-left: 12px; }
.bill-modal-table td {
  padding: 8px 6px; border-bottom: 1px solid var(--line);
}
.bill-modal-table td:first-child { padding-left: 12px; }
.bill-td-nick { font-weight: 500; }
.bill-td-coeff, .bill-td-score { text-align: center; color: var(--text-2); }
.bill-td-pay { text-align: right; padding-right: 12px; font-weight: 600; }
.bill-td-pay.pay { color: var(--primary); }
.bill-td-pay.free { color: var(--text-2); }
.bill-modal-foot { text-align: center; padding: 10px; font-size: 11px; color: var(--text-2); }

/* ===== 对战引导弹窗 ===== */
.battle-step { padding: 4px 0; }
.battle-progress {
  display: flex; align-items: center; justify-content: center; gap: 0;
  margin-bottom: 16px;
}
.battle-step-dot {
  font-size: 12px; padding: 4px 10px; border-radius: 16px;
  background: #f0f0f0; color: var(--text-2);
  white-space: nowrap;
}
.battle-step-dot.active { background: var(--primary); color: #fff; font-weight: 600; }
.battle-step-dot.done { background: #d4edda; color: var(--primary); }
.battle-step-line { width: 20px; height: 2px; background: var(--line); }
.battle-tip { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.battle-player-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 320px; overflow-y: auto; padding: 4px;
}
.battle-player-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 8px 14px; border: 2px solid var(--line); border-radius: 24px;
  font-size: 14px; cursor: pointer; user-select: none; background: #fff;
  transition: all .15s;
}
.battle-player-chip.selected {
  border-color: var(--primary); background: var(--primary); color: #fff;
}
.battle-player-chip.busy { opacity: .5; }
.battle-player-chip .busy-tag { font-size: 10px; background: #fff3e0; padding: 0 4px; border-radius: 3px; color: #c47e00; }
.battle-player-chip.selected .busy-tag { background: rgba(255,255,255,.3); color: #fff; }
.battle-player-chip .check { font-weight: 700; }
.battle-court-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px;
}
.battle-court-card {
  position: relative; width: calc(33.33% - 8px); min-width: 90px;
  padding: 16px 8px; border: 2px solid var(--line); border-radius: 12px;
  text-align: center; cursor: pointer; background: #fff; transition: all .15s;
}
.battle-court-card.selected { border-color: var(--primary); background: #f0f7f0; }
.battle-court-card.occupied { border-style: dashed; }
.battle-court-no { font-size: 18px; font-weight: 700; }
.battle-court-info { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.battle-court-card .check { position: absolute; top: 4px; right: 6px; color: var(--primary); font-weight: 700; }
.battle-active-info { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

/* ===== 日期范围选择 ===== */
.date-range-row { display: flex; gap: 12px; }
.date-range-row > div { flex: 1; }
.date-range-row label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.date-range-row input[type="date"] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
}

/* ===== 待安排球员池提示 ===== */
.pool-tip { font-size: 13px; color: var(--text-2); padding: 8px; }

/* ===== 对战名称与状态标签 ===== */
.match-title-name {
  font-weight: 600; font-size: 14px;
}
.match-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  flex-wrap: wrap;
}
.match-head .label {
  font-size: 12px; color: var(--text-2);
}

/* 四种状态 chip */
.chip.pending { background: #e3e3e3; color: #666; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.chip.playing { background: #fff3e0; color: #c47e00; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.chip.closed  { background: #d4edda; color: #1a7a3a; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.chip.settled { background: var(--primary); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.chip.cancelled { background: #f8d7da; color: #a02834; font-size: 11px; padding: 2px 8px; border-radius: 10px; }

/* ===== 对战记录弹窗 ===== */
.match-record-row {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; background: #fff;
}
.match-record-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.match-record-score {
  font-size: 13px; color: var(--text-2); margin-top: 2px;
}
.match-record-row .match-actions { margin-top: 6px; }

/* ===== 积分情况弹窗 ===== */
.score-table {
  width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px;
}
.score-table th, .score-table td {
  border: 1px solid var(--line); padding: 6px 10px; text-align: center;
}
.score-table th { background: #f5f8f4; color: var(--text-2); font-weight: 600; }
.score-table td:first-child { text-align: left; }

/* ===== 修改积分弹窗 ===== */
.match-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px;
}
.match-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px; border: 1px solid var(--line); border-radius: 10px; min-width: 80px;
}
.match-cell .nick { font-weight: 600; font-size: 14px; }
.match-cell .y-label { font-size: 11px; color: var(--text-2); }
.score-input {
  width: 60px; text-align: center; font-size: 18px; font-weight: 700;
  border: 2px solid var(--line); border-radius: 8px; padding: 4px;
}
.score-input:focus { border-color: var(--primary); outline: none; }

/* ===== 场地折叠/展开 ===== */
.court-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: var(--text-2); padding: 2px 6px;
  transition: transform .2s;
}
.court.collapsed .court-body { display: none; }
.court.collapsed { background: #f9f9f9; }
.court-idle { opacity: .75; }

/* ===== 结算错误提示 ===== */
.settle-error {
  background: #fff3e0; border: 1px solid #ffcc80; border-radius: 10px;
  padding: 12px 16px; margin: 8px 0; font-size: 14px; color: #c47e00;
}
.settle-error ul { list-style: none; }
.settle-error b { color: #d65100; }

/* ===== 登录页补充 ===== */
.auth-hint { font-size: 12px; color: #999; text-align: center; margin-top: 8px; }
.icp-line { font-size: 11px; color: #aaa; text-align: center; margin-top: 14px; line-height: 1.6; }
.icp-line a { color: #999; text-decoration: none; }
.icp-line a:active { color: var(--primary); }

/* ===== 系统管理后台 ===== */
.admin-tabs {
  display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto;
}
.admin-tab {
  padding: 8px 14px; border: none; background: #f0f0f0; border-radius: 8px;
  font-size: 14px; cursor: pointer; white-space: nowrap; color: #666;
}
.admin-tab.active { background: #2563eb; color: #fff; }

.app-item {
  margin-bottom: 10px; padding: 12px 16px; border-radius: 10px;
  background: #fff; border: 1px solid #eee;
}
.app-head { display: flex; align-items: center; gap: 8px; }
.app-head h3, .app-head h4 { margin: 0; }
.app-meta { font-size: 13px; color: #888; margin: 4px 0; }
.app-reason { font-size: 13px; color: #555; margin: 2px 0; }
.app-note { font-size: 12px; color: #aaa; margin: 2px 0; }

.admin-log-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.admin-log-tabs .btn { font-size: 13px; }

#admin-user-list table,
#admin-club-list table,
#admin-log-list table {
  width: 100%; font-size: 13px; border-collapse: collapse;
}
#admin-user-list th, #admin-user-list td,
#admin-club-list th, #admin-club-list td,
#admin-log-list th, #admin-log-list td {
  padding: 6px 8px; border-bottom: 1px solid #eee; text-align: left;
}
#admin-user-list th, #admin-club-list th, #admin-log-list th {
  background: #f5f5f5; font-weight: 600; position: sticky; top: 0;
}

/* —— 胜负快捷按钮 —— */
.score-quick {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 4px;
}
.btn.tiny {
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}
.btn.tiny.win-btn {
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 600;
}
.btn.tiny.lose-btn {
  background: #fbe9e7;
  color: #c62828;
  font-weight: 600;
}
.btn.tiny.win-btn:active {
  background: #c8e6c9;
}
.btn.tiny.lose-btn:active {
  background: #ffccbc;
}
.score-input.just-set {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
  transition: all 0.2s;
}

/* —— 球费多品种录入（问题4：表头+行网格紧凑布局） —— */
#ball-items-box {
  margin-top: 4px;
}
#ball-items-box .ball-item-head,
#ball-items-box .ball-item-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.4fr) 74px 74px 84px 54px 30px;
  gap: 6px;
  align-items: center;
}
#ball-items-box .ball-item-head {
  font-size: 12px;
  color: var(--text-3);
  padding: 2px 2px 4px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
#ball-items-box .ball-item-row {
  padding: 5px 0;
  border-bottom: 1px dashed #eee;
}
#ball-items-box .ball-item-row input {
  padding: 5px 6px;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
}
#ball-items-box .ball-item-row .ball-name { grid-column: 1; }
#ball-items-box .ball-item-row .ball-tubes { grid-column: 2; }
#ball-items-box .ball-item-row .ball-loose { grid-column: 3; }
#ball-items-box .ball-item-row .ball-price { grid-column: 4; }
#ball-items-box .ball-sub-val {
  grid-column: 5;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  text-align: right;
  white-space: nowrap;
}
#ball-items-box .ball-del-btn {
  grid-column: 6;
  padding: 2px 6px;
  font-size: 13px;
  line-height: 1.4;
}

/* —— 跨俱乐部时间冲突标记（需求4.3） —— */
.conflict-mark {
  display: inline-block;
  font-size: 11px;
  color: #e65100;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.activity-item.conflict {
  border-left: 3px solid #ff9800;
}
.conflict-warn .conflict-list {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.7;
  color: #5d4037;
}

/* —— 昵称修改状态提示（需求3.2） —— */
.setting-hint {
  font-size: 12px;
  margin: 2px 0 4px;
  padding: 4px 8px;
  border-radius: 4px;
}
.setting-hint.warn {
  color: #b26a00;
  background: #fff8e1;
  border: 1px solid #ffe0b2;
}
.setting-hint.ok {
  color: #2e7d32;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
}

/* ===== 需求补充：γ编辑 + 场地对战摘要 ===== */
.gamma-row {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-2, #555);
}
.gamma-row input {
  border: 1px solid var(--line, #ddd); border-radius: 4px;
  padding: 2px 4px; font-size: 13px;
}
.court-match-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 5px 8px; margin-top: 6px;
  border-radius: 6px; cursor: pointer;
  border: 1px dashed var(--line, #ddd);
  background: var(--bg-2, #fafafa);
  transition: background .15s ease;
}
.court-match-row:hover { background: var(--bg-hover, #eef3fb); }
.court-match-row.pending { border-left: 3px solid #f5a623; }
.court-match-row.playing { border-left: 3px solid #1890ff; }
.court-match-row.ended { border-left: 3px solid #8c6fe0; }
.court-match-row.scored { border-left: 3px solid #52c41a; }
.court-match-nicks {
  font-size: 12px; color: var(--text-1, #222);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.court-match-row .chip { font-size: 11px; }

/* ===== 自定义确认/输入对话框（需求11.1） ===== */
.dlg-body { padding: 4px 2px; }
.dlg-icon { font-size: 28px; text-align: center; margin-bottom: 8px; }
.dlg-msg { font-size: 15px; line-height: 1.6; color: var(--text-1, #222); margin-bottom: 16px; word-break: break-word; }
.dlg-input {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px; font-size: 15px;
  border: 1px solid var(--line, #d5dce5); border-radius: 8px;
  margin-bottom: 16px; outline: none;
}
.dlg-input:focus { border-color: var(--primary, #2f8f46); box-shadow: 0 0 0 2px rgba(47,143,70,.12); }
.dlg-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px;
}
.dlg-actions button {
  min-width: 88px; padding: 9px 18px; border-radius: 8px;
  font-size: 14px; cursor: pointer; border: none;
}
.dlg-actions .btn.ghost { background: #f2f4f7; color: var(--text-2, #555); }
.dlg-actions .btn.ghost:hover { background: #e8ebf0; }
.dlg-actions button[data-action="confirm"].btn.primary {
  background: var(--primary, #2f8f46); color: #fff;
}
.dlg-actions button[data-action="confirm"].btn.danger {
  background: #d9534f; color: #fff;
}
.dlg-actions button[data-action="confirm"]:hover { filter: brightness(1.06); }
.dlg-actions button:focus-visible { outline: 2px solid var(--primary, #2f8f46); outline-offset: 2px; }

/* 问题7：用球费用显式单位标签（旧 flex 结构已改为问题4 的 grid 紧凑布局） */

/* ===== P1-5/P1-6 路人代付标注 + 鸽子标记 ===== */
.confirm-item .pigeon-toggle {
  margin-left: 8px; font-size: 11px; color: #888;
  display: inline-flex; align-items: center; gap: 2px;
}
.confirm-item .pigeon-toggle input { margin: 0; }
.confirm-item.pigeon { background: #fff5f5; border-color: #ffb3b3; }
/* 需求4（优化4）：排队者确认项（无鸽子选项，浅黄背景区分） */
.confirm-item.queue-confirm { background: #fdf8e8; border-color: #e8d5a0; }
.confirm-item.queue-confirm.checked { background: #e6cf87; border-color: #d4b45a; color: #5a4620; }
.confirm-item.queue-confirm .proxy-tag { color: #8a6d3b; }
.bill-row.temp-row { padding-left: 24px; color: var(--text-2); }
.bill-row.temp-row .nick:before { content: "↳ "; }
.bill-row.pigeon-row { background: #fff9f0; }
.bill-row.pigeon-row .bill-amt { color: #e65100; font-weight: bold; }
/* V1.5 问题2：代报人合计行 */
.bill-row.bill-total-row { background: #fbfbf8; border-top: 1px dashed var(--line); margin-top: 2px; }
.bill-row.bill-total-row .bill-nick { font-weight: 600; }
.bill-td-child { padding-left: 22px !important; color: var(--text-2); }
.badge-temp { font-size: 10px; color: #8a6d3b; background: #fcf8e3; border:1px solid #faebcc; border-radius:3px; padding:0 4px; margin-left:4px; }
.badge-pigeon { font-size: 10px; color: #a94442; background: #f2dede; border:1px solid #ebccd1; border-radius:3px; padding:0 4px; margin-left:4px; }
.bill-group-tr td {
  background: var(--bg-2); font-weight: 600; font-size: 12px;
  color: var(--text-2); padding: 6px 8px; text-align: left;
}
.bill-modal-table tr[style*=color] td { background: transparent; }

/* 账单导出图片按钮区 */
.bill-exporter { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bill-export-hint { font-size: 11px; color: var(--text-3); width: 100%; margin-top: 2px; }
#bill-export-stage { font-size: 14px; line-height: 1.5; color: #222; }
#bill-export-stage table { border-collapse: collapse; width: 100%; }
#bill-export-stage th, #bill-export-stage td { border: 1px solid #e3e8e3; padding: 6px 8px; text-align: left; }
#bill-export-stage th { background: #f0f4f0; font-weight: 600; }

/* ===== V1.6 账单 6 列：主区紧凑卡片式（昵称｜系数｜场地｜球费｜积分｜应收） ===== */
.bill-row-6 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 62px 62px 40px 74px;
  align-items: center;
  gap: 4px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}
.bill-row-6 .b6-nick {
  display: flex; flex-direction: column; min-width: 0;
}
.bill-row-6 .b6-nick-main {
  font-size: 14px; color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bill-row-6 .b6-sub { font-size: 11px; color: var(--text-3); }
.bill-row-6 .b6-cell {
  font-size: 12px; color: var(--text-2); text-align: center;
  white-space: nowrap;
}
.bill-row-6 .b6-amt {
  font-size: 13px; font-weight: 600; text-align: right;
  color: var(--text);
}
.bill-row-6 .b6-amt.pos { color: var(--danger); }
.bill-row-6.temp-row .b6-nick-main { padding-left: 10px; font-size: 13px; }
.bill-row-6.b6-total { grid-template-columns: minmax(0, 1fr) 40px 62px 62px 40px 74px; background: #fbfbf8; border-top: 1px dashed var(--line); }
.bill-row-6.pigeon-row { background: #fff9f0; }
.bill-row-6.pigeon-row .b6-amt { color: #e65100; }

/* 弹窗 6 列表格（手机竖屏友好：窄列紧凑、金额不换行） */
.bill-table-6 th, .bill-table-6 td { padding: 6px 4px !important; }
.bill-table-6 th { font-size: 12px; }
.bill-table-6 .bill-td-num {
  text-align: center; font-size: 12px; white-space: nowrap;
  color: var(--text-2);
}
.bill-table-6 td.bill-td-pay { text-align: right; font-size: 12px; white-space: nowrap; }
