/* ==========================================================================
   星空电竞 · 俱乐部 OA 办公系统 — Design System
   风格：Modern Dark (Cinematic) · 玻璃拟态 · 环境光效 · HUD 数据感
   主色：#020617 背景 / #22C55E 电竞绿 / #38BDF8 信息蓝 / #8B5CF6 星紫
   ========================================================================== */

:root {
  /* 语义色板（Design Token） */
  --bg: #020617;
  --bg-deep: #010409;
  --surface: rgba(15, 23, 42, 0.52);
  --surface-strong: rgba(15, 23, 42, 0.78);
  --surface-hover: rgba(30, 41, 59, 0.55);
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #F8FAFC;
  --text-soft: #CBD5E1;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --accent: #22C55E;
  --accent-bright: #4ADE80;
  --accent-glow: rgba(34, 197, 94, 0.35);
  --accent-soft: rgba(34, 197, 94, 0.12);
  --info: #38BDF8;
  --info-soft: rgba(56, 189, 248, 0.12);
  --violet: #8B5CF6;
  --violet-soft: rgba(139, 92, 246, 0.14);
  --warning: #F59E0B;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --gold: #FACC15;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: "Orbitron", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* 尺寸 */
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 236px;
  --topbar-h: 66px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { font-size: 14px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
kbd {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-dim);
  border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 6px;
  background: rgba(148, 163, 184, 0.06);
}

.mono { font-family: var(--font-mono); font-weight: 500; }
.hl { color: var(--accent-bright); }
.ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.18); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.32); }

/* ==========================================================================
   环境背景：星云光晕 + 星点 + 网格
   ========================================================================== */
.app-bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background:
  radial-gradient(1200px 800px at 85% -10%, rgba(139, 92, 246, 0.10), transparent 60%),
  radial-gradient(1000px 700px at -10% 110%, rgba(34, 197, 94, 0.07), transparent 55%),
  radial-gradient(900px 600px at 110% 90%, rgba(56, 189, 248, 0.08), transparent 55%),
  linear-gradient(180deg, #020617 0%, #050B1A 60%, #020617 100%);
}

.stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
}

.blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
  animation: blobFloat 18s var(--ease) infinite alternate;
  will-change: transform;
}
.blob-a { width: 480px; height: 480px; top: -120px; left: 32%; background: rgba(34, 197, 94, 0.16); }
.blob-b { width: 420px; height: 420px; bottom: -140px; left: -80px; background: rgba(139, 92, 246, 0.15); animation-delay: -6s; }
.blob-c { width: 380px; height: 380px; top: 34%; right: -120px; background: rgba(56, 189, 248, 0.13); animation-delay: -11s; }
.blob-d { width: 300px; height: 300px; top: 62%; left: 40%; background: rgba(34, 197, 94, 0.08); animation-delay: -15s; }

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, -50px) scale(1.15); }
}

/* ==========================================================================
   玻璃拟态卡片
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 35%);
}
.card:hover { border-color: var(--border-strong); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }

/* ==========================================================================
   侧边栏
   ========================================================================== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column;
  background: rgba(4, 8, 18, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-right: 1px solid var(--border);
  padding: 22px 14px 16px;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(56, 189, 248, 0.10));
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.22);
}
.brand-name {
  font-family: var(--font-display); font-weight: 900; font-size: 15px; letter-spacing: 1.5px;
  background: linear-gradient(90deg, #4ADE80, #22D3EE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-name span { background: none; -webkit-text-fill-color: var(--text-muted); color: var(--text-muted); font-weight: 500; font-size: 12px; letter-spacing: 2px; }
.brand-sub { font-size: 11px; color: var(--text-dim); letter-spacing: 2px; margin-top: 2px; }

.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 4px 0; }
.nav-group-label {
  font-size: 10px; letter-spacing: 3px; color: var(--text-dim); font-weight: 500;
  padding: 0 10px 8px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-muted); font-size: 13.5px; font-weight: 500;
  cursor: pointer; user-select: none; position: relative;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  margin-bottom: 2px;
}
.nav-item .ico { width: 19px; height: 19px; opacity: 0.85; transition: opacity 0.2s; }
.nav-item:hover { background: var(--surface-hover); color: var(--text-soft); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.03));
  color: var(--text);
  border: 1px solid rgba(34, 197, 94, 0.22);
  box-shadow: inset 3px 0 0 var(--accent), 0 0 20px rgba(34, 197, 94, 0.10);
}
.nav-item.active .ico { opacity: 1; color: var(--accent-bright); filter: drop-shadow(0 0 6px var(--accent-glow)); }

.nav-badge {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px;
  background: rgba(34, 197, 94, 0.15); color: var(--accent-bright);
  border: 1px solid rgba(34, 197, 94, 0.3); border-radius: 99px; padding: 1px 7px;
}
.nav-badge-hot { background: var(--danger-soft); color: #F87171; border-color: rgba(239, 68, 68, 0.35); }

.sidebar-foot { padding-top: 12px; border-top: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; transition: background 0.2s; cursor: pointer; }
.user-card:hover { background: var(--surface-hover); }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.user-more { width: 16px; height: 16px; color: var(--text-dim); }

/* 头像 */
.avatar {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--av, #22C55E), rgba(2, 6, 23, 0.9));
  color: #04120a; box-shadow: 0 0 16px var(--accent-glow);
}
.avatar-hl { background: linear-gradient(135deg, #4ADE80, #0D9488); box-shadow: 0 0 20px rgba(34, 197, 94, 0.35); color: #04120a; }
.avatar-sm { width: 36px; height: 36px; border-radius: 10px; }

/* ==========================================================================
   主区域 & 顶栏
   ========================================================================== */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.tb-left { display: flex; align-items: baseline; gap: 14px; }
.tb-title { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.tb-crumb { font-size: 12px; color: var(--text-dim); }
.tb-crumb .sep { margin: 0 6px; }
.tb-crumb .cur { color: var(--text-muted); }

.tb-right { display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex; align-items: center; gap: 9px;
  width: 300px; padding: 8px 12px; border-radius: 11px;
  background: rgba(15, 23, 42, 0.55); border: 1px solid var(--border);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), width 0.3s var(--ease);
}
.search-box .ico { width: 16px; height: 16px; color: var(--text-dim); }
.search-box input { flex: 1; background: none; border: none; outline: none; font-size: 13px; color: var(--text); }
.search-box input::placeholder { color: var(--text-dim); }
.search-box:focus-within {
  border-color: rgba(34, 197, 94, 0.5); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12), 0 0 24px rgba(34, 197, 94, 0.08);
}

.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: var(--text-muted); border: 1px solid transparent; position: relative;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 8px var(--danger); border: 1.5px solid var(--bg);
}
.tb-divider { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }

