/* ============ 阿里巴巴普惠体（Alibaba PuHuiTi）============
   说明：阿里巴巴官方「永久免费商用」字体，自托管于 public/fonts，
   登录页专用，规避商业字体侵权风险。如需更多字重（Regular/Bold/Heavy），
   从官方 fonts.alibabagroup.com 下载对应 woff2 放入 public/fonts 并补充下方 @font-face 即可。
*/
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: url('/fonts/AlibabaPuHuiTi-Medium.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #2563eb; --primary-dark: #1d4ed8; --primary-light: #eff6ff;
  --success: #16a34a; --danger: #dc2626; --warn: #d97706;
  --bg: #f4f6fa; --card: #ffffff; --border: #e5e7eb;
  --text: #1f2937; --text-2: #6b7280; --text-3: #9ca3af;
  --radius: 10px; --shadow: 0 1px 3px rgba(0,0,0,.08);
  --gold: #E9B949; --gold-bright: #FFD27A; --gold-soft: rgba(233,185,73,.16);
  /* 导航栏配色主题（A 墨绿鎏金 / B 深空蓝冰白 / C 暖可可奶金 / D 紫罗兰暮光），默认 B；运行时由 JS 按用户偏好覆盖这些变量 */
  --nav-bg: rgba(15,23,48,.62);
  --nav-border: rgba(255,255,255,.10);
  --nav-logo: #DCE8FF;
  --nav-text: #DCE8FF;
  --nav-text-hover: #FFFFFF;
  --nav-hover-bg: rgba(110,132,188,.14);
  --nav-active-bg: rgba(110,132,188,.22);
  --nav-active-text: #FFFFFF;
  --nav-icon: #6E84BC;
  --nav-icon-hover: #A9BBE8;
  --nav-accent: #8AB4FF;
  --nav-user-role: #7E92C0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: linear-gradient(135deg, #eef1f6 0%, #f6f1e6 100%); color: var(--text); font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

/* 登录页（品牌 + 背景轮播）—— 样式统一在下方 ============ 块内定义 */
.login-page { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; font-family: 'Alibaba PuHuiTi', 'Microsoft YaHei', 'PingFang SC', sans-serif; }
.login-bg { position: absolute; inset: 0; z-index: 0; }
.lg-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; background-size: cover; background-position: center; }
.lg-slide.active { opacity: 1; }
.login-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(135deg, rgba(15,23,42,.62), rgba(30,64,175,.50) 55%, rgba(37,99,235,.46)); }
/* 通用品牌 logo（非登录页专用） */
.brand-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: contain; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--primary-light); color: var(--primary); }
.brand-name { font-size: 18px; font-weight: 700; color: var(--text); }

