/* ========== 星元联赛后台系统 - 全局样式 ========== */
:root {
  --primary: #1e293b;
  --primary-light: #334155;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --border: #e2e8f0;
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --info: #3b82f6;
  --info-bg: #dbeafe;
  --sidebar-w: 248px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.06);
  --transition: .2s ease;
  /* 全站背景图统一淡化强度(0~1)：0.10=几乎隐形 0.60=协调可见 0.75+=较浓 */
  --bg-strength: .60;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========== 侧边栏 ========== */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform var(--transition);
}

/* 2026-09-02 需求6：侧边栏宽度拉伸手柄（PC 显示，移动端隐藏） */
.sidebar-resizer {
  position: fixed;
  left: calc(var(--sidebar-w) - 3px);
  top: 0; bottom: 0;
  width: 6px;
  z-index: 101;
  cursor: col-resize;
  background: transparent;
  transition: background .15s;
}
.sidebar-resizer:hover, .sidebar-resizer.active {
  background: rgba(37, 99, 235, .35);
}
body.resizing-sidebar {
  cursor: col-resize !important;
  user-select: none;
}
body.resizing-sidebar .sidebar,
body.resizing-sidebar .sidebar-resizer {
  transition: none;
}

.sidebar-header {
  padding: 22px 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.sidebar-logo {
  width: calc(var(--sidebar-w) * 0.75);
  max-width: 100%;
  height: auto;
  max-height: 200px;
  border-radius: 12px;
  object-fit: contain;
  display: block;
}

.sidebar-brand-text { text-align: center; }

.sidebar-title { color: #fff; font-size: 17px; font-weight: 800; line-height: 1.3; letter-spacing: 1.5px; }
.sidebar-subtitle { color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: .5px; }
.sidebar-version { color: rgba(255,255,255,.38); font-size: 10px; margin-top: 2px; letter-spacing: .5px; }

.sidebar-nav { flex: 1; padding: 12px 10px; }

.nav-group { margin-bottom: 6px; }

.nav-group-label {
  color: rgba(255,255,255,.35);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 14px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }

.nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,.25) 0%, rgba(59,130,246,.08) 100%);
  color: #fff;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--accent-light);
  border-radius: 0 3px 3px 0;
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* 联赛子目录 */
.nav-league-group { }

.nav-league-header {
  cursor: pointer;
  user-select: none;
}

.nav-league-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-league-arrow {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  flex-shrink: 0;
  margin-left: 4px;
}

.nav-league-delete {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.1);
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 2px;
}
.nav-league-delete:hover {
  color: #fff;
  background: var(--danger);
}

.nav-sub-items {
  padding-left: 16px;
}

.nav-sub-item {
  font-size: 13px !important;
  opacity: .8;
  padding-left: 12px !important;
}

.nav-sub-item.active {
  opacity: 1;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}

.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,.45); font-size: 11px; }

.role-switch-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  width: 30px; height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.role-switch-btn:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.role-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: var(--transition);
  white-space: nowrap;
}
.role-indicator:hover {
  box-shadow: 0 0 0 2px rgba(59,130,246,.1);
}

.role-card {
  transition: var(--transition);
}
.role-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.role-card-active {
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* ========== 主内容区 ========== */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative;
}

/* 统一背景图片机制：伪元素承载背景，不遮挡前景交互
   --bg-strength 为全站统一淡化强度(0~1)，新增背景页自动遵循 */
.main::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--page-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--bg-strength, .75);
  filter: saturate(1.05);
  pointer-events: none;
  transition: opacity .35s ease, background-image .35s ease;
}
.main > * {
  position: relative;
  z-index: 1;
}

/* 裁判系统背景图片 */
#refereeModule::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--ref-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--bg-strength, .75);
  filter: saturate(1.05);
  pointer-events: none;
  transition: opacity .35s ease, background-image .35s ease;
}
#refereeModule > * {
  position: relative;
  z-index: 1;
}
#refereeModule.active > * {
  position: relative;
  z-index: 1;
}

