* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb; --primary-dark: #1d4ed8; --bg: #f4f6fa; --card: #fff;
  --text: #1f2937; --muted: #6b7280; --border: #e5e7eb; --danger: #dc2626;
  --green: #16a34a; --orange: #ea580c; --sidebar: #101828;
}
html, body { height: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 40px 44px; width: 400px; box-shadow: 0 24px 60px rgba(0,0,0,.28); text-align: center; }
.login-logo { font-size: 48px; }
.login-card h1 { font-size: 22px; margin: 8px 0 4px; }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.login-card form input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 14px; font-size: 14px; outline: none; }
.login-card form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.login-msg { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 6px; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: left; line-height: 1.8; background: #f9fafb; border-radius: 8px; padding: 10px 12px; }
/* v2.168 登录页忘记密码 / 修改密码链接 + 切换面板 */
.login-links { margin-top: 14px; font-size: 13px; }
.login-links a { color: var(--primary); cursor: pointer; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.login-panel { text-align: left; }
.login-panel.hidden, .login-links.hidden { display: none; }
.login-panel h3 { color: #1f2937; }
.login-panel p { color: #94a3b8; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: var(--sidebar); color: #d0d5dd; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 8px; padding: 18px 20px; font-size: 17px; color: #fff; font-weight: bold; }
.brand i { font-style: normal; color: #93c5fd; font-size: 12px; margin-left: 2px; }
#nav { flex: 1; padding: 8px 10px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; cursor: pointer; margin-bottom: 2px; transition: all .15s; }
#nav a .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; flex-shrink: 0; font-size: 15px; line-height: 1; }
#nav a .nav-label { flex: 1; line-height: 1; }
#nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
#nav a.active { background: var(--primary); color: #fff; }
/* v2.354 侧边栏未读角标（展会留资提醒） */
#nav a .nav-dot { flex-shrink: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: bold; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px rgba(239,68,68,.25); }
.sidebar-foot { padding: 18px 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cur-user { text-align: center; font-size: 12px; color: #9ca3af; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cu-name { line-height: 1.6; }
.cu-badge { line-height: 1; }
/* min-width:0 是关键——flex 子项默认 min-width:auto 会被宽表格撑开导致内容溢出页面；加它后超宽表格在主区域内横向滚动 */
.main { flex: 1; min-width: 0; padding: 22px 26px; overflow-x: auto; }
/* 宽表格滚动容器（贴在表格底部滚动条，不撑破卡片） */
.tbl-scroll { overflow-x: auto; }

/* ---------- 通用 ---------- */
.page-title { font-size: 20px; font-weight: bold; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.page-title small { font-size: 13px; color: var(--muted); font-weight: normal; }
.card { background: var(--card); border-radius: 12px; padding: 18px; box-shadow: 0 1px 3px rgba(16,24,40,.06); margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
.btn { border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; background: #eef2f7; color: var(--text); transition: all .15s; font-family: inherit; }
.btn:hover { filter: brightness(.96); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); filter: none; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-ghost { background: transparent; color: #9ca3af; border: 1px solid rgba(255,255,255,.15); }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; background: #fff; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid #f2f4f7; vertical-align: middle; }
.tbl tr:hover td { background: #f8faff; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* v2.225 手机端卡片列表：宽表格在 ≤760px 改为竖排卡片（桌面显示表格隐藏卡片，手机反之） */
.m-cards { display: none; }
.m-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.m-card .m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.m-card .m-title { font-weight: 600; font-size: 13px; word-break: break-word; }
.m-card .m-sub { font-size: 12px; color: var(--muted); margin-top: 3px; word-break: break-all; line-height: 1.6; }
.m-card .m-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.m-card .m-rows { margin-top: 8px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; align-items: baseline; }
.m-card .m-rows .k { color: var(--muted); white-space: nowrap; }
.m-card .m-rows .v { text-align: right; word-break: break-all; }
.m-card .m-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.b-gray { background: #f3f4f6; color: #4b5563; }
.b-blue { background: #dbeafe; color: #1d4ed8; }
.b-green { background: #dcfce7; color: #15803d; }
.b-orange { background: #ffedd5; color: #c2410c; }
.b-red { background: #fee2e2; color: #b91c1c; }
.b-purple { background: #ede9fe; color: #6d28d9; }

/* ---------- v2.327 审批流程节点（费用报销每个节点显示审批通过时间） ---------- */
.exp-flow { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.exp-flow .exp-node { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.35; padding: 2px 9px; }
.exp-flow .exp-node .exp-node-t { white-space: nowrap; }
.exp-flow .exp-node .exp-node-tm { font-size: 10px; opacity: .78; font-variant-numeric: tabular-nums; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- 工作台 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.stat .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat .value { font-size: 18px; font-weight: bold; font-variant-numeric: tabular-nums; color: var(--primary); }
.stat .value small { font-size: 10px; color: var(--muted); font-weight: normal; margin-left: 4px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .dash-cols { grid-template-columns: 1fr; } }
.mini-list { list-style: none; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 4px; border-bottom: 1px solid #f2f4f7; font-size: 13px; gap: 8px; }
.mini-list li:last-child { border-bottom: none; }
.mini-list .muted { color: var(--muted); }

/* ---------- 弹窗 / 表单 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(16,24,40,.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: 640px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(1280px, 94vw); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: bold; }
.modal-close { border: none; background: none; font-size: 16px; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: #f3f4f6; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.field textarea { resize: vertical; min-height: 60px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.form-err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 16px; }
/* v2.245 报价单默认商务条款提醒 */
.default-tip { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; font-size: 13px; }
.default-tip::before { content: '⚠️'; }
.field input.input-default, .field textarea.input-default, .field select.input-default { border-color: #f59e0b; background: #fffbeb; }
.field input.input-default:focus, .field textarea.input-default:focus, .field select.input-default:focus { border-color: #d97706; box-shadow: 0 0 0 3px rgba(245,158,11,.15); }

/* 订单明细行 */
.item-row { display: grid; grid-template-columns: 2fr 90px 110px 100px 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.item-row input, .item-row select { padding: 8px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.item-total { text-align: right; color: var(--muted); font-size: 13px; }
/* v2.220 商品选择器：自绘可搜索下拉（原生 datalist 在移动端 / Safari 不支持，改为自有实现） */
.prod-picker { position: relative; }
.prod-picker .prod-search { width: 100%; }
.prod-picker .prod-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }
.prod-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.16);
  max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.prod-drop.drop-up { top: auto; bottom: calc(100% + 4px); }
.pd-item { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f2f4f7; font-size: 13px; }
.pd-item:last-child { border-bottom: none; }
.pd-item:hover, .pd-item.active { background: #eff6ff; }
.pd-item .pd-t { color: var(--text); }
.pd-item .pd-s { color: var(--muted); font-size: 12px; margin-top: 1px; }
.pd-item .pd-stock { color: var(--primary); }
.pd-empty { padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.order-summary { display: flex; justify-content: flex-end; gap: 20px; padding: 12px 4px; font-size: 15px; }
.order-summary b { color: var(--primary); font-size: 18px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: none; background: none; padding: 9px 16px; font-size: 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; font-family: inherit; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: bold; }
.tabs .pill { padding: 7px 16px; font-size: 14px; cursor: pointer; color: var(--muted); border-radius: 16px; background: var(--bg); border: 1px solid var(--border); transition: all .15s; }
.tabs .pill:hover { color: var(--primary); border-color: var(--primary); }
.tabs .pill.active { color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 600; }

/* 研发 */
.prog-wrap { background: #f3f4f6; border-radius: 999px; height: 8px; width: 120px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.prog-bar { height: 100%; background: var(--primary); border-radius: 999px; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid #f2f4f7; }
.task-item:last-child { border-bottom: none; }
.task-item input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
.task-item .tname { flex: 1; }
.task-item.done .tname { color: var(--muted); text-decoration: line-through; }

/* 客户详情 */
.timeline { list-style: none; }
.timeline li { padding: 10px 0 10px 14px; border-left: 2px solid #dbeafe; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline .t-date { font-size: 12px; color: var(--muted); }
.timeline .t-op { font-size: 12px; color: var(--primary); margin-left: 8px; }

/* Toast */
.toast { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); background: #101828; color: #fff; padding: 11px 22px; border-radius: 10px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; max-width: 90vw; }
.toast.err { background: var(--danger); }

/* v2.216 移动端 UI 适配：侧边栏转顶栏 / 表格 / 弹窗 / 表单 / stat / toolbar / 登录页全宽 */
@media (max-width: 760px) {
  /* 整体：顶栏 + 主区纵向，避免水平溢出 */
  body { font-size: 13px; }
  .app { flex-direction: column; min-height: 100vh; }
  .main { padding: 14px 14px 28px; }

  /* 侧边栏 → 顶部条：横向 nav 滚动 */
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
  }
  .brand {
    padding: 10px 14px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    gap: 6px;
  }
  .brand-icon { width: 26px !important; height: 26px !important; }
  #nav {
    flex: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 8px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 2px;
  }
  #nav a {
    flex: 0 0 auto;
    padding: 7px 12px;
    margin-bottom: 0;
    font-size: 13px;
    white-space: nowrap;
  }

  /* 顶栏底部：账号信息 + 退出 + 版本号 → 横排一行 */
  .sidebar-foot {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .cur-user {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    font-size: 12px;
  }
  .cu-name { font-size: 12px; }
  .sidebar-foot .btn { width: auto !important; padding: 4px 12px !important; font-size: 12px !important; }
  .sidebar-foot > div:last-child { display: none; }

  /* 页面标题：标题与说明换行垂直堆叠 */
  .page-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 17px;
    margin-bottom: 12px;
  }
  .page-title small { font-size: 12px; line-height: 1.5; }

  /* 卡片：缩小 padding */
  .card { padding: 14px; border-radius: 10px; margin-bottom: 12px; }
  .card h3 { font-size: 14px; margin-bottom: 10px; }

  /* 工作台统计：1 列，缩小 padding 和字号 */
  .stat-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .value { font-size: 16px; }
  .stat .value small { font-size: 10px; }

  /* 工作台双栏 → 单栏 */
  .dash-cols { grid-template-columns: 1fr; gap: 12px; }

  /* 工具条：搜索 / 筛选 / 按钮列向堆叠 */
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .toolbar > * { width: 100% !important; max-width: none !important; }
  .toolbar input, .toolbar select { width: 100%; font-size: 14px; padding: 10px 12px; }
  .toolbar .btn { width: auto; align-self: flex-start; }

  /* tabs：横向滚动不换行 */
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs button { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }

  /* 表格：单元格允许换行，小屏关键列保留 max-width 截断 */
  .tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 7px 6px; word-break: break-word; }
  .tbl th { white-space: nowrap; }
  .tbl td { white-space: normal; }
  /* 表格包裹层强制横向滚动（卡片内表格超宽可左右滑） */
  .tbl-scroll { -webkit-overflow-scrolling: touch; }

  /* v2.225：宽表格列表 → 手机竖排卡片（桌面表格隐藏） */
  .m-cards { display: block; }
  .m-hide { display: none !important; }
  .m-card { padding: 9px 11px; margin-bottom: 9px; }

  /* 弹窗：几乎全屏，外边距收缩 */
  .modal-mask { padding: 8px; align-items: flex-end; }
  .modal { width: 100% !important; max-width: 100% !important; max-height: 92vh; border-radius: 12px 12px 0 0; }
  .modal.wide { width: 100% !important; }
  .modal-head { padding: 12px 14px; font-size: 15px; }
  .modal-body { padding: 14px; }

  /* 表单：单列 */
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-foot { flex-direction: column-reverse; gap: 8px; }
  .form-foot .btn { width: 100%; }

  /* 订单明细行：两行 */
  .item-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .item-row > * { font-size: 13px; }
  /* 商品选择器占满整行 + 下拉限高（手机输入时不被键盘遮挡） */
  .item-row .prod-picker { grid-column: 1 / -1; }
  .prod-drop { max-height: 220px; }
  .order-summary { flex-direction: column; align-items: flex-end; gap: 6px; padding: 10px 4px; font-size: 14px; }
  .order-summary b { font-size: 16px; }

  /* 登录页：全宽 */
  .login-card { width: 100%; max-width: 360px; padding: 28px 22px; border-radius: 12px; }
  .login-card h1 { font-size: 18px; }
  .login-sub { font-size: 12px; margin-bottom: 18px; }
  .login-logo img { width: 60px !important; height: 60px !important; }

  /* Toast 收紧 */
  .toast { font-size: 13px; padding: 9px 16px; max-width: 86vw; }
}

/* v2.216 极窄屏（<= 380px）兜底：进一步收缩字号与 padding */
@media (max-width: 380px) {
  body { font-size: 12px; }
  .main { padding: 10px 10px 24px; }
  .card { padding: 12px; }
  .stat .value { font-size: 15px; }
  .brand { font-size: 13px; }
  #nav a { padding: 6px 10px; font-size: 12px; }
}

/* ---------- v2.253 知识库 / 解决方案：富文本编辑器与正文渲染 ---------- */
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--bg); border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; }
.rt-toolbar button { min-width: 34px; height: 30px; padding: 0 8px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; color: var(--text); }
.rt-toolbar button:hover { border-color: var(--primary); color: var(--primary); background: #f0f6ff; }
.rt-editor { min-height: 200px; max-height: 46vh; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: 0 0 8px 8px; background: #fff; outline: none; line-height: 1.75; }
.rt-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
.rt-content { line-height: 1.8; word-break: break-word; }
.rt-content h1, .rt-content h2, .rt-content h3, .rt-content h4 { margin: 12px 0 6px; line-height: 1.4; }
.rt-content h1 { font-size: 19px; } .rt-content h2 { font-size: 17px; }
.rt-content h3 { font-size: 15.5px; } .rt-content h4 { font-size: 14.5px; }
.rt-content p { margin: 6px 0; }
.rt-content ul, .rt-content ol { margin: 6px 0 6px 22px; }
.rt-content li { margin: 3px 0; }
.rt-content blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--primary); background: var(--bg); color: var(--muted); border-radius: 0 6px 6px 0; }
.rt-content code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-family: Consolas, Monaco, monospace; font-size: 13px; }
.rt-content pre { background: #f3f4f6; padding: 10px 12px; border-radius: 8px; overflow-x: auto; font-family: Consolas, Monaco, monospace; font-size: 13px; }
.rt-content a { color: var(--primary); }
.rt-content table { border-collapse: collapse; margin: 8px 0; }
.rt-content td, .rt-content th { border: 1px solid var(--border); padding: 5px 9px; }
.rt-content hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }

/* v2.257：入库检验报告单 —— 公司 LOGO + 公司名 + 检验单 + 检验结论 */
.inspect-report { font-size: 14px; color: #1e293b; background: #fff; }
.inspect-report .ir-header { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 2px solid #1e293b; border-radius: 10px; margin-bottom: 14px; background: linear-gradient(180deg, #fff 0%, #f8fafc 100%); }
.inspect-report .ir-logo { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.inspect-report .ir-company { flex: 1; }
.inspect-report .ir-company-name { font-size: 18px; font-weight: 700; color: #0f172a; letter-spacing: 0.5px; }
.inspect-report .ir-company-sub { font-size: 12px; color: #64748b; margin-top: 3px; }
.inspect-report .ir-title-block { text-align: right; }
.inspect-report .ir-title { font-size: 17px; font-weight: 700; color: #1e40af; letter-spacing: 1px; }
.inspect-report .ir-no { font-size: 12px; color: #475569; margin-top: 4px; }
.inspect-report .ir-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; margin-left: 6px; background: #e2e8f0; color: #475569; vertical-align: middle; }
.inspect-report .ir-status-待检验 { background: #fef3c7; color: #92400e; }
.inspect-report .ir-status-已合格 { background: #d1fae5; color: #065f46; }
.inspect-report .ir-status-已不合格 { background: #fee2e2; color: #991b1b; }
.inspect-report .ir-status-已入库 { background: #dbeafe; color: #1e40af; }
.inspect-report .ir-section { margin-bottom: 14px; }
.inspect-report .ir-section-title { font-size: 13px; font-weight: 700; color: #1e40af; border-left: 4px solid #3b82f6; padding-left: 10px; margin-bottom: 6px; background: linear-gradient(90deg, #eff6ff 0%, transparent 100%); padding-top: 4px; padding-bottom: 4px; }
.inspect-report .ir-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; padding: 10px 14px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
.inspect-report .ir-meta-k { display: inline-block; min-width: 70px; color: #64748b; font-size: 12px; }
.inspect-report .ir-meta-v { color: #1e293b; font-weight: 500; }
.inspect-report .ir-meta-full { grid-column: 1 / -1; }
.inspect-report .ir-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inspect-report .ir-table th, .inspect-report .ir-table td { border: 1px solid #cbd5e1; padding: 8px 12px; }
.inspect-report .ir-table thead th { background: #eff6ff; color: #1e40af; font-weight: 600; text-align: left; }
.inspect-report .ir-table td.num, .inspect-report .ir-table th.num { text-align: right; }
.inspect-report .ir-empty { text-align: center; color: #94a3b8; padding: 16px; }
.inspect-report .ir-cell-name { padding-left: 14px; }
.inspect-report .ir-cell-result { text-align: center; }
.inspect-report .ir-pill { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; min-width: 60px; text-align: center; }
.inspect-report .ir-pill-ok { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.inspect-report .ir-pill-ng { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.inspect-report .ir-pill-na { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.inspect-report .ir-pill-xl { font-size: 22px; padding: 14px 32px; border-radius: 16px; letter-spacing: 2px; min-width: 140px; }
.inspect-report .ir-section-conclusion { background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%); padding: 18px 20px; border-radius: 10px; border: 2px dashed #f59e0b; margin-top: 18px; }
.inspect-report .ir-conclusion { text-align: center; }
.inspect-report .ir-conclusion-label { font-size: 13px; color: #92400e; letter-spacing: 4px; margin-bottom: 10px; font-weight: 600; }
.inspect-report .ir-conclusion-pill { display: inline-block; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.inspect-report .ir-conclusion-meta { font-size: 13px; color: #475569; }
.inspect-report .ir-conclusion-note { font-size: 13px; color: #92400e; margin-top: 8px; padding: 8px 12px; background: rgba(255, 255, 255, 0.6); border-radius: 6px; text-align: left; }
.inspect-report .ir-edit-conclusion { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inspect-report .ir-edit-field { display: flex; flex-direction: column; }
.inspect-report .ir-edit-field:first-child { grid-column: 1 / -1; }
.inspect-report .ir-edit-field:last-child { grid-column: 1 / -1; }
.inspect-report .ir-edit-field label { font-size: 12px; color: #475569; margin-bottom: 4px; font-weight: 600; }
.inspect-report .ir-required { color: #ef4444; font-weight: 400; font-size: 11px; margin-left: 4px; }
.inspect-report .ir-input, .inspect-report .ir-select, .inspect-report .ir-textarea { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; font-family: inherit; width: 100%; box-sizing: border-box; background: #fff; }
.inspect-report .ir-select-lg { font-size: 16px; padding: 8px 12px; font-weight: 600; }
.inspect-report .ir-textarea { resize: vertical; }
.inspect-report .ir-signatures { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 22px; padding-top: 16px; border-top: 1px dashed #94a3b8; }
.inspect-report .ir-sig { text-align: center; }
.inspect-report .ir-sig-label { font-size: 12px; color: #64748b; margin-bottom: 26px; }
.inspect-report .ir-sig-name { font-size: 14px; font-weight: 600; color: #1e293b; border-bottom: 1px solid #475569; padding: 0 12px 4px; min-height: 24px; }
.inspect-report .ir-sig-date { font-size: 11px; color: #94a3b8; margin-top: 4px; min-height: 14px; }
.inspect-report .ir-foot { display: flex; justify-content: space-between; font-size: 11px; color: #94a3b8; padding-top: 12px; margin-top: 16px; border-top: 1px solid #e2e8f0; }

/* ---------- v2.286：采购入库单（复用检验报告单版式，绿色主题） ---------- */
.goods-receipt .ir-header { border-color: #065f46; background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%); }
.goods-receipt .ir-title { color: #047857; }
.goods-receipt .ir-section-title { color: #047857; border-left-color: #10b981; background: linear-gradient(90deg, #ecfdf5 0%, transparent 100%); }
.goods-receipt .ir-table thead th { background: #ecfdf5; color: #047857; }
.goods-receipt .ir-table tfoot td { background: #f0fdf4; font-weight: 700; color: #065f46; }
.goods-receipt .gr-tf-label { text-align: right; padding-right: 14px; }
.goods-receipt .gr-qty-section { background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%); padding: 16px 20px; border-radius: 10px; border: 2px dashed #10b981; }
.goods-receipt .gr-qty-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.goods-receipt .gr-qty-label { font-size: 14px; font-weight: 700; color: #065f46; }
.goods-receipt .gr-qty-input { width: 160px; padding: 8px 12px; font-size: 18px; font-weight: 700; color: #065f46; border: 2px solid #10b981; border-radius: 8px; text-align: center; font-family: inherit; background: #fff; }
.goods-receipt .gr-qty-hint { flex: 1 1 100%; font-size: 12px; color: #047857; }
@media print {
  body { background: #fff !important; }
  /* v2.284：打印 / 另存为 PDF 只输出弹窗内的检验报告单——隐藏底下整页界面（列表、统计卡等）
     （全项目仅检验报告单走当前页 window.print()，其余打印均为新窗口，不受影响） */
  #app, #toast { display: none !important; }
  /* 隐藏弹窗头部 ✕ / 底部按钮 */
  .form-foot, .modal-close, .modal-head, button { display: none !important; }
  .modal-mask { position: static !important; background: #fff !important; padding: 0 !important; }
  .modal { box-shadow: none !important; border: none !important; max-width: 100% !important; width: 100% !important; }
  .modal-body { padding: 0 !important; overflow: visible !important; }
  .inspect-report .ir-header { border: 2px solid #000 !important; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inspect-report .ir-section-conclusion { border: 2px dashed #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inspect-report .ir-pill, .inspect-report .ir-status, .inspect-report .ir-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inspect-report .ir-input, .inspect-report .ir-select, .inspect-report .ir-textarea { border: none !important; background: transparent !important; padding: 0 !important; }
  details { display: none !important; }
}

/* v2.266：入库检验列表已统一使用全局 stat-grid / toolbar / tbl / actions / badge 组件，
   此处不再保留列表专用样式；.inspect-report 相关样式保留在上方。 */

/* v2.268：申请入库检验弹窗优化 —— 步骤条 + 紧凑信息卡 + 数量编辑 */
.info-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.ira-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 12px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; font-size: 12px; }
.ira-step { display: flex; align-items: center; gap: 6px; color: #64748b; }
.ira-step-dot { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 600; }
.ira-step.active { color: #1e40af; font-weight: 600; }
.ira-step.active .ira-step-dot { background: #3b82f6; color: #fff; }
.ira-step.done { color: #065f46; }
.ira-step.done .ira-step-dot { background: #10b981; color: #fff; }
.ira-step-arrow { color: #94a3b8; font-size: 12px; }
.ira-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.ira-no { font-size: 15px; font-weight: 600; }
.ira-ro { min-height: 34px; padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.ira-qty-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ira-items input[type="number"] { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; text-align: right; }
.ira-items input[type="number"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); outline: none; }

/* ============ v2.311 网页一键更新（系统设置 → 版本更新） ============ */
#updCard .upd-row { display: flex; gap: 10px; font-size: 13px; margin: 5px 0; line-height: 1.6; }
#updCard .upd-row .k { color: var(--muted); min-width: 76px; flex: none; }
#updCard .upd-row .v { word-break: break-all; }
.upd-alert { border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.75; margin: 10px 0; }
.upd-alert.info { background: #eff6ff; color: #1d4ed8; }
.upd-alert.warn { background: #fffbeb; color: #b45309; }
.upd-alert.err { background: #fef2f2; color: #b91c1c; }
.upd-alert.ok { background: #f0fdf4; color: #15803d; }
.upd-src { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 10px 0; }
.upd-src > div { flex: 1; padding: 10px 14px; text-align: center; background: #f8fafc; }
.upd-src > div + div { border-left: 1px solid var(--border); }
.upd-src .t { font-size: 12px; color: var(--muted); }
.upd-src .v { font-size: 19px; font-weight: 700; margin-top: 3px; }
.upd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.upd-tag { font-size: 12px; border-radius: 999px; padding: 4px 10px; background: #f1f5f9; color: #334155; }
.upd-tag.add { background: #eef2ff; color: #4338ca; }
.upd-tag.chg { background: #fff7ed; color: #c2410c; }
.upd-list { max-height: 180px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.9; background: #fcfcfd; }
.upd-list .s-missing { color: #4338ca; }
.upd-list .s-changed { color: #c2410c; }
.upd-list .s-target-only { color: #64748b; }
.upd-bar { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin: 10px 0; }
.upd-bar > i { display: block; height: 100%; background: var(--primary); transition: width .2s; }
.upd-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid #cbd5e1; border-top-color: var(--primary); border-radius: 50%; animation: updspin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes updspin { to { transform: rotate(360deg); } }
.upd-steps { font-size: 13px; line-height: 1.9; }
.upd-steps .ok::before { content: "✓ "; color: var(--green); font-weight: 700; }
.upd-steps .fail::before { content: "✕ "; color: var(--danger); font-weight: 700; }
.upd-chk { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 8px 0; line-height: 1.6; }
.upd-chk input { margin-top: 3px; flex: none; }
.upd-file { display: none; }
.upd-hist { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 8px; }

/* ================= v2.330 统一工作台（我的待办 / 我的申请 / 角色数据） =================
   v2.336：欢迎 + 待办 + 我发起的申请 合成一张面板（.wb-panel）：
   顶部蓝色欢迎横条，下方左右 1:1 等宽两栏，内容底部对齐后整块收口，
   不再出现「欢迎条通栏 / 双栏限宽 / 窄屏单列空荡」的割裂与空白 */
   v2.337：面板去掉 1240/1360 限宽，随窗口通栏自适应（与下方经营数据等区块同宽），
   两栏仍严格 1:1，任何分辨率下都不再出现「面板浮在中间、两侧大留白」 */
.wb-panel { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid #e6eaf2; box-shadow: 0 4px 16px -8px rgba(15, 23, 42, .12); }

/* 欢迎横条：面板顶栏（圆角由面板统一裁切） */
.wb-hello { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(115deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%); padding: 16px 24px; color: #fff; position: relative; overflow: hidden; }
.wb-hello::after { content: ''; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.wb-hello::before { content: ''; position: absolute; right: 90px; bottom: -110px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.wb-hello .hi-ava { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .18); border: 2px solid rgba(255, 255, 255, .55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex: none; position: relative; z-index: 1; }
.wb-hello .hi-txt { flex: 1; min-width: 200px; position: relative; z-index: 1; }
.wb-hello .hi-name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.wb-hello .hi-sub { font-size: 12.5px; color: rgba(255, 255, 255, .82); margin-top: 3px; line-height: 1.8; }
.wb-hello .hi-badge { font-size: 12px; border-radius: 999px; padding: 3px 11px; background: rgba(255, 255, 255, .16); color: #fff; white-space: nowrap; }
/* 右侧待办统计块：白底圆角卡，数字大字 + 说明小字 */
.wb-hello .hi-todo { position: relative; z-index: 1; background: #fff; color: var(--text); border-radius: 12px; padding: 9px 18px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(15, 23, 42, .15); flex: none; }
.wb-hello .hi-todo .n { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.wb-hello .hi-todo .n.zero { color: #16a34a; }
.wb-hello .hi-todo .n.warn { color: #d97706; }
.wb-hello .hi-todo .d { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* 两栏：严格 1:1 等宽（minmax(0,1fr)），栏间距用中缝分隔线，行首尾留白一致 */
.wb-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wb-body .wb-sec { padding: 14px 18px 6px; margin-bottom: 0; min-width: 0; }
.wb-body .wb-sec:first-child { border-right: 1px solid #eef1f6; }
.wb-body .wb-sec .wb-group, .wb-body .wb-sec .wb-card-list, .wb-body .wb-sec .wb-empty { border-color: #eef1f6; }
@media (max-width: 1100px) {
  .wb-body { grid-template-columns: 1fr; }
  .wb-body .wb-sec:first-child { border-right: none; border-bottom: 1px solid #eef1f6; }
}

.wb-sec { margin-bottom: 18px; }
.wb-sec-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.wb-sec-hd h3 { font-size: 14.5px; font-weight: 700; margin: 0; }
.wb-sec-hd .cnt { font-size: 12px; font-weight: 700; color: #fff; background: var(--danger); border-radius: 999px; padding: 2px 9px; }
.wb-sec-hd .cnt.zero { background: #cbd5e1; }
.wb-sec-hd .tip { font-size: 12px; color: var(--muted); margin-left: auto; }

.wb-group { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: #fff; }
.wb-group-hd { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #f8fafc; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.wb-group-hd .n { font-size: 11.5px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 1px 8px; }
.wb-group-hd .go { margin-left: auto; font-size: 12px; font-weight: 400; }
.wb-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #f2f4f7; font-size: 13px; }
.wb-item:last-child { border-bottom: none; }
.wb-item:hover { background: #fafbfc; }
/* v2.333：标题簇不再拉伸占满整行（flex:1 会在宽屏把金额挤到最右、中间留大洞）；
   金额 / 环节 / 按钮全部紧随其后紧凑排列，多余空间留在行尾 */
.wb-item .it-main { flex: 0 1 auto; min-width: 0; max-width: 46%; }
.wb-item .it-t { font-weight: 600; color: var(--text); }
.wb-item .it-t .no { font-family: ui-monospace, monospace; font-size: 12px; color: var(--primary); margin-right: 6px; }
.wb-item .it-s { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-item .it-amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-item .it-step { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.wb-item .it-step b { color: #b45309; }
.wb-item .it-act { white-space: nowrap; }

.wb-prog { display: inline-flex; align-items: center; gap: 3px; }
.wb-prog i { width: 13px; height: 5px; border-radius: 999px; background: #e2e8f0; display: inline-block; }
.wb-prog i.on { background: var(--green); }
.wb-prog i.cur { background: #f59e0b; }
.wb-prog i.no { background: #fca5a5; }

.wb-card-list .wb-item { align-items: flex-start; }
.wb-empty { text-align: center; padding: 26px 16px; color: var(--muted); font-size: 13px; line-height: 2; }
.wb-empty .big { font-size: 26px; display: block; margin-bottom: 4px; }
.wb-more { padding: 9px 14px; text-align: center; border-top: 1px solid #f2f4f7; }

@media (max-width: 760px) {
  .wb-item { flex-wrap: wrap; gap: 6px 10px; }
  .wb-item .it-amt, .wb-item .it-step { font-size: 12px; }
  .wb-hello { padding: 13px 16px; gap: 12px; }
  .wb-hello .hi-name { font-size: 15px; }
  .wb-hello .hi-todo { padding: 8px 14px; }
  .wb-hello .hi-todo .n { font-size: 21px; }
  .wb-body .wb-sec { padding: 12px 14px 4px; }
}

/* ================= v2.345 绩效考核 ================= */
/* 考核表弹窗头部的信息条：被考核人 / 部门 / 周期 / 模板 / 状态 / 总分 */
.pf-hd { display: flex; flex-wrap: wrap; gap: 8px 22px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.pf-hd > div { display: flex; align-items: center; gap: 6px; }
.pf-hd .muted { font-size: 12px; }
/* 考核表表格：指标列左对齐，分数列窄且居中，便于逐项填分 */
.pf-tbl th, .pf-tbl td { vertical-align: middle; }
.pf-tbl td input[type=number] { text-align: center; }
.pf-tbl td input[type=text], .pf-tbl td input:not([type]) { padding: 4px 7px; font-size: 12.5px; }
/* 模板指标编辑器：序号 / 名称 / 说明 / 权重 / 不考核 / 删除 一行六列 */
.pf-items { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; max-height: 46vh; overflow: auto; }
.pf-item-row { display: grid; grid-template-columns: 22px minmax(120px, 1.1fr) minmax(150px, 1.7fr) 62px 72px 22px; gap: 6px; align-items: center; }
.pf-item-row > input { padding: 4px 7px; font-size: 12.5px; min-width: 0; }
.pf-in-w { text-align: center; }
.pf-in-ex { display: flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pf-in-ex input { width: 13px; height: 13px; }
.pf-ix { font-size: 11.5px; color: var(--muted); text-align: center; }
.pf-del { color: var(--danger); font-weight: 700; cursor: pointer; text-align: center; font-size: 15px; line-height: 1; }
@media (max-width: 760px) {
  .pf-item-row { grid-template-columns: 20px 1fr 54px 66px 20px; }
  .pf-in-detail { display: none; }
}

/* ================= v2.344 个人待办 ================= */
/* 工作台区块：整块卡片，内容两列排布 */
.td-sec { background: #fff; border: 1px solid #e6eaf2; border-radius: 14px; padding: 14px 18px 12px; box-shadow: 0 4px 16px -8px rgba(15, 23, 42, .12); }
.td-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.td-segs { display: inline-flex; background: #f1f5f9; border-radius: 9px; padding: 2px; gap: 2px; }
.td-seg { border: none; background: transparent; color: #475569; font-size: 12.5px; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.td-seg:hover { background: rgba(255, 255, 255, .7); }
.td-seg.on { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.td-search { width: 190px; margin-left: auto; padding: 6px 10px; font-size: 12.5px; }
/* 卡片 */
.td-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.td-sec .td-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.td-card { border: 1px solid #e6eaf2; border-radius: 11px; padding: 11px 13px; background: #fff; display: flex; flex-direction: column; gap: 7px; }
.td-card.overdue { border-color: #fecaca; background: #fffbfb; }
.td-card.finished { opacity: .72; background: #fafcfa; }
.td-hd { display: flex; align-items: center; gap: 8px; }
.td-pri { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 7px; color: #fff; }
.td-pri.b-red { background: #dc2626; }
.td-pri.b-orange { background: #f59e0b; }
.td-pri.b-gray { background: #94a3b8; }
.td-title { font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-title.done { text-decoration: line-through; color: var(--muted); }
.td-pct { font-size: 12.5px; font-weight: 700; color: var(--primary); flex: none; }
/* 进度条 */
.td-bar { height: 6px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.td-bar i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .25s; }
.td-bar i.ok { background: #16a34a; }
.td-bar i.warn { background: #f59e0b; }
.td-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: #475569; }
.td-late { color: var(--danger); font-weight: 700; }
.td-note { font-size: 12px; color: var(--muted); background: #f8fafc; border-radius: 7px; padding: 6px 9px; }
/* 子任务 */
.td-subs { display: flex; flex-direction: column; gap: 3px; }
.td-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 400; padding: 2px 0; }
.td-sub input[type=checkbox] { width: 14px; height: 14px; flex: none; }
.td-sub.done > span { text-decoration: line-through; color: var(--muted); }
.td-sub-del { color: var(--danger); cursor: pointer; font-weight: 700; padding: 0 4px; flex: none; }
.td-sub-add { display: flex; gap: 6px; align-items: center; }
.td-sub-add input { flex: 1; padding: 4px 8px; font-size: 12px; }
.td-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 2px; }
.td-prog-quick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.td-prog-quick input[type=range] { width: 96px; }
/* 弹窗里的子任务草稿 */
.td-draft { border: 1px solid var(--border); border-radius: 8px; padding: 8px; max-height: 150px; overflow: auto; font-size: 12.5px; }
.td-draft-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.td-draft-row > span { color: var(--muted); flex: none; width: 18px; }
.td-draft-row > input { flex: 1; padding: 3px 7px; font-size: 12.5px; }
.td-draft-row > a { color: var(--danger); cursor: pointer; font-weight: 700; padding: 0 4px; }
@media (max-width: 760px) { .td-grid, .td-sec .td-grid { grid-template-columns: 1fr; } .td-search { margin-left: 0; width: 100%; } }

/* ================= v2.341 工作台日历 / 日程 ================= */
.wb-cal { margin: 0 auto 18px; }
.wb-cal h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.wb-cal h3 > div { display: flex; gap: 6px; align-items: center; }
.wb-cal .cal-invite { font-size: 12.5px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; }
/* v2.343：月历占卡片一半宽度（随屏幕自适应），右侧当日日程面板占另一半 */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .cal-wrap { grid-template-columns: 1fr; } }
.cal-member { width: auto; font-size: 12.5px; padding: 4px 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 3px 0; }
.cal-head.sun { color: #dc2626; }
.cal-cell { min-height: 68px; border-radius: 8px; border: 1px solid transparent; padding: 4px 5px; cursor: pointer; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; background: #fff; overflow: hidden; }
.cal-cell:hover { background: #f1f5f9; }
.cal-cell.today { border-color: var(--primary); }
.cal-cell.sel { background: #eff6ff; border-color: var(--primary); }
.cal-cell .d { font-weight: 600; }
.cal-cell .dots { display: flex; gap: 2px; }
.cal-cell .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); display: inline-block; }
/* v2.343：日历格内日程条 */
.cal-ev { display: block; font-size: 11px; line-height: 1.35; background: #eff6ff; color: #1e40af; border-left: 3px solid var(--primary); border-radius: 4px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.cal-ev b { margin-right: 3px; font-weight: 700; }
.cal-ev.more { background: transparent; border-left-color: transparent; color: var(--muted); text-align: center; }
.cal-cell.today .cal-ev { background: #dbeafe; }
.cal-cell.sel .cal-ev { background: #dbeafe; }
.cal-day-panel { border-left: 1px solid #eef1f6; padding-left: 18px; min-width: 0; }
@media (max-width: 1000px) { .cal-day-panel { border-left: none; padding-left: 0; border-top: 1px solid #eef1f6; padding-top: 12px; } }
.cal-day-hd { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ev-row { border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.ev-row .ev-t { font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-row .ev-title { font-weight: 700; }
.ev-row .ev-s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ev-row .ev-ops { margin-top: 6px; display: flex; gap: 6px; }
.ev-empty { color: var(--muted); font-size: 13px; padding: 22px 0; text-align: center; }

/* ================= v2.332 招聘：候选人阶段标签 =================
   阶段标签用自绘小胶囊（比 .badge 更紧凑，便于在表格行内与阶段选择器并排） */
.st-gray, .st-blue, .st-purple, .st-orange, .st-green, .st-dim {
  display: inline-block; font-size: 11.5px; font-weight: 600; line-height: 18px;
  padding: 0 8px; border-radius: 999px; white-space: nowrap;
}
.st-gray { background: #f3f4f6; color: #4b5563; }
.st-blue { background: #dbeafe; color: #1d4ed8; }
.st-purple { background: #ede9fe; color: #6d28d9; }
.st-orange { background: #ffedd5; color: #c2410c; }
.st-green { background: #dcfce7; color: #15803d; }
.st-dim { background: #f8fafc; color: #94a3b8; border: 1px dashed #e2e8f0; }
/* 招聘需求卡片的 h3 里带操作按钮，窄屏时换行显示 */
@media (max-width: 900px) {
  .card > h3 > span[style*="float:right"] { float: none !important; display: block; margin-top: 6px; }
}
