:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --navy: #0f2146;
  --navy-2: #16294f;
  /* 侧栏专用蓝：比登录区的深蓝浅一档，白字仍够清晰，整块不再压得发闷 */
  --nav-sidebar-top: #2b4d80;
  --nav-sidebar-bottom: #1e3b69;
  --gold: #c9a227;
  --gold-light: #f5eccb;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --border: #e5e7eb;
  --success: #16a34a;
  --success-bg: #ecfdf5;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #0891b2;
  --info-bg: #ecfeff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 33, 70, .06), 0 4px 16px rgba(15, 33, 70, .05);
  --shadow-lg: 0 10px 40px rgba(15, 33, 70, .16);
  /* 侧栏宽度按「最长菜单名 + 左右留白」反推，不是拍脑袋取值：
     早先 248px 时中文菜单只占到 60% 宽，右侧空出一大片，看着既空又散。
     收窄到 224px 后文字基本铺满，同样的字号在视觉上会显得更大更饱满。 */
  --sidebar-w: 224px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: var(--primary); text-decoration: none; }

/* ============ 登录页 ============ */
.login-view { display: flex; height: 100vh; }
.login-brand {
  flex: 1.15; background: linear-gradient(150deg, #0f2146 0%, #1b3a6b 55%, #2563eb 130%);
  color: #fff; display: flex; align-items: center; justify-content: center; padding: 48px;
  position: relative; overflow: hidden;
}
.login-brand::after {
  content: ''; position: absolute; right: -140px; top: -140px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(201,162,39,.18), transparent 70%);
}
.login-brand-inner { position: relative; z-index: 1; max-width: 460px; }
.login-logo {
  width: 196px; height: 58px; border-radius: 0; background: none; box-shadow: none;
  display: flex; align-items: center; justify-content: center; margin-bottom: 26px;
}
.login-brand h1 { font-size: 30px; font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; }
.login-sub { color: rgba(255,255,255,.72); font-size: 15px; margin-bottom: 34px; letter-spacing: .5px; }
.login-features { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.login-features li { font-size: 14.5px; color: rgba(255,255,255,.9); display: flex; align-items: center; gap: 10px; }
.login-features span {
  width: 20px; height: 20px; border-radius: 50%; background: rgba(201,162,39,.25); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.login-panel { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 32px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--card); border-radius: 18px; padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}
.login-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-tip { color: var(--text-2); font-size: 13.5px; margin-bottom: 28px; }
.form-item { margin-bottom: 18px; }
.form-item label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); outline: none; transition: border .15s, box-shadow .15s; background: #fff;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-item textarea { resize: vertical; min-height: 72px; }
.login-error { background: var(--danger-bg); color: var(--danger); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.login-hint { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--border); }
.login-hint p { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.login-accounts { display: flex; flex-wrap: wrap; gap: 6px; }
.login-accounts span { font-size: 12px; background: var(--primary-light); color: var(--primary); padding: 4px 9px; border-radius: 20px; }
.login-footer { font-size: 11.5px; color: var(--text-3); margin-top: 18px; text-align: center; }

/* ============ 系统设置 ============ */
.settings-logo-row { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.settings-logo-preview { width: 130px; height: 130px; border: 1px dashed var(--border); border-radius: 14px; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 14px; }
.settings-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-text-preview { width: 58px; height: 58px; border-radius: 14px; background: var(--gold); color: #fff; font-size: 27px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.settings-logo-ops { flex: 1; min-width: 240px; }
.settings-tip { font-size: 12px; color: var(--text-3); margin-top: 10px; line-height: 1.5; }
.form-item input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.btn-wecom { background: #07c160; color: #fff; margin-top: 12px; }
.btn-wecom:hover { background: #06ad56; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { background: transparent; border: none; font-size: 20px; cursor: pointer; color: var(--text-2); padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--bg); }

/* ============ 主框架 ============ */
.app-view { display: flex; height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: linear-gradient(180deg, var(--nav-sidebar-top), var(--nav-sidebar-bottom)); color: #fff; display: flex; flex-direction: column;
  flex-shrink: 0; transition: margin-left .25s;
  /* 深色底上的浅色字：关掉次像素渲染，笔画立刻收干净，白字不会发糊发虚 */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* 侧栏顶部：布谷 LOGO 一行，系统名单独一行（上下结构）
   早先是「LOGO + 两行文字」左右并排，一行高度塞三行内容，挤成一团。 */
.sidebar-logo {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 14px 5px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo-icon {
  width: 112px; height: 30px; border-radius: 0; background: none;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-logo-name {
  font-size: 13px; font-weight: 700; letter-spacing: .3px; color: #fff;
  line-height: 1.2; white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
/* 导航区：滚动条彻底去掉（滚轮 / 触控仍可滚），是否还能往下滚交给底部渐隐提示 */
.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 3px 8px 4px;
  scrollbar-width: none; -ms-overflow-style: none;   /* 不占槽宽，Windows 上也不会挤窄菜单 */
}
.sidebar-nav::-webkit-scrollbar { width: 0; height: 0; }
/* 只在「确实还有内容没露出来」时，给底部 22px 加一层渐隐（滚到底自动取消）：
   比裸露滚动条体面，又不至于让人以为菜单就到这里为止 */
.sidebar-nav.can-scroll {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent 100%);
}
/* 分组：一级标题 15px 半粗，子项 14px 常规 —— 靠字重 + 亮度 + 缩进拉开层级，
   不靠「一级加粗到 700」：深色底上 700 会发闷，字反而更糊 */
.nav-group { margin-bottom: 0; }
/* 模块之间用留白分开，比加分割线干净：每组自成一块，不用靠线去切 */
.nav-group + .nav-group { margin-top: 11px; }
.nav-group-title {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 8px 3px 2px; border-radius: 8px;
  font-size: 15.5px; font-weight: 600; letter-spacing: .3px; line-height: 1.3;
  color: rgba(255,255,255,.95); cursor: pointer; user-select: none;
  transition: color .15s, background .15s;
}
/* 一级标题左侧的小色条＝章节标记：一眼看出「这是新的一大块」，
   比整行加底色干净，也不会和二级的选中高亮抢注意力 */
.nav-group-title::before {
  content: ''; width: 4px; height: 13px; border-radius: 2px; flex-shrink: 0;
  background: rgba(255,255,255,.26); transition: background .15s, height .15s;
}
/* 当前页所在的模块，色条亮成主色 —— 滚动或切换后都能立刻定位自己在哪一块 */
.nav-group.has-active > .nav-group-title::before { background: #60a5fa; height: 17px; box-shadow: 0 0 8px rgba(96,165,250,.55); }
.nav-group-title:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-group-title:focus-visible { outline: 1px solid rgba(255,255,255,.3); outline-offset: -1px; }
/* 折叠箭头放右侧（左侧留给章节色条），收起的组箭头朝右 */
.ngt-caret {
  order: 3; margin-left: auto; width: 13px; flex-shrink: 0;
  font-size: 12px; line-height: 1; text-align: center;
  color: rgba(255,255,255,.55); transition: transform .18s ease, color .15s;
}
.nav-group-title:hover .ngt-caret { color: rgba(255,255,255,.85); }
.nav-group.collapsed .ngt-caret { transform: rotate(-90deg); }
.ngt-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ngt-count {
  order: 2; margin-left: 6px; margin-right: 2px; display: none;
  font-size: 11px; font-weight: 600; line-height: 15px;
  padding: 0 6px; border-radius: 20px; color: rgba(255,255,255,.34); background: rgba(255,255,255,.07);
}
.nav-group.collapsed .ngt-count { display: inline-block; }
/* 只有一条的分组不折叠：箭头留位置但不显示，标题仍是一级样式 */
.nav-group-single .nav-group-title { cursor: default; }
.nav-group-single .ngt-caret { visibility: hidden; }

/* 折叠动画：grid-template-rows 1fr → 0fr，比 display:none 平滑，也没有 max-height 的跳变 */
.nav-group-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .2s ease; }
.nav-group.collapsed .nav-group-items { grid-template-rows: 0fr; }
.ngt-inner { min-height: 0; overflow: hidden; position: relative; padding-top: 2px; }
.ngt-inner::before {
  content: ''; position: absolute; left: 16px; top: 4px; bottom: 7px; width: 1px;
  background: rgba(255,255,255,.13); border-radius: 1px;
}

.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 19px; border-radius: 8px;
  color: rgba(255,255,255,.66); cursor: pointer; font-size: 14px; line-height: 1.35;
  transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, var(--primary), #3b82f6); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.4); }
/* 图标：单色线条，默认比文字再灰一档，选中/悬停时跟文字一起提亮 */
.nav-item .nav-icon {
  width: 19px; height: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.52); transition: color .15s;
}
.nav-item .nav-icon svg { width: 17px; height: 17px; display: block; }
.nav-item:hover .nav-icon { color: rgba(255,255,255,.95); }
.nav-item.active .nav-icon { color: #fff; }
.nav-item .nav-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 10px; }
/* 常驻动作（退出登录）：固定在最下方，不参与任何分组折叠 */
/* 「退出登录」跟在分组项之后、但不在可折叠区内：组收起时它仍留在原位，
   也不做吸底——吸底会在顶部把上面一条菜单压住，看起来像那一组是空的 */
.nav-group > .nav-item-danger { margin-top: 10px; }
/* 左下角只回答「我是谁」：一行淡字，不可点、不改密、不弹窗 */
.sidebar-footer { padding: 10px 14px 12px; }
.sidebar-user {
  display: flex; align-items: baseline; gap: 5px; min-width: 0;
  cursor: default; pointer-events: none; user-select: none;
}
.sidebar-user .u-name {
  font-size: 12px; font-weight: 500; line-height: 1.35; color: rgba(255,255,255,.56);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .u-acct {
  font-size: 12px; line-height: 1.35; color: rgba(255,255,255,.38);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 退出登录：菜单里的一条，hover 才显红，平时和普通条目同权重，不抢视线 */
.nav-item-danger { color: rgba(255,255,255,.58); margin-top: 3px; }
.nav-item-danger .nav-icon { opacity: .7; }
.nav-item-danger:hover { background: rgba(220,38,38,.22); color: #fecaca; }
.nav-item-danger:hover .nav-icon { opacity: 1; }
/* 屏高不足时自动收一档：字号一点不动，只收行距和组距 ——
   菜单涨到 25 项之后（新增「对接配置」），950 高的窗口用舒展档会把
   「风险与系统」整组挤出可视区，用户以为没有这些功能。阈值提到 1020。 */
@media (max-height: 1020px) {
  .sidebar-nav { padding: 2px 8px 3px; }
  .nav-group + .nav-group { margin-top: 5px; }
  .nav-group-title { padding: 1px 8px 1px 2px; }
  .ngt-inner { padding-top: 2px; }
  .nav-item { padding: 2px 10px 2px 19px; line-height: 1.22; }
}
@media (max-height: 920px) {
  .sidebar-nav { padding: 1px 8px 2px; }
  .nav-group + .nav-group { margin-top: 4px; }
  .nav-item { padding: 1px 10px 1px 19px; line-height: 1.16; }
}
/* 手机端悬浮 ☰：桌面端侧栏常驻，不需要折叠按钮 */
.sidebar-fab {
  display: none; position: fixed; top: 10px; left: 10px; z-index: 60;
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text-2); font-size: 17px; line-height: 1;
  box-shadow: var(--shadow); cursor: pointer;
}
.sidebar-mask { display: none; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
/* 顶栏已移除：正文直接顶到窗口上沿，较原先多出 58px 可视高度 */
/* 底部留出 84px：右下角「系统入口胶囊」是浮层，不留白会盖住表格最后一行 */
.content { flex: 1; overflow-y: auto; padding: 18px 24px 84px; min-width: 0; }
/* 经营驾驶舱：现场重算中 → 工具条(数据来源+重新生成) + 整屏 iframe 实时报表；右下角跨系统胶囊让位给报表自带导航 */
.content.content-bi { padding: 0 !important; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.bi-bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px; padding: 7px 20px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.bi-bar-l { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.bi-bar-l b { color: var(--text-1); font-family: var(--mono, monospace); }
.bi-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.bi-dot.stale { background: #ea580c; box-shadow: 0 0 0 3px #ffedd5; }
.bi-bar-sep { color: #cbd5e1; }
.bi-regen { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--primary); color: #fff; background: var(--primary); border-radius: 6px;
  padding: 7px 14px; font-size: 12.5px; font-weight: 600; transition: .15s; }
.bi-regen:hover { filter: brightness(1.08); }
.bi-regen:disabled { opacity: .55; cursor: not-allowed; }
.bi-regen .bi-rspin { width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff; border-radius: 50%; animation: biSpin .7s linear infinite; }
.bi-iframe { display: block; flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #fff; }
.bi-page .bugu-dock { display: none !important; }
/* 现场计算进度与降级提示 */
.bi-loading { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; gap: 9px; color: var(--text-2); text-align: center; padding: 24px; }
.bi-spin { width: 38px; height: 38px; border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: biSpin .8s linear infinite; margin-bottom: 8px; }
@keyframes biSpin { to { transform: rotate(360deg); } }
.bi-loading-t { font-size: 15px; font-weight: 700; color: var(--text-1); }
.bi-loading-s { font-size: 12.5px; color: var(--text-3); line-height: 1.7; max-width: 420px; }
.bi-error-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--danger-bg);
  color: var(--danger); font-size: 21px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; margin-bottom: 8px; }
.bi-warn { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 7px 20px;
  background: #fff7ed; border-bottom: 1px solid #fdba74; color: #9a3412; font-size: 12.5px; }
.bi-warn button { margin-left: auto; border: 0; background: #9a3412; color: #fff; border-radius: 4px;
  padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.content-wrap { flex: 1; display: flex; gap: 20px; overflow: hidden; }
.right-rail { width: 280px; flex-shrink: 0; overflow-y: auto; padding: 18px 24px 24px 0; }

/* 右侧快捷入口面板 */
.rail-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; position: sticky; top: 0;
}
.rail-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.rail-title .dot { width: 4px; height: 15px; background: var(--primary); border-radius: 2px; }
.rail-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); margin-bottom: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; transition: all .15s;
}
.rail-link:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); transform: translateX(2px); }
.rail-link .rl-icon { font-size: 18px; }
.rail-link .rl-arrow { margin-left: auto; color: var(--text-3); font-size: 13px; }
.rail-divider { height: 1px; background: var(--border); margin: 14px 0; }
.rail-tip { font-size: 12px; color: var(--text-3); line-height: 1.6; margin-bottom: 12px; }
.rail-copy { width: 100%; }
/* 窄屏（含 WorkBuddy 内嵌预览）下不再隐藏，改为纵向堆叠在内容下方，保证入口始终可达 */
@media (max-width: 1080px) {
  .content-wrap { flex-direction: column; overflow: auto; }
  .right-rail { width: 100%; padding: 0 24px 24px; }
}

/* ============ 通用组件 ============ */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-head h2 { font-size: 20px; font-weight: 700; }
.page-head .sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.card-title .dot { width: 4px; height: 16px; background: var(--primary); border-radius: 2px; }

/* ============ AI 经营助手 ============ */
.ai-card { max-width: 920px; }
.ai-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ai-cloud-tag { font-size: 12px; color: var(--text-2); background: #eef2ff; padding: 4px 10px; border-radius: 999px; }
.ai-chat { border: 1px solid var(--border); border-radius: 12px; padding: 14px; height: 360px; overflow-y: auto; background: #fafbff; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ai-msg { max-width: 86%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.ai-bot { align-self: flex-start; background: #fff; border: 1px solid var(--border); color: var(--text-1); }
.ai-user { align-self: flex-end; background: var(--primary); color: #fff; }
.ai-input-row { display: flex; gap: 10px; align-items: flex-end; }
.ai-input { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical; }
.ai-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.ai-hint { margin-top: 10px; font-size: 13px; color: var(--text-2); min-height: 18px; }

/* AI 未开通时的说明条：告诉人怎么开，而不是只丢一句报错 */
.ai-banner {
  background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px;
}
.ai-banner-title { font-size: 14px; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.ai-banner-body { font-size: 13px; color: #78350f; line-height: 1.8; }
.ai-banner-body b { color: #92400e; }
.ai-banner-actions { margin-top: 10px; }

/* 统计卡 */
/* 指标条（2026-11-26 收紧）
   原来 4 列 × 110px 高，6 个指标要占两行、把表格挤到折线以下。
   现在按容器宽度自动铺满一行、卡高压到 60px 左右：6 个指标一行看完，首屏还能露出 6-7 行明细。
   为什么用 auto-fit：各页指标数量不同（4/5/6 个），写死列数总会留空或换行。 */
.stat-grid { display: flex; flex-wrap: nowrap; gap: 8px; margin-bottom: 14px; }
.stat-card {
  flex: 1 1 0; min-width: 0;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 9px 10px; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto;
  column-gap: 8px; align-items: center; row-gap: 1px;
}
.stat-card .stat-icon {
  grid-column: 1; grid-row: 1 / span 2;
  width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.stat-card .stat-label { grid-column: 2; grid-row: 1; color: var(--text-2); font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .stat-value { grid-column: 2; grid-row: 2; font-size: 17.5px; font-weight: 700; line-height: 1.15; letter-spacing: -.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .stat-trend { font-size: 11px; color: var(--text-3); margin-top: 2px; grid-column: 2; }
/* 可下钻的指标卡：给一个"能点"的视觉信号，否则用户不会想到去点数字 */
.stat-card.stat-clickable { cursor: pointer; transition: transform .16s, box-shadow .16s; }
.stat-card.stat-clickable:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.12); }
.stat-card.stat-clickable:hover .stat-more { opacity: 1; transform: translateX(0); }
.stat-card .stat-more {
  position: absolute; right: 10px; bottom: 7px; font-size: 10.5px; color: var(--primary);
  opacity: 0; transform: translateX(4px); transition: all .16s; font-weight: 600;
}

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--text-2); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border); background: #fafbfd; white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid #f1f3f7; font-size: 13.5px; color: var(--text); }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl tbody tr:last-child td { border-bottom: none; }

/* 徽章 */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-amber { background: var(--warning-bg); color: var(--warning); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-gray { background: #f1f5f9; color: var(--text-2); }
.badge-gold { background: var(--gold-light); color: #a17c10; }
.badge-navy { background: #eef2ff; color: #4f46e5; }

.level-A { background: var(--success-bg); color: var(--success); }
.level-B { background: var(--primary-light); color: var(--primary); }
.level-C { background: var(--warning-bg); color: var(--warning); }
.level-D, .level-淘汰 { background: var(--danger-bg); color: var(--danger); }
.level-未评级 { background: #f1f5f9; color: var(--text-2); }
.level-战略 { background: var(--gold-light); color: #a17c10; }

/* 搜索栏 */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13.5px; outline: none; background: #fff;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--primary); }
.toolbar input { min-width: 220px; }

/* 图表下钻后的生效条件条：让「为什么只剩这几家」一眼可见 */
.sup-filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -6px 0 14px; padding: 10px 14px;
  background: var(--primary-light, #eff6ff); border: 1px solid rgba(37,99,235,.18);
  border-left: 3px solid var(--primary); border-radius: var(--radius-sm);
}
.sup-filter-txt { font-size: 13px; color: #1e40af; font-weight: 500; }
.sup-filter-count { font-size: 12.5px; color: var(--text-2); background: #fff; border: 1px solid rgba(37,99,235,.2); padding: 2px 9px; border-radius: 20px; }
.sup-filter-bar .btn { margin-left: auto; }

/* 详情 */
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px; }
.detail-item .k { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
.detail-item .v { font-size: 14px; color: var(--text); font-weight: 500; word-break: break-all; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* 弹窗 */
.modal-root {
  position: fixed; inset: 0; background: rgba(15,33,70,.45); display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-wide { max-width: 880px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-3); cursor: pointer; line-height: 1; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* toast */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff;
  padding: 11px 22px; border-radius: 10px; font-size: 14px; z-index: 200; box-shadow: var(--shadow-lg);
  animation: slideDown .25s;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideDown { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 空状态 */
.empty { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty .empty-icon { font-size: 42px; margin-bottom: 12px; opacity: .5; }

/* 进度条 */
.progress { height: 8px; background: #eef1f6; border-radius: 10px; overflow: hidden; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--primary), #60a5fa); border-radius: 10px; transition: width .3s; }

/* 图表条 */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-row .bar-label { width: 72px; font-size: 13px; color: var(--text-2); flex-shrink: 0; text-align: right; }
.bar-row .bar-track { flex: 1; height: 22px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #60a5fa); border-radius: 6px; display: flex; align-items: center; padding-left: 8px; color: #fff; font-size: 11.5px; min-width: 26px; }
.bar-row .bar-val { width: 48px; font-size: 13px; color: var(--text); font-weight: 600; }

/* 双栏 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* 时间轴 */
.timeline { list-style: none; padding-left: 4px; }
.timeline li { position: relative; padding-left: 22px; padding-bottom: 18px; border-left: 2px solid var(--border); margin-left: 8px; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary-light); }
.timeline .tl-status { font-weight: 600; font-size: 13.5px; }
.timeline .tl-remark { color: var(--text-2); font-size: 12.5px; margin-top: 3px; }
.timeline .tl-time { color: var(--text-3); font-size: 11.5px; margin-top: 2px; }

/* ============ 资质证照图片上传 ============ */
.qual-section { margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--border); }
.qual-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.qual-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fafbfd; }
.qual-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; cursor: zoom-in; border: 1px solid var(--border); flex-shrink: 0; background: #fff; }
.qual-thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 24px; }
.qual-info { flex: 1; min-width: 0; }
.qual-fname { color: var(--text-2); font-size: 12px; margin-left: 6px; word-break: break-all; }
.qual-expire { color: var(--text-3); font-size: 11.5px; margin-top: 4px; }
.qual-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ 高级 BI 看板 ============ */
.bi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.bi-head h2 { font-size: 21px; font-weight: 700; letter-spacing: .3px; }
.bi-head .sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.bi-date { font-size: 12.5px; color: var(--text-3); background: var(--card); padding: 7px 14px; border-radius: 20px; box-shadow: var(--shadow); }

.bi-kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 16px; }

/* 首页待办小窗口：一行铺满，点一项直达对应页面 */
.bi-todo-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.bi-todo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.bi-todo-head b { font-size: 15px; color: var(--text); }
.bi-todo-sub { margin-left: 10px; font-size: 12px; color: var(--text-3); }
.bi-todo-all { font-size: 12px; color: #2563eb; cursor: pointer; white-space: nowrap; }
.bi-todo-all:hover { text-decoration: underline; }
.bi-todo-list { display: flex; flex-wrap: nowrap; gap: 10px; }
.bi-todo-item { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; border-left: 3px solid var(--border); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.bi-todo-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(15,23,42,.09); }
.bi-todo-item.tone-red { border-left-color: #dc2626; background: #fef2f2; }
.bi-todo-item.tone-orange { border-left-color: #d97706; background: #fffbeb; }
.bi-todo-item.tone-blue { border-left-color: #2563eb; background: #eff6ff; }
.bi-todo-item.tone-green { border-left-color: #16a34a; background: #f0fdf4; }
.bi-todo-ico { font-size: 15px; line-height: 1; flex: 0 0 auto; }
.bi-todo-label { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-todo-num { margin-left: auto; font-size: 17px; color: #94a3b8; flex: 0 0 auto; }
.bi-todo-num.hot { color: #dc2626; }
.bi-todo-empty { font-size: 12px; color: var(--text-3); padding: 10px 0; }
.bi-kpi {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
  position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s;
}
.bi-kpi:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(15, 33, 70, .1); }
/* 能点进明细的 KPI：给光标和小箭头，否则没人知道这里可以点 */
.bi-kpi.is-link { cursor: pointer; }
.bi-kpi.is-link:hover { border-color: #c7d7fb; }
.bi-kpi.is-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bi-kpi-go { margin-left: auto; font-size: 18px; line-height: 1; color: var(--text-3); opacity: .5; transition: all .16s; }
.bi-kpi.is-link:hover .bi-kpi-go { opacity: 1; color: var(--primary); transform: translateX(2px); }
.bi-kpi::before { content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--primary); opacity: .7; }
.bi-kpi-top { display: flex; align-items: center; gap: 9px; }
.bi-kpi-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.bi-kpi-label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
/* 数字按长度分档：6 卡横排时单卡只有 150px 左右，长金额必须自己收字号，
   否则 ¥34,007,000 这种会顶出卡片（原来的实际问题）。 */
.bi-kpi-value { font-size: 26px; font-weight: 800; margin-top: 8px; letter-spacing: -.5px; white-space: nowrap; }
.bi-kpi-value.is-long { font-size: 21px; letter-spacing: -.6px; }
.bi-kpi-value.is-xlong { font-size: 17.5px; letter-spacing: -.8px; }
.bi-kpi-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.bi-kpi-bar { height: 5px; background: #eef1f6; border-radius: 10px; margin-top: 12px; overflow: hidden; }
.bi-kpi-bar-fill { height: 100%; border-radius: 10px; transition: width .4s; }

.bi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.bi-span-2 { grid-column: span 2; }
.bi-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.bi-card-head { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.bi-card-head .dot { width: 4px; height: 16px; background: var(--primary); border-radius: 2px; }
.bi-card-head .bi-sub { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: auto; }
.bi-chart { width: 100%; }

.bi-alert-list { display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; }
.bi-alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #f1f3f7; border-radius: 10px; background: #fafbfd; }
.bi-alert-body { flex: 1; min-width: 0; }
.bi-alert-content { font-size: 13px; color: var(--text); line-height: 1.45; }
.bi-alert-supplier { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
/* 可点的预警：给足视觉信号，否则没人会想到去点一条文字 */
.bi-alert-link { cursor: pointer; position: relative; transition: all .16s; }
.bi-alert-link:hover { background: #fff; border-color: #c7d7fb; box-shadow: 0 6px 16px rgba(37,99,235,.10); transform: translateX(2px); }
.bi-alert-go { font-size: 11.5px; color: var(--primary); font-weight: 600; white-space: nowrap; opacity: .45; transition: opacity .16s; align-self: center; }
.bi-alert-link:hover .bi-alert-go { opacity: 1; }
@media (hover: none) { .bi-alert-go { opacity: .8; } }

/* 响应式 */
@media (max-width: 1100px) {
  .bi-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .bi-todo-list { flex-wrap: wrap; }
  .bi-todo-item { flex: 0 0 calc((100% - 20px) / 3); }
  .bi-grid { grid-template-columns: 1fr; }
  .bi-span-2 { grid-column: span 1; }
  .stat-grid { gap: 6px; }
  .stat-card { padding: 8px; grid-template-columns: 22px 1fr; column-gap: 6px; }
  .stat-card .stat-icon { width: 22px; height: 22px; font-size: 12px; border-radius: 7px; }
  .stat-card .stat-label { font-size: 10.5px; }
  .stat-card .stat-value { font-size: 15.5px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
/* 窄屏（≤1180）：8 个指标仍要一行放完，靠缩图标与字号换宽度，
   不允许换成两行——换行后最后一行只剩一张卡，视觉上像没收尾。 */
@media (max-width: 1180px) {
  .stat-grid { gap: 5px; }
  .stat-card { padding: 7px 8px; grid-template-columns: 20px 1fr; column-gap: 5px; border-radius: 10px; }
  .stat-card .stat-icon { width: 20px; height: 20px; font-size: 11px; border-radius: 6px; }
  .stat-card .stat-label { font-size: 10px; letter-spacing: -.2px; }
  .stat-card .stat-value { font-size: 15px; }
  .stat-card .stat-more { display: none; }
}
@media (max-width: 720px) {
  .bi-todo-item { flex: 0 0 calc((100% - 10px) / 2); }
  .sidebar { position: fixed; z-index: 50; height: 100%; margin-left: calc(-1 * var(--sidebar-w)); box-shadow: 0 0 40px rgba(15, 33, 70, .3); }
  .sidebar.open { margin-left: 0; }
  /* 桌面端没有折叠按钮，手机端才出现悬浮 ☰；侧栏打开时换成遮罩，点空白处收起 */
  .sidebar-fab { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar.open ~ .sidebar-mask { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(15, 33, 70, .45); }
  .sidebar.open ~ .main .sidebar-fab { display: none; }
  .content { padding-top: 56px; }
  .login-brand { display: none; }
  /* 驾驶舱工具条在内容区最顶部，会被固定定位的 ☰ 按钮压住，左侧让出 56px */
  .content-bi .bi-bar, .content-bi .bi-warn { padding-left: 56px; }
  .bi-kpi-grid { grid-template-columns: 1fr 1fr; }
  /* 手机端：一行放不下 8 个指标，允许换行但保持每行等宽 */
  .stat-grid { flex-wrap: wrap; }
  .stat-card { flex: 1 1 46%; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ============ 供应链全流程节点图（业务节点进展图） ============ */
.pipe-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.pipe-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.pipe-sub { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.pipe-summary { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.chip { font-size: 12px; padding: 5px 12px; border-radius: 20px; background: var(--bg); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--success-bg); color: var(--success); }
.chip.danger { background: var(--danger-bg); color: var(--danger); }
.chip.warn { background: var(--warning-bg); color: var(--warning); }

.pipe-flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 6px 2px 10px; }
.pipe-node {
  flex: 1 1 0; min-width: 96px; position: relative;
  background: var(--bg); border: 1px solid var(--border); border-top: 3px solid var(--border);
  border-radius: 12px; padding: 14px 8px 12px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.pipe-node:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.pipe-node.level-ok { border-top-color: var(--success); }
.pipe-node.level-idle { border-top-color: var(--text-3); }
.pipe-node.level-warn { border-top-color: var(--warning); background: var(--warning-bg); }
.pipe-node.level-danger { border-top-color: var(--danger); background: var(--danger-bg); }
.pipe-node.is-bottleneck { box-shadow: 0 0 0 2px var(--danger); }
.pipe-badge { position: absolute; top: -11px; right: -6px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; box-shadow: 0 2px 6px rgba(220,38,38,.4); }
.pipe-arrow { flex: 0 0 auto; display: flex; align-items: center; color: var(--text-3); font-size: 22px; padding: 0 1px; font-weight: 700; }
.pipe-icon { font-size: 22px; line-height: 1; }
.pipe-name { font-size: 13px; font-weight: 600; color: var(--text); }
.pipe-count { font-size: 21px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.pipe-node.level-danger .pipe-count { color: var(--danger); }
.pipe-node.level-warn .pipe-count { color: var(--warning); }
.pipe-node.level-idle .pipe-count { color: var(--text-3); }
.pipe-meta { font-size: 11px; color: var(--text-3); }
.pipe-urge {
  margin-top: 8px; width: 100%; padding: 6px 0; border: none; border-radius: 8px; cursor: pointer;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 600; transition: all .15s;
}
.pipe-urge:hover { background: #c0392b; transform: translateY(-1px); }
.pipe-urge:disabled { opacity: .6; cursor: default; }
.pipe-foot { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-3); }

/* 登录密码框：显示/隐藏切换（浏览器自动填充旧密码是登录失败头号原因） */
.pwd-wrap{position:relative}
.pwd-wrap input{width:100%;padding-right:56px}
.pwd-eye{position:absolute;right:12px;top:50%;transform:translateY(-50%);
  font-size:12px;color:#2563eb;cursor:pointer;user-select:none;font-weight:600}
.pwd-eye:hover{color:#1d4ed8}
.pwd-note{font-size:11.5px;color:#94a3b8;margin-top:5px}

/* 演示账号一键登录 */
.demo-acc{cursor:pointer;transition:all .16s ease}
.demo-acc:hover{background:#eff6ff;color:#1d4ed8;border-color:#2563eb}

/* ---------- 订单留言板（2026-11-26） ---------- */
.ord-chat-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #64748b; padding: 10px 12px; background: #f8fafc; border-radius: 8px; margin-bottom: 12px; }
.ord-chat-meta b { color: #0f172a; }
.ord-chat { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 10px; }
.ord-msg { max-width: 78%; padding: 9px 12px; border-radius: 10px; background: #f1f5f9; }
.ord-msg-buyer { align-self: flex-start; background: #eff6ff; border: 1px solid #dbeafe; }
.ord-msg-supplier { align-self: flex-end; background: #ecfdf5; border: 1px solid #d1fae5; }
.ord-msg-head { font-size: 11.5px; color: #64748b; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.ord-msg-time { color: #94a3b8; }
.ord-msg-body { font-size: 13px; color: #0f172a; line-height: 1.6; white-space: pre-wrap; }
.ord-chat-input { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid #eef2f7; }
.ord-chat-input input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }

/* ============================ 供应商档案表 ============================
   原来只有 7 列且不定宽，供应商名称那列被撑得很宽，中间留一大片空白。
   改成定宽 + 两行信息（主信息 + 灰色副信息），一屏能看到 8-9 行，
   信息量也从 4 项增到 7 项（行业、主营、所在地、联系人、成交额、供货数）。 */
.tbl-suppliers { table-layout: fixed; }
.tbl-suppliers th, .tbl-suppliers td { padding: 9px 10px; vertical-align: middle; }
.tbl-suppliers td { vertical-align: middle; }
.tbl-suppliers .sp-name strong { font-size: 13px; color: var(--text-1); display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-suppliers .sp-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-suppliers .sp-ind span { font-size: 12.5px; white-space: nowrap; }
.tbl-suppliers .sp-region { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-suppliers .sp-contact { font-size: 12.5px; white-space: nowrap; }
.tbl-suppliers .sp-amount { font-weight: 700; color: var(--text-1); white-space: nowrap; }
.tbl-suppliers .sp-ops { white-space: nowrap; }
.tbl-suppliers .sp-ops .btn-sm { padding: 3px 7px; font-size: 11.5px; }
.tbl-suppliers tbody tr:hover td { background: #f8fbff; }
/* 列宽集中在这里管：定宽 + 按断点重排，避免用内联宽度后被挤成一条细缝 */
.tbl-suppliers .c1 { width: 21%; }
.tbl-suppliers .c2 { width: 20%; }
.tbl-suppliers .c3 { width: 10%; }
.tbl-suppliers .c4 { width: 11%; }
.tbl-suppliers .c5 { width: 7%; }
.tbl-suppliers .c6 { width: 8%; }
.tbl-suppliers .c7 { width: 12%; }
.tbl-suppliers .c8 { width: 11%; }

@media (max-width: 1280px) {
  /* 1280：先收「所在地」（详情里能看到）。注意只把列宽压到 0 并隐藏单元格内容，
     不能用 display:none —— 单元格一消失，表头和数据就会错位一格。 */
  .tbl-suppliers .c3 { width: 0; }
  .tbl-suppliers th:nth-child(3), .tbl-suppliers td:nth-child(3) { padding-left: 0; padding-right: 0; border: 0; }
  .tbl-suppliers th:nth-child(3) { font-size: 0; color: transparent; }
  .tbl-suppliers td.sp-region span { display: none; }
  .tbl-suppliers .c1 { width: 23%; }
  .tbl-suppliers .c2 { width: 22%; }
  .tbl-suppliers .c4 { width: 13%; }
  .tbl-suppliers .c5 { width: 8%; }
  .tbl-suppliers .c6 { width: 9%; }
  .tbl-suppliers .c7 { width: 13%; }
  .tbl-suppliers .c8 { width: 12%; }
}
@media (max-width: 1080px) {
  /* 1080 及以下：连「联系人」也收起（详情页有），保证成交金额与操作按钮不被压扁 */
  .tbl-suppliers .c4 { width: 0; }
  .tbl-suppliers th:nth-child(4), .tbl-suppliers td:nth-child(4) { padding-left: 0; padding-right: 0; border: 0; }
  .tbl-suppliers th:nth-child(4) { font-size: 0; color: transparent; }
  .tbl-suppliers td.sp-contact span, .tbl-suppliers td.sp-contact .sp-sub { display: none; }
  .tbl-suppliers .c1 { width: 26%; }
  .tbl-suppliers .c2 { width: 23%; }
  .tbl-suppliers .c5 { width: 11%; }
  .tbl-suppliers .c6 { width: 10%; }
  .tbl-suppliers .c7 { width: 14%; }
  .tbl-suppliers .c8 { width: 16%; }
}

/* 用户与权限：口令找回通道状态条（邮件通道 / 未绑邮箱账号 / 管理员审批） */
.pwd-channel { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pwd-ch { flex: 1 1 220px; min-width: 0; display: flex; gap: 10px; align-items: flex-start;
  background: #f8fafc; border: 1px solid #eef2f7; border-left: 3px solid #cbd5e1;
  border-radius: 10px; padding: 10px 12px; }
.pwd-ch.ok { border-left-color: #16a34a; background: #f6fdf9; }
.pwd-ch.warn { border-left-color: #f59e0b; background: #fffdf5; }
.pwd-ch-ico { font-size: 16px; line-height: 1.2; }
.pwd-ch b { font-size: 12.5px; color: var(--text-1); }
.pwd-ch-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }

/* 新增物料：合格供应商多选（勾选后填配额，保存时按比例归一到 100%）
   ⚠️ 必须带 .mt-sup-list 前缀：全局 `.form-item input { width:100% }` 的优先级比单纯
   `.mt-sup-quota` 高，否则配额框会撑成整行、每行挤成两行显示。 */
.mt-sup-hint { font-size: 11.5px; font-weight: 500; color: var(--primary); margin-left: 6px; }
.mt-sup-list { max-height: 246px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px;
  padding: 4px; background: #fff; }
.mt-sup-list .mt-sup-row { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 7px;
  font-size: 13px; cursor: pointer; }
.mt-sup-list .mt-sup-row:hover { background: #f6f9ff; }
.mt-sup-list .mt-sup-row input[type="checkbox"] { flex: 0 0 auto; width: 14px; height: 14px; margin: 0; cursor: pointer; }
.mt-sup-list .mt-sup-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-1); }
.mt-sup-list .mt-sup-ind { flex: 0 0 auto; max-width: 88px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 11.5px; color: var(--text-3); }
.mt-sup-list .mt-sup-quota { flex: 0 0 64px; width: 64px; min-width: 0; padding: 3px 6px; font-size: 12px;
  text-align: right; border: 1px solid var(--border); border-radius: 6px; }
.mt-sup-list .mt-sup-quota:disabled { background: #f8fafc; color: #cbd5e1; }
.mt-sup-tip { font-size: 11.5px; color: var(--text-3); line-height: 1.55; margin-top: 6px; }

/* ---------- 物料品类：供应商名单可点开（2026-12-01） ---------- */
.mt-cnt { border: 0; cursor: pointer; font-family: inherit; font-size: 12px; line-height: 1;
  padding: 4px 9px; display: inline-flex; align-items: center; gap: 3px; transition: .15s; }
.mt-cnt:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(15,23,42,.12); }
.mt-cnt-i { font-size: 13px; opacity: .65; font-weight: 700; }
.mt-sup-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 9px; background: #f6f8fb; font-size: 13px; margin-bottom: 12px; }
.mt-sup-sum { margin-left: auto; color: var(--text-2); font-size: 12.5px; }
.mt-sup-sum b { color: #0f172a; font-size: 14px; }