/* ==========================================================================
   视图容器
   ========================================================================== */
.viewport { flex: 1; padding: 26px 28px 40px; }

.view { display: none; }
.view.active { display: block; animation: viewIn 0.45s var(--ease); }

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

.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head h2 { font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }
.view-head p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ==========================================================================
   按钮 / 分段器 / 标签
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn .ico { width: 17px; height: 17px; }
.btn-primary {
  background: linear-gradient(135deg, #16A34A, #22C55E);
  color: #04120a; box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 26px rgba(34, 197, 94, 0.5); transform: translateY(-1px); }
.btn-ghost { background: rgba(15, 23, 42, 0.55); border-color: var(--border-strong); color: var(--text-soft); }
.btn-ghost:hover { background: var(--surface-hover); border-color: rgba(148, 163, 184, 0.35); }
.btn-danger { background: var(--danger-soft); border-color: rgba(239, 68, 68, 0.35); color: #F87171; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 9px; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px;
  background: rgba(2, 6, 23, 0.6); border: 1px solid var(--border);
}
.seg-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 12.5px; color: var(--text-muted); font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.seg-btn:hover { color: var(--text-soft); }
.seg-btn.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.08));
  color: var(--accent-bright); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.link-btn { font-size: 12.5px; color: var(--accent-bright); font-weight: 500; transition: opacity 0.2s; }
