:root {
  --ink: #0F2438;
  --ink-2: #1B3A56;
  --ink-3: #2C5273;
  --gold: #C8912F;
  --gold-2: #E8B45C;
  --gold-bg: #FBF3E4;
  --bg: #F4F6F9;
  --card: #ffffff;
  --line: #E3E8EF;
  --line-2: #EDF1F6;
  --text: #1C2B3A;
  --muted: #6B7C8F;
  --ok: #2E7D5B;
  --ok-bg: #E7F3ED;
  --warn: #B7791F;
  --warn-bg: #FDF3E3;
  --danger: #C0392B;
  --danger-bg: #FBECEA;
  --info: #2C5273;
  --info-bg: #EAF1F8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 36, 56, .06), 0 6px 20px rgba(15, 36, 56, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--ink-3); }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #0F2438 0%, #16314B 55%, #1D3E5C 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 14px;
  padding: 30px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand .mark {
  width: 46px; height: 46px; margin: 0 auto 12px;
  border-radius: 10px; background: var(--ink);
  color: var(--gold-2); font-size: 20px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
}
.login-brand h1 { font-size: 19px; font-weight: 500; margin: 0 0 4px; color: var(--ink); }
.login-brand p { font-size: 12.5px; color: var(--muted); margin: 0; }
.seg {
  display: flex; background: var(--bg); border-radius: 8px;
  padding: 3px; margin-bottom: 18px;
}
.seg button {
  flex: 1; border: 0; background: transparent; padding: 8px 4px;
  font-size: 13px; color: var(--muted); border-radius: 6px;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.seg button.active { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(15,36,56,.1); }

/* 产品档案快捷筛选按钮（刘总 2026-10-18：筛选条件用按钮不用标签，与工作台 wb-sel 同一语言） */
.qf { padding: 5px 16px; border-radius: 16px; border: 1px solid #C7D2DF; background: #EDF1F7; color: #44546A; font-size: 12.5px; cursor: pointer; line-height: 1.5; }
.qf:hover { background: #E1E8F1; color: var(--ink-2); }
.qf.on { background: var(--ink-2); color: #fff; border-color: var(--ink-2); box-shadow: 0 1px 3px rgba(27,58,86,.25); }
.qf-sub { display: inline-flex; gap: 6px; margin-left: 8px; padding-left: 10px; border-left: 1px dashed #B9C6D4; }
/* 订单派工：未派红、部分派橙红均可继续点；全部派完浅绿灰禁用。按钮列允许两行，不挤压订单表。 */
.order-dispatch { min-width: 68px; padding: 3px 9px; line-height: 1.2; white-space: normal; border: 0; color: #fff; }
.order-dispatch.pending { background: #C93B3B; }
.order-dispatch.partial { background: #C65D21; }
.order-dispatch.done, .order-dispatch:disabled { background: #E4EEE8; color: #52705E; border: 1px solid #CFDED4; cursor: default; opacity: 1; }
.order-dispatch.pending:disabled, .order-dispatch.partial:disabled { background: #E9E2E2; color: #8A6C6C; border: 1px solid #DED2D2; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
/* 85 条：括号说明收进悬停提示的标签——点状下划线＋help 光标，示意「鼠标放上来有说明」 */
.lab-tip { cursor: help; text-decoration: underline dotted var(--line); text-underline-offset: 3px; }
/* 86 条：报价分项行（大总成按 BOM 展开的元总成）——缩进浅底，└── 标记归属大行（横线加长一倍，刘总 2026-10-20） */
.qi-part-row { background: #f8fafc; border-radius: 8px; padding-left: 30px !important; position: relative; }
.qi-part-row::before { content: '└──'; position: absolute; left: 5px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; letter-spacing: -1px; }
/* 87 条（刘总 2026-10-14）：人机语言共识——系统自动带出/计算的值用品牌蓝 #0C447C，
   人手工输入的保持墨色。界线：只读锁定＝系统＝蓝；可编辑＝人负责＝黑。
   覆盖：报价/订单明细的只读带出（名/型号/参数/金额）、合计（fQTotal/fPoTotal）、
   readonly 输入框（编码/成本/联动单价）、disabled 的系统值控件
   （销售员自动带出、锁定客户、编辑态订单类型、登录用户名） */
.qi-ro:not(.dim), .ie-name, .ie-model, .ie-amt, #fQTotal, #fPoTotal { color: #0C447C; }
.input[readonly] { color: #0C447C !important; }
.input:disabled, .p-input:disabled, select.input:disabled { color: #0C447C; -webkit-text-fill-color: #0C447C; opacity: 1; }
/* 89 条：锁死的下拉（销售员等系统值）不显示 ▼ 箭头——不可选就不给可点的错觉 */
.picker:has(.p-input:disabled)::after { content: none; }
.input, select, textarea {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
  border: 1px solid #C2CEDD; border-radius: 8px; background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, select:focus, textarea:focus {
  border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(44, 82, 115, .1);
}
textarea { resize: vertical; min-height: 68px; }
.input-row { display: flex; gap: 10px; }
.input-row > * { flex: 1; min-width: 0; }
.input-with-btn { display: flex; gap: 8px; }
.input-with-btn .input { flex: 1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text); cursor: pointer;
  transition: .15s; white-space: nowrap; min-height: 40px;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #B8842A; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 32px; }
.btn-danger { color: var(--danger); border-color: #F0C9C4; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: var(--info-bg); }

/* ---------- 布局 ---------- */
.topbar {
  background: var(--ink); color: #fff;
  padding: 0 16px; height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.topbar .brand .mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--gold);
  color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.topbar .who { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #B9CADB; }
.topbar .who button {
  background: rgba(255,255,255,.1); border: 0; color: #DCE6F0;
  padding: 5px 10px; border-radius: 6px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.topbar .who button:hover { background: rgba(255,255,255,.2); }

.tabs {
  display: flex; gap: 2px; background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 0 8px; overflow-x: auto; position: sticky; top: 54px; z-index: 40;
  scrollbar-width: none; height: 47px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: flex; align-items: center; height: 47px; padding: 0 14px;
  font-size: 13.5px; color: var(--muted);
  text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent;
  transition: .15s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 500; }

main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }

/* ---------- 左侧导航布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidenav {
  width: 200px; flex: none; background: var(--ink); color: #C6D4E3;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 50;
}
.sn-brand { display: flex; align-items: center; gap: 10px; padding: 15px 16px 12px; color: #fff; font-size: 15px; font-weight: 600; }
.sn-brand .mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--gold);
  color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none;
}
.sn-nav { flex: 1; overflow-y: auto; padding: 2px 10px 12px; scrollbar-width: thin; }
.sn-gt { font-size: 11.5px; color: #7E93A9; padding: 13px 10px 5px; letter-spacing: 1px; }
.sn-nav a.sn-item {
  display: block; padding: 7.5px 10px; border-radius: 7px;
  color: #B9CADB; text-decoration: none; font-size: 13.5px; transition: .12s;
}
.sn-nav a.sn-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sn-nav a.sn-item.active { background: rgba(200,145,47,.2); color: #F5DEB3; font-weight: 500; box-shadow: inset 2.5px 0 0 var(--gold); }
.sn-nav a.sn-item.sn-home { margin-top: 2px; }
.sn-user {
  padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12.5px; color: #9FB3C8; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sn-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-user button {
  background: rgba(255,255,255,.1); border: 0; color: #DCE6F0; flex: none;
  padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.sn-user button:hover { background: rgba(255,255,255,.2); }
.layout main { flex: 1; min-width: 0; max-width: 1240px; width: 100%; margin: 0 auto; padding: 18px 22px 60px; }

/* ---------- 首页工作台（待办 + 快捷操作） ---------- */
.home-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; margin-bottom: 16px; }
.todo-list { display: flex; flex-direction: column; }
.todo-item {
  display: flex; align-items: center; gap: 13px; padding: 10px 6px;
  border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--text); border-radius: 6px;
}
.todo-item:last-child { border-bottom: 0; }
.todo-item:hover { background: var(--bg); }
.todo-num { min-width: 38px; text-align: center; font-size: 21px; font-weight: 600; color: var(--info); line-height: 1.1; }
.todo-num.urgent { color: var(--danger); }
.todo-main { flex: 1; min-width: 0; }
.todo-label { font-size: 13.5px; font-weight: 500; }
.todo-sub { font-size: 12px; color: var(--muted); }
.todo-go { color: var(--muted); font-size: 12.5px; flex: none; }
.todo-empty { padding: 26px 10px; text-align: center; color: var(--ok); font-size: 13.5px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 9px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 13px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 9px;
  cursor: pointer; font-family: inherit; text-align: left; transition: .15s;
}
.quick-btn:hover { border-color: var(--gold); background: var(--gold-bg); }
.quick-btn .qb-t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.quick-btn .qb-d { font-size: 12px; color: var(--muted); line-height: 1.4; }
@media (max-width: 980px) {
  .home-cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidenav { width: auto; height: auto; position: static; }
  .sn-nav { display: flex; overflow-x: auto; gap: 2px; padding: 4px 10px 8px; }
  .sn-gt { display: none; }
  .sn-nav a.sn-item { white-space: nowrap; }
  .layout main { padding: 14px 12px 60px; }
}
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h2 { font-size: 17px; font-weight: 500; margin: 0; color: var(--ink); }
.page-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.card-title {
  font-size: 14px; font-weight: 500; color: var(--ink);
  margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stat .value { font-size: 24px; font-weight: 500; color: var(--ink); line-height: 1.2; }
.stat .value small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.stat.gold { border-left: 3px solid var(--gold); }
.stat.warn { border-left: 3px solid var(--warn); }
.stat.ok { border-left: 3px solid var(--ok); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px;
  padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}

/* 桌面端：表头吸顶。当前布局＝左侧吸顶 sidenav + 主区随窗口滚动，**主区上方没有任何顶栏**
   （.topbar 是早期死代码，DOM 里不存在），所以吸顶 top 一律为 0——
   历史上按「顶栏54/54+页签47=101」写死，主区顶部留出等高的缝隙，滚动时表格行从缝隙漏出
   （刘总 2026-10-14 两次截图反馈，75 条误改为 54、76 条更正为 0）。
   若以后主区上方真加顶栏/页签栏，按实际高度回填 top。
   .table-wrap 的 overflow-x:auto 会把表头变成相对自身滚动而失效，
   桌面宽度足够，改用 clip（不产生滚动容器），移动端保留横向滚动、不吸顶。
   筛选栏（.sticky-bar）一并吸顶：栏高 64px，其后表格的表头吸顶位置相应下移。 */
.sticky-bar { margin-bottom: 14px; }
@media (min-width: 900px) {
  .table-wrap { overflow-x: clip; }
  main th {
    position: sticky; top: 0; z-index: 30;
    background: var(--card);
    box-shadow: inset 0 -1px 0 var(--line);
  }
  main .sticky-bar {
    position: sticky; top: 0; z-index: 35;
    background: var(--card);
    margin: -16px -16px 0; padding: 12px 16px;
    height: 64px; align-items: center;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
  }
  main .sticky-bar > .input, main .sticky-bar > select, main .sticky-bar > .picker { height: 40px; }
  main .sticky-bar > .input, main .sticky-bar > select { padding-top: 0; padding-bottom: 0; }
  main .sticky-bar ~ * th { top: 64px; }
}
/* 2026-10-12 刘总：行间距太大、一屏看行太少 → 全站表格行高压紧（11px→5px） */
td { padding: 5px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
/* 2026-10-25 刘总：主系统业务列表统一压紧，不缩字号。
   只作用于 main 内列表；弹窗表单/详情、AI 表格和信息屏不套用。
   双行客户编码+名称仍保留，行内按钮和状态下拉不藏不省略。 */
main .table-wrap td { padding-top: 2px; padding-bottom: 2px; line-height: 1.4; }
main .table-wrap .btn-sm { min-height: 28px; padding: 3px 8px; }
main .table-wrap .list-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
main .table-wrap td select {
  width: auto; min-height: 28px; padding-top: 2px; padding-bottom: 2px;
  font-size: 12.5px; line-height: 1.3; vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FAFBFD; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 人员权限：一名员工一行，字段不折成竖排；宽表横向滚动，不压缩姓名/部门列 */
.acct-table-wrap { overflow-x: auto; }
.acct-table-wrap table { width: max-content; min-width: 100%; table-layout: auto; }
.acct-table-wrap th, .acct-table-wrap td { white-space: nowrap; }
.acct-table-wrap td { padding-top: 2px; padding-bottom: 2px; }
.acct-table-wrap .btn-sm { min-height: 28px; padding-top: 3px; padding-bottom: 3px; }
.row-link { cursor: pointer; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13.5px; }
.empty .big { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.loading { text-align: center; padding: 36px; color: var(--muted); font-size: 13.5px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; line-height: 1.6; white-space: nowrap;
}
.tag-gray { background: var(--bg); color: var(--muted); }
.tag-cyan { background: #e0f2f1; color: #0f766e; }
.tag-blue { background: var(--info-bg); color: var(--info); }
.tag-gold { background: var(--gold-bg); color: var(--warn); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }

/* ---------- 模态 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 36, 56, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; z-index: 200; overflow-y: auto;
}
.modal {
  background: var(--card); border-radius: 12px; width: 100%; max-width: 560px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25); margin: auto 0;
  /* 刘总 2026-10-20：弹窗内容太多超出屏幕看不到底部——限高视口内，内容区出滚动条（标题栏/底栏固定不滚） */
  max-height: calc(100vh - 40px); display: flex; flex-direction: column;
}
.modal-head, .modal-foot { flex: none; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal.wide { max-width: 780px; }
.modal-h { max-width: 920px; }
.modal-h .detail-img { flex: 0 0 340px; max-width: 340px; min-height: 240px; }
/* 弹窗标题栏（刘总 2026-10-20）：上下压窄＋品牌深蓝底白字，窗体感更强 */
.modal-head {
  padding: 9px 20px; border-bottom: 1px solid rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: space-between;
  background: #0C447C; border-radius: 12px 12px 0 0;
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 500; color: #fff; }
.modal-head .x {
  border: 0; background: transparent; font-size: 20px; line-height: 1;
  color: rgba(255, 255, 255, .85); cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.modal-head .x:hover { background: rgba(255, 255, 255, .16); }
/* 弹窗窗体化（刘总 2026-10-19）：标题栏可拖动、可最小化到底部胶囊、可最大化 */
.modal-head { cursor: move; user-select: none; }
.modal-head button { cursor: pointer; }
.modal-head .mwin-btns { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.modal-head .mwin {
  border: 0; background: transparent; font-size: 16px; line-height: 1;
  color: rgba(255, 255, 255, .85); cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.modal-head .mwin:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.modal.dragging { position: fixed; margin: 0; z-index: 210; }
.modal.maxed {
  position: fixed; inset: 6px; margin: 0; max-width: none; width: auto;
  display: flex; flex-direction: column; z-index: 210;
}
.modal.maxed .modal-body { flex: 1; overflow-y: auto; }
.modal-mini-chip {
  position: fixed; left: 16px; bottom: 16px; z-index: 220;
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  cursor: pointer; font-size: 13px; color: var(--ink);
}
.modal-mini-chip:hover { border-color: #0C447C; }
.modal-mini-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #BA7517; flex: none; }
/* 最大化按钮用 CSS 画的方框（刘总 2026-10-20：□ 字符太小不协调）；还原态＝双框错位 */
.mwin-box { position: relative; display: inline-block; width: 10px; height: 10px; border: 1.6px solid currentColor; border-radius: 2px; vertical-align: 1px; }
.mwin-box.restore { width: 8px; height: 8px; vertical-align: 2px; margin-right: 3px; }
.mwin-box.restore::after { content: ''; position: absolute; top: -5px; right: -5px; width: 8px; height: 8px; border: 1.6px solid currentColor; border-radius: 2px; background: var(--card); }
/* 最小化新形态（刘总 2026-10-20）：窗体收拢到屏幕底部、只露顶部标题栏（点标题栏恢复），遮罩透明不挡主页面 */
.modal-mask.mask-mini { pointer-events: none; background: transparent; }
.modal-mask.mask-mini .modal { pointer-events: auto; }
.modal.minimized {
  position: fixed; top: auto !important; bottom: 0; left: 50% !important; transform: translateX(-50%);
  width: min(560px, 92vw) !important; margin: 0; max-height: none; z-index: 230;
  border-radius: 12px 12px 0 0; box-shadow: 0 -8px 28px rgba(12, 68, 124, .22);
}
.modal.minimized .modal-body, .modal.minimized .modal-foot { display: none; }
.modal.minimized .modal-head { border-bottom: 0; cursor: pointer; }
.modal.minimized .modal-head:hover h3 { color: #EBB54D; }
/* 报价单详情层次（刘总 2026-10-20）：小计大行与平级行浅蓝底＋墨色加粗，子件行白底退后 */
.qd-main td { background: #C9DCF0; color: var(--ink); font-weight: 600; }
.qd-main td .tag { font-weight: 500; }
/* 合计行（刘总 2026-10-20）：蓝底比主行再深一档，加粗 700 */
.qd-total td { background: #A6C2E2; color: var(--ink); font-weight: 700; border-bottom: 0; }
/* 报价表单层次（刘总 2026-10-20「一级项目的背景色也加深」）：一级行（大行/平级行）浅蓝底，子件行灰底退后——同详情页口径 */
#qItems > div:not(.qi-part-row) { background: #C9DCF0; border-radius: 8px; }
.modal-body { padding: 18px 20px; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px;
}
/* 订单详情按钮多：宽屏一行，窄屏在弹窗内整齐换行，任何按钮不得溢出 */
.order-detail-foot { flex-wrap: wrap; }
@media (max-width: 640px) {
  .order-detail-foot { padding: 10px 12px; }
  .order-detail-foot .btn { flex: 1 1 130px; }
}

/* ---------- 明细编辑行 ---------- */
/* 2026-10-11 修：overflow 改 visible——hidden 会把行内下拉候选（.picker-drop）整体裁掉，
   表现为「输 L03 不出下拉」（刘总截图报障）；圆角改由表头/末行各自承担 */
.items-editor { border: 1px solid var(--line); border-radius: 8px; overflow: visible; }
.items-editor .ie-head, .items-editor .ie-row {
  display: grid; grid-template-columns: 2fr 1.6fr .8fr .9fr .9fr 36px;
  gap: 6px; padding: 3px 8px; align-items: center;
}
.items-editor .ie-head {
  background: var(--bg); font-size: 12px; color: var(--muted);
  border-bottom: 1px solid var(--line); border-radius: 7px 7px 0 0;
}
.items-editor .ie-row { border-bottom: 1px solid var(--line-2); background: var(--card); }
.items-editor .ie-row:last-child { border-bottom: 0; border-radius: 0 0 7px 7px; }
.items-editor .input { padding: 7px 9px; font-size: 13px; }
.items-editor select { padding: 7px 8px; font-size: 13px; }
#qItems .input { padding: 7px 9px; font-size: 13px; }
.items-editor .rm {
  border: 0; background: transparent; color: var(--muted);
  font-size: 17px; cursor: pointer; border-radius: 6px; padding: 2px;
}
.items-editor .rm:hover { background: var(--danger-bg); color: var(--danger); }
/* 入库单明细专用 7 列（2026-10-11 刘总；95 条 2026-10-15 增行内供应商列）——供应商+编码（以码带名），品名/型号只读 */
.items-editor.ie-inbound .ie-head, .items-editor.ie-inbound .ie-row {
  grid-template-columns: 1.15fr 1.05fr 1.3fr 1fr .6fr .75fr 36px;
}
/* 采购单明细 7 列（104 条 2026-10-23：第 6 列改行内备注，打印带出） */
.items-editor.ie-po .ie-head, .items-editor.ie-po .ie-row {
  grid-template-columns: 1.1fr 1fr 1.2fr .85fr .6fr 1.1fr 36px;
}
/* 订单 6 列（112 条：价格/金额转隐藏）；树状总成大行浅蓝加粗、子件灰底缩进 */
.items-editor.ie-order .ie-head, .items-editor.ie-order .ie-row {
  grid-template-columns: 1.1fr 1.5fr 1.1fr .6fr .85fr 36px;
}
.items-editor.ie-order .ie-row.ie-asm { background: #C9DCF0; color: var(--ink); font-weight: 600; }
.items-editor.ie-order .ie-row.ie-sub { background: #F5F7FA; }
.items-editor.ie-order .ie-row.ie-sub .ie-name { padding-left: 12px; }
/* 期初 7 列（+库区库位） */
.items-editor.ie-init .ie-head, .items-editor.ie-init .ie-row {
  grid-template-columns: 1.1fr 1.4fr 1fr .6fr .9fr 1fr 36px;
}

/* ---------- 二维码 ---------- */
/* 97.1 条：到货单贴图识别区聚焦态（刘总 2026-10-15「鼠标点不进去」——点一下出蓝框即可 Ctrl+V） */
#ibRvZone:focus { outline: none; border: 1px solid #0C447C; box-shadow: 0 0 0 3px rgba(12, 68, 124, .14); }
.qr-box { text-align: center; padding: 10px; }
.qr-box img, .qr-box canvas { width: 200px; height: 200px; image-rendering: pixelated; }
.qr-box .hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%) translateY(-24px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 13.5px; z-index: 400; opacity: 0; transition: .22s; pointer-events: none;
  max-width: calc(100vw - 40px); box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 108 条：错误条=正规提醒——可点击（覆盖 pointer-events:none）、带「知道了」确认钮、限宽折行 */
.toast.error { background: var(--danger); pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 40px)); }
.toast.error span { flex: 1; line-height: 1.6; }
.toast-x { flex: none; background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.55); border-radius: 6px; padding: 3px 12px; font-size: 12.5px; cursor: pointer; }
.toast-x:hover { background: rgba(255,255,255,.32); }
.toast.ok { background: var(--ok); }

/* ---------- 流程步骤 ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.step {
  display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 13px;
}
.step .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.step.done { border-color: #BFDDCB; background: var(--ok-bg); }
.step.done .dot { background: var(--ok); }
.step.active { border-color: var(--gold); background: var(--gold-bg); }
.step.active .dot { background: var(--gold); }

.detail-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 20px; }
.detail-list .dl-item .k { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.detail-list .dl-item .v { font-size: 14px; color: var(--text); word-break: break-all; }

/* 产品详情：左信息 + 右简图 */
.detail-grid { display: flex; gap: 18px; align-items: flex-start; }
.detail-grid .detail-list { flex: 1 1 auto; min-width: 0; }
.detail-img {
  flex: 0 0 220px; max-width: 220px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg, #f6f7f9); min-height: 150px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.detail-img img { width: 100%; display: block; cursor: zoom-in; }
.detail-img-empty, .detail-img-loading {
  text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.8; padding: 16px 8px;
}

/* 编辑表单：简图上传 */
.img-upload { display: flex; gap: 12px; align-items: flex-start; }
.img-preview {
  flex: 0 0 180px; width: 180px; height: 128px;
  border: 1.5px dashed #9DAEC2; border-radius: var(--radius);
  background: #EEF2F7; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.img-preview img { width: 100%; height: 100%; object-fit: contain; background:#fff; }
.img-none { color: var(--ink-3); font-size: 12.5px; }
.img-actions { display: flex; flex-direction: column; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.img-hint { font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .detail-grid { flex-direction: column; }
  .detail-img { flex: none; max-width: 100%; width: 100%; }
}

.section-label {
  font-size: 12.5px; color: var(--muted); margin: 18px 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line-2);
}
.section-label:first-child { margin-top: 0; }

/* BOM 互查 */
.bom-cur {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--bg, #f6f7f9); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px; flex-wrap: wrap;
}
.bom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

/* 产品选择器 */
.picker { position: relative; }
/* 77 条：下拉标识——刘总反馈看不出是下拉（以为还是纯输入框）；箭头不挡点击 */
.picker::after {
  content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-52%);
  color: var(--muted); font-size: 13px; pointer-events: none;
}
.picker .p-input { padding-right: 26px; }
/* 79 条：报价明细「编码带出」只读文本（非输入项）——与输入框同高对齐、超长省略、悬浮 title 看全文 */
.qi-ro { padding: 7px 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#qItems .qi-ro { padding-top: 5px; padding-bottom: 5px; }
.qi-ro.dim { color: var(--muted); font-size: 12px; }
.picker-drop {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  /* 2026-10-11：宽度不再锁死跟随输入框——编码列很窄，候选要容得下 编码+品名+型号 */
  width: max-content; min-width: 100%; max-width: min(480px, 88vw);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  max-height: 320px; overflow-y: auto; /* 82 条：面板加高——全量渲染后一屏多露几项，滚动条更显眼 */
  box-shadow: 0 8px 24px rgba(15, 36, 56, .14);
}
.pd-item { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pd-item:hover { background: var(--bg); }
.pd-code { font-family: var(--font-mono, monospace); color: #0C447C; font-weight: 500; flex-shrink: 0; }
.pd-name { color: var(--ink); overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.pd-model { color: var(--muted); font-size: 12px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.pd-empty { padding: 10px; font-size: 12.5px; color: var(--muted); }

/* 工单进度条 */
.progress { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; background: #0C447C; border-radius: 3px; transition: width .3s; }

/* 宽模态 */
.modal-lg { max-width: 860px; width: 100%; }

@media (max-width: 900px) {
  .bom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  main { padding: 14px 12px 60px; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .items-editor .ie-head, .items-editor .ie-row {
    grid-template-columns: 1.8fr 1.4fr .7fr .8fr .8fr 30px; gap: 4px; padding: 3px 6px;
  }
  .items-editor.ie-inbound .ie-head, .items-editor.ie-inbound .ie-row {
    grid-template-columns: 1fr .9fr 1.1fr .8fr .5fr .65fr 30px;
  }
  .items-editor.ie-po .ie-head, .items-editor.ie-po .ie-row {
    grid-template-columns: 1fr .85fr 1fr .7fr .5fr .95fr 30px;
  }
  .items-editor.ie-order .ie-head, .items-editor.ie-order .ie-row {
    grid-template-columns: 1fr 1.3fr .9fr .55fr .75fr 30px;
  }
  .items-editor.ie-init .ie-head, .items-editor.ie-init .ie-row {
    grid-template-columns: 1fr 1.2fr .8fr .55fr .8fr .9fr 30px;
  }
  .items-editor .ie-head { font-size: 11px; }
  .modal-mask { padding: 10px; }
  .modal-body { padding: 16px; }
  .stat .value { font-size: 21px; }
}

@media print {
  .topbar, .tabs, .sidenav, .head-actions, .no-print { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
}

/* BOM 多级展开树 */
.bom-tree { font-size: 13px; }
.tree-row { display: flex; align-items: center; gap: 8px; padding-top: 4px; padding-bottom: 4px; border-bottom: 1px dashed var(--border, #e5e2da); }
.tree-row:last-child { border-bottom: none; }
.tree-branch { color: var(--muted, #888); width: 14px; flex: none; }
.tree-code { font-family: var(--font-mono, monospace); font-weight: 500; color: #0C447C; cursor: pointer; flex: none; }
.tree-code[data-code]:hover { text-decoration: underline; }
.tree-name { flex: none; }
.tree-model { color: var(--muted, #888); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-qty { flex: none; color: var(--muted, #888); font-size: 12.5px; }

/* BOM 单层编辑 */
.be-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.be-cell { flex: 1; min-width: 0; }
.be-prod { flex: 1.6; }

/* AI 助手悬浮停靠（2026-10-10）：右下悬浮球 + 右侧抽屉，不遮当前页 */
.ai-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 950;
  width: 52px; height: 52px; border-radius: 50%;
  background: #0C447C; color: #fff; border: 2px solid #E8B54A;
  font-size: 17px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 14px rgba(12, 68, 124, 0.35);
}
.ai-fab:hover { background: #0e5399; }
.ai-dock {
  position: fixed; top: 0; right: 0; z-index: 940;
  width: 400px; max-width: 94vw; height: 100vh;
  background: var(--bg-card, #fff);
  border-left: 1px solid var(--border, #e3e8ef);
  box-shadow: -6px 0 24px rgba(20, 30, 50, 0.14);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.22s ease;
}
.ai-dock.open { transform: translateX(0); }
.ai-dock-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 14px; background: #0C447C; color: #fff; flex: none;
}
.ai-dock-sub { font-size: 11.5px; opacity: 0.82; margin-top: 2px; }
.ai-dock-x {
  background: none; border: none; color: #fff; font-size: 22px;
  cursor: pointer; line-height: 1; padding: 0 2px;
}
.ai-dock-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 900px) {
  .ai-dock { width: 100vw; max-width: 100vw; }
  .ai-fab { right: 14px; bottom: 14px; }
}

/* 门禁拦截页（补 2026-10-10：auth-wrap/auth-card 样式原本缺失，页面裸奔） */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg, #f2f5f9); padding: 20px;
}
.auth-card {
  width: 420px; max-width: 92vw; background: var(--card, #fff);
  border: 1px solid var(--border, #e3e8ef); border-radius: 14px;
  padding: 34px 32px; text-align: center;
  box-shadow: 0 8px 30px rgba(15, 36, 56, 0.08);
}
.auth-card h2 { font-size: 19px; font-weight: 500; color: var(--ink, #1b2a3c); margin: 0; }

/* AI 回复里的数据表（2026-10-11 刘总：表格别挤在对话栏） */
.ai-md-tbl { border-collapse: collapse; margin: 8px 0; font-size: 13px; background: #fff; }
.ai-md-tbl.compact { width: 100%; }
.ai-md-tbl th { background: #0C447C; color: #fff; padding: 6px 10px; text-align: left; font-weight: 600; white-space: nowrap; }
.ai-md-tbl td { border: 1px solid var(--line); padding: 5px 10px; }
.ai-md-tbl tbody tr:nth-child(even) { background: var(--bg); }
.ai-md-tbl:not(.compact) { font-size: 15px; }
.ai-md-tbl:not(.compact) th, .ai-md-tbl:not(.compact) td { padding: 9px 14px; }

/* AI 抽屉拖拽调宽手柄（2026-10-11 刘总：挡住表格内容，要可调） */
.ai-dock-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 9px; cursor: col-resize; z-index: 6; }
.ai-dock-resize:hover, .ai-dock.resizing .ai-dock-resize { background: rgba(12, 68, 124, .22); }
.ai-dock.resizing { transition: none; user-select: none; }
/* 一键收起到屏幕最右端（刘总 2026-10-11：对话框仍挡查询窗口）——
   右滑只露 40px 把手带，带上有折叠按钮可弹回；收起时禁掉调宽手柄防误拖 */
.ai-dock.open.min { transform: translateX(calc(100% - 40px)); }
.ai-dock.min .ai-dock-resize { display: none; }
.ai-dock-fold {
  position: absolute; left: -15px; top: 96px; z-index: 7;
  width: 30px; height: 56px; padding: 0; border: none; cursor: pointer;
  background: #0C447C; color: #fff; font-size: 15px; line-height: 1;
  border-radius: 8px 0 0 8px; box-shadow: -2px 0 8px rgba(20, 30, 50, .18);
}
.ai-dock-fold:hover { background: #0e5399; }
/* 收起态：面板内容隐藏，只留一条干净把手带 + 竖排标识 */
.ai-dock.min .ai-dock-head, .ai-dock.min .ai-dock-body { visibility: hidden; }
.ai-dock.min::after {
  content: 'AI 助手'; position: absolute; left: 9px; top: 170px;
  writing-mode: vertical-rl; font-size: 13px; font-weight: 600;
  color: #0C447C; letter-spacing: 3px;
}

/* BOM 工艺工作台（2026-10-26 V101A 试点原型） */
.bw-layout { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 12px; align-items: start; }
.bw-left, .bw-right { min-width: 0; }
.bw-right-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.bw-note { border-left: 3px solid #BA7517; background: #FAEEDA; color: #633806; padding: 7px 10px; border-radius: 6px; font-size: 12.5px; margin-bottom: 10px; }
.bw-node { display: grid; grid-template-columns: 74px minmax(100px, 1fr) minmax(80px, .8fr) 58px 118px; gap: 7px; align-items: center; padding: 5px 4px; border-bottom: 1px dashed var(--line); border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.bw-node:hover, .bw-node.active { background: rgba(12, 68, 124, .07); }
.bw-node-code { color: #0C447C; font-family: var(--font-mono, monospace); font-weight: 500; }
.bw-node-name, .bw-node-model { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-node-model, .bw-node-qty { color: var(--muted); font-size: 12px; }
.bw-branch-tag { display: inline-block; border: 1px solid #B4B2A9; color: var(--muted); border-radius: 999px; padding: 1px 7px; font-size: 11.5px; white-space: nowrap; text-align: center; }
.bw-branch { min-width: 0; padding: 3px 6px; font-size: 12px; height: 26px; }
.bw-lane { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.bw-lane-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 9px; background: var(--bg); border-bottom: 1px solid var(--line); }
.bw-lane-head b { color: #0C447C; font-weight: 500; margin-right: 8px; }
.bw-lane-head span { color: var(--muted); font-size: 12px; }
.bw-table-wrap { overflow-x: auto; }
.bw-table-wrap table { min-width: 1180px; }
.bw-table-wrap th { font-size: 11.5px; white-space: nowrap; }
.bw-table-wrap td { padding: 4px 5px; vertical-align: middle; }
.bw-table-wrap .input { min-width: 82px; padding: 4px 6px; font-size: 12px; height: 28px; }
.bw-table-wrap td:nth-child(4) .input { min-width: 170px; }
.bw-table-wrap td:nth-child(10) .input, .bw-table-wrap td:nth-child(11) .input { min-width: 150px; }
.bw-merge { white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.bw-merge label { display: inline-block; margin-right: 5px; }
.btn-warn { border-color: #BA7517 !important; color: #854F0B !important; background: #FAEEDA !important; }
@media (max-width: 1100px) {
  .bw-layout { grid-template-columns: 1fr; }
  .bw-node { grid-template-columns: 74px minmax(90px, 1fr) 70px 54px 108px; }
}

/* 版本升级横幅（68 条）：顶部固定，琥珀金底，非阻断 */
#upgradeBar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #b3540c; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 8px 14px; font-size: 13.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
#upgradeBar .ub-btn {
  background: #fff; color: #b3540c; border: none; border-radius: 5px;
  padding: 4px 14px; font-weight: 600; cursor: pointer; font-size: 13px;
}
#upgradeBar .ub-x {
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 5px; padding: 3px 10px; cursor: pointer; font-size: 12.5px; opacity: .9;
}

/* ---------- 表头列筛选（78 条，Excel 风格） ---------- */
.th-fcol { white-space: nowrap; }
/* 93 条：移动端 th 非 sticky（静态），.cf-drop 绝对定位失去锚点——小屏下给筛选列头补相对定位（桌面 sticky 不动） */
@media (max-width: 899px) { main th.th-fcol { position: relative; } }
.th-fcol .th-txt { vertical-align: middle; }
.th-f {
  border: 1px solid #B9C6D4; background: #E4EAF2; color: var(--ink-2); cursor: pointer;
  font-size: 12px; padding: 3px 9px; margin-left: 5px; border-radius: 7px; line-height: 1.2; vertical-align: middle;
}
.th-f:hover { background: #D5DEE9; border-color: #9DAEC2; }
th.th-on .th-f, th.th-on .th-txt { color: #b3540c; font-weight: 700; }
th.th-on .th-f { background: var(--gold-bg, #FBF3E2); }
.cf-drop {
  position: absolute; top: calc(100% + 2px); left: 0; z-index: 60;
  min-width: 180px; max-width: 260px; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 36, 56, .16);
  font-weight: normal; text-align: left; white-space: normal;
}
.cf-drop > .input { width: 100%; height: 34px; font-size: 13px; }
.cf-search { margin-bottom: 6px; }
.cf-search .input { width: 100%; height: 32px; font-size: 12.5px; }
.cf-vals { max-height: 220px; overflow-y: auto; }
.cf-item {
  display: flex; align-items: center; gap: 7px; padding: 5px 6px;
  font-size: 13px; cursor: pointer; border-radius: 5px; color: var(--text);
}
.cf-item:hover { background: var(--bg); }
.cf-item input { flex: none; }
.cf-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-item em { font-style: normal; color: var(--muted); font-size: 11.5px; flex: none; }
.cf-foot { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 6px; text-align: right; }

/* ================= 信息屏看板（98 条） =================
   深色底（品牌舰船蓝黑）+ 琥珀金强调 + 大字号远视距，电脑端先行、电视上墙复用 */
.bd {
  background: linear-gradient(160deg, #0B1D30 0%, #0F2438 55%, #123047 100%);
  color: #E8EEF5; border-radius: var(--radius); padding: 18px 22px 12px;
  min-height: calc(100vh - 130px); font-size: 15px;
}
.bd-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid rgba(200,145,47,.35); }
.bd-title { display: flex; align-items: center; gap: 12px; }
.bd-mark {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: #0C447C; color: #E8B45C; font-size: 22px; font-weight: 600; border: 1px solid rgba(232,180,92,.4);
}
.bd-title b { font-size: 22px; letter-spacing: 1px; display: block; line-height: 1.2; }
.bd-title span { font-size: 13.5px; color: #E8B45C; }
.bd-chips { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.bd-chips a {
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(232,238,245,.25);
  color: #B9C6D4; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.bd-chips a:hover { border-color: #E8B45C; color: #E8B45C; }
.bd-chips a.on { background: #C8912F; border-color: #C8912F; color: #0B1D30; font-weight: 600; }
.bd-clock { text-align: right; margin-left: auto; }
.bd-clock b { font-size: 26px; font-family: ui-monospace, Consolas, monospace; color: #E8B45C; display: block; line-height: 1.1; }
.bd-clock span { font-size: 12.5px; color: #8FA3B8; }
.bd-body { padding: 14px 0 4px; }
.bd-foot { font-size: 12px; color: #6B8299; text-align: center; padding-top: 10px; border-top: 1px solid rgba(232,238,245,.08); margin-top: 10px; }

.bd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.bd-stat {
  background: rgba(255,255,255,.045); border: 1px solid rgba(232,238,245,.1);
  border-radius: 12px; padding: 14px 16px 11px;
}
.bd-stat-v { font-size: 30px; font-weight: 600; font-family: ui-monospace, Consolas, monospace; line-height: 1.15; color: #fff; }
.bd-stat-l { font-size: 13.5px; color: #9FB2C6; margin-top: 2px; }
.bd-stat-s { font-size: 12px; color: #7E93A9; margin-top: 3px; }
.bd-stat.ok .bd-stat-v { color: #6FCF97; }
.bd-stat.warn .bd-stat-v { color: #E8B45C; }
.bd-stat.bad .bd-stat-v { color: #F27D6D; }

.bd-cols { display: flex; gap: 12px; margin-bottom: 14px; align-items: stretch; }
.bd-cols > * { min-width: 0; }
.bd-panel {
  flex: 1; background: rgba(255,255,255,.045); border: 1px solid rgba(232,238,245,.1);
  border-radius: 12px; padding: 13px 16px; margin-bottom: 0;
}
.bd-panel.bd-grow { flex: 1.6; }
.bd-body > .bd-panel { margin-bottom: 14px; }
.bd-panel h3 {
  margin: 0 0 10px; font-size: 15.5px; font-weight: 600; color: #E8B45C;
  letter-spacing: .5px; display: flex; align-items: center; gap: 8px;
}
.bd-panel h3::before { content: ''; width: 4px; height: 15px; background: #C8912F; border-radius: 2px; }
.bd-empty { color: #6B8299; font-size: 14px; padding: 18px 6px; text-align: center; line-height: 1.8; }

.bd-tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bd-tbl th {
  text-align: left; color: #7E93A9; font-weight: 500; font-size: 12.5px;
  padding: 6px 8px; border-bottom: 1px solid rgba(232,238,245,.14); white-space: nowrap;
}
.bd-tbl td { padding: 8px; border-bottom: 1px solid rgba(232,238,245,.07); vertical-align: top; color: #DCE5EE; }
.bd-tbl tr:last-child td { border-bottom: none; }
.bd-mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: #9FB2C6; }
.bd-dim { color: #7E93A9; font-size: 12.5px; }
.bd-red { color: #F27D6D !important; font-weight: 600; }
.bd-amber { color: #E8B45C !important; font-weight: 600; }
.bd-ok { color: #6FCF97 !important; }

.bd-bar { display: inline-block; width: 110px; height: 10px; background: rgba(232,238,245,.12); border-radius: 6px; overflow: hidden; vertical-align: middle; }
.bd-bar i { display: block; height: 100%; background: linear-gradient(90deg, #0C447C, #3E7CB1); border-radius: 6px; }
.bd-bar-t { margin-left: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: #B9C6D4; }
.bd-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; background: rgba(232,238,245,.1); color: #B9C6D4; }
.bd-tag.run { background: rgba(62,124,177,.25); color: #8FC1E9; }
.bd-tag.warn { background: rgba(200,145,47,.22); color: #E8B45C; }
.bd-ops { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.bd-op {
  font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 4px;
  background: rgba(232,238,245,.1); color: #7E93A9;
}
.bd-op.run { background: rgba(62,124,177,.3); color: #8FC1E9; }
.bd-op.done { background: rgba(111,207,151,.18); color: #6FCF97; }

.bd-rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(232,238,245,.06); }
.bd-rank-row:last-child { border-bottom: none; }
.bd-rank-no {
  width: 24px; height: 24px; border-radius: 6px; background: rgba(200,145,47,.2); color: #E8B45C;
  font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 600;
}
.bd-rank-name { min-width: 72px; font-size: 14.5px; color: #DCE5EE; flex: none; }
.bd-rank-bar { flex: 1; height: 12px; background: rgba(232,238,245,.1); border-radius: 6px; overflow: hidden; }
.bd-rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #C8912F, #E8B45C); border-radius: 6px; }
.bd-rank-bar i.amber { background: linear-gradient(90deg, #2C5273, #3E7CB1); }
.bd-rank-v { flex: none; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: #B9C6D4; min-width: 90px; text-align: right; }

.bd-ex { border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; font-size: 14px; line-height: 1.9; }
.bd-ex b { display: block; margin-bottom: 3px; }
.bd-ex span { display: inline-block; margin-right: 16px; opacity: .92; }
.bd-ex-red { background: rgba(192,57,43,.16); border: 1px solid rgba(242,125,109,.35); color: #F2A79D; }
.bd-ex-amber { background: rgba(200,145,47,.13); border: 1px solid rgba(232,180,92,.3); color: #E8C98F; }

@media (max-width: 900px) {
  .bd { padding: 12px 12px 8px; font-size: 14px; }
  .bd-cols { flex-direction: column; }
  .bd-stat-v { font-size: 24px; }
  .bd-title b { font-size: 18px; }
  .bd-clock b { font-size: 20px; }
  .bd-panel.bd-grow { flex: 1; }
}

/* 排产板（73 条）：页面分区用文件夹页签；列表复用全站紧凑表格、表头筛选。
   2026-10-26 刘总：长列表右侧独立滚动，表头固定在内容区顶部。 */
.ftabs { display: flex; gap: 4px; margin: 0 0 -1px; padding: 0 4px; position: relative; z-index: 2; }
.ftab { padding: 7px 16px; font-size: 13px; border: 1px solid var(--line,#C3CEDD); border-bottom: none; border-radius: 8px 8px 0 0; background: #E4EAF2; color: #44546A; cursor: pointer; }
.ftab:hover { background: #EDF2F8; color: #0C447C; }
.ftab.on { background: var(--card,#fff); color: #0C447C; font-weight: 600; border-color: #AEBBCB; padding-bottom: 8px; box-shadow: 2px -2px 4px rgba(15,30,50,.06); }
.production-view-tabs { margin: 0 0 14px; padding: 0; border-bottom: 1px solid #AEBBCB; }
.production-view-tabs .ftab { text-decoration: none; }
.production-view-tabs .ftab.on { margin-bottom: -1px; border-bottom: 1px solid var(--card,#fff); }
.sch-summary { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.sch-summary b { color: var(--text); }
.sch-summary .sch-qc-text { color: #B8860B; }
.sch-scroll {
  max-height: calc(100vh - 290px); min-height: 260px;
  overflow-y: scroll; overflow-x: clip; padding-right: 2px;
  scrollbar-width: thin; scrollbar-color: #9DAEC2 #EDF2F8;
  border: 1px solid var(--line); border-radius: 7px;
}
.sch-scroll::-webkit-scrollbar { width: 10px; }
.sch-scroll::-webkit-scrollbar-track { background: #EDF2F8; }
.sch-scroll::-webkit-scrollbar-thumb { background: #9DAEC2; border: 2px solid #EDF2F8; border-radius: 6px; }
.sch-table-wrap { margin: 0; padding: 0; overflow: visible; }
.sch-table-wrap + .sch-sec { margin-top: 10px; }
.sch-table-wrap table { min-width: 860px; }
.sch-table-wrap thead th { top: 0; background: #F4F7FB; box-shadow: inset 0 -1px 0 var(--line); }
.sch-table-wrap td { padding: 2px 8px; line-height: 1.25; font-size: 13px; }
.sch-table-wrap td small { color: var(--muted); line-height: 1.2; }
.sch-table-wrap .btn-sm { min-height: 26px; padding: 2px 7px; }
.sch-row:hover { background: #F4F8FC; }
.sch-seq { width: 48px; font-weight: 700; color: #0C447C; text-align: center; }
.sch-wo { min-width: 130px; font-family: var(--font-mono,monospace); color: #0C447C; white-space: nowrap; }
.sch-wo small { font-family: var(--font-sans,sans-serif); font-weight: 400; }
.sch-prod { min-width: 250px; }
.sch-model { color: var(--muted); }
.sch-shop-guess { color: #B8860B; }
.sch-qty, .sch-date { white-space: nowrap; }
.sch-date { min-width: 96px; }
.sch-urgent { background: #E02424; color: #fff; }
.sch-qc { background: #B8860B; color: #fff; }
.sch-normal { color: var(--muted); font-size: 12px; }
.sch-actions { min-width: 126px; text-align: right; white-space: nowrap; }
.sch-actions .btn { margin: 1px; }
.sch-sec { font-size: 12.5px; font-weight: 600; color: #44546A; background: #EDF2F8; padding: 4px 9px; margin: 0; border-bottom: 1px solid var(--line); }
.sch-sec:first-child { border-radius: 6px 6px 0 0; }
.sch-empty { padding: 12px; }
@media (max-width: 899px) {
  .sch-scroll { max-height: 62vh; overflow-x: auto; }
  .sch-table-wrap { overflow: visible; }
}

/* 客户分担全景（75 条）：长表容器内滚动 + 可点格子（表头吸顶沿用全站 main th 规则，此处补容器内生效的背景） */
.sa-mx-wrap { max-height: 68vh; overflow: auto; }
.sa-mx-wrap thead th { background: var(--card,#fff); box-shadow: inset 0 -1px 0 var(--line); }
.sa-mx-cell { cursor: pointer; text-align: center; white-space: nowrap; }
.sa-mx-cell:hover { background: #EAF1F9; outline: 1px dashed #AEBBCB; outline-offset: -2px; }