.topbar {
  background: var(--card-bg);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title { font-size: 18px; font-weight: 700; color: var(--primary); }

.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* 移动端汉堡菜单按钮（默认隐藏，≤768px 显示） */
.topbar-menu-btn {
  display: none;
  width: 38px; height: 38px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.topbar-menu-btn:hover { background: #e2e8f0; }

/* 移动端侧边栏遮罩层 */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

.topbar-actions { display: flex; align-items: center; gap: 14px; }

.topbar-search {
  width: 240px;
  padding: 7px 14px 7px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") 10px center no-repeat;
  outline: none;
  transition: var(--transition);
}

.topbar-search:focus { border-color: var(--accent); background-color: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

.topbar-icon-btn {
  width: 36px; height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  position: relative;
}

.topbar-icon-btn:hover { background: #e2e8f0; }

.topbar-icon-btn .dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}

.content { padding: 24px; }

/* ========== 卡片 ========== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title { font-size: 15px; font-weight: 700; color: var(--primary); }

.card-body { padding: 20px; }

/* ========== 统计卡片 ========== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.stat-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.purple { background: #ede9fe; color: #8b5cf6; }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.teal { background: #ccfbf1; color: #14b8a6; }

.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat-trend { font-size: 11px; margin-top: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  background: #f8fafc;
  color: var(--text-light);
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
}

tbody tr { transition: var(--transition); }
tbody tr:hover { background: #f8fafc; }

.cell-strong { font-weight: 600; color: var(--primary); }
.cell-muted { color: var(--text-light); }

/* ========== 标签/徽章 ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-default { background: #f1f5f9; color: var(--text-light); }
.badge-purple { background: #ede9fe; color: #8b5cf6; }

/* 信息中心收件箱/已发送 分段切换（2026-09-03 v1.06 站内私信） */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 3px; }
.seg-btn { border: none; background: transparent; padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text-light); display: inline-flex; align-items: center; gap: 6px; }
.seg-btn:hover { background: #e2e8f0; }
.seg-active { background: var(--accent); color: #fff; font-weight: 600; }
.seg-active:hover { background: var(--accent); }

/* 段位标签 */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
  color: var(--text);
  white-space: nowrap;
}

.btn:hover { background: var(--bg); border-color: var(--text-lighter); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-text { border: none; background: none; padding: 4px 8px; color: var(--accent); font-weight: 600; }
.btn-text:hover { background: var(--info-bg); }

/* ========== 筛选栏 ========== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-select, .filter-input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  outline: none;
  transition: var(--transition);
}

.filter-select:focus, .filter-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

/* ========== 段位选择标签 ========== */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.tab-item {
  padding: 8px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  border-radius: 6px 6px 0 0;
}

.tab-item:hover { color: var(--accent); background: var(--info-bg); }

.tab-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ========== 排名表 ========== */
.standing-row {
  display: grid;
  grid-template-columns: 40px 1fr 50px 50px 50px 50px 50px 60px 60px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  gap: 4px;
}

.standing-row:hover { background: #f8fafc; }

.standing-rank {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  background: #f1f5f9;
  color: var(--text-light);
}

.standing-rank.top-1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; }
.standing-rank.top-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #fff; }
.standing-rank.top-3 { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.standing-rank.releg { background: var(--danger-bg); color: var(--danger); }

.standing-team { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.standing-team-logo { font-size: 18px; }

.standing-header {
  display: grid;
  grid-template-columns: 40px 1fr 50px 50px 50px 50px 50px 60px 60px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  background: #f8fafc;
  border-radius: 6px 6px 0 0;
  gap: 4px;
}

.standing-col { text-align: center; }

/* ========== 进度条 ========== */
.progress {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .5s ease;
}

/* ========== 弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: modalIn .25s ease;
}

@keyframes modalIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 16px; font-weight: 700; }

.modal-close {
  width: 30px; height: 30px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
}

.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

.modal-body { padding: 22px; }

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ========== Toast ========== */
/* z-index 2026-09-20 修复：原 300 低于 .login-screen 的 3000，导致登录/注册期间的一切
   提示（含失败原因）被登录遮罩**完全盖住**。提升到 3200，使提示始终浮于登录层之上。 */
.toast-container {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 3200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #fff;
  border-radius: 10px;
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  min-width: 280px;
  animation: toastIn .3s ease;
  border-left: 4px solid var(--accent);
}

@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

/* ========== 页面过渡 ========== */
.page { animation: fadeIn .3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-search { width: 160px; }
}

/* 平板/手机：侧边栏抽屉式 + 汉堡菜单 */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 268px; box-shadow: 4px 0 24px rgba(0,0,0,.15); }
  .sidebar.show { transform: translateX(0); }
  .main { margin-left: 0; }
  .sidebar-resizer { display: none; } /* 2026-09-02 移动端抽屉不提供拉伸 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 12px; height: 54px; }
  .topbar-left { gap: 8px; }
  .topbar-menu-btn { display: flex; }
  .topbar-title { font-size: 15px; }
  .topbar-actions { gap: 8px; }
  .topbar-search { display: none; }
  .topbar-icon-btn { width: 36px; height: 36px; }
  .role-indicator { display: none; } /* 移动端隐藏角色标签防拥挤 */
  .hide-mobile { display: none !important; } /* 手机端隐藏指定卡片/模块（PC端不受影响） */
  .content { padding: 12px; }
  .form-row { grid-template-columns: 1fr; }

  /* 卡片压缩 */
  .card-header { padding: 12px 14px; }
  .card-body { padding: 14px; }

  /* 弹窗：移动端接近全屏，提升触控体验 */
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal {
    width: 100%; max-width: none; max-height: none; height: 100vh;
    border-radius: 0; display: flex; flex-direction: column;
    animation: none;
  }
  .modal-header { padding: 14px 16px; flex-shrink: 0; }
  .modal-body { flex: 1; overflow-y: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
  .modal-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-shrink: 0; }

  /* 表格：横向滚动容器，避免挤压 */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 640px; }
  /* 手机端防中文竖排（一字一行）：所有表格保证最小宽度，单元格不换行，超出横向滚动 */
  .table-wrap table { min-width: 640px; }
  .table-wrap th, .table-wrap td { white-space: nowrap; }

  /* 筛选栏与按钮：触控友好 */
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .filter-select, .filter-input { flex: 1 1 130px; min-height: 40px; font-size: 14px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .btn-text { padding: 8px 10px; }

  /* 表单控件触控友好 */
  .form-input, .form-select, .form-textarea { min-height: 42px; font-size: 15px; }
  .form-label { font-size: 13px; }

  /* 标签页横向滚动 */
  .tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .tab { flex-shrink: 0; min-height: 40px; }

  /* 侧边栏导航触控 */
  .nav-item { padding: 12px 14px; font-size: 14px; }
  .nav-league-delete { width: 28px; height: 28px; }

  /* 统计卡片压缩 */
  .stat-card { padding: 14px; gap: 12px; }
  .stat-icon { width: 44px; height: 44px; font-size: 20px; }

  /* 懂球帝风格比赛卡片适配 */
  .dqd-main { gap: 6px; }
  .dqd-logo { font-size: 22px; }
  .dqd-name { font-size: 13px; }
  .dqd-score { min-width: 64px; }
  .dqd-score-num { font-size: 18px; }

  /* 手机端防文字竖排（一字一行）：徽章/标签/进球条目/按钮一律不换行 */
  .badge, .status-tag, .tier-badge, .side-count-badge, .dqd-goal, .dqd-kickoff,
  .lc-summary-label, .stat-value, .dqd-live-tag, .dqd-live-timer { white-space: nowrap; }
  .dqd-goals-col { min-width: 0; }
  .dqd-goals-col .dqd-goal { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-flex; }
  .topbar-actions { flex-shrink: 0; }
  #guestActions { flex-shrink: 0; }
  #guestActions .btn { white-space: nowrap; flex-shrink: 0; padding: 7px 12px; font-size: 13px; }
  .topbar-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

  /* 弹窗内的网格布局
     （注意：本条在此处实际不生效——.grid-2/.grid-3 的基础定义在文件更靠后的
      「辅助类」区，同优先级后写的胜出。移动端堆叠规则统一移至文件末尾的
      「移动端通用：多窗框/卡片并排 → 纵向堆叠」区块，勿在此重复添加。） */
}

/* 小屏手机（≤480px）进一步压缩 */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 12px; }
  .stat-icon { width: 38px; height: 38px; font-size: 17px; }
  .content { padding: 10px; }
  .topbar-icon-btn:nth-of-type(2) { display: none; } /* 小屏隐藏权限按钮 */
  .dqd-head { flex-wrap: wrap; }
  .dqd-actions { display: none; } /* 小屏隐藏卡片内操作按钮（点击卡片进入详情） */
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1 1 auto; }
  /* 小屏顶栏进一步压缩，防止右上角按钮竖排/溢出 */
  #guestActions .btn { padding: 6px 9px; font-size: 12px; }
  #guestActions .btn .btn-icon { display: none; }
  .topbar-left { min-width: 0; }
  .dqd-live-info { font-size: 11px; gap: 4px; }
}

/* ========== 辅助类 ========== */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-light); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 球队后台-赛事概况网格：桌面双列；平板/手机（≤1024px）全部竖排、单列全宽 */
.team-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1024px) { .team-overview-grid { grid-template-columns: 1fr; } .team-overview-grid > .card { width: 100%; } }

