/* AI 工作台 —— 样式：浅色 · 墨绿主色 + 姜黄点缀
   参考 Notion / Linear / Vercel 的克制工具风。
   仅前端视觉层；不承载任何业务逻辑。
*/
:root {
  /* 表面 */
  --bg: #f7f8fa;
  --bg-2: #fbfcfd;
  --panel: #ffffff;
  --panel-2: #f3f5f8;
  --line: #e5e7eb;
  --line-2: #d3d8e0;
  /* 文字 */
  --text: #1f2329;
  --text-dim: #4b5563;
  --text-mute: #8a919c;
  /* 主色（低饱和墨绿，克制使用） */
  --blue: #2f7a58;
  --blue-hover: #26634a;
  --blue-tint: #e9f4ee;
  --blue-tint-2: #f4faf6;
  --blue-line: #b3d5c3;
  /* 点缀色：反差跳色。纯亮黄只做色块/竖条/边框，需要当文字时用深金 */
  --gold: #ffd400;
  --gold-ink: #b89900;
  --gold-tint: #fffbea;   /* 2026-11-11：退到几乎白，底色太黄会把左边的黄竖条吃掉 */
  --gold-line: #ffe066;
  /* 语义色（仅小面积使用） */
  --green: #17a06a;
  --green-tint: #e7f5ee;
  --green-line: #aed9c4;
  --red: #d23c3c;
  --red-tint: #fcecec;
  --red-line: #ecc2c2;
  --slate: #475569;
  --neutral-tint: #f3f5f8;
  --slate-line: #d5dce5;
  /* 圆角 / 阴影 */
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-pop: 0 10px 30px rgba(16, 24, 40, .10), 0 2px 8px rgba(16, 24, 40, .05);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
#app { position: relative; z-index: 1; }

img { max-width: 100%; }

/* ---------------- 启动屏 ---------------- */
.boot {
  display: grid; place-items: center; min-height: 100vh;
  background: var(--bg); color: var(--text-mute);
}
.boot[hidden] { display: none; }
.boot-card { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.boot-title { color: var(--text-dim); font-size: 14px; letter-spacing: .04em; }
.boot-sub { font-size: 12px; color: var(--text-mute); }
.boot .spin { width: 22px; height: 22px; border-width: 2px; }

/* ---------------- 登录页 ---------------- */
.auth-wrap { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 100vh; background: var(--panel); }
.auth-hero { padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.auth-hero h1 { font-size: 42px; line-height: 1.18; margin: 24px 0 14px; letter-spacing: -.5px; color: var(--text); font-weight: 700; }
.auth-hero h1 em { font-style: normal; color: var(--blue); }
.auth-hero p.lead { color: var(--text-dim); font-size: 14px; line-height: 1.9; max-width: 520px; }
.auth-hero .kicker { color: var(--blue); letter-spacing: .3em; font-size: 12px; font-weight: 500; }
.flow-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; max-width: 560px; }
.flow-line span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--text-dim); font-size: 12px; background: var(--bg-2); }
.auth-form { padding: 56px 56px; display: flex; flex-direction: column; justify-content: center; gap: 14px; background: var(--bg); }
.auth-form h2 { margin: 0 0 4px; font-size: 20px; color: var(--text); }
.auth-form .hint { color: var(--text-mute); font-size: 12px; line-height: 1.8; }
.tabs { display: flex; gap: 4px; background: var(--panel-2); padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.tabs button { flex: 1; background: none; border: none; padding: 8px; border-radius: 6px; color: var(--text-dim); cursor: pointer; transition: all .15s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .08); font-weight: 500; }

/* ---------------- 表单元素 ---------------- */
label.field { display: block; margin-bottom: 12px; max-width: 100%; }
label.field > span { display: block; color: var(--text-dim); font-size: 12.5px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; max-width: 100%; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; color: var(--text);
}
input::placeholder, textarea::placeholder { color: #a3a9b3; }
input:hover, select:hover, textarea:hover { border-color: #b9c0ca; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 122, 88, .14); }
textarea { resize: vertical; line-height: 1.85; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 15px; height: 15px; vertical-align: middle; margin: 0 4px 0 0; }

/* 两步验证 6 位码：一排 6 格。
   全局 input[type=text] 是 width:100% + padding:9px 12px，不覆盖就会竖着占 6 行——原来丑就是这原因。
   选择器必须带 .totp-row 前缀：input[type=text] 的权重是 (0,1,1)，单写 .totp-box 只有 (0,1,0)，会被压住。 */
.totp-row { display: flex; gap: 8px; margin: 4px 0 14px; }
.totp-row .totp-box {
  flex: 0 1 46px; min-width: 30px; height: 56px; padding: 0;
  text-align: center; font-size: 24px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}
/* 登录页右栏在 1024 屏只剩 323px，821 屏（还没到单列断点）只剩 237px——
   所以格子必须可收缩，光靠固定 46px 会在中等宽度挤出去。 */
@media (max-width: 1024px) {
  .totp-row { gap: 6px; }
  .totp-row .totp-box { flex-basis: 42px; height: 52px; font-size: 22px; }
}
@media (max-width: 520px) {
  .totp-row { gap: 5px; }
  .totp-row .totp-box { flex-basis: 38px; height: 48px; font-size: 20px; }
}

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 8px 15px; cursor: pointer; transition: all .15s; white-space: nowrap;
  color: var(--text-dim); max-width: 100%;
}
.btn:hover { border-color: #aeb6c1; background: var(--panel-2); color: var(--text); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 500; }
.btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn.ghost:hover { background: var(--panel-2); border-color: transparent; color: var(--text); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 6px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red-line); color: var(--red); background: var(--red-tint); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { background: var(--panel); border-color: var(--line-2); color: var(--text-dim); }

.row { display: flex; gap: 10px; align-items: center; max-width: 100%; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; min-width: 0; }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }

/* ---------------- 应用骨架 ---------------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  border-right: 1px solid var(--line); background: var(--panel);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.logo {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; flex: none; overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand b { display: block; font-size: 14px; color: var(--text); font-weight: 600; }
.brand small { color: var(--text-mute); font-size: 11px; }
.nav-group { color: var(--text-mute); font-size: 11px; letter-spacing: .12em; padding: 14px 10px 5px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer; border: 1px solid transparent; font-size: 13.5px;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.on { background: var(--blue-tint); color: var(--blue); font-weight: 500; position: relative; }
/* 当前项左侧竖条：2026-11-11 主人要求改回绿色 —— 这一项的底色本来就是 --blue-tint（绿），
 * 配姜黄竖条是「一半绿一半黄」，看着像两套色系打架。黄色留给提示条，菜单里只用主色。 */
.nav-item.on:not(.nav-parent)::before {
  content: ''; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 14px; border-radius: 2px; background: var(--blue);
}
.nav-item .tag {
  margin-left: auto; font-size: 10px; color: #5a739a;
  background: #eef2f8; border: 1px solid #dde5f0;
  padding: 0 6px; border-radius: 5px; line-height: 16px; white-space: nowrap;
}
/* 菜单未读红点：只有点，没有数字。跟左下角收件箱同一个数据源 */
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: 0 0 7px; margin-left: auto; }
.nav-item.sub .nav-dot { margin-right: 2px; }
.nav-item.on .tag { background: rgba(255, 255, 255, .7); border-color: var(--blue-line); color: var(--blue); }

