/* 白夜 · 工作台 —— 设计 C：深色图标栏 + 卡片式内容 */
:root {
  --bg: #eceef2;
  --panel: #ffffff;
  --panel-2: #f6f7f9;
  --ink: #0f172a;
  --ink-2: #3f4a5c;
  --ink-3: #5b6577;
  --line: #e3e6eb;
  --line-2: #eff1f4;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: #eef3ff;
  --accent-2: #5b85f5;
  --orange: #c2410c;
  --orange-soft: #fdeee3;
  --pos: #15803d;
  --pos-soft: #e8f6ee;
  --warn: #a35200;
  --warn-soft: #fdf2e3;
  --neg: #b91c1c;
  --neg-soft: #fdeceb;
  --rail: #0f172a;
  --rail-ink: #a3aec2;
  --rail-on: #1e293b;
  --radius: 18px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, td.n, .kpi .v, .big { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .warn { color: var(--warn); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- 外壳：图标栏 + 主区 ---------- */
.app { display: flex; gap: 12px; padding: 12px; min-height: 100vh; align-items: flex-start; }
.rail {
  flex: 0 0 72px; position: sticky; top: 12px; height: calc(100vh - 24px); background: var(--rail); border-radius: var(--radius);
  padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 20;
}
.rail .logo { width: 42px; height: 42px; border-radius: 12px; background: #fff; display: grid; place-items: center; margin-bottom: 14px; }
.rail .logo img { width: 32px; height: 32px; }
.rail a.ri {
  width: 56px; min-height: 54px; border-radius: 13px; color: var(--rail-ink); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11px; position: relative; text-decoration: none;
}
.rail a.ri svg { width: 21px; height: 21px; }
.rail a.ri:hover { color: #fff; background: rgba(255,255,255,.05); }
.rail a.ri.on { background: var(--rail-on); color: #fff; }
.rail a.ri .dot { position: absolute; top: 6px; right: 8px; min-width: 16px; height: 16px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }
.rail .me { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail .avatar { width: 38px; height: 38px; border-radius: 50%; background: #334155; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; border: 0; cursor: pointer; padding: 0; }
.rail .avatar:hover { background: #475569; color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-bottom: 40px; }
.topbar {
  background: var(--panel); border-radius: var(--radius); padding: 12px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  position: sticky; top: 12px; z-index: 15; box-shadow: 0 6px 18px rgba(15,23,42,.05);
}
.topbar .mod { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.topbar .mod b { color: var(--ink); font-size: 15px; margin-right: 2px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel-2); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { min-height: 34px; padding: 0 13px; border-radius: 9px; color: var(--ink-2); display: inline-flex; align-items: center; white-space: nowrap; font-size: 13px; text-decoration: none; }
.tabs a:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.tabs a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.1); }
.tabs a .c { margin-left: 4px; font-size: 11px; background: #e5484d; color: #fff; border-radius: 8px; padding: 0 5px; line-height: 16px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.greet { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 14px; }

#main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 4px 4px 0; }
.head h1 { margin: 0; font-size: 22px; letter-spacing: .3px; }
.head p { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; max-width: 760px; }
.head .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.panel > header h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.panel > header .sub { color: var(--ink-3); font-size: 12px; }
.panel .body { padding: 14px 20px 18px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: 1.5fr 1fr; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border-radius: var(--radius); padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 128px; }
.kpi .k { color: var(--ink-3); font-size: 13px; }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.kpi .v small { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.kpi .d { font-size: 12px; color: var(--ink-3); }
.kpi.main { background: var(--accent); color: #fff; grid-column: span 2; }
.kpi.main .k, .kpi.main .d { color: #dce6ff; }
.kpi.main .v { font-size: 42px; letter-spacing: -1px; }

/* ---------- 控件 ---------- */
button, .btn {
  font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  min-height: 34px; padding: 0 13px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; line-height: 1.3;
}
button:hover, .btn:hover { border-color: #c9d2e3; background: var(--panel-2); text-decoration: none; }
button.pri, .btn.pri { background: var(--ink); color: #fff; border-color: var(--ink); }
button.pri:hover, .btn.pri:hover { background: #1e293b; }
button.acc, .btn.acc { background: var(--accent); color: #fff; border-color: var(--accent); }
button.acc:hover, .btn.acc:hover { background: #1e40af; }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover { background: var(--panel-2); }
button.danger { color: var(--neg); }
button.danger:hover { border-color: #f3b4ae; background: var(--neg-soft); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.xs, .btn.xs { font-size: 12px; min-height: 28px; padding: 0 9px; border-radius: 8px; }

input, select, textarea {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 11px; min-height: 34px; min-width: 0;
}
textarea { padding: 8px 11px; resize: vertical; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 16px; height: 16px; accent-color: var(--accent); }
input[type=file] { padding: 5px 8px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent-2); }
label.f { display: grid; gap: 5px; font-size: 12px; color: var(--ink-3); }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; align-items: end; }

.seg { display: inline-flex; background: var(--panel-2); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; min-height: 30px; padding: 0 12px; border-radius: 8px; color: var(--ink-2); }
.seg button:hover { background: rgba(255,255,255,.6); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.1); font-weight: 600; }
.seg button .c { font-size: 11px; color: var(--ink-3); margin-left: 2px; }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 9px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; line-height: 20px; }
.chip.pos { background: var(--pos-soft); color: var(--pos); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.neg { background: var(--neg-soft); color: var(--neg); }
.chip.acc { background: var(--accent-soft); color: var(--accent); }
.chip.game { background: var(--accent-soft); color: var(--accent); }
.chip.general { background: var(--orange-soft); color: var(--orange); }
.lv { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); padding: 0 6px; }
.lv.none { background: var(--line-2); color: var(--ink-3); font-weight: 500; }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); position: sticky; top: 0; z-index: 1; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th.n, td.n { text-align: right; white-space: nowrap; }
tr.sel td { background: var(--accent-soft); }
tr.detail td { background: var(--panel-2); padding: 16px 20px; }
tr.dim td { opacity: .55; }
.vt { display: flex; gap: 10px; min-width: 280px; max-width: 440px; }
.vt img { width: 44px; height: 58px; object-fit: cover; border-radius: 8px; background: var(--line-2); flex: none; }
.vt .t { font-weight: 600; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vt .m { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.cell2 { font-size: 13px; max-width: 240px; } .cell2 .s { font-size: 12px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.who { display: grid; grid-template-columns: auto 1fr; gap: 4px 6px; font-size: 12px; align-items: center; min-width: 210px; }
.who .r { color: var(--ink-3); white-space: nowrap; }
.who select { min-height: 28px; padding: 0 6px; font-size: 12px; }
.mini td, .mini th { padding: 8px 10px; font-size: 13px; }
.mini th:first-child, .mini td:first-child { padding-left: 4px; }
.mini th:last-child, .mini td:last-child { padding-right: 4px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.filters input[type=search] { width: 230px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.pager .pg { display: flex; gap: 6px; align-items: center; }
.bulk { display: flex; gap: 8px; align-items: center; padding: 10px 20px; background: var(--accent-soft); font-size: 13px; flex-wrap: wrap; }

/* ---------- 排行、进度 ---------- */
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.rank li:last-child { border-bottom: 0; }
.rank .no { width: 28px; height: 28px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.rank li:nth-child(1) .no { background: #fef3c7; color: #92400e; }
.rank li:nth-child(2) .no { background: #e5e7eb; color: #374151; }
.rank li:nth-child(3) .no { background: #fde7d6; color: #9a3412; }
.rank .nm { min-width: 0; }
.rank .nm b { font-weight: 600; } .rank .nm span { font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.rank .bar, .mix { height: 8px; background: var(--orange-soft); border-radius: 4px; margin-top: 6px; overflow: hidden; display: flex; }
.rank .bar i, .mix i { display: block; height: 100%; background: var(--accent); }
.bar.plain { background: var(--line-2); }
.rank .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.rank .amt small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.pending { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.pending div { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.pending b { display: block; font-variant-numeric: tabular-nums; font-size: 16px; }
.pending span { font-size: 12px; color: var(--ink-3); }
.legend { display: inline-flex; gap: 12px; font-size: 12px; color: var(--ink-3); align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---------- 图表 ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 200px; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 5px 8px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -110%); }

/* 每日消耗热力表 */
.heat { min-width: 820px; }
.heat .hr { display: grid; grid-template-columns: 170px 44px 1fr 96px 120px; gap: 6px; align-items: center; padding: 3px 0; }
.heat .hr.head { font-size: 11px; color: var(--ink-3); padding-bottom: 6px; }
.heat .nm { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat .cells { display: grid; gap: 3px; }
.heat .cells span { height: 24px; border-radius: 4px; background: #f1f4fa; }
.heat .cells span.fut { background: repeating-linear-gradient(45deg, #f6f7f9, #f6f7f9 3px, #fff 3px, #fff 6px); }
.heat .tot { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.heat .trend { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.heat .hr.clickable:hover { background: var(--panel-2); border-radius: 8px; }

/* ---------- 其他 ---------- */
.note { font-size: 12px; color: var(--ink-3); background: var(--panel-2); border-radius: 12px; padding: 11px 14px; line-height: 1.75; }
.note b { color: var(--ink-2); }
.warnbox { background: var(--warn-soft); color: var(--warn); }
.warnbox b { color: inherit; }
.snaps { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
.snaps dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
.snaps dt { color: var(--ink-3); }
.snaps ol { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 260px; overflow: auto; }
.snaps ol li { display: grid; grid-template-columns: 150px 1fr auto; white-space: nowrap; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.steps { margin: 0; padding-left: 20px; line-height: 1.9; font-size: 13px; color: var(--ink-2); }
code.k { font-size: 12px; background: var(--line-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.tiers { display: grid; gap: 8px; }
.tiers .t { display: flex; gap: 6px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.tiers input { width: 110px; }
.empty { padding: 40px 16px; text-align: center; color: var(--ink-3); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 13px; z-index: 99; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.toast.err { background: var(--neg); }
.loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fsec { grid-column: 1 / -1; margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--warn); font-weight: 600; }
.fsec.blue { color: var(--accent); }
.upl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.upl input[type=file] { max-width: 280px; }
.clickable { cursor: pointer; }
.clickable:hover td { background: var(--panel-2); }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-strip div { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.stat-strip b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat-strip span { font-size: 12px; color: var(--ink-3); }
.gaps { font-size: 12px; color: var(--ink-3); }

/* 优秀素材墙 */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wcard { background: var(--panel); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.wcard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.1); text-decoration: none; }
.wcard .cv { aspect-ratio: 3 / 4; background: linear-gradient(160deg, #1d4ed8, #0b1e4a); position: relative; }
.wcard .cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wcard .rk { position: absolute; left: 10px; top: 10px; background: rgba(15,23,42,.75); color: #fff; font-size: 12px; border-radius: 8px; padding: 2px 8px; }
.wcard .sp { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; }
.wcard .sp b { font-size: 20px; font-variant-numeric: tabular-nums; }
.wcard .sp span { font-size: 11px; opacity: .8; display: block; }
.wcard .wb { padding: 10px 12px 12px; display: grid; gap: 4px; }
.wcard .wb .t { font-weight: 600; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wcard .wb .m { font-size: 12px; color: var(--ink-3); }

/* 认领预览 */
.pv-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pv-cols .pc { background: var(--panel-2); border-radius: 14px; padding: 12px 14px; }
.pv-cols .pc b { font-size: 26px; display: block; font-variant-numeric: tabular-nums; }

/* ---------- 登录 / 改密码 ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(900px 480px at 15% -10%, #dbe6ff, transparent), radial-gradient(700px 400px at 100% 110%, #fde7d6, transparent), var(--bg); }
.login form { width: 100%; max-width: 380px; background: var(--panel); border-radius: 22px; padding: 30px; display: grid; gap: 15px; box-shadow: 0 20px 60px rgba(15,23,42,.1); }
.login input { min-height: 44px; font-size: 15px; }
.login button { min-height: 44px; font-size: 15px; }
.lbrand { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-bottom: 6px; text-decoration: none; }
.lbrand:hover { text-decoration: none; }
.lbrand img { width: 46px; height: 46px; }
.lbrand b { display: block; font-size: 21px; letter-spacing: 1px; }
.lbrand small { color: var(--ink-3); font-size: 12px; }

/* ---------- 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(10, 12, 18, .45); z-index: 50; display: grid; place-items: start center; padding: 6vh 16px; overflow-y: auto; }
.dlg { background: var(--panel); border-radius: 20px; width: 100%; max-width: 540px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.dlg.wide { max-width: 920px; }
.dlg > header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.dlg > header h2 { margin: 0; font-size: 16px; }
.dlg .dbody { padding: 18px 22px 24px; }
.dlg .x { font-size: 16px; }

/* ---------- 组织树 ---------- */
.split { display: grid; grid-template-columns: 250px 1fr; gap: 12px; align-items: start; }
.tree { padding: 10px; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.tnode { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.tnode:hover { background: var(--panel-2); }
.tnode.on { background: var(--accent-soft); color: var(--accent); }
.tnode .tn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tnode > span:not(.tn) { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.tnode b { flex: 1; }
.tnode .te { visibility: hidden; min-height: 24px; padding: 0 6px; }
.tnode:hover .te { visibility: visible; }
.tnode .kind { font-size: 10px; padding: 0 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }

.rawgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin: 0 0 10px; font-size: 13px; }
.rawgrid dt { font-size: 12px; color: var(--ink-3); } .rawgrid dd { margin: 0; word-break: break-all; }
select.st-有问题 { border-color: var(--neg); color: var(--neg); }
select.st-已完成 { border-color: var(--pos); color: var(--pos); }
select.st-进行中 { border-color: var(--accent); color: var(--accent); }
.ledit { display: grid; gap: 8px; }
.lrow { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: start; }
.casegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ccard { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.ccard img, .ccard .noimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line-2); display: grid; place-items: center; color: var(--ink-3); font-size: 12px; }
.ccard .cb { padding: 10px 12px 12px; display: grid; gap: 6px; }
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.perm-list div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13px; }
.perm-list div span { color: var(--ink-3); font-size: 12px; }
.perm-list .off { opacity: .5; }
details.panel > summary { list-style: none; font-size: 13px; color: var(--ink-2); }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel[open] > summary { color: var(--ink); font-weight: 600; }
.pcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.pc-card input[type=time] { padding: 0 6px; }
.pc-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.pc-card .t { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-card .t b { font-size: 15px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { padding: 8px 8px 84px; gap: 8px; display: block; }
  .rail { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; height: auto; flex-direction: row; justify-content: space-around; padding: 6px; border-radius: 16px; }
  .rail .logo, .rail .me { display: none; }
  .rail a.ri { width: auto; flex: 1; min-height: 52px; }
  .main { gap: 8px; }
  .topbar { position: static; padding: 10px 12px; gap: 10px; }
  .topbar .right { display: none; }
  .head h1 { font-size: 19px; }
  .kpi { min-height: 0; padding: 14px 16px; }
  .kpi .v { font-size: 22px; }
  .kpi.main .v { font-size: 30px; }
  .g2, .snaps, .pv-cols { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters input[type=search] { width: 100%; }
  .pending { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .tree { position: static; max-height: 240px; }
  .lrow { grid-template-columns: 1fr; }
  .mask { padding: 0; } .dlg, .dlg.wide { border-radius: 0; min-height: 100vh; }
  .snaps ol li { grid-template-columns: 1fr auto; } .snaps ol li span:first-child { grid-column: span 2; }
  th:first-child, td:first-child { padding-left: 14px; }
  .panel > header { padding: 14px 14px 0; } .panel .body { padding: 12px 14px 14px; } .filters { padding: 12px 14px; }
  .wtbl thead { display: none; }
  .wtbl, .wtbl tbody, .wtbl tr, .wtbl td { display: block; width: 100%; }
  .wtbl tr { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .wtbl tr.detail { padding: 0; }
  .wtbl td { border: 0; padding: 2px 0; max-width: none !important; text-align: left !important; }
  .wtbl td[data-l] { display: flex; gap: 8px; align-items: center; font-size: 13px; }
  .wtbl td[data-l]::before { content: attr(data-l); color: var(--ink-3); font-size: 12px; min-width: 44px; }
  .wtbl td[data-l] select { flex: 1; max-width: 220px; }
}

/* ------------------------------------------------------------------ 伙伴聊天 / AI 助手 */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; height: calc(100vh - 128px); min-height: 480px; }
.chat-side, .chat-main { background: var(--panel); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cs-head { display: flex; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line-2); }
.cs-head input { flex: 1; min-width: 0; }
.cs-head button { width: 38px; padding: 0; font-size: 18px; }
.cs-list { flex: 1; overflow-y: auto; padding: 6px; }
.cs-foot { padding: 10px 14px; border-top: 1px solid var(--line-2); line-height: 1.6; }
.croom { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.croom:hover { background: var(--panel-2); }
.croom.on { background: var(--accent-soft); }
.croom .cr-t { display: flex; flex-direction: column; min-width: 0; flex: 1; color: var(--ink); text-decoration: none; }
.croom .cr-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.croom .cr-t .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.croom .cr-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.badge { min-width: 18px; height: 18px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 5px; }
.badge.mute { background: #b6bcc7; }
.av { width: 38px; height: 38px; border-radius: 50%; background: #dbe4ff; color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex-shrink: 0; position: relative; }
.av.grp { background: #e3f4ea; color: var(--pos); border-radius: 12px; }
.av.ai { background: var(--rail); color: #fff; font-size: 12px; }
.on-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.pitem > .on-dot { position: static; margin-left: auto; border: 0; }
.chat-empty { margin: auto; max-width: 320px; }
.cm-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.cm-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-head > div b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-head select { max-width: 240px; }
.cm-back { display: none; }
.cm-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; background: #f7f8fa; }
.cm-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 78%; }
.cm-msg .av { width: 34px; height: 34px; font-size: 13px; }
.cm-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.cm-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cm-msg.me .cm-b { align-items: flex-end; }
.bubble { background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 9px 13px; font-size: 14px; line-height: 1.6; max-width: 100%; overflow-wrap: anywhere; }
.cm-msg.me .bubble { background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 14px 4px 14px 14px; }
.cm-msg.me .bubble a { color: #fff; text-decoration: underline; }
.bubble.image { padding: 4px; background: #fff !important; border-color: var(--line) !important; }
.cm-text { white-space: pre-wrap; }
.cm-img { display: block; max-width: 260px; max-height: 260px; border-radius: 10px; }
.cm-file { display: flex; gap: 10px; align-items: center; color: inherit !important; text-decoration: none !important; min-width: 200px; }
.cm-file span:last-child { display: flex; flex-direction: column; }
.cm-msg.me .cm-file .muted { color: #dce6ff; }
.cm-file .fi { font-size: 26px; }
.cm-time { font-size: 11px; color: var(--ink-3); }
.cm-day { text-align: center; font-size: 12px; color: var(--ink-3); }
.cm-day span { background: #e9ecf1; padding: 2px 10px; border-radius: 99px; }
.cm-sys { text-align: center; font-size: 12px; color: var(--ink-3); }
.cm-more { text-align: center; }
.linkbtn { border: 0; background: none; padding: 0; min-height: 0; color: var(--accent); font-size: inherit; cursor: pointer; }
.cm-input { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line-2); }
.cm-input textarea { flex: 1; resize: none; min-height: 40px; max-height: 160px; line-height: 1.5; padding: 9px 12px; }
.cm-input > button { min-height: 40px; }
.chat-main.drop { outline: 3px dashed var(--accent-2); outline-offset: -6px; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-height: 50vh; overflow-y: auto; }
.pitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; min-height: 0; font: inherit; color: var(--ink); }
button.pitem:hover { background: var(--panel-2); }
.pitem.on { border-color: var(--accent); background: var(--accent-soft); }
.pitem .av { width: 30px; height: 30px; font-size: 12px; }
.pitem > button { margin-left: auto; }
.bigchoice { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 18px; min-height: 90px; border-radius: 14px; text-align: left; }
.bigchoice b { font-size: 15px; }
/* AI */
.ai-msgs .cm-msg { max-width: 88%; }
.ai-ans .bubble { border-radius: 4px 14px 14px 14px; }
.md p { margin: 0 0 8px; } .md p:last-child { margin-bottom: 0; }
.md h3, .md h4, .md h5, .md h6 { margin: 12px 0 6px; font-size: 15px; } .md h3:first-child, .md h4:first-child { margin-top: 0; }
.md ul, .md ol { margin: 4px 0 8px; padding-left: 22px; } .md li { margin: 2px 0; }
.md code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.md pre.code { position: relative; background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 10px; overflow-x: auto; margin: 6px 0 10px; }
.md pre.code code { background: none; padding: 0; color: inherit; white-space: pre; }
.md pre .cp { position: absolute; right: 6px; top: 6px; color: #cbd5e1; border-color: #334155; background: #1e293b; }
.md table { margin: 6px 0; } .md hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.think { margin-bottom: 8px; font-size: 12px; color: var(--ink-3); }
.think > div { white-space: pre-wrap; max-height: 240px; overflow-y: auto; padding: 6px 0 0 10px; border-left: 2px solid var(--line); }
.typing { color: var(--ink-3); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.ai-tpl { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 0; border-top: 1px solid var(--line-2); }
.ai .cm-input { border-top: 0; flex-direction: column; align-items: stretch; }
.ai-act { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ai-act label { display: flex; gap: 6px; align-items: center; color: var(--ink-2); }
.ai-hello { margin: auto; max-width: 480px; text-align: center; }
.ai-hello b { font-size: 18px; }
@media (max-width: 860px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 190px); }
  .chat.has-room .chat-side, .chat:not(.has-room) .chat-main { display: none; }
  .chat.ai .chat-side { display: none; }
  .chat.ai .chat-main { display: flex; }
  .chat.ai.show-side .chat-side { display: flex; }
  .chat.ai.show-side .chat-main { display: none; }
  .cm-back { display: inline-flex; }
  .cm-msg, .ai-msgs .cm-msg { max-width: 92%; }
  .cm-head select { max-width: 150px; }
}

/* ================================================================== 方案 B：顶部模块 + 左侧分组菜单 */
.appb { min-height: 100vh; display: flex; flex-direction: column; background: #f3f4f7; }
.tb { position: sticky; top: 0; z-index: 30; background: var(--rail); color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 20px; min-height: 60px; }
.tb-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; white-space: nowrap; }
.tb-logo img { width: 30px; height: 30px; border-radius: 9px; background: #fff; object-fit: contain; }
.tb-logo b { font-size: 15px; }
.tb-mods { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tb-mods::-webkit-scrollbar { display: none; }
.tb-mods a { color: #cbd5e1; text-decoration: none; padding: 0 14px; min-height: 60px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 14px; }
.tb-mods a:hover { color: #fff; }
.tb-mods a.on { color: #fff; font-weight: 600; box-shadow: inset 0 -3px 0 var(--accent-2); }
.tb-mods .c, .side .c { display: none; }
.tb-mods .c.on, .side .c.on { display: inline-block; min-width: 16px; height: 16px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; font-weight: 600; }
.tb-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tb-right select { background: #1e293b; color: #fff; border-color: #334155; min-height: 34px; }
.tb-region { font-size: 13px; color: #cbd5e1; background: #1e293b; border-radius: 99px; padding: 4px 12px; }
.tb-end { font-size: 13px; color: #fde68a; background: #1e293b; border-radius: 99px; padding: 4px 12px; white-space: nowrap; cursor: default; }
.tb-end.wait { color: #fdba74; }
.tb-chat { position: relative; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; }
.tb-chat:hover { background: #2457e6; color: #fff; }
.tb-chat.on { background: #fff; color: var(--accent); }
.tb-chat .dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px; border: 2px solid var(--rail); font-weight: 600; }
.tb-me { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 50%; border: 0; background: #334155; color: #fff; font-weight: 600; }
.tb-me:hover { background: #475569; color: #fff; }
.me-menu { position: fixed; top: 62px; right: 16px; z-index: 60; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.06); padding: 8px; min-width: 200px; display: flex; flex-direction: column; }
.me-menu .mm-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; display: flex; flex-direction: column; }
.me-menu a, .me-menu button { text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; border: 0; background: none; font: inherit; min-height: 0; }
.me-menu a:hover, .me-menu button:hover { background: var(--panel-2); }
.bodyb { flex: 1; display: flex; align-items: flex-start; background: linear-gradient(to right, #fff 196px, var(--line) 196px, var(--line) 197px, transparent 197px); }
.bodyb.noside { background: none; }
.side { position: sticky; top: 60px; flex: 0 0 197px; max-height: calc(100vh - 60px); overflow-y: auto; background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; }
.sg { display: flex; flex-direction: column; gap: 2px; }
.sg-t { font-size: 12px; color: var(--ink-3); padding: 0 10px 4px; }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.side a:hover { background: var(--panel-2); color: var(--ink); }
.side a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.content { flex: 1; min-width: 0; padding: 18px 26px 48px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.crumb { font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; min-height: 18px; }
.crumb a { color: var(--ink-3); text-decoration: none; } .crumb a:hover { color: var(--accent); }
.crumb b { color: var(--ink-2); font-weight: 500; }
.crumb:empty { display: none; }
#main { display: flex; flex-direction: column; gap: 14px; }
.panel { border: 1px solid var(--line); }
/* 首页 */
.home { display: flex; flex-direction: column; gap: 14px; }
.home-hi h1 { margin: 0; font-size: 24px; }
.home-hi p { margin: 6px 0 0; color: var(--ink-3); }
.todos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.todo { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--panel-2); color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.todo:hover { border-color: var(--line); background: #fff; }
.todo b { font-size: 24px; min-width: 32px; }
.todo i { font-style: normal; color: var(--ink-3); font-size: 18px; }
.todo.warn b { color: var(--warn); } .todo.neg b { color: var(--neg); } .todo.acc b { color: var(--accent); }
.klist { display: flex; flex-direction: column; }
.klist > a, .klist > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.klist > a:hover { color: var(--accent); }
.klist > :last-child { border-bottom: 0; }
.panel > header a.sub { text-decoration: none; }
/* 账号与等级：游戏 / 通用 */
.type-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.type-tabs button { min-height: 42px; padding: 0 20px; border-radius: 12px; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.type-tabs button span { font-size: 12px; background: var(--panel-2); color: var(--ink-3); border-radius: 99px; padding: 0 8px; }
.type-tabs button.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.type-tabs button.on span { background: rgba(255,255,255,.2); color: #fff; }
.lvrules { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.lvrules > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
/* 打卡网络 */
.nets { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.net { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.net.off { opacity: .6; }
.net-t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.warnpanel { border-color: #f5c46b; background: #fffaf0; }
.cand { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid #f3e3c0; }
.cand:last-child { border-bottom: 0; }
/* 聊天浮层 */
.chat-pop { position: fixed; z-index: 50; top: 68px; right: 16px; width: min(780px, calc(100vw - 32px)); height: min(640px, calc(100vh - 88px)); background: #fff; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15,23,42,.24), 0 0 0 1px rgba(15,23,42,.08); overflow: hidden; animation: popin .14s ease-out; }
@keyframes popin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.chat.pop { height: 100%; min-height: 0; gap: 0; grid-template-columns: 260px minmax(0, 1fr); }
.chat.pop .chat-side, .chat.pop .chat-main { border-radius: 0; border: 0; }
.chat.pop .chat-side { border-right: 1px solid var(--line-2); }
.chat { height: calc(100vh - 210px); }
.chat .croom { width: 100%; border: 0; background: none; text-align: left; font: inherit; min-height: 0; cursor: pointer; }
.chat .croom:hover { background: var(--panel-2); }
.chat .croom.on { background: var(--accent-soft); }
.chat-toast { position: fixed; z-index: 55; top: 68px; right: 16px; max-width: 320px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px;
  border-radius: 14px; border: 0; background: #fff; box-shadow: 0 16px 40px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.06); text-align: left; font: inherit; color: var(--ink); cursor: pointer; animation: popin .14s ease-out; }
.chat-toast span { color: var(--ink-3); font-size: 13px; }
@media (max-width: 1100px) {
  .lvrules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .tb { flex-wrap: wrap; gap: 0 12px; padding: 0 12px; }
  .tb-logo b { display: none; }
  .tb-mods { order: 3; flex-basis: 100%; }
  .tb-mods a { min-height: 44px; padding: 0 12px; }
  .tb-right { margin-left: auto; min-height: 52px; }
  .tb-right select, .tb-region { display: none; }
  .bodyb { flex-direction: column; align-items: stretch; background: none; }
  .side { position: static; max-height: none; flex: none; flex-direction: row; gap: 4px; overflow-x: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .sg { flex-direction: row; gap: 4px; }
  .sg-t { display: none; }
  .side a { white-space: nowrap; padding: 8px 12px; }
  .content { padding: 12px 12px 40px; }
  .chat-pop { top: 0; right: 0; width: 100vw; height: 100vh; border-radius: 0; }
  .chat.pop { grid-template-columns: 1fr; }
  .chat.pop.has-room .chat-side, .chat.pop:not(.has-room) .chat-main { display: none; }
  .chat.pop .cm-back { display: inline-flex; }
  .chat { height: calc(100vh - 200px); }
}

/* 批量操作 */
.bulkbar { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 20px 10px; padding: 10px 14px; border-radius: 12px; background: var(--rail); color: #fff; }
.bulkbar .ghost { color: #cbd5e1; }
th.ck, td.ck { width: 34px; padding-right: 0; }
td.ck input, th.ck input { width: 18px; height: 18px; }
/* 导出选项 */
label.radio { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); font-size: 14px; }
.xsheet { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 8px; }
.xgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 16px; }
.xg { display: flex; flex-direction: column; gap: 4px; }
.xg label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.xg .xgt { font-weight: 600; color: var(--ink); font-size: 13px; }
/* 薪资方案编辑 */
.plan-sec { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.plan-on { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plan-body { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.plan-body.off { opacity: .45; pointer-events: none; }
.plan-body input, .plan-body select { min-height: 32px; }
/* 小下拉菜单 */
.menuwrap { position: relative; display: inline-block; }
.popmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; background: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.06); padding: 6px; min-width: 280px; display: flex; flex-direction: column; }
.popmenu button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; min-height: 0; font-weight: 600; color: var(--ink); }
.popmenu button span { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.popmenu button:hover { background: var(--panel-2); }

/* 服务商消耗排名 */
.pv-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.pv-card { display: grid; gap: 8px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.pv-card:hover { border-color: var(--accent); }
.pv-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pv-no { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pv-av { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); display: inline-grid; place-items: center; font-weight: 600; color: var(--ink-2); background: var(--panel-2); }
.pv-nm { min-width: 0; flex: 1; display: grid; }
.pv-nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-nm small { color: var(--ink-3); font-size: 12px; }
.pv-sh { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.pv-amt { display: flex; align-items: baseline; gap: 10px; }
.pv-amt b { font-size: 24px; font-variant-numeric: tabular-nums; }
.pv-card .bar, .pv-mini { height: 6px; border-radius: 3px; overflow: hidden; display: flex; }
.pv-card .bar i, .pv-mini i { display: block; height: 100%; background: var(--accent); }
.pv-mini { width: 120px; margin: 6px 0 0 auto; }
.pv-row { display: flex; align-items: center; gap: 10px; }
.pv-rk { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.pv-unk td { background: var(--panel-2); }
.pv-sub { font-size: 15px; margin: 16px 0 8px; }
tr.on td { background: var(--accent-soft); }
.pv-al { gap: 2px; }
.pv-al button { border: 0; background: transparent; min-height: 0; padding: 0 2px; font-size: 11px; color: var(--ink-3); cursor: pointer; }
.pv-al button:hover { color: var(--neg); }
@media (max-width: 900px) { .pv-top { grid-template-columns: 1fr; } .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pv-tbl select, .dlg select[data-task], .dlg select[data-into] { width: 170px; max-width: 170px; }
.pj-un { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-name { width: 170px; }
.pf-tbl .pf-ex { min-width: 220px; max-width: 320px; }
.pf-tbl select[data-into] { width: 120px; max-width: 120px; }
.pf-tbl .pf-name { width: 150px; }
.ag-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.tb-xh { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 99px; background: linear-gradient(135deg, #00c2ff, #0a6cff); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tb-xh:hover { filter: brightness(1.08); }
.xh-tok { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--panel-2); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
.xh-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.xh-sw input { width: 18px; height: 18px; }

/* ---------- 白夜工具 ---------- */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tl-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tl-card.off { opacity: .6; }
.tl-top { display: flex; gap: 12px; align-items: center; }
.tl-ic { width: 52px; height: 52px; border-radius: 13px; flex: none; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 700; background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(15,23,42,.06); }
.tl-ic.big { width: 72px; height: 72px; border-radius: 18px; font-size: 30px; }
.tl-name { font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tl-sum { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; flex: 1; }
.tl-whatsnew { font-size: 12.5px; line-height: 1.6; background: var(--accent-soft); color: var(--ink-2); border-radius: 8px; padding: 6px 10px; }
.tl-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px; border-top: 1px solid var(--line-2); margin-top: 2px; padding-top: 12px; }
.tl-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); }
.tl-drop:hover, .tl-drop.on, .tl-drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.tl-drop-t { font-size: 14px; }
.tl-file { font-size: 13px; }
.tl-bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin-top: 12px; }
.tl-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.tl-dhead { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tl-dhead > div { flex: 1; }
.tl-h3 { font-size: 14px; margin: 18px 0 8px; }
.tl-guide { white-space: pre-wrap; font-size: 13.5px; line-height: 1.75; background: var(--panel-2); border-radius: 10px; padding: 12px 14px; max-height: 340px; overflow: auto; }
.tl-vers { display: flex; flex-direction: column; gap: 8px; }
.tl-ver { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.tl-notes { white-space: pre-wrap; font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.6; }
@media (max-width: 640px) { .tl-grid { grid-template-columns: 1fr; } }
.tl-row { display: flex; align-items: center; }

/* ---------- 白夜枢纽站 ---------- */
.st-frame { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; height: calc(100vh - 190px); min-height: 520px; }
.st-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.st-note { padding: 12px 16px; font-size: 13.5px; }
.st-note.warn { background: var(--warn-soft); }
.st-note.ok { background: var(--pos-soft); }
.st-note.bad { background: var(--neg-soft); }
.st-log { white-space: pre-wrap; font-size: 12px; line-height: 1.55; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 10px 12px; max-height: 320px; overflow: auto; margin: 8px 0 0; }
.st-vers { display: flex; flex-direction: column; gap: 8px; }
.head h1 .chip { vertical-align: middle; margin-left: 6px; font-size: 12px; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--acc, #2f5bea); }
.st-ac { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg, #f6f7f9); display: flex; flex-direction: column; gap: 4px; }

/* ================================================================== 学习中心 */
.ac-bar { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.ac-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.ac-me .body { display: flex; flex-direction: column; gap: 12px; }
.ac-me-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ac-me-n { font-size: 15px; color: var(--ink-2); } .ac-me-n b { font-size: 26px; color: var(--ink); margin-right: 2px; }
.ac-track > header { padding: 14px 4px 10px; }
.ac-track > header h2 { margin: 0; font-size: 18px; }
.ac-track > header p { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; max-width: 860px; }
.ac-tn { margin-left: 8px; color: var(--ink-2); font-weight: 600; }
.ac-chs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ac-ch { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); text-decoration: none; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.ac-ch:hover { border-color: var(--accent-2); transform: translateY(-1px); text-decoration: none; }
.ac-ch:hover * { text-decoration: none; }
.ac-ch b { font-size: 15px; }
.ac-ch p { margin: 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.ac-ch-top, .ac-ch-ft { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ac-ch-ft { font-size: 12px; color: var(--ink-3); }
.ac-ch.done .ac-ch-ft span:last-child { color: var(--pos); font-weight: 600; }
.ac-ch.done .ac-bar i { background: var(--pos); }
.ac-num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-3); font-size: 13px; }
.chip.ac-lv-基础 { background: var(--pos-soft); color: var(--pos); }
.chip.ac-lv-进阶 { background: var(--accent-soft); color: var(--accent); }
.chip.ac-lv-专家, .chip.ac-lv-综合 { background: var(--orange-soft); color: var(--orange); }
.chip.ac-lv-实战 { background: var(--warn-soft); color: var(--warn); }
.ac-intro p { margin: 10px 0 0; line-height: 1.75; color: var(--ink-2); max-width: 860px; }
.ac-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.ac-pre { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.ac-lessons { padding: 8px 0 6px; }
.ac-ls { border-top: 1px solid var(--line-2); padding: 10px 20px; }
.ac-ls:first-child { border-top: 0; }
.ac-ls-h { display: flex; align-items: center; gap: 10px; }
.ac-ls-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 4px 0; min-height: 36px; cursor: pointer; }
.ac-ls-n { flex: 1; min-width: 0; font-weight: 500; color: var(--ink); }
.ac-play { font-size: 12px; color: var(--accent); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; white-space: nowrap; }
.ac-done.on { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.ac-ls-v { margin: 8px 0 6px; }
.ac-ls-v video { width: 100%; max-width: 860px; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; display: block; }
.ac-v-err { color: var(--neg); margin-top: 6px; }
.ac-read > header { padding: 14px 4px 10px; } .ac-read > header h2 { margin: 0; font-size: 18px; } .ac-read > header p { margin: 2px 0 0; }
.ac-sec { padding: 20px 22px; border-top: 1px solid var(--line-2); }
.ac-sec:first-child { border-top: 0; }
.ac-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ac-sec-h h3 { margin: 0; font-size: 16px; }
.ac-sn { display: inline-block; min-width: 22px; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.ac-html { font-size: 14px; line-height: 1.8; color: var(--ink-2); max-width: 900px; }
.ac-html p { margin: 10px 0; }
.ac-html h4 { margin: 14px 0 4px; font-size: 14px; color: var(--ink); }
.ac-html strong { color: var(--ink); }
.ac-html ul, .ac-html ol { margin: 8px 0; padding-left: 22px; }
.ac-html li { margin: 4px 0; }
.ac-html div:has(> h4 + p):not(:has(div)) { background: var(--panel-2); border-radius: 12px; padding: 4px 14px 2px; margin: 8px 0; }
.ac-html table { margin: 10px 0; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ac-html th, .ac-html td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.ac-html th { background: var(--panel-2); color: var(--ink); font-weight: 600; }
.ac-html figure { margin: 14px 0; }
.ac-html img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; }
.ac-html figcaption { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.ac-html dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 4px 0; }
.ac-html dl > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.ac-html dt { font-weight: 600; color: var(--ink); } .ac-html dd { margin: 2px 0 0; font-size: 13px; }
.ac-html details { background: var(--panel-2); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.ac-html summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.ac-html code { background: var(--panel-2); border-radius: 5px; padding: 0 4px; font-size: 12.5px; }
.ac-pn { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 4px 0 20px; }
.ac-team td, .ac-team th { white-space: nowrap; }
.ac-tot { display: flex; align-items: center; gap: 8px; min-width: 140px; } .ac-tot .ac-bar { flex: 1; }
@media (max-width: 860px) { .ac-ls { padding: 10px 14px; } .ac-sec { padding: 16px 14px; } .ac-ls-h { flex-wrap: wrap; } .ac-play { display: none; } }
.ac-extra.case { border-left: 4px solid var(--orange); } .ac-extra.task { border-left: 4px solid var(--accent-2); }
.ac-ls-t { white-space: normal; height: auto; } .ac-ls-t .small { white-space: nowrap; flex-shrink: 0; } .ac-ls-n { line-height: 1.45; }