/* 平板及以下（≤1024px）：仪表盘赛事赛程独占整行，不再半宽 */
@media (max-width: 1024px) { .dash-schedule-grid { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-lighter);
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* 对阵图 */
.bracket {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  padding: 20px 0;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 20px;
  min-width: 200px;
}

.bracket-round-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
}

.bracket-match {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.bracket-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
}

.bracket-team:first-child { border-bottom: 1px solid var(--border); }
.bracket-team.winner { background: var(--success-bg); font-weight: 600; }
.bracket-team-name { display: flex; align-items: center; gap: 6px; }
.bracket-team-score { font-weight: 700; font-size: 14px; }

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 16px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item.done::before { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-item.pending::before { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }

.timeline-title { font-size: 13px; font-weight: 600; }
.timeline-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* ========== 创建联赛页面样式 ========== */
.league-create-page { max-width: 900px; margin: 0 auto; }

.lc-permission-banner {
  display: flex; align-items: center; padding: 10px 16px; margin-bottom: 16px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
}

.lc-step-indicator {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px; padding: 20px 0;
}
.lc-step-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: 0.4; transition: opacity 0.3s;
}
.lc-step-item.active { opacity: 1; }
.lc-step-item.done { opacity: 0.7; }
.lc-step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--text-light);
  transition: all 0.3s;
}
.lc-step-item.active .lc-step-circle {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}
.lc-step-item.done .lc-step-circle {
  background: var(--success); border-color: var(--success); color: #fff;
}
.lc-step-label { font-size: 12px; font-weight: 600; color: var(--text-light); }
.lc-step-item.active .lc-step-label { color: var(--accent); }
.lc-step-line {
  flex: 1; max-width: 80px; height: 2px; background: var(--border); margin: 0 8px;
  margin-bottom: 22px;
}
.lc-step-line.done { background: var(--success); }