/* 一级菜单（可点，跳到该组默认页）+ 二级菜单（手风琴，随当前页展开） */
.nav-item.nav-parent { margin-top: 6px; }
.nav-item.nav-parent .grow { flex: 1; min-width: 0; }
.nav-item .caret {
  font-size: 10px; line-height: 1; opacity: .45;
  transition: transform .15s ease; margin-left: 4px;
}
.nav-item.nav-parent.open .caret { transform: rotate(180deg); opacity: .8; }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px; }
/* 收起状态：DOM 留着（角标、测试、无障碍都要能查到），只是不显示 */
.nav-sub[hidden] { display: none; }
.nav-sub .nav-item {
  padding: 6px 10px 6px 28px; font-size: 13px;
  color: var(--text-mute); border: 1px solid transparent;
}
.nav-sub .nav-item:hover { color: var(--text); }
.nav-sub .nav-item.on { color: var(--blue); font-weight: 500; background: var(--blue-tint); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }

/* 左下角收件箱图标：纯线条，角标只数要人动手的 */
.ico-btn {
  position: relative; display: grid; place-items: center;
  width: 26px; height: 26px; flex: 0 0 26px; padding: 0;
  border: 0; background: transparent; border-radius: 6px;
  color: var(--text-mute); cursor: pointer;
}
.ico-btn:hover { background: var(--panel); color: var(--text); }
.ico-btn .dot {
  position: absolute; top: 0; right: 0;
  width: 8px; height: 8px; box-sizing: border-box;
  border-radius: 50%; background: var(--red);
  border: 1.5px solid #fff;
}
.inbox-list { display: flex; flex-direction: column; gap: 10px; }
.inbox-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
.inbox-item .t { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inbox-item.warn { border-left: 3px solid var(--blue); background: var(--blue-tint-2); }
.inbox-item.go { cursor: pointer; }
.inbox-item.go:hover { border-color: var(--blue-line); background: var(--blue-tint); }
.inbox-item .go-hint { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--blue); }

.side-user { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: var(--radius-sm); background: var(--panel-2); }
.avatar {
  width: 29px; height: 29px; flex: 0 0 29px; border-radius: 50%;
  background: var(--blue-tint); display: grid; place-items: center;
  font-size: 12px; color: var(--blue); font-weight: 600;
}
.side-user .grow > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { padding: 24px 30px 80px; max-width: 1400px; min-width: 0; }
.topbar { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { margin: 0 0 3px; font-size: 20px; letter-spacing: -.2px; color: var(--text); font-weight: 650; }
.topbar p { margin: 0; color: var(--text-mute); font-size: 13px; }
.topbar .row { flex-wrap: wrap; }
.user-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 11px; font-size: 12px; color: var(--text-dim); background: var(--panel);
  max-width: 100%;
}
.user-chip b { color: var(--blue); font-weight: 600; }

/* ---------------- 提示条 note ---------------- */
/* 2026-11-11 主人要求：提示框统一走黄色。原来默认底色用的是 --blue-tint-2，
 * 那个值本身就是 #f4faf6（浅绿），所以整页提示条看着全是绿，一页下来很单调。
 * 三档分工：黄 = 说明 / 空状态，红 = 要注意 / 出错，绿 = 结果没问题。
 *
 * 只有一根 3px 竖条，不描边。描边试过两轮都退回来了：
 * 灰边框套彩色底显脏（第一版显土棕就是它 + 芥末竖条 + 米色底三件事叠的），
 * 同色黄边框又会把整块糊成一片，竖条的分量反而被稀释。
 * 底色也刻意压得很淡（#fffbea）—— 底色一黄，同一色系的竖条就跳不出来；
 * 侧边栏那根之所以扎眼，就是因为它压在一层浅绿上。 */
.note {
  border: 0; border-left: 3px solid var(--gold);
  background: var(--gold-tint);
  border-radius: var(--radius-sm); padding: 11px 14px;
  color: var(--text-dim); font-size: 13px; line-height: 1.8;
  max-width: 100%; overflow-wrap: break-word;
}
.note.info { border-left-color: var(--gold); background: var(--gold-tint); }
/* warn 走红：真正要注意 / 出错的地方。跟黄色放在一起，一页里扫一眼就能分出轻重 */
.note.warn { border-left-color: var(--red); background: var(--red-tint); color: var(--text-dim); }
.note.ok { border-left-color: var(--green); background: var(--green-tint); }
.note code { background: rgba(16, 24, 40, .06); padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }

