/* ============================================================
   AI企业管家 · 海南铂尔 — 全局样式 v2 (三主题可切换)
   ------------------------------------------------------------
   设计令牌层: :root 定义语义变量, body[data-theme] 切换三套主题
   A 蓝钻精修 (深蓝品牌) / B 云白现代 (青绿浅色) / C 工业暗夜 (深色驾驶舱)
   说明: 全部既有类名保留, 仅将颜色替换为变量引用, 兼容所有页面脚本。
   ============================================================ */

/* ===== 设计令牌 · 默认 A 蓝钻 ===== */
:root, body[data-theme="A"] {
  --brand: #2b6cb0;
  --brand-dark: #1e4e80;
  --brand-2: #3a82c9;
  --brand-soft: #ebf4ff;
  --brand-grad: linear-gradient(90deg, #2b6cb0, #3a82c9);
  --ok: #38a169; --ok-soft: #e6fffa;
  --warn: #d69e2e; --warn-soft: #fefcbf;
  --danger: #e53e3e; --danger-soft: #fff5f5;
  --info: #2b6cb0; --info-soft: #ebf4ff;
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-2: #f0f4f9;
  --surface-3: #edf2f7;
  --border: #e2e8f0;
  --border-soft: #eef2f7;
  --text: #1a202c;
  --text-2: #4a5568;
  --text-3: #718096;
  --text-4: #a0aec0;
  --sidebar-bg: #1a2b45;
  --sidebar-bg-2: rgba(255,255,255,.06);
  --sidebar-title: #ffffff;
  --sidebar-sub: #718096;
  --sidebar-text: #aebcd0;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-hover-text: #ffffff;
  --sidebar-border: rgba(255,255,255,.08);
  --topbar-bg: #ffffff;
  --topbar-blur: none;
  --topbar-border: var(--border);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.05);
  --shadow-md: 0 8px 24px rgba(26,32,44,.1);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.35);
  --radius: 10px;
  --font: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", Consolas, "Cascadia Code", monospace;
}

