/* 引入 Google 字体 Outfit 与 Noto Sans SC */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --bg-primary: #f8fafc; /* 极简浅灰底色 */
  --bg-sidebar: #ffffff; /* 纯白侧边栏 */
  --accent-primary: #1e293b; /* 统一主色：沉稳深黑灰 */
  --accent-primary-hover: #0f172a;
  --accent-blue: #334155; /* 导航选中灰 */
  --accent-blue-light: #f1f5f9; /* 激活背景浅灰 */
  --accent-orange: #1e293b; 
  --accent-cyan: #475569;
  --text-main: #0f172a; /* 正文黑灰 */
  --text-muted: #64748b; /* 辅助灰 */
  --border-color: #e2e8f0; /* 极细灰边框 */
  --icon-color: #475569; /* 统一黑白灰图标色 */
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --font-family: 'Outfit', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
}

/* 主容器左右分栏 */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* 左侧边栏 (通高白底) */
.sidebar {
  width: 260px;
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: #ff5722;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 18px;
}

.sidebar-title h1 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.sidebar-title p {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-menu-group {
  padding: 16px 20px 8px 20px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-menu {
  flex: 1;
  padding: 0 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item {
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.sidebar-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-item-arrow {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s;
}

/* 激活项 (截图同款淡蓝背景加深蓝字，右侧带小箭头) */
.sidebar-item.active {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  font-weight: 600;
}

.sidebar-item.active .sidebar-item-arrow {
  opacity: 1;
  color: var(--accent-blue);
}

.sidebar-item:hover:not(.active) {
  background: #f8fafc;
  color: var(--text-main);
}

/* ========================================================
   侧边栏二级子菜单与垂直辅助引导线设计（效仿设计图）
   ======================================================== */
.sidebar-sub-menu {
  position: relative;
  margin: 4px 0 8px 18px;
  padding: 4px 0 4px 14px;
}

/* 贯穿子菜单的垂直引导线 (红框同款纤细质感竖线) */
.sidebar-sub-menu::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 3px;
  width: 1.5px;
  background-color: #e2e8f0;
  border-radius: 1px;
}

/* 子菜单项专用样式：更精致轻巧的排版 */
.sidebar-sub-menu .sidebar-item {
  height: 34px;
  padding: 0 10px;
  margin: 3px 0;
  border-radius: 6px;
  font-size: 13px;
  color: #64748b;
  font-weight: 400;
  background: transparent;
  transition: all 0.2s ease;
}

.sidebar-sub-menu .sidebar-item .sidebar-item-content {
  gap: 9px;
}

.sidebar-sub-menu .sidebar-item .sidebar-item-content i {
  font-size: 13px;
  width: 16px;
  text-align: center;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.sidebar-sub-menu .sidebar-item:hover:not(.active) {
  color: #1e293b;
  background: rgba(241, 245, 249, 0.7);
}

.sidebar-sub-menu .sidebar-item:hover:not(.active) .sidebar-item-content i {
  color: #475569;
}

.sidebar-sub-menu .sidebar-item.active {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  font-weight: 600;
}

.sidebar-sub-menu .sidebar-item.active .sidebar-item-content i {
  color: var(--accent-blue);
}


/* 右侧主内容区 */
.main-content {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-primary);
  /* 科技网格背景线条 */
  background-image: 
    radial-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 0),
    radial-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 0);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}

/* 右侧顶栏 Header */
.workbench-header {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.workbench-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 退出登录圆角小叉号按钮 */
.btn-close-logout {
  width: 30px;
  height: 30px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  transition: all 0.2s;
}

.btn-close-logout:hover {
  background: #fef2f2;
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.breadcrumb {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.breadcrumb span {
  color: var(--text-main);
}

.workbench-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 搜索框 */
.search-box-container {
  position: relative;
}

.search-box-input {
  width: 240px;
  height: 32px;
  background: #f1f5f9;
  border: none;
  border-radius: 6px;
  padding: 0 12px 0 32px;
  font-size: 11.5px;
  color: var(--text-main);
  outline: none;
}

.search-box-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-muted);
}

/* 消息通知铃铛 */
.notification-bell {
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 10px;
  font-weight: 700;
}

/* 滚动区 */
.scrollable-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* 欢迎标语区 */
.welcome-banner {
  margin-bottom: 24px;
}

.welcome-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.welcome-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* 统计卡片网格 (横排4个) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.01);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid var(--border-color);
}

/* 统一为黑白灰图标，杜绝彩色花哨 */
.stat-icon-purple,
.stat-icon-blue,
.stat-icon-red,
.stat-icon-green {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

i.fa-solid, i.fa-regular {
  color: inherit;
}

.stat-card-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card-number {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

/* 主操作区分栏 (左70% 右30%) */
.dashboard-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 20px;
  align-items: start;
}

/* 纯白圆角卡片 */
.glass-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0, 0, 0, 0.01);
}

/* 脑图标志性的短粗竖线标题样式 */
.card-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.card-title-line {
  width: 3.5px;
  height: 16px;
  background-color: var(--accent-blue);
  border-radius: 2px;
}

.card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

/* 公告列表 (截图公告卡片) */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-item {
  display: flex;
  gap: 10px;
  font-size: 12px;
  line-height: 1.6;
}