/* ---------------- 卡片 / 网格 ---------------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-card);
  max-width: 100%; min-width: 0; overflow-wrap: break-word;
}
.card.current { border-color: var(--blue-line); box-shadow: 0 0 0 1px var(--blue-line); }
.card.dense { padding: 14px; }
.card h3 {
  margin: 0 0 12px; font-size: 16px; color: var(--text); font-weight: 600; line-height: 1.3;
  display: flex; align-items: center; gap: 10px;
}
/* 全站卡片标题统一标识：一条 3px 绿竖条，替代原先各页面五花八门的 emoji 图标 */
.card h3::before {
  content: ''; width: 3px; height: 15px; border-radius: 2px; background: var(--blue); flex: none;
}
.card h3 small { color: var(--text-mute); font-weight: 400; margin-left: 2px; font-size: 11.5px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero, .auth-form { padding: 36px 24px; }
}

/* ---------------- 步骤条 ---------------- */
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 7px; padding: 6px 13px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-mute); font-size: 12.5px; background: var(--panel);
}
.step.on { border-color: var(--blue-line); color: var(--blue); background: var(--blue-tint); font-weight: 500; }
.step.done { border-color: var(--green-line); color: var(--green); background: var(--green-tint); }
.step b { font-weight: 600; }
.step-sep { width: 20px; height: 1px; background: var(--line-2); }

/* ---------------- 统计卡 ---------------- */
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px;
  box-shadow: var(--shadow-card); max-width: 100%;
}
.stat .k { color: var(--text-mute); font-size: 12px; }
.stat .v { font-size: 26px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.5px; color: var(--text); }
.stat .v.gold {
  /* 关键数字不靠黄字（浅底上读不清），改成黄底深字：反差最大，可读性也最好 */
  color: #1f2329; background: var(--gold); display: inline-block;
  padding: 0 10px; border-radius: 7px; line-height: 1.45;
}
.stat .s { color: var(--text-mute); font-size: 11.5px; }


/* ---------------- 徽章 pill ---------------- */
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; border: 1px solid var(--line);
  color: var(--text-dim); background: var(--bg-2);
  max-width: 100%; overflow-wrap: break-word; vertical-align: middle; line-height: 1.7;
}
.pill.checkable { cursor: pointer; user-select: none; }
.pill.checkable.on { border-color: var(--blue-line); color: var(--blue); background: var(--blue-tint); font-weight: 500; }
.pill.checkable input { margin-right: 5px; }
.pill.gold { border-color: #e8c200; color: #1f2329; background: var(--gold); font-weight: 600; }
.pill.blue { border-color: var(--blue-line); color: var(--blue); background: var(--blue-tint-2); }
.pill.green { border-color: var(--green-line); color: var(--green); background: var(--green-tint); }
.pill.red { border-color: var(--red-line); color: var(--red); background: var(--red-tint); }
.pill.orange { border-color: var(--slate-line); color: var(--slate); background: var(--neutral-tint); }
/* 要人动手的：实底，一眼看见 */
.pill.solid { border-color: var(--blue); color: #fff; background: var(--blue); font-weight: 600; }
/* 次于实底，但比灰 pill 重：暖黄，不刺眼 */
.pill.warn { border-color: #e8c200; color: #7a5c00; background: #fff8e1; font-weight: 600; }




.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs-line button {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 8px 13px; cursor: pointer; color: var(--text-mute);
  margin-bottom: -1px; font-size: 13px;
}
.tabs-line button:hover { color: var(--text-dim); }
.tabs-line button.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }

/* ---------------- 列表 ---------------- */
.list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.list-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; background: var(--panel);
  display: flex; gap: 12px; align-items: center;
  max-width: 100%; min-width: 0;
}
.list-item:hover { border-color: var(--line-2); }
.list-item.current { border-color: var(--blue-line); background: var(--blue-tint-2); }
.list-item .t { font-size: 13.5px; margin-bottom: 2px; color: var(--text); overflow-wrap: break-word; }
.list-item .m { color: var(--text-mute); font-size: 11.5px; overflow-wrap: break-word; }
.list-item .grow { min-width: 0; }

/* ---------------- 表格 ---------------- */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: break-word; }
th { color: var(--text-mute); font-weight: 500; font-size: 11.5px; }
tbody tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-2); }

