/* ============================================================================
   星柠文化 · 短剧协作 OA — 视觉系统 v0.2
   设计参考：现代 SaaS 控制台（Linear / 飞书 / Vercel 风格）
   纯 CSS，无外部依赖，离线可用
   ========================================================================== */

:root {
  /* 表面 */
  --bg: #f4f5f9;
  --bg-grad: radial-gradient(1200px 600px at 78% -10%, #e9edff 0%, rgba(244, 245, 249, 0) 60%);
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --line: #e5e8f0;
  --line-2: #eef1f7;
  --line-3: #f5f7fb;

  /* 文字 */
  --ink: #0f1420;
  --ink-2: #3b4355;
  --ink-3: #5a6377;
  --muted: #7c8497;
  --faint: #a7aebd;

  /* 品牌 */
  --brand: #3457e0;
  --brand-2: #5478ff;
  --brand-ink: #2440b4;
  --brand-soft: #edf1ff;
  --brand-soft-2: #e2e9ff;

  /* 侧栏 */
  --side: #0c1119;
  --side-2: #151c28;
  --side-ink: #c3ccdb;
  --side-line: #1e2634;

  /* 语义 */
  --ok: #0f9d6e;
  --ok-soft: #e7f8f0;
  --warn: #d98600;
  --warn-soft: #fff6e5;
  --bad: #dc3b3b;
  --bad-soft: #fdeeee;
  --info: #0d8ab4;
  --info-soft: #e8f7fc;

  /* 阶段色 */
  --c-script: #5b7cf5;
  --c-production: #e08a00;
  --c-editing: #7c5cf0;
  --c-online: #0d92b8;
  --c-promo: #0f9d6e;
  --c-done: #8c93a3;

  /* 形状 */
  --r-sm: 7px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* 阴影 */
  --sh-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 6px -2px rgba(16, 24, 40, .06);
  --sh: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 26px -16px rgba(16, 24, 40, .22);
  --sh-lg: 0 26px 60px -28px rgba(16, 24, 40, .34), 0 6px 18px -12px rgba(16, 24, 40, .16);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 13.5px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #d8e2ff; }

/* 细滚动条 */
.main::-webkit-scrollbar, .sidebar::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar, .modal::-webkit-scrollbar, .notice-list::-webkit-scrollbar { width: 8px; height: 8px; }
.main::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb, .notice-list::-webkit-scrollbar-thumb {
  background: rgba(120, 130, 150, .28); border-radius: 8px;
}
.main::-webkit-scrollbar-track, .notice-list::-webkit-scrollbar-track { background: transparent; }

.ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); height: 100vh; overflow: hidden; }

/* ============================================================ 侧栏 */