.notice-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.notice-dot-blue { background: #3b82f6; }
.notice-dot-green { background: #22c55e; }
.notice-dot-red { background: #ef4444; }
.notice-dot-yellow { background: #f59e0b; }
.notice-dot-purple { background: #a855f7; }

.notice-text {
  color: #334155;
}

/* 表格样式 (去外框，细横线) */
.table-container {
  overflow-x: auto;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px;
}

th {
  background: #ffffff;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid #f1f5f9;
}

tr:hover {
  background: #f8fafc;
}

/* 统一徽章与标签：全黑白灰极简素雅风格，消除杂色 */
.badge-u {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  color: #334155;
  background: #f8fafc;
  padding: 1px 8px;
  min-width: 28px;
  height: 20px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 600;
}

.badge-u.orange,
.badge-u.cyan {
  border-color: #cbd5e1;
  color: #334155;
  background: #f8fafc;
}

/* 通用标签徽章（全部统一为灰度素色） */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
}

.badge-success,
.badge-warning,
.badge-danger,
.badge-info {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
}

/* 统一按钮设计：纯净黑灰沉稳风格，拒绝彩色花哨 */
.btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-primary,
.btn-cyan,
.btn-dark {
  background: #1e293b !important;
  border: 1px solid #1e293b !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-cyan:hover,
.btn-dark:hover {
  background: #0f172a !important;
  border-color: #0f172a !important;
}

/* 赛事组别选择胶囊与高亮激活态 */
.btn-group-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-group-pill:hover {
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  background: #f8fafc !important;
}

.btn-group-pill.active {
  background: #1e293b !important;
  border-color: #1e293b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(30, 41, 59, 0.25) !important;
  transform: translateY(-1px);
}

/* 统一通用分栏选项卡 Tab (如赛事项目分类、子面板切换等) */
.login-tab-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
  user-select: none;
}

.login-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.login-tab:hover:not(.active) {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.login-tab.active {
  background: #1e293b !important;
  border-color: #1e293b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(30, 41, 59, 0.25) !important;
  transform: translateY(-1px);
}

.personnel-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.personnel-menu-item.active {
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-weight: 700;
}

/* 弹出框 */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(4px);
  z-index: 150;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: 500px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

/* 微信小程序模拟器 */
.mobile-simulator-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  max-width: 900px;
  width: 100%;
}

.simulator-frame {
  width: 350px;
  height: 670px;
  background: #ffffff;
  border: 10px solid #0f172a;
  border-radius: 36px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.simulator-notch {
  width: 100px;
  height: 18px;
  background: #000000;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
}

.simulator-camera {
  width: 5px;
  height: 5px;
  background: #1e293b;
  border-radius: 50%;
}

.simulator-content {
  flex: 1;
  background: #f8fafc;
  padding-top: 0;
  padding-bottom: 60px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* 微信小程序模拟器外层自适应缩放（保障在低高度屏幕下不截断） */
@media (max-height: 780px) {
  .simulator-frame {
    transform: scale(0.9);
    transform-origin: center center;
    margin: -30px 0;
  }
}

@media (max-height: 700px) {
  .simulator-frame {
    transform: scale(0.85);
    margin: -45px 0;
  }
}

/* 表单输入框 */
.form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-control {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
  font-size: 12.5px;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--accent-blue);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: all 0.25s ease;
  border-radius: 24px;
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.switch input:checked + .slider {
  background-color: #1e293b;
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.cert-preview-card {
  width: 100%;
  height: 190px;
  background-image: linear-gradient(135deg, #fffefc, #faf3e5);
  border-radius: 8px;
  position: relative;
  padding: 16px;
  color: #5c4013;
  border: 1.5px solid #dfc593;
}

.cert-title {
  font-size: 15px;
  font-weight: 700;
  color: #8c6828;
}

.cert-body {
  margin-top: 12px;
  font-size: 10px;
  line-height: 1.6;
}

.cert-seal {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 45px;
  height: 45px;
  border: 2px dashed #b91c1c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b91c1c;
  font-size: 7.5px;
  font-weight: 700;
  transform: rotate(-15deg);
  opacity: 0.8;
}

.mini-point-card {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.05), rgba(0, 188, 212, 0.05));
  border-radius: 8px;
  padding: 12px;
  margin: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-point-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-orange);
}

.mini-tabbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  position: sticky;
  bottom: 0;
  padding: 6px 0;
  z-index: 5;
}

.mini-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  color: var(--text-muted);
  cursor: pointer;
}

.mini-tabbar-item.active {
  color: var(--accent-orange);
}

.mini-tabbar-item i {
  font-size: 14px;
  margin-bottom: 2px;
}



/* 对阵图样式 - 100% 跑酷赛事系统 (TournamentBracket / FlatBracket) 标准 */
.bracket-tree-container {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  padding: 40px 20px;
  min-width: max-content;
  transform-origin: top left;
}
.bracket-node {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  position: relative;
}
.bracket-match-wrapper {
  z-index: 2;
  margin: 10px 0;
  position: relative;
}
.bracket-player-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 16px;
  width: 190px;
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(148, 163, 184, 0.04);
  transition: all 0.2s;
  position: relative;
  box-sizing: border-box;
}
.bracket-node:not(.bracket-root) .bracket-player-card::after {
  content: "";
  position: absolute;
  right: -40px;
  width: 40px;
  height: 2px;
  background: #cbd5e1;
  top: 50%;
  transform: translateY(-50%);
}
.bracket-player-card.winner {
  border-color: #dc2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15) !important;
}
.bracket-player-card.empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #94a3b8;
  font-size: 13px;
  justify-content: center;
}
.bracket-player-card:not(.empty):hover {
  border-color: #1e4ed8;
  box-shadow: 0 4px 12px rgba(30, 78, 216, 0.08);
}
.bracket-children {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 80px;
  position: relative;
}
.bracket-left-line {
  position: absolute;
  left: -40px;
  width: 40px;
  height: 2px;
  background: #cbd5e1;
  top: 50%;
  transform: translateY(-50%);
}