/* ---------------- 进度条 ---------------- */
.bar { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.bar.green > i { background: var(--green); }
.bar.red > i { background: var(--red); }

/* ---------------- 口播稿 ---------------- */
.tele-stage {
  position: fixed; inset: 0; background: var(--bg-2);
  z-index: 100; display: flex; flex-direction: column;
}
.tele-top {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-bottom: 1px solid var(--line);
  background: var(--panel); flex-wrap: wrap;
}
.tele-top b { font-size: 14px; color: var(--text); }
.tele-scroll { flex: 1; overflow-y: auto; padding: 44px 8vw 45vh; scroll-behavior: smooth; min-width: 0; }
.tele-block { margin: 0 auto 26px; max-width: 1120px; }
.tele-text { font-size: 34px; line-height: 1.65; font-weight: 500; letter-spacing: .01em; color: #a8aeb8; overflow-wrap: anywhere; }
.tele-block.readonly .tele-text { opacity: .4; }
.tele-block.current .tele-text { color: var(--text); font-weight: 600; }
.tele-tags { display: flex; gap: 9px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.tele-tone { color: var(--blue); font-size: 13px; border: 1px solid var(--blue-line); background: var(--blue-tint); padding: 2px 10px; border-radius: 999px; }
.tele-action { color: #5a6b82; font-size: 13px; border: 1px solid var(--line-2); background: var(--panel); padding: 2px 10px; border-radius: 999px; }
.tele-pause { color: var(--text-mute); font-size: 12px; }
.tele-guide {
  position: absolute; left: 0; right: 0; top: 42%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, .5), transparent);
  pointer-events: none;
}
.tele-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 11px 18px; background: var(--panel);
  border-top: 1px solid var(--line);
}
.tele-progress { height: 3px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-bottom: 9px; }
.tele-progress > i { display: block; height: 100%; background: var(--blue); width: 0; }

/* ---------------- 弹层 ---------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .32);
  display: grid; place-items: center; z-index: 200; backdrop-filter: blur(3px);
  padding: 20px;
}
.modal {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-pop);
  width: min(720px, 100%); max-height: 88vh; overflow: auto; min-width: 0;
}
.modal header {
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; background: var(--panel); z-index: 2;
}
.modal header h3 { margin: 0; font-size: 15px; color: var(--text); }
.modal .body { padding: 18px 20px; max-width: 100%; overflow-wrap: break-word; }
.modal footer {
  padding: 13px 20px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  position: sticky; bottom: 0; background: var(--panel);
}

/* ---------------- toast ---------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 9px; max-width: min(380px, calc(100vw - 40px)); }
.toast {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  padding: 10px 14px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); font-size: 13px; color: var(--text-dim);
  max-width: 100%; overflow-wrap: anywhere; animation: slide .22s ease;
}
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 平台预览 ---------------- */
.preview {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; background: var(--bg-2); max-width: 100%; min-width: 0;
}
.preview .ph { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: var(--text-mute); font-size: 12px; }
.preview .pbody {
  white-space: pre-wrap; line-height: 1.9; font-size: 13px;
  max-height: 320px; overflow: auto; color: var(--text); overflow-wrap: anywhere;
}
.counter.over { color: var(--red); }

/* ---------------- details ---------------- */
details { max-width: 100%; }
summary { color: var(--text-mute); font-size: 12.5px; }
summary:hover { color: var(--text-dim); }

/* 折叠卡片：默认收起，点标题展开。标题当 summary 用，右侧箭头指示状态 */
details.card.fold > summary {
  cursor: pointer; list-style: none; margin: 0;
  display: flex; align-items: center; gap: 6px; user-select: none;
}
details.card.fold > summary::-webkit-details-marker { display: none; }
details.card.fold > summary::after {
  content: '▾'; margin-left: auto; color: var(--text-mute);
  font-size: 11px; line-height: 1; transition: transform .15s ease;
}
details.card.fold[open] > summary::after { transform: rotate(180deg); }
details.card.fold > summary > h3 { margin: 0; }
details.card.fold > summary:hover > h3 { color: var(--blue); }
details.card.fold[open] > summary { margin-bottom: 14px; }

/* ---------------- loading ---------------- */
.spin {
  width: 15px; height: 15px;
  border: 2px solid var(--line-2); border-top-color: var(--blue);
  border-radius: 50%; animation: sp .7s linear infinite; display: inline-block;
}
@keyframes sp { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, #eef0f3, #f7f8fa, #eef0f3);
  background-size: 200% 100%; animation: sk 1.3s linear infinite;
  border-radius: 6px; height: 14px;
}
@keyframes sk { to { background-position: -200% 0; } }

/* ---------------- 滚动条 ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6dae1; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #c2c7d0; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* 选中态（替代旧金色内联） */
.list-item.selected { border-color: var(--blue-line); }
.card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }
.pill.check.selected { border-color: var(--blue); color: var(--blue); background: var(--blue-tint); font-weight: 500; }

/* ============================ 生成中「停止」浮条 ============================ */
#stop-bar {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  box-shadow: var(--shadow-pop);
  font-size: 13px;
  color: var(--text-dim);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}
#stop-bar.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
#stop-bar .stop-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: stop-pulse 1.2s ease-in-out infinite;
  flex: 0 0 auto;
}
#stop-bar .stop-txt {
  white-space: nowrap;
  color: var(--text-mute);
}
#stop-bar .stop-btn {
  appearance: none;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
#stop-bar .stop-btn:hover:not(:disabled) {
  background: var(--blue-tint);
  border-color: var(--blue-line);
  color: var(--blue);
}
#stop-bar .stop-btn:disabled {
  cursor: default;
  color: var(--text-mute);
  opacity: .7;
}
@keyframes stop-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.82); }
}
@media (max-width: 640px) {
  #stop-bar { bottom: 16px; padding: 8px 10px 8px 14px; }
  #stop-bar .stop-txt { display: none; }
}

/* 记忆时间线（D7-B1）：三栏在窄屏收成一栏，别挤 */
.mem-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 14px; align-items: start }
/* 筛选横跨上面一整行，列表和详情在下面两栏 */
.mem-grid > .mem-filters { grid-column: 1 / -1 }
@media (max-width: 1180px) { .mem-grid { grid-template-columns: 1fr } .mem-grid > .mem-filters { grid-column: auto } }

/* 筛选条：横排，超宽自动换行 */
.mem-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.mem-filters > .small.muted { flex: 0 0 auto; margin: 0 -10px 0 0; }
.mem-filters .row.wrap { margin: 0 !important; }
.mem-filters .field { display: flex; align-items: center; gap: 6px; margin: 0; flex: 1 1 220px; min-width: 180px; }
.mem-filters .field > span { font-size: 12px; color: var(--text-mute); white-space: nowrap; }
.mem-filters .field > input { flex: 1; min-width: 0; }
.mem-filters .note.info { flex: 1 1 100%; margin: 0 !important; }
.mem-filters .note.small { margin: 0 !important; padding: 0; border: 0; background: none; flex: 0 0 auto; }

