/* =============================================================================
   common.css —— 全站通用样式
   ============================================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Microsoft YaHei", sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

/* ---------- 顶部栏 ---------- */
.header {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: #fff;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header h1 { font-size: 18px; font-weight: 600; }
.header .user-info { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.header .badge {
  background: rgba(255,255,255,.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
}

/* ---------- 容器 ---------- */
.container { max-width: 1300px; margin: 0 auto; padding: 20px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  flex-wrap: wrap;
}
.tab {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: .2s;
  position: relative;
  user-select: none;
}
.tab.active {
  background: #2a5298;
  color: #fff;
  font-weight: 500;
}
.tab .dot {
  position: absolute;
  top: 6px;
  right: 10px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* ---------- Panel ---------- */
.panel {
  display: none;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.panel.active { display: block; }
.panel h2 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #1e3c72;
}

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar input, .toolbar select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.toolbar input:focus, .toolbar select:focus {
  outline: none;
  border-color: #2a5298;
}

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fb; color: #555; font-weight: 500; }
tr:hover { background: #fafbfc; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: .2s;
  margin: 2px 2px 2px 0;
}
.btn-primary { background: #2a5298; color: #fff; }
.btn-primary:hover { background: #1e3c72; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #1e8449; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2a5298;
}
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > .form-group { flex: 1; min-width: 180px; }

/* ---------- 消息提示 ---------- */
.msg {
  padding: 10px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 13px;
  display: none;
}
.msg.error {
  background: #fee; color: #c00; border: 1px solid #fcc; display: block;
}
.msg.success {
  background: #efe; color: #060; border: 1px solid #cfc; display: block;
}

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
  padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  animation: pop .22s ease-out;
}
@keyframes pop {
  from { transform: translateY(10px) scale(.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #1e3c72;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
  font-size: 13px;
}
.pagination button {
  padding: 5px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.pagination button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.tag.user { background: #e3f2fd; color: #1976d2; }
.tag.admin { background: #fff3e0; color: #f57c00; }
.tag.super_admin { background: #fce4ec; color: #c2185b; }
.tag.good { background: #e8f5e9; color: #2e7d32; }
.tag.warn { background: #fff8e1; color: #ef6c00; }
.tag.bad { background: #ffebee; color: #c62828; }

/* ---------- 结果框 ---------- */
.result-box {
  background: #f8f9fb;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  display: none;
  font-size: 14px;
}
.result-box.show { display: block; }
.result-box .field { margin-bottom: 8px; }
.result-box .label { color: #666; display: inline-block; width: 90px; }
.result-box .value {
  font-family: ui-monospace, Consolas, monospace;
  color: #c2185b;
  font-weight: 600;
  word-break: break-all;
}

/* ---------- 密码框 + 眼睛 ---------- */
.pwd-input-wrap { position: relative; }
.pwd-input-wrap input { padding-right: 42px; }
.eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  font-size: 16px;
  line-height: 1;
  color: #999;
  user-select: none;
}
.eye-btn:hover { color: #2a5298; }

/* 会话列表工具栏 */
.conv-toolbar { padding: 10px; display: flex; gap: 8px; border-bottom: 1px solid #eee; background: #fff; }
.conv-toolbar input { flex: 1; padding: 6px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }
.conv-toolbar select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 聊天气泡的发送者名字 + 时间行 */
.chat-msg .sender { font-size: 11px; color: #888; margin-bottom: 2px; padding: 0 4px; }
.chat-msg .time-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.chat-msg.right .time-row { justify-content: flex-end; }

/* 消息删除按钮：默认隐藏，hover 显示 */
.chat-msg .del-btn {
  display: none; background: none; border: none; cursor: pointer;
  color: #c00; font-size: 12px; padding: 0 4px; opacity: 0.7;
}
.chat-msg:hover .del-btn { display: inline-block; }
.chat-msg .del-btn:hover { opacity: 1; }

/* 会话头部：标题 + 清空按钮两端对齐 */
.chat-header { display: flex; justify-content: space-between; align-items: center; }
/* ============================================================
   联赛标签栏（比赛审核 / 买方案 通用）
   ============================================================ */
.league-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f7f8fa;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  max-height: 160px;
  overflow-y: auto;
}
.league-tab {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  background: #fff;
  border: 1px solid #d9dce1;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13px;
  color: #4a4f57;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
  font-family: inherit;
}
.league-tab:hover { border-color: #2a5298; color: #2a5298; }
.league-tab.active {
  background: #2a5298;
  border-color: #2a5298;
  color: #fff;
  box-shadow: 0 2px 6px rgba(42,82,152,.25);
}
.league-tab .cnt {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: rgba(0,0,0,.06);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.league-tab.active .cnt {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* 无赔率时的灰色小标签（替代 @-- ） */
.odds-missing {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  color: #999;
  background: #f0f0f0;
  border-radius: 3px;
}