/* app.css - 人事行政任务看板共享样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg-main: #0D1117; --bg-card: #161B22; --bg-card-hover: #1C2230;
  --bg-sidebar: #0A0D12; --border: #30363D; --border-light: #21262D;
  --text-primary: #E6EDF3; --text-secondary: #8B949E; --text-muted: #6E7681;
  --blue: #3B82F6; --blue-bg: rgba(59,130,246,0.12);
  --red: #EF4444; --red-bg: rgba(239,68,68,0.12);
  --green: #10B981; --green-bg: rgba(16,185,129,0.12);
  --orange: #F59E0B; --orange-bg: rgba(245,158,11,0.12);
  --purple: #8B5CF6; --purple-bg: rgba(139,92,246,0.12);
  --teal: #14B8A6; --teal-bg: rgba(20,184,166,0.12);
  --daily: #F97316; --daily-bg: rgba(249,115,22,0.1);
}
body { font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif; background: var(--bg-main); color: var(--text-primary); }
input, textarea, button, select { font-family: inherit; }

/* ===== 登录页 ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0D1117 0%, #161B22 50%, #0A0D12 100%); }
.login-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 36px 32px; width: 380px; max-width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-logo .logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; }
.login-logo .logo-text { font-size: 18px; font-weight: 700; }
.login-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.login-field input { width: 100%; padding: 11px 14px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 14px; transition: border-color 0.2s; }
.login-field input:focus { outline: none; border-color: var(--blue); }
.login-btn { width: 100%; padding: 12px; background: var(--blue); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.login-btn:hover { background: #2563EB; }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-dingtalk { background: #1677FF; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-dingtalk:hover { background: #0E5FD8; }
.login-divider { display: flex; align-items: center; text-align: center; color: var(--text-muted); font-size: 12px; margin: 16px 0 4px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.login-divider span { padding: 0 12px; }
.login-error { color: var(--red); font-size: 13px; margin-bottom: 12px; padding: 8px 12px; background: var(--red-bg); border-radius: 6px; display: none; }
.login-hint { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-light); font-size: 11px; color: var(--text-muted); line-height: 1.8; }
.login-hint code { background: var(--bg-main); padding: 1px 6px; border-radius: 4px; color: var(--text-secondary); font-size: 11px; }
.login-forgot { margin-top: 14px; text-align: center; }
.login-forgot a { color: var(--blue); font-size: 13px; cursor: pointer; text-decoration: none; }
.login-forgot a:hover { text-decoration: underline; }

/* ===== 看板通用布局 ===== */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 230px; background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar-logo { padding: 18px 18px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border-light); }
.sidebar-logo .logo-icon { width: 32px; height: 32px; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; }
.sidebar-logo .logo-text { font-size: 13px; font-weight: 600; }
.sidebar-section { padding: 14px 12px 6px; }
.sidebar-section-title { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; padding: 0 8px 6px; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; margin-bottom: 2px; }
.sidebar-item:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-item.active { background: var(--blue-bg); color: var(--blue); font-weight: 500; }
.sidebar-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sidebar-item .count { margin-left: auto; font-size: 11px; background: var(--bg-card); padding: 1px 7px; border-radius: 10px; color: var(--text-muted); }
.sidebar-item.active .count { background: var(--blue); color: #fff; }
.sidebar-item .wh-name { flex: 1; min-width: 0; }
.sidebar-item .bp-name { font-size: 10px; color: var(--text-muted); margin-left: 2px; }
.sidebar-item.daily-item { border: 1px dashed var(--daily); border-radius: 8px; margin-top: 4px; }
.sidebar-item.daily-item .count { background: var(--daily-bg); color: var(--daily); }
.sidebar-user { margin-top: auto; padding: 14px; border-top: 1px solid var(--border-light); display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0; }
.sidebar-user .user-info .name { font-size: 13px; font-weight: 500; }
.sidebar-user .user-info .role { font-size: 11px; color: var(--text-muted); }
.sidebar-user .logout-btn { margin-left: auto; font-size: 11px; color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.2s; }
.sidebar-user .logout-btn:hover { color: var(--red); background: var(--red-bg); }

/* 主内容区 */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.topbar-left h1 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.topbar-left h1 .live-badge { font-size: 11px; background: var(--red); color: #fff; padding: 2px 8px; border-radius: 10px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.topbar-left h1 .live-badge::before { content: ""; width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.topbar-left .subtitle { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-right .clock { font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.topbar-right .btn { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.topbar-right .btn-primary { background: var(--blue); color: #fff; }
.topbar-right .btn-primary:hover { background: #2563EB; }
.topbar-right .btn-ghost { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.topbar-right .btn-ghost:hover { color: var(--text-primary); border-color: var(--text-muted); }
.topbar-right .btn-daily { background: var(--daily); color: #fff; }
.topbar-right .btn-daily:hover { background: #EA580C; }
.topbar-right .btn-new-task { padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: var(--green); color: #fff; transition: all 0.2s; white-space: nowrap; }
.topbar-right .btn-new-task:hover { background: #16a34a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(34,197,94,0.3); }

/* 搜索框 */
.search-box { position: relative; display: flex; align-items: center; }
.search-box input { width: 220px; padding: 8px 12px 8px 34px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; transition: all 0.2s; }
.search-box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59,130,246,0.15); width: 260px; }
.search-box input::placeholder { color: var(--text-muted); }
.search-box .search-icon { position: absolute; left: 10px; font-size: 13px; pointer-events: none; }

/* 统计卡片 */
.stats-row { display: flex; gap: 16px; padding: 18px 28px 10px; flex-shrink: 0; }
.stat-card { flex: 1; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; transition: all 0.2s; }
.stat-card:hover { border-color: var(--border); transform: translateY(-1px); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.stat-card .stat-info .stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-card .stat-info .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-card .stat-trend { margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 6px; }

/* 团队负载条 */
.team-row { display: flex; gap: 10px; padding: 0 28px 10px; flex-shrink: 0; }
.team-chip { flex: 1; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.team-chip:hover { border-color: var(--border); }
.team-chip .chip-avatar { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; flex-shrink: 0; }
.team-chip .chip-info { flex: 1; min-width: 0; }
.team-chip .chip-name { font-size: 12px; font-weight: 600; }
.team-chip .chip-warehouse { font-size: 10px; color: var(--text-muted); }
.team-chip .chip-count { font-size: 16px; font-weight: 700; color: var(--text-secondary); }
.team-chip .chip-count.overload { color: var(--red); }

/* 看板 */
.board-layout { flex: 1; display: flex; overflow: hidden; }
.board { flex: 1; display: flex; gap: 14px; padding: 10px 28px 14px; overflow-x: auto; overflow-y: hidden; }
.board-column { flex: 1; min-width: 230px; display: flex; flex-direction: column; background: rgba(22,27,34,0.5); border-radius: 12px; border: 1px solid var(--border-light); }
.column-header { padding: 12px 14px 8px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-light); }
.column-header .col-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.column-header .col-dot { width: 10px; height: 10px; border-radius: 50%; }
.column-header .col-count { font-size: 12px; color: var(--text-muted); background: var(--bg-card); padding: 1px 8px; border-radius: 10px; }
.column-cards { flex: 1; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.column-cards::-webkit-scrollbar { width: 4px; }
.column-cards::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* 任务卡片 */
.task-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 10px; padding: 12px; cursor: pointer; transition: all 0.2s; position: relative; }
.task-card:hover { background: var(--bg-card-hover); border-color: var(--border); transform: translateY(-1px); }
.task-card.overdue { border-color: var(--red); animation: overdue-glow 2s infinite; }
@keyframes overdue-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } 50% { box-shadow: 0 0 12px 0 rgba(239,68,68,0.3); } }
.task-card.daily-task { border: 1px dashed var(--daily); background: rgba(249,115,22,0.03); }
.task-card.daily-task:hover { background: rgba(249,115,22,0.06); border-color: var(--daily); }
.task-card .task-priority { position: absolute; top: 0; left: 0; width: 3px; height: 100%; border-radius: 10px 0 0 10px; }
.task-card .card-tags { display: flex; gap: 4px; margin-bottom: 6px; margin-left: 6px; flex-wrap: wrap; }
.task-card .wh-tag, .task-card .module-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.task-card .daily-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--daily-bg); color: var(--daily); }
.task-card .task-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.task-card .task-title { font-size: 13px; font-weight: 600; line-height: 1.4; flex: 1; padding-left: 6px; }
.task-card .task-tag { font-size: 10px; padding: 2px 7px; border-radius: 5px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.task-card .task-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; padding-left: 6px; margin-bottom: 8px; }
.task-card .task-progress { padding-left: 6px; margin-bottom: 8px; }
.task-card .progress-bar { height: 5px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
.task-card .progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.task-card .progress-text { font-size: 10px; color: var(--text-muted); margin-top: 3px; display: flex; justify-content: space-between; }
.task-card .task-bottom { display: flex; align-items: center; justify-content: space-between; padding-left: 6px; }
.task-card .assignee { display: flex; align-items: center; gap: 6px; }
.task-card .assignee-avatar { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: #fff; }
.task-card .assignee-name { font-size: 11px; color: var(--text-secondary); }
.task-card .deadline { font-size: 11px; display: flex; align-items: center; gap: 4px; }
.task-card .deadline.overdue-text { color: var(--red); font-weight: 600; }
.task-card .deadline.urgent { color: var(--orange); font-weight: 600; }
.task-card .feedback-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 6px 4px; border-top: 1px dashed var(--border-light); }
.task-card .feedback-btn { font-size: 12px; padding: 6px 16px; border-radius: 6px; border: none; background: var(--daily); color: #fff; cursor: pointer; font-weight: 600; transition: all 0.2s; animation: feedback-pulse 2s infinite; }
.task-card .feedback-btn:hover { background: #EA580C; transform: scale(1.05); }
@keyframes feedback-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.4); } 50% { box-shadow: 0 0 0 6px rgba(249,115,22,0); } }
.task-card .assigner-info { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.task-card .urge-badge { font-size: 10px; padding: 2px 8px; background: var(--red-bg); color: var(--red); border-radius: 4px; font-weight: 600; animation: pulse 1s infinite; }

/* 卡片操作按钮栏 */
.task-card .card-actions { display: flex; gap: 4px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-light); flex-wrap: wrap; }
.task-card .card-action-btn { font-size: 11px; padding: 4px 10px; border-radius: 5px; border: none; cursor: pointer; font-weight: 600; transition: all 0.2s; white-space: nowrap; }
.task-card .card-action-btn:hover { transform: translateY(-1px); }
.task-card .review-btn { background: var(--purple-bg); color: var(--purple); }
.task-card .review-btn:hover { background: rgba(139,92,246,0.2); }
.task-card .urge-btn { background: var(--red-bg); color: var(--red); }
.task-card .urge-btn:hover { background: rgba(239,68,68,0.2); }
.task-card .edit-btn { background: var(--blue-bg); color: var(--blue); }
.task-card .edit-btn:hover { background: rgba(59,130,246,0.2); }
.task-card .delete-btn { background: rgba(110,118,129,0.15); color: var(--text-muted); }
.task-card .delete-btn:hover { background: var(--red-bg); color: var(--red); }

/* 右侧动态栏 */
.activity-panel { width: 290px; flex-shrink: 0; border-left: 1px solid var(--border); background: var(--bg-sidebar); display: flex; flex-direction: column; }
.activity-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.activity-header h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.activity-header h3 .live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 1.5s infinite; }
.activity-header .auto-scroll-label { font-size: 10px; color: var(--green); background: var(--green-bg); padding: 2px 8px; border-radius: 5px; font-weight: 600; }
.activity-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.activity-list::-webkit-scrollbar { width: 4px; }
.activity-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.activity-item { display: flex; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border-light); animation: fadeInTop 0.4s ease; }
.activity-item.activity-new { animation: slideInHighlight 0.6s ease; background: rgba(59,130,246,0.08); border-left: 3px solid var(--blue); }
@keyframes slideInHighlight { 0% { opacity: 0; transform: translateY(-20px) scale(0.95); background: rgba(59,130,246,0.2); } 50% { background: rgba(59,130,246,0.15); } 100% { opacity: 1; transform: translateY(0) scale(1); background: rgba(59,130,246,0.08); } }
.activity-item .act-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.activity-item .act-content { flex: 1; min-width: 0; }
.activity-item .act-text { font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.activity-item .act-text strong { color: var(--text-primary); font-weight: 600; }
.activity-item .act-text .highlight { color: var(--blue); font-weight: 500; }
.activity-item .act-text .warn { color: var(--red); font-weight: 600; }
.activity-item .act-text .success { color: var(--green); font-weight: 500; }
.activity-item .act-text .daily { color: var(--daily); font-weight: 500; }
.activity-item .act-time { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* 底部逾期警示 */
.alert-bar { background: linear-gradient(90deg, rgba(239,68,68,0.15), rgba(239,68,68,0.08)); border-top: 1px solid var(--red); padding: 9px 28px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.alert-bar .alert-icon { font-size: 16px; animation: blink 1s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.alert-bar .alert-text { font-size: 13px; color: var(--red); font-weight: 600; }
.alert-bar .alert-text .alert-action { color: var(--text-secondary); font-weight: 400; margin-left: 8px; }
.alert-bar .alert-btn { margin-left: auto; font-size: 12px; padding: 5px 14px; background: var(--red); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; }
.alert-bar .alert-btn:hover { background: #DC2626; }

/* 标签颜色 */
.tag-high { background: var(--red-bg); color: var(--red); }
.tag-medium { background: var(--orange-bg); color: var(--orange); }
.tag-low { background: rgba(110,118,129,0.15); color: var(--text-secondary); }

/* 弹窗 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 999; align-items: center; justify-content: center; }
.modal-overlay.modal-open { display: flex; }
.modal-box { position: relative; z-index: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 24px; width: 420px; max-width: 90%; max-height: 85vh; overflow-y: auto; }
.modal-box .modal-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.modal-box .modal-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.modal-box .modal-bg-close { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; cursor: pointer; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.modal-field input, .modal-field select, .modal-field textarea { width: 100%; padding: 9px 12px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; }
.modal-field input:focus, .modal-field select:focus, .modal-field textarea:focus { outline: none; border-color: var(--blue); }
.modal-field textarea { resize: vertical; min-height: 70px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal-actions button { padding: 8px 18px; border-radius: 8px; font-size: 13px; cursor: pointer; font-weight: 600; border: none; }
.btn-cancel { background: var(--bg-main); color: var(--text-secondary); border: 1px solid var(--border) !important; }
.btn-submit { background: var(--daily); color: #fff; }
.btn-submit-blue { background: var(--blue); color: #fff; }
.modal-slider-row { display: flex; align-items: center; gap: 10px; }
.modal-slider-row input[type=range] { flex: 1; accent-color: var(--daily); }
.modal-slider-row .slider-label { font-size: 13px; font-weight: 600; color: var(--daily); min-width: 40px; }

/* 多选负责人复选框 */
.assignee-multiselect { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; padding: 4px; border: 1px solid var(--border-light); border-radius: 8px; background: var(--bg-main); }
.assignee-multiselect::-webkit-scrollbar { width: 4px; }
.assignee-multiselect::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.assignee-checkbox { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.assignee-checkbox:hover { background: var(--bg-card-hover); }
.assignee-checkbox.checked { background: var(--blue-bg); border-color: var(--blue); }
.assignee-checkbox input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }
.assignee-checkbox .cb-avatar { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; flex-shrink: 0; }
.assignee-checkbox .cb-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.assignee-checkbox .cb-wh { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.assignee-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; line-height: 1.4; }

/* 多负责人头像组 */
.avatar-group { display: flex; align-items: center; }
.avatar-mini { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: #fff; border: 2px solid var(--bg-card); margin-left: -6px; flex-shrink: 0; }
.avatar-mini:first-child { margin-left: 0; }
.avatar-more { background: var(--text-muted); font-size: 9px; }

@keyframes fadeInTop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Toast 提示 */
.toast { position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); padding: 10px 24px; border-radius: 8px; font-size: 14px; font-weight: 600; z-index: 2000; animation: fadeInTop 0.3s ease; }
.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
.toast.info { background: var(--blue); color: #fff; }

/* BP 看板 - 个人任务列表 */
.bp-list-view { flex: 1; overflow-y: auto; padding: 14px 28px; }
.bp-list-view::-webkit-scrollbar { width: 4px; }
.bp-list-view::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.bp-section-title { font-size: 14px; font-weight: 600; margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.bp-section-title:first-child { margin-top: 0; }
.bp-section-title .count { font-size: 12px; color: var(--text-muted); background: var(--bg-card); padding: 1px 8px; border-radius: 10px; }
.bp-task-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: 16px; margin-bottom: 10px; transition: all 0.2s; position: relative; }
.bp-task-card:hover { border-color: var(--border); }
.bp-task-card.overdue { border-color: var(--red); }
.bp-task-card.daily-task { border: 1px dashed var(--daily); background: rgba(249,115,22,0.03); }
.bp-task-card .bp-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.bp-task-card .bp-card-title { font-size: 15px; font-weight: 600; flex: 1; }
.bp-task-card .bp-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.bp-task-card .bp-card-tags { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.bp-task-card .bp-card-progress { margin-bottom: 10px; }
.bp-task-card .bp-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border-light); }
.bp-task-card .bp-card-meta { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 12px; }
.bp-task-card .bp-card-actions { display: flex; gap: 8px; }

/* 空状态 */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 10px; }

/* 响应式 */
@media (max-width: 1200px) {
  .activity-panel { width: 240px; }
  .stats-row { flex-wrap: wrap; }
  .stat-card { min-width: 140px; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .activity-panel { display: none; }
  .team-row { flex-wrap: wrap; }
}

/* ===== 钉钉设置页 ===== */
.dt-scroll { flex: 1; overflow-y: auto; padding: 0; }
.dt-config { max-width: 700px; margin: 0 auto; padding: 20px; }
.dt-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.dt-section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.dt-field { margin-bottom: 14px; }
.dt-field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.dt-field input[type="text"], .dt-field input[type="tel"] { width: 100% !important; padding: 10px 14px !important; background: var(--bg-main) !important; border: 1px solid var(--border) !important; border-radius: 8px !important; color: var(--text-primary) !important; font-size: 14px !important; box-sizing: border-box !important; }
.dt-field input[type="text"]:focus, .dt-field input[type="tel"]:focus { outline: none; border-color: var(--blue) !important; box-shadow: 0 0 0 2px rgba(59,130,246,0.15); }
.dt-field .hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.dt-toggle { display: flex; align-items: center; gap: 10px; }
.dt-toggle input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.dt-phone-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dt-phone-row .avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.dt-phone-row .name { font-size: 13px; width: 70px; flex-shrink: 0; }
.dt-phone-row .wh { font-size: 11px; color: var(--text-muted); width: 100px; flex-shrink: 0; }
.dt-phone-row input[type="tel"] { flex: 1; padding: 8px 12px !important; background: var(--bg-main) !important; border: 1px solid var(--border) !important; border-radius: 6px !important; color: var(--text-primary) !important; font-size: 13px !important; }
.dt-phone-row input[type="tel"]:focus { outline: none; border-color: var(--blue) !important; }
.dt-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.dt-btn { padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.dt-btn-save { background: var(--green); color: #fff; }
.dt-btn-save:hover { background: #16a34a; }
.dt-btn-test { background: var(--blue); color: #fff; }
.dt-btn-test:hover { background: #2563EB; }
.dt-btn-back { background: var(--bg-main); color: var(--text-secondary); border: 1px solid var(--border); }
.dt-btn-back:hover { color: var(--text-primary); }
.dt-guide { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); border-radius: 8px; padding: 14px; margin-bottom: 16px; font-size: 12px; color: var(--text-secondary); line-height: 1.7; }
.dt-guide strong { color: var(--blue); }
.dt-guide ol { margin: 6px 0 0 18px; padding: 0; }
.dt-status { padding: 8px 14px; border-radius: 6px; font-size: 12px; margin-top: 10px; display: none; }
.dt-status.success { display: block; background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.dt-status.error { display: block; background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }

/* ===== 执行数据看板 ===== */
.records-view { flex: 1; overflow-y: auto; padding: 16px 24px 24px; }
.records-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.records-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rf-item { display: flex; flex-direction: column; gap: 4px; }
.rf-item label { font-size: 11px; color: var(--text-secondary); }
.rf-item input, .rf-item select { padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; }
.rf-item input:focus, .rf-item select:focus { outline: none; border-color: var(--blue); }
.records-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.rec-empty { grid-column: 1/-1; padding: 60px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.rec-module-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.rec-module-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--bg-card-hover); }
.rec-module-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.rec-module-count { font-size: 11px; color: var(--text-secondary); background: var(--bg-main); padding: 2px 8px; border-radius: 10px; }
.rec-rows { padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.rec-row { background: var(--bg-main); border: 1px solid var(--border-light); border-radius: 10px; padding: 12px; }
.rec-row-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rec-month { font-size: 11px; color: var(--text-muted); }
.rec-row-actions { margin-left: auto; display: flex; gap: 4px; }
.rec-act-btn { background: transparent; border: none; cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 5px; opacity: 0.7; transition: all 0.15s; }
.rec-act-btn:hover { opacity: 1; background: var(--bg-card-hover); }
.rec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-chip { display: inline-flex; align-items: stretch; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); font-size: 12px; }
.rec-chip-k { background: var(--bg-card-hover); color: var(--text-secondary); padding: 3px 8px; }
.rec-chip-v { background: var(--bg-card); color: var(--text-primary); padding: 3px 8px; font-weight: 600; }
.rec-remark { margin-top: 8px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.rec-meta { margin-top: 8px; font-size: 11px; color: var(--text-muted); }
/* ===== 完成汇总（按BP）===== */
.summary-hint { font-size: 12px; color: var(--text-secondary); background: var(--bg-card); border: 1px dashed var(--border); padding: 8px 12px; border-radius: 8px; }
.summary-overview { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.sum-ov-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 22px; min-width: 150px; }
.sum-ov-num { font-size: 26px; font-weight: 800; color: var(--green); line-height: 1.1; }
.sum-ov-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.sum-card { padding: 0; }
.sum-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-card-hover); border-bottom: 1px solid var(--border); }
.sum-avatar { width: 40px; height: 40px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sum-head-info { flex: 1; min-width: 0; }
.sum-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.sum-wh { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.sum-total { text-align: center; }
.sum-total b { display: block; font-size: 24px; font-weight: 800; color: var(--green); line-height: 1; }
.sum-total span { font-size: 11px; color: var(--text-muted); }
.sum-section-label { font-size: 11px; color: var(--text-muted); font-weight: 600; padding: 12px 16px 6px; }
.sum-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
.sum-chip { font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.sum-chip b { font-weight: 800; margin-left: 2px; }
.sum-empty { font-size: 12px; color: var(--text-muted); }
.sum-tasks { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.sum-task { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 8px; background: var(--bg-main); border-radius: 8px; }
.sum-task-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sum-task-title { color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-task-mod { color: var(--text-secondary); font-size: 11px; flex-shrink: 0; }
.sum-task-when { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
/* 登记弹窗：指标行 + 三列字段 */
.modal-field-row { display: flex; gap: 12px; }
.metric-row { display: flex; gap: 8px; margin-bottom: 8px; }
.metric-row input { flex: 1; padding: 8px 10px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); font-size: 13px; }
.metric-row input.metric-key { flex: 0 0 38%; }
.metric-row input:focus { outline: none; border-color: var(--blue); }
.metric-del { flex: 0 0 auto; width: 34px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); cursor: pointer; font-size: 13px; }
.metric-del:hover { color: var(--red); border-color: var(--red); }
.btn-add-metric { background: transparent; border: 1px dashed var(--border); color: var(--text-secondary); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; width: 100%; margin-top: 2px; }
.btn-add-metric:hover { border-color: var(--blue); color: var(--blue); }

/* ===== 移动端适配（手机钉钉工作台） ===== */
.hamburger-btn { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 768px) {
  /* 汉堡菜单 + 侧边栏抽屉（覆盖 900px 的 display:none） */
  .hamburger-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-primary); font-size: 18px;
    cursor: pointer; margin-right: 10px; flex-shrink: 0;
  }
  .sidebar {
    display: flex; position: fixed; top: 0; left: 0; bottom: 0; z-index: 1200;
    width: 250px; max-width: 82vw; transform: translateX(-100%);
    transition: transform 0.25s ease; box-shadow: 0 0 30px rgba(0,0,0,0.5);
  }
  .app.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 1100; opacity: 0; pointer-events: none; transition: opacity 0.25s;
  }
  .app.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

  /* 顶栏换行 */
  .topbar { flex-wrap: wrap; padding: 12px 14px; gap: 10px; }
  .topbar-left { flex: 1; min-width: 0; display: flex; align-items: center; }
  .topbar-left h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .topbar-right .clock { display: none; }
  .search-box { order: 5; width: 100%; flex: 1 1 100%; }
  .search-box input { width: 100% !important; }
  .search-box input:focus { width: 100% !important; }
  .topbar-right .btn, .topbar-right .btn-new-task { flex: 1 1 auto; justify-content: center; padding: 11px 12px; font-size: 13px; }

  /* 统计 + 团队堆叠 */
  .stats-row { flex-direction: column; padding: 12px 14px 6px; gap: 10px; }
  .stat-card { width: 100%; }
  .team-row { flex-direction: column; padding: 0 14px 8px; gap: 8px; }
  .team-chip { width: 100%; }

  /* 看板：状态列竖向堆叠，全宽 */
  .board-layout { flex-direction: column; overflow-y: auto; }
  .board { flex-direction: column; overflow-x: hidden; overflow-y: visible; padding: 10px 14px 16px; gap: 12px; }
  .board-column { min-width: 0; width: 100%; max-height: none; }
  .column-cards { max-height: none; }
  .activity-panel { display: none; }

  /* 弹窗：底部抽屉风 */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box {
    width: 100%; max-width: 100%; margin: 0; border-radius: 16px 16px 0 0;
    max-height: 92vh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  }
  .modal-actions { position: sticky; bottom: 0; }

  /* 执行数据看板 */
  .records-view { padding: 12px 14px 20px; }
  .records-board { grid-template-columns: 1fr; }
  .summary-overview { gap: 10px; }
  .sum-ov-card { flex: 1; min-width: 0; padding: 12px 14px; }
  .records-toolbar { flex-direction: column; align-items: stretch; }
  .records-filters { width: 100%; }
  .rf-item { flex: 1 1 auto; }
  .rf-item input, .rf-item select { width: 100%; }
  .records-toolbar > .btn-primary { width: 100%; }
  .modal-field-row { flex-direction: column; gap: 0; }

  /* BP 列表 */
  .bp-list-view { padding: 14px; }
  .bp-task-card { padding: 14px; }
  .bp-card-footer { flex-wrap: wrap; gap: 8px; }
  .bp-card-actions { width: 100%; display: flex; gap: 8px; }
  .bp-card-actions button { flex: 1; }

  /* 设置页 */
  .dt-config { padding: 14px; }
  .dt-actions { flex-direction: column; }
  .dt-actions .dt-btn { width: 100%; }
  .dt-phone-row { flex-wrap: wrap; }
  .dt-phone-row .name { width: auto; }
  .dt-phone-row .wh { width: auto; }
}

@media (max-width: 480px) {
  .login-box { padding: 28px 20px; }
  .topbar-left h1 { font-size: 15px; }
  .task-card .task-bottom { flex-wrap: wrap; gap: 6px; }
  .stat-card .stat-info .stat-value { font-size: 20px; }
  .topbar-right .btn, .topbar-right .btn-new-task { font-size: 12px; padding: 10px 8px; }
}