/* ── 记忆库（跨分身全局列表）：一行一条，筛选全在下拉里 ───────────── */
.ma-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-bottom: 14px; }
.ma-filters .field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ma-filters .field > span { font-size: 12px; color: var(--text-mute); white-space: nowrap; margin-bottom: 0; }
.ma-filters .field > select,
.ma-filters .field > input,
.ma-filters .ma-picker-btn {
  height: 32px; box-sizing: border-box; padding: 0 10px; min-width: 132px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text); font-size: 13px; line-height: 1.2;
}
.ma-filters .field > select { padding-right: 4px; cursor: pointer; }
.ma-filters .field > input { min-width: 210px; }
.ma-filters .ma-picker-btn { display: inline-flex; align-items: center; gap: 6px; justify-content: space-between; }
.ma-filters .ma-picker-btn:hover { border-color: var(--blue-line); }
.ma-filters .field > select:focus,
.ma-filters .field > input:focus { outline: none; border-color: var(--blue); }
.ma-filters > .btn { height: 32px; }

.ma-picker { position: relative; }
.ma-picker-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 132px; justify-content: space-between; }
.ma-picker-btn i { font-style: normal; font-size: 10px; color: var(--text-mute); }
.ma-picker-pop {
  position: absolute; top: 100%; left: 0; z-index: 40; margin-top: 4px; width: 244px;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .12);
}
/* display:flex 会把 hidden 属性自带的 display:none 盖掉，得显式补一条 */
.ma-picker-pop[hidden] { display: none; }
.ma-picker-list { padding: 6px; overflow: auto; max-height: 264px; }
.ma-picker-foot { display: flex; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--line); }
.ma-opt { display: flex; align-items: center; gap: 7px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ma-opt:hover { background: var(--panel-2); }
.ma-opt > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-opt > i { font-style: normal; font-size: 10px; color: var(--text-mute); }

.ma-table { padding: 0; overflow: hidden; }
.ma-head, .ma-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px 132px minmax(0, 150px) 84px 176px;
  gap: 10px; align-items: center; padding: 9px 14px;
}
.ma-head { font-size: 11.5px; font-weight: 600; color: var(--text-mute); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.ma-row { border-bottom: 1px solid var(--line); }
.ma-row:hover { background: var(--blue-tint-2); }
.ma-row.gone { opacity: .55; }
.ma-text {
  font-size: 13px; line-height: 1.6; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ma-text:hover { color: var(--blue); }
.ma-owners { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; }
.ma-owner { padding: 0 6px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim); line-height: 18px; }
.ma-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ma-ops { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.ma-foot { padding: 10px 14px; background: var(--panel-2); }
.btn.sm.ghost.danger { color: var(--red); }
.btn.sm.ghost.danger:hover { background: var(--red-tint); border-color: var(--red-line); }

.ma-detail-text { font-size: 14px; line-height: 1.75; padding: 12px 14px; background: var(--panel-2); border-radius: var(--radius-sm); margin-bottom: 12px; }
.ma-kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.ma-kv th { text-align: left; font-weight: 500; color: var(--text-mute); width: 92px; padding: 5px 0; vertical-align: top; white-space: nowrap; }
.ma-kv td { padding: 5px 0; color: var(--text); }
.ma-revs { display: flex; flex-direction: column; gap: 6px; }
.ma-rev { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }

@media (max-width: 1180px) {
  .ma-head { display: none; }
  .ma-row { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .ma-row > div:nth-child(2) { grid-column: 1 / -1; }
  .ma-row > div:nth-child(7) { grid-column: 1 / -1; justify-content: flex-start; }
}

/* 账号菜单：点左下角头像向上弹出（账号安全 / 两步验证，属个人设置，不放管理后台） */
.acct-wrap { position: relative; }
.side-user { cursor: pointer; }
.side-user:hover { filter: brightness(.97); }
.side-user .caret {
  font-size: 10px; line-height: 1; opacity: .45; margin-left: 2px;
  transition: transform .15s ease;
}
.side-user.open .caret { transform: rotate(180deg); opacity: .8; }
.acct-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); padding: 5px;
  display: flex; flex-direction: column; gap: 2px;
}
.acct-menu-item {
  padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
  display: flex; flex-direction: column; gap: 1px; color: var(--text-dim);
}
.acct-menu-item small { color: var(--text-mute); font-size: 11px; }
.acct-menu-item:hover { background: var(--panel-2); color: var(--text); }
.acct-menu-item.on { background: var(--blue-tint); color: var(--blue); }
.acct-menu-item.on small { color: var(--blue); opacity: .75; }
/* 菜单里混了链接（接入文档）：去掉下划线和默认蓝，跟旁边的按钮长一样 */
a.acct-menu-item { text-decoration: none; }
a.acct-menu-item:visited { color: var(--text-dim); }

/* ===== 文件库 v1（批次 2）===== */
.files-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:14px 0 12px; }
.files-toolbar .crumbs { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--dim,#666); }
.files-toolbar .crumbs a { color:inherit; text-decoration:none; }
.files-toolbar .crumbs a:hover { color:var(--blue); }
.files-toolbar .crumbs .sep { opacity:.45; }
.files-toolbar .fsearch { width:260px; }
.files-layout { display:grid; grid-template-columns:260px minmax(0,1fr); gap:14px; align-items:start; }
.ftree { padding:8px 0; max-height:70vh; overflow:auto; }
.ftree-row { display:flex; align-items:center; gap:6px; padding:7px 10px; cursor:pointer; border-radius:6px; font-size:13.5px; }
.ftree-row:hover { background:rgba(127,127,127,.08); }
.ftree-row.on { background:var(--blue-tint); color:var(--blue); font-weight:600; }
.ftree-caret { width:14px; opacity:.65; font-size:11px; }
.ftree-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ftree-count { font-size:11px; opacity:.5; }
.flist { padding:10px 12px; min-height:360px; max-height:70vh; overflow:auto; }
.flist.drop-hot { outline:2px dashed var(--blue,#2f7a58); outline-offset:-6px; background:rgba(47,122,88,.05); }
/* 2026-11-10：文件名独占一行，信息+按钮一行，标签一行。之前全挤在一行，长文件名把按钮顶出屏幕。 */
.frow { display:flex; align-items:flex-start; gap:10px; padding:10px 6px; border-bottom:1px solid rgba(127,127,127,.12); }
.frow:last-child { border-bottom:0; }
.frow:hover { background:rgba(127,127,127,.04); }
/* 文件行的格式标签（替代原来的 emoji 图标）：小号等宽短标签，PNG / PDF / DOCX */
.ficon {
  width: 40px; flex: none; text-align: center; font-size: 9.5px; font-weight: 600;
  letter-spacing: .03em; color: var(--text-mute); background: var(--blue-tint-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 0; line-height: 1.2;
}
.fgrow { flex:1; min-width:0; }
/* 2026-11-10：原来单行省略，可右侧本来就空着，长文件名被截成「20240918第102回 低空…」
 * 白丢信息。改成允许换行，只在真超长时断词。 */
.fname { font-size:14px; overflow-wrap:anywhere; word-break:break-word; line-height:1.45; }
.fmeta { font-size:11.5px; opacity:.6; }
.fline { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:4px; }
.fspacer { flex:1 1 auto; min-width:6px; }
.ftags { display:flex; gap:6px; flex-wrap:wrap; margin-top:5px; }
.factions { display:flex; gap:3px; flex-wrap:wrap; }.factions { display:flex; gap:3px; flex-wrap:wrap; }

/* 2026-11-10：编辑 md 时批量插入文件条目的选择面板 */
.ins-mask { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:10050; display:flex; align-items:center; justify-content:center; }
.ins-box { width:min(780px,94vw); max-height:82vh; background:var(--card-bg,#fff); border-radius:12px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.28); }
.ins-head { padding:12px 16px; border-bottom:1px solid rgba(127,127,127,.2); display:flex; align-items:center; gap:10px; }
.ins-head b { flex:1; font-size:15px; }
.ins-search { padding:10px 16px; border-bottom:1px solid rgba(127,127,127,.14); }
.ins-search input { width:100%; padding:7px 10px; border:1px solid rgba(127,127,127,.3); border-radius:8px; box-sizing:border-box; font-size:13px; background:transparent; color:inherit; }
.ins-list { flex:1; overflow:auto; padding:6px 8px; min-height:180px; }
.ins-item { display:flex; align-items:flex-start; gap:9px; padding:7px 8px; border-radius:7px; cursor:pointer; }
.ins-item:hover { background:rgba(127,127,127,.07); }
.ins-item input { margin-top:3px; flex:none; }
.ins-item .t { display:block; font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.ins-item .s { display:block; font-size:11.5px; opacity:.55; margin-top:2px; overflow-wrap:anywhere; }
.ins-foot { padding:10px 16px; border-top:1px solid rgba(127,127,127,.2); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ins-foot select { padding:6px 8px; border-radius:8px; border:1px solid rgba(127,127,127,.3); font-size:12.5px; background:transparent; color:inherit; }
.factions .danger { color:#c0392b; }
.fempty { text-align:center; padding:70px 20px; opacity:.75; line-height:2; }
.fempty-icon { font-size:40px; }
.fdirlabel { margin:14px 0 2px; font-size:11.5px; opacity:.55; letter-spacing:.05em; }
.fupload { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.fpreview-mask { position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:60; }
.fpreview { position:fixed; top:0; right:0; bottom:0; width:min(720px,92vw); background:var(--bg,#fff); z-index:61; display:flex; flex-direction:column; box-shadow:-8px 0 30px rgba(0,0,0,.18); }
.fpreview header { display:flex; align-items:flex-start; gap:10px; padding:16px 18px; border-bottom:1px solid rgba(127,127,127,.18); }
.fpreview-body { flex:1; overflow:auto; padding:16px 18px; }
.fpreview footer { padding:12px 18px; border-top:1px solid rgba(127,127,127,.18); }
.fpreview-text { white-space:pre-wrap; word-break:break-word; font-size:13px; line-height:1.7; margin:0; }
.fpreview-img { max-width:100%; height:auto; display:block; margin:0 auto; }
.fpreview-pdf { width:100%; height:100%; min-height:60vh; border:0; }
@media (max-width:900px){ .files-layout{ grid-template-columns:1fr; } .ftree{ max-height:220px; } }


/* 通用弹窗（kit.js 的 openModal）—— 替代 window.prompt 的选项式交互 */
.modal-mask { position: fixed; inset: 0; background: rgba(16, 24, 40, .42); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { width: min(520px, 94vw); max-height: 86vh; background: var(--panel, #fff); border-radius: 12px; box-shadow: 0 18px 50px rgba(16, 24, 40, .28); display: flex; flex-direction: column; overflow: hidden; }
.modal-box header { padding: 15px 18px 11px; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-body label.field:last-child { margin-bottom: 0; }
.modal-box footer { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }

/* 归档：封存的东西在列表里淡出去，别跟活跃文件抢注意力 */
.frow.farchived { opacity: .55; }
.frow.farchived .fname { text-decoration: line-through; text-decoration-color: var(--muted-line, #c9ced6); }
.frow.farchived:hover { opacity: .8; }

/* 删除确认弹窗：路径整条摆出来，别让人靠文件名猜 */
.fdel-path { margin: 8px 0 14px; padding: 9px 11px; border-radius: 8px; background: rgba(127,127,127,.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5;
  word-break: break-all; }
.fdel-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.fdel-check input { margin-top: 2px; flex: none; }

/* ===== 行业分析模块（2026-11-10） ===== */
/* 2026-11-11：这一页上面补了跟其他页一样的标题条，所以上边距不再往回抵消（标题得待在内容区里）。
 * 左右也不通边了 —— iframe 里的工具行（搜索框那一排）贴边的话，会跟标题条差 30px 对不齐；
 * 里面 main#cards 是 max-width:920px 居中，少这 60px 宽度位置一点没变，所以只有工具行跟着对齐了。
 * 只抵消下边距，高度减掉标题条占的 100px（实测 99.8：.main 上内边距 24 + topbar 55.8 + 下间距 20）。 */
.industry-shell { margin: 0 0 -80px; }
.industry-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 100px);
  border: 0;
  background: #fff;
}
@media (max-width: 860px) {
  /* 窄屏标题条会折行，多留 40px —— 宁可短一点，也不要撑出外层双滚动条 */
  .industry-frame { height: calc(100vh - 140px); }
}

/* 2026-11-10：项目详情 —— 流水卡标题行 + 项目文件的文件夹树 */
.pj-head { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.pj-head h3 { flex:1; min-width:0; }
.pjtree details { border:0; }
.pjtree summary { cursor:pointer; padding:6px 8px 6px 0; font-size:13.5px; list-style:none; display:flex; align-items:center; gap:8px; user-select:none; border-radius:6px; }
.pjtree summary::-webkit-details-marker { display:none; }
.pjtree summary::before { content:"▸"; font-size:10px; opacity:.5; display:inline-block; transition:transform .15s; }
.pjtree details[open] > summary::before { transform:rotate(90deg); }
.pjtree summary:hover { background:rgba(127,127,127,.06); }
.pjdir-n { font-weight:600; }
.pjfile { display:flex; align-items:center; gap:10px; padding:6px 0 6px 22px; border-bottom:1px solid rgba(127,127,127,.08); }
.pjfile:last-child { border-bottom:0; }
.pjfile .grow { flex:1; min-width:0; }

/* 2026-11-13: 工单看板（11 状态分组 + 详情时间线） */
.tk-board { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; align-items:start; }
.tk-group { margin:0; }
.tk-group h3 { margin-bottom:10px; }
.tk-list { display:flex; flex-direction:column; gap:8px; }
.tk-item { display:flex; align-items:flex-start; gap:10px; padding:8px 0; border-bottom:1px solid rgba(127,127,127,.10); }
.tk-item:last-child { border-bottom:0; }
.tk-item .grow { flex:1; min-width:0; }
.tk-item .t { font-size:13.5px; line-height:1.5; }
.tk-item .t a { color:inherit; }
.tk-item .m { margin-top:3px; line-height:1.5; word-break:break-all; }
@media (max-width: 720px) { .tk-board { grid-template-columns:1fr; } }

/* 2026-11-13: 顶层「工单」页（跨项目列表） */
.tk2-list { display:flex; flex-direction:column; gap:10px; }
.tk2-card { display:flex; align-items:flex-start; gap:12px; margin:0; }
.tk2-card .grow { flex:1; min-width:0; }
.tk2-card .t { font-size:14px; line-height:1.6; }
.tk2-card .t a { color:inherit; }
.tk2-card .m { margin-top:4px; line-height:1.5; word-break:break-all; }

/* 2026-11-13: 有字数门槛的输入框，下方实时计数 */
.field-count { margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: var(--text-mute); }
.field-count.short { color: var(--red); font-weight: 600; }
.field-count.ok { color: var(--green); }

/* 2026-11-13: 顶层「部署」页（v6.3）
 * 冷色用 slate 系，不碰红/橙；命令块是页面唯一的深色锚点，保持低饱和。
 * 所有块都 min-width:0 + overflow-wrap，375px 下只换行不撑宽。 */
.dp-page {
  --dp-ink: #334155;
  --dp-mute: #64748b;
  --dp-line: #dbe3ec;
  --dp-soft: #f8fafc;
  --dp-accent: #3b5b7a;
  max-width: 100%;
  min-width: 0;
}
.dp-toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.dp-field { flex: 1 1 300px; min-width: 0; margin: 0; }
.dp-field > span { color: var(--dp-mute); }
.dp-field select { height: 38px; }
.dp-toolbar .btn.primary { height: 38px; padding: 0 18px; }
.dp-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding-bottom: 9px; font-size: 12px; color: var(--dp-mute);
  white-space: nowrap; cursor: pointer;
}
.dp-toggle input { accent-color: var(--dp-accent); }

.dp-pack { margin-top: 16px; }
.dp-pack-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.dp-kicker {
  font-size: 11px; letter-spacing: .12em; color: var(--dp-mute);
  margin-bottom: 4px;
}
.dp-pack-name { font-size: 14.5px; font-weight: 600; color: var(--dp-ink); overflow-wrap: anywhere; }
.dp-meta { font-size: 12px; color: var(--dp-mute); margin-top: 4px; overflow-wrap: anywhere; }
.dp-sha {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  max-width: 100%; margin-top: 12px; padding: 5px 9px;
  border: 1px solid var(--dp-line); border-radius: 6px; background: var(--dp-soft);
  cursor: pointer; font-size: 11.5px; color: var(--dp-mute);
}
.dp-sha:hover { border-color: #b8c6d8; }
.dp-sha:focus-visible { outline: 2px solid var(--dp-accent); outline-offset: 1px; }
.dp-sha-k { letter-spacing: .06em; }
.dp-sha code { font-family: var(--mono); color: var(--dp-ink); overflow-wrap: anywhere; word-break: break-all; }
.dp-copy-hint { color: var(--dp-accent); white-space: nowrap; }

.dp-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  margin: 18px 0 0; border-bottom: 1px solid var(--dp-line);
}
.dp-tabs button {
  border: 0; background: none; margin-bottom: -1px; padding: 8px 14px;
  font-size: 13px; color: var(--dp-mute); cursor: pointer;
  border-bottom: 2px solid transparent;
}
.dp-tabs button:hover { color: var(--dp-ink); }
.dp-tabs button.on { color: var(--dp-accent); border-bottom-color: var(--dp-accent); font-weight: 600; }

.dp-cmd {
  position: relative; min-width: 0; margin-top: 12px;
  padding: 12px 86px 12px 14px;
  background: var(--dp-soft); border: 1px solid var(--dp-line); border-radius: 8px;
}
.dp-cmd pre {
  margin: 0; max-height: 190px; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
  font-family: var(--mono); font-size: 12px; line-height: 1.8; color: var(--dp-ink);
}
.dp-cmd .btn { position: absolute; top: 9px; right: 9px; }
.dp-hint { margin-top: 12px; }
.dp-actions { margin-top: 12px; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dp-log { overflow-wrap: anywhere; min-width: 0; }

.dp-current {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 12px;
  border: 1px solid var(--dp-line); border-left: 3px solid var(--dp-accent);
  border-radius: 8px; background: #f3f7fb;
  font-size: 12.5px; color: var(--dp-ink); overflow-wrap: anywhere;
}
.dp-current.empty { border-left-color: #cbd5e1; background: var(--dp-soft); color: var(--dp-mute); }
.dp-current-k { font-weight: 600; color: var(--dp-accent); white-space: nowrap; }
.dp-current.empty .dp-current-k { color: var(--dp-mute); }
.dp-current-meta { color: var(--dp-mute); min-width: 0; overflow-wrap: anywhere; }
.dp-current code { font-family: var(--mono); color: var(--dp-ink); }

.dp-keyfiles { margin-top: 14px; }
.dp-kf {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px;
  align-items: center; padding: 5px 0;
  border-bottom: 1px dashed var(--dp-line); font-size: 12px;
}
.dp-kf:last-child { border-bottom: 0; }
.dp-kf-path { font-family: var(--mono); color: var(--dp-ink); overflow-wrap: anywhere; }
.dp-kf-sha { font-family: var(--mono); color: var(--dp-accent); cursor: pointer; white-space: nowrap; }
.dp-kf-sha:hover { text-decoration: underline; }
.dp-kf-size { color: var(--dp-mute); white-space: nowrap; }
.dp-source { margin-top: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.dp-source-k { color: var(--dp-mute); }
.dp-source-sep { color: var(--line-2); margin: 0 3px; }
.dp-latest { border-color: var(--dp-accent); color: var(--dp-accent); background: #eef4fa; font-weight: 600; }

.dp-history-card { margin-top: 16px; }
.dp-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dp-history-head h3 { margin: 0; }
.dp-history { display: flex; flex-direction: column; gap: 8px; }
.dp-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; text-align: left; font: inherit; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.dp-row:hover { border-color: var(--line-2); background: var(--dp-soft); }
.dp-row.on {
  border-color: #9db4cc; background: #f3f7fb;
  box-shadow: inset 3px 0 0 var(--dp-accent);
}
.dp-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dp-row-name { font-size: 12.5px; color: var(--dp-ink); overflow-wrap: anywhere; }
.dp-row-meta { font-size: 11.5px; color: var(--dp-mute); overflow-wrap: anywhere; }
.dp-row .pill { flex: none; }

@media (max-width: 640px) {
  /* 部署页在手机上收窄外层留白，375px 只换行、不横向滚 */
  .main:has(.dp-page) { padding: 18px 14px 64px; }
  .dp-field { flex-basis: 100%; }
  .dp-toolbar .btn.primary { width: 100%; }
  .dp-toggle { padding-bottom: 0; }
  .dp-cmd { padding: 12px 12px 54px; }
  .dp-cmd .btn { top: auto; bottom: 10px; right: 10px; }
  .dp-row { align-items: flex-start; }
  .dp-row .pill { margin-top: 1px; }
}

/* ============================ 飞书个人看板（fb-*） ============================ */
.fb-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.fb-stat { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border, #e2e8f0); background: var(--card, #fff); cursor: pointer; font: inherit; transition: border-color .15s, transform .12s; }
.fb-stat:hover { border-color: var(--primary, #2563eb); transform: translateY(-1px); }
.fb-stat.active { border-color: var(--primary, #2563eb); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.fb-stat b { font-size: 18px; }
.fb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 14px; }
.fb-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; user-select: none; }
.fb-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; align-items: start; }
.fb-col { background: rgba(148,163,184,.08); border: 1px solid var(--border, #e2e8f0); border-radius: 12px; overflow: hidden; }
.fb-col-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border, #e2e8f0); }
.fb-col-cnt { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(15,23,42,.08); }
.fb-col-body { display: flex; flex-direction: column; gap: 10px; padding: 10px; max-height: 70vh; overflow-y: auto; }
.fb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.fb-card { background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.fb-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fb-card-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.fb-tag { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(148,163,184,.16); white-space: nowrap; }
.fb-tag.focus { background: rgba(245,158,11,.18); color: #b45309; font-weight: 600; }
.fb-tag.prio { background: rgba(239,68,68,.12); color: #b91c1c; }
.fb-tag.cat { background: rgba(37,99,235,.12); color: #1d4ed8; }
.fb-tag.sub { background: rgba(139,92,246,.14); color: #6d28d9; }
.fb-status-sel { font-size: 12px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border, #cbd5e1); background: var(--card, #fff); cursor: pointer; }
.fb-card-title { font-weight: 600; font-size: 14px; line-height: 1.4; }
.fb-card-detail { font-size: 12.5px; color: var(--muted, #64748b); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.fb-card-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted, #64748b); }
.fb-linked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.fb-tk-chip { padding: 2px 8px; border-radius: 6px; background: rgba(16,185,129,.12); color: #047857; text-decoration: none; font-weight: 500; }
.fb-card-actions { display: flex; gap: 8px; margin-top: 2px; }
.fb-orch { display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; }
.fb-orch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; border-radius: 8px; background: rgba(148,163,184,.1); }
.fb-orch-grid > div { display: flex; flex-direction: column; gap: 2px; }
.fb-orch-box { padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; }
.fb-orch-box p { margin: 6px 0; line-height: 1.5; }
.fb-sub-list { margin: 6px 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
