:root {
  --bg: #070b16;
  --bg2: #0c1322;
  --panel: rgba(20, 32, 56, 0.72);
  --panel-solid: #121d33;
  --line: rgba(90, 140, 255, 0.16);
  --line-strong: rgba(90, 140, 255, 0.32);
  --text: #e8eefc;
  --muted: #8fa3c8;
  --primary: #4d9fff;
  --primary-2: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --violet: #a78bfa;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(45, 90, 190, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(34, 211, 238, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.layout { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0a1226, #080d1a);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 20px; border-bottom: 1px solid var(--line); }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
  box-shadow: 0 4px 16px rgba(77, 159, 255, 0.4);
}
.brand-text strong { display: block; font-size: 15px; letter-spacing: 1px; }
.brand-text span { font-size: 11px; color: var(--muted); }

.nav { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav a {
  display: block; padding: 11px 14px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 14px;
  transition: all .18s ease; position: relative;
}
.nav a:hover { color: var(--text); background: rgba(77, 159, 255, 0.10); }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(77,159,255,0.28), rgba(34,211,238,0.12)); }
.nav a.active::before {
  content: ""; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 3px; background: linear-gradient(var(--primary), var(--primary-2));
}

.sidebar-foot { padding-top: 16px; border-top: 1px solid var(--line); }
.boss-badge {
  display: flex; gap: 10px; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.boss-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex-shrink: 0; }
.boss-badge strong { font-size: 13px; display: block; }
.boss-badge small { font-size: 11px; color: var(--muted); }

/* ---------- 主区 ---------- */
.main { flex: 1; padding: 26px 30px 50px; max-width: 1440px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.page-head h1 small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 10px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 5px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card-pad { padding: 18px 20px; }
.card h2 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(var(--primary), var(--primary-2)); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 指标卡 ---------- */
.stat-card { padding: 18px 20px; position: relative; overflow: hidden; }
.stat-card .label { font-size: 13px; color: var(--muted); }
.stat-card .value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.stat-card .value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-card .trend { font-size: 12px; margin-top: 6px; color: var(--muted); }
.stat-card .icon { position: absolute; right: 16px; top: 16px; font-size: 22px; opacity: .55; }
.stat-card .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-green { background: rgba(52, 211, 153, 0.14); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.3); }
.badge-amber { background: rgba(251, 191, 36, 0.14); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.3); }
.badge-red   { background: rgba(248, 113, 113, 0.14); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.3); }
.badge-blue  { background: rgba(77, 159, 255, 0.14); color: var(--primary); border: 1px solid rgba(77, 159, 255, 0.3); }
.badge-gray  { background: rgba(143, 163, 200, 0.14); color: var(--muted); border: 1px solid rgba(143, 163, 200, 0.3); }
.badge-violet{ background: rgba(167, 139, 250, 0.14); color: var(--violet); border: 1px solid rgba(167, 139, 250, 0.3); }
.badge-cyan  { background: rgba(34, 211, 238, 0.14); color: var(--primary-2); border: 1px solid rgba(34, 211, 238, 0.3); }

/* ---------- 数据中心卡 ---------- */
.dc-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: transform .18s ease, border-color .18s ease; }
.dc-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.dc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.dc-top h3 { font-size: 17px; }
.dc-top .gpu { font-size: 12px; color: var(--primary-2); font-weight: 700; letter-spacing: .5px; }
.dc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
.dc-meta .kv { background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.dc-meta .kv b { display: block; font-size: 16px; margin-top: 2px; }
.dc-meta .kv span { color: var(--muted); font-size: 11px; }
.dc-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(77, 159, 255, 0.12); color: var(--text);
  font-size: 13px; cursor: pointer; text-decoration: none; transition: all .16s ease;
}
.btn:hover { background: rgba(77, 159, 255, 0.24); border-color: var(--primary); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border: none; color: #04121f; font-weight: 700; }
.btn-primary:hover { filter: brightness(1.12); background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn-ghost { background: transparent; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: rgba(77, 159, 255, 0.05); }

.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--primary-2); }

/* ---------- 进度条 ---------- */
.progress { height: 7px; border-radius: 6px; background: rgba(255,255,255,0.08); overflow: hidden; min-width: 90px; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }

/* ---------- 组织架构树 ---------- */
.org-tree { display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 20px 0; }
.org-level { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.org-node {
  min-width: 190px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; text-align: center;
  box-shadow: var(--shadow); position: relative;
}
.org-node.boss {
  background: linear-gradient(135deg, rgba(77,159,255,0.28), rgba(167,139,250,0.18));
  border-color: rgba(77, 159, 255, 0.5); min-width: 230px;
}
.org-node.c { border-color: rgba(34, 211, 238, 0.35); }
.org-node.team { border-color: rgba(167, 139, 250, 0.3); }
.org-node .nm { font-weight: 700; font-size: 15px; }
.org-node .tl { font-size: 12px; color: var(--primary-2); margin-top: 3px; }
.org-node .sc { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.org-node .cnt { margin-top: 8px; font-size: 12px; color: var(--amber); }
.org-connector { border-left: 1px dashed var(--line-strong); }

/* ---------- 表单 ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: rgba(8, 14, 28, 0.85); border: 1px solid var(--line-strong);
  border-radius: 10px; color: var(--text); padding: 10px 12px; font-size: 13px; outline: none;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(77,159,255,0.15); }
textarea { min-height: 72px; resize: vertical; }

/* ---------- 过滤器 ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input, .filters select { width: auto; min-width: 150px; }

/* ---------- 任务时间线 ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 8px 0 8px 8px; }
.tl-item::before { content: ""; position: absolute; left: -21px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.tl-item .who { font-weight: 600; font-size: 13px; }
.tl-item .when { color: var(--muted); font-size: 11px; margin-left: 8px; }
.tl-item .what { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- 工具条/提示 ---------- */
.toast {
  position: fixed; top: 24px; right: 24px; z-index: 99;
  background: var(--panel-solid); border: 1px solid var(--green);
  color: var(--text); padding: 12px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px);
  transition: all .25s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { border-color: var(--red); }

.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 12px; gap: 12px; }
  .nav { flex-direction: row; margin: 0; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .sidebar-foot { display: none; }
  .main { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
/* 协作组展示 */
.collab-list { display:flex; flex-direction:column; gap:4px; }
.collab-chip {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(77,159,255,0.06); border:1px solid var(--line);
  border-radius:8px; padding:3px 8px; font-size:12px; width:max-content;
}
.collab-chip .dot-on {
  width:7px; height:7px; border-radius:50%; background:var(--green);
  box-shadow:0 0 6px var(--green); flex:none;
  animation:pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.35} }
