/* ===== 砖鼠图文广告管理系统 - 全局样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #1a3a5c;
  --primary-light: #2d6a9f;
  --primary-dark: #0f2440;
  --blue: #1890ff;
  --green: #52c41a;
  --orange: #fa8c16;
  --red: #ff4d4f;
  --bg: #f0f2f5;
  --bg-card: #fff;
  --text: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --shadow: 0 1px 4px rgba(0,0,0,0.06);
  --radius: 8px;
  --sidebar-width: 220px;
  --header-height: 48px;
}
html, body { height: 100%; font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

/* ===== 布局 ===== */
.app-layout { display: flex; height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--primary); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-logo { padding: 16px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo h1 { font-size: 18px; font-weight: 700; }
/* 自定义 LOGO（2026-09-27 品牌自定义）：侧边栏标题内联小图 */
/* 2026-10-30：LOGO 多为横版字标，改成按高度自适应宽度，避免被压成方块 */
.sidebar-logo h1 span img { height: 24px; width: auto; max-width: 118px; object-fit: contain; vertical-align: -6px; border-radius: 0; }
.sidebar-logo p { font-size: 11px; opacity: 0.6; margin-top: 2px; }
.sidebar-menu { flex: 1; overflow-y: auto; padding: 8px 0; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 12px 20px; cursor: pointer; font-size: 14px; border-left: 3px solid transparent; transition: all 0.2s; }
.menu-item:hover { background: rgba(255,255,255,0.1); }
.menu-item.active { background: rgba(255,255,255,0.15); border-left-color: var(--blue); }
.menu-item .icon { font-size: 18px; width: 24px; text-align: center; }
.menu-item .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 10px; }

.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.top-bar { height: var(--header-height); background: #fff; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.top-bar .breadcrumb { font-size: 12px; color: var(--text-muted); }
.top-bar .breadcrumb span { color: var(--text); }
.top-bar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-bar .search-box { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; width: 180px; outline: none; }
.top-bar .search-box:focus { border-color: var(--blue); }

.content { flex: 1; overflow-y: auto; padding: 16px; }

/* ===== 页面切换 ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== 统计卡片 ===== */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 12px; color: var(--text-muted); }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.stat-card .sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.stat-card.color-green .value { color: var(--green); }
.stat-card.color-orange .value { color: var(--orange); }
.stat-card.color-red .value { color: var(--red); }
.stat-card.color-blue .value { color: var(--blue); }