.link-btn:hover { opacity: 0.8; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2.5px 9px; border-radius: 99px;
  letter-spacing: 0.3px; white-space: nowrap;
}
.tag-live  { background: var(--danger-soft); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.35); animation: pulseSoft 2s infinite; }
.tag-up    { background: var(--info-soft); color: #7DD3FC; border: 1px solid rgba(56, 189, 248, 0.35); }
.tag-soon  { background: var(--warning-soft); color: #FCD34D; border: 1px solid rgba(245, 158, 11, 0.35); }
.tag-ok    { background: var(--accent-soft); color: var(--accent-bright); border: 1px solid rgba(34, 197, 94, 0.35); }
.tag-win   { background: var(--accent-soft); color: var(--accent-bright); border: 1px solid rgba(34, 197, 94, 0.35); }
.tag-lose  { background: var(--danger-soft); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.tag-warn  { background: var(--warning-soft); color: #FCD34D; border: 1px solid rgba(245, 158, 11, 0.35); }
.tag-fin   { background: var(--accent-soft); color: var(--accent-bright); }
.tag-hr    { background: var(--info-soft); color: #7DD3FC; }
.tag-trv   { background: var(--warning-soft); color: #FCD34D; }
.tag-trn   { background: var(--violet-soft); color: #C4B5FD; }
.tag-in    { background: var(--accent-soft); color: var(--accent-bright); }
.tag-out   { background: var(--danger-soft); color: #F87171; }
.tag-role  { background: var(--violet-soft); color: #C4B5FD; border: 1px solid rgba(139, 92, 246, 0.3); }

@keyframes pulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.chip {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  border: 1px solid transparent; white-space: nowrap;
}
.chip-up    { background: var(--accent-soft); color: var(--accent-bright); border-color: rgba(34, 197, 94, 0.3); }
.chip-warn  { background: var(--warning-soft); color: #FCD34D; border-color: rgba(245, 158, 11, 0.3); }
.chip-info  { background: var(--info-soft); color: #7DD3FC; border-color: rgba(56, 189, 248, 0.3); }
.chip-danger{ background: var(--danger-soft); color: #F87171; border-color: rgba(239, 68, 68, 0.3); }
.chip-live  { background: var(--danger-soft); color: #F87171; border-color: rgba(239, 68, 68, 0.3); animation: pulseSoft 2s infinite; }

/* ==========================================================================
   Hero 欢迎区
   ========================================================================== */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 4px 2px 24px; flex-wrap: wrap;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 10.5px; letter-spacing: 3px; color: var(--accent-bright);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulseSoft 1.6s infinite; }
.hero h1 { font-size: 26px; font-weight: 700; margin-top: 10px; letter-spacing: 0.5px; }
.hero h1 .hl { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: 2px; margin-left: 8px; text-shadow: 0 0 22px var(--accent-glow); }
.hero p { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.hero-right { display: flex; gap: 10px; }

/* ==========================================================================
   KPI 卡片
   ========================================================================== */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi { padding: 18px 20px; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-label { font-size: 12.5px; color: var(--text-muted); }
.kpi-val { font-size: 30px; font-weight: 700; letter-spacing: 1px; line-height: 1.15; }
.kpi-unit { font-size: 12.5px; color: var(--text-dim); font-weight: 400; margin-left: 6px; letter-spacing: 0; }
.kpi-spark { height: 36px; margin-top: 10px; }
.kpi-spark svg { width: 100%; height: 100%; display: block; }

.bar-mini { height: 5px; border-radius: 99px; background: rgba(148, 163, 184, 0.12); margin-top: 14px; overflow: hidden; }
.bar-mini i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--info)); box-shadow: 0 0 10px var(--accent-glow); }

/* ==========================================================================
   网格布局
   ========================================================================== */
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid-main { grid-template-columns: 1.7fr 1fr; }
.grid-sub  { grid-template-columns: 1.6fr 1fr; }
.grid-btm  { grid-template-columns: 1fr 1fr 1fr; }

.panel { padding: 20px 22px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h3 { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.panel-sub { font-size: 12px; color: var(--text-dim); margin-top: 5px; }

.chart-area { height: 230px; }
.chart-bar { height: 240px; }
.chart-area svg { width: 100%; height: 100%; display: block; }

.chart-legend { display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--text-muted); margin-top: 10px; flex-wrap: wrap; }
.chart-legend .hl { font-weight: 600; margin-left: auto; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-green { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.lg-dim   { background: rgba(148, 163, 184, 0.4); }
.lg-p1 { background: #22C55E; } .lg-p2 { background: #38BDF8; } .lg-p3 { background: #F59E0B; } .lg-p4 { background: #64748B; }

/* ==========================================================================
   子弹图（目标完成度）
   ========================================================================== */
.bullet-list { display: flex; flex-direction: column; gap: 16px; }
.bullet-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin-bottom: 7px; }
.bullet-name { color: var(--text-soft); }
.bullet-meta .mono { color: var(--text); }
.bullet-bar {
  height: 9px; border-radius: 99px; background: rgba(148, 163, 184, 0.1);
  position: relative; overflow: visible;
}
.bullet-fill {
  height: 100%; border-radius: 99px; position: relative;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bc) 55%, transparent), var(--bc));
  box-shadow: 0 0 12px color-mix(in srgb, var(--bc) 45%, transparent);
  max-width: 100%;
}
.bullet-target {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 2.5px; height: 15px; background: var(--text); border-radius: 2px;
  box-shadow: 0 0 6px rgba(248, 250, 252, 0.6);
}
.bullet-note { font-size: 11.5px; color: var(--text-dim); margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border-strong); }

/* ==========================================================================
   仪表盘（Gauge）
   ========================================================================== */
.gauge-wrap { position: relative; height: 190px; display: grid; place-items: center; }
.gauge-wrap svg { width: 100%; max-width: 230px; height: auto; }
.gauge-center { position: absolute; left: 50%; top: 68%; transform: translate(-50%, -50%); text-align: center; }
.gauge-num { font-size: 34px; font-weight: 700; }
.gauge-unit { font-size: 15px; color: var(--text-muted); }
.gauge-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; letter-spacing: 1px; }
.gauge-stats { display: flex; justify-content: center; gap: 34px; margin-top: 6px; }
.gauge-stats div { text-align: center; }
.gauge-stats b { font-size: 17px; display: block; }
.gauge-stats span { font-size: 11px; color: var(--text-dim); }

/* ==========================================================================
   今日赛程 / 公告 / 待办
   ========================================================================== */
.match-list { display: flex; flex-direction: column; gap: 6px; }
.match-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(2, 6, 23, 0.35); border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.match-item:hover { background: rgba(30, 41, 59, 0.4); border-color: var(--border-strong); transform: translateX(3px); }
.match-vs { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.match-vs b { letter-spacing: 1px; }
.match-vs .vs { font-size: 10px; color: var(--text-dim); font-family: var(--font-display); }
.match-info { display: flex; align-items: center; gap: 10px; }
.match-time { font-size: 12px; color: var(--text-muted); }
.match-tag { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; }

.notice-list { display: flex; flex-direction: column; }
.notice-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 2px; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.notice-item:last-child { border-bottom: none; }
.notice-item p { flex: 1; color: var(--text-soft); line-height: 1.55; }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 6px; box-shadow: 0 0 8px var(--accent); flex-shrink: 0; }
.dot-gold { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.dot-blue { background: var(--info); box-shadow: 0 0 8px var(--info); }
.notice-time { font-size: 11px; color: var(--text-dim); flex-shrink: 0; }

.todo-list { display: flex; flex-direction: column; }
.todo-item {
  display: flex; align-items: center; gap: 11px; padding: 12px 2px;
  border-bottom: 1px dashed var(--border); cursor: pointer; font-size: 13px;
}
.todo-item:last-child { border-bottom: none; }
.todo-item input { appearance: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: rgba(2, 6, 23, 0.4); cursor: pointer; position: relative; transition: all 0.2s var(--ease); }
.todo-item input:checked { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.todo-item input:checked::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 9px; border: solid #04120a; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.todo-item input:checked + span { color: var(--text-dim); text-decoration: line-through; }
.todo-item span { flex: 1; color: var(--text-soft); }
.todo-tag { font-size: 10.5px; color: var(--text-dim); background: rgba(148, 163, 184, 0.1); padding: 2px 8px; border-radius: 99px; }

/* ==========================================================================
   表格
   ========================================================================== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  text-align: left; font-size: 11.5px; font-weight: 500; color: var(--text-dim);
  padding: 0 14px 12px; letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.table tbody td { padding: 13px 14px; color: var(--text-soft); border-bottom: 1px solid var(--border); }
.table tbody tr { transition: background 0.15s; cursor: default; }
.table tbody tr:hover { background: rgba(30, 41, 59, 0.28); }
.table tbody tr:last-child td { border-bottom: none; }

/* ==========================================================================
   审批中心
   ========================================================================== */
.approval-list { display: flex; flex-direction: column; gap: 14px; }
.approval-item { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.apv-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-bright);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.apv-ico .ico { width: 22px; height: 22px; }
.ico-hr { background: var(--info-soft); color: #7DD3FC; border-color: rgba(56, 189, 248, 0.25); }
.ico-trv { background: var(--warning-soft); color: #FCD34D; border-color: rgba(245, 158, 11, 0.25); }
.ico-trn { background: var(--violet-soft); color: #C4B5FD; border-color: rgba(139, 92, 246, 0.3); }
.apv-main { flex: 1; min-width: 0; }
.apv-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.apv-meta { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.apv-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ==========================================================================
   队员管理
   ========================================================================== */
.sb-inline { width: 240px; }
.player-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.player {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.player:hover { transform: translateY(-3px); border-color: rgba(34, 197, 94, 0.35); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(34, 197, 94, 0.08); }
.player-avatar {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; font-size: 20px; color: #04120a; flex-shrink: 0;
}
.av-blaze { background: linear-gradient(135deg, #4ADE80, #16A34A); box-shadow: 0 0 18px rgba(34, 197, 94, 0.4); }
.av-viper { background: linear-gradient(135deg, #38BDF8, #2563EB); box-shadow: 0 0 18px rgba(56, 189, 248, 0.4); }
.av-nova  { background: linear-gradient(135deg, #F59E0B, #EA580C); box-shadow: 0 0 18px rgba(245, 158, 11, 0.4); }
.av-ghost { background: linear-gradient(135deg, #A78BFA, #7C3AED); box-shadow: 0 0 18px rgba(139, 92, 246, 0.4); }
.av-luna  { background: linear-gradient(135deg, #F472B6, #DB2777); box-shadow: 0 0 18px rgba(244, 114, 182, 0.4); }
.av-sora  { background: linear-gradient(135deg, #94A3B8, #475569); box-shadow: 0 0 18px rgba(148, 163, 184, 0.4); }
.av-sys   { background: linear-gradient(135deg, #22D3EE, #0891B2); box-shadow: 0 0 18px rgba(34, 211, 238, 0.4); }
.av-trv   { background: linear-gradient(135deg, #FACC15, #CA8A04); box-shadow: 0 0 18px rgba(250, 204, 21, 0.4); }

.player-info { flex: 1; min-width: 0; }
.player-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.player-stats { display: flex; gap: 14px; margin-top: 7px; font-size: 11.5px; color: var(--text-muted); }
.player-stats .mono { color: var(--text-soft); }
.player-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-dim); flex-shrink: 0; }
.dot-online { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dot-away { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 8px var(--warning); }

/* ==========================================================================
   财务：环形图
   ========================================================================== */
.donut-wrap { display: flex; align-items: center; gap: 26px; padding: 8px 0; }
.donut { width: 180px; height: 180px; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-center b { font-family: var(--font-mono); font-size: 22px; }
.donut-center span { font-size: 11px; color: var(--text-dim); display: block; margin-top: 2px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 13px; font-size: 13px; color: var(--text-soft); }
.donut-legend div { display: flex; align-items: center; gap: 9px; }
.donut-legend .mono { margin-left: auto; color: var(--text); }

/* ==========================================================================
   文档中心
   ========================================================================== */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.doc { padding: 20px; cursor: pointer; transition: transform 0.25s var(--ease), border-color 0.25s; }
.doc:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, 0.35); }
.doc-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--info-soft); color: #7DD3FC; border: 1px solid rgba(56, 189, 248, 0.25); margin-bottom: 14px;
}
.doc-ico .ico { width: 20px; height: 20px; }
.doc-name { font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.doc-meta { font-size: 11.5px; color: var(--text-dim); margin-top: 7px; }

/* ==========================================================================
   消息通知
   ========================================================================== */
.msg-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.msg-item { display: flex; gap: 15px; padding: 17px 20px; }
.msg-item.msg-unread { border-color: rgba(34, 197, 94, 0.3); }
.msg-item.msg-unread::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 3px 0 0 3px; background: linear-gradient(180deg, var(--accent), transparent);
}
.msg-avatar {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700; color: #04120a;
}
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.msg-head b { font-size: 14px; }
.msg-time { font-size: 11px; color: var(--text-dim); margin-left: auto; }
.msg-body p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 9px; }

/* ==========================================================================
   页面切换遮罩
   ========================================================================== */
.page-transition {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: linear-gradient(120deg, #052E16, #020617 45%, #052E16);
  transform: translateY(100%);
}
.page-transition.on { animation: pageSlide 0.5s var(--ease); pointer-events: auto; }
@keyframes pageSlide {
  0%   { transform: translateY(100%); }
  60%  { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}

/* ==========================================================================
   登录页
   ========================================================================== */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-wrap { width: 100%; max-width: 420px; }
.login-card {
  position: relative;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(34, 197, 94, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 40px 38px 32px;
  animation: cardUp 0.6s var(--ease);
}
.login-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px 140px at 20% 0%, rgba(34, 197, 94, 0.12), transparent 70%);
}
@keyframes cardUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.login-logo { text-align: center; margin-bottom: 16px; }
.login-logo img { width: 84px; height: 84px; border-radius: 22px; object-fit: cover;
  border: 1px solid rgba(34, 197, 94, 0.35); box-shadow: 0 0 30px rgba(34, 197, 94, 0.25); }
.login-title { text-align: center; font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.login-title span { color: var(--text-muted); font-weight: 600; }
.login-sub { text-align: center; font-family: var(--font-display); font-size: 10px; letter-spacing: 3px; color: var(--accent-bright); margin: 8px 0 28px; opacity: 0.85; }
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.input-wrap {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  background: rgba(2, 6, 23, 0.5); border: 1px solid var(--border-strong);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input-wrap:focus-within { border-color: rgba(34, 197, 94, 0.55); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12), 0 0 20px rgba(34, 197, 94, 0.08); }
.input-wrap .ico { width: 18px; height: 18px; color: var(--text-dim); }
.input-wrap input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; min-width: 0; }
.input-wrap input::placeholder { color: var(--text-dim); }
.pw-toggle { color: var(--text-dim); display: grid; place-items: center; padding: 2px; }
.pw-toggle .ico { width: 18px; height: 18px; }
.login-err { min-height: 18px; font-size: 12.5px; color: #F87171; margin-bottom: 8px; text-align: center; }
.login-btn { width: 100%; justify-content: center; padding: 12px; font-size: 14px; letter-spacing: 4px; }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.login-foot { text-align: center; font-size: 11px; color: var(--text-dim); margin-top: 22px; letter-spacing: 0.5px; }

/* ==========================================================================
   视图加载 / 空状态 / 通用
   ========================================================================== */
.view-loading { display: flex; gap: 8px; padding: 60px 0; justify-content: center; }
.view-loading span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: ld 1s ease-in-out infinite; }
.view-loading span:nth-child(2) { animation-delay: 0.15s; }
.view-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ld { 0%, 100% { transform: scale(0.6); opacity: 0.4; } 50% { transform: scale(1); opacity: 1; } }
.empty-tip { color: var(--text-dim); font-size: 13px; text-align: center; padding: 14px; }
.link-danger { color: #F87171 !important; }
.link-danger:hover { opacity: 0.75; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.brand-img { width: 30px; height: 30px; object-fit: cover; border-radius: 8px; }
.todo-item.static { cursor: default; }
.todo-item.static input { display: none; }

/* ==========================================================================
   弹窗 Modal
   ========================================================================== */
.modal-mask {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(2, 6, 23, 0.72); backdrop-filter: blur(8px);
  animation: maskIn 0.25s var(--ease);
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 460px; max-height: 88vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0E1728, #0A1120);
  border: 1px solid var(--border-strong); border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 50px rgba(34, 197, 94, 0.07);
  animation: modalUp 0.32s var(--ease);
}
.modal-wide { max-width: 720px; }
@keyframes modalUp { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 15.5px; font-weight: 700; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.field-row { display: flex; flex-direction: column; gap: 7px; }
.field-row > label { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.field-row input[type="text"], .field-row input[type="password"], .field-row input[type="number"],
.field-row input[type="month"], .field-row input[type="date"], .field-row input[type="datetime-local"],
.field-row select, .field-row textarea {
  width: 100%; padding: 10px 13px; border-radius: 10px; font-size: 13.5px; color: var(--text);
  background: rgba(2, 6, 23, 0.55); border: 1px solid var(--border-strong); outline: none;
  font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}
.field-row input:focus, .field-row select:focus, .field-row textarea:focus {
  border-color: rgba(34, 197, 94, 0.55); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.field-row input:disabled { opacity: 0.5; cursor: not-allowed; }
.field-row textarea { resize: vertical; min-height: 66px; line-height: 1.6; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast-wrap { position: fixed; top: 80px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 12px; font-size: 13px;
  background: var(--surface-strong); border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s var(--ease);
}
.toast.out { opacity: 0; transform: translateX(20px); transition: all 0.3s var(--ease); }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex-shrink: 0; }
.toast-err .toast-dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.toast-err { border-color: rgba(239, 68, 68, 0.4); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   顶栏快捷菜单
   ========================================================================== */
.quick-create { position: relative; }
.quick-menu {
  position: absolute; top: 44px; right: 0; z-index: 60; min-width: 168px; padding: 6px;
  background: var(--surface-strong); border: 1px solid var(--border-strong); border-radius: 13px;
  backdrop-filter: blur(18px); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: all 0.2s var(--ease);
}
.quick-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.quick-item {
  width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; font-size: 13px; color: var(--text-soft);
  transition: background 0.15s, color 0.15s;
}
.quick-item:hover { background: var(--accent-soft); color: var(--accent-bright); }

/* ==========================================================================
   审批卡片 / 通知卡片
   ========================================================================== */
.apv-content { font-size: 12.5px; color: var(--text-muted); margin-top: 9px; line-height: 1.6; background: rgba(2, 6, 23, 0.4); border-radius: 9px; padding: 9px 12px; }
.apv-status { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.apv-reply { font-size: 12px; color: var(--text-dim); }
.notice-list-card { display: flex; flex-direction: column; gap: 14px; max-width: 920px; }
.notice-card-head { display: flex; align-items: center; gap: 12px; }
.notice-card-head h3 { flex: 1; font-size: 15px; }
.notice-card-content { font-size: 13px; color: var(--text-soft); line-height: 1.7; margin: 12px 0; white-space: pre-wrap; }
.notice-card-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); }

/* ==========================================================================
   文档 / 俱乐部信息
   ========================================================================== */
.doc-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.doc-ico.doc-pdf { background: var(--danger-soft); color: #F87171; border-color: rgba(239, 68, 68, 0.3); }
.doc-ico.doc-word { background: var(--info-soft); color: #7DD3FC; border-color: rgba(56, 189, 248, 0.3); }
.doc-ico.doc-excel { background: var(--accent-soft); color: var(--accent-bright); border-color: rgba(34, 197, 94, 0.3); }
.doc-ico.doc-zip { background: var(--warning-soft); color: #FCD34D; border-color: rgba(245, 158, 11, 0.3); }
.club-card { max-width: 920px; }
.club-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.club-head h3 { font-size: 22px; font-weight: 800; }
.club-logo { width: 64px; height: 64px; border-radius: 18px; }
.club-logo img { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; }
.club-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 26px; }
.club-item { padding-bottom: 13px; border-bottom: 1px dashed var(--border); }
.club-k { font-size: 11.5px; color: var(--text-dim); letter-spacing: 1px; margin-bottom: 5px; }
.club-v { font-size: 14px; color: var(--text-soft); line-height: 1.6; }

/* ==========================================================================
   消息聊天
   ========================================================================== */
.msg-layout { display: grid; grid-template-columns: 280px 1fr; height: calc(100vh - var(--topbar-h) - 120px); min-height: 440px; gap: 16px; }
.msg-sidebar { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(20px); }
.msg-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 700; }
.msg-partner-list { flex: 1; overflow-y: auto; }
.msg-partner { display: flex; align-items: center; gap: 11px; padding: 12px 16px; cursor: pointer; border-left: 3px solid transparent; transition: background 0.15s; }
.msg-partner:hover { background: rgba(30, 41, 59, 0.4); }
.msg-partner.active { background: var(--accent-soft); border-left-color: var(--accent); }
.msg-p-avatar {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; color: #04120a;
  background: linear-gradient(135deg, #4ADE80, #16A34A);
}
.msg-p-info { flex: 1; min-width: 0; }
.msg-p-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.msg-p-last { font-size: 11.5px; color: var(--text-dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-unread-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.msg-thread { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(20px); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.thread-head .msg-p-avatar { width: 34px; height: 34px; border-radius: 10px; }
.thread-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.bubble-row { display: flex; justify-content: flex-start; }
.bubble-row.me { justify-content: flex-end; }
.bubble {
  max-width: 68%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; font-size: 13.5px; line-height: 1.6;
  background: rgba(30, 41, 59, 0.7); border: 1px solid var(--border); color: var(--text-soft);
}
.bubble-row.me .bubble {
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(34, 197, 94, 0.08));
  border-color: rgba(34, 197, 94, 0.35); color: var(--text);
}
.bubble-time { font-size: 10px; color: var(--text-dim); margin-top: 5px; text-align: right; }
.bubble-content { word-break: break-word; }
.bubble-content.recalled { color: var(--text-dim); font-style: italic; }
.bubble-meta { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 5px; }
.recall-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; color: var(--text-dim);
  border: 1px solid var(--border-strong); background: rgba(2, 6, 23, 0.4);
  cursor: pointer; transition: all 0.15s var(--ease);
}
.recall-btn:hover { color: #F87171; border-color: rgba(239, 68, 68, 0.5); box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }
.recalled-cell { color: var(--text-dim); font-style: italic; }
.thread-empty { margin: auto; color: var(--text-dim); font-size: 13px; }
.thread-input { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.thread-input input {
  flex: 1; padding: 11px 14px; border-radius: 11px; font-size: 13.5px; color: var(--text);
  background: rgba(2, 6, 23, 0.55); border: 1px solid var(--border-strong); outline: none;
}
.thread-input input:focus { border-color: rgba(34, 197, 94, 0.55); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12); }

/* ==========================================================================
   桌面端 UI 打磨
   ========================================================================== */
/* 键盘导航焦点可见 */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button:active { transform: scale(0.97); }
/* 仅支持悬停的设备做抬升效果 */
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); }
  .nav-item:hover { transform: translateX(2px); }
}
/* 滚动条更精致 */
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(148,163,184,.22), rgba(148,163,184,.14)); }

/* ==========================================================================
   移动端专用 UI（抽屉导航 + 单列布局 + 大触控目标）
   ========================================================================== */
.nav-toggle { display: none; }
.sidebar-scrim { display: none; }

@media (max-width: 1200px) {
  .grid-btm { grid-template-columns: 1fr 1fr; }
  .grid-btm .card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-main, .grid-sub, .grid-btm { grid-template-columns: 1fr; }
  .msg-layout { grid-template-columns: 240px 1fr; }
}

@media (max-width: 860px) {
  /* 侧边栏 → 抽屉 */
  .nav-toggle { display: inline-flex; }
  .sidebar {
    width: min(82vw, 300px);
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
    z-index: 60;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 24px 0 60px rgba(0, 0, 0, 0.55); }
  .sidebar-scrim {
    display: block; position: fixed; inset: 0; z-index: 59;
    background: rgba(2, 6, 23, 0.62); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
  }
  .sidebar-scrim.show { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .nav-item { min-height: 46px; }
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  /* 顶栏 */
  .topbar {
    height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0;
  }
  .tb-title { font-size: 15px; }
  .tb-crumb { display: none; }
  .search-box { display: none; }
  .icon-btn { width: 42px; height: 42px; }
  .tb-divider { margin: 0 2px; }
  .viewport { padding: 16px 12px 32px; }

  /* Hero */
  .hero { padding: 4px 2px 18px; }
  .hero h1 { font-size: 20px; line-height: 1.35; }
  .hero h1 .hl { display: block; font-size: 15px; margin: 6px 0 0; }
  .hero p { font-size: 12px; }
  .hero-right { width: 100%; flex-direction: column; gap: 8px; }
  .hero-right .btn { width: 100%; justify-content: center; min-height: 46px; }

  /* KPI 与卡片 */
  .kpi-row { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-val { font-size: 22px; }
  .kpi-unit { font-size: 11px; }
  .kpi-spark { height: 30px; }
  .panel { padding: 16px 14px; }
  .panel-head { flex-wrap: wrap; }
  .panel-head h3 { font-size: 14px; }
  .chart-area { height: 190px; }
  .chart-bar { height: 200px; }

  /* 视图头 */
  .view-head h2 { font-size: 18px; }
  .view-head p { font-size: 12px; }
  .view-head { margin-bottom: 16px; }
  .view-head .btn, .view-head .btn-ghost { min-height: 44px; }

  /* 表格：卡片内横向滚动，保证内容完整且保持表格布局 */
  .panel { overflow-x: auto; }
  .table { min-width: 560px; }
  .table thead th, .table tbody td { white-space: nowrap; padding: 12px; }
  .modal-body { overflow: auto; }

  /* 审批卡片纵向堆叠 */
  .approval-item { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
  .approval-item .apv-ico { width: 40px; height: 40px; }
  .apv-actions { justify-content: flex-end; }
  .apv-actions .btn, .row-actions .btn { min-height: 44px; }

  /* 网格单列 */
  .player-grid, .doc-grid { grid-template-columns: 1fr; }

  /* 聊天双栏 → 上下结构 */
  .msg-layout { grid-template-columns: 1fr; height: auto; gap: 10px; }
  .msg-sidebar { height: 40vh; }
  .msg-thread { height: 50vh; }
  .thread-input { padding: 10px 12px; }
  .thread-input .btn { min-height: 44px; }
  .thread-input input { padding: 12px 12px; }

  /* 弹窗 → 底部抽屉式 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0;
    animation: sheetUp 0.32s var(--ease);
    padding-bottom: env(safe-area-inset-bottom);
  }
  @keyframes sheetUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  .modal-head { padding: 16px 18px; }
  .modal-body { padding: 16px 18px; }
  .form-actions .btn { min-height: 46px; }

  /* 控件触摸友好 */
  .seg { flex-wrap: wrap; }
  .seg-btn { padding: 8px 14px; }
  .link-btn { display: inline-block; padding: 6px 0; }
  .match-item { padding: 12px; }
  .club-grid { grid-template-columns: 1fr; }
  .notice-card-meta { flex-direction: column; gap: 4px; }
  .gauge-stats { gap: 24px; }
  .gauge-num { font-size: 28px; }

  /* 登录页 */
  .login-card { padding: 32px 24px 24px; }
  .login-wrap { max-width: 100%; }
  .login-title { font-size: 18px; }
  .login-btn { min-height: 48px; }

  /* Toast 位置 */
  .toast-wrap { top: calc(60px + env(safe-area-inset-top)); right: 12px; left: 12px; align-items: flex-end; }
}

/* ============ 移动端下拉菜单（顶部标题按钮） ============ */
.mob-nav-btn, .mob-menu { display: none; }

@media (max-width: 860px) {
  .tb-title, .tb-crumb { display: none; }   /* 标题移入下拉按钮 */
  .nav-toggle { display: none; }            /* 抽屉汉堡由下拉按钮替代 */
  .mob-nav-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 14px; border-radius: 10px;
    background: var(--surface-hover); border: 1px solid var(--border-strong);
    color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
  }
  .mob-nav-btn .ico { width: 16px; height: 16px; color: var(--text-muted); transition: transform 0.2s var(--ease); }
  .mob-nav-btn.active { border-color: rgba(34, 197, 94, 0.5); background: var(--accent-soft); }
  .mob-nav-btn.active .ico { transform: rotate(180deg); }
  .mob-menu {
    display: block; position: fixed; top: 66px; left: 12px; right: 12px; z-index: 55;
    max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-8px);
    background: var(--surface-strong); border: 1px solid var(--border-strong);
    border-radius: 14px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: max-height 0.28s var(--ease), opacity 0.2s, transform 0.28s var(--ease);
  }
  .mob-menu.open { max-height: 72vh; overflow-y: auto; opacity: 1; transform: none; }
  .mob-menu .nav-item { margin: 4px 8px; border-radius: 10px; }
}

@media (max-width: 640px) {
  .mob-menu { top: calc(56px + env(safe-area-inset-top)); }
}

/* ============ 调试内置账号面板 ============ */
.debug-users input, .debug-users select {
  width: 100%; padding: 10px 13px; border-radius: 10px; font-size: 13px; color: var(--text);
  background: rgba(2, 6, 23, 0.55); border: 1px solid var(--border-strong); outline: none; font-family: inherit;
}
.debug-users input:focus, .debug-users select:focus {
  border-color: rgba(34, 197, 94, 0.55); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

/* 减少动效偏好（无障碍） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
