/* 卓成ERP 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #f59e0b;
  --bg: #f3f4f6;
  --card: #fff;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --sidebar-w: 220px;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#2563eb,#7c3aed); }
.login-card { background: #fff; padding: 40px; border-radius: 12px; width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.login-card h1 { text-align: center; margin-bottom: 24px; color: var(--primary); }
.login-card .field { margin-bottom: 16px; }
.login-card input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.login-card button { width: 100%; padding: 12px; background: var(--primary); color: #fff; border: 0; border-radius: 8px; font-size: 15px; }
.login-card button:hover { background: var(--primary-dark); }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: #111827; color: #fff; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 100; }
.sidebar .logo { padding: 18px 20px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .logo span { color: var(--primary); }
.sidebar .nav-group { padding: 8px 0; }
.sidebar .nav-group-title { padding: 10px 20px 6px; font-size: 12px; color: #9ca3af; }
.sidebar .nav-item { display: block; padding: 10px 20px; color: #d1d5db; font-size: 14px; }
.sidebar .nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar .nav-item.active { background: var(--primary); color: #fff; }
.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); padding: 20px; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-radius: 8px; }
.topbar-clock-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 18px; background: #fff; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; }
.topbar-clock-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.topbar-clock-btn.is-partial { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.topbar-clock-btn.is-done { background: #d1fae5; border-color: #10b981; color: #065f46; }
.topbar-clock-btn .topbar-clock-ic { font-size: 16px; }
.topbar-slogan {
  flex: 1; min-width: 0; max-width: 50%;
  margin-left: 16px;
  color: var(--muted); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: default;
  user-select: none;
}
.topbar-slogan:empty { display: none; }
.topbar-slogan:hover { color: var(--text); }
.topbar .user { display: flex; align-items: center; gap: 10px; }
.topbar .user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.topbar .user .name { font-weight: 600; }
.topbar .user .role-tag { font-size: 12px; background: var(--primary); color: #fff; padding: 2px 8px; border-radius: 10px; }
.topbar .logout { background: none; border: 1px solid var(--border); padding: 6px 14px; border-radius: 6px; color: var(--muted); }

/* 顶部用户下拉菜单 */
.topbar .user .user-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  min-width: 180px; padding: 6px 0; z-index: 1000;
  flex-direction: column;
}
.topbar .user .user-menu.show { display: flex !important; }
.topbar .user .user-menu .um-item {
  padding: 10px 16px; cursor: pointer; color: var(--text);
  display: block; text-decoration: none; font-size: 14px;
  transition: background .15s;
}
.topbar .user .user-menu .um-item:hover { background: var(--bg-soft, #f3f4f6); }
.topbar .user .user-menu .um-danger { color: var(--danger, #dc2626); }
.topbar .user .user-menu .um-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* 手机端：菜单更紧凑 */
@media (max-width: 768px) {
  .topbar .user .user-menu { min-width: 160px; right: -8px; }
}

/* =====================================================
 * 我的首页（/my-home）样式
 * ===================================================== */
/* 顶部 banner */
.myhome-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #fff; padding: 18px 22px; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(59,130,246,.15);
  margin-bottom: 16px;
}
.myhome-banner .myhome-hi { font-size: 20px; font-weight: 500; }
.myhome-banner .myhome-hi b { font-weight: 700; }
.myhome-banner .myhome-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; font-size: 13px;
}
.myhome-banner .myhome-meta .tag { background: rgba(255,255,255,.22); color: #fff; }
.myhome-banner .myhome-meta-item { color: rgba(255,255,255,.85); }

/* 顶部紧凑打卡按钮（banner 右角） */
.myhome-clock-mini {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.4);
  padding: 10px 16px; border-radius: 8px; cursor: pointer;
  font-size: 15px; font-weight: 500;
  transition: background .15s, transform .15s;
}
.myhome-clock-mini:hover { background: rgba(255,255,255,.3); transform: translateY(-1px); }
.myhome-clock-mini.myhome-clock-done { background: rgba(34,197,94,.9); border-color: transparent; }
.myhome-clock-mini.myhome-clock-partial { background: rgba(245,158,11,.9); border-color: transparent; }

/* 3 个大数字统计（横向居中，加大） */
.myhome-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 16px;
}
.myhome-stat {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 22px 14px; text-align: center; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.myhome-stat:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.myhome-stat-num { font-size: 36px; font-weight: 700; color: var(--primary, #4f46e5); line-height: 1.1; }
.myhome-stat.myhome-stat-warn .myhome-stat-num { color: var(--danger, #dc2626); }
.myhome-stat.myhome-stat-warn2 .myhome-stat-num { color: var(--warning, #d97706); }
.myhome-stat-lbl { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* 4 个快捷按钮（横排，加大 + 美化） */
.myhome-quickbar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 18px;
}
.myhome-quick-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 10px; cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.myhome-quick-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); border-color: var(--primary, #4f46e5); }
.myhome-quick-ic { font-size: 32px; line-height: 1; margin-bottom: 8px; }
.myhome-quick-lbl { font-size: 14px; color: var(--text); font-weight: 500; }

/* 提醒/未达标项可点击行 */
.kpi-detail-row.kpi-row-link { cursor: pointer; color: var(--text); transition: background .15s; }
.kpi-detail-row.kpi-row-link:hover { background: #dbeafe !important; }

/* 看板 */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.board-card { background: var(--card); border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.board-card .num { font-size: 32px; font-weight: 700; color: var(--primary); }
.board-card .label { color: var(--muted); font-size: 14px; margin-top: 4px; }
.board-card.clickable { cursor: pointer; }
.board-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.board-card .badge { position: absolute; }

/* 卡片/表格 */
.card { background: var(--card); border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 20px; overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-header h3 { font-size: 16px; }
.card-body { padding: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: #f9fafb; padding: 12px; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover { background: #f9fafb; }
.table .actions button { margin-right: 6px; }

/* 按钮 */
.btn { padding: 8px 16px; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 14px; }
.btn:hover { background: #f3f4f6; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-ghost { background: none; border: 1px solid var(--border); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.field textarea { min-height: 80px; resize: vertical; }

/* 标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.tag-green { background: #dcfce7; color: var(--success); }
.tag-red { background: #fee2e2; color: var(--danger); }
.tag-yellow { background: #fef3c7; color: var(--warning); }
.tag-blue { background: #dbeafe; color: var(--primary); }
.tag-gray { background: #f3f4f6; color: var(--muted); }

/* 合同视图 */
.contract-list { display: flex; flex-direction: column; gap: 12px; }
.contract-card { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.contract-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.contract-head .contract-name { font-weight: 700; font-size: 15px; color: var(--text); }
.contract-head .contract-days { margin-left: auto; font-size: 13px; font-weight: 600; }
.contract-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.contract-meta span b { color: var(--text); font-weight: 600; }
.contract-card .sub-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 1295px; table-layout: fixed; }
.contract-card .sub-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
.contract-card .sub-table-wrap.collapsed { display: none; }
.contract-card .contract-head { cursor: pointer; }
.contract-card .contract-head .collapse-arrow { margin-left: auto; font-size: 12px; color: var(--muted); }
.contract-card .sub-table thead th { background: #f9fafb; color: var(--muted); font-weight: 500; padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.contract-card .sub-table tbody td { padding: 8px 6px; border-bottom: 1px dashed var(--border); white-space: nowrap; background: #fff; }
.contract-card .sub-table tbody tr:last-child td { border-bottom: 0; }
.contract-card .sub-table .cell-remark { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 冻结列：前 6 列固定，其余列横向滑动 */
.contract-card .sub-table thead th.fz1, .contract-card .sub-table thead th.fz2, .contract-card .sub-table thead th.fz3,
.contract-card .sub-table thead th.fz4, .contract-card .sub-table thead th.fz5, .contract-card .sub-table thead th.fz6,
.contract-card .sub-table tbody td.fz1, .contract-card .sub-table tbody td.fz2, .contract-card .sub-table tbody td.fz3,
.contract-card .sub-table tbody td.fz4, .contract-card .sub-table tbody td.fz5, .contract-card .sub-table tbody td.fz6 {
  position: sticky; z-index: 3; background: #fff; box-shadow: 1px 0 0 rgba(0,0,0,.06);
}
.contract-card .sub-table thead th[class^="fz"] { background: #f9fafb; z-index: 4; }
.contract-card .sub-table tbody tr:hover td[class^="fz"] { background: #f8fafc; }
.contract-card .sub-table .fz1 { left: 0; min-width: 85px; max-width: 85px; width: 85px; }
.contract-card .sub-table .fz2 { left: 85px; min-width: 96px; max-width: 96px; width: 96px; }
.contract-card .sub-table .fz3 { left: 181px; min-width: 55px; max-width: 55px; width: 55px; }
.contract-card .sub-table .fz4 { left: 236px; min-width: 96px; max-width: 96px; width: 96px; }
.contract-card .sub-table .fz5 { left: 332px; min-width: 55px; max-width: 55px; width: 55px; }
.contract-card .sub-table .fz6 { left: 387px; min-width: 110px; max-width: 110px; width: 110px; }
.contract-card .sub-table thead th[class^="fz"]:after, .contract-card .sub-table tbody td[class^="fz"]:after {
  content: ''; position: absolute; right: -1px; top: 0; bottom: 0; width: 1px; background: var(--border); pointer-events: none;
}

/* 满额绩效可编辑 */
.editable-kpi { cursor: pointer; color: #2563eb; font-weight: 500; min-width: 110px; }
.editable-kpi:hover { background: #eff6ff !important; text-decoration: underline; }
.contract-card [data-edit-status], .contract-card [data-edit-owner] { cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.contract-card [data-edit-status]:hover, .contract-card [data-edit-owner]:hover { background: #f3f4f6; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #f3f4f6; color: var(--text); border: 1px solid var(--border); cursor: pointer; transition: all .15s; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-info { background: #dbeafe; color: #2563eb; border-color: #93c5fd; }
.chip-danger { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.chip-warn { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.chip-mute { background: #f3f4f6; color: #6b7280; border-color: var(--border); }
.text-danger { color: var(--danger) !important; }
.text-warn { color: #b45309 !important; }
.status-pick { padding: 8px; }
.status-grid, .owner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.status-opt, .owner-opt { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; text-align: center; }
.status-opt:hover, .owner-opt:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.owner-opt small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.owner-opt:hover small { color: rgba(255,255,255,0.8); }
.status-opt.is-picked, .owner-opt.is-picked { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.owner-opt-clear { border-style: dashed !important; border-color: #dc2626 !important; color: #dc2626 !important; background: #fef2f2 !important; margin-bottom: 8px; }
.owner-opt-clear:hover, .owner-opt-clear.is-picked { background: #dc2626 !important; color: #fff !important; border-style: solid !important; border-color: #dc2626 !important; }
/* 单元格自由编辑：鼠标悬停高亮 */
.editable-cell { cursor: pointer; transition: background-color 0.15s; }
.editable-cell:hover { background-color: rgba(74, 144, 217, 0.08); }

/* 到期提醒面板 */
.expiry-panel { margin-bottom: 20px; }
.expiry-panel .panel-head { display: flex; align-items: center; gap: 12px; }
.expiry-panel .toggle { cursor: pointer; }
.expiry-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.expiry-item .left { display: flex; align-items: center; gap: 12px; }
.expiry-item .days { font-weight: 700; }
.days-urgent { color: var(--danger); }
.days-soon { color: var(--warning); }
.days-ok { color: var(--success); }

/* 弹窗 */
.modal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: 10px; width: 720px; max-width: 95vw; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 16px; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Toast */
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 8px; color: #fff; opacity: 0; transform: translateY(-10px); transition: all .3s; z-index: 9999; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }

/* 统计小卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-item { background: var(--card); padding: 16px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-item .s-num { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-item .s-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* 权限看板 11列 */
.kpi-board { overflow-x: auto; }
.kpi-board .table { min-width: 1600px; }
.editable { cursor: pointer; color: var(--primary); }
.editable:hover { text-decoration: underline; }

/* 三级视图 */
.crumb { color: var(--muted); margin-bottom: 16px; font-size: 14px; }
.crumb a { color: var(--primary); }

/* 工具条 */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }

/* 满意度星星 */
.star { font-size: 24px; color: #d1d5db; cursor: pointer; }
.star.active { color: #f5b301; }

/* ================= V2 新增样式 ================= */
/* Tab 切换 */
.tabs { display: flex; gap: 4px; }
.tab-btn { padding: 8px 16px; border: 1px solid var(--border); background: #fff; border-radius: 6px; font-size: 14px; color: var(--muted); }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.hint { color: var(--muted); font-size: 12px; }

/* ============ Todo ============ */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; transition: all .2s; }
.todo-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
/* 事件输入框（电脑端"输入要设定的事件" / 手机端那个输入框）：深红底 + 极浅阴影（2026-09-12 用户要求） */
#todo-input, #todo-search-mobile {
  background: #fff6f6;
  border: 2px solid #ecb8b8;
  color: #9e2b2b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  outline: none;
}
#todo-input::placeholder, #todo-search-mobile::placeholder { color: #c8a2a2; }
#todo-input:focus, #todo-search-mobile:focus {
  outline: none;
  border-width: 1px;
  border-color: #f0cccc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.todo-check { width: 30px; height: 30px; border: 2px solid #f0a3a3; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #d9534f; background: #fdeaea; cursor: pointer; flex-shrink: 0; user-select: none; }
.todo-check:hover { background: #fbdede; border-color: #e88f8f; }
.todo-check.checked { background: var(--success); border-color: var(--success); color: #fff; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 15px; cursor: pointer; word-break: break-all; }
.todo-done .todo-title { text-decoration: line-through; color: var(--muted); }
.todo-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.todo-cat { padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.todo-chip { font-size: 12px; color: var(--muted); background: #f3f4f6; padding: 2px 8px; border-radius: 10px; }
.todo-chip.gray { background: transparent; border: 1px dashed var(--border); }
.todo-actions { display: flex; gap: 6px; flex-shrink: 0; }
.cat-add { display: flex; gap: 10px; margin-bottom: 16px; }
.cat-add input[type="text"] { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 6px; }
.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.cat-dot { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.cat-name-input { flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.cat-color-input { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; }
.date-row { display: flex; gap: 8px; }
.date-quick { display: flex; gap: 8px; margin-top: 8px; }

/* 番茄专注悬浮窗（置顶、可拖动） */
.pomo-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 250px;
  z-index: 999999;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  font-family: inherit;
}
.pomo-widget.dragging { box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28); user-select: none; }
.pomo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(135deg, #ff6b6b, #ff4757);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: move;
  user-select: none;
}
.pomo-head-actions { display: flex; align-items: center; gap: 8px; }
.pomo-close,
.pomo-popout {
  background: none;
  border: none;
  color: #fff;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: .85;
  font-size: 14px;
}
.pomo-close { font-size: 17px; }
.pomo-close:hover, .pomo-popout:hover { opacity: 1; }
.pomo-timer {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  color: #ff4757;
  padding: 10px 0 2px;
  font-variant-numeric: tabular-nums;
}
.pomo-task {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #ff4757;
  padding: 2px 14px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pomo-btns { display: flex; gap: 8px; padding: 0 12px 12px; }
.pomo-btns button {
  flex: 1;
  padding: 6px 0;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  color: #374151;
}
.pomo-btns button:hover { border-color: #ff4757; color: #ff4757; }
.pomo-btns .pomo-stop:hover { border-color: #dc2626; color: #dc2626; }
.pomo-progress { height: 5px; background: #f3f4f6; }
.pomo-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff6b6b, #ff4757);
  transition: width 1s linear;
}
.pomo-widget.done .pomo-timer { color: #2ed573; }
.pomo-widget.done .pomo-bar { background: linear-gradient(90deg, #2ed573, #22c55e); }

/* 日期选择器 */
.dp-mask { align-items: flex-start; padding-top: 12vh; }
.dp-modal { width: 340px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dp-ym { font-weight: 700; font-size: 15px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 12px; }
.dp-cell, .dp-blank { height: 34px; display: flex; align-items: center; justify-content: center; font-size: 13px; border-radius: 6px; cursor: pointer; }
.dp-cell:hover { background: #eff6ff; }
.dp-now { background: var(--primary); color: #fff; font-weight: 700; }
.dp-quick { display: flex; gap: 8px; padding: 0 16px 12px; flex-wrap: wrap; }
/* 日期面板：有事件的日期显示红点（v20260908 todo 时间筛选） */
.dp-cell { position: relative; }
.dp-cell.dp-mark::after {
  content: ''; position: absolute; top: 2px; right: 4px; width: 5px; height: 5px; border-radius: 50%;
  background: #ef4444;
}
.dp-cell.dp-now.dp-mark::after { background: #fff; }
/* 星期表头（周一最左，周六周日最右）+ 节假日/调休标注（v20260912） */
.dp-wk { height: 24px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.dp-wk.dp-wk-end { color: #dc2626; }
.dp-cell.dp-weekend { color: #dc2626; }
.dp-cell.dp-makeup { background: #eef2ff; color: #4f46e5; font-weight: 700; }
.dp-cell.dp-makeup:hover { background: #e0e7ff; }
.dp-cell.dp-holiday { background: #fdeaea; color: #d9534f; font-weight: 700; }
.dp-cell.dp-holiday:hover { background: #fbd5d5; }
.dp-cell.dp-tag { flex-direction: column; gap: 0; line-height: 1.08; }
.dp-cell em { font-style: normal; font-size: 8.5px; font-weight: 700; line-height: 1; }
.dp-cell.dp-now { background: var(--primary); color: #fff; }
.dp-cell.dp-now em { color: #fff; }
.dp-legend { display: flex; gap: 12px; padding: 0 16px 10px; font-size: 11px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.dp-legend span { display: inline-flex; align-items: center; gap: 4px; }
.dp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dp-legend .lg-holiday { background: #fdeaea; border: 1px solid #f0a3a3; }
.dp-legend .lg-makeup { background: #eef2ff; border: 1px solid #a5b4fc; }
.dp-legend .lg-dot { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; margin: 0 2px; }
.dp-legend-hint { width: 100%; color: #9ca3af; font-size: 10.5px; }

/* Todo 时间筛选条（v20260908：今日/近3天/近一周/近一个月/日期） */
.todo-timebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 8px; }
.todo-timebar .chip { font-size: 12.5px; padding: 3px 12px; }
.todo-timebar .pick-chip { background: #ede9fe; border-color: #a78bfa; color: #5b21b6; }

/* 图片上传 */
.img-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.img-item { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.img-item img { width: 100%; height: 100%; object-fit: cover; }
.img-item .img-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; }
.paste-tip { font-size: 12px; color: var(--muted); margin-left: 8px; }

/* ============ 客户管理 ============ */
.table-wrap { overflow-x: auto; }
.editable-table td { min-width: 90px; }
.cell-edit { cursor: cell; }
.cell-edit:hover { background: #eff6ff; }
.cell-input { width: 100%; padding: 6px 8px; border: 1px solid var(--primary); border-radius: 4px; font-size: 13px; }
.sub-row td { background: #f9fafb; }
.cust-name { font-weight: 700; cursor: pointer; color: var(--primary); }
.cust-sub { font-size: 12px; color: var(--muted); }

/* 客户表格冻结前四列（勾选 + Excel 冻结窗格效果） */
.editable-table .frozen {
  position: sticky;
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 var(--border);
}
.editable-table thead .frozen { z-index: 3; }
.editable-table .frozen-0 { left: 0; width: 40px; min-width: 40px; }
.editable-table .frozen-1 { left: 40px; width: 130px; min-width: 130px; }
.editable-table .frozen-2 { left: 170px; width: 130px; min-width: 130px; }
.editable-table .frozen-3 { left: 300px; width: 180px; min-width: 180px; }
.editable-table .chk-col { text-align: center; vertical-align: middle; }
.editable-table .chk-col input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; vertical-align: middle; }
.editable-table .sub-row td.frozen { background: #f9fafb; }
.editable-table tr:hover td.frozen { background: #f9fafb; }
.intent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.intent-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #fff; }
.intent-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.intent-name .chk-label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.intent-name .chk-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--danger, #e74c3c); cursor: pointer; }
.intent-info { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.intent-addr { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.intent-actions { display: flex; gap: 6px; }
.cust-detail-info { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }

/* ============ 绩效管理 ============ */
.tag-green { background: #dcfce7; color: var(--success); }
.kpi-detail-head { padding: 14px; background: #eff6ff; border-radius: 8px; margin-bottom: 12px; }
.kpi-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.cfg-add { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.cfg-add select { padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.cfg-list { display: flex; flex-direction: column; gap: 8px; }
.cfg-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; flex-wrap: wrap; font-size: 13px; }
.cfg-row label { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.cfg-row input { width: 70px; padding: 5px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; }
.cfg-emp { font-weight: 700; min-width: 70px; }
.cfg-svc { min-width: 90px; }
.cfg-tip { margin-top: 16px; padding: 12px; background: #f9fafb; border-radius: 8px; font-size: 12px; color: var(--muted); line-height: 1.8; }

/* 柱状图 */
.chart-wrap { display: flex; align-items: flex-end; gap: 14px; min-height: 180px; padding: 20px 10px 0; overflow-x: auto; }
.chart-col { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 40px; }
.chart-val { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.chart-bar { width: 30px; border-radius: 4px 4px 0 0; transition: height .3s; min-height: 2px; }
.chart-label { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ============ 员工/薪资 ============ */
.salary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.salary-item { text-align: center; padding: 16px; border: 1px solid var(--border); border-radius: 10px; }
.salary-item.highlight { border-color: var(--primary); background: #eff6ff; }
.salary-confirmed { color: var(--success); font-weight: 600; font-size: 14px; }
.salary-confirm-box { text-align: center; padding: 20px; background: #fefce8; border: 1px solid #fde047; border-radius: 10px; }

/* 打卡 */
.clock-big { display: flex; gap: 20px; justify-content: center; margin: 10px 0 16px; }
.clock-box { text-align: center; padding: 24px 32px; border: 1px solid var(--border); border-radius: 12px; min-width: 180px; background: #f9fafb; }
.clock-label { color: var(--muted); font-size: 13px; }
.clock-time { font-size: 40px; font-weight: 700; color: var(--text); margin: 8px 0; }
.clock-status { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* 项目卡片 */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
/* === 我的项目：两级折叠 + 组内多列并行 === */
.mp-section { display: block; width: 100%; min-width: 0; grid-column: 1 / -1; }
.mp-section > .mp-group { margin-bottom: 22px; }
.mp-section > .mp-group:last-child { margin-bottom: 0; }
/* 服务类别外框加强：2px 深蓝边 + 明显阴影 + 渐变标题 */
.mp-group { background: #fff; border-radius: 14px; border: 2px solid #2563eb; overflow: hidden; box-shadow: 0 4px 12px rgba(37, 99, 235, .15), 0 2px 4px rgba(15, 23, 42, .08); }
.mp-group-title { font-size: 17px; font-weight: 700; color: #1e3a8a; margin: 0; padding: 14px 18px; background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 60%, #f8fafc 100%); border-bottom: 2px solid #93c5fd; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 10px; transition: background .15s; }
.mp-group-title:hover { background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 100%); }
.mp-group-title .mp-group-title-text { flex: 1; }
.mp-group-arrow { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(59, 130, 246, .1); color: var(--primary); font-size: 12px; transition: transform .2s; }
.mp-group-collapsed .mp-group-arrow { transform: rotate(-90deg); }
/* 组内多列并行：响应屏幕宽度自适应列数 */
.mp-group-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 14px; background: #f8fafc; align-items: start; }

/* 单个项目卡片：公司名始终可见（默认即显示），点击展开详情 */
.mp-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.mp-item:hover { box-shadow: 0 2px 8px rgba(15, 23, 42, .06); border-color: #cbd5e1; }
/* 头部：公司名 + 状态徽章 + 到期日 + 箭头 —— 始终可见 */
.mp-item-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none; background: #fff; }
.mp-item-head-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.mp-item-name { font-weight: 600; font-size: 14px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-item-head-right { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.mp-item-exp { white-space: nowrap; }
.mp-item-arrow { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #f1f5f9; color: var(--muted); font-size: 11px; transition: transform .2s, background .15s, color .15s; flex-shrink: 0; }
.mp-item:not(.collapsed) .mp-item-arrow { transform: rotate(90deg); background: #dbeafe; color: var(--primary); }
.mp-item:not(.collapsed) { border-color: var(--primary); box-shadow: 0 2px 8px rgba(59, 130, 246, .1); }
.mp-item.collapsed .mp-item-body { display: none; }

/* 展开后的详情面板 —— 在卡片内部向下展开，不影响其他卡片布局（align-items: start） */
.mp-item-body { padding: 12px 14px 14px; background: #fafbfc; border-top: 1px solid #e2e8f0; }
.mp-item-body .pc-info { padding: 0 0 8px; }
.mp-item-body .pc-info > div { padding: 4px 0; font-size: 13px; }
.mp-item-body .pc-actions { padding-top: 12px; border-top: 1px solid #e2e8f0; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.project-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #fff; transition: all .2s; }
.project-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.pc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 15px; }
.pc-info { font-size: 13px; color: var(--text); display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pc-info span { color: var(--muted); }
.pc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #fff; transition: all .2s; }
.project-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.pc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 15px; }
.pc-info { font-size: 13px; color: var(--text); display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pc-info span { color: var(--muted); }
.pc-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ====== 个人中心 4 卡片网格 ====== */
.center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 0;
}
.center-card {
  display: block;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 20px;
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.center-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}
.cc-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}
.cc-title {
  font-size: 16px; font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}
.cc-desc {
  font-size: 13px; color: #6b7280;
  line-height: 1.5;
  min-height: 38px;
}
.cc-arrow {
  font-size: 12px; color: #3b82f6;
  margin-top: 10px;
  text-align: right;
}
.page-header { padding: 0 0 8px 0; }
.page-header h2 { font-size: 20px; font-weight: 600; color: #1f2937; margin: 0; }
.page-header .sub { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* ====== 子页面返回按钮 ====== */
.view-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  margin-bottom: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #4b5563 !important;
  font-size: 13px;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.view-back:hover {
  background: #e5e7eb;
  color: #1f2937 !important;
  transform: translateX(-2px);
}
.view-back::before {
  font-size: 14px;
}

/* ===== 焦点项目脉冲高亮（从首页跳转过来时） ===== */
@keyframes focus-pulse {
  0%   { background-color: #fef3c7; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); border-color: #f59e0b; }
  50%  { background-color: #fde68a; box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); border-color: #f59e0b; }
  100% { background-color: #fef3c7; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); border-color: #f59e0b; }
}
.mp-item-focus {
  animation: focus-pulse 0.8s ease-in-out 0s 3;
  border-color: #f59e0b !important;
  border-width: 2px !important;
}

/* 维护记录 */
.record-scroll { max-height: 400px; overflow-y: auto; }
.record-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.record-date { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.record-content { font-size: 14px; margin-bottom: 6px; word-break: break-all; }

/* 公告 */
.announce-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; background: #fff url('/static/watermark_tile.png') repeat; -webkit-user-select: none; user-select: none; }
.announce-card.unread { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ann-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ann-content { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 10px; white-space: normal; word-break: break-word; }
.ann-actions { display: flex; gap: 8px; }
.ann-ed-bar { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.ann-ed-bar .btn-xs { padding: 2px 9px; min-width: 30px; font-size: 13px; }
.ann-content p { margin: 4px 0; }
.ann-content div { margin: 2px 0; }
.ann-content b, .ann-content strong { font-weight: 700; }
/* ===== 公告: 新闻标题列表样式(2026-09-05) ===== */
.ann-list { display: flex; flex-direction: column; gap: 8px; }
.ann-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s; }
.ann-row:hover { border-color: var(--primary); background: #f8fafc; }
.ann-row.unread { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: #fffbeb; }
.ann-row .ann-row-title { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-row .ann-row-title .dot { display:inline-block; width:8px; height:8px; border-radius:50%;
  background:#dc2626; margin-right:6px; vertical-align:1px; }
.ann-row .ann-row-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.ann-row .ann-row-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ann-row .ann-row-actions { display: flex; gap: 6px; flex: none; }
.ann-detail-title { font-size: 16px; font-weight: 700; margin: 2px 0 10px; }
.ann-detail-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.ann-detail-body { border-top: 1px dashed var(--border); padding-top: 12px; }


/* Todo 到期右下角提醒弹窗 */
.todo-reminder {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  border-left: 4px solid #f59e0b;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  transform: translateX(110%);
  transition: transform 0.3s ease;
}
.todo-reminder.show { transform: translateX(0); }
.todo-reminder .tr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.todo-reminder .tr-title { font-weight: 600; color: #b45309; font-size: 13px; }
.todo-reminder .tr-close { border: 0; background: none; font-size: 18px; color: #999; cursor: pointer; line-height: 1; padding: 0 2px; }
.todo-reminder .tr-close:hover { color: #333; }
.todo-reminder .tr-text { color: #1f2937; margin-bottom: 4px; word-break: break-all; }
.todo-reminder .tr-meta { font-size: 12px; color: #6b7280; }

/* ===== 手机端：底部 TabBar ===== */
.bottom-tabbar {
  display: none;
}
@media (max-width: 768px) {
  /* 隐藏左侧栏 */
  .sidebar { display: none !important; }
  /* 主内容占满 + 留出底部 60px 给 TabBar */
  .main { margin-left: 0 !important; padding: 12px !important; padding-bottom: 76px !important; }
  .topbar { padding: 10px 14px !important; margin-bottom: 12px !important; }
  .topbar .user .name, .topbar .user .role-tag { display: none !important; }
  .topbar .user .avatar { width: 30px !important; height: 30px !important; }
  .topbar .user .logout { padding: 4px 10px !important; font-size: 12px !important; }
  /* 显示底部 TabBar */
  .bottom-tabbar {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #ffffff;
    border-top: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-tabbar .bt-items {
    display: flex;
    height: 56px;
  }
  .bottom-tabbar .bt-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    padding: 4px 2px;
    min-width: 0;
    transition: color .15s;
  }
  .bottom-tabbar .bt-item .ic { font-size: 18px; line-height: 1; }
  .bottom-tabbar .bt-item .lbl {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .bottom-tabbar .bt-item.active { color: var(--primary); }
  .bottom-tabbar .bt-item:active { background: rgba(0,0,0,.04); }

  /* 原有响应式 */
  .form-grid { grid-template-columns: 1fr; }
  .clock-big { flex-direction: column; align-items: center; }
  .project-grid { grid-template-columns: 1fr; }
  .tabs { flex-wrap: wrap; }

  /* 隐藏横滑容器的滚动条但保留滚动能力 */
  #svc-chips::-webkit-scrollbar,
  #contract-chips::-webkit-scrollbar { display: none; }
}

/* 客户管理子表：合同金额、满额绩效两列 padding 缩小 30%（左右 6px → 4px），更紧凑 */
.contract-card .sub-table thead th.fz6,
.contract-card .sub-table tbody td.fz6,
.contract-card .sub-table thead th.col-kpi,
.contract-card .sub-table tbody td.col-kpi {
  padding-left: 4px;
  padding-right: 4px;
}

/* ==========================================================
 *  桌面端美化补丁（v3）：KPI 留白调整 + 数字表格数字对齐
 * ========================================================== */
/* 表格行高紧凑 */
.table th, .table td { padding: 7px 10px !important; font-variant-numeric: tabular-nums; }
.table tbody tr td { font-size: 13px !important; line-height: 1.4; }
.table thead th { font-size: 12px !important; padding: 9px 10px !important; }
/* 数字列对齐方式 */
.table td:nth-child(4),
.table td:nth-child(5),
.table td:nth-child(6) { text-align: right; font-weight: 500; }
/* 状态 tag 紧凑 */
.table .tag { font-size: 11px; padding: 2px 7px; }
/* KPI 顶部 stat-grid 紧凑 */
.stat-grid { gap: 10px !important; margin-bottom: 14px !important; }
.stat-item { padding: 12px 14px !important; }
.stat-item .s-num { font-size: 21px !important; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
.stat-item .s-label { font-size: 12px !important; margin-top: 2px !important; }
/* 卡片头紧凑 */
.card-header { padding: 10px 16px !important; }
.card .card-body { padding: 14px 16px !important; }
.card-header h3 { font-size: 14px !important; }

/* ==========================================================
 *  桌面端首页 Dashboard（admin.js 电脑端，v4 装饰）
 *  - 欢迎条：浅蓝渐变 + 大字
 *  - 6 个功能卡：白底圆角 + 阴影 + hover 上浮 + 左侧色条
 *  - 出勤统计紧凑：4 个 chip 横排
 * ========================================================== */
/* 欢迎条 */
.dash-welcome {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 22px 28px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(59,130,246,.06);
}
.dash-welcome-left { display: flex; align-items: center; gap: 14px; }
.dash-welcome-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(59,130,246,.25);
}
.dash-welcome-title { font-size: 20px; font-weight: 600; color: #1e3a8a; line-height: 1.3; }
.dash-welcome-sub { font-size: 13px; color: #475569; margin-top: 2px; }
.dash-welcome-right {
  font-size: 12px; color: #64748b;
  padding: 6px 12px; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 999px;
  white-space: nowrap;
}

/* 6 个功能卡片网格 */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .18s ease;
  overflow: hidden;
}
.dash-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--card-color, #3b82f6);
  transition: width .18s ease;
}
.dash-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
  border-color: transparent;
}
.dash-card:hover::before { width: 6px; }
.dash-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: color-mix(in srgb, var(--card-color, #3b82f6) 12%, white);
  color: var(--card-color, #3b82f6);
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-card-body { flex: 1; min-width: 0; }
.dash-card-label { font-size: 15px; font-weight: 600; color: #1f2937; line-height: 1.3; }
.dash-card-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.dash-card-arrow {
  color: #cbd5e1; font-size: 18px; transition: transform .18s, color .18s;
}
.dash-card:hover .dash-card-arrow { color: var(--card-color, #3b82f6); transform: translateX(3px); }

/* 出勤 tab 紧凑化（admin2.js renderAttendanceTab，v4）*/
.att-compact-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.att-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--att-color, #3b82f6);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.att-stat-num { font-size: 20px; font-weight: 700; color: #1f2937; font-variant-numeric: tabular-nums; line-height: 1; }
.att-stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.att-stat-text { display: flex; flex-direction: column; }
.att-stat-icon { font-size: 18px; opacity: .5; }

.att-compact-toolbar {
  display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
  background: #f9fafb; padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--border);
}
.att-compact-toolbar label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.att-compact-toolbar input,
.att-compact-toolbar select {
  padding: 5px 9px; border: 1px solid var(--border); border-radius: 5px;
  font-size: 13px; background: #fff;
}
.att-compact-toolbar .btn-sm { padding: 4px 12px !important; font-size: 12px !important; }

/* 手机端隐藏这些桌面专用样式 */
@media (max-width: 768px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-welcome { padding: 14px 16px; flex-direction: column; align-items: flex-start; }
  .dash-welcome-icon { width: 38px; height: 38px; font-size: 18px; }
  .dash-welcome-title { font-size: 16px; }
  .att-compact-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   首页 Dashboard v3（dash3-*）三段式：欢迎条 / 4 数据卡 / 6 功能卡
   不用 color-mix()，全部 hex/rgba，避免兼容性坑
   ============================================================ */
.dash3 { padding: 16px 20px 28px; max-width: 1200px; margin: 0 auto; }
.dash3-hero {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #eaf2ff 0%, #d9e7ff 50%, #f0eaff 100%);
  border: 1px solid #d6e1f5; border-radius: 14px;
  padding: 22px 28px; margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.dash3-hero::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(10,108,255,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.dash3-hero-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.dash3-hero-emoji {
  width: 56px; height: 56px; border-radius: 14px;
  background: #ffffff; display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 4px 12px rgba(10,108,255,0.10);
  flex-shrink: 0;
}
.dash3-hero-text { min-width: 0; }
.dash3-hero-title {
  font-size: 22px; font-weight: 700; color: #1e3a8a;
  line-height: 1.3; letter-spacing: 0.3px;
}
.dash3-hero-sub {
  font-size: 13px; color: #4b5e83; margin-top: 6px; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 600px;
}
.dash3-hero-right {
  display: flex; flex-direction: column; align-items: flex-end;
  color: #1e3a8a; flex-shrink: 0; margin-left: 16px;
}
.dash3-hero-date { font-size: 24px; font-weight: 700; line-height: 1.2; }
.dash3-hero-week { font-size: 12px; color: #6b7c9e; margin-top: 2px; }

/* 第 2 段：4 张数据 KPI */
.dash3-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 18px;
}
.dash3-kpi {
  display: flex; align-items: stretch; gap: 0;
  background: #fff; border: 1px solid #e5e9f2; border-radius: 12px;
  padding: 0; text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden; position: relative;
}
.dash3-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15,23,42,0.08);
  border-color: transparent;
}
.dash3-kpi-bar { width: 4px; flex-shrink: 0; }
.dash3-kpi-body { flex: 1; padding: 16px 18px; min-width: 0; }
.dash3-kpi-num {
  font-size: 28px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dash3-kpi-lbl { font-size: 13px; color: #64748b; margin-top: 6px; }

/* 第 3 段：6 张功能卡（3 列 × 2 行） */
.dash3-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.dash3-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid #e5e9f2; border-radius: 12px;
  padding: 18px 20px; text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.dash3-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15,23,42,0.08);
  border-color: transparent;
}
.dash3-card-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--cc, #3b82f6);
  transition: width .18s ease;
}
.dash3-card:hover .dash3-card-bar { width: 6px; }
.dash3-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.dash3-card-text { flex: 1; min-width: 0; }
.dash3-card-label {
  font-size: 15px; font-weight: 600; color: #1f2937;
  line-height: 1.3;
}
.dash3-card-sub {
  font-size: 12px; color: #94a3b8; margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash3-card-arrow {
  color: #cbd5e1; font-size: 20px; font-weight: 300;
  flex-shrink: 0; transition: transform .18s ease, color .18s ease;
}
.dash3-card:hover .dash3-card-arrow {
  color: var(--cc, #3b82f6); transform: translateX(3px);
}

/* 手机端：紧凑排版 */
@media (max-width: 768px) {
  .dash3 { padding: 12px 12px 20px; }
  .dash3-hero { padding: 16px 16px; border-radius: 12px; }
  .dash3-hero-emoji { width: 44px; height: 44px; font-size: 22px; }
  .dash3-hero-title { font-size: 17px; }
  .dash3-hero-sub { font-size: 12px; max-width: 220px; }
  .dash3-hero-right { display: none; }
  .dash3-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash3-kpi-body { padding: 12px 14px; }
  .dash3-kpi-num { font-size: 22px; }
  .dash3-kpi-lbl { font-size: 12px; }
  .dash3-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash3-card { padding: 14px 14px; gap: 10px; }
  .dash3-card-icon { width: 38px; height: 38px; font-size: 19px; }
  .dash3-card-label { font-size: 14px; }
  .dash3-card-sub { font-size: 11px; }
}

/* ===== 首页 财务一瞥 (2026-09-03) ===== */
.dash3-fin {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 4px;
}
.dash3-fin-card {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-left: 4px solid var(--fc, #2563eb);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
a.dash3-fin-card { display: block; }
.dash3-fin-lbl { font-size: 12px; color: var(--muted, #6b7280); margin-bottom: 2px; }
.dash3-fin-num { font-size: 18px; font-weight: 700; color: var(--fc, #2563eb); line-height: 1.2; }
@media (max-width: 900px) {
  .dash3-fin { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 首页 团队本月一览 (2026-09-03) ===== */
.dash3-sec-h { font-size: 15px; font-weight: 700; color: var(--muted, #374151); margin: 18px 0 8px; }
.dash3-sec-h small { font-weight: 400; color: var(--muted, #9ca3af); }
.dash3-team-list { display: flex; flex-direction: column; gap: 8px; }
.dash3-team-row {
  display: grid; grid-template-columns: 150px repeat(5, 1fr) auto; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
  padding: 10px 14px; text-decoration: none; color: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow .15s;
}
.dash3-team-row:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.dash3-team-row.low { border-color: #fca5a5; background: #fef2f2; }
.dash3-tm-name { display: flex; flex-direction: column; line-height: 1.25; }
.dash3-tm-name b { font-size: 15px; }
.dash3-tm-name small { color: var(--muted, #9ca3af); font-size: 12px; }
.dash3-tm-c { display: flex; flex-direction: column; line-height: 1.3; font-size: 12px; color: var(--muted, #6b7280); border-left: 1px solid #f0f0f0; padding-left: 10px; }
.dash3-tm-c b { font-size: 15px; color: #1f2937; }
.dash3-tm-c b.n { color: #0a6cff; }
.dash3-tm-c small { color: #9ca3af; font-size: 11px; }
.dash3-tm-warn {
  background: #dc2626; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
@media (max-width: 1100px) {
  .dash3-team-row { grid-template-columns: 110px repeat(3, 1fr); }
  .dash3-tm-c:nth-child(n+6) { display: none; }
}
@media (max-width: 700px) {
  .dash3-team-row { grid-template-columns: 1fr 1fr 1fr; }
  .dash3-tm-c:nth-child(n+5) { display: none; }
}

/* ===== 出勤统计卡(今日概览)可点击 ===== */
.att-stat.clickable { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.att-stat.clickable:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.att-stat.clickable:hover .att-stat-num { color: var(--att-color, #3b82f6); }
.att-stat.clickable:active { transform: scale(.97); }
.att-stat.clickable .att-stat-label { color: var(--att-color); }

/* ===== 出勤统计表/明细弹窗表: 表头与数据同列同对齐(覆盖 .table td:nth-child 右对齐的串扰) ===== */
table.att-period-table th, table.att-period-table td { text-align: center !important; }
table.att-period-table th:first-child, table.att-period-table td:first-child { text-align: left !important; }
table.att-period-table td[colspan] { text-align: center !important; }
table.att-pop-table th, table.att-pop-table td { text-align: left !important; }
table.att-pop-table td[colspan] { text-align: center !important; }

/* ===== 项目统计弹窗 v2: 紧凑统计卡(一行4个) + Tab 明细(2026-09-04) ===== */
.modal-body .ps-sec { font-size: 12px; color: #475569; font-weight: 600; margin: 2px 0 6px; }
.ps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 2px; }
.ps-card { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 6px 4px; text-align: center; }
.ps-card .ps-num { font-size: 16px; font-weight: 700; color: #1e40af; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ps-card .ps-lab { font-size: 10px; color: #6b7280; margin-top: 1px; white-space: nowrap; }
.ps-tabs { display: flex; gap: 6px; margin: 12px 0 8px; border-bottom: 1px solid #e5e7eb; padding-bottom: 6px; }
.ps-tab { font-size: 12px; padding: 5px 12px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff; color: #374151; cursor: pointer; }
.ps-tab.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.ps-pane .ps-list { max-height: 260px; overflow-y: auto; border: 1px solid #f1f5f9; border-radius: 8px; }
.ps-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid #f3f4f6; font-size: 12px; flex-wrap: wrap; }
.ps-item:last-child { border-bottom: none; }
.ps-item .pi-badge { background: #f1f5f9; color: #475569; padding: 1px 6px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.ps-item .pi-who { color: #1e40af; font-weight: 600; }
.ps-item .pi-by { color: #9ca3af; font-size: 11px; margin-left: auto; white-space: nowrap; }
.ps-item .pi-txt { color: #374151; flex: 1 1 140px; min-width: 100px; }
.ps-item .pi-img { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }
.ps-empty { color: #9ca3af; text-align: center; padding: 14px; font-size: 12px; }

/* ===== 绩效明细项目表: 表头与数据同列同对齐 + 紧凑(覆盖 .table td:nth-child(4/5/6) 右对齐串扰) ===== */
table.kpi-proj-table th, table.kpi-proj-table td { text-align: center !important; white-space: nowrap; padding: 5px 8px; font-size: 13px; }
table.kpi-proj-table th:first-child, table.kpi-proj-table td:first-child { text-align: left !important; }

/* ===== 2026-09-07 合同附件按钮：无文档=灰 / 有文档=原色 ===== */
.cf-btn { padding: 1px 4px; line-height: 1; }
.cf-btn .cf-ic { width: 18px; height: 18px; display: inline-block; vertical-align: middle; filter: grayscale(1); opacity: .38; transition: filter .15s, opacity .15s; }
.cf-btn:hover .cf-ic { filter: grayscale(.65); opacity: .85; }
.cf-btn.on { border-color: #f59e0b; }
.cf-btn.on .cf-ic { filter: none; opacity: 1; }
.cf-th-ic { width: 15px !important; height: 15px !important; opacity: .55; }
.pc-actions .cf-btn { padding: 2px 5px; display: inline-flex; align-items: center; }
.cf-li { width: 18px !important; height: 18px !important; filter: none !important; opacity: 1 !important; }

/* ============================================================
   文案管理（仅管理员）2026-09-13 新增
   全部类名 wn- 前缀 + 作用域，不与既有样式冲突；移动端规则只在 @media 内
   ============================================================ */
.wn { padding: 0 0 60px; }
.wn-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wn-tabs { display: flex; gap: 8px; }
.wn-tab { display: flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; font-size: 14px; color: #4b5563; cursor: pointer; font-family: inherit; }
.wn-tab b { font-size: 15px; color: #111827; }
.wn-tab small { color: #9ca3af; font-size: 12px; }
.wn-tab.on { background: #0891b2; border-color: #0891b2; color: #fff; }
.wn-tab.on b, .wn-tab.on small { color: #fff; }
.wn-sum { font-size: 13px; color: #6b7280; }
.wn-sum b { color: #111827; }
.wn-list { display: flex; flex-direction: column; gap: 8px; }
.wn-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.wn-item:hover { border-color: #0891b2; box-shadow: 0 2px 10px rgba(8, 145, 178, .10); }
.wn-item.done { opacity: .55; }
.wn-item.done .wn-title { text-decoration: line-through; color: #9ca3af; }
.wn-ck { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #d1d5db; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; background: #fff; }
.wn-ck.on { background: #16a34a; border-color: #16a34a; }
.wn-main { flex: 1 1 auto; min-width: 0; }
.wn-title { font-size: 15px; font-weight: 600; color: #111827; line-height: 1.45; }
.wn-sub { font-size: 12.5px; color: #9ca3af; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wn-arrow { flex: 0 0 auto; color: #d1d5db; font-size: 20px; line-height: 1; }
.wn-empty { padding: 60px 0; text-align: center; color: #9ca3af; }
.wn-dhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wn-back, .wn-btn, .wn-mark { font-family: inherit; font-size: 13.5px; padding: 8px 14px; border-radius: 9px; border: 1px solid #e5e7eb; background: #fff; color: #374151; cursor: pointer; }
.wn-back:hover, .wn-btn:hover { border-color: #0891b2; color: #0891b2; }
.wn-mark.on { background: #16a34a; border-color: #16a34a; color: #fff; font-weight: 600; }
.wn-dcard { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px 18px 22px; }
.wn-dtitle { font-size: 19px; font-weight: 700; color: #111827; line-height: 1.5; }
.wn-dmeta { font-size: 12.5px; color: #9ca3af; margin-top: 8px; }
.wn-dsum { margin-top: 14px; padding: 10px 12px; background: #f9fafb; border-left: 3px solid #0891b2; border-radius: 6px; font-size: 13.5px; color: #4b5563; line-height: 1.7; }
.wn-dbody { margin-top: 16px; font-size: 15.5px; line-height: 2.05; color: #1f2937; word-break: break-word; }
.wn-dfoot { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.wn-btn-back { margin-left: auto; }

@media (max-width: 768px) {
  .wn-top { flex-direction: column; align-items: stretch; }
  .wn-tabs { width: 100%; }
  .wn-tab { flex: 1 1 0; justify-content: center; padding: 9px 8px; font-size: 13px; }
  .wn-tab small { display: none; }
  .wn-sum { text-align: center; }
  .wn-item { padding: 11px 12px; }
  .wn-sub { white-space: normal; }
  .wn-dtitle { font-size: 17px; }
  .wn-dbody { font-size: 15px; line-height: 1.95; }
  .wn-dhead { flex-wrap: wrap; }
  .wn-dfoot { flex-direction: column-reverse; }
  .wn-btn-back { margin-left: 0; }
  .wn-btn, .wn-back, .wn-mark { width: 100%; }
}

/* ===== 文案管理：新建按钮 + 新建表单（2026-09-13 追加） ===== */
.wn-act { display: flex; align-items: center; gap: 12px; }
.wn-new { font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 10px; border: 1px solid #0891b2; background: #0891b2; color: #fff; cursor: pointer; white-space: nowrap; }
.wn-new:hover { background: #0e7490; border-color: #0e7490; }
.wnf-lbl { font-size: 13px; font-weight: 600; color: #374151; margin: 14px 0 6px; }
.wnf-lbl:first-child { margin-top: 0; }
.wnf-lbl i { font-weight: 400; font-style: normal; color: #9ca3af; font-size: 12px; }
.wnf-kinds { display: flex; gap: 8px; }
.wnf-k { flex: 1 1 0; font-family: inherit; font-size: 14px; padding: 10px 8px; border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; color: #4b5563; cursor: pointer; }
.wnf-k.on { background: #0891b2; border-color: #0891b2; color: #fff; font-weight: 600; }
.wnf-in { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 9px; color: #111827; background: #fff; }
.wnf-in:focus { outline: none; border-color: #0891b2; box-shadow: 0 0 0 3px rgba(8, 145, 178, .12); }
.wnf-ta { line-height: 1.8; resize: vertical; }
.wnf-cnt { text-align: right; font-size: 12px; color: #9ca3af; margin-top: 4px; }

@media (max-width: 768px) {
  .wn-act { width: 100%; justify-content: space-between; }
  .wn-new { padding: 8px 14px; }
  .wnf-k { font-size: 13px; }
  .wnf-in { font-size: 15px; }
}

/* ===== 请假审批表(#el-table): 表头与数据同列同对齐 =====
   覆盖 style.css:840 `.table td:nth-child(4/5/6){text-align:right}` 的列对齐串扰
   （该表第 4/5/6 列 = 时长/事由/状态，被误判为数字列右对齐 → 与表头错位）
   2026-10-08 增「提交时间」(第2列)「附件」(第7列) → 事由列由第5列挪到第6列 */
#el-table th, #el-table td { text-align: center !important; }
#el-table th:first-child, #el-table td:first-child { text-align: left !important; }
#el-table th:nth-child(6), #el-table td:nth-child(6) { text-align: left !important; }

/* ===== 2026-09-15 管理端「员工」板块：表格列对齐 + 绩效卡片分隔 =====
   根因：style.css 的全局串扰规则 `.table td:nth-child(4/5/6){text-align:right}`
   是给「数字列」写的，但薪资表 / 员工管理表的第 4/5/6 列是文字列
   （底薪·绩效·奖金 / 角色·入职时间·状态）→ 表头左对齐、数据右对齐 = 上下错位。
   修法：按表 id 覆盖，保证「表头与数据同列同对齐」（禁止直接改那条全局规则）。 */
#es-table th, #es-table td,
#ei-table th, #ei-table td { text-align: center !important; }
/* 首列（员工 / 工作号）与姓名列保持左对齐，读起来更自然 */
#es-table th:first-child, #es-table td:first-child,
#ei-table th:first-child, #ei-table td:first-child,
#ei-table th:nth-child(2), #ei-table td:nth-child(2) { text-align: left !important; }

/* 绩效统计（员工板块）：员工卡片之间留出更明显的分隔（卡片本身的边框/圆角/内边距由 injectStyles 注入） */
html:not([data-view="mobile"]) #kpi-emp-list > .kpi-emp-card { margin-bottom: 18px; }
html:not([data-view="mobile"]) #kpi-emp-list > .kpi-emp-card:last-child { margin-bottom: 0; }


/* ===== Todo 子事件（2026-09-20）===== */
.todo-group { display: flex; flex-direction: column; }
.todo-subs { margin-top: -1px; border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; background: #f8fafc; padding: 6px 14px 10px 56px; }
.todo-sub-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.todo-sub-item:hover { background: #eef2f7; }
.todo-sub-check { width: 18px; height: 18px; flex-shrink: 0; border: 2px solid #f0a3a3; border-radius: 50%; background: #fdeaea; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.todo-sub-check.checked { background: #10b981; border-color: #10b981; }
.todo-sub-title { flex: 1; min-width: 0; cursor: pointer; word-break: break-all; }
.todo-sub-title:hover { color: var(--primary); text-decoration: underline; }
.todo-sub-item.todo-done .todo-sub-title { text-decoration: line-through; color: #9ca3af; }
.todo-sub-date { color: #6b7280; font-size: 12px; white-space: nowrap; cursor: pointer; }
.todo-sub-date:hover { color: var(--primary); }
.todo-sub-del { border: none; background: none; cursor: pointer; color: #cbd5e1; font-size: 13px; padding: 2px 4px; }
.todo-sub-del:hover { color: #ef4444; }
.todo-sub-add { display: flex; gap: 6px; align-items: center; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--border); }
.todo-sub-add .tsa-title { flex: 1; min-width: 120px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.todo-sub-add .tsa-date { width: 148px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.todo-fold .tsb-caret { color: #4b5563; font-size: 13px; line-height: 1; }        /* 无子事件：深灰 */
.todo-fold.has-subs .tsb-caret { color: #ef4444; font-weight: 700; }               /* 有子事件：红色 */

/* 日期选择器：今天加圈（用户 2026-09-20 要求） */
.dp-cell.dp-today { border-radius: 50%; box-shadow: inset 0 0 0 2px #ef4444; color: #ef4444; font-weight: 800; }
.dp-cell.dp-today.dp-now { color: #fff; box-shadow: inset 0 0 0 2px #ef4444; }  /* 今天=选中时：红圈+蓝底 */
.dp-cell.dp-today.dp-mark::after { background: #ef4444; }
.dp-cell.dp-today.dp-now.dp-mark::after { background: #ffffff; }
.dp-legend .lg-today { background: #ffffff; border: 2px solid #ef4444; border-radius: 50%; }

/* ===== 多行事件：保留换行/空行/缩进（2026-09-20）===== */
.todo-title { white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.todo-sub-title { white-space: pre-wrap; word-break: break-word; }
#e-title { white-space: pre-wrap; }
#todo-input { white-space: pre-wrap; }
/* 多行事件：到期提醒弹窗只显示前 5 行，避免长文把弹窗撑满屏幕（2026-09-20） */
.todo-reminder .tr-text { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; max-height: 7.6em; }

/* ===== 查看事件全文（只读层，2026-09-20）===== */
.todo-view .tv-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: #6b7280; margin-bottom: 10px; }
.todo-view .tv-cat { padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.todo-view .tv-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.8; color: #1f2937; background: #fafbfc; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; max-height: 62vh; overflow-y: auto; }
.todo-view .tv-img { margin-top: 10px; }
.todo-view .tv-img img { max-width: 130px; border-radius: 6px; margin: 4px 6px 0 0; }
.todo-view .tv-subs { margin-top: 12px; }
.todo-view .tv-subs h4 { margin: 0 0 6px; font-size: 12px; color: #6b7280; font-weight: 600; }
.todo-view .tv-sub { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.todo-view .tv-sub:last-child { border-bottom: none; }
.todo-view .tv-sub-ck { color: #10b981; font-weight: 700; }
.todo-view .tv-sub-t { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.todo-view .tv-sub.done .tv-sub-t { color: #9ca3af; text-decoration: line-through; }
.todo-view .tv-sub-d { color: #6b7280; font-size: 12px; white-space: nowrap; }
html[data-view="mobile"] .todo-view .tv-text { font-size: 13.5px; line-height: 1.75; max-height: 58vh; padding: 10px 12px; }
html[data-view="mobile"] .todo-view .tv-meta { font-size: 11.5px; }

/* ===== 2026-09-21 客户管理项目子表：日期列字重统一 + 状态标签实底配色 ===== */
/* 到账日/到期日 字重与「到账金额」对齐（400），去掉第4列被 .table nth-child(4) 加粗成 500 的差异 */
.contract-card .sub-table tbody td.fz2,
.contract-card .sub-table tbody td.fz4 { font-weight: 400; }
/* 目前状态标签：进行中/低频维护/合作中/完成 = 绿底白字；制作中 = 蓝底白字；已结束/完结 = 深灰底白字 */
.contract-card .sub-table tbody td .tag-ok { background: #10b981; color: #fff; }
.contract-card .sub-table tbody td .tag-making { background: #2563eb; color: #fff; }
.contract-card .sub-table tbody td .tag-mute { background: #4b5563; color: #fff; }