.sidebar {
  position: relative;
  background: linear-gradient(180deg, #0d131d 0%, #0a0f17 100%);
  color: var(--side-ink);
  display: flex; flex-direction: column;
  padding: 18px 12px 12px;
  gap: 4px;
  overflow-y: auto;
  border-right: 1px solid #0a0e15;
}
.sidebar::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 180px; pointer-events: none;
  background: radial-gradient(220px 120px at 20% 0%, rgba(72, 108, 255, .22), transparent 70%);
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; position: relative; z-index: 1; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, #6c8cff, #3457e0 65%, #2a45b8);
  color: #fff; font-weight: 700; font-size: 16px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(60, 100, 240, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-txt { min-width: 0; }
.brand-name { color: #fff; font-weight: 640; font-size: 14px; letter-spacing: .4px; }
.brand-sub { font-size: 9.5px; color: #6b768c; letter-spacing: 1.4px; font-weight: 500; }
.brand-live {
  margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #2ee6a8;
  box-shadow: 0 0 0 3px rgba(46, 230, 168, .14);
  animation: pulse 2.6s ease-in-out infinite;
}

.nav { display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.nav-group {
  font-size: 10px; color: #5b6579; letter-spacing: 1.1px; font-weight: 600;
  padding: 16px 10px 6px; text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--side-ink); font-size: 13px; font-family: inherit;
  padding: 8px 10px; border-radius: 8px; text-align: left; width: 100%;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(70, 110, 255, .22), rgba(70, 110, 255, .07));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(120, 155, 255, .18);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #8ba6ff, #4a6ef5);
  box-shadow: 0 0 12px rgba(90, 130, 255, .8);
}
.nav-text { flex: 1; white-space: nowrap; }
.nav-sub { font-size: 10px; color: #626c80; letter-spacing: .2px; }
.nav-item.active .nav-sub { color: #9fb0cc; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; transition: box-shadow .2s; }
.nav-dot.dash { background: #8ea0bd; }
.nav-dot.script { background: var(--c-script); }
.nav-dot.production { background: var(--c-production); }
.nav-dot.editing { background: var(--c-editing); }
.nav-dot.online { background: var(--c-online); }
.nav-dot.promo { background: var(--c-promo); }
.nav-dot.admin { background: #e0533f; }
.nav-item.active .nav-dot { box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }

/* 侧栏待办角标 */
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 650; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .1); color: #dfe6f2;
  border: 1px solid rgba(255, 255, 255, .08);
}
.nav-badge.hot { background: rgba(224, 138, 0, .22); color: #ffc76b; border-color: rgba(224, 138, 0, .3); }
.nav-badge.bad { background: rgba(220, 59, 59, .22); color: #ff9d9d; border-color: rgba(220, 59, 59, .3); }
.nav-unread {
  position: absolute; right: 8px; top: 6px;
  width: 6px; height: 6px; border-radius: 50%; background: #ff5a5a;
  box-shadow: 0 0 0 2px #0c1119;
}

.identity {
  margin-top: auto; border-top: 1px solid var(--side-line); padding-top: 13px;
  display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1;
}
.identity-title { font-size: 10px; color: #5b6579; letter-spacing: 1px; font-weight: 600; text-transform: uppercase; }
.mini-select, .mini-input {
  width: 100%; background: #161e2b; color: #e6ebf4;
  border: 1px solid #243044; border-radius: 7px; padding: 6px 9px;
  font-size: 12px; font-family: inherit; outline: none;
  transition: border-color .15s, background .15s;
}
.mini-select:hover, .mini-input:hover { background: #1a2331; }
.mini-select:focus, .mini-input:focus { border-color: #3f5c9e; background: #1a2331; }
.identity-tip { font-size: 10px; color: #556074; line-height: 1.5; }
.side-foot { font-size: 10px; color: #485264; text-align: center; padding-top: 10px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.ver-dot { width: 5px; height: 5px; border-radius: 50%; background: #2ee6a8; }

/* ============================================================ 主区 / 顶栏 */

.main { overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 26px 14px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  min-height: 68px;
}
.tb-left { min-width: 0; }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 660; letter-spacing: -.25px; line-height: 1.3; }
.page-desc { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.topbar-right { display: flex; align-items: center; gap: 8px; }

/* 搜索 */
.searchbox { position: relative; display: flex; align-items: center; gap: 7px; width: 258px;
  background: #f3f5fa; border: 1px solid #e8ebf3; border-radius: 9px; padding: 0 9px; height: 34px;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.searchbox:focus-within { background: #fff; border-color: #b9c8f6; box-shadow: 0 0 0 3px rgba(52, 87, 224, .09); }
.searchbox .ico { color: var(--faint); width: 15px; height: 15px; }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-family: inherit; font-size: 12.5px; color: var(--ink); }
.searchbox input::placeholder { color: #a6adbc; }
.searchbox kbd {
  font-family: inherit; font-size: 10px; color: #98a0b1; background: #fff;
  border: 1px solid #e5e8f0; border-radius: 4px; padding: 1px 5px; line-height: 1.4;
}
.search-pop {
  position: absolute; top: 42px; left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--sh-lg); padding: 6px; max-height: 360px; overflow-y: auto;
}
.sp-group { font-size: 10px; color: var(--faint); letter-spacing: .8px; padding: 7px 10px 4px; font-weight: 600; }
.sp-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: 0;
  padding: 7px 9px; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 12.5px; color: var(--ink-2); }
.sp-item:hover { background: #f4f6fb; }
.sp-item b { font-weight: 560; color: var(--ink); }
.sp-item .sp-code { font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; color: var(--faint); margin-left: auto; }
.sp-empty { padding: 16px 10px; text-align: center; color: var(--faint); font-size: 12px; }

/* 图标按钮 */
.icon-btn {
  position: relative; width: 34px; height: 34px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink-3); cursor: pointer; transition: all .15s ease; flex: 0 0 auto;
}
.icon-btn:hover { background: #f7f8fc; color: var(--ink); border-color: #d8ddea; }
.icon-btn:active { transform: translateY(.5px); }
.icon-btn.spin .ico { animation: spin .7s linear infinite; }
.icon-btn.bell.active { background: var(--brand-soft); border-color: #c3d0fb; color: var(--brand); }

.dot-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: linear-gradient(180deg, #ff6a6a, #e33b3b); color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid #fff; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px -1px rgba(220, 59, 59, .5);
}

.live-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 10px; border-radius: 15px;
  background: var(--brand-soft); color: var(--brand); border: 1px solid #ccd8fd;
  font-size: 11.5px; font-family: inherit; cursor: pointer; font-weight: 550;
  animation: fadeUp .3s ease both;
}
.live-chip .ico { width: 13px; height: 13px; }
.live-chip:hover { background: var(--brand-soft-2); }

/* 身份 */
.me-chip { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border-radius: 20px; }
.me-chip:hover { background: #f5f7fb; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, #6d8bff, #3457e0);
  color: #fff; font-size: 12px; font-weight: 620;
  display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.me-meta { display: flex; flex-direction: column; line-height: 1.25; }
.me-meta b { font-size: 12px; font-weight: 580; color: var(--ink); }
.me-meta i { font-size: 10px; color: var(--faint); font-style: normal; }

/* ============================================================ 通知面板 */

.notice-panel {
  position: absolute; top: 60px; right: 22px; z-index: 70;
  width: 392px; max-width: calc(100vw - 40px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); overflow: hidden;
  animation: popIn .18s cubic-bezier(.2, .8, .3, 1) both;
}
.np-head { display: flex; align-items: center; gap: 8px; padding: 13px 15px 11px; border-bottom: 1px solid var(--line-2); }
.np-title { font-size: 13.5px; font-weight: 640; }
.np-count { font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.np-head .btn { margin-left: auto; }
.notice-list { max-height: min(58vh, 460px); overflow-y: auto; }
.np-item {
  display: flex; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line-3);
  cursor: pointer; text-align: left; width: 100%; background: #fff; border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit; transition: background .14s;
}
.np-item:hover { background: #f8f9fd; }
.np-item.unread { background: #f7f9ff; }
.np-item.unread:hover { background: #f1f5ff; }
.np-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: #f1f3f9; color: var(--ink-3);
}
.np-ico .ico { width: 15px; height: 15px; }
.np-ico.handoff { background: #eef1ff; color: var(--brand); }
.np-ico.assign { background: #fff4e3; color: var(--warn); }
.np-ico.urge, .np-ico.alert { background: var(--bad-soft); color: var(--bad); }
.np-ico.comment { background: #eef8f4; color: var(--ok); }
.np-body { flex: 1; min-width: 0; }
.np-text { font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.np-text b { font-weight: 600; }
.np-meta { font-size: 10.5px; color: var(--faint); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.np-meta .sep { color: #dfe3ec; }
.np-item.unread .np-text { font-weight: 500; }
.np-item.unread .np-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: 0 0 auto; margin-top: 9px; }
.np-empty { padding: 40px 20px; text-align: center; color: var(--faint); }
.np-empty .ico { width: 26px; height: 26px; margin-bottom: 8px; color: #c6ccda; }
.np-foot { padding: 9px 15px; background: #fbfcfe; border-top: 1px solid var(--line-2); font-size: 10.5px; color: var(--faint); display: flex; justify-content: space-between; }

/* ============================================================ 视图容器 */

.view { padding: 18px 26px 64px; display: flex; flex-direction: column; gap: 14px; }
.view > * { animation: fadeUp .26s cubic-bezier(.2, .7, .3, 1) both; }
.view > *:nth-child(2) { animation-delay: .03s; }
.view > *:nth-child(3) { animation-delay: .06s; }
.view > *:nth-child(4) { animation-delay: .09s; }
.view > *:nth-child(5) { animation-delay: .12s; }

/* ============================================================ 卡片 */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, #fff, #fdfdff);
}
.card-title { font-weight: 620; font-size: 13.5px; letter-spacing: -.1px; display: flex; align-items: center; gap: 7px; }
.card-title small { font-weight: 400; color: var(--muted); margin-left: 2px; font-size: 11.5px; }
.card-head .ico { color: var(--faint); }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 2px 0; }
.card-foot { padding: 11px 18px; border-top: 1px solid var(--line-2); background: #fbfcfe; display: flex; align-items: center; gap: 10px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 > .card, .grid-3 > .card { margin: 0; }
@media (max-width: 1160px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ============================================================ 首屏 hero */

.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); padding: 18px 22px;
  background:
    radial-gradient(520px 200px at 88% -30%, rgba(120, 160, 255, .5), transparent 70%),
    linear-gradient(115deg, #131c2e 0%, #1a2742 48%, #22335c 100%);
  color: #fff;
  box-shadow: 0 20px 44px -26px rgba(20, 34, 66, .8);
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 18px 18px; opacity: .5;
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.hero-main { min-width: 260px; flex: 1; position: relative; z-index: 1; }
.hero-kicker { font-size: 10.5px; letter-spacing: 1.6px; color: #9fb4dd; font-weight: 600; text-transform: uppercase; }
.hero-title { font-size: 17px; font-weight: 620; margin: 5px 0 2px; letter-spacing: -.2px; }
.hero-sub { font-size: 12px; color: #a9bade; }
.hero-stats { display: flex; gap: 26px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-stat { min-width: 76px; }
.hero-stat b { display: block; font-size: 21px; font-weight: 660; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 11px; color: #9fb0d2; }
.hero-cta {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: #fff; border-radius: 9px; padding: 7px 12px; font-size: 12px; font-family: inherit; cursor: pointer;
  backdrop-filter: blur(6px);
}
.hero-cta:hover { background: rgba(255, 255, 255, .17); }

/* ============================================================ 数字卡 */

.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; }
@media (max-width: 1320px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 13px 15px 12px; box-shadow: var(--sh-sm); position: relative; overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.stat:hover { box-shadow: var(--sh); transform: translateY(-1px); border-color: #dde3ef; }
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.stat.warn::after { background: var(--c-production); }
.stat.edit::after { background: var(--c-editing); }
.stat.ok::after { background: var(--c-promo); }
.stat.cyan::after { background: var(--c-online); }
.stat.gray::after { background: #b8bfcd; }
.stat-label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat-value { font-size: 23px; font-weight: 660; letter-spacing: -.7px; margin-top: 1px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat-hint { font-size: 10.5px; color: var(--faint); margin-top: 0; }

/* ============================================================ 待办 / 时效 */

.todo-list { display: flex; flex-direction: column; }
.todo-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 18px;
  border-bottom: 1px solid var(--line-3); cursor: pointer; transition: background .14s;
}
.todo-item:last-child { border-bottom: 0; }
.todo-item:hover { background: #f8f9fd; }
.todo-rank {
  width: 24px; height: 24px; border-radius: 7px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 11px; font-weight: 650;
  background: #f2f4f9; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.todo-rank.urgent { background: var(--bad-soft); color: var(--bad); }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 12.8px; font-weight: 560; display: flex; align-items: center; gap: 7px; }
.todo-title span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-meta { font-size: 10.5px; color: var(--faint); margin-top: 1px; display: flex; gap: 8px; flex-wrap: wrap; }
.todo-go { opacity: 0; transition: opacity .15s; color: var(--brand); }
.todo-item:hover .todo-go { opacity: 1; }

.dwell {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 20px;
  background: #f2f4f9; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dwell.warn { background: var(--warn-soft); color: #a4660a; }
.dwell.bad { background: var(--bad-soft); color: var(--bad); }
.dwell .ico { width: 11px; height: 11px; }

.sla-gear { display: flex; flex-direction: column; gap: 9px; }
.sla-row { display: grid; grid-template-columns: 66px 1fr 64px; gap: 10px; align-items: center; font-size: 12px; }
.sla-name { color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.sla-track { height: 6px; border-radius: 4px; background: #eef1f7; overflow: hidden; }
.sla-fill { height: 100%; border-radius: 4px; transition: width .6s cubic-bezier(.2, .7, .3, 1); }
.sla-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; font-size: 11.5px; }

/* ============================================================ 漏斗 */

.funnel { display: flex; flex-direction: column; gap: 11px; }
.funnel-row { display: grid; grid-template-columns: 62px 1fr 38px; align-items: center; gap: 10px; font-size: 12px; }
.funnel-name { color: var(--ink-3); }
.funnel-track { height: 20px; background: #f1f3f8; border-radius: 6px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 6px; transition: width .55s cubic-bezier(.2, .7, .3, 1); min-width: 3px; }
.funnel-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 620; }

/* ============================================================ 表格 */

.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.tb th {
  text-align: left; font-weight: 580; color: var(--muted); font-size: 10.5px;
  letter-spacing: .6px; padding: 9px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: #fafbfd; position: sticky; top: 0; z-index: 1;
}
table.tb th:first-child, table.tb td:first-child { padding-left: 18px; }
table.tb th:last-child, table.tb td:last-child { padding-right: 18px; }
table.tb td { padding: 10px 14px; border-bottom: 1px solid var(--line-3); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tbody tr { transition: background .12s; }
table.tb tbody tr:hover { background: #f9fafd; }
table.tb tbody tr.row-click { cursor: pointer; }
table.tb tbody tr.row-click:hover { background: #f6f8fe; box-shadow: inset 2px 0 0 var(--brand); }
.tb-title { font-weight: 560; color: var(--ink); }
.tb-sub { font-size: 10.5px; color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
.num.mut, .mut { color: var(--faint); }

/* ============================================================ 徽标 / 标签 */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; padding: 2px 8px; border-radius: 20px;
  background: #f2f4f9; color: var(--ink-3); white-space: nowrap; font-weight: 560;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.pending { background: var(--warn-soft); color: #a4660a; }
.badge.production { background: var(--warn-soft); color: #b06400; }
.badge.editing { background: #f0eaff; color: #6b4ae0; }
.badge.online { background: var(--info-soft); color: #0777a0; }
.badge.promo { background: var(--ok-soft); color: #0b7f5a; }
.badge.done { background: #f1f3f8; color: #78808f; }
.badge.red { background: var(--bad-soft); color: var(--bad); }
.badge.plain::before { display: none; }
.badge.count { background: #fff; border: 1px solid var(--line); color: var(--muted); }

.tag {
  display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 5px;
  background: #f2f4f9; color: #5c6478; margin: 1px 3px 1px 0; white-space: nowrap;
}

/* ============================================================ 进度条 */

.prog { display: flex; align-items: center; gap: 8px; min-width: 108px; }
.prog-track { flex: 1; height: 5px; background: #eef1f7; border-radius: 4px; overflow: hidden; }
.prog-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #7a97ff, #3457e0);
  box-shadow: 0 0 6px rgba(52, 87, 224, .35);
  transition: width .5s ease;
}
.prog-text { font-size: 10.5px; color: var(--muted); width: 32px; text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================ 表单 */

.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .span2 { grid-column: span 2; }
@media (max-width: 1160px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: span 2; } }
@media (max-width: 680px) { .form-grid .span2 { grid-column: 1 / -1; } }

/* 字数 / 集数并排双输入 */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* 识别结果提示条 */
.detect-line {
  font-size: 11px; color: var(--muted); line-height: 1.6;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 5px 9px; border-radius: 7px; background: #f7f8fc; border: 1px dashed var(--line);
}
.detect-line b { color: var(--ink-2); font-weight: 600; }
.detect-line .ico { width: 13px; height: 13px; flex: none; }
.detect-line.busy { color: #a4660a; background: var(--warn-soft); border-color: transparent; border-style: solid; }
.detect-line.ok { color: #0b7f5a; background: var(--ok-soft); border-color: transparent; border-style: solid; }
.detect-line.ok b { color: #0b7f5a; }
.detect-line.warn { color: #a4660a; background: var(--warn-soft); border-color: transparent; border-style: solid; }
.detect-line.warn b { color: #a4660a; }

/* 篇幅列：数字稍突出，便于扫读 */
.vol { white-space: nowrap; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vol b { color: var(--ink); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 10.5px; color: var(--muted); letter-spacing: .3px; font-weight: 550; }
.input, select.input, textarea.input {
  width: 100%; padding: 7px 10px; font-size: 12.5px; font-family: inherit;
  border: 1px solid #e2e6f0; border-radius: 8px; background: #fff; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
  min-height: 34px;
}
.input:hover { border-color: #d2d8e6; }
.input:focus { border-color: #9db3f7; box-shadow: 0 0 0 3px rgba(52, 87, 224, .1); background: #fff; }
textarea.input { resize: vertical; min-height: 60px; line-height: 1.55; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237c8497' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; }
input[type="file"].input { padding: 5px 8px; font-size: 11.5px; background: #fafbfd; color: var(--muted); line-height: 1.9; }
input[type="date"].input { font-variant-numeric: tabular-nums; }
input[readonly].input { background: #f7f8fc; color: var(--muted); }

/* ============================================================ 按钮 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 12.5px; font-weight: 560;
  padding: 7px 14px; border-radius: 8px; border: 1px solid transparent;
  background: linear-gradient(180deg, #4769ea, #3457e0);
  color: #fff; cursor: pointer;
  transition: filter .15s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap; box-shadow: 0 1px 2px rgba(52, 87, 224, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn:hover { filter: brightness(1.07); box-shadow: 0 4px 12px -4px rgba(52, 87, 224, .5); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn .ico { width: 14px; height: 14px; }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: #e2e6f0; box-shadow: var(--sh-xs); }
.btn.ghost:hover { background: #f7f8fc; border-color: #d4daea; filter: none; box-shadow: var(--sh-sm); }
.btn.soft { background: var(--brand-soft); color: var(--brand-ink); border-color: #d6e0ff; box-shadow: none; }
.btn.soft:hover { background: var(--brand-soft-2); filter: none; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f2d5d5; box-shadow: none; }
.btn.danger:hover { background: #fdf3f3; border-color: #eec3c3; filter: none; }
.btn.sm { padding: 4px 10px; font-size: 11.5px; border-radius: 7px; }
.btn.link { background: none; border: 0; box-shadow: none; color: var(--brand); padding: 2px 4px; font-size: 11.5px; }
.btn.link:hover { text-decoration: underline; filter: none; box-shadow: none; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================ 队列 */

.queue { display: flex; flex-direction: column; }
.queue-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 18px; border-bottom: 1px solid var(--line-3);
  transition: background .14s;
}
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: #f8f9fd; }
.queue-main { flex: 1; min-width: 0; }
.queue-title { font-size: 12.8px; font-weight: 560; display: flex; align-items: center; gap: 7px; }
.queue-meta { font-size: 10.5px; color: var(--faint); margin-top: 1px; }
.queue-order {
  width: 22px; height: 22px; border-radius: 7px; background: #f2f4f9;
  color: #6e7689; font-size: 10.5px; display: grid; place-items: center; font-weight: 650; flex: 0 0 auto;
}
input[type="checkbox"].ck { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; flex: 0 0 auto; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.chk input { width: 14px; height: 14px; accent-color: var(--brand); }

/* ============================================================ 制作组 */

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 9px; }
.team-chip {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--panel-2);
  transition: border-color .15s, background .15s;
}
.team-chip:hover { border-color: #d5dcec; background: #fff; }
.team-chip.hot { border-color: #f2ddb4; background: linear-gradient(180deg, #fffcf5, #fffaf1); }
.team-name { font-size: 12px; font-weight: 570; }
.team-load { font-size: 10.5px; color: var(--muted); margin-top: 1px; }

/* ============================================================ 展开面板 / 时间线 */

.expander { background: #fbfcfe; }
.expander-inner {
  padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 16px;
  border-top: 1px solid var(--line-2);
  animation: fadeUp .2s ease both;
}
.sub-title { font-size: 11.5px; font-weight: 620; color: var(--ink-2); margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.sub-title::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--brand); }
.sub-title small { font-weight: 400; color: var(--faint); font-size: 10.5px; }

.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 82px 14px 1fr; gap: 10px; font-size: 12px; }
.tl-date { color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 1px; font-size: 10.5px; }
.tl-dot { position: relative; display: flex; justify-content: center; }
.tl-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c4cfe6;
  margin-top: 5px; z-index: 1; box-shadow: 0 0 0 3px #fbfcfe;
}
.tl-dot::after { content: ""; position: absolute; top: 12px; bottom: -6px; width: 1px; background: var(--line); }
.tl-item:last-child .tl-dot::after { display: none; }
.tl-body { padding-bottom: 11px; }
.tl-main { color: var(--ink-2); }
.tl-main b { font-weight: 600; }
.tl-note { color: var(--faint); font-size: 10.5px; }

/* ============================================================ 文件 */

.file-link {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  color: var(--brand-ink); text-decoration: none; background: var(--brand-soft);
  padding: 2px 8px; border-radius: 6px; margin: 2px 4px 2px 0;
  border: 1px solid #e0e7ff; transition: background .15s;
}
.file-link:hover { background: var(--brand-soft-2); }
.file-link.small { font-size: 10.5px; }
.file-none { color: var(--faint); font-size: 11.5px; }

/* ============================================================ 空态 */

.empty { padding: 36px 18px; text-align: center; color: var(--faint); font-size: 12.5px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty::before {
  content: ""; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 6px;
  background: #f4f6fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23b6becd' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.5 5.1 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.5-6.9A2 2 0 0 0 16.8 4H7.2a2 2 0 0 0-1.7 1.1z'/%3E%3C/svg%3E") center/20px no-repeat;
  border: 1px solid var(--line);
}
.empty strong { color: var(--ink-2); font-size: 12.8px; font-weight: 580; }

/* ============================================================ 平台勾选 */

.ck-row { display: flex; flex-wrap: wrap; gap: 7px; }
.ck-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  border: 1px solid #e2e6f0; border-radius: 20px; padding: 4px 11px; cursor: pointer; background: #fff;
  transition: all .15s;
}
.ck-pill:hover { border-color: #c9d4f2; background: #fbfcff; }
.ck-pill:has(input:checked) { border-color: #a8bbf8; background: var(--brand-soft); color: var(--brand-ink); font-weight: 550; }
.ck-pill input { accent-color: var(--brand); }

/* ============================================================ toast */

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(14px) scale(.98);
  background: rgba(16, 22, 34, .95); color: #fff; font-size: 12.5px; padding: 10px 18px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 300;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55);
  display: flex; align-items: center; gap: 8px; max-width: 78vw;
  backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast.bad { background: rgba(178, 32, 32, .96); }

/* ============================================================ 弹窗 / 协作动态 */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 15, 25, .5);
  display: none; place-items: center; z-index: 200; padding: 24px;
  backdrop-filter: blur(3px);
}
.modal-backdrop.show { display: grid; animation: fadeIn .18s ease both; }
.modal {
  background: #fff; border-radius: var(--r-xl); width: min(760px, 100%);
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .6) inset;
  animation: popIn .2s cubic-bezier(.2, .8, .3, 1) both;
}
.modal h3 { margin: 0 0 3px; font-size: 15.5px; font-weight: 640; letter-spacing: -.2px; }
.modal .modal-sub { color: var(--muted); font-size: 11.5px; margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.modal-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, .96));
  backdrop-filter: blur(6px);
}
.modal-head .mh-main { flex: 1; min-width: 0; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 16px 22px 18px; }
.modal-foot { padding: 12px 22px 18px; border-top: 1px solid var(--line-2); background: #fbfcfe; }

/* 阶段流转条 */
.stepper { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 10px 0 4px; }
.step {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; padding: 3px 9px; border-radius: 20px;
  background: #f4f6fa; color: var(--faint); border: 1px solid transparent; white-space: nowrap;
}
.step.done { background: #f1f8f4; color: #0b7f5a; }
.step.now { background: var(--brand-soft); color: var(--brand-ink); border-color: #ccd8fd; font-weight: 600; }
.step .s-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.step-arrow { color: #d3d9e6; font-size: 10px; }

/* 消息气泡 */
.thread { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 6px; }
.msg { display: flex; gap: 10px; }
.msg-av {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 620; color: #fff;
  background: linear-gradient(145deg, #8fa4e8, #5b78d8);
}
.msg-av.sys { background: linear-gradient(145deg, #ffb36b, #f08a2a); }
.msg-av.urge { background: linear-gradient(145deg, #ff8f8f, #dc3b3b); }
.msg-main { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--faint); margin-bottom: 3px; flex-wrap: wrap; }
.msg-head b { color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.msg-bubble {
  background: #f5f7fb; border: 1px solid #eef1f7; border-radius: 4px 12px 12px 12px;
  padding: 8px 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; word-break: break-word;
}
.msg.urge .msg-bubble { background: #fef6f6; border-color: #f7dede; color: #8d2a2a; }
.msg.sys .msg-bubble { background: #fffbf3; border-color: #f6e8cc; color: #7a5a12; font-size: 12px; }
.msg-to { font-size: 10px; color: var(--faint); }
.thread-empty { padding: 26px 10px; text-align: center; color: var(--faint); font-size: 12px; }

.composer { display: flex; flex-direction: column; gap: 9px; }
.composer-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.composer textarea { min-height: 62px; }
.quick-row { display: flex; gap: 6px; flex-wrap: wrap; }
.quick {
  font-size: 10.5px; color: var(--ink-3); background: #f4f6fa; border: 1px solid #e9edf5;
  border-radius: 14px; padding: 3px 9px; cursor: pointer; font-family: inherit;
}
.quick:hover { background: var(--brand-soft); color: var(--brand-ink); border-color: #d6e0ff; }

/* ============================================================ 管理员 */

.tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 9px 2px; margin-right: 22px; font-family: inherit; font-size: 12.5px;
  color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s; font-weight: 520;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 620; }
.tabs-right { margin-left: auto; display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }

.banner {
  border-radius: 10px; padding: 10px 14px; font-size: 12px; line-height: 1.6;
  border: 1px solid #eedfbe; background: #fffdf6; color: #7a5a12;
}
.banner.info { border-color: #d6e3fb; background: #f7faff; color: #2a4b86; }
.banner.bad { border-color: #f3d5d5; background: #fdf6f6; color: #a02a2a; }
.banner.ok { border-color: #d2ebde; background: #f5fcf8; color: #0d6b4b; }
.banner strong { font-weight: 620; }
.banner code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; background: rgba(0, 0, 0, .05); padding: 1px 5px; border-radius: 4px; }

.kv { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; font-size: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c9ced8; margin-right: 6px; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(15, 157, 110, .15); }
.dot.off { background: #c9ced8; }
.dot.err { background: var(--bad); box-shadow: 0 0 0 3px rgba(220, 59, 59, .15); }

.src-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--panel-2); }
.src-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.src-name { font-weight: 600; font-size: 12.8px; }

.big-num { font-size: 21px; font-weight: 660; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.muted-sm { font-size: 11px; color: var(--muted); }

.lock { max-width: 400px; margin: 64px auto 0; }
.lock-ico {
  width: 40px; height: 40px; border-radius: 12px; background: #fdf0ec; color: #c2412a;
  display: grid; place-items: center; margin-bottom: 14px; border: 1px solid #f8ded6;
}

.fieldset-title { font-size: 11.5px; font-weight: 620; color: var(--ink-2); margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
.fieldset-title::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--brand); }
.fieldset { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.fieldset:last-of-type { border-bottom: 0; }
input[type="password"].input { letter-spacing: 1px; }

/* ============================================================ 推广看板 */

.promo-plat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
@media (max-width: 1160px) { .promo-plat-grid { grid-template-columns: repeat(2, 1fr); } }

.promo-plat {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 11px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 6%, #fff) 0%, #fff 64%);
  box-shadow: var(--sh-xs);
  transition: transform .16s, box-shadow .16s;
}
.promo-plat:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.promo-plat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pc); }
.pp-head { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.pp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pc); flex: 0 0 auto; }
.pp-name { font-weight: 600; }
.pp-cnt { margin-left: auto; font-size: 10.5px; color: var(--faint); }
.pp-num { font-size: 22px; font-weight: 670; letter-spacing: -.7px; margin: 5px 0 1px; font-variant-numeric: tabular-nums; }
.pp-sub { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pp-sub b { font-weight: 600; }
.pp-diff { font-size: 10px; padding: 0 4px; border-radius: 4px; background: #f2f4f9; }

.up { color: #d93a3a; }
.down { color: #0f9d6e; }

.rank {
  display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 6px;
  font-size: 11px; font-weight: 650; color: var(--muted); background: #f4f6fa; font-variant-numeric: tabular-nums;
}
.rank.top1 { background: linear-gradient(180deg, #ffe9e2, #fdd9cd); color: #b83b21; }
.rank.top2 { background: linear-gradient(180deg, #fdf1de, #fbe6c8); color: #9a6009; }
.rank.top3 { background: linear-gradient(180deg, #edf2fc, #dfe8fa); color: #3b5da8; }

.mv { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.num.strong { font-weight: 640; color: var(--ink); }

.mixbar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: #eef1f7; }
.mixbar span { display: block; height: 100%; }

.chart-wrap { margin: 2px 0 0; }
.chart-wrap svg { display: block; width: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 4px; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.lg-item i { width: 13px; height: 3px; border-radius: 2px; display: inline-block; }

/* ============================================================ 杂项 */

.hint { font-size: 11px; color: var(--muted); line-height: 1.65; }
.hint b { color: var(--ink-2); font-weight: 600; }
.divider { height: 1px; background: var(--line-2); margin: 2px 0; }
.right { text-align: right; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; color: var(--muted); letter-spacing: -.2px; }
.pill-date { font-size: 11.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 4px 10px; border-radius: 20px; }

/* ============================================================ 动效 */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes shimmer { 0% { background-position: -240px 0; } 100% { background-position: 240px 0; } }

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #f1f3f8 25%, #f7f8fc 37%, #f1f3f8 63%);
  background-size: 480px 100%;
  animation: shimmer 1.3s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================ 窄屏 */

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; }
  .view { padding: 14px 16px 60px; }
  .searchbox { width: 180px; }
  .me-meta { display: none; }
}

/* ============================================================ 协作补充 */

.nav-dot { position: relative; }
.nav-dot.unread::after {
  content: ""; position: absolute; right: -3px; top: -3px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #ff5a5a; box-shadow: 0 0 0 2px #0c1119;
}

.np-body { display: block; }
.np-text { display: block; }
.np-meta { display: flex; }

.modal-head .step { font-size: 10px; }

.todo-item .badge { font-size: 10px; }

/* hidden 属性优先于组件 display，避免角标/浮层该隐藏时仍占位 */
[hidden] { display: none !important; }

.sp-item { min-width: 0; }
.sp-item .sp-code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.sp-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.todo-go { opacity: .32; color: #b3bccd; }
.todo-item:hover .todo-go { opacity: 1; color: var(--brand); }
