/* 仁泽工作流 — 样式（对齐原 WordPress 插件看板风格） */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,"Microsoft YaHei",sans-serif; background:#f0f4f8; color:#333; }
.hidden { display:none !important; }

/* ===== 登录 ===== */
.login-view { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#4361ee,#3a0ca3); }
.login-box { background:#fff; padding:40px 50px; border-radius:12px; box-shadow:0 10px 40px rgba(0,0,0,.2); width:360px; text-align:center; }
.login-box h1 { font-size:24px; color:#333; }
.login-box .sub { color:#888; margin:6px 0 24px; }
.login-box input { width:100%; padding:12px; margin-bottom:12px; border:1px solid #ddd; border-radius:6px; font-size:14px; }
.login-box button { width:100%; padding:12px; background:#4361ee; color:#fff; border:none; border-radius:6px; font-size:15px; cursor:pointer; }
.login-box button:hover { background:#3a56d4; }
.err { color:#e63946; font-size:13px; margin-top:10px; min-height:18px; }

/* ===== 顶栏 ===== */
.topbar { background:#fff; display:flex; align-items:center; padding:0 20px; height:54px; box-shadow:0 1px 4px rgba(0,0,0,.08); position:sticky; top:0; z-index:50; flex-shrink:0; }
.topbar .brand { font-weight:700; color:#4361ee; font-size:17px; margin-right:28px; white-space:nowrap; }
.topbar .brand i { margin-right:6px; }
.top-actions { display:flex; gap:8px; }
.clock { color:#999; font-size:13px; font-variant-numeric:tabular-nums; }
.user-box { margin-left:auto; display:flex; align-items:center; gap:12px; }
.user-box #user-name { color:#555; font-size:14px; }
.logout { padding:6px 12px; border:1px solid #ddd; background:#fff; border-radius:6px; cursor:pointer; font-size:13px; color:#666; }

/* ===== 三栏外壳 ===== */
.app-shell { display:flex; flex-direction:column; height:100vh; overflow:hidden; }
.shell-body { display:flex; flex:1; min-height:0; }

/* 左侧导航 */
.sidebar-nav { width:200px; min-width:200px; background:#1e293b; color:#cbd5e1; display:flex; flex-direction:column; padding:12px 0; }
.sidebar-nav nav { display:flex; flex-direction:column; gap:4px; padding:0 8px; }
.sidebar-nav .nav-btn { display:flex; align-items:center; gap:10px; padding:11px 14px; border:none; background:transparent; color:#cbd5e1; font-size:14px; cursor:pointer; border-radius:8px; text-align:left; transition:background .15s,color .15s; }
.sidebar-nav .nav-btn i { width:18px; text-align:center; }
.sidebar-nav .nav-btn:hover { background:#334155; color:#fff; }
.sidebar-nav .nav-btn.active { background:#4361ee; color:#fff; }

/* 内容区（可滚动） */
.content { flex:1; min-width:0; overflow-y:auto; background:#f0f4f8; }
.content > .view { padding:16px; max-width:1500px; margin:0 auto; }
.view { display:none; }
.view.active { display:block; }

/* ===== 统计卡片 ===== */
.stat-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; margin-bottom:20px; }
.stat-card { background:#fff; border-radius:10px; padding:18px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.stat-card .num { font-size:30px; font-weight:700; }
.stat-card .label { color:#888; font-size:13px; margin-top:4px; }
.stat-card.blue .num{color:#4361ee} .stat-card.green .num{color:#2d6a4f}
.stat-card.orange .num{color:#f59e0b} .stat-card.red .num{color:#e63946}

.panel { background:#fff; border-radius:10px; padding:20px; box-shadow:0 1px 3px rgba(0,0,0,.06); margin-bottom:20px; }
.panel h2 { font-size:16px; margin-bottom:14px; color:#333; }
.panel h2 i { margin-right:6px; color:#4361ee; }

/* ============================================
   客户看板（对齐原插件）
   ============================================ */
#rzwf-dashboard-root { display:flex; height:calc(100vh - 86px); overflow:hidden; background:#f0f4f8; border-radius:10px; box-shadow:0 1px 4px rgba(0,0,0,.08); }
#view-tracker { padding:0; max-width:none; height:calc(100vh - 54px); }
#view-todos { padding:0; max-width:none; height:calc(100vh - 54px); }

/* 左侧栏 */
.rzwf-sidebar { width:320px; min-width:320px; background:#fff; border-right:1px solid #e2e8f0; display:flex; flex-direction:column; overflow:hidden; }
.rzwf-sidebar-header { display:flex; justify-content:space-between; align-items:center; padding:16px 16px 8px; }
.rzwf-sidebar-header h2 { font-size:16px; margin:0; }
.rzwf-sidebar-search { padding:8px 16px; }
.rzwf-sidebar-search input { width:100%; padding:7px 10px; border:1px solid #d1d5db; border-radius:6px; font-size:13px; outline:none; }
.rzwf-sidebar-search input:focus { border-color:#4361ee; }
.rzwf-sidebar-list { flex:1; overflow-y:auto; padding:0 8px 8px; scrollbar-width:thin; scrollbar-color:#d1d5db transparent; }
.rzwf-sidebar-list::-webkit-scrollbar { width:4px; }
.rzwf-sidebar-list::-webkit-scrollbar-thumb { background:#d1d5db; border-radius:2px; }

.rzwf-si { display:flex; align-items:flex-start; gap:8px; padding:10px; border-radius:8px; cursor:pointer; transition:background .15s; margin-bottom:2px; }
.rzwf-si:hover { background:#f0f4ff; }
.rzwf-si.active { background:#eef2ff; }
.rzwf-si.active .rzwf-si-name { color:#4361ee; font-weight:600; }
.rzwf-si-avatar { width:36px; height:36px; border-radius:50%; background:#e8edf5; display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; color:#4361ee; }
.rzwf-si-info { flex:1; min-width:0; }
.rzwf-si-name { font-size:13px; color:#333; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rzwf-si-pct { font-size:11px; color:#888; font-weight:500; }
.rzwf-si-steps { display:flex; gap:3px; margin-top:4px; flex-wrap:wrap; }
.rzwf-si-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#e5e7eb; }
.rzwf-si-dot.done { background:#2d6a4f; }
.rzwf-si-dot.todo { background:#f59e0b; }

/* 右侧面板 */
.rzwf-main { flex:1; display:flex; flex-direction:column; overflow:hidden; background:#f8fafc; }

.rzwf-mp-header { display:flex; justify-content:space-between; align-items:flex-start; padding:16px 24px 8px; background:#fff; border-bottom:1px solid #e2e8f0; flex-shrink:0; }
.rzwf-mp-title { font-size:18px; margin:0; }
.rzwf-mp-meta { font-size:12px; color:#888; margin-top:2px; display:flex; gap:12px; flex-wrap:wrap; }

.rzwf-settings-wrap { display:flex; align-items:center; gap:8px; }

/* 顶部步骤栏（环形进度） */
.rzwf-step-bar { flex-shrink:0; padding:10px 24px 6px; background:#fff; border-bottom:1px solid #e2e8f0; overflow-x:auto; }
.rzwf-steps { display:flex; align-items:center; gap:6px; }
.rzwf-step-group { display:inline-flex; flex-direction:column; align-items:center; gap:2px; cursor:pointer; padding:4px 8px; border-radius:8px; transition:background .15s; }
.rzwf-step-group:hover { background:#eef2ff; }
.rzwf-step-group.active { background:#e0e7ff; }
.rzwf-step-group.active .rzwf-step-label { color:#4361ee; font-weight:600; }
.rzwf-ring { position:relative; width:38px; height:38px; display:flex; align-items:center; justify-content:center; }
.rzwf-ring svg { position:absolute; top:0; left:0; width:38px; height:38px; transform:rotate(-90deg); }
.rzwf-ring-bg { fill:none; stroke:#eee; stroke-width:3; }
.rzwf-ring-fg { fill:none; stroke-width:3; stroke-linecap:round; transition:stroke-dashoffset .35s,stroke .35s; }
.rzwf-ring.done .rzwf-ring-fg { stroke:#2d6a4f; }
.rzwf-ring.doing .rzwf-ring-fg { stroke:#f59e0b; }
.rzwf-ring.pending .rzwf-ring-fg { stroke:#d1d5db; }
.rzwf-ring-icon { position:relative; z-index:1; font-size:14px; width:38px; height:38px; display:flex; align-items:center; justify-content:center; border-radius:50%; }
.rzwf-ring.done .rzwf-ring-icon { color:#2d6a4f; }
.rzwf-ring.doing .rzwf-ring-icon { color:#f59e0b; }
.rzwf-ring.pending .rzwf-ring-icon { color:#bbb; }
.rzwf-step-group.active .rzwf-ring-icon { color:#4361ee; }
.rzwf-step-arrow { color:#ddd; font-size:14px; margin:0 2px; flex-shrink:0; }
.rzwf-step-label { font-size:10px; color:#999; white-space:nowrap; }

/* 标签页内容 */
.rzwf-tab-body { flex:1; overflow-y:auto; padding:8px 24px; }
.rzwf-tab-empty { display:flex; align-items:center; justify-content:center; height:100%; color:#999; font-size:13px; }
.rzwf-empty-state { text-align:center; padding:40px 20px; color:#aaa; }
.rzwf-empty-state .rzwf-ico { font-size:36px; margin-bottom:8px; }

.rzwf-tab-header { display:flex; align-items:center; gap:8px; font-size:15px; font-weight:600; color:#333; margin-bottom:8px; }
.rzwf-tab-ico { font-size:20px; width:24px; text-align:center; }
.rzwf-tab-count { font-size:11px; color:#888; font-weight:400; margin-left:auto; }

.rzwf-tab-group { font-size:12px; font-weight:600; color:#2d6a4f; padding:9px 10px 4px; margin-top:4px; border-top:1px dashed #e3e9e4; }
.rzwf-tab-group:first-child { border-top:none; margin-top:0; }

.rzwf-tab-item { display:flex; align-items:center; gap:10px; padding:7px 10px; font-size:13px; cursor:pointer; border-bottom:1px solid #f0f0f0; border-radius:6px; transition:background .15s; }
.rzwf-tab-item:hover { background:#f5f7fa; }
.rzwf-tab-item input[type="checkbox"] { width:16px; height:16px; accent-color:#2d6a4f; cursor:pointer; flex-shrink:0; }
.rzwf-tab-item .rzwf-tab-label { flex:1; line-height:1.4; }
.rzwf-tab-item.done .rzwf-tab-label { color:#999; text-decoration:line-through; }

/* 底部 */
.rzwf-mp-footer { display:flex; justify-content:space-between; align-items:center; padding:6px 24px 10px; background:#fff; border-top:1px solid #e2e8f0; flex-shrink:0; gap:12px; }
.rzwf-note-area { flex:1; font-size:12px; color:#888; display:flex; align-items:center; gap:4px; padding:4px 8px; border-radius:4px; background:#fafafa; border:1px dashed #ddd; min-height:28px; }
.rzwf-note-area:focus-within { background:#f0f4ff; border-color:#4361ee; }
.rzwf-note-text { flex:1; outline:none; min-width:0; word-break:break-word; }
.rzwf-note-text:empty::before { content:attr(data-ph); color:#ccc; }
.rzwf-footer-info { display:flex; gap:16px; font-size:12px; color:#888; white-space:nowrap; }

/* ===== 按钮 ===== */
.rzwf-btn { display:inline-flex; align-items:center; gap:4px; padding:7px 14px; border:none; border-radius:6px; cursor:pointer; font-size:13px; text-decoration:none; }
.rzwf-btn i { font-size:12px; }
.rzwf-btn-primary { background:#4361ee; color:#fff; }
.rzwf-btn-primary:hover { background:#3a56d4; color:#fff; }
.rzwf-btn-outline { background:#fff; color:#4361ee; border:1px solid #4361ee; }
.rzwf-btn-outline:hover { background:#eef2ff; }
.rzwf-btn-sm { padding:5px 10px; font-size:12px; }
.rzwf-btn-green { background:#e8f5e9; border:1px solid #b7e1c3; color:#2d6a4f; }
.rzwf-btn-green:hover { background:#d5efdc; border-color:#86cf9c; }
.rzwf-btn-danger { background:#fff; color:#e63946; border:1px solid #f5c2c2; }
.rzwf-btn-danger:hover { background:#fce4e4; }
.rzwf-btn-ghost { background:#fff; border:1px solid #d1d5db; color:#666; }
.rzwf-btn-ghost:hover { background:#f0f4ff; border-color:#4361ee; color:#4361ee; }

/* ===== 弹窗 ===== */
.modal { position:fixed; inset:0; background:rgba(0,0,0,.4); display:flex; align-items:center; justify-content:center; z-index:100; }
.modal-box { background:#fff; border-radius:12px; padding:24px; width:480px; max-width:92%; max-height:90vh; overflow-y:auto; }
.modal-box h3 { font-size:17px; margin:0 0 16px; }
.modal-box label { display:block; font-size:12px; color:#555; margin:10px 0 4px; font-weight:600; }
.modal-box input, .modal-box select, .modal-box textarea { width:100%; padding:8px 10px; border:1px solid #d1d5db; border-radius:6px; font-size:13px; }
.modal-box textarea { resize:vertical; }
.modal-box .actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }

/* 模块多选网格 */
.module-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:4px; }
.module-opt { display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px solid #d1d5db; border-radius:8px; font-size:13px; color:#555; background:#fafbfc; cursor:pointer; }
.module-opt input { width:16px; height:16px; accent-color:#4361ee; cursor:pointer; }
.module-opt input:disabled { opacity:.5; cursor:not-allowed; }
.module-opt .module-fixed { font-size:10px; color:#e63946; background:#fce4e4; padding:1px 6px; border-radius:8px; margin-left:auto; font-style:normal; }
.module-opt:has(input:checked) { border-color:#4361ee; background:#eef2ff; color:#4361ee; font-weight:600; }

/* ===== 待办页面：顶部 tab + Grid 卡片 ===== */
.todos-pane { display:flex; flex-direction:column; height:calc(100vh - 54px); background:#fff; border-radius:10px; box-shadow:0 1px 4px rgba(0,0,0,.08); overflow:hidden; }
.todos-tabs { display:flex; gap:4px; padding:12px 16px 0; background:#fff; border-bottom:1px solid #eef0f4; flex-wrap:wrap; }
.todo-tab { padding:9px 16px; border:none; background:transparent; border-radius:8px 8px 0 0; cursor:pointer; font-size:13px; color:#666; display:flex; align-items:center; gap:6px; border-bottom:2px solid transparent; margin-bottom:-1px; }
.todo-tab i { width:16px; text-align:center; }
.todo-tab:hover { color:#4361ee; background:#f5f7ff; }
.todo-tab.active { color:#4361ee; font-weight:600; border-bottom-color:#4361ee; background:#eef2ff; }
.todos-grid { flex:1; overflow-y:auto; padding:16px; display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:14px; align-content:start; }
.todo-card { background:#fff; border:1px solid #e6e9f0; border-radius:12px; padding:14px; box-shadow:0 1px 3px rgba(0,0,0,.05); display:flex; flex-direction:column; gap:8px; transition:box-shadow .15s; }
.todo-card:hover { box-shadow:0 4px 14px rgba(67,97,238,.12); border-color:#c7d2fe; }
.todo-card-head { display:flex; justify-content:space-between; align-items:center; }
.todo-src { font-size:11px; color:#999; background:#f4f6fb; padding:2px 8px; border-radius:10px; }
.todo-card-title { font-size:14px; font-weight:600; color:#222; line-height:1.4; }
.todo-card-note { font-size:12px; color:#888; background:#fafbfd; border-radius:8px; padding:8px 10px; line-height:1.5; }
.todo-card-client { font-size:12px; color:#666; display:flex; align-items:center; gap:6px; }
.todo-card-client i { color:#4361ee; }
.todo-card-defer { font-size:12px; color:#b45309; background:#fef3c7; padding:4px 8px; border-radius:6px; width:fit-content; }
.todo-card-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
.todo-empty { grid-column:1/-1; text-align:center; padding:60px 0; color:#aaa; }
.todo-empty i { font-size:40px; margin-bottom:10px; }
.defer-task { font-size:13px; color:#555; background:#f4f6fb; padding:10px; border-radius:8px; margin:0 0 12px; }

/* ===== 系统设置：菜单管理 ===== */
.settings-tip { font-size:12px; color:#888; background:#f4f6fb; padding:10px 12px; border-radius:8px; margin:-6px 0 14px; line-height:1.6; }
.settings-tip i { color:#4361ee; margin-right:4px; }
.fixed-badge { font-size:10px; color:#4361ee; background:#eef2ff; padding:1px 6px; border-radius:8px; font-style:normal; }
.placeholder-panel { text-align:center; padding:60px 20px; }
.placeholder-tip { color:#999; font-size:14px; margin-top:10px; }
.placeholder-tip i { color:#4361ee; }

/* ===== 待办页面 ===== */
.todos-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.filter select { padding:8px; border:1px solid #d1d5db; border-radius:6px; font-size:13px; }
.table { width:100%; border-collapse:collapse; font-size:13px; }
.table th { text-align:left; padding:10px 12px; background:#f8f9ff; color:#555; border-bottom:2px solid #eee; }
.table td { padding:10px 12px; border-bottom:1px solid #f0f0f0; vertical-align:middle; }
.table tr:hover td { background:#fafbff; }
.tag { padding:3px 10px; border-radius:12px; font-size:12px; }
.tag.open{background:#e8f0fe;color:#4361ee} .tag.done{background:#e6f4ea;color:#2d6a4f}
.tag.deferred{background:#fff3cd;color:#8a6d00} .tag.cancelled{background:#eee;color:#888}

/* ===== Toast ===== */
.toast { position:fixed; top:16px; right:16px; background:#333; color:#fff; padding:10px 16px; border-radius:6px; font-size:13px; box-shadow:0 3px 10px rgba(0,0,0,.2); z-index:200; transition:all .25s; }
.toast.error { background:#e63946; }

/* ===== 响应式 ===== */
@media(max-width:900px) {
    .sidebar-nav { width:64px; min-width:64px; }
    .sidebar-nav .nav-btn span { display:none; }
    .sidebar-nav .nav-btn { justify-content:center; }
    #rzwf-dashboard-root { flex-direction:column; height:auto; }
    .rzwf-sidebar { width:100%; min-width:100%; max-height:40vh; border-right:none; border-bottom:1px solid #e2e8f0; }
    .rzwf-main { min-height:60vh; }
}