/* ===== 卡片通用 ===== */
.card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.card-title .more { font-size: 12px; color: var(--blue); cursor: pointer; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; border: none; font-weight: 500; transition: all 0.2s; text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #40a9ff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #73d13d; }
.btn-warning { background: var(--orange); color: #fff; }
.btn-warning:hover { background: #ffa940; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #ff7875; }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: #f0f5ff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-lg { padding: 8px 24px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { background: #fafafa; padding: 8px 10px; text-align: left; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid var(--border); white-space: nowrap; }
tbody td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }
tbody tr:hover { background: #fafafa; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #f0f5ff; }

/* ===== 状态标签 ===== */
.status-tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.status-tag.green { background: #f6ffed; color: var(--green); border: 1px solid #b7eb8f; }
.status-tag.orange { background: #fff7e6; color: var(--orange); border: 1px solid #ffd591; }
.status-tag.red { background: #fff1f0; color: var(--red); border: 1px solid #ffa39e; }
.status-tag.blue { background: #e6f7ff; color: var(--blue); border: 1px solid #91d5ff; }
.status-tag.gray { background: #fafafa; color: var(--text-muted); border: 1px solid #d9d9d9; }
.status-tag.purple { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }

/* ===== 进度条 ===== */
.progress-info { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.progress-bar { flex: 1; height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden; }
.progress-bar .fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.progress-bar .fill.green { background: var(--green); }
.progress-bar .fill.orange { background: var(--orange); }
.progress-bar .fill.blue { background: var(--blue); }
.progress-bar .fill.red { background: var(--red); }

/* ===== Tabs ===== */
/* 2026-11-13：财务中心加到 6 个页签，390px 手机屏必须换行，否则整页横向溢出 */
.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs .tab { padding: 8px 16px; cursor: pointer; font-size: 13px; border-bottom: 2px solid transparent; color: var(--text-secondary); transition: all 0.2s; user-select: none; }
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabs .tab .count { background: #f0f0f0; padding: 0 8px; border-radius: 8px; font-size: 12px; margin-left: 4px; }

/* ===== 表单 ===== */
.form-panel { background: var(--bg-card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 180px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; font-weight: 500; }
.form-group .required { color: var(--red); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; outline: none; transition: border-color 0.2s; background: #fff; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(24,144,255,0.1); }
.form-group input[readonly] { background: #f5f5f5; cursor: not-allowed; }
/* 勾选框不能被 width:100% 拉满：否则 flex 行里勾选框与文字被扯到两端（2026-11-12 物料出入库弹窗暴露） */
.form-group input[type="checkbox"], .form-group input[type="radio"] { width: auto; flex: 0 0 auto; margin: 0; }
.form-group input[type="checkbox"] + label, .form-group input[type="radio"] + label { flex: 1; margin: 0; }
.form-group textarea { resize: vertical; min-height: 60px; }

/* ===== 文件上传 ===== */
.file-upload-zone { border: 2px dashed #d9d9d9; border-radius: var(--radius); padding: 24px; text-align: center; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
.file-upload-zone:hover { border-color: var(--blue); color: var(--blue); }
.file-upload-zone .icon { font-size: 32px; }
.file-upload-zone input[type="file"] { display: none; }
.file-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.file-item { background: #f5f5f5; padding: 4px 12px; border-radius: 4px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.file-item .remove { color: var(--red); cursor: pointer; font-weight: 700; }

/* ===== 操作提示 ===== */
.flow-tip { background: #e6f7ff; border: 1px solid #91d5ff; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.flow-tip .title { font-weight: 600; color: #0050b3; font-size: 14px; margin-bottom: 8px; }
.flow-tip .steps { color: #333; font-size: 13px; line-height: 2; }
.flow-tip .steps .highlight { background: #fff; padding: 1px 6px; border-radius: 3px; border: 1px solid #bae7ff; margin: 0 2px; }

/* ===== 利润展示 ===== */
.profit-box { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 16px 0; }
.profit-item { text-align: center; padding: 16px; border-radius: var(--radius); }
.profit-item.revenue { background: #f6ffed; border: 1px solid #b7eb8f; }
.profit-item.cost { background: #fff7e6; border: 1px solid #ffd591; }
.profit-item.profit { background: #e6f7ff; border: 1px solid #91d5ff; }
.profit-item .num { font-size: 28px; font-weight: 700; }
.profit-item .num.green { color: var(--green); }
.profit-item .num.orange { color: var(--orange); }
.profit-item .num.blue { color: var(--blue); }
.profit-item .lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ===== 操作链接 ===== */
/* 🔴 .action-links 永远用在 <td> 上：绝不能改 display（flex/inline-flex 都会让
   td 丢失 table-cell 布局 → 单元格脱离表格流、与其他列错位）。
   间距用子级 a 的 margin 实现，td 保持浏览器默认 table-cell，天然与同行对齐。 */
.action-links { white-space: nowrap; }
.action-links a { color: var(--blue); font-size: 12px; cursor: pointer; text-decoration: none; margin-right: 12px; }
.action-links a:last-child { margin-right: 0; }
.action-links a:hover { text-decoration: underline; }
.action-links a.danger { color: var(--red); }

/* ===== 弹窗 ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; justify-content: center; align-items: center; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 90%; max-width: 700px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,0.2); overflow-y: auto; }
.modal-header { padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 15px; }
.modal-header .close { font-size: 20px; cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 20px; overflow: visible; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ===== 搜索条 ===== */
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar .left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .right { margin-left: auto; display: flex; gap: 8px; }
.toolbar select, .toolbar input { padding: 4px 10px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 12px; outline: none; }
.toolbar select:focus, .toolbar input:focus { border-color: var(--blue); }

/* ===== 高级搜索栏 ===== */
.adv-search-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px; background: #fafafa; border: 1px solid #e8e8e8; border-radius: var(--radius); flex-wrap: wrap; }
.adv-search-bar .adv-search-inner { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; }
.adv-search-bar .adv-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.adv-search-bar .adv-sep { font-size: 12px; color: var(--text-muted); }
.adv-search-bar input[type="date"] { padding: 3px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 12px; outline: none; }
.adv-search-bar input[type="date"]:focus { border-color: var(--blue); }
.adv-search-bar .adv-toggle { font-size: 12px; color: var(--blue); cursor: pointer; margin-left: auto; user-select: none; }
.adv-search-bar .adv-toggle:hover { text-decoration: underline; }
.adv-search-bar .btn-sm { padding: 3px 10px; font-size: 11px; }

/* ===== 自动补全 ===== */
.autocomplete-wrap { position: relative; }
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #d9d9d9; border-radius: 6px; max-height: 200px; overflow-y: auto; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.1); display: none; }
.autocomplete-list.show { display: block; }
.autocomplete-list .item { padding: 8px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.autocomplete-list .item:last-child { border-bottom: none; }
.autocomplete-list .item:hover { background: #f0f5ff; }
.autocomplete-list .item .hint { font-size: 11px; color: var(--text-muted); margin-left: 8px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar-logo h1, .sidebar-logo p, .menu-item span:not(.icon) { display: none; }
  .menu-item { justify-content: center; padding: 12px; border-left: none; }
  .menu-item .icon { font-size: 22px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .profit-box { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .split-layout { flex-direction: column; }
  .split-left { flex: none; width: 100%; }
  .report-grid { grid-template-columns: 1fr; }
}

/* ===== 报价单预览 ===== */
.quote-preview {
  background: #fff;
  max-width: 794px; /* A4 标准宽度 */
  margin: 0 auto;
  padding: 36px 44px 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border-radius: 4px;
  font-family: "SimSun", "宋体", serif;
  color: #222;
  line-height: 1.6;
}
/* 公司抬头 */
.quote-preview .preview-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 3px double #222;
}
.quote-preview .preview-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 12px;
  color: #000;
  margin-bottom: 8px;
}
.quote-preview .preview-logo {
  margin-bottom: 10px;
}
.quote-preview .preview-logo img {
  height: 46px;
  max-width: 180px;
  object-fit: contain;
}
.quote-preview .preview-company {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  letter-spacing: 2px;
}
.quote-preview .preview-contact {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  letter-spacing: 1px;
}
/* 基本信息表 */
.quote-preview .preview-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}
.quote-preview .preview-info-table td {
  padding: 3px 6px;
  border: none;
}
.quote-preview .pit-label {
  color: #666;
  white-space: nowrap;
  width: 80px;
  font-weight: 600;
}
.quote-preview .pit-value {
  color: #222;
  padding-right: 20px;
}
/* 明细标题 */
.quote-preview .preview-items-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #ddd;
}
/* 明细表格 */
.quote-preview .preview-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}
.quote-preview .preview-items-table th {
  background: #e8e8e8;
  padding: 7px 6px;
  text-align: center;
  font-weight: 700;
  border: 1px solid #bbb;
  font-size: 12px;
}
.quote-preview .preview-items-table td {
  padding: 6px 6px;
  border: 1px solid #ccc;
  vertical-align: top;
}
.quote-preview .preview-items-table .tc { text-align: center; }
.quote-preview .preview-items-table .tr { text-align: right; }
.quote-preview .preview-items-table tbody tr:nth-child(even) {
  background: #f9f9f9;
}
/* 效果图行 */
.quote-preview .preview-img-row td {
  padding: 4px 10px 10px !important;
  background: #fafafa;
}
.quote-preview .preview-img-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.quote-preview .preview-img-wrap img {
  max-width: 240px;
  max-height: 160px;
  border-radius: 4px;
  border: 1px solid #ddd;
  object-fit: cover;
}
/* 合计区域 */
.quote-preview .preview-total-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px;
  margin-bottom: 12px;
  border-top: 2px solid #222;
  border-bottom: 2px solid #222;
  background: #f8f8f8;
}
.quote-preview .preview-total-chinese {
  font-size: 14px;
  color: #222;
}
.quote-preview .preview-total-chinese strong {
  font-size: 15px;
  letter-spacing: 1px;
}
.quote-preview .preview-total-num {
  font-size: 20px;
  font-weight: 700;
  color: #c00;
  white-space: nowrap;
}
/* 报价说明 */
.quote-preview .preview-notes {
  margin: 12px 0;
  padding: 10px 14px;
  background: #f5f5f5;
  border-left: 4px solid #1a3a5c;
  border-radius: 2px;
}
.quote-preview .preview-notes-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin-bottom: 6px;
}
.quote-preview .preview-notes-content {
  font-size: 12px;
  color: #444;
  line-height: 1.8;
}
/* 其他条款 */
.quote-preview .preview-clause {
  margin: 12px 0;
  padding: 10px 14px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 2px;
}
/* 签字区 */
.quote-preview .preview-sign {
  margin: 24px 0 16px;
  padding-top: 16px;
  border-top: 1px dashed #bbb;
}
.quote-preview .sign-row {
  display: flex;
  gap: 40px;
  margin-bottom: 14px;
}
.quote-preview .sign-box {
  flex: 1;
  display: flex;
  align-items: center;
}
.quote-preview .sign-label {
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}
.quote-preview .sign-line {
  flex: 1;
  border-bottom: 1px solid #333;
  margin-left: 8px;
  height: 22px;
}
/* 底部 */
.quote-preview .preview-footer {
  text-align: center;
  padding-top: 14px;
  border-top: 1px solid #ddd;
  font-size: 12px;
  color: #666;
  line-height: 1.8;
}
.quote-preview .preview-footer .footer-text {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}
.quote-preview .preview-footer .footer-contact {
  font-size: 11px;
  color: #888;
}

/* ===== 打印样式 ===== */
@media print {
  @page { margin: 12mm 15mm; }
  .sidebar, .top-bar, .btn, .flow-tip, .action-links, .no-print, .toolbar, .tabs, .modal-overlay { display: none !important; }
  .main-area { margin: 0; padding: 0; width: 100%; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .quote-preview {
    box-shadow: none;
    padding: 0;
    max-width: 100%;
    border-radius: 0;
    margin: 0;
  }
  .quote-preview .preview-items-table th {
    background: #e8e8e8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .quote-preview .preview-items-table tbody tr:nth-child(even) {
    background: #f9f9f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .quote-preview .preview-total-section {
    background: #f8f8f8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .quote-preview .preview-img-row td {
    background: #fafafa !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* 打印效果图适中：能看清大概样貌即可（不宜过大占版面，也不宜过小看不清） */
  .quote-preview .preview-img-wrap img {
    max-width: 185px;
    max-height: 120px;
  }
  .quote-preview .preview-notes,
  .quote-preview .preview-clause {
    break-inside: avoid;
  }
  .statement-preview {
    box-shadow: none;
    padding: 0;
    max-width: 100%;
    border-radius: 0;
    margin: 0;
  }
  .statement-preview .st-table th {
    background: #e8e8e8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .statement-preview .st-total {
    background: #f8f8f8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body { background: #fff; font-size: 12px; }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* ===== 新增：分栏布局 ===== */
.split-layout { display: flex; gap: 16px; align-items: flex-start; }
.split-left { flex: 0 0 360px; min-width: 280px; }
.split-right { flex: 1; min-width: 0; }
.split-layout .card { margin-bottom: 12px; }
.split-layout .card-title { font-size: 14px; margin-bottom: 12px; }

/* ===== 新增：紧凑表格 ===== */
.table-compact { width: 100%; }
.table-compact th, .table-compact td { padding: 6px 8px; font-size: 12px; }
.table-compact input, .table-compact select { padding: 4px 8px; font-size: 12px; border: 1px solid #d9d9d9; border-radius: 4px; outline: none; min-height: 28px; }
.table-compact input:focus, .table-compact select:focus { border-color: var(--blue); }
.table-compact input[type="number"] { width: 100%; min-width: 50px; text-align: right; }
.table-compact .img-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; border: 1px solid #ddd; cursor: pointer; }
.table-wrap { overflow: visible; }

/* ===== 新增：工具栏按钮组 ===== */
.toolbar-group { display: flex; gap: 6px; align-items: center; }
.toolbar-group .btn { padding: 4px 12px; font-size: 12px; }

/* ===== 新增：紧凑表单行 ===== */
.form-row-compact { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.form-row-compact .form-group { flex: 1; min-width: 140px; }
.form-row-compact .form-group label { font-size: 12px; margin-bottom: 2px; }

/* ===== 新增：对账单样式 ===== */
.statement-preview { background: #fff; max-width: 794px; margin: 0 auto; padding: 32px 40px 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); border-radius: 4px; font-family: "SimSun", "宋体", serif; color: #222; }
.statement-preview .st-header { text-align: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 3px double #222; }
.statement-preview .st-title { font-size: 24px; font-weight: 700; letter-spacing: 8px; color: #000; }
.statement-preview .st-company { font-size: 14px; color: #666; margin-top: 4px; }
.statement-preview .st-info { font-size: 13px; margin-bottom: 12px; }
.statement-preview .st-info td { padding: 2px 6px; border: none; }
.statement-preview .st-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 12px; }
.statement-preview .st-table th { background: #e8e8e8; padding: 6px; text-align: center; font-weight: 700; border: 1px solid #bbb; }
.statement-preview .st-table td { padding: 5px 6px; border: 1px solid #ccc; }
.statement-preview .st-table .tc { text-align: center; }
.statement-preview .st-table .tr { text-align: right; }
.statement-preview .st-total { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-top: 2px solid #222; border-bottom: 2px solid #222; background: #f8f8f8; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.statement-preview .st-total .st-total-num { font-size: 18px; color: #c00; }
.statement-preview .st-footer { text-align: center; padding-top: 12px; border-top: 1px solid #ddd; font-size: 11px; color: #888; }

/* ===== 新增：报表样式 ===== */
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.report-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.report-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--primary); }
.report-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; }
.report-bar .bar { flex: 1; height: 16px; background: #f0f0f0; border-radius: 3px; overflow: hidden; position: relative; }
.report-bar .bar .fill { height: 100%; border-radius: 3px; transition: width 0.3s; min-width: 2px; }
.report-bar .bar .fill.income { background: var(--green); }
.report-bar .bar .fill.expense { background: var(--orange); }
.report-bar .bar .fill.profit { background: var(--blue); }
.report-bar .bar-label { min-width: 60px; text-align: right; }
.report-bar .bar-value { min-width: 70px; text-align: right; font-weight: 600; }

/* ===== 其他 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.full-width { width: 100%; }

/* ===== 模板库卡片 ===== */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tpl-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.2s; }
.tpl-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.tpl-preview { height: 140px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tpl-preview img { max-width: 100%; max-height: 100%; object-fit: cover; }
.tpl-preview .tpl-icon { font-size: 48px; opacity: 0.4; }
.tpl-info { padding: 12px; }
.tpl-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.tpl-cat { font-size: 11px; color: var(--blue); margin-bottom: 4px; }
.tpl-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.font-bold { font-weight: 600; }

/* ===== 产品自动完成下拉 ===== */
.product-ac-wrapper { position: relative; width: 100%; }
.product-ac-wrapper input { width: 100%; }
.product-ac-dropdown {
  position: absolute; top: 100%; left: 0; z-index: 9999;
  background: #fff; border: 1px solid #d9d9d9; border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  min-width: 360px; max-width: 550px; max-height: 400px; overflow-y: auto;
  display: none;
}
.product-ac-dropdown.show { display: block; }
.product-ac-item {
  padding: 8px 12px; cursor: pointer; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}
.product-ac-item:hover { background: #e6f7ff; }
.product-ac-item .ac-name { font-weight: 500; color: #333; }
.product-ac-item .ac-spec { color: #999; margin-left: 8px; font-size: 12px; }
.product-ac-item .ac-price { color: var(--red); font-weight: 600; white-space: nowrap; margin-left: 12px; }
.product-ac-add {
  padding: 8px 12px; cursor: pointer; font-size: 13px; color: var(--blue);
  font-weight: 500; text-align: center; border-top: 1px solid #eee;
}
.product-ac-add:hover { background: #e6f7ff; }

/* ===== 分栏布局表格列宽优化 ===== */
.table-compact .col-unit { min-width: 80px; }
.table-compact .col-unit select { min-width: 70px; }
.table-compact .col-name { min-width: 150px; }
.table-compact .col-qty { min-width: 60px; }
.table-compact .col-price { min-width: 80px; }
.table-compact .col-amount { min-width: 80px; }


/* ===== 分栏布局表格列宽优化 ===== */
.table-compact .col-name { min-width: 130px; }
.table-compact .col-spec { min-width: 80px; }
.table-compact .col-unit { min-width: 80px; }
.table-compact .col-unit select { min-width: 70px; }
.table-compact .col-qty { min-width: 60px; }
.table-compact .col-price { min-width: 80px; }
.table-compact .col-amount { min-width: 90px; }
.table-compact .col-amount input { font-weight: 600; color: var(--red); }
.table-compact .col-img { min-width: 70px; }
.table-compact .col-remark { min-width: 70px; }
.table-compact .col-size { min-width: 90px; }
.table-compact .col-install { min-width: 90px; }

/* ===== 独立登录页（2026-09-18）=====
   未登录时全屏展示，把整个系统界面（.app-layout）挡住，不露操作界面。 */
body.auth-locked .app-layout { display: none !important; }

.auth-screen { position: fixed; inset: 0; z-index: 3000; display: none; background: var(--bg); }
.auth-screen.show { display: flex; }

/* 左侧品牌区 */
.auth-brand { width: 46%; min-width: 380px; background: linear-gradient(150deg, #16324f 0%, #1a3a5c 45%, #2d6a9f 100%); color: #fff; display: flex; align-items: center; padding: 48px; position: relative; overflow: hidden; }
.auth-brand::after { content: ''; position: absolute; right: -120px; bottom: -140px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.auth-brand::before { content: ''; position: absolute; left: -80px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,0.04); }
.auth-brand-inner { position: relative; z-index: 1; max-width: 420px; }
.auth-brand-logo { width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 22px; }
/* 2026-10-30：横版字标按高度自适应，别挤在 56 方块里 */
.auth-brand-logo.has-img { width: 100%; min-width: 56px; height: 56px; padding: 0; background: transparent; border-radius: 0; justify-content: flex-start; }
/* 自定义 LOGO（2026-09-27 品牌自定义）：登录页大图填满圆角框 */
.auth-brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.auth-brand-logo.has-img img { width: auto; height: 100%; max-width: 220px; object-fit: contain; border-radius: 0; }
.auth-brand h1 { font-size: 26px; font-weight: 700; letter-spacing: 0.5px; }
.auth-brand-sub { font-size: 13px; opacity: 0.75; margin-top: 10px; line-height: 1.7; }
.auth-feature-list { list-style: none; margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.auth-feature-list li { font-size: 13px; opacity: 0.9; display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.auth-feature-list .tick { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,0.18); font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.auth-brand-foot { margin-top: 40px; font-size: 12px; opacity: 0.55; }

/* 右侧表单区 */
.auth-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 24px; overflow-y: auto; }
.auth-card { width: 100%; max-width: 392px; background: #fff; border-radius: 14px; padding: 40px 36px 32px; box-shadow: 0 10px 40px rgba(15,36,64,0.10); }
.auth-head h2 { font-size: 22px; font-weight: 700; color: var(--primary-dark); }
.auth-head p { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.auth-label { display: block; font-size: 13px; color: var(--text-secondary); margin: 18px 0 6px; }
.auth-input { width: 100%; height: 42px; padding: 0 14px; font-size: 14px; border: 1px solid #dfe3e8; border-radius: 8px; outline: none; background: #fafbfc; transition: border-color .2s, box-shadow .2s, background .2s; }
.auth-input:focus { border-color: var(--primary-light); background: #fff; box-shadow: 0 0 0 3px rgba(45,106,159,0.12); }
.auth-pwd-wrap { position: relative; }
.auth-pwd-wrap .auth-input { padding-right: 44px; }
.auth-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 15px; opacity: .55; user-select: none; }
.auth-eye:hover { opacity: 1; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.auth-check { font-size: 13px; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-submit { width: 100%; height: 44px; margin-top: 22px; font-size: 15px; font-weight: 600; letter-spacing: 2px; justify-content: center; }
.auth-submit:disabled { opacity: .7; cursor: not-allowed; }
.auth-alert { display: none; margin-top: 18px; padding: 10px 12px; border-radius: 8px; font-size: 13px; background: #fff1f0; border: 1px solid #ffccc7; color: #cf1322; line-height: 1.6; }
.auth-alert.show { display: block; }
.auth-alert.ok { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.auth-help { font-size: 12px; color: var(--text-muted); margin-top: 18px; line-height: 1.7; text-align: center; }
.auth-warn { font-size: 12px; color: #d46b08; background: #fffbe6; border: 1px solid #ffe58f; border-radius: 8px; padding: 8px 10px; margin-top: 18px; line-height: 1.6; }
.auth-version { margin-top: 16px; padding-top: 12px; border-top: 1px solid #eceff3; font-size: 12px; color: var(--text-muted); text-align: center; letter-spacing: .3px; }
@media (max-width: 900px) { .auth-brand { display: none; } .auth-panel { padding: 20px 16px; align-items: flex-start; } }

/* ===== 设备管理（保养 / 耗材 / 维修） ===== */
/* 逾期行：整行淡红，一眼看出哪台设备该保养了 */
tr.row-overdue, .equip-due-row.row-overdue { background: #fff5f5; }
tr.row-overdue:hover { background: #ffecec; }
/* 详情页大字倒计时 */
.due-big { display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 104px; padding: 10px 14px; border-radius: 10px; background: #f6ffed; border: 1px solid #b7eb8f; }
.due-big .n { font-size: 26px; font-weight: 700; color: var(--green); line-height: 1.1; }
.due-big .t { font-size: 11px; color: var(--text-muted); margin-top: 3px; text-align: center; }
.due-big.red { background: #fff1f0; border-color: #ffa39e; }
.due-big.red .n { color: var(--red); }
.due-big.orange { background: #fff7e6; border-color: #ffd591; }
.due-big.orange .n { color: var(--orange); }
/* 提醒看板一行 */
.equip-due-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid #f0f0f0; border-radius: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.equip-due-row:last-child { margin-bottom: 0; }
/* 执行记录时间线 */
.equip-tl { position: relative; padding-left: 4px; }
.equip-tl-item { position: relative; padding: 0 0 16px 0; }
.equip-tl-item:not(:last-child)::after { content: ''; position: absolute; left: 4px; top: 14px; bottom: 2px; width: 1px; background: #ececec; }
.equip-tl-item:last-child { padding-bottom: 0; }

/* 签单台账：半年/一年未结提醒条（2026-10-29） */
.gz-alert{background:#fffbe6;border:1px solid #ffe58f;border-radius:8px;padding:9px 14px;font-size:13px;color:#ad6800;margin-bottom:12px;display:flex;align-items:center;gap:6px}
.gz-alert b{color:#cf1322}

/* ===== 签单开单弹窗（2026-10-29 v2 弹窗式开单）===== */
.gz-modal .row{display:flex;gap:14px}
.gz-modal .fg{flex:1;min-width:0}
.gz-modal .fg>label{display:block;font-size:12.5px;color:var(--text-secondary);margin-bottom:4px}
.gz-modal .fg>label.req::before{content:"*";color:var(--red);margin-right:2px}
.gz-modal select,.gz-modal input[type=date],.gz-modal textarea{width:100%;height:34px;border:1px solid #d9d9d9;border-radius:6px;padding:0 10px;font-size:13px;background:#fff;font-family:inherit}
.gz-modal .hint{font-size:11.5px;color:var(--text-muted);margin-top:3px;height:15px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.gz-modal .sec{display:flex;align-items:center;gap:8px;margin:14px 0 8px;font-size:13px;font-weight:600}
.gz-modal .sec .lb.req::before{content:"*";color:var(--red);margin-right:2px}
.gz-modal .sec .tip{font-weight:400;font-size:11.5px;color:var(--text-muted)}
.gz-modal .sec .sp{flex:1}
table.gz-items{width:100%;border-collapse:collapse;table-layout:fixed}
.gz-items th{background:#f7f9fb;font-size:12.5px;color:var(--text-secondary);text-align:left;padding:8px;border-bottom:1px solid var(--border);border-top:1px solid var(--border);font-weight:600}
.gz-items td{padding:6px 8px;border-bottom:1px dashed #ececec;vertical-align:top}
.gz-items input{width:100%;height:32px;border:1px solid #d9d9d9;border-radius:5px;padding:0 9px;font-size:13px;font-family:inherit}
.gz-items input:focus{border-color:var(--primary-light);box-shadow:0 0 0 2px rgba(45,106,159,.1);outline:none}
.gz-items .gzp-item-spec{height:32px;font-size:12.5px;color:var(--text-secondary)}
.gz-items .gzp-item-amount{text-align:right;font-family:Consolas,monospace;font-weight:600;color:var(--text)}
.gz-items .step{display:flex;align-items:center;border:1px solid #d9d9d9;border-radius:5px;height:32px;overflow:hidden;background:#fff}
.gz-items .step button{width:26px;height:100%;flex-shrink:0;border:none;background:#fafafa;color:var(--text-secondary);font-size:15px;line-height:1;cursor:pointer}
.gz-items .step button:hover{background:#eff4f9;color:var(--primary)}
.gz-items .step input{border:none;height:100%;text-align:center;border-radius:0;padding:0;background:transparent}
.gz-items .step select{width:64px;height:100%;flex-shrink:0;border:none;border-left:1px solid #eee;border-radius:0;font-size:12px;padding:0 0 0 4px;background:#fcfcfc;color:var(--text-secondary);cursor:pointer}
.gz-items .del{width:26px;height:26px;border:none;background:transparent;color:#b0b4bb;border-radius:4px;cursor:pointer;font-size:14px;line-height:1}
.gz-items .del:hover{background:#fff1f0;color:var(--red)}
.gz-items .ac-wrap{position:relative}
.gz-items .ac-list{display:none;position:absolute;left:0;right:auto;top:34px;min-width:340px;max-width:460px;width:max-content;background:#fff;border:1px solid var(--border);border-radius:6px;box-shadow:0 6px 20px rgba(0,0,0,.12);z-index:30;max-height:212px;overflow:auto}
.gz-items .ac-item{padding:7px 10px;display:flex;gap:8px;font-size:12.5px;cursor:pointer;align-items:baseline;flex-wrap:wrap}
.gz-items .ac-item:hover{background:#f0f7ff}
/* 往期项目要能看全名，不截断（2026-11-12 老板：不清楚到底做了什么） */
.gz-items .ac-item .nm{flex:1 1 auto;min-width:0;white-space:normal;word-break:break-all;font-weight:600}
.gz-items .ac-item .sp{font-size:11.5px;color:var(--text-muted);white-space:nowrap}
.gz-items .ac-item .pr{color:var(--text-muted);font-size:11.5px;white-space:nowrap;margin-left:auto}
.gz-modal .sum{display:flex;justify-content:flex-end;align-items:baseline;gap:12px;padding:10px 8px 0}
.gz-modal .sum .k{font-size:13px;color:var(--text-secondary)}
.gz-modal .sum strong{font-size:21px;color:var(--red);font-family:Consolas,monospace}
.gz-modal .sum .cn{font-size:12px;color:var(--text-muted)}
.gz-modal .note{display:flex;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border2);align-items:flex-start}
.gz-modal .note label{width:44px;flex-shrink:0;font-size:13px;color:var(--text-secondary);padding-top:8px;text-align:right}
.gz-modal .note textarea{flex:1;height:54px;padding:6px 10px;resize:vertical}
.gz-modal .sign{margin-top:12px;padding-top:10px;border-top:1px solid var(--border2)}
.gz-modal .sign .tip{font-size:11.5px;color:var(--text-muted);margin-left:8px}

/* 状态标签不换行（2026-10-29 账龄标签窄列挤压修复） */
.status-tag{white-space:nowrap}
.gz-items td:last-child{vertical-align:middle}

/* 收支开单弹窗补充（2026-10-29 v2） */
.gz-modal input[type=text]{width:100%;height:34px;border:1px solid #d9d9d9;border-radius:6px;padding:0 10px;font-size:13px;background:#fff;font-family:inherit}
.gz-modal input[type=text]:focus{border-color:var(--primary-light);box-shadow:0 0 0 2px rgba(45,106,159,.12);outline:none}
.gz-modal .pay-row{display:flex;align-items:flex-end;gap:16px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border2)}
.gz-modal .pay-row .sum{margin-left:auto;padding:0}

/* ===== 报价开单弹窗（2026-10-30 报价单迁入工单） ===== */
.q-items td{padding:7px 8px}
.q-items tbody tr + tr td{border-top:1px solid #f2f4f7}
.q-items .sub-line{display:flex;align-items:center;gap:4px;margin-top:4px}
.q-items .sub-line .lbl{font-size:11px;color:var(--text-muted);flex-shrink:0}
.q-items .sub-line input{height:24px;font-size:11.5px;border-style:dashed;min-width:0;flex:1;padding:0 6px;color:var(--text-secondary)}
.q-items .q-img-area{display:flex;flex-wrap:wrap;gap:2px;align-items:center;max-height:56px;overflow:hidden}
.q-items .q-img-add{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:1px dashed #c9d3dd;border-radius:3px;color:var(--primary-light);cursor:pointer;font-size:14px;line-height:1;flex-shrink:0}
.q-items .q-img-add:hover{border-color:var(--primary);color:var(--primary);background:#f5f9fd}
.q-items .ac-list{top:36px}
.q-modal .sum strong{font-size:22px}
.q-modal .note textarea{height:60px}

/* =====================================================================
   视觉升级 v1.14.0（2026-10-30）
   只改观感，不动结构：统一配色层次 / 阴影 / 圆角 / 侧栏线性图标 / 表格密度
   如需回滚，删掉本节即可恢复旧观感
   ===================================================================== */
:root {
  --blue: #1677ff;
  --bg: #f5f7fa;
  --border: #e6ebf2;
  --border2: #eef1f6;          /* 原代码引用了但未定义，导致部分分隔线不显示 */
  --text: #1f2937;
  --text-secondary: #556070;
  --text-muted: #8d97a6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 4px 12px -2px rgba(16,24,40,.08), 0 2px 6px -2px rgba(16,24,40,.05);
}

html, body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif; -webkit-font-smoothing: antialiased; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d2dae5; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b8c4d4; background-clip: content-box; }

/* ===== 侧边栏：深蓝渐变 + 线性图标 + 圆角菜单 ===== */
.sidebar { background: linear-gradient(178deg, #17324e 0%, #1a3a5c 42%, #12283f 100%); box-shadow: 2px 0 12px rgba(15,23,42,.10); }
.sidebar-logo { padding: 18px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo h1 { font-size: 17px; letter-spacing: .4px; }
.sidebar-logo p { font-size: 11px; color: rgba(255,255,255,.55); letter-spacing: .6px; }
.sidebar-menu { padding: 10px 10px 18px; }
.menu-item {
  position: relative; margin: 2px 0; padding: 10px 12px; border-left: none; border-radius: 8px;
  font-size: 13.5px; color: rgba(255,255,255,.80); transition: background .16s, color .16s;
}
.menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu-item.active { background: rgba(255,255,255,.13); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.menu-item.active::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: #4f9ae8;
}
/* 侧栏图标：统一 18px 线性 SVG（替换彩色 emoji，颜色跟随文字） */
.menu-item .icon {
  --ico: none;
  width: 18px; height: 18px; flex-shrink: 0; font-size: 0; line-height: 0;
  background-color: currentColor; opacity: .78;
  -webkit-mask-image: var(--ico); mask-image: var(--ico);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: 18px 18px; mask-size: 18px 18px;
}
.menu-item:hover .icon, .menu-item.active .icon { opacity: 1; }
.menu-item .badge { font-size: 10.5px; padding: 1px 7px; border-radius: 9px; background: #f5544f; }
.menu-item[data-page="dashboard"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7.5' height='7.5' rx='1.5'/%3E%3Crect x='13.5' y='3' width='7.5' height='7.5' rx='1.5'/%3E%3Crect x='3' y='13.5' width='7.5' height='7.5' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='7.5' height='7.5' rx='1.5'/%3E%3C/svg%3E"); }
.menu-item[data-page="quotes"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z'/%3E%3Cpath d='M17 7V5a2 2 0 0 0-2-2H6'/%3E%3Ccircle cx='16' cy='13' r='1.4'/%3E%3C/svg%3E"); }
.menu-item[data-page="signings"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E"); }
.menu-item[data-page="projects"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 2.5 7.2 12 11.9l9.5-4.7z'/%3E%3Cpath d='M2.5 12 12 16.7 21.5 12'/%3E%3Cpath d='M2.5 16.8 12 21.5l9.5-4.7'/%3E%3C/svg%3E"); }
.menu-item[data-page="finance"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3v9h9'/%3E%3C/svg%3E"); }
.menu-item[data-page="receivables"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13h4.5l1.8 3h5.4l1.8-3H21'/%3E%3Cpath d='M4.8 4.5h14.4l1.8 8.5v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5z'/%3E%3C/svg%3E"); }
.menu-item[data-page="expenses"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2.5h12v19l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M9 8h6'/%3E%3Cpath d='M9 12h6'/%3E%3C/svg%3E"); }
.menu-item[data-page="materials"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='M3 8l9 5 9-5'/%3E%3Cpath d='M12 13v8'/%3E%3C/svg%3E"); }
.menu-item[data-page="equipment"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 9V3h11v6'/%3E%3Crect x='3' y='9' width='18' height='8' rx='2'/%3E%3Cpath d='M7 17h10v4H7z'/%3E%3C/svg%3E"); }
.menu-item[data-page="contracts"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2.5H7a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7.5z'/%3E%3Cpath d='M14 2.5v5h5'/%3E%3Cpath d='M9 13h6M9 17h4'/%3E%3C/svg%3E"); }
.menu-item[data-page="outsource"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 13a5 5 0 0 0 7 0l2-2a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M13.5 11a5 5 0 0 0-7 0l-2 2a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }
.menu-item[data-page="customers"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.6'/%3E%3Cpath d='M2.5 21v-1.6A4.4 4.4 0 0 1 6.9 15h4.2a4.4 4.4 0 0 1 4.4 4.4V21'/%3E%3Cpath d='M17 5.2a3.6 3.6 0 0 1 0 6.6'/%3E%3Cpath d='M18.5 15h.6a3.4 3.4 0 0 1 3.4 3.4V21'/%3E%3C/svg%3E"); }
.menu-item[data-page="users"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 21v-1.8A4.7 4.7 0 0 1 9.2 14.5h5.6a4.7 4.7 0 0 1 4.7 4.7V21'/%3E%3C/svg%3E"); }
.menu-item[data-page="files"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5A2 2 0 0 1 5 5.5h3.6a2 2 0 0 1 1.4.6l1 1a2 2 0 0 0 1.4.6H19a2 2 0 0 1 2 2v8.8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }
.menu-item[data-page="templates"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2.5'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M9 21V9'/%3E%3C/svg%3E"); }
.menu-item[data-page="recyclebin"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6.5h17'/%3E%3Cpath d='M8.5 6.5v-2a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 1.5 1.5v2'/%3E%3Cpath d='M6 6.5 7.2 20a1.5 1.5 0 0 0 1.5 1.4h6.6a1.5 1.5 0 0 0 1.5-1.4L18 6.5'/%3E%3C/svg%3E"); }
.menu-item[data-page="settings"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M19.1 4.9 17 7M7 17l-2.1 2.1'/%3E%3C/svg%3E"); }
.menu-item[data-page="audit"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5.2l3.2 1.9'/%3E%3C/svg%3E"); }
.menu-item[data-page="platform"] .icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v16'/%3E%3Cpath d='M15 9.5h3.5A1.5 1.5 0 0 1 20 11v10'/%3E%3Cpath d='M2.5 21h19'/%3E%3Cpath d='M7.5 7h2M7.5 11h2M7.5 15h2'/%3E%3C/svg%3E"); }

/* ===== 顶栏 ===== */
.top-bar { height: 52px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.top-bar .breadcrumb { font-size: 12.5px; }
.top-bar .search-box { border-radius: 7px; height: 30px; transition: all .16s; }
.top-bar .search-box:focus { box-shadow: 0 0 0 3px rgba(22,119,255,.10); }

/* ===== 卡片 ===== */
.card, .form-panel, .stat-card { border: 1px solid var(--border2); box-shadow: var(--shadow); }
.card { padding: 18px; margin-bottom: 14px; }
.card-title { font-size: 14.5px; margin-bottom: 14px; letter-spacing: .2px; }
.content { padding: 18px; }

/* ===== 统计卡：左侧色条 + 等宽数字 ===== */
.stat-cards { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.stat-card { position: relative; overflow: hidden; padding: 16px 18px; transition: box-shadow .18s, transform .18s; }
.stat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #c8d4e2; }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card .label { font-size: 12.5px; font-weight: 500; }
.stat-card .value { font-size: 25px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat-card .sub { font-size: 11.5px; }
.stat-card.color-green::before { background: var(--green); }
.stat-card.color-orange::before { background: var(--orange); }
.stat-card.color-red::before { background: var(--red); }
.stat-card.color-blue::before { background: var(--blue); }
.stat-card.color-green .value { color: #3f9e14; }
.stat-card.color-orange .value { color: #e07b09; }
.stat-card.color-red .value { color: #e5484d; }
.stat-card.color-blue .value { color: var(--blue); }

/* ===== 按钮 ===== */
.btn { border-radius: 7px; font-weight: 500; transition: background .16s, box-shadow .16s, transform .08s, border-color .16s; }
.btn:not(.btn-outline):not(.btn-ghost) { box-shadow: 0 1px 2px rgba(16,24,40,.07); }
.btn:not(.btn-outline):hover { box-shadow: 0 2px 6px rgba(16,24,40,.12); }
.btn-primary { background: linear-gradient(180deg, #23486c, #1a3a5c); }
.btn-primary:hover { background: linear-gradient(180deg, #2a5480, #1f4269); }
.btn-outline { border-color: #cfd8e3; color: var(--text); background: #fff; }
.btn-outline:hover { background: #f6f9fd; border-color: #9db4cc; color: var(--primary); }
.btn-sm { border-radius: 6px; }

/* ===== 表格 ===== */
table { font-size: 13px; font-variant-numeric: tabular-nums; }
thead th {
  background: #f7f9fc; padding: 10px 12px; font-weight: 600; font-size: 12.5px;
  color: #566173; border-bottom: 1px solid var(--border); letter-spacing: .2px;
}
tbody td { padding: 10px 12px; border-bottom: 1px solid #f0f3f7; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fbff; }
tbody tr.clickable:hover { background: #eff6ff; }
.table-wrap, .card { border-radius: var(--radius); }

/* ===== Tabs ===== */
.tabs { gap: 4px; margin-bottom: 16px; border-bottom-color: var(--border); }
.tabs .tab { padding: 9px 15px; border-radius: 8px 8px 0 0; font-size: 13px; }
.tabs .tab:hover { background: #f4f7fb; }
.tabs .tab.active { background: #f7fafe; }
.tabs .tab .count { background: #eef2f7; border-radius: 9px; }

/* ===== 表单控件 ===== */
.form-group input, .form-group select, .form-group textarea,
.toolbar select, .toolbar input, .adv-search-bar input[type="date"] {
  border-color: #d5dde7; border-radius: 7px; transition: border-color .16s, box-shadow .16s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,119,255,.10); }
.toolbar select:focus, .toolbar input:focus, .adv-search-bar input[type="date"]:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,119,255,.10); }

/* ===== 状态标签 ===== */
.status-tag { border-radius: 7px; font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-width: 1px; }

/* ===== 弹窗 ===== */
.modal-overlay { background: rgba(15,23,42,.44); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.modal { border-radius: 14px; box-shadow: 0 24px 56px -16px rgba(15,23,42,.30), 0 8px 20px -8px rgba(15,23,42,.16); }
.modal-header { padding: 15px 22px; border-bottom-color: var(--border2); }
.modal-header h3 { font-size: 15.5px; font-weight: 600; letter-spacing: .2px; }
.modal-header .close { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; transition: background .16s, color .16s; }
.modal-header .close:hover { background: #f2f4f8; color: var(--text); }
.modal-body { padding: 20px 22px; }
.modal-footer { padding: 13px 22px; border-top-color: var(--border2); background: #fcfdff; border-radius: 0 0 14px 14px; }

/* ===== 提醒条 / 提示块 ===== */
.gz-alert { border-radius: 9px; box-shadow: 0 1px 2px rgba(173,104,0,.06); }
.flow-tip { border-radius: 10px; border-color: #bcdcff; background: linear-gradient(180deg, #f2f8ff, #eaf3ff); }

/* ===== 响应式同步（60px 窄侧栏下图标居中） ===== */
@media (max-width: 900px) {
  .menu-item { margin: 3px 0; padding: 11px 0; justify-content: center; }
  .menu-item.active::before { display: none; }
  .menu-item .icon { width: 20px; height: 20px; -webkit-mask-size: 20px 20px; mask-size: 20px 20px; }
  .sidebar-menu { padding: 8px 8px 14px; }
  .stat-card .value { font-size: 21px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .mini-stats { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===== 工作台：紧凑统计格 / 待办列表 / 折叠提示 ===== */
.mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border2); border: 1px solid var(--border2);
  border-radius: 10px; overflow: hidden;
}
.mini-stats .ms { background: #fff; padding: 13px 8px; text-align: center; cursor: default; transition: background .15s; }
.mini-stats .ms[onclick]:hover { background: #f7fafe; }
.mini-stats .ms .n {
  display: block; font-size: 19px; font-weight: 700; letter-spacing: -.4px;
  color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.25;
}
.mini-stats .ms .l { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.mini-stats .ms .n.warn { color: #e5484d; }
.mini-stats .ms .n.alert { color: #e07b09; }
.mini-stats .ms .n.ok { color: #3f9e14; }

.todo-list { display: flex; flex-direction: column; }
.todo-row {
  display: flex; align-items: center; gap: 9px; padding: 9px 8px;
  border-radius: 8px; transition: background .15s;
}
.todo-row + .todo-row { border-top: 1px solid #f2f5f9; }
.todo-row:hover { background: #f8fbff; }
.todo-row .tx { flex: 1; font-size: 13px; color: var(--text); }
.todo-row .cu { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

.flow-card {
  background: #fff; border: 1px solid var(--border2); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0 18px; margin-bottom: 14px;
}
.flow-card > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 15px 0; font-size: 14px; font-weight: 600; list-style: none;
}
.flow-card > summary::-webkit-details-marker { display: none; }
.flow-card > summary::after { content: '展开'; margin-left: auto; font-size: 12px; font-weight: 400; color: var(--blue); }
.flow-card[open] > summary::after { content: '收起'; }
.flow-card[open] > summary { padding-bottom: 12px; }
.flow-card .flow-tip { margin-bottom: 16px !important; }

/* ===== 表格合计行 ===== */
tfoot td {
  background: #f8fafd; border-top: 1px solid var(--border) !important;
  font-size: 13px !important; padding: 12px !important;
}
tfoot tr td:first-child { border-radius: 0 0 0 var(--radius); }
tfoot tr td:last-child { border-radius: 0 0 var(--radius) 0; }

/* ===== 签单明细弹窗：一条明细一行（2026-11-12 老板要求「要看清楚到底做了什么」）===== */
.gz-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 2px 0; }
.gz-line .nm { font-weight: 600; color: var(--text); }
.gz-line .sp { font-size: 12px; color: var(--text-secondary); }
.gz-line .qty { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.gz-line .rm { font-size: 12px; color: var(--text-muted); }
.gz-line + .gz-line { border-top: 1px dashed var(--border); }

/* 录入明细表：金额列右对齐（2026-11-12），数字好对齐好看 */
#inpItemsBody .inp-item-price,
#inpItemsBody .inp-item-amount,
.gz-items .gzp-item-price,
.gz-items .gzp-item-amount { text-align: right; }

/* 签单/收支明细表：单位下拉单独成列（2026-11-12），统一输入框观感 */
.gz-items select { height: 32px; border: 1px solid #d9d9d9; border-radius: 5px; padding: 0 4px; font-size: 12.5px; background: #fff; width: 100%; font-family: inherit; }
.gz-items select:focus { border-color: var(--primary-light); outline: none; }

/* 签单明细 / 生成对账单 两张宽表：固定列宽（2026-11-12），否则浏览器按内容分，项目列永远被压窄 */
table.detail-fixed { table-layout: fixed; }
table.detail-fixed td { white-space: normal; word-break: break-word; }
table.detail-fixed thead th { white-space: nowrap; }
/* 操作列必须一行排完：上面那条 td{white-space:normal} 会覆盖 .action-links 的 nowrap */
table.detail-fixed td.action-links { white-space: nowrap; }

/* 应收管理：展开明细的按钮（2026-11-12 老板：原来的小三角看不出是能点的，改成有边框的按钮） */
.recv-toggle {
  height: 26px; width: 100%; padding: 0; line-height: 1; white-space: nowrap;
  border: 1px solid #c8d6e5; border-radius: 5px; background: #f4f8fd;
  color: #5a6672; font-size: 12px; cursor: pointer; font-family: inherit; letter-spacing: .5px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.recv-toggle:hover { border-color: var(--primary); color: var(--primary); background: #f2f8ff; }
.recv-toggle:active { transform: scale(.94); }

/* 应收表格：客户名下面那行「联系人 · 电话」小字（2026-11-14 v1.26.1）
   表格是 table-layout:fixed，所以这里只需要保证长电话能换行 —— 不加 nowrap，
   用 overflow-wrap:anywhere 让 13800000000 这种长串在 390px 窄屏上也折行，绝不横向溢出。 */
.recv-sub {
  font-weight: 400; font-size: 11.5px; line-height: 1.35;
  color: var(--text-muted, #8a94a6);
  margin-top: 2px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* 应收账款 9 列表格：手机端（<900px）放宽到可用宽度，交给 .table-wrap 横向滚动。
   原来 table-layout:fixed + width:100% 在 390px 视口下每列只剩 20 多像素，
   表头互相压字、金额串在一起，加了「联系人 · 电话」小字后更会一行拆成十几行把行高顶到 355px。
   这里只放宽宽度、不改任何金额与列数：页面本身（documentElement）仍不会横向溢出。 */
@media (max-width: 900px) {
  .recv-table { min-width: 680px; }
  /* 只锁客户汇总行（tr[data-key]）的直接单元格，别碰展开后的明细子表 */
  #recvBody tr[data-key] > td { white-space: nowrap; }
  #recvBody tr[data-key] > td:nth-child(2) { white-space: normal; }
}

/* 2026-11-14 修（QA BUG B）：让「应收账款」这一个容器自己内部横向滚动。
   背景：style.css:531 有一条历史全局规则 `.table-wrap{overflow:visible}`，它盖掉了
   第 90 行的 `.table-wrap{overflow-x:auto}`，导致所有表格都不能内滚 —— 390px 下
   应收表是靠整页横移 387px 代偿的，工具栏和 4 张卡片会跟着一起动。
   🔴 那条 531 全局规则绝不能动（全站所有表格都吃它）。这里用两条类选择器
   （权重 0,2,0 > 0,1,0）只对带 recv-scroll 的容器覆盖，其它页面的表格行为一点不变。 */
.table-wrap.recv-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* 渠道单：逐行签收的二维码按钮（2026-11-12） */
.tc-qr-btn { height: 26px; padding: 0 9px; border: 1px solid #c8d6e5; border-radius: 5px; background: #f4f8fd; color: #185FA5; font-size: 11.5px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.tc-qr-btn:hover { border-color: var(--primary); color: var(--primary); background: #eaf3fd; }

/* ===== 手机端点按目标（2026-11-13）=====
   实测 390px 视口下 .action-links a「编辑/删除」实际可点高度只有 16px，设置页
   「添加收款公司/修改/保存公司信息」为 24px，都低于可用的 30px，手指点不准。
   这里只加内边距把点击热区撑到 ≥30px：
   - .action-links a 用 inline-block 是安全的（a 不是 td 本身；铁律约束的是 .action-links
     这个 td 容器，其 display 保持浏览器默认 table-cell，绝不能动）。
   - .btn 用 min-height，不覆盖 inline-flex，垂直居中由 align-items 保证。 */
@media (max-width: 900px) {
  .action-links a { display: inline-block; padding: 7px 2px; margin-right: 10px; }
  .btn { min-height: 34px; }
}

/* ===== 财务中心：全局时间筛选条（v1.26.0，2026-11-13）===== */
.fin-range-bar {
  background: #f7f9fc;
  border: 1px solid var(--border2, #e8eef6);
  border-radius: 10px;
  padding: 10px 12px;
  margin: -6px 0 16px;
}
.fin-range-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fin-range-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fin-chip {
  border: 1px solid #cfd8e3; background: #fff; color: var(--text-secondary, #5a6672);
  border-radius: 16px; padding: 5px 13px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; line-height: 1.2; transition: all .15s; white-space: nowrap;
}
.fin-chip:hover { border-color: var(--blue, #1677ff); color: var(--blue, #1677ff); }
.fin-chip.active { background: var(--blue, #1677ff); border-color: var(--blue, #1677ff); color: #fff; font-weight: 600; }
.fin-range-pick, .fin-range-custom { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.fin-range-pick select, .fin-range-custom input {
  padding: 5px 8px; border: 1px solid #cfd8e3; border-radius: 6px;
  font-size: 12.5px; background: #fff; font-family: inherit; color: var(--text);
}
.fin-range-custom input { max-width: 140px; }
.fin-range-sep { font-size: 12px; color: var(--text-muted, #8a94a6); }
.fin-range-warn { font-size: 12px; color: var(--red, #e5484d); }
.fin-range-text { font-size: 12px; color: var(--text-muted, #8a94a6); white-space: nowrap; }

/* ===== 资金账户页（v1.26.0）===== */
.fund-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fund-title { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.fund-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fund-hero {
  background: linear-gradient(135deg, #f4f9ff 0%, #eef5ff 60%, #f7fbff 100%);
  border: 1px solid #d8e8fb; border-radius: 14px; padding: 18px 20px; margin-bottom: 14px;
}
.fund-hero.neg { background: linear-gradient(135deg, #fff5f5, #fff0f0); border-color: #ffc9c9; }
.fund-hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fund-hero-label { font-size: 13px; font-weight: 600; color: var(--text-secondary, #5a6672); }
.fund-hero-asof { font-size: 12px; color: var(--text-muted, #8a94a6); }
.fund-hero .value {
  font-size: 36px; font-weight: 800; letter-spacing: -1px; color: #1a3a5c;
  font-variant-numeric: tabular-nums; line-height: 1.25; margin: 4px 0 2px;
}
.fund-hero.neg .value { color: var(--red, #e5484d); }
.fund-hero-note { font-size: 12.5px; color: var(--text-muted, #8a94a6); }
.fund-cards { margin-bottom: 0; }
.fund-trend { display: flex; align-items: flex-end; gap: 10px; overflow-x: auto; padding: 6px 2px 2px; }
.fund-bar-item { flex: 0 0 74px; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fund-bar-val { font-size: 10.5px; color: var(--text-secondary, #5a6672); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fund-bar-track { width: 100%; height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.fund-bar { width: 68%; max-width: 40px; min-height: 3px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #4a9eff, #1677ff); }
.fund-bar.neg { background: linear-gradient(180deg, #ff7875, #e5484d); }
.fund-bar-label { font-size: 11.5px; color: var(--text-muted, #8a94a6); white-space: nowrap; }
.fund-row-void { opacity: .62; background: #fafafa; }
.fund-void-reason { font-size: 11.5px; color: var(--text-muted, #8a94a6); margin-top: 3px; }
.fund-alert-red { background: #fff1f0; border: 1px solid #ffc9c9; border-radius: 9px; padding: 9px 14px; font-size: 13px; color: #cf1322; margin-bottom: 12px; }
.fund-modal-error { background: #fff1f0; border: 1px solid #ffc9c9; border-radius: 7px; padding: 8px 12px; font-size: 12.5px; color: #cf1322; margin-top: 10px; }

@media (max-width: 900px) {
  .fin-range-inner { align-items: flex-start; flex-direction: column; }
  .fin-range-text { white-space: normal; }
  .fund-hero { padding: 15px 16px; }
  .fund-hero .value { font-size: 27px; }
  .fund-head { flex-direction: column; }
}