/* ===== 主题 B · 云白现代 ===== */
body[data-theme="B"] {
  --brand: #0e9f8e;
  --brand-dark: #0b7d70;
  --brand-2: #18b8a5;
  --brand-soft: #e2f6f2;
  --brand-grad: linear-gradient(90deg, #0e9f8e, #18b8a5);
  --ok: #12996a; --ok-soft: #e2f6ec;
  --warn: #c07f1c; --warn-soft: #fdf3e0;
  --danger: #d64a4a; --danger-soft: #fdeaea;
  --info: #2f6bd8; --info-soft: #e8effc;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --surface-3: #e9eef5;
  --border: #e7ecf3;
  --border-soft: #eef2f8;
  --text: #1b2436;
  --text-2: #5c6b84;
  --text-3: #7d8ba3;
  --text-4: #93a1b8;
  --sidebar-bg: #ffffff;
  --sidebar-bg-2: #f3f6fa;
  --sidebar-title: #1b2436;
  --sidebar-sub: #93a1b8;
  --sidebar-text: #5c6b84;
  --sidebar-hover: #f3f6fa;
  --sidebar-hover-text: #1b2436;
  --sidebar-border: #e7ecf3;
  --topbar-bg: rgba(255,255,255,.8);
  --topbar-blur: blur(10px);
  --topbar-border: #e7ecf3;
  --shadow-sm: 0 1px 2px rgba(20,30,50,.04), 0 3px 10px rgba(20,30,50,.04);
  --shadow-md: 0 4px 14px rgba(20,30,50,.07), 0 14px 34px rgba(20,30,50,.08);
  --shadow-lg: 0 24px 70px rgba(14,60,54,.22);
}

/* ===== 主题 C · 工业暗夜 ===== */
body[data-theme="C"] {
  --brand: #22d3ee;
  --brand-dark: #0ea5c4;
  --brand-2: #38bdf8;
  --brand-soft: rgba(34,211,238,.12);
  --brand-grad: linear-gradient(90deg, #22d3ee, #0e7490);
  --ok: #34d399; --ok-soft: rgba(52,211,153,.12);
  --warn: #fbbf24; --warn-soft: rgba(251,191,36,.12);
  --danger: #f87171; --danger-soft: rgba(248,113,113,.12);
  --info: #60a5fa; --info-soft: rgba(96,165,250,.12);
  --bg: #0a101d;
  --surface: #111a2e;
  --surface-2: #16223a;
  --surface-3: #1b2a47;
  --border: #1e2b45;
  --border-soft: #1a2540;
  --text: #e6edf7;
  --text-2: #9fb0cc;
  --text-3: #7d8fab;
  --text-4: #5f7191;
  --sidebar-bg: #0d1526;
  --sidebar-bg-2: #16223a;
  --sidebar-title: #e6edf7;
  --sidebar-sub: #5f7191;
  --sidebar-text: #9fb0cc;
  --sidebar-hover: #16223a;
  --sidebar-hover-text: #e6edf7;
  --sidebar-border: #1e2b45;
  --topbar-bg: rgba(13,21,38,.85);
  --topbar-blur: blur(10px);
  --topbar-border: #1e2b45;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.6);
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: light; }
body[data-theme="C"] { color-scheme: dark; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; transition: background .25s ease, color .25s ease; }
::selection { background: var(--brand-soft); }

/* ===== 登录页 ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #14284a 0%, #1e4e80 45%, #2b6cb0 100%); }
body[data-theme="B"] .login-wrap { background: linear-gradient(150deg, #0e5c52 0%, #0e9f8e 55%, #2fc4ae 100%); }
body[data-theme="C"] .login-wrap { background: radial-gradient(900px 500px at 70% -10%, rgba(14,165,196,.22), transparent 60%), radial-gradient(700px 400px at 15% 110%, rgba(34,211,238,.12), transparent 60%), #0a101d; }
/* 背景光斑装饰 */
.login-wrap::before, .login-wrap::after { content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.login-wrap::before { width: 420px; height: 420px; background: radial-gradient(circle, #3182ce, transparent 70%); top: -120px; right: -80px; }
.login-wrap::after { width: 380px; height: 380px; background: radial-gradient(circle, #2c7a7b, transparent 70%); bottom: -140px; left: -60px; }
.login-card { position: relative; background: var(--surface); border-radius: 18px; padding: 42px 38px; width: 392px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: rise .5s ease; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.login-card .brand .logo-ico { font-size: 34px; }
.login-card h1 { font-size: 22px; margin-bottom: 2px; color: var(--brand-dark); letter-spacing: .5px; }
.login-card .sub { color: var(--text-3); margin-bottom: 24px; font-size: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; transition: .15s; background: var(--surface); color: var(--text); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input::placeholder { color: var(--text-4); }
.btn { padding: 10px 16px; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 500; transition: transform .1s, box-shadow .15s, background .15s, filter .15s; font-family: var(--font); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(43,108,176,.25); }
.btn-primary:hover { background: var(--brand-dark); filter: brightness(1.05); box-shadow: 0 4px 14px rgba(43,108,176,.35); }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { filter: brightness(1.08); }
.btn-block { width: 100%; padding: 12px; }
.login-tip { margin-top: 16px; font-size: 12px; color: var(--text-3); background: var(--surface-2); padding: 10px; border-radius: 8px; line-height: 1.7; }

/* ===== 主布局 ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: var(--sidebar-bg); color: var(--sidebar-text); flex-shrink: 0; display: flex; flex-direction: column; transition: background .25s ease; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { padding: 20px 20px 16px; font-size: 17px; font-weight: 700; color: var(--sidebar-title); border-bottom: 1px solid var(--sidebar-border); background: linear-gradient(135deg, rgba(255,255,255,.06), transparent); }
.sidebar .logo small { display: block; font-size: 11px; font-weight: 400; color: var(--sidebar-sub); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 148px; }
.sidebar .logo { display: flex; align-items: center; gap: 10px; }
.sidebar .brand-logo { width: 34px; height: 34px; flex: none; }
.sidebar img.brand-logo { border-radius: 0; box-shadow: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.sidebar .logo-txt { flex: 1; min-width: 0; }
.login-card .brand { display: flex; align-items: center; }
.login-form .brand .logo-ico-svg { width: 40px; height: 40px; flex: none; object-fit: contain; }
.login-form .brand img.logo-ico-svg { border-radius: 0; box-shadow: none; }
.nav { flex: 1; padding: 12px 10px; overflow-y: auto; min-height: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; cursor: pointer; margin-bottom: 2px; color: var(--sidebar-text); font-size: 14px; transition: .15s; position: relative; }
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-hover-text); }
.nav-item.active { background: var(--brand); color: #fff; box-shadow: 0 3px 10px rgba(43,108,176,.35); }
body[data-theme="B"] .nav-item.active, body[data-theme="C"] .nav-item.active { background: var(--brand); box-shadow: 0 3px 12px rgba(14,159,142,.3); }
.nav-item.active::after { content: ''; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.6); }
.nav-item:active { transform: scale(.98); }
.nav-item .ico { width: 18px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.nav-item .ico svg { width: 17px; height: 17px; vertical-align: -3px; }
.side-foot { padding: 14px 20px; border-top: 1px solid var(--sidebar-border); font-size: 12px; color: var(--sidebar-sub); }
.side-foot .uname { color: var(--sidebar-text); margin-bottom: 6px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--topbar-bg); backdrop-filter: var(--topbar-blur); -webkit-backdrop-filter: var(--topbar-blur); padding: 12px 24px; border-bottom: 1px solid var(--topbar-border); display: flex; align-items: center; justify-content: space-between; gap: 14px; position: sticky; top: 0; z-index: 30; transition: background .25s ease; }
.topbar .title { font-size: 18px; font-weight: 700; }
.topbar .user-info { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.badge { background: var(--brand-soft); color: var(--brand-dark); padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.btn-sm { padding: 6px 12px; font-size: 13px; } .btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); } .btn-ghost:hover { background: var(--surface-2); }

.content { padding: 24px; overflow-y: auto; flex: 1; }
.page { display: none; } .page.active { display: block; }

/* ===== 卡片/看板 ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .num { font-size: 26px; font-weight: 700; color: var(--brand-dark); margin-top: 4px; font-family: var(--mono); letter-spacing: -.5px; }
.card .lbl { color: var(--text-3); font-size: 13px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 20px; transition: box-shadow .18s, background .25s ease; border: 1px solid transparent; }
.panel h3 { font-size: 15px; margin-bottom: 14px; color: var(--text); display: flex; align-items: center; justify-content: space-between; position: relative; padding-left: 12px; }
.panel h3::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--brand-grad); }
.panel h3 .btn-sm { font-size: 12px; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 12px; color: var(--text-3); font-weight: 600; font-size: 13px; border-bottom: 2px solid var(--border); white-space: nowrap; background: var(--surface-2); letter-spacing: .3px; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table tr:nth-child(even) td { background: rgba(247,250,252,.6); }
body[data-theme="C"] table tr:nth-child(even) td { background: rgba(255,255,255,.02); }
tr:hover td { background: var(--surface-2); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.tag-blue { background: var(--info-soft); color: var(--info); } .tag-green { background: var(--ok-soft); color: var(--ok); }
.tag-red { background: var(--danger-soft); color: var(--danger); } .tag-yellow { background: var(--warn-soft); color: var(--warn); }
.tag-gray { background: var(--surface-3); color: var(--text-2); }

/* ===== 表格内操作 ===== */
.op { color: var(--brand); cursor: pointer; margin-right: 10px; font-size: 13px; } .op:hover { text-decoration: underline; }
.op-danger { color: var(--danger); }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: none; align-items: center; justify-content: center; z-index: 100; animation: maskIn .15s ease; }
.modal-mask.show { display: flex; }
.modal { background: var(--surface); border-radius: 14px; width: 480px; max-width: 94vw; max-height: 88vh; overflow-y: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); border: 1px solid var(--border); animation: modalIn .18s ease; }
.modal h3 { margin-bottom: 18px; }
.modal .row { display: flex; gap: 12px; } .modal .row .field { flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
/* ---- 弹窗表单: 双列网格 + 输入框统一(2026-09-03) ---- */
.modal .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.modal .form-grid .field { margin-bottom: 0; }
.modal .form-grid .field-full { grid-column: 1 / -1; }
.modal .form-grid label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.modal .form-grid .hint { color: var(--text-4); font-weight: 400; font-size: 11.5px; margin-left: 4px; }
.modal .form-grid .inp, .modal .form-grid input.inp { width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; outline: none; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.modal .form-grid .inp:focus, .modal .form-grid input.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.modal .form-grid .inp::placeholder, .modal .form-grid input.inp::placeholder { color: var(--text-4); }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.modal-actions .btn { min-width: 88px; height: 36px; }
@media (max-width: 560px) { .modal .form-grid { grid-template-columns: 1fr; } }
.modal textarea.input { min-height: 80px; resize: vertical; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== 钱多多面板 ===== */
.chat-box { background: var(--surface-2); border-radius: 10px; padding: 16px; height: 340px; overflow-y: auto; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 72%; padding: 10px 14px; border-radius: 12px; line-height: 1.6; white-space: pre-wrap; }
.msg.ai { background: var(--surface); align-self: flex-start; border: 1px solid var(--border); }
.msg.me { background: var(--brand); color: #fff; align-self: flex-end; }
.chat-input { display: flex; gap: 10px; }
.chat-input .input { flex: 1; }
.chat-tip { font-size: 12px; color: var(--text-3); margin-top: 8px; }

/* ===== 消息中心 ===== */
.msg-item { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border-soft); align-items: flex-start; }
.msg-item.unread { background: var(--brand-soft); border-radius: 8px; }
.msg-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; flex-shrink: 0; }
.msg-item .dot.read { background: var(--border); }
.msg-item .m-title { font-weight: 600; margin-bottom: 3px; }
.msg-item .m-content { color: var(--text-2); font-size: 13px; }
.msg-item .m-time { color: var(--text-3); font-size: 12px; margin-top: 4px; }

/* ===== 空态 ===== */
.empty { text-align: center; color: var(--text-3); padding: 36px 0; } .empty .big { font-size: 40px; margin-bottom: 10px; opacity: .85; }

.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); animation: slideIn .2s; }
.toast.success { background: var(--ok); } .toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.muted { color: var(--text-3); } .mini { font-size: 12px; } .mt16 { margin-top: 16px; }

/* ===== 顶栏快捷入口 ===== */
.top-entry { position: relative; cursor: pointer; font-size: 18px; margin-left: 14px; padding: 4px 2px; line-height: 1; display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); white-space: nowrap; flex-shrink: 0; }
.top-label { font-size: 12px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.top-badge { position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff; font-size: 10px; border-radius: 9px; padding: 1px 5px; line-height: 1.4; min-width: 14px; text-align: center; }
.top-badge.warn { background: var(--warn); }

/* ===== 主题切换器 ===== */
.theme-switch { display: inline-flex; align-items: center; gap: 5px; padding: 3px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); margin-left: 8px; }
.theme-switch .ts-btn { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: .18s; position: relative; }
.theme-switch .ts-btn:hover { transform: scale(1.15); }
.theme-switch .ts-btn.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--brand-soft); }
.ts-a { background: linear-gradient(135deg, #2b6cb0, #1a497c); }
.ts-b { background: linear-gradient(135deg, #0e9f8e, #0b7d70); }
.ts-c { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.theme-switch .ts-btn::after { content: attr(title); position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-3); white-space: nowrap; display: none; font-weight: 400; }
.theme-switch .ts-btn:hover::after { display: block; }
body[data-theme="C"] .theme-switch .ts-btn.active { border-color: var(--brand); }

/* ===== 品牌与微交互增强（层叠追加，不影响既有布局） ===== */

/* 卡片悬停上浮 */
.card { transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.panel { transition: box-shadow .18s; }

/* 侧边栏分组与当前态 */
.nav-group { font-size: 11px; color: var(--text-4); letter-spacing: .5px; padding: 14px 14px 6px; text-transform: none; }

/* 页面淡入过渡 */
.page.active { animation: fadeIn .22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 滚动条美化 */
.content::-webkit-scrollbar, .chat-box::-webkit-scrollbar { width: 8px; height: 8px; }
.content::-webkit-scrollbar-thumb, .chat-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.content::-webkit-scrollbar-thumb:hover, .chat-box::-webkit-scrollbar-thumb:hover { background: var(--text-4); }
.content::-webkit-scrollbar-track, .chat-box::-webkit-scrollbar-track { background: transparent; }

/* 空态微增强 */
.empty .big { opacity: .85; }

/* 响应式收窄 */
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar .logo { font-size: 0; padding: 20px 0 16px; text-align: center; }
  .sidebar .brand-logo { width: 30px; height: 30px; }
  .sidebar .logo small { display: none; }
  .nav-item { justify-content: center; padding: 11px 0; font-size: 0; }
  .nav-item .ico { width: auto; font-size: 18px; }
  .nav-item .ico svg { width: 19px; height: 19px; vertical-align: 0; }
  .side-foot { font-size: 0; padding: 14px 0; text-align: center; }
  .side-foot .uname { font-size: 0; }
  .content { padding: 16px; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .theme-switch .ts-btn::after { display: none; }
}

/* Java 正式栈演示页统计卡片 */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 14px; text-align: center; }
.stat-num { font-size: 22px; font-weight: 700; color: var(--brand); word-break: break-all; font-family: var(--mono); }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 4px; word-break: break-all; }

/* ===== 驾驶舱图表组件 ===== */
.hbar { display:flex; flex-direction:column; gap:8px; }
.hb-row { display:flex; align-items:center; gap:10px; font-size:13px; }
.hb-lbl { width:84px; text-align:right; color: var(--text-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:none; }
.hb-track { flex:1; height:14px; background: var(--surface-3); border-radius:7px; overflow:hidden; }
.hb-fill { height:100%; border-radius:7px; transition:width .5s; }
.hb-val { width:44px; text-align:right; font-weight:600; color: var(--text); flex:none; font-family: var(--mono); }
.funnel { display:flex; flex-direction:column; gap:6px; }
.fn-row { display:flex; }
.fn-track { position:relative; height:34px; border-radius:6px; background: var(--surface-3); display:flex; align-items:center; }
.fn-fill { position:absolute; left:0; top:0; bottom:0; border-radius:6px; transition:width .5s; }
.fn-lbl { position:relative; z-index:1; padding-left:12px; color: var(--text); font-weight:600; font-size:13px; }
.donut { display:flex; align-items:center; gap:14px; }
.donut-legend { display:flex; flex-direction:column; gap:5px; font-size:12px; color: var(--text-2); }
.dn-legend { display:flex; align-items:center; gap:6px; }
.dn-legend i { width:10px; height:10px; border-radius:3px; display:inline-block; }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; }
.kpi { background:linear-gradient(135deg, var(--surface), var(--surface-2)); border:1px solid var(--border); border-radius:12px; padding:14px 16px; position:relative; overflow:hidden; }
.kpi .k-label { font-size:12px; color: var(--text-3); }
.kpi .k-num { font-size:24px; font-weight:700; color: var(--text); margin-top:4px; font-family: var(--mono); }
.kpi .k-sub { font-size:11px; color: var(--text-4); margin-top:2px; }
.kpi .k-ico { position:absolute; right:12px; top:12px; font-size:22px; opacity:.85; }
.kpi.up { border-left:4px solid var(--ok); } .kpi.danger { border-left:4px solid var(--danger); }
.kpi.warn { border-left:4px solid var(--warn); } .kpi.info { border-left:4px solid var(--brand-2); }
.dash-grid { display:grid; grid-template-columns:2fr 1fr; gap:16px; }
.dash-grid .full { grid-column:1/-1; }
.dash-grid .col2 { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.insight { border-left:4px solid var(--brand); background: var(--surface-2); border-radius:10px; padding:12px 14px; margin-bottom:10px; }
.insight.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.insight.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.insight.info { border-left-color: var(--brand-2); background: var(--info-soft); }
.insight .i-title { font-weight:600; font-size:14px; display:flex; align-items:center; gap:6px; }
.insight .i-text { font-size:13px; color: var(--text-2); margin:4px 0 8px; }
.btn-mini { font-size:12px; padding:4px 10px; border-radius:6px; border:none; cursor:pointer; background: var(--brand); color:#fff; }
.btn-mini:hover { filter:brightness(1.08); }
.ai-badge { display:inline-flex; align-items:center; gap:4px; background:linear-gradient(135deg,#667eea,#764ba2); color:#fff; font-size:11px; padding:2px 10px; border-radius:20px; font-weight:600; }
@media (max-width:900px){ .dash-grid{grid-template-columns:1fr} .dash-grid .col2{grid-template-columns:1fr} }

/* ===== 工作台: 日常快捷操作 + 今日信号 ===== */
.qdock { display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:10px; }
.qact { display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 8px; border:1px solid var(--border); border-radius:10px; background: var(--surface); cursor:pointer; transition:.15s; font:inherit; color: var(--text-2); }
.qact:hover { border-color: var(--brand); background: var(--brand-soft); transform:translateY(-1px); }
.qico { font-size:22px; }
.qact span:last-child { font-size:12px; color: var(--text-2); }
.sigrow { display:flex; flex-wrap:wrap; gap:10px; }
.sig { display:flex; align-items:center; gap:8px; padding:9px 14px; border-radius:10px; font-size:13px; }
.sig-danger { background: var(--danger-soft); border:1px solid rgba(254,178,178,.6); color: var(--danger); }
.sig-warn { background: var(--warn-soft); border:1px solid rgba(251,211,141,.6); color: var(--warn); }
.sig-info { background: var(--info-soft); border:1px solid rgba(190,227,248,.7); color: var(--info); }
.sig .sico { font-size:16px; }
.sig b { font-size:15px; }
.sig .muted { font-size:12px; }

/* ===== 权限管理: 角色Tab / 迷你按钮 ===== */
.btn-tab { border:none; background:transparent; cursor:pointer; font:inherit; font-size:13px; padding:4px 6px; border-radius:6px; color: var(--brand); }
.btn-tab.active { background: var(--brand); color:#fff; }
.mini-btn { border:none; background:transparent; cursor:pointer; font-size:13px; padding:2px 3px; border-radius:4px; opacity:.7; }
.mini-btn:hover { opacity:1; background: var(--surface-2); }

/* ===== 工作台: 跟单轨迹时间线 ===== */
.track-list{display:flex;flex-direction:column;gap:10px}
.track-item{position:relative;padding-left:18px}
.track-item:not(:last-child)::before{content:'';position:absolute;left:5px;top:16px;bottom:-8px;width:2px;background: var(--border)}
.track-dot{position:absolute;left:0;top:5px;width:12px;height:12px;border-radius:50%;background: var(--brand-2);border:2px solid var(--surface);box-shadow:0 0 0 1px var(--brand-2)}
.track-body{background: var(--surface-2);border:1px solid var(--border-soft);border-radius:8px;padding:8px 10px}
.track-time{color: var(--text-4)}
.track-title{font-size:14px;margin:2px 0}
.track-content{font-size:13px;line-height:1.5}
.track-next{color: var(--warn);margin-top:4px}
/* ===== 团队跟单动态 ===== */
.teamtr-item{display:flex;align-items:center;gap:8px;padding:4px 0;border-bottom:1px dashed var(--border);font-size:13px}
.teamtr-item:last-child{border-bottom:none}
.teamtr-name{font-weight:600;min-width:64px;color: var(--text)}
.teamtr-c{flex:1;color: var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ===== 公告中心 ===== */
.notice-toolbar{display:flex;gap:10px;margin-bottom:16px}
.notice-list{display:flex;flex-direction:column;gap:14px}
.notice-card{background: var(--surface);border:1px solid var(--border-soft);border-radius:12px;padding:16px 18px;box-shadow: var(--shadow-sm)}
.notice-card.pinned{border-left:4px solid var(--warn);background: var(--warn-soft)}
.notice-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.notice-title{font-size:16px;font-weight:600;color: var(--text);margin-bottom:6px}
.notice-content{font-size:14px;line-height:1.7;color: var(--text-2);white-space:pre-wrap}
.notice-ops{display:flex;gap:8px;margin-top:12px;justify-content:flex-end;border-top:1px dashed var(--border);padding-top:10px}
.tag-pin{background: var(--warn-soft);color: var(--warn)}
.tag-ai{background: rgba(124,58,237,.14);color:#8b5cf6}
body[data-theme="C"] .tag-ai{color:#a78bfa}
.card-empty{padding:40px;text-align:center;color: var(--text-4);background: var(--surface);border:1px dashed var(--border);border-radius:12px}

/* ===== 员工工作轨迹 ===== */
.wa-filter{display:flex;align-items:center;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.wa-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border-soft);align-items:flex-start}
.wa-item:last-child{border-bottom:none}
.wa-ico{width:32px;height:32px;border-radius:8px;background: var(--surface-2);display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.wa-body{flex:1;min-width:0}
.wa-title{font-size:13px;font-weight:600;color: var(--text)}
.wa-desc{font-size:12px;color: var(--text-3);margin:2px 0}
.wa-meta{display:flex;align-items:center;gap:8px;margin-top:4px}
.wa-meta .tag{font-size:11px;padding:2px 8px}

/* ===== 工作台公告横幅 ===== */
.notice-banner{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.notice-banner-item{display:flex;align-items:center;gap:8px;padding:10px 14px;background: var(--warn-soft);border:1px solid rgba(255,227,163,.7);border-radius:10px;font-size:13px;font-weight:600;color: var(--warn);transition:background .2s}
.notice-banner-item:hover{background: var(--warn-soft);filter:brightness(1.03)}
.notice-banner-item .banner-tag{flex-shrink:0;font-size:11px;padding:2px 8px;border-radius:20px;background: var(--warn);color:#fff;font-weight:600}
.notice-banner-item .muted{font-weight:400;color: var(--text-3)}

/* ===== 页头返回按钮 ===== */
.ph-left{margin-bottom:10px}
.page-head{display:flex;flex-direction:column;gap:2px;margin-bottom:14px}
.page-head h2{margin:0;font-size:20px}
.page-head p{margin:0;color: var(--text-3)}

/* 首页钱多多快捷对话 */
.money-mini{display:flex;flex-direction:column;gap:8px}
.mini-chat{background: var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:10px;max-height:170px;overflow-y:auto}
.mini-chat .msg{max-width:92%;padding:7px 10px;border-radius:9px;margin-bottom:6px;font-size:13px;line-height:1.55;white-space:pre-wrap}
.mini-chat .msg.ai{background: var(--brand-soft);color: var(--text)}
.mini-chat .msg.me{background: var(--brand);color:#fff;margin-left:auto}
.mini-input{display:flex;gap:6px}
.mini-input .input{flex:1}

/* 今日工作随手记 */
.wl-panel h3{margin-bottom:12px}
.wl-input{display:flex;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.wl-input .input{flex:1;min-width:220px}
.wl-type{flex:0 0 110px;width:110px}
.wl-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.wl-tag{background: var(--surface-2);border:1px solid var(--border);padding:3px 10px;border-radius:14px;font-size:12px;cursor:pointer;color: var(--text-2)}
.wl-tag:hover{background: var(--surface-3)}
.wl-list{border-top:1px dashed var(--border);padding-top:8px;display:flex;flex-direction:column;gap:6px}
.wl-row{display:flex;align-items:center;gap:8px;font-size:13px}
.wl-row .badge{flex:0 0 auto}
.wl-row .muted{margin-left:auto}

/* AI 今日工作日报 */
.ai-daily-btn{margin-bottom:10px}
.btn-ai{background:linear-gradient(135deg,#7c3aed,#4f46e5);color:#fff;border:none;padding:7px 14px;border-radius:8px;cursor:pointer;font-weight:600}
.btn-ai:hover{opacity:.92}
.ai-daily-box{margin:8px 0 10px;padding:10px;border:1px solid var(--border);border-radius:10px;background: var(--surface-2)}
.ai-daily-ta{width:100%;min-height:96px;border:1px solid var(--border);border-radius:8px;padding:8px;font-size:13px;line-height:1.6;resize:vertical;background: var(--surface);color: var(--text)}
.ai-daily-ops{margin-top:8px;display:flex;gap:8px}
.ai-daily-tip{margin:4px 0 8px;color: var(--text-3)}
.wl-mini{margin:6px 0}
.wl-mini summary{cursor:pointer;color: var(--text-3);font-size:12px;padding:2px 0}

/* ===== CRM 客户详情抽屉 ===== */
.drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.drawer-mask { position: absolute; inset: 0; background: rgba(0,0,0,.4); animation: maskIn .15s ease; }
.drawer-body { position: absolute; top: 50%; left: 50%; width: min(1100px, 96vw); max-height: 92vh; height: auto; background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.28); border-radius: 16px; padding: 28px; overflow-y: auto; transform: translate(-50%, -50%) scale(.96); opacity: 0; transition: transform .24s ease, opacity .24s ease; border: 1px solid var(--border); }
.drawer-body.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.cd-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
.cd-side { border-left: 1px solid var(--border); padding-left: 24px; }
@media (max-width: 880px) { .cd-grid { grid-template-columns: 1fr; } .cd-side { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; margin-top: 4px; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.drawer-sec { margin-bottom: 20px; }
.ds-title { font-weight: 600; font-size: 14px; color: var(--text-2); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.ds-grid > div { min-width: 0; }
.ds-grid b { display: block; margin-top: 3px; font-size: 14px; color: var(--text); word-break: break-all; }
.drawer-foot { display: flex; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }

/* 客户等级标签 S/A/B/C */
.lv { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; font-size: 12px; font-weight: 700; line-height: 1; }
.lv.S { background: var(--warn-soft); color: var(--warn); }
.lv.A { background: var(--danger-soft); color: var(--danger); }
.lv.B { background: var(--info-soft); color: var(--info); }
.lv.C { background: var(--surface-3); color: var(--text-2); }

/* 抽屉内联系人表格 + 弹窗 checkbox */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.tbl th { color: var(--text-3); font-weight: 500; font-size: 12px; }
.mini-tbl td { white-space: nowrap; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 14px; cursor: pointer; }
.op.danger { color: var(--danger); }

/* ===== 深色主题专项补丁 (C 工业暗夜) ===== */
body[data-theme="C"] .top-entry { color: var(--text-2); }
body[data-theme="C"] .topbar .title { color: var(--text); }
body[data-theme="C"] .btn-ghost { border-color: var(--border); color: var(--text-2); }
body[data-theme="C"] .btn-ghost:hover { background: var(--surface-2); color: var(--text); }
body[data-theme="C"] .login-card { border-color: var(--border); }
body[data-theme="C"] .login-card h1 { color: var(--brand); }
body[data-theme="C"] .modal-mask { background: rgba(0,0,0,.6); }
body[data-theme="C"] .drawer-mask { background: rgba(0,0,0,.6); }
body[data-theme="C"] .toast { background: #1b2a47; border: 1px solid var(--border); }
body[data-theme="C"] .toast.success { background: var(--ok); border-color: transparent; }
body[data-theme="C"] .toast.error { background: var(--danger); border-color: transparent; }
body[data-theme="C"] .nav-group { color: var(--text-4); }
body[data-theme="C"] .msg-item.unread { background: var(--brand-soft); }
body[data-theme="C"] .msg-item .m-content { color: var(--text-2); }
body[data-theme="C"] .chat-box { border: 1px solid var(--border); }
body[data-theme="C"] .hb-track, body[data-theme="C"] .fn-track { background: var(--surface-3); }
body[data-theme="C"] .track-item:not(:last-child)::before { background: var(--border); }
body[data-theme="C"] .wl-tag:hover { background: var(--surface-3); }
body[data-theme="C"] .btn-tab { color: var(--brand); }
body[data-theme="C"] .theme-switch { background: var(--surface-2); border-color: var(--border); }


/* 工作台待办速览条 (20260904) */
.todo-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0 14px; }
.todo-strip .ts-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; cursor: pointer; transition: .15s; color: var(--text-2); }
.todo-strip .ts-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.todo-strip .ts-chip b { color: var(--danger); font-size: 14px; }

/* 税务申报助手 (20260904) */
.tax-tabs { display: flex; gap: 6px; border-bottom: 2px solid #e3e8ea; }
.tax-tabbtn { border: 1px solid transparent; background: none; padding: 7px 16px; font-size: 14px; cursor: pointer; color: #4b565b; border-radius: 6px 6px 0 0; }
.tax-tabbtn.on { background: #1a5c4d; color: #fff; border-radius: 6px 6px 0 0; }
.tax-tabbtn:hover:not(.on) { background: #eef3f2; }
.tax-stat { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.tax-stat span { background: #f4f6f6; border: 1px solid #e3e8ea; border-radius: 6px; padding: 6px 14px; font-size: 13px; color: #4b565b; }
.tax-stat b { color: #14181a; font-size: 15px; margin-left: 2px; }
table.tax-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
table.tax-tbl th { background: #f4f6f6; text-align: left; padding: 8px 10px; border: 1px solid #e3e8ea; font-weight: 600; color: #4b565b; }
table.tax-tbl td { padding: 8px 10px; border: 1px solid #e3e8ea; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }

.agency-note { margin-top: 14px; background: #f2f7f5; border: 1px solid #d6e4de; border-left: 3px solid #1a5c4d; border-radius: 6px; padding: 10px 14px; }

/* ===== 生产管理弹窗补充 (2026-09-18) ===== */
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.modal-h b { font-size: 17px; color: var(--text); }
.modal-h .x { border: none; background: transparent; cursor: pointer; font-size: 20px; line-height: 1; color: var(--text-4); padding: 2px 8px; border-radius: 8px; }
.modal-h .x:hover { background: var(--surface-2); color: var(--text-2); }
.modal-b { display: block; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.frow { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.frow > label { flex: 0 0 84px; font-size: 12.5px; color: var(--text-2); font-weight: 600; text-align: right; }
.frow input, .frow select, .frow textarea { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; background: var(--surface); color: var(--text); outline: none; box-sizing: border-box; }
.frow input:focus, .frow select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.proc-row input, .proc-row select { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--surface); color: var(--text); outline: none; box-sizing: border-box; }
.btn-xs { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.badge.blue { background: #ebf4ff; color: #1e4e80; }
.badge.orange { background: #fefcbf; color: #7b5b00; }
.badge.green { background: #e6fffa; color: #1f6b45; }
.badge.gray { background: var(--surface-3); color: var(--text-3); }
/* 2026-10-12 交付闭环新增徽标色: 已发货 / 已签收 */
.badge.purple { background: #efeafe; color: #4c3b8a; }
.badge.teal { background: #e2f6f1; color: #116a5e; }
/* 发货弹窗: 随货附件多选 */
.chk-wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 12px; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2, #4a5568); cursor: pointer; }
body[data-theme="C"] .badge.purple { background: rgba(127,119,221,.22); color: #c9c4f5; }
body[data-theme="C"] .badge.teal { background: rgba(29,158,117,.22); color: #9fe1cb; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; }


/* ═══════════════════════════════════════════════════════════════
   2026-09-26 统一输入控件 + 配置BOM 弹窗重做
   ① .inp 此前只在 .modal .form-grid 里有样式，全站其它地方用
      class="inp" 的输入框全部退化成浏览器原生控件（高 19px、字号 12px、
      高矮不一）。这里补上全局 .inp，与 .input / 弹窗表单保持同一套观感。
   ② 配置BOM 弹窗从「flex 拼行 + 硬编码旧配色（#116a5e/#8a857d/#dcd6cc）」
      改为表格化布局 + 全部走主题变量（三套主题自适应）。
   ═══════════════════════════════════════════════════════════════ */
.inp { width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px;
       border: 1px solid var(--border); border-radius: 9px; font-size: 14px; line-height: 1.2;
       font-family: var(--font); outline: none; background: var(--surface); color: var(--text);
       transition: border-color .15s, box-shadow .15s; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.inp::placeholder { color: var(--text-4); }
.inp[readonly], .inp:disabled { background: var(--surface-2); color: var(--text-3); }
select.inp { padding-right: 8px; cursor: pointer; }
textarea.inp { height: auto; min-height: 80px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
input.inp[type="checkbox"], input.inp[type="radio"], input.inp[type="file"] {
       width: auto; height: auto; padding: 0; border: none; background: none; box-shadow: none; border-radius: 0; }

/* ── 配置BOM 弹窗 ── */
.bom-subh { display: flex; flex-direction: column; gap: 2px; margin: -4px 0 14px;
       font-size: 13.5px; color: var(--text-2); }
.bom-subh-t { font-size: 13.5px; }
.bom-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
       padding: 9px 12px; background: var(--surface-2);
       border: 1px solid var(--border); border-bottom: none; border-radius: 10px 10px 0 0; }
.bom-tb-l { display: flex; align-items: center; gap: 8px; }
.bom-tb-t { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.bom-tb-r { display: flex; align-items: baseline; gap: 8px; }
.bom-total { font-family: var(--mono); font-size: 19px; color: var(--brand); letter-spacing: -.3px; }
table.bom-tbl { border-collapse: collapse; }
table.bom-tbl th { padding: 8px 10px; font-size: 12.5px; background: var(--surface-2);
       border-bottom: 1px solid var(--border); color: var(--text-3); font-weight: 600; }
table.bom-tbl th.ta-r, table.bom-tbl td.ta-r { text-align: right; }
table.bom-tbl th.ta-c, table.bom-tbl td.ta-c { text-align: center; }
table.bom-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table.bom-tbl tbody tr:nth-child(even) td { background: var(--surface-2); }
table.bom-tbl .inp { height: 34px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
table.bom-tbl .bom-qty { text-align: right; }
table.bom-tbl .bom-price, table.bom-tbl .bom-sub { display: inline-block; line-height: 34px;
       font-family: var(--mono); font-size: 13px; }
table.bom-tbl .bom-price { color: var(--text-2); }
table.bom-tbl .bom-sub { color: var(--text); font-weight: 600; }
.bom-del { width: 34px; height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent;
       color: var(--text-4); font-size: 13px; line-height: 1; cursor: pointer; font-family: var(--font); }
.bom-del:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.bom-warn { display: inline-block; margin-top: 5px; padding: 1px 7px; border-radius: 20px;
       font-size: 11.5px; background: var(--warn-soft); color: var(--warn); }
.bom-empty td { padding: 28px 16px; text-align: center; color: var(--text-4); font-size: 13px; background: var(--surface); }
.bom-addrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface);
       border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; }
.bom-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
       margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.bom-foot-l { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); }
.bom-foot-l b { font-family: var(--mono); font-size: 14.5px; color: var(--text); }
.bom-arrow { color: var(--text-4); }
.bom-delta { font-family: var(--mono); font-size: 12.5px; padding: 1px 8px; border-radius: 20px; }
.bom-delta.up { background: var(--warn-soft); color: var(--warn); }
.bom-delta.down { background: var(--ok-soft); color: var(--ok); }
.bom-delta.same { background: var(--surface-3); color: var(--text-3); }
.bom-actions { display: flex; gap: 10px; }

/* ===== 生产/设备档案 (③ 工单配置档案·溯源) 2026-10-10 ===== */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; }
.grid2 > div { min-width: 0; }
.sec-title { margin: 16px 0 8px; padding-left: 9px; border-left: 3px solid var(--brand);
       font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2; }
.sec-title:first-child { margin-top: 0; }
.frow > label { flex: 0 0 96px; }
.frow textarea { height: auto; padding: 9px 12px; font-size: 14px; font-family: inherit; resize: vertical; line-height: 1.5; }
.frow > div > input.input { height: 40px; }
table.table .sensor-row .input { height: 34px; padding: 0 9px; font-size: 13px; }
.modal-b h4.muted, .modal-b h5.muted { font-weight: 600; }

/* ===== 生产看板·工单卡片 (2026-10-11) ===== */
.kb-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 14px; }
.kb-col { background: var(--bg, #f7f9fc); border: 1px solid var(--border); border-radius: 12px; padding: 10px; min-height: 90px; }
.kb-col-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0 2px; }
.kb-col-h .cnt { background: var(--brand-soft); color: var(--brand-dark); border-radius: 10px; padding: 1px 9px; font-size: 12px; }
.kb-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(15,23,42,.06); transition: box-shadow .15s; }
.kb-card:hover { box-shadow: 0 3px 10px rgba(15,23,42,.10); }
.kb-card.overdue { border-color: var(--danger); background: var(--danger-soft); }
.kb-card .kb-no { font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kb-card .kb-no .op { cursor: pointer; color: var(--brand-dark); }
.kb-card .kb-prod { font-size: 13px; margin-top: 2px; }
.kb-card .kb-meta { font-size: 11.5px; color: #64748b; margin-top: 5px; line-height: 1.65; }
.kb-card .kb-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.pbar { height: 6px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: 8px; }
.pbar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .3s; }
body[data-theme="C"] .kb-card { background: rgba(255,255,255,.04); }
body[data-theme="C"] .kb-col { background: rgba(255,255,255,.02); }

/* ===== 侧栏滚动条 + 进度条美化 (2026-10-11) ===== */
/* 左侧菜单滚动条: 极细半透明, 不抢戏 */
.nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 3px; }
.nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.30); }
/* 工序进度条: 渐变填充 + 更圆润 */
.pbar { height: 8px; border-radius: 5px; background: rgba(43,108,176,.12); box-shadow: inset 0 1px 2px rgba(15,23,42,.06); }
.pbar > i { border-radius: 5px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%); box-shadow: 0 1px 3px rgba(43,108,176,.35); }
body[data-theme="C"] .pbar { background: rgba(255,255,255,.10); }