/* 布局 */
.layout { display: flex; flex-direction: column; min-height: 100vh; max-width: 100vw; }
.layout-body { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-right: 1px solid var(--nav-border);
  box-shadow: inset 1px 0 0 rgba(255,255,255,.06), 0 0 28px rgba(0,0,0,.28);
  color: var(--nav-text-hover);
}
.sidebar .logo { padding: 18px 16px; font-size: 17px; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.sidebar .logo span { color: var(--nav-logo); }
.sidebar nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: var(--nav-text); font-size: 14px; border-left: 3px solid transparent; }
.sidebar nav a:hover { background: var(--nav-hover-bg); color: var(--nav-text-hover); }
.sidebar nav a.active { background: var(--nav-active-bg); color: var(--nav-active-text); border-left-color: var(--nav-accent); }
.sidebar .user-box { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; display:flex; justify-content: space-between; align-items: center;}
.sidebar .user-box .role { color: var(--nav-user-role); font-size: 12px; }
/* 个人中心：导航栏配色主题预览卡片 */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.theme-opt { border: 2px solid var(--border); border-radius: 12px; padding: 10px; background: #fff; cursor: pointer; text-align: center; transition: border-color .15s, box-shadow .15s, transform .15s; font-family: inherit; }
.theme-opt:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.10); }
.theme-opt.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.theme-prev { height: 104px; border-radius: 10px; padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); }
.theme-prev .tp-logo { font-weight: 700; font-size: 17px; line-height: 1; }
.theme-prev .tp-bar, .theme-prev .tp-item { display: flex; align-items: center; gap: 8px; height: 18px; border-radius: 6px; padding: 0 8px; }
.theme-prev .tp-item { border-left: 3px solid transparent; }
.theme-prev .tp-dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.theme-prev .tp-line { height: 6px; border-radius: 3px; flex: 1; }
.theme-prev .tp-line.short { flex: none; width: 45%; }
.theme-name { margin-top: 10px; font-size: 13px; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 4px; }
.theme-check { color: #16a34a; font-weight: 700; display: none; }
.theme-opt.active .theme-check { display: inline; }
@media (max-width: 520px) { .theme-grid { grid-template-columns: 1fr; } }
.main { flex: 1; min-width: 0; padding: 24px 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.topbar h2 { font-size: 20px; }
.bell { position: relative; cursor: pointer; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; }
.bell .dot { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 6px; }

/* 侧边栏品牌 logo */
.sidebar .logo .logo-img { width: 38px; height: 38px; border-radius: 9px; object-fit: contain; vertical-align: middle; margin-right: 0; background: rgba(255,255,255,.10); filter: brightness(1.12) contrast(1.15) drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.sidebar .logo .logo-emoji { font-size: 18px; margin-right: 6px; }
.sidebar .logo .logo-txt { color: #fff; }

/* 主导航项（可拖拽排序） */
#main-nav { flex: 1; padding: 12px 8px; overflow-y: auto; overflow-x: hidden; }
#main-nav .nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin: 2px 4px; color: var(--nav-text); font-size: 14px; border-left: 3px solid transparent; border-radius: 8px; cursor: pointer; text-decoration: none; user-select: none; transition: background .15s, color .15s, transform .15s; }
#main-nav .nav-item:hover { background: var(--nav-hover-bg); color: var(--nav-text-hover); }
#main-nav .nav-item.active { background: var(--nav-active-bg); color: var(--nav-active-text); border-left-color: var(--nav-accent); }
#main-nav .nav-item .nav-ic { color: var(--nav-icon); flex-shrink: 0; }
#main-nav .nav-item:hover .nav-ic, #main-nav .nav-item.active .nav-ic { color: var(--nav-icon-hover); }
#main-nav .nav-item .drag-handle { margin-left: auto; opacity: 0; color: #475569; cursor: grab; transition: opacity .15s; }
#main-nav .nav-item:hover .drag-handle { opacity: .7; }
#main-nav .nav-item.dragging { opacity: .5; }
#main-nav .nav-item.drag-over { border-top: 2px solid var(--accent); }
#main-nav .nav-item .txt { white-space: nowrap; }
/* 折叠态：仅显示图标 */
.layout.collapsed .sidebar { width: 72px; }
.layout.collapsed .sidebar .logo { justify-content: center; padding: 18px 0; }
.layout.collapsed .sidebar .logo .logo-txt,
.layout.collapsed .sidebar .logo-ic,
.layout.collapsed .sidebar .txt,
.layout.collapsed .sidebar-section-header .txt,
.layout.collapsed .sidebar .user-box > div,
.layout.collapsed .sidebar .drag-handle { display: none; }
.layout.collapsed #main-nav .nav-item { justify-content: center; padding: 12px 0; }
.layout.collapsed .sidebar-section-header { justify-content: center; }
.layout.collapsed .sidebar-section-header .section-arrow { display: none; }
.layout.collapsed .sidebar-subnav { display: none !important; }
.layout.collapsed .sidebar .user-box { justify-content: center; }
.layout.collapsed .sidebar .logout-btn { margin: 0; }
.sidebar-collapse { display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 16px); margin: 8px 8px 0; padding: 9px; background: rgba(255,255,255,.08); color: var(--nav-text); border: 1px solid rgba(255,255,255,.10); border-radius: 8px; cursor: pointer; font-size: 13px; }
.sidebar-collapse:hover { background: var(--nav-active-bg); color: var(--nav-text-hover); }
.sidebar-collapse .sc-ic { width: 16px; height: 16px; transform: rotate(180deg); }
.sidebar-collapse .sc-rot { transform: rotate(0deg); }
/* 滚动条美化 */
.sidebar, .main, .table-wrap, #app { scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.sidebar::-webkit-scrollbar, .main::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, #app::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar::-webkit-scrollbar-thumb, .main::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, #app::-webkit-scrollbar-thumb { background: #334155; border-radius: 8px; }
.sidebar::-webkit-scrollbar-thumb:hover, .main::-webkit-scrollbar-thumb:hover, .table-wrap::-webkit-scrollbar-thumb:hover, #app::-webkit-scrollbar-thumb:hover { background: #475569; }
.sidebar::-webkit-scrollbar-track, .main::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track, #app::-webkit-scrollbar-track { background: transparent; }

/* 详情页导航条 */
.detail-nav { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 18px; margin-bottom: 18px; }
.dn-sep { width: 1px; height: 22px; background: var(--border); }
.dn-pos { color: var(--text-2); font-size: 13px; font-weight: 600; min-width: 64px; text-align: center; }

/* 卡片、表格 */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card h3 { font-size: 15px; margin-bottom: 14px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* 客户详情左右布局 */
.cust-detail-layout { display: flex; gap: 18px; align-items: flex-start; }
.cust-main { flex: 1; min-width: 0; }
.cust-side { flex: 0 0 280px; }
.cust-side .card { position: sticky; top: 24px; }
/* 相关团队卡片(default首个)层级高于修改记录卡片，避免下拉框被修改记录遮挡 */
.cust-side .card:first-of-type { z-index: 5; }
.cust-side .card + .card { z-index: 4; }
.cust-group-title { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .5px; margin: 14px 0 8px; padding-left: 8px; border-left: 3px solid var(--primary); }
.cust-group-title:first-of-type { margin-top: 0; }
.cust-stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cust-stat { flex: 1 1 0; min-width: 130px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.cust-stat .lbl { font-size: 12px; color: var(--text-2); }
.cust-stat .num { font-size: 22px; font-weight: 700; margin-top: 4px; }
#cust-rank-box { margin-top: 4px; min-height: 60px; }
.cust-collapse { cursor: pointer; user-select: none; }
.cust-collapse:hover { color: var(--primary-dark, #1d4ed8); }
.cr-caret { display: inline-block; transition: transform .2s ease; margin-right: 6px; font-size: 10px; transform: rotate(0deg); }
.cust-rank-mini { font-size: 11px; color: var(--text-2); margin: 2px 0 6px; }
.rank-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--border); font-size: 13px; }
.rank-row .rank-name { color: var(--text); }
.rank-row b { color: var(--danger); }
.v-section { margin-bottom: 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: border-color .15s, box-shadow .15s; }
.v-section:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(37,99,235,.07); }
.v-section > b { display: block; font-size: 12.5px !important; font-weight: 700; color: var(--text); margin-bottom: 8px !important; padding-bottom: 7px; border-bottom: 1px dashed var(--border); letter-spacing: .3px; }
.v-scroll { max-height: 120px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; padding: 4px; background: #f8fafc; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.stat .num { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat .lbl { color: var(--text-2); font-size: 13px; }
.section-title { font-size: 15px; font-weight: 700; margin: 22px 0 12px; padding-left: 10px; border-left: 3px solid var(--primary); color: var(--text); }
.section-title:first-of-type { margin-top: 4px; }
.stat-overview { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-overview .stat { flex: 1 1 150px; padding: 10px 13px; }
.stat-overview .stat .num { font-size: 20px; }
.stat-overview .stat .lbl { font-size: 12px; }
.stat-overview .stat .sub { font-size: 11px; margin-top: 2px; }
.report-grid { gap: 12px; }
.report-card { padding: 12px 14px; }
.rc-title { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.chart-box { position: relative; width: 100%; }
.chart-box#box-c-type { height: 140px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.filter-row .form-item { margin-bottom: 0; }
.filter-row .form-item label { font-size: 12px; margin-bottom: 3px; }
.filter-row .form-item select, .filter-row .form-item input { font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); min-width: 120px; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.stat-overview .stat { flex: 1 1 180px; }
.stat .sub { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.mini-table { margin-top: 12px; }
table.mini { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.mini th { text-align: left; color: var(--text-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.mini td { padding: 6px 8px; border-bottom: 1px dashed var(--border); }
table.mini tbody tr:hover { background: var(--hover); }
table.mini.drill tbody tr { cursor: pointer; }
table.mini.drill tbody tr:hover { background: var(--primary-light, #eff6ff); }
.drill-summary { padding: 4px 0 14px; color: var(--text-2); font-size: 13px; }
.drill-summary b { color: var(--text); }

/* 下钻明细弹窗（重构版） */
.modal.drill-modal { width: 940px; max-width: 96vw; max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; padding: 22px 24px; }
.drill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.drill-head h3 { font-size: 16px; margin: 2px 0 0; }
.drill-kicker { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.drill-val { color: var(--primary); word-break: break-all; }
.icon-btn { border: none; background: #f1f5f9; color: #475569; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1; flex: none; }
.icon-btn:hover { background: #e2e8f0; }
.drill-statbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dchip { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; padding: 5px 12px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.dchip b { color: var(--text); }
.dchip.tot { background: #eff6ff; border-color: #bfdbfe; }
.dchip.tot b { color: #1d4ed8; }
.dchip.gray { background: #f1f5f9; }
.dchip.orange { background: #fef3c7; }
.dchip.green { background: #dcfce7; }
.drill-toolbar { display: flex; gap: 10px; margin-bottom: 10px; }
.drill-toolbar .inp { width: auto; flex: 1; }
.drill-table-wrap { overflow: auto; max-height: 54vh; border: 1px solid #eef2f7; border-radius: 10px; }
table.mini.drill-list { margin: 0; border: none; }
table.mini.drill-list thead th { position: sticky; top: 0; background: #f8fafc; z-index: 1; box-shadow: 0 1px 0 #e2e8f0; }
table.mini.drill-list td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.mini.drill-list td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; white-space: nowrap; }
.drill-foot { padding: 8px 12px; color: var(--text-2); font-size: 12px; border-top: 1px solid #eef2f7; background: #fcfdfe; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 12px; background: #f8fafc; color: var(--text-2); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; vertical-align: middle; }
tr:hover td { background: #f8fafc; }
.empty { text-align: center; color: var(--text-3); padding: 40px 0; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-row { display: flex; gap: 14px; }
.form-row .form-item { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: none; border-radius: 8px; background: var(--primary); color: #fff; cursor: pointer; font-size: 14px; transition: .15s; }
.btn:hover { background: var(--primary-dark); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); background:#fff; }
.btn.ghost.danger { color: var(--danger); border-color: rgba(220,38,38,.35); }
.btn.ghost.danger:hover { background: rgba(220,38,38,.06); border-color: var(--danger); color: var(--danger); }
/* 友链/费用类型下拉项 hover 背景（原内联 onmouseenter/leave，严格 CSP 改为 CSS :hover） */
.friend-type-opt:hover { background: var(--bg-2); }
.btn.danger { background: var(--danger); }
.btn.success { background: var(--success); }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* 标签 */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.tag.blue { background: #dbeafe; color: #1d4ed8; }
.tag.green { background: #dcfce7; color: #15803d; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.orange { background: #fef3c7; color: #b45309; }
.tag.gray { background: #f1f5f9; color: #64748b; }
.tag.purple { background: #ede9fe; color: #6d28d9; }

/* 筛选栏 */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: flex-end; }
.filters .form-item { margin-bottom: 0; min-width: 130px; }
.filters input, .filters select { padding: 7px 10px; font-size: 13px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 14px; width: 560px; max-width: 94vw; max-height: 88vh; overflow-y: auto; padding: 26px 28px; }
.modal h3 { margin-bottom: 18px; font-size: 17px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal.lg { width: 760px; }
/* 0 元报销二次确认弹窗（贴合系统视觉 DNA） */
.zc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.zc-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.zc-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(217,119,6,.12); color: var(--warn); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.zc-icon svg { display: block; }
.zc-body { color: var(--text-2); font-size: 13.5px; line-height: 1.75; }
.zc-summary { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.zc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.zc-row:first-child { padding-top: 0; }
.zc-row:last-child { padding-bottom: 0; }
.zc-row + .zc-row { border-top: 1px dashed var(--border); }
.zc-label { color: var(--text-3); font-size: 12.5px; }
.zc-amt { color: var(--warn); font-size: 20px; font-weight: 700; }
.zc-body > p { margin: 0 0 12px; }
.zc-tip { background: var(--primary-light); color: var(--primary-dark); border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0; padding: 10px 12px; font-size: 12.5px; line-height: 1.6; margin-top: 12px; }

/* 时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tnode { position: relative; padding-bottom: 20px; }
.tnode .dot { position: absolute; left: -24px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--text-3); }
.tnode.passed .dot { border-color: var(--success); background: var(--success); }
.tnode.rejected .dot { border-color: var(--danger); background: var(--danger); }
.tnode.running .dot { border-color: var(--primary); background:#fff; box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.tnode .t-title { font-weight: 600; font-size: 14px; }
.tnode .t-sub { color: var(--text-2); font-size: 12.5px; margin-top: 3px; line-height: 1.7; }

/* AI校验结果 */
.check-item { display: flex; gap: 8px; padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 13px; background: #f8fafc; align-items: flex-start;}
.check-item.pass { background: #f0fdf4; }
.check-item.fail { background: #fef2f2; }
.check-item .ic { font-weight: 700; flex-shrink: 0;}
.check-item.pass .ic { color: var(--success); }
.check-item.fail .ic { color: var(--danger); }
.check-item.ai { background: #eef2ff; border: 1px solid #c7d2fe; }
.check-item.ai .ic { color: #4f46e5; }

/* 通知面板 */
.notif-panel { position: fixed; right: 20px; top: 90px; width: 300px; max-height: 60vh; overflow-y: auto; background: #fff; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.14); z-index: 90; padding: 0; border: 1px solid var(--border); }
.notif-panel .notif-head { background: linear-gradient(135deg, #eff6ff 0%, #fff 100%); color: var(--text); border-bottom: 1px solid var(--border); padding: 10px 14px; font-size: 13px; }
.notif-panel .notif-head b { color: var(--primary-dark); }
.notif-item { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; position: relative; transition: background .15s; cursor: pointer; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #f0f7ff; }
.notif-item.unread::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; background: var(--primary); border-radius: 0 3px 3px 0; }
.notif-item.unread::after { content: ''; position: absolute; right: 8px; top: 10px; width: 6px; height: 6px; background: var(--danger); border-radius: 50%; box-shadow: 0 0 0 2px rgba(239, 68, 68, .12); }
.notif-item .n-title { font-weight: 600; font-size: 13px; color: var(--text); padding-right: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item .n-body { color: var(--text-2); font-size: 12px; margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.notif-item .n-time { color: var(--text-3); font-size: 11px; margin-top: 4px; }
.notif-foot { padding: 8px 14px; text-align: center; border-top: 1px solid var(--border); background: #f8fafc; border-radius: 0 0 10px 10px; }
.notif-foot a { color: var(--primary); font-size: 12px; text-decoration: none; }
.notif-foot a:hover { text-decoration: underline; }

/* 消息提示 */
#toast-box { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; }
.toast { background: #1f2937; color: #fff; border-radius: 8px; padding: 10px 22px; margin-bottom: 10px; box-shadow: var(--shadow); animation: fadein .25s; font-size: 14px; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--success); }
@keyframes fadein { from { opacity: 0; transform: translateY(-8px);} to { opacity: 1; } }

/* 发票卡片 */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; }
.inv-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: #fff; transition: .15s; position: relative; }
.inv-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.inv-card.selected { border-color: var(--primary); background: var(--primary-light); }
.inv-card .amount { font-size: 20px; font-weight: 700; color: var(--danger); }
.inv-card .meta { color: var(--text-2); font-size: 12.5px; line-height: 1.8; margin-top: 6px; }
.inv-card .row1 { display: flex; justify-content: space-between; align-items: flex-start; }
.inv-card .chk { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; }

.help-text { font-size: 12.5px; color: var(--text-3); margin-top: 4px; line-height: 1.7; }

/* 相关成员多选 */
.mem-list { display: flex; flex-wrap: wrap; gap: 8px 14px; max-height: 220px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; }
.mem-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; user-select: none; }
.mem-opt input { width: 15px; height: 15px; accent-color: var(--primary); }
.mem-name { font-weight: 500; }
.mem-sub { color: var(--text-3); font-size: 12px; }
.ipt-sm { width: 140px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }

/* 发票详情键值表 */
table.kv { width: 100%; border-collapse: collapse; }
table.kv th { width: 110px; text-align: left; padding: 9px 12px; background: #f8fafc; color: var(--text-2); font-size: 13px; font-weight: 600; border: 1px solid var(--border); vertical-align: top; white-space: nowrap; }
table.kv td { padding: 9px 12px; border: 1px solid var(--border); font-size: 13.5px; }

/* 发票夹批量选择条 */
.bulk-bar { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border: 1px solid #93c5fd; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; flex-wrap: wrap; box-shadow: 0 2px 8px rgba(37, 99, 235, .08); }
.bulk-bar .sel-info { font-weight: 600; color: var(--primary-dark); font-size: 14px; }
.bulk-bar .sel-info::before { content: '✓'; display: inline-block; margin-right: 4px; background: var(--primary); color: #fff; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; font-size: 12px; vertical-align: middle; }
.bulk-bar .btn { padding: 8px 16px; font-size: 13px; font-weight: 500; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: transform .15s, box-shadow .15s; }
.bulk-bar .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.bulk-bar .btn:not(.ghost) { background: var(--primary); color: #fff; }
.bulk-bar .btn.ghost { background: #fff; border: 1px solid var(--border); }
.bulk-bar .btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.bulk-bar .tip { font-size: 12px; color: var(--text-3); margin-left: auto; }
.table-wrap { overflow-x: auto; }
#inv-list tr.selected td { background: #eff6ff; }

/* 统一所有列表复选框样式 */
#inv-list input.chk, #inv-selall, .cust-chk, .nchk, input[type="checkbox"].ck {
  width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary);
  border-radius: 3px; vertical-align: middle; flex-shrink: 0;
}
label.ck { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-size: 13px; color: var(--text); white-space: nowrap; box-shadow: none; }

/* 客户预算条 */
.budget-card { border: 1px solid var(--border); }
.budget-card.over { border-color: #fca5a5; background: #fef2f2; }
.budget-bar { height: 12px; background: #e5e7eb; border-radius: 6px; overflow: hidden; margin: 8px 0 10px; }
.budget-bar .fill { height: 100%; background: linear-gradient(90deg,#16a34a,#22c55e); }
.budget-card.over .budget-bar .fill { background: linear-gradient(90deg,#dc2626,#ef4444); }
.budget-stat { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.budget-stat b { color: var(--text); }
.budget-stat b.danger { color: var(--danger); }
.steps-editor .step-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.progress-mini { display: flex; align-items: center; gap: 4px; }
.progress-mini .seg { width: 26px; height: 6px; border-radius: 3px; background: var(--border); }
.progress-mini .seg.on { background: var(--success); }
.progress-mini .seg.cur { background: var(--primary); }
.progress-mini .seg.bad { background: var(--danger); }
/* 左侧导航未读角标 */
.sidebar nav a .nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; line-height: 1; border-radius: 10px; padding: 2px 7px; font-weight: 600; }

/* 通知中心 */
.notif-page .notif-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.notif-page .ntab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; }
.notif-page .ntab.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.notif-page .ntab .cnt { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--primary-light); color: var(--primary-dark); }
.notif-page .ntab.on .cnt { background: rgba(255,255,255,.25); color: #fff; }
.notif-page .ntab .cnt.unread { background: var(--danger); color: #fff; }
.notif-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.notif-row.read { opacity: .72; }
.notif-row .n-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--text-3); }
.notif-row .n-dot.unread { background: var(--primary); }
.notif-row .n-main { flex: 1; cursor: pointer; min-width: 0; }
.notif-row .n-title { font-weight: 600; font-size: 14px; }
.notif-row .n-body { color: var(--text-2); font-size: 13px; margin-top: 3px; line-height: 1.6; }
.notif-row .n-time { color: var(--text-3); font-size: 11.5px; margin-top: 4px; }
.notif-row .n-ops { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.notif-row .n-ops a { font-size: 12.5px; white-space: nowrap; }
.notif-row input.nchk { width: 18px; height: 18px; margin-top: 4px; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; }
.notif-panel .notif-head { background: var(--primary); color: #fff; }

/* 统计看板 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.exp-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 14px; margin-bottom: 18px; align-items: stretch; }
.exp-kpi-row .stat { padding: 16px 18px; }
.exp-kpi-row .card { padding: 16px 18px; }

/* 归属月份日历输入框 */
.month-input { min-width: 150px; box-sizing: border-box; }
.month-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); }
.month-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .5; }
.stat.blue .num { color: var(--primary); }
.stat.orange .num { color: var(--warn); }
.stat.green .num { color: var(--success); }
.stat-status .status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: #f1f5f9; color: #64748b; }
.chip.blue { background: #dbeafe; color: #1d4ed8; }
.chip.green { background: #dcfce7; color: #15803d; }
.chip.red { background: #fee2e2; color: #b91c1c; }
.chip.orange { background: #fef3c7; color: #b45309; }
.chip.purple { background: #ede9fe; color: #6d28d9; }
.chip.gray { background: #f1f5f9; color: #64748b; }
a.link-no { font-weight: 600; }

/* 发起报销：金额字段突出 + 发票列表式 */
.amount-field { flex: 1 1 0; }
input.amount-input { font-size: 18px; font-weight: 700; color: var(--danger); }
table.inv-list-table { width: 100%; border-collapse: collapse; }
table.inv-list-table th { text-align: left; padding: 10px 12px; background: #f8fafc; color: var(--text-2); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.inv-list-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; }
table.inv-list-table tr.inv-row:hover { background: #f8fafc; }
table.inv-list-table tr.inv-row.selected { background: var(--primary-light); }
table.inv-list-table input.chk { width: 18px; height: 18px; cursor: pointer; }

/* 关联发票可点击 */
.inv-clickable { cursor: pointer; }
.inv-clickable:hover { background: var(--primary-light); }

/* ============ 侧边栏系统设置展开区 ============ */
.sidebar-section { border-top: 1px solid var(--nav-border); margin-top: 4px; }
.sidebar-section-header { display: flex; align-items: center; justify-content: space-between; padding: 11px 20px; color: var(--nav-icon); font-size: 14px; cursor: pointer; user-select: none; }
.sidebar-section-header:hover { background: var(--nav-hover-bg); color: var(--nav-text-hover); }
.section-arrow { font-size: 10px; transition: transform .2s; }
.sidebar-subnav { display: none; }
.sidebar-subnav a { padding-left: 36px; font-size: 13px; }

/* ============ 品牌配置页 ============ */
.brand-config .brand-desc { color: var(--text-2); font-size: 13px; margin-bottom: 18px; line-height: 1.6; }
.bc-row { margin-bottom: 0; }
.upload-row { display: flex; gap: 8px; align-items: flex-start; }
.upload-row input { flex: 1; }
.logo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.logo-preview img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); background: #fff; }
.brand-config .form-item:has(.logo-preview) { flex: 1 1 100%; }
.wx-help { margin: 6px 0 0; padding-left: 20px; color: var(--text-2); font-size: 13px; line-height: 1.9; }
.wx-help li { margin-bottom: 2px; }
.wx-help b { color: var(--text-1); }
.org-node { border-left: 1px dashed var(--border); margin-left: 8px; }
/* 组织架构左右布局 */
.org-layout { display: flex; gap: 18px; align-items: flex-start; }
.org-left { flex: 0 0 260px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; position: sticky; top: 24px; }
.org-left-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.org-left-head h3 { margin: 0; font-size: 14px; }
.org-left .org-tree { max-height: 55vh; overflow-y: auto; padding: 4px 0; margin-top: 0; }
.org-tree-item { display: flex; align-items: center; gap: 6px; padding: 10px 16px; font-size: 13px; color: var(--text); cursor: pointer; transition: background .12s; }
.org-tree-item:hover { background: #f1f5f9; }
.org-tree-item.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.org-tree-item .dept-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.org-tree-item .dept-toggle, .org-tree-item .dept-toggle-placeholder { width: 14px; text-align: center; font-size: 9px; color: var(--text-3); cursor: pointer; flex-shrink: 0; user-select: none; }
.org-tree-item .dept-toggle:hover { color: var(--primary); }
.org-tree-item .leader-tag { margin-left: 6px; font-size: 11px; background: var(--primary-light); color: var(--primary-dark); font-weight: 500; }
/* 人员编号：与其它单元格统一字体（不再使用等宽 code），仅作轻微底纹区分 */
.emp-no { display: inline-block; font-family: inherit; font-size: 13px; line-height: 1.4; padding: 2px 8px; background: var(--bg-2); border-radius: 4px; color: var(--text); letter-spacing: .3px; white-space: nowrap; }
.org-tree-item .tag { margin-left: auto; font-size: 11px; }
.org-item-ops { margin-left: 4px; white-space: nowrap; font-size: 12px; opacity: 0; transition: opacity .12s; }
.org-tree-item:hover .org-item-ops { opacity: 1; }
.org-item-ops a { text-decoration: none; margin-left: 4px; color: var(--text-2); }
.org-item-ops a:hover { color: var(--primary); }
.org-left-foot { padding: 10px 12px; border-top: 1px solid var(--border); }
.org-right { flex: 1; min-width: 0; }
.org-right-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.org-right-head h3 { margin: 0; font-size: 15px; }
.org-role-select { padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; background: #fff; color: var(--text); cursor: pointer; }
.org-role-select:focus { border-color: var(--primary); outline: none; }
.org-dept-select { padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; background: #fff; color: var(--text); cursor: pointer; max-width: 120px; }
.org-dept-select:focus { border-color: var(--primary); outline: none; }
/* 组织架构筛选栏：横向排列 */
.org-filters { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.org-filter-select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; background: #fff; color: var(--text); cursor: pointer; }
.org-filter-search { padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; width: 140px; }

/* ============ 登录页布局（左右分栏 · 大气 · 少留白） ============ */
.login-container { position: relative; z-index: 2; display: flex; align-items: stretch; min-height: 100vh; width: 100%; max-width: 1200px; margin: 0 auto; }
/* 左侧：品牌英雄区（内容与右侧登录框垂直居中对齐） */
.login-hero { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 56px 64px 40px; color: #fff; min-width: 0; }
.hero-main { margin-top: 0; max-width: 620px; }
.hero-title { font-size: 46px; font-weight: 800; line-height: 1.22; margin-bottom: 18px; letter-spacing: .5px; text-shadow: 0 2px 14px rgba(0,0,0,.28); }
.hero-subtitle { font-size: 20px; opacity: .92; margin-bottom: 30px; line-height: 1.7; }
.hero-features { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 38px; }
.hero-feature-tag { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 22px; padding: 8px 18px; font-size: 16px; font-weight: 600; backdrop-filter: blur(4px); }
.hero-bottom { margin-top: 28px; }
.hero-legal { font-size: 12.5px; opacity: .7; line-height: 1.8; white-space: pre-wrap; margin-bottom: 10px; }
.hero-footer { font-size: 12px; opacity: .6; }
/* 右侧：登录卡片列（纵向排列，品牌条+卡片整体居右） */
.login-card-col { flex: 0 0 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 40px; }
/* 品牌信息条：固定在界面最左上角；1.5 倍为上限，并随窗口大小（vw）平滑缩放 */
.login-card-top { position: absolute; top: clamp(14px, 1.6vw, 24px); left: clamp(16px, 2vw, 28px); z-index: 5; width: auto; }
.login-brand-bar { display: flex; align-items: center; gap: clamp(13px, 1.35vw, 20px); background: rgba(255,255,255,.10); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); border-radius: clamp(14px, 1.46vw, 21px); padding: clamp(11px, 1.15vw, 17px) clamp(18px, 2.08vw, 30px); color: #fff; }
.login-brand-bar .login-card-logo { width: clamp(40px, 4.375vw, 63px); height: clamp(40px, 4.375vw, 63px); border-radius: clamp(11px, 1.2vw, 18px); object-fit: contain; background: rgba(255,255,255,.15); padding: 0; flex-shrink: 0; }
.login-brand-bar .login-card-logo.emoji { display: flex; align-items: center; justify-content: center; font-size: clamp(22px, 2.29vw, 33px); background: none; padding: 0; }
.login-brand-info { display: flex; flex-direction: column; min-width: 0; gap: clamp(3px, .35vw, 6px); }
.login-brand-name { font-size: clamp(15px, 1.6vw, 23px); font-weight: 700; letter-spacing: .5px; white-space: nowrap; line-height: 1.25; }
.login-brand-en { font-size: clamp(11px, 1.15vw, 17px); opacity: .75; white-space: nowrap; letter-spacing: .3px; }
/* 登录页底部：友情链接（图片超链接）+ 版权备案 */
.login-footer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px 14px; text-align: center; pointer-events: none; }
.login-friend-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; max-width: 1120px; pointer-events: auto; }
.friend-link { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 6px 14px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.65); border-radius: 8px; transition: background .15s, transform .15s, box-shadow .15s; }
.friend-link:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.friend-link img { height: 40px; max-width: 200px; width: auto; object-fit: contain; display: block; }
.friend-link-text { font-size: 15px; font-weight: 600; color: #1e3a8a; white-space: nowrap; line-height: 1; }
.login-copyright { font-size: 12px; color: #fff; opacity: .74; text-shadow: 0 1px 4px rgba(0,0,0,.35); letter-spacing: .3px; pointer-events: auto; }
.login-beian { font-size: 12px; pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.login-beian a { color: #fff; opacity: .82; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,.55); padding-bottom: 1px; transition: opacity .15s; }
.login-beian a:hover { opacity: 1; border-bottom-color: #fff; }
.login-beian img { display: inline-block; width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.login-beian-sep { color: #fff; opacity: .5; }
/* 后台：友情链接编辑器 */
.friendlinks-config .fl-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: var(--bg-2, #f8fafc); }
.friendlinks-config .fl-img-row { flex: 1 1 300px; }
.friendlinks-config .fl-fields { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; }
.friendlinks-config .fl-fields input { width: 100%; }
.friendlinks-config .fl-row .btn.danger { color: #dc2626; border-color: rgba(220,38,38,.4); }
.friendlinks-config .fl-row .btn.danger:hover { background: rgba(220,38,38,.08); }
/* 登录表单卡 */
.login-card { position: relative; width: 400px; background: #fff; border-radius: 16px; padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; flex-shrink: 0; }
.login-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--primary), #38bdf8); }
.login-card-head { margin-bottom: 20px; }
.login-card-head .login-title { font-size: 20px; font-weight: 800; color: var(--text); }
.login-card-head .login-subtitle { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }
/* 表单字段（登录卡内更醒目） */
.login-card .form-item { margin-bottom: 14px; }
.login-card .form-item label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.login-card .form-item input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.login-card .form-item input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.login-captcha-item .login-captcha { display: flex; gap: 12px; align-items: center; }
.login-captcha input { flex: 1; min-width: 0; }
.login-captcha-img { width: 124px; height: 44px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; flex-shrink: 0; background: #f1f5f9; transition: transform .12s ease; }
.login-captcha-img:active { transform: scale(.97); }
.login-links { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 18px; font-size: 12.5px; }
.login-hint { color: var(--text-3); }
.login-forgot { color: var(--primary); cursor: pointer; }
.login-forgot:hover { text-decoration: underline; }
.login-btn { width: 100%; padding: 11px; margin-top: 2px; letter-spacing: 6px; font-size: 14.5px; font-weight: 700; border-radius: 10px; display: flex; justify-content: center; }
.login-secure-tip { margin-top: 12px; font-size: 11.5px; color: var(--text-3); text-align: center; padding: 7px 10px; background: var(--primary-light); border-radius: 8px; }
.login-hint-extra { margin-top: 10px; text-align: center; font-size: 13px; min-height: 24px; }

/* 微信登录入口 */
.login-divider { display: flex; align-items: center; text-align: center; color: var(--text-3); font-size: 12px; margin: 14px 0 10px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-divider span { padding: 0 12px; }
.login-wx-btn { width: 100%; padding: 12px; margin-top: 4px; letter-spacing: 1px; font-size: 15px; font-weight: 700; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; background: #07c160; border-color: #07c160; color: #fff; }
.login-wx-btn:hover { background: #06ad56; border-color: #06ad56; }
.login-wx-btn svg { flex-shrink: 0; }

/* 微信绑定手机号浮层 */
.wx-bind-overlay, .wx-demo-modal { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }
.wx-bind-card, .wx-demo-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 30px 30px 26px; box-shadow: 0 24px 70px rgba(0,0,0,.30); }
.wx-bind-head, .wx-demo-head { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.wx-bind-tip, .wx-demo-tip { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 18px; }
.wx-bind-tip b, .wx-demo-tip b { color: var(--primary); }
.wx-bind-err { color: #dc2626; font-size: 13px; min-height: 18px; margin: -6px 0 10px; }
.wx-demo-qr { display: flex; justify-content: center; margin: 6px 0 14px; padding: 12px; background: #f6fef9; border: 1px solid #cdeede; border-radius: 12px; }
.wx-demo-card .login-wx-btn { margin-top: 6px; }
.wx-demo-card .btn.ghost, .wx-bind-card .btn.ghost { width: 100%; margin-top: 10px; }

/* 详情页可折叠卡片 */
.collapsible-card .collapse-head { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.collapsible-card .collapse-ic { font-size: 13px; color: var(--primary); font-weight: 600; }
.collapsible-card .collapse-body { margin-top: 14px; }

/* 人员档案 / 入职档案 字段分组（与系统主色协调） */
.archive-group { margin-top: 16px; border-top: 2px solid var(--border); padding-top: 14px; }
.archive-group:first-of-type { margin-top: 18px; }
.archive-group .collapse-head {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; user-select: none;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%);
  border: 1px solid var(--border); border-radius: 10px;
  transition: all .15s;
}
.archive-group .collapse-head:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37,99,235,.08);
}
.archive-head-left { display: inline-flex; align-items: center; gap: 10px; }
.archive-ic-wrap {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 10px rgba(37,99,235,.25);
  flex-shrink: 0;
}
.archive-ic-wrap.archive-ic-onboard {
  background: linear-gradient(135deg, #ff8a3d 0%, #ff6a17 100%);
  box-shadow: 0 4px 10px rgba(255,138,61,.25);
}
.archive-ic-wrap .archive-ic { width: 18px; height: 18px; color: #fff; }
.archive-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); display: inline; }
.archive-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(37,99,235,.08);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3px;
}
.archive-ic-wrap.archive-ic-onboard ~ .archive-tag {
  background: rgba(255,138,61,.12); color: #c2410c;
}
.archive-group .collapse-ic { font-size: 13px; color: var(--primary); font-weight: 600; }
.archive-ic-wrap.archive-ic-onboard ~ .archive-title ~ .archive-tag + .collapse-ic { color: #c2410c; }
.archive-group .collapse-body { margin-top: 14px; padding: 0 4px; }

/* 分组内提示条 */
.archive-tip {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 14px; margin-top: 6px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd; border-radius: 8px;
  font-size: 12.5px; color: #075985; line-height: 1.65;
}
.archive-tip-onboard {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fed7aa; color: #9a3412;
}
.archive-tip .tip-ic { width: 16px; height: 16px; flex-shrink: 0; color: #0284c7; margin-top: 2px; }
.archive-tip-onboard .tip-ic { color: #ea580c; }

/* 附件 AI 识别状态徽章（不阻塞交互，告知用户后台在跑） */
.cert-ai-badge { transition: all .2s; }
.cert-ai-pending { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cert-ai-pending::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2563eb; margin-right: 4px; vertical-align: middle; animation: certPulse 1s infinite; }
.cert-ai-done    { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.cert-ai-partial { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.cert-ai-fail    { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
@keyframes certPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.6); } }

/* AI 提示词管理弹窗 */
.kv-row { margin-bottom: 10px; font-size: 13.5px; line-height: 1.7; }
.kv-row b { color: var(--text-2); margin-right: 6px; }
.kv-row code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 12px; color: var(--primary-dark); }

@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .sidebar { width: 64px; } .sidebar .logo, .sidebar nav a span.txt, .sidebar .user-box { display: none; } }
@media (max-width: 980px) {
  .login-container { flex-direction: column; }
  .login-hero { padding: 40px 28px 24px; }
  .hero-main { margin: 28px 0; max-width: none; }
  .hero-title { font-size: 34px; }
  .hero-subtitle { font-size: 18px; margin-bottom: 22px; }
  .login-card-col { flex: none; width: 100%; padding: 0 18px 44px; }
  .login-brand-name { max-width: 520px; }
  .login-card { width: auto; max-width: 420px; padding: 36px 28px 32px; }
}
@media (max-width: 768px) {
  .login-hero { padding: 32px 22px 18px; }
  .hero-title { font-size: 30px; }
  .hero-subtitle { font-size: 16px; }
  .hero-features { gap: 6px; } .hero-feature-tag { font-size: 13px; padding: 5px 12px; }
  .hero-bottom { display: none; }
  .login-card-col { padding: 0 14px 36px; align-items: center; }
  .login-card-top { display: none; }
  .login-card { width: auto; max-width: 100%; padding: 30px 22px 26px; border-radius: 14px; }
  .login-card-col { padding: 0 14px 96px; align-items: center; }
  .login-footer { gap: 6px; padding: 10px 12px 12px; }
  .friend-link { height: 44px; }
  .friend-link img { height: 32px; max-width: 160px; }
  .login-links { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============ 动态体验层（粒子 / 视差 / 3D翻转 / 加载 / 悬浮面板 / 拖拽 / 图标 / 跑马灯 / 时钟） ============ */
:root {
  --accent: #ff8a3d;
  --accent-2: #ffb277;
  --accent-glow: rgba(255,138,61,.45);
  --accent-soft: rgba(255,138,61,.12);
}
/* SVG 图标统一（橙色科技感） */
.ic { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; color: var(--accent); flex-shrink: 0; }
.ic.h-ic { width: 20px; height: 20px; margin-right: 9px; vertical-align: -4px; }
.h-title { vertical-align: middle; }
.nav-ic { width: 19px; height: 19px; color: var(--nav-icon); transition: .2s; }
.sidebar nav a:hover .nav-ic { color: var(--nav-icon-hover); }
.sidebar nav a.active .nav-ic { color: var(--nav-accent); }
.sidebar .logo-ic { width: 30px; height: 30px; color: var(--nav-logo); margin-right: 0; vertical-align: middle; }
.logout-btn { color: var(--nav-user-role); display: inline-flex; transition: .2s; }
.logout-btn:hover { color: var(--nav-accent); transform: scale(1.1); }

/* 视差装饰光斑 */
#fx-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: fixed; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,138,61,.30), rgba(37,99,235,.12) 55%, transparent 70%); filter: blur(10px); will-change: transform; opacity: .8; }
.orb-sm { width: 180px; height: 180px; }
.layout { position: relative; z-index: 1; }

/* 粒子画布 */
#fx-canvas { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }

/* 按钮悬浮：放大 1.1 倍 + 淡橙光晕 */
.btn, button, .icon-btn { transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .18s, background .18s, color .18s; }
.btn:hover, button:hover:not(:disabled) { transform: scale(1.1); box-shadow: 0 8px 24px var(--accent-glow); }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { transform: scale(1.1); box-shadow: 0 6px 18px var(--accent-glow); color: var(--accent); border-color: var(--accent); }
.sidebar nav a { transition: background .18s, color .18s; }
.sidebar nav a:hover { background: var(--nav-hover-bg); color: var(--nav-text-hover); }

/* 3D 翻转页面过渡 */
.main { position: relative; perspective: 1500px; }
#page.flip-in { animation: pageFlip .55s cubic-bezier(.2,.7,.2,1); transform-origin: top center; }
@keyframes pageFlip {
  0% { opacity: 0; transform: rotateY(-14deg) translateY(14px); }
  100% { opacity: 1; transform: rotateY(0) translateY(0); }
}

/* 顶部跑马灯公告 */
.marquee { overflow: hidden; white-space: nowrap; background: linear-gradient(90deg, rgba(255,138,61,.16), rgba(37,99,235,.12)); border: 1px solid var(--border); border-radius: 8px; padding: 7px 14px; margin-bottom: 8px; }
.marquee-track { display: inline-flex; align-items: center; animation: mqScroll 32s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 13px; color: var(--text); }
.mq-ic { width: 15px; height: 15px; color: var(--accent); }
.mq-sep { color: var(--accent); opacity: .6; }
@keyframes mqScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 右上角北京时间时钟 */
.topbar-right { display: flex; align-items: center; gap: 16px; }
.bell { position: relative; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.bell .ic { width: 20px; height: 20px; color: var(--text-2); }
.bell:hover .ic { color: var(--accent); }
.bell .dot { position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 6px; }
.topclock { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.clk-date { font-size: 12px; color: var(--text-2); }
.clk-time { font-size: 17px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.clk-zone { font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; }

/* 流动渐变线条加载（替代传统转圈） */
.fx-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 0; }
.fx-loading-line { width: 220px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--primary), var(--accent)); background-size: 200% 100%; animation: flowLine 1.1s linear infinite; }
.fx-loading-text { color: var(--text-2); font-size: 13px; }
@keyframes flowLine { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }
.fx-loader { display: none; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 5; overflow: hidden; }
.fx-loader-bar { height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--accent), var(--primary), transparent); background-size: 200% 100%; animation: flowLine 1.1s linear infinite; }

/* 半透明悬浮信息面板 */
.float-panel-mask { position: fixed; inset: 0; z-index: 8000; background: rgba(15,23,42,.35); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; animation: fpFade .25s ease; }
.float-panel { width: min(440px, 92vw); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.6); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; animation: fpPop .3s cubic-bezier(.2,.7,.2,1); }
.fp-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px; font-weight: 700; border-bottom: 1px solid var(--border); }
.fp-ic { width: 20px; height: 20px; color: var(--accent); }
.fp-close { margin-left: auto; cursor: pointer; color: var(--text-2); font-size: 16px; }
.fp-body { padding: 18px 20px; }
@keyframes fpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fpPop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.sys-info .si-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.sys-info .si-row:last-of-type { border-bottom: none; }
.si-ic { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.sys-info small { color: var(--text-2); }
.si-quick { display: flex; gap: 10px; margin-top: 14px; }

/* 轻量拖拽交互 */
.stat[draggable], .card[draggable] { cursor: grab; transition: box-shadow .2s, transform .2s, opacity .2s; }
.stat[draggable]:hover, .card[draggable]:hover { box-shadow: 0 8px 26px var(--accent-glow); outline: 1px dashed var(--accent); }
.card[draggable].dragging, .stat[draggable].dragging { opacity: .55; cursor: grabbing; transform: scale(.98); }
.stat[draggable]::after, .card[draggable]::after { content: '⠿'; position: absolute; top: 8px; right: 10px; color: var(--accent); opacity: 0; transition: .2s; font-size: 14px; }
.stat[draggable]:hover::after, .card[draggable]:hover::after { opacity: .8; }
.stat { position: relative; }

/* 公告管理表 */
.ann-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ann-table th, .ann-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.ann-table th { background: #f8fafc; color: var(--text-2); font-weight: 600; }
.ann-table td:first-child { max-width: 360px; }

/* 合计页脚 */
table tfoot td { background: #f1f5f9; font-weight: 600; border-top: 2px solid var(--border); padding: 9px 12px; font-size: 13px; }
a.link-no { color: var(--primary); cursor: pointer; }
a.link-no:hover { text-decoration: underline; }

/* 分页条 */
.pg-bar { display: flex; align-items: center; gap: 12px; padding: 10px 4px 4px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.pg-pack { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pg-center { display: flex; align-items: center; gap: 14px; flex: 1; justify-content: center; }
.pg-sum { font-weight: 600; color: var(--primary-dark); white-space: nowrap; }
.pg-size { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.pg-size select { padding: 2px 4px; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--text); font-size: 13px; min-width: 52px; }
.pg-total { font-weight: 600; color: var(--text); white-space: nowrap; }
.pg-nav { display: inline-flex; gap: 4px; align-items: center; }
.pg-btn, .pg-num { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 13px; min-width: 32px; }
.pg-btn:hover:not(:disabled), .pg-num:hover { border-color: var(--primary); color: var(--primary); }
.pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pg-num.cur { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-nav .pg-num { margin: 0; }

/* 发票夹操作栏 */
.inv-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

/* 每日正能量 */
.daily-quote { display: flex; align-items: center; gap: 8px; padding: 14px 18px; margin-bottom: 16px; background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fcd34d; border-radius: 10px; font-size: 15px; color: #92400e; box-shadow: none; }
.daily-quote .ic { width: 20px; height: 20px; color: #f59e0b; flex-shrink: 0; }

/* 发票原件弹窗查看器 */
.inv-file-viewer { text-align: center; padding: 10px 0; }
/* OFD 原件预览降级（浏览器无法在 img/iframe 渲染 OFD）：明确提示 + 下载入口 */
.ofd-tip { display:flex; flex-direction:column; align-items:center; gap:10px; padding:34px 22px; text-align:center; background:#fafbff; border:1px dashed var(--border); border-radius:12px; }
.ofd-ic { font-size:46px; line-height:1; }
.ofd-title { margin:4px 0 0; font-size:15px; font-weight:600; color:var(--text); }
.ofd-title b { color:var(--primary); }
.ofd-sub { margin:0; font-size:13px; color:var(--muted); max-width:420px; line-height:1.6; }
.ofd-tip .btn { margin-top:6px; text-decoration:none; }

/* 上传结果弹窗 */
.ur-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 18px; }
.ur-stat { background: #f1f5f9; border-radius: 10px; padding: 14px 10px; text-align: center; border: 1px solid var(--border); }
.ur-stat.success { background: linear-gradient(135deg, #ecfdf5, #f0fdf4); border-color: #86efac; }
.ur-stat.warn { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fcd34d; }
.ur-stat.ok { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-color: #93c5fd; }
.ur-num { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.ur-stat.success .ur-num { color: #059669; }
.ur-stat.warn .ur-num { color: #b45309; }
.ur-stat.ok .ur-num { color: #1d4ed8; }
.ur-lbl { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.ur-block { margin-top: 14px; }
.ur-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; padding-left: 6px; border-left: 3px solid var(--primary); }
.ur-title.warn { border-left-color: #f59e0b; }
.ur-title .ic { width: 15px; height: 15px; vertical-align: -2px; margin-right: 5px; }
.ur-title.ok .ic { color: #059669; }
.ur-title.warn .ic { color: #b45309; }
.ur-list { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; max-height: 240px; overflow-y: auto; }
.ur-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #e2e8f0; font-size: 13px; }
.ur-row:last-child { border-bottom: none; }
.ur-row.skip { background: #fffbeb; }
.ur-status { font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 4px; text-align: center; }
.ur-status.ok { background: #d1fae5; color: #047857; }
.ur-status.warn { background: #fef3c7; color: #b45309; }
.ur-status.fail { background: #fee2e2; color: #b91c1c; }
.ur-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-amount { font-weight: 600; color: var(--primary-dark); white-space: nowrap; }
.ur-reason { color: var(--text-2); font-size: 12px; }
.ur-empty { padding: 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.muted { color: var(--text-3); }

/* ===== 发票上传弹窗（可视化进度重构） ===== */
.hidden { display: none !important; }

.modal.um-modal { width: 600px; }
.um { display: flex; flex-direction: column; }
.um-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.um-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.um-ic .ic { width: 24px; height: 24px; }
.um-title { margin: 0; font-size: 17px; }
.um-sub { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

.um-drop { border: 2px dashed var(--border); border-radius: 12px; padding: 28px 16px; text-align: center; cursor: pointer; transition: .15s; background: #fafbfc; }
.um-drop:hover, .um-drop.drag { border-color: var(--primary); background: var(--primary-light); }
.um-drop-ic { margin-bottom: 8px; line-height: 0; }
.um-drop-svg { width: 44px; height: 44px; color: var(--primary); }
.um-drop-t1 { font-size: 14px; color: var(--text); font-weight: 600; }
.um-drop-t2 { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.um-filelist { margin-top: 14px; max-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.um-fitem { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; }
.um-fitem:last-child { border-bottom: none; }
.um-fic { flex-shrink: 0; display: flex; align-items: center; }
.um-fic .ic { width: 22px; height: 22px; }
.um-fsvg.pdf { color: #dc2626; }
.um-fsvg.img { color: #2563eb; }
.um-fsvg { color: #64748b; }
.um-finfo { flex: 1; min-width: 0; }
.um-fname { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-fmeta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.um-fdel { width: 24px; height: 24px; border-radius: 50%; border: none; background: #f1f5f9; color: var(--text-2); cursor: pointer; font-size: 12px; line-height: 1; flex-shrink: 0; }
.um-fdel:hover { background: var(--danger); color: #fff; }
.um-chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.um-chip.up { background: #e0f2fe; color: #0369a1; }
.um-chip.rec { background: #ede9fe; color: #6d28d9; }
.um-chip.ok { background: #d1fae5; color: #047857; }
.um-chip.warn { background: #fef3c7; color: #b45309; }
.um-chip.fail { background: #fee2e2; color: #b91c1c; }
.um-fitem.status-recognizing .um-chip.rec,
.um-fitem.status-uploading .um-chip.up { animation: umpulse 1s ease-in-out infinite; }
@keyframes umpulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.um-progress { margin-top: 16px; }
.um-bar { height: 9px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.um-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #60a5fa); border-radius: 6px; transition: width .25s ease; }
.um-bar-fill.indeterminate { width: 40% !important; animation: umindet 1.1s ease-in-out infinite; }
@keyframes umindet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.um-progress-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; color: var(--text-2); }
#um-pct { font-weight: 700; color: var(--primary); }

.um-summary { margin-top: 16px; }

/* 列表行隔行变色 */
table tbody tr:nth-child(even) { background: #f8fafc; }
table tbody tr:hover { background: #eef2ff; }

/* 自定义报表头部 */
.r-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.r-head h3 { margin: 0; }

/* ============ 可搜索下拉选择（相关团队 / 负责人） ============ */
.sm { position: relative; }
.sm-box { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); cursor: text; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.sm-box:hover { border-color: #c7d2fe; }
.sm-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.sm-multi .sm-box { flex-wrap: wrap; }
.sm-tags { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.sm-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-light); color: var(--primary-dark); border-radius: 4px; padding: 2px 6px; font-size: 12px; }
.sm-tag .sm-x { cursor: pointer; color: var(--primary-dark); font-weight: 700; line-height: 1; }
.sm-tag .sm-x:hover { color: #b91c1c; }
.sm-ph { color: var(--text-3); }
.sm-single { color: var(--text); }
.sm-caret { color: var(--text-3); font-size: 10px; flex-shrink: 0; }
.sm-panel { position: absolute; z-index: 200; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.12); max-height: 264px; display: flex; flex-direction: column; }
.sm-panel .sm-search { margin: 6px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.sm-list { list-style: none; margin: 0; padding: 0 4px 6px; overflow: auto; max-height: 210px; }
.sm-li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: background .12s; }
.sm-li:hover { background: var(--bg-2); }
.sm-li.on { background: var(--primary-light); }
.sm-li .sm-sub { color: var(--text-3); font-size: 11px; margin-left: 6px; }
.sm-cbx { width: 18px; height: 18px; flex-shrink: 0; border: 1.5px solid var(--border); border-radius: 4px; background: #fff; position: relative; transition: background .12s, border-color .12s; }
.sm-li:hover .sm-cbx { border-color: var(--primary); }
.sm-li.on .sm-cbx { background: var(--primary); border-color: var(--primary); }
.sm-li.on .sm-cbx::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sm-label { flex: 1; min-width: 0; }
.sm-li.on .sm-label { color: var(--primary-dark); font-weight: 600; }
.sm-single-mode .sm-cbx { border-radius: 50%; }
.sm-single-mode .sm-li.on .sm-cbx::after { width: 6px; height: 6px; border: none; border-radius: 50%; background: #fff; left: 4px; top: 4px; transform: none; }
.sm-panel .sm-search:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.sm-disabled .sm-tags { padding: 2px 0; }
.kv-name { color: var(--text); }

/* ============ 修改记录模块 ============ */
.chg-toggle { cursor: pointer; user-select: none; }
.chg-toggle:hover { color: var(--primary-dark, #1d4ed8); }
.chg-log { max-height: 360px; overflow: auto; }
.chg-group { margin-bottom: 10px; }
.chg-day { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 4px 0; border-bottom: 1px dashed var(--border); margin-bottom: 6px; }
.chg-row { font-size: 12.5px; line-height: 1.7; padding: 2px 0; color: var(--text); }
.chg-field { font-weight: 600; color: var(--primary-dark); }
.chg-arrow { color: var(--text-3); margin: 0 2px; }
.chg-empty { color: var(--text-3); font-style: normal; }
.chg-meta { color: var(--text-3); font-size: 11px; margin-left: 6px; }

/* ===== 重新提交 - 发票选择卡片 ===== */
.resel-inv-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.resel-inv-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.resel-inv-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  background: #fafbfc;
}
.resel-inv-card.resel-fail {
  border-left: 3px solid #e74c3c;
  background: rgba(231,76,60,.03);
}
.resel-inv-card.resel-warn {
  border-left: 3px solid #f39c12;
  background: rgba(243,156,18,.03);
}
.resel-inv-check {
  padding-top: 2px;
  flex-shrink: 0;
}
.resel-inv-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--primary, #2563eb);
}
.resel-inv-body {
  flex: 1;
  min-width: 0;
}
.resel-inv-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.resel-inv-no {
  font-weight: 600;
  font-size: 14px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  color: #1e293b;
  letter-spacing: .3px;
}
.resel-inv-type {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.resel-inv-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: #475569;
}
.resel-label {
  color: #94a3b8;
  font-size: 12px;
  min-width: 52px;
  flex-shrink: 0;
}
.resel-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.resel-inv-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
  padding-top: 2px;
}
.resel-summary {
  text-align: center;
  padding: 10px 0 4px;
  font-size: 13px;
  color: #475569;
  border-top: 1px dashed #e2e8f0;
  margin-top: 4px;
}
/* 发票夹「关联客户」芯片与查找弹窗 */
.cust-chip {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  padding: 2px 8px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 600;
}
.cust-chip.muted {
  background: #f1f5f9;
  color: #94a3b8;
}
/* 列表页「关联客户」列：固定宽度，控件（芯片/按钮）不因客户名长短而抖动 */
.col-cust-cell { width: 200px; white-space: nowrap; }
.col-cust-cell .cust-chip { max-width: 86px; }

/* 重构后的关联客户操作按钮（列表列 + 弹窗底部共用）：清晰对比、与芯片留间距、无放大/光晕重叠 */
.cust-act {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 7px;
  font-size: 13px; font-weight: 600; line-height: 1;
  border: 1px solid var(--border); background: #fff; color: var(--primary);
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.cust-act:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
/* 关键：覆盖全局 button:hover 的 scale(1.1)+橙色光晕，避免小按钮放大压住相邻芯片/文字 */
.cust-act:hover { transform: none; box-shadow: none; }
.cust-act.danger { color: var(--danger); border-color: rgba(220,38,38,.32); }
.cust-act.danger:hover { background: rgba(220,38,38,.06); border-color: var(--danger); color: var(--danger); }
.col-cust-cell .cust-act { margin-left: 6px; }

/* 查找关联客户：固定尺寸弹窗（标题/搜索固定，列表区内部滚动，整体不随结果数量跳动） */
.modal.cust-pick-modal {
  width: 480px;
  max-width: 94vw;
  height: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 24px 26px;
  overflow: hidden;
}
.modal.cust-pick-modal .drill-head { flex: none; margin-bottom: 16px; }
.modal.cust-pick-modal .drill-sub { margin-top: 6px; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.modal.cust-pick-modal .drill-toolbar { flex: none; display: flex; align-items: center; gap: 12px; margin-bottom: 0; }
.modal.cust-pick-modal .search-wrap { position: relative; flex: 1 1 auto; display: flex; align-items: center; }
.modal.cust-pick-modal .search-ic { position: absolute; left: 12px; color: var(--text-3); font-size: 13px; pointer-events: none; }
.modal.cust-pick-modal .search-wrap .inp { width: 100%; padding-left: 32px; }
.modal.cust-pick-modal .pick-count { flex: none; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.modal.cust-pick-modal .actions { flex: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.modal.cust-pick-modal .cust-pick-list { flex: 1 1 auto; min-height: 0; margin-top: 14px; }

.cust-pick-list { overflow-y: auto; padding-right: 6px; }
.cust-pick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  margin-bottom: 10px;
}
.cust-pick-card:last-child { margin-bottom: 0; }
.cust-pick-card:hover {
  border-color: var(--primary);
  background: var(--primary-light, #eff6ff);
  box-shadow: 0 2px 12px rgba(37,99,235,.12);
}
.cust-ava {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary, #2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex: none;
}
.cust-info { flex: 1 1 auto; min-width: 0; }
.cust-name { font-weight: 600; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.cust-check { color: var(--text-3); font-size: 20px; flex: none; transition: transform .15s, color .15s; }
.cust-pick-card:hover .cust-check { color: var(--primary); transform: translateX(2px); }

/* 工资条：已上传批次折叠区 */
.salary-batches > summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 4px 0; user-select: none; }
.salary-batches > summary::before { content: '▸ '; }
.salary-batches[open] > summary::before { content: '▾ '; }

/* ===== 工资条模块 ===== */
.salary-filter { margin-bottom: 12px; font-size: 14px; color: var(--text-2); }
.salary-filter .net-sum { color: var(--primary); font-size: 16px; }
.salary-table table { font-size: 13px; }
.salary-table td, .salary-table th { white-space: nowrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: 14px; }
.tab { background: none; border: none; padding: 8px 16px; cursor: pointer; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.report-toolbar { margin-bottom: 10px; display: flex; gap: 6px; }
.report-total { margin: 12px 0; font-size: 14px; color: var(--text-2); }
.report-total b { color: var(--primary); font-size: 16px; }
.upload-box { background: var(--bg-2, #f8fafc); border: 1px dashed var(--border, #d1d5db); border-radius: 10px; padding: 16px; }