.lc-steps-container { min-height: 400px; }

.lc-form-group { margin-bottom: 20px; }
.lc-label {
  display: block; font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 8px;
}
.lc-required { color: var(--danger); }
.lc-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lc-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.lc-num-input { width: 80px; text-align: center; }
.lc-num-btn {
  width: 36px; height: 36px; border: 1px solid var(--border);
  background: #fff; border-radius: 8px; font-size: 18px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; color: var(--text);
}
.lc-num-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.lc-type-cards { display: flex; gap: 16px; }
.lc-type-card {
  flex: 1; padding: 24px; border: 2px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all 0.2s; text-align: center; background: #fff;
}
.lc-type-card:hover { border-color: var(--accent-light); background: #f8faff; }
.lc-type-card.selected {
  border-color: var(--accent); background: #eff6ff;
  box-shadow: 0 4px 12px rgba(59,130,246,0.15);
}
.lc-type-icon { font-size: 36px; margin-bottom: 8px; }
.lc-type-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.lc-type-desc { font-size: 12px; color: var(--text-muted); }

.lc-radio-group { display: flex; flex-direction: column; gap: 10px; }
.lc-cup-formats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lc-radio-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: 10px; cursor: pointer;
  transition: all 0.2s; background: #fff;
}
.lc-radio-card:hover { border-color: var(--accent-light); background: #f8faff; }
.lc-radio-card.selected {
  border-color: var(--accent); background: #eff6ff;
}
.lc-radio-icon {
  width: 40px; height: 40px; border-radius: 8px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.lc-radio-content { flex: 1; }
.lc-radio-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.lc-radio-desc { font-size: 12px; color: var(--text-muted); }

.lc-dynamic-config {
  animation: lcFadeIn 0.3s ease;
}
@keyframes lcFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.lc-team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px; max-height: 400px; overflow-y: auto; padding: 4px;
}
.lc-team-chip {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: 2px solid var(--border); border-radius: 10px; cursor: pointer;
  transition: all 0.15s; background: #fff;
}
.lc-team-chip:hover { border-color: var(--accent-light); }
.lc-team-chip.selected {
  border-color: var(--success); background: #f0fdf4;
}
.lc-team-chip.dimmed {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
.lc-team-chip.dimmed:hover { border-color: var(--border); }
.lc-team-logo { font-size: 20px; }
.lc-team-name { flex: 1; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-team-check { color: var(--success); font-weight: 700; font-size: 16px; width: 18px; }

.lc-summary-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.lc-summary-item {
  padding: 14px; background: var(--bg); border-radius: 10px;
}
.lc-summary-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.lc-summary-value { font-size: 14px; font-weight: 700; }

@media (max-width: 768px) {
  .lc-type-cards { flex-direction: column; }
  .lc-cup-formats { grid-template-columns: 1fr; }
  .lc-summary-grid { grid-template-columns: 1fr 1fr; }
  .lc-team-grid { grid-template-columns: 1fr; }
}

/* ========== 杯赛小组分组 ========== */
.lc-group-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.lc-group-card {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff;
}
.lc-group-header {
  padding: 10px 14px; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe); color: #1d4ed8;
  border-bottom: 1px solid var(--border);
}
.lc-group-team {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 14px; border-bottom: 1px solid #f1f5f9;
}
.lc-group-team:last-child { border-bottom: none; }
.lc-group-move {
  font-size: 12px; padding: 4px 6px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer;
}

/* ========== 杯赛小组积分榜 & 淘汰赛对阵图 ========== */
.group-standings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px;
}
.gs-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.gs-card-title {
  padding: 10px 14px; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, #fefce8, #fef3c7); color: #92400e;
  border-bottom: 1px solid var(--border);
}
.gs-table { width: 100%; font-size: 12px; }
.gs-table th { padding: 7px 6px; text-align: center; color: var(--text-muted); font-weight: 600; background: var(--bg); }
.gs-table td { padding: 7px 6px; text-align: center; border-top: 1px solid #f1f5f9; }
.gs-table td.gs-team { text-align: left; font-weight: 600; white-space: nowrap; }
.gs-qualified { background: #f0fdf4; }

.ko-bracket-wrap { overflow-x: auto; padding: 4px 0; }
.ko-bracket { display: flex; gap: 28px; align-items: stretch; min-width: max-content; padding: 8px 4px; }
.ko-round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 180px; }
.ko-round-title {
  text-align: center; font-size: 12px; font-weight: 700; color: var(--text-muted);
  padding: 4px 0 8px; letter-spacing: 1px;
}
.ko-match {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,.05);
}
.ko-team {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 12px; font-size: 13px; min-height: 36px;
}
.ko-team + .ko-team { border-top: 1px solid var(--border); }
.ko-team.winner { background: #f0fdf4; font-weight: 700; }
.ko-team.loser { color: var(--text-muted); }
.ko-team-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ko-score { font-weight: 700; font-size: 13px; width: 18px; text-align: center; }
.ko-tbd { color: var(--text-muted); font-style: normal; }

@media (max-width: 768px) {
  .lc-group-grid { grid-template-columns: 1fr; }
  .group-standings-grid { grid-template-columns: 1fr; }
  .ko-round { min-width: 150px; }
}

/* ========== 登录系统 ========== */
.login-screen {
  position: fixed; inset: 0; z-index: 3000;
  display: none; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #0f172a 100%);
  padding: 16px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  padding: 32px 28px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  text-align: center;
}
.login-logo {
  width: 96px;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}
.login-title { font-size: 24px; font-weight: 800; color: #0f172a; margin-top: 12px; letter-spacing: 2px; }
.login-subtitle { font-size: 12px; color: #64748b; margin-top: 2px; letter-spacing: 1px; }
.login-version { font-size: 11px; color: #94a3b8; margin-top: 6px; letter-spacing: 1px; }
.login-tab { display: flex; margin: 22px 0 0; border-bottom: 2px solid #e2e8f0; }
.login-tab span {
  flex: 1; padding: 10px 0; font-size: 14px; font-weight: 700; color: #94a3b8;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.login-tab span.login-tab-active { color: #2563eb; border-bottom-color: #2563eb; }
.login-form { margin-top: 20px; text-align: left; }
.login-field {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 0 14px; margin-bottom: 12px;
  background: #f8fafc;
}
.login-field:focus-within { border-color: #2563eb; background: #fff; }
.login-field span { font-size: 16px; }
.login-field input {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 12px 0; font-size: 14px; color: #0f172a; min-width: 0;
}
.login-btn {
  width: 100%; padding: 12px 0; margin-top: 6px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: 4px; cursor: pointer;
}
.login-btn:hover { opacity: .92; }
.login-remember {
  display: flex; align-items: center; gap: 7px; margin: 2px 0 4px;
  font-size: 13px; color: #64748b; cursor: pointer; user-select: none; white-space: nowrap;
}
.login-remember input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: #2563eb; }
.login-tip { text-align: center; font-size: 12px; color: #64748b; margin-top: 14px; }
.login-tip a { color: #2563eb; font-weight: 600; text-decoration: none; }
.login-notice {
  margin-top: 18px; padding: 10px 12px; background: #eff6ff; border-radius: 8px;
  font-size: 11px; color: #1e40af; text-align: left; line-height: 1.6;
}
/* ===== 登录/注册失败原因框（2026-09-20）=====
   渲染在 .login-screen 内部（#loginError），层级天然高于登录遮罩，用户一定看得见。
   作为 .login-screen 的兄弟/子元素无需额外 z-index；配色用红系以区别于普通提示。 */
.login-error {
  margin: 2px 0 10px; padding: 10px 12px;
  background: #fef2f2; border: 1px solid #fecaca; border-left: 4px solid #dc2626;
  border-radius: 8px; font-size: 12.5px; color: #b91c1c;
  text-align: left; line-height: 1.65; word-break: break-word;
}
/* ===== 注册说明（2026-09-20）：把账号/密码规则直接摆在注册表单上方 ===== */
.login-rules {
  margin-top: 16px; padding: 10px 12px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  font-size: 11.5px; color: #92400e; text-align: left; line-height: 1.8;
}
.login-rules-title { font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.login-rules b { color: #78350f; }

/* ========== 懂球帝/直播吧风格比赛列表 ========== */
.dqd-card {
  background: #fff; border: 1px solid #eef2f7; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px; cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.dqd-card:hover { box-shadow: 0 4px 14px rgba(15,23,42,.08); transform: translateY(-1px); }
.dqd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dqd-round { font-size: 12px; color: #94a3b8; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dqd-status { flex-shrink: 0; }
.dqd-actions { flex-shrink: 0; display: flex; gap: 2px; }
.dqd-actions .btn-text { font-size: 12px; padding: 3px 6px; }
.dqd-main { display: flex; align-items: center; gap: 10px; }
.dqd-team { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dqd-team.home { justify-content: flex-start; }
.dqd-team.away { justify-content: flex-end; }
.dqd-logo { font-size: 26px; line-height: 1; flex-shrink: 0; }
.dqd-name { font-size: 15px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dqd-score { flex-shrink: 0; text-align: center; min-width: 84px; }
.dqd-score-num { font-size: 22px; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.dqd-vs { font-size: 20px; font-weight: 800; color: #cbd5e1; letter-spacing: 2px; }
.dqd-goals { display: flex; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #eef2f7; }
.dqd-goals-col { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.dqd-goals-col.away { align-items: flex-end; }
.dqd-goals-mid { flex-shrink: 0; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.dqd-goal { font-size: 12px; color: #2563eb; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; line-height: 1.5; }
.dqd-goal b { font-weight: 700; color: #64748b; }
.dqd-goals-col.away .dqd-goal { color: #ea580c; }
.dqd-goals-mid .dqd-goal { color: #64748b; }
.dqd-goal-tag { font-size: 10px; background: #f1f5f9; color: #94a3b8; border-radius: 3px; padding: 0 4px; font-weight: 600; }
.dqd-kickoff { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #eef2f7; font-size: 12px; color: #94a3b8; text-align: center; }

/* 进行中比赛实时信息行（时长/进球/红牌，任何权限可见） */
.dqd-live-info {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed #eef2f7;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px;
}
.dqd-live-timer {
  display: inline-flex; align-items: center; gap: 5px;
  color: #16a34a; font-weight: 800; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dqd-live-timer::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: #dc2626;
  animation: dqdLivePulse 1.2s ease-in-out infinite; display: inline-block;
}
@keyframes dqdLivePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.dqd-live-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 10px; font-weight: 700; white-space: nowrap;
  background: #f0fdf4; color: #15803d;
}
.dqd-live-tag.home { background: #eff6ff; color: #1d4ed8; }
.dqd-live-tag.away { background: #fff7ed; color: #ea580c; }
.dqd-live-tag.red { background: #fef2f2; color: #dc2626; }
.dqd-score-live { color: #16a34a; }

/* ========== 球衣号码徽章 + 1-99 号码选择网格 ========== */
.jersey-no {
  display: inline-block;
  min-width: 34px;
  padding: 1px 8px;
  margin-right: 6px;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  vertical-align: middle;
}
.jn-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}
.jn-cell {
  aspect-ratio: 1 / 0.82;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s;
  overflow: hidden;
}
.jn-cell:hover { border-color: var(--primary, #2563eb); background: #eef2ff; transform: translateY(-1px); }
.jn-cell.jn-current { border: 2px solid var(--primary, #2563eb); background: #eef2ff; color: var(--primary, #2563eb); box-shadow: 0 2px 8px rgba(37,99,235,.18); }
.jn-cell.jn-taken {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  border-style: dashed;
}
.jn-cell .jn-owner {
  font-size: 9px;
  font-weight: 600;
  color: #94a3b8;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

/* ===== 球队后台功能按键（仅图标+名称，小字号） ===== */
.dash-key-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 78px;
  padding: 9px 10px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s;
  line-height: 1.2;
}
.dash-key-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.dash-key-btn .k-icon { font-size: 19px; line-height: 1; }
.dash-key-btn .k-name { font-size: 12px; white-space: nowrap; }
.dash-key-btn.active { border-color: var(--primary); background: var(--primary-bg, #eef2ff); color: var(--primary); }
.dash-key-btn.hot { border-color: var(--warning); box-shadow: 0 0 0 1px var(--warning); }

/* ===== 队内榜单折叠头 ===== */
.rank-board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  background: var(--bg);
  font-size: 13px;
  user-select: none;
}
.rank-board-head:hover { background: var(--primary-bg, #eef2ff); }

/* =====================================================================
 * 自由约球模块（2026-08-26）
 * ===================================================================== */

/* 约球卡片参与者头像 */
.pickup-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

/* 头像溢出计数（+N） */
.pickup-av-more {
  background: var(--bg, #f1f5f9);
  color: var(--text-muted, #64748b);
  border-color: var(--border, #e2e8f0);
  box-shadow: none;
}

/* =====================================================================
 * 赛事层级主页（2026-09-03 v1.06 赛事管理重构）
 * 赛事总览 → 点击 LV1 → 思维导图式树形层级（.ltree 卡片内）
 * ===================================================================== */
.ltree {
  overflow-x: auto;                 /* 超深层级时横向滚动，不破坏布局 */
}

/* 树内节点卡片：整卡可点，层级间以缩进 + 虚线引导呈现自上而下结构 */
.lt-node {
  min-width: 0;
}

.lt-card {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  padding: 11px 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
}
.lt-card:hover {
  border-color: var(--accent, #3b82f6);
  box-shadow: 0 4px 12px rgba(59, 130, 246, .12);
  transform: translateY(-1px);
}

/* 选中节点：品牌色描边 + 淡蓝底 */
.lt-card.lt-active {
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(59, 130, 246, .16);
}

/* 顶级（LV1）节点略放大强调 */
.lt-root > .lt-node > .lt-card {
  padding: 14px 16px;
  border-width: 2px;
  font-size: 15px;
}

/* 子级容器：左侧竖向虚线引导，逐级缩进 */
.lt-children {
  position: relative;
  margin: 12px 0 4px 34px;
  padding: 2px 0 2px 22px;
  border-left: 2px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 父卡片到子级引导线之间的竖向连接段 */
.lt-children::before {
  content: '';
  position: absolute;
  left: -2px;                       /* 对准 .lt-children 的 border-left */
  top: -12px;
  width: 2px;
  height: 12px;
  background: #cbd5e1;
}

/* 元信息小标签 */
.lt-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}
.lt-chip-leaf {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

/* 层级内容区卡片（内容页签主体容器） */
.ltree-content-card {
  border-left: 4px solid var(--accent, #3b82f6);
}

/* 窄屏（移动端）：收紧缩进，保证卡片可视宽度 */
@media (max-width: 768px) {
  .lt-children {
    margin-left: 16px;
    padding-left: 12px;
  }
  .lt-root > .lt-node > .lt-card { padding: 12px 12px; }
  .lt-card { padding: 10px 10px; }
}

/* 约球模块嵌入赛事总览页：卡片内不做额外缩放，保持原模块版式 */
#pickupEmbedHost .pickup-page-header,
#pickupEmbedHost h3 { margin-top: 0; }

/* ==================================================================
   移动端（≤768px）通用规则：多窗框/卡片并排 → 纵向堆叠（2026-09-05）
   ------------------------------------------------------------------
   目的（产品约定，今后新增布局默认遵循，无需逐处指定）：
   1. 手机上所有「多个窗框/卡片并排显示」的场景统一改为上下堆叠，
      阅读顺序自上而下；
   2. 内容完整展示，不横向溢出、不压缩变形。
   覆盖面：
   a) 类式多列栅格 .grid-2/.grid-3/…（旧规则写在基础定义之前被同优先级
      后写的规则覆盖，实际从未生效，本块统一收口并前置失效规则已移除）；
   b) JS 内联样式的固定多列（如 grid-template-columns:1fr 1fr / 1fr 1fr auto）
      —— 内联样式优先级高于普通 CSS，必须用 !important 反制；
      用属性子串匹配，今后新增的内联多列布局自动命中；
   c) 内联 auto-fill/auto-fit 网格中最小轨道 ≥300px 的：手机可视宽度放不下
      会强制横向溢出，改单列。minmax(1xx~2xx) 的小磁贴网格可自适应收缩，
      保持多列不受影响；
   d) 堆叠后的防溢出兜底。
   注意：本块必须保持在文件末尾，确保晚于所有基础定义生效。
   ================================================================== */
@media (max-width: 768px) {
  /* a) 类式多列栅格 → 单列 */
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr !important; }

  /* b) 内联固定多列 → 单列（含 1fr 1fr auto 等，子串匹配自动覆盖更多列数） */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* c) 内联 auto-fill/auto-fit 网格：最小轨道 ≥300px → 单列（防横向溢出） */
  [style*="grid-template-columns:repeat(auto-fill,minmax(3"],
  [style*="grid-template-columns:repeat(auto-fill,minmax(4"],
  [style*="grid-template-columns:repeat(auto-fit,minmax(3"],
  [style*="grid-template-columns:repeat(auto-fit,minmax(4"],
  [style*="grid-template-columns: repeat(auto-fill,minmax(3"],
  [style*="grid-template-columns: repeat(auto-fit,minmax(3"] { grid-template-columns: 1fr !important; }

  /* e) 类式 auto-fit/auto-fill 网格中最小轨道 ≥300px 的（如分组积分榜 .group-standings-grid）：
        手机容器宽度（约 300~355px）放不下最小轨道会强制横向溢出 → 单列 */
  .group-standings-grid { grid-template-columns: 1fr !important; }

  /* d) 堆叠后的防溢出兜底：子项不撑破容器，长词可断行，卡片内表格仍走 .table-wrap 横向滚动 */
  .grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-5 > *, .grid-6 > * { min-width: 0; max-width: 100%; }
  .grid-2 .card, .grid-3 .card, .grid-4 .card, .grid-5 .card, .grid-6 .card { width: 100%; }
  .card-body { overflow-wrap: break-word; }
}

/* 超窄屏（≤480px）：统计磁贴 .stat-grid 也改单列，避免 2×2 在小屏被压缩变形 */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-card { padding: 14px; }
  .stat-icon { width: 44px; height: 44px; font-size: 20px; }
}

