*{margin:0;padding:0;box-sizing:border-box}

/* ===== 子Tab样式 ===== */
.sub-tab-btn{background:#0a0a0a;color:#71717a;border:1px solid #27272a;cursor:pointer;transition:all .2s;font-size:13px}
.sub-tab-btn:hover{background:#18181b;color:#a1a1aa}
.sub-tab-btn.active{background:linear-gradient(180deg,#18181b 0%,#141416 100%);color:#fafafa;border-color:#3f3f46;border-bottom:2px solid #22c55e}

/* ===== 全局滚动条 ===== */
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#27272a;border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:#3f3f46}

body{
  font-family:-apple-system,'SF Pro Text','PingFang SC',sans-serif;
  background:#09090b;color:#fafafa;
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
  background-image:radial-gradient(ellipse at 20% 0%,rgba(34,197,94,.03) 0%,transparent 50%),
                   radial-gradient(ellipse at 80% 100%,rgba(59,130,246,.02) 0%,transparent 50%);
}

/* Layout */
.wrap{max-width:1440px;margin:0 auto;padding:24px 32px}

/* Header */
.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px;padding-bottom:16px;border-bottom:1px solid transparent;border-image:linear-gradient(90deg,transparent,#27272a 20%,#27272a 80%,transparent) 1}
.header-left{display:flex;align-items:center;gap:16px}
.title{font-size:18px;font-weight:700;letter-spacing:-.5px}
.title-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;display:inline-block;margin-right:6px;animation:pulse 2s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
.header-right{display:flex;align-items:center;gap:24px}
.clock{font-size:13px;color:#71717a;font-variant-numeric:tabular-nums;font-family:'SF Mono',Menlo,monospace}
.agent-count{font-size:12px;color:#a1a1aa;background:#18181b;padding:5px 12px;border-radius:6px;border:1px solid #27272a}

/* Main Grid */
.main-grid{display:grid;grid-template-columns:340px 1fr 360px;gap:16px;margin-bottom:16px}

/* Cards */
.card{background:linear-gradient(180deg,#141416 0%,#111113 100%);border:1px solid #1f1f23;border-radius:12px;padding:18px 22px;box-shadow:0 1px 3px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.12);transition:all .3s}
.card:hover{box-shadow:0 1px 3px rgba(0,0,0,.3),0 12px 32px rgba(0,0,0,.18);border-color:#2a2a2e}

/* ========== 利润区 ========== */
.profit-card{grid-column:1;grid-row:1}
.profit-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.profit-label{font-size:11px;color:#71717a;font-weight:500;text-transform:uppercase;letter-spacing:1px}
.profit-switcher{display:flex;gap:2px;background:#0a0a0a;border-radius:6px;padding:2px}
.profit-switcher button{padding:4px 10px;border:none;background:transparent;color:#52525b;font-size:10px;font-weight:600;border-radius:4px;cursor:pointer;font-family:inherit;transition:all .15s}
.profit-switcher button.active{background:#27272a;color:#fafafa}
.profit-switcher button:hover:not(.active){color:#a1a1aa}
.profit-value{font-size:56px;font-weight:800;color:#22c55e;letter-spacing:-3px;line-height:1;margin-bottom:8px;text-shadow:0 0 40px rgba(34,197,94,.15),0 0 80px rgba(34,197,94,.05)}
.profit-change{font-size:13px;color:#a1a1aa;margin-bottom:16px}
.profit-change .up{color:#22c55e;font-weight:600}
.profit-change .down{color:#ef4444;font-weight:600}

/* 迷你趋势图 */
.sparkline-wrap{margin-bottom:16px;padding:12px;background:#0a0a0a;border-radius:8px}
.sparkline-label{font-size:9px;color:#3f3f46;margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}
.sparkline{width:100%;height:40px}

/* 利润构成 */
.profit-breakdown{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
.profit-item{text-align:center;padding:8px;background:#0a0a0a;border-radius:6px}
.profit-item-label{font-size:8px;color:#3f3f46;text-transform:uppercase;letter-spacing:.3px;margin-bottom:3px}
.profit-item-value{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}
.profit-item-sub{font-size:8px;color:#52525b;margin-top:2px}

.kpi-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.kpi{text-align:center;padding:10px;background:#0a0a0a;border-radius:8px}
.kpi-val{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.kpi-lbl{font-size:9px;color:#52525b;margin-top:2px;text-transform:uppercase;letter-spacing:.5px}
.kpi-trend{font-size:8px;color:#3f3f46;margin-top:2px;line-height:1.3}
.quick-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #1a1a1a}
.quick-stat{text-align:center}
.quick-stat-label{font-size:8px;color:#52525b;text-transform:uppercase;letter-spacing:.3px;margin-bottom:2px}
.quick-stat-value{font-size:12px;color:#a1a1aa;font-weight:600}

/* ========== 决策区 ========== */
.decisions-card{grid-column:2;grid-row:1;overflow-y:auto;max-height:calc(100vh - 180px)}
.section-title{font-size:11px;font-weight:600;color:#71717a;text-transform:uppercase;letter-spacing:1.2px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;border-bottom:1px solid #18181b}
.badge{font-size:9px;font-weight:700;padding:4px 10px;border-radius:20px;letter-spacing:.3px}
.badge-red{background:rgba(220,38,38,.12);color:#f87171;border:1px solid rgba(220,38,38,.2)}
.badge-green{background:rgba(34,197,94,.1);color:#4ade80;border:1px solid rgba(34,197,94,.15)}
.badge-blue{background:rgba(59,130,246,.1);color:#60a5fa;border:1px solid rgba(59,130,246,.15)}

.decision{background:#161618;border-radius:10px;padding:14px 16px;margin-bottom:10px;transition:all .25s;cursor:pointer;position:relative;border:1px solid #1f1f23;border-left:3px solid #27272a}
.decision:hover{background:#1a1a1d;transform:translateX(3px);box-shadow:0 4px 16px rgba(0,0,0,.2);border-color:#2a2a2e}
.decision.urgent{border-left-color:#ef4444}
.decision.warn{border-left-color:#f59e0b}
.decision.info{border-left-color:#3b82f6}
.decision.done{opacity:.25;pointer-events:none;border-left-color:#3f3f46}

/* 决策头部增强 */
.dec-top{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:4px}
.dec-head{font-size:12px;font-weight:600;line-height:1.4;flex:1}
.dec-confidence{font-size:9px;font-weight:700;padding:2px 6px;border-radius:4px;white-space:nowrap;margin-left:8px}
.dec-confidence.high{background:rgba(34,197,94,.15);color:#22c55e}
.dec-confidence.mid{background:rgba(245,158,11,.15);color:#f59e0b}
.dec-desc{font-size:10px;color:#a1a1aa;line-height:1.5;margin-bottom:6px}
.dec-meta{font-size:9px;color:#52525b;margin-bottom:8px;font-family:'SF Mono',monospace;opacity:.8}

/* 决策影响金额 */
.dec-impact{display:inline-flex;align-items:center;gap:4px;font-size:9px;font-weight:700;padding:2px 8px;border-radius:4px;margin-bottom:8px}
.dec-impact.loss{background:rgba(220,38,38,.1);color:#ef4444}
.dec-impact.gain{background:rgba(34,197,94,.1);color:#22c55e}
.dec-impact.cost{background:rgba(245,158,11,.1);color:#f59e0b}

/* AI推荐按钮 */
.dec-btns{display:flex;gap:6px}
.btn{padding:7px 16px;border-radius:8px;border:none;font-size:11px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s;position:relative}
.btn:hover{transform:translateY(-1px);filter:brightness(1.1)}
.btn:active{transform:scale(.96)}
.btn-ok{background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;box-shadow:0 2px 8px rgba(34,197,94,.25)}
.btn-no{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;box-shadow:0 2px 8px rgba(239,68,68,.2)}
.btn-skip{background:#1a1a1a;color:#71717a;border:1px solid #27272a}
.btn-recommended{box-shadow:0 0 0 2px rgba(34,197,94,.4);position:relative}
.btn-recommended::after{content:'AI推荐';position:absolute;top:-8px;right:-4px;font-size:7px;background:#22c55e;color:#000;padding:1px 4px;border-radius:3px;font-weight:700}

/* 决策超时 */
.dec-timeout{font-size:8px;color:#ef4444;font-weight:600;position:absolute;top:12px;right:14px;display:flex;align-items:center;gap:3px}
.dec-timeout::before{content:'';width:4px;height:4px;border-radius:50%;background:#ef4444;animation:pulse 1s infinite}

/* ========== 智能体区 ========== */
.agents-card{grid-column:3;grid-row:1;overflow-y:auto;max-height:calc(100vh - 180px)}

/* 智能体筛选 */
.agent-filters{display:flex;gap:4px;margin-bottom:12px}
.agent-filter{padding:4px 10px;border:none;background:#0a0a0a;color:#52525b;font-size:9px;font-weight:600;border-radius:5px;cursor:pointer;font-family:inherit;transition:all .15s}
.agent-filter.active{background:#27272a;color:#fafafa}
.agent-filter:hover:not(.active){color:#a1a1aa}
.agent-filter .count{margin-left:3px;opacity:.6}

.agents-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
.agent{background:#161618;border-radius:8px;padding:10px 12px;border:1px solid #1f1f23;transition:all .2s;cursor:pointer}
.agent:hover{background:#1c1c1f;border-color:#2a2a2e;box-shadow:0 4px 12px rgba(0,0,0,.2);transform:translateY(-1px)}
.agent.err{border-color:rgba(220,38,38,.4);background:rgba(220,38,38,.04)}
.agent.warn{border-color:rgba(245,158,11,.3);background:rgba(245,158,11,.03)}
.agent-top{display:flex;align-items:center;gap:6px;margin-bottom:3px}
.agent-icon{font-size:13px}
.agent-name{font-size:10px;font-weight:600;flex:1}
.agent-mood{font-size:14px;flex-shrink:0;line-height:1}
.agent-dot{display:none}
.agent-task{font-size:9px;color:#52525b;line-height:1.4;margin-bottom:2px}
.agent-stats{font-size:8px;color:#3f3f46;line-height:1.3;opacity:.9}

/* Agent展开详情 */
.agent-detail{display:none;margin-top:6px;padding-top:6px;border-top:1px solid #27272a}
.agent-detail.show{display:block}
.agent-detail-row{display:flex;justify-content:space-between;font-size:8px;color:#3f3f46;margin-bottom:2px}
.agent-detail-row .label{color:#52525b}

/* ========== 智能体对话抽屉 ========== */
.chat-drawer{position:fixed;top:0;right:-500px;width:480px;height:100vh;background:#0f0f0f;border-left:1px solid #1a1a1a;z-index:1000;transition:right .3s ease;display:flex;flex-direction:column;box-shadow:-10px 0 40px rgba(0,0,0,.5)}
.chat-drawer.open{right:0}
.chat-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6);z-index:999;opacity:0;pointer-events:none;transition:opacity .3s}
.chat-overlay.show{opacity:1;pointer-events:auto}

/* 对话头部 */
.chat-header{padding:20px 24px;border-bottom:1px solid #1a1a1a;display:flex;align-items:center;gap:12px}
.chat-close{width:32px;height:32px;border:none;background:#18181b;color:#a1a1aa;border-radius:6px;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;transition:all .15s}
.chat-close:hover{background:#27272a;color:#fafafa}
.chat-agent-info{flex:1}
.chat-agent-name{font-size:16px;font-weight:600;margin-bottom:2px}
.chat-agent-status{font-size:11px;color:#52525b;display:flex;align-items:center;gap:6px}
.chat-agent-status::before{content:'';width:6px;height:6px;border-radius:50%;background:#22c55e}
.chat-agent-status.err::before{background:#ef4444}
.chat-agent-status.warn::before{background:#f59e0b}

/* 对话消息区 */
.chat-messages{flex:1;overflow-y:auto;padding:20px 24px;display:flex;flex-direction:column;gap:16px}
.chat-msg{max-width:85%;animation:msgIn .3s ease}
@keyframes msgIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.chat-msg.agent{align-self:flex-start}
.chat-msg.user{align-self:flex-end}
.chat-msg-bubble{padding:12px 16px;border-radius:12px;font-size:13px;line-height:1.6}
.chat-msg.agent .chat-msg-bubble{background:#18181b;border:1px solid #27272a;color:#fafafa;border-top-left-radius:4px}
.chat-msg.user .chat-msg-bubble{background:#22c55e;color:#000;border-top-right-radius:4px;font-weight:500}
.chat-msg-time{font-size:9px;color:#52525b;margin-top:4px;padding:0 4px}
.chat-msg.agent .chat-msg-time{text-align:left}
.chat-msg.user .chat-msg-time{text-align:right}

/* 快捷操作 */
.chat-quick-actions{padding:12px 24px;border-top:1px solid #1a1a1a;display:flex;gap:8px;flex-wrap:wrap}
.chat-quick-btn{padding:8px 14px;background:#18181b;border:1px solid #27272a;color:#a1a1aa;border-radius:6px;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s;white-space:nowrap}
.chat-quick-btn:hover{background:#27272a;color:#fafafa;border-color:#3f3f46}

/* 输入区 */
.chat-input-area{padding:16px 24px;border-top:1px solid #1a1a1a;background:#0a0a0a}
.chat-input-wrap{display:flex;gap:8px;align-items:flex-end}
.chat-input{flex:1;background:#18181b;border:1px solid #27272a;border-radius:8px;padding:12px 16px;color:#fafafa;font-size:13px;font-family:inherit;resize:none;min-height:44px;max-height:120px;transition:border-color .15s}
.chat-input:focus{outline:none;border-color:#3f3f46}
.chat-input::placeholder{color:#52525b}
.chat-send{width:44px;height:44px;background:#22c55e;border:none;border-radius:8px;color:#000;font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;flex-shrink:0}
.chat-send:hover{background:#16a34a;transform:scale(1.05)}
.chat-send:active{transform:scale(.95)}
.chat-send:disabled{background:#27272a;color:#52525b;cursor:not-allowed;transform:none}

/* ========== 项目详情抽屉 ========== */
.proj-drawer{position:fixed;top:0;right:-600px;width:580px;height:100vh;background:#0f0f0f;border-left:1px solid #1a1a1a;z-index:1000;transition:right .3s ease;display:flex;flex-direction:column;box-shadow:-10px 0 40px rgba(0,0,0,.5);overflow:hidden}
.proj-drawer.open{right:0}
.proj-drawer-header{padding:20px 24px;border-bottom:1px solid #1a1a1a;display:flex;align-items:center;gap:12px;flex-shrink:0}
.proj-drawer-close{width:32px;height:32px;border:none;background:#18181b;color:#a1a1aa;border-radius:6px;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;transition:all .15s}
.proj-drawer-close:hover{background:#27272a;color:#fafafa}
.proj-drawer-title{flex:1}
.proj-drawer-title h3{font-size:16px;font-weight:600;margin-bottom:2px}
.proj-drawer-title .tag{font-size:9px;font-weight:600;padding:2px 8px;border-radius:4px;margin-left:8px}
.proj-drawer-body{flex:1;overflow-y:auto;padding:20px 24px}
.proj-section{margin-bottom:20px}
.proj-section-title{font-size:11px;font-weight:600;color:#52525b;text-transform:uppercase;letter-spacing:1px;margin-bottom:10px;padding-bottom:6px;border-bottom:1px solid #1a1a1a}
.proj-kpi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.proj-kpi-card{background:#18181b;border-radius:8px;padding:12px;text-align:center}
.proj-kpi-card .val{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.proj-kpi-card .label{font-size:9px;color:#52525b;margin-top:4px;text-transform:uppercase}
.proj-agent-list{display:flex;flex-direction:column;gap:6px}
.proj-agent-item{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#18181b;border-radius:6px}
.proj-agent-item .icon{font-size:16px}
.proj-agent-item .name{font-size:11px;font-weight:500;flex:1}
.proj-agent-item .task{font-size:9px;color:#71717a}
.proj-agent-item .dot{width:6px;height:6px;border-radius:50%;background:#22c55e;flex-shrink:0}
.proj-agent-item .dot.warn{background:#f59e0b}
.proj-agent-item .dot.err{background:#ef4444}
.proj-timeline{display:flex;flex-direction:column;gap:0}
.proj-timeline-item{display:flex;align-items:flex-start;gap:10px;padding:8px 0;position:relative}
.proj-timeline-item::before{content:'';position:absolute;left:8px;top:22px;bottom:-8px;width:1px;background:#27272a}
.proj-timeline-item:last-child::before{display:none}
.proj-timeline-item .dot{width:8px;height:8px;border-radius:50%;background:#27272a;margin-top:4px;flex-shrink:0;z-index:1;position:relative;left:4px}
.proj-timeline-item .dot.done{background:#22c55e}
.proj-timeline-item .dot.active{background:#3b82f6;box-shadow:0 0 6px rgba(59,130,246,.5)}
.proj-timeline-item .dot.pending{background:#3f3f46}
.proj-timeline-item .content{flex:1}
.proj-timeline-item .content .title{font-size:11px;font-weight:500}
.proj-timeline-item .content .meta{font-size:9px;color:#52525b;margin-top:2px}
.proj-risk-list{display:flex;flex-direction:column;gap:6px}
.proj-risk-item{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#18181b;border-radius:6px;border-left:3px solid #ef4444}
.proj-risk-item.warn{border-left-color:#f59e0b}
.proj-risk-item .icon{font-size:14px}
.proj-risk-item .info{flex:1}
.proj-risk-item .info .title{font-size:11px;font-weight:500}
.proj-risk-item .info .desc{font-size:9px;color:#71717a;margin-top:2px}
.proj-risk-item .action{font-size:9px;padding:4px 10px;border-radius:4px;background:#18181b;border:1px solid #27272a;color:#a1a1aa;cursor:pointer;transition:all .15s}
.proj-risk-item .action:hover{background:#27272a;color:#fafafa}

/* ========== 项目矩阵 ========== */
.bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.projects-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.proj{background:#18181b;border-radius:8px;padding:12px 14px;border-left:3px solid #27272a;cursor:pointer;transition:all .15s;position:relative}
.proj{background:#18181b;border-radius:8px;padding:12px 14px;border:1px solid #1f1f23;border-left:3px solid #27272a;cursor:pointer;transition:all .2s;position:relative}
.proj:hover{background:#1c1c1f;transform:translateY(-2px);box-shadow:0 6px 20px rgba(0,0,0,.25);border-color:#2a2a2e}
.proj.active{background:#1f1f1f;border-left-width:4px}
.proj.star{border-left-color:#22c55e}
.proj.cow{border-left-color:#f59e0b}
.proj.q{border-left-color:#3b82f6}
.proj.dog{border-left-color:#ef4444;opacity:.85}
.proj-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.proj-name{font-size:12px;font-weight:600;display:flex;align-items:center;gap:6px}
.proj-tag{font-size:9px;font-weight:600;padding:2px 6px;border-radius:4px}
.proj-tag.star{background:rgba(34,197,94,.12);color:#22c55e}
.proj-tag.cow{background:rgba(245,158,11,.12);color:#f59e0b}
.proj-tag.q{background:rgba(59,130,246,.12);color:#3b82f6}
.proj-tag.dog{background:rgba(220,38,38,.12);color:#ef4444}
.proj-stats{font-size:10px;color:#71717a;margin-bottom:6px;line-height:1.5}
.proj-stats strong{color:#a1a1aa;font-weight:600}

/* 项目目标进度条 */
.proj-goal{margin-bottom:8px}
.proj-goal-header{display:flex;justify-content:space-between;font-size:8px;color:#52525b;margin-bottom:3px}
.proj-goal-bar{height:4px;background:#0a0a0a;border-radius:2px;overflow:hidden}
.proj-goal-fill{height:100%;border-radius:2px;transition:width .5s ease}
.proj-goal-fill.star{background:linear-gradient(90deg,#22c55e,#4ade80)}
.proj-goal-fill.cow{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.proj-goal-fill.q{background:linear-gradient(90deg,#3b82f6,#60a5fa)}
.proj-goal-fill.dog{background:linear-gradient(90deg,#ef4444,#f87171)}

/* 项目风险预警 */
.proj-risk{font-size:8px;font-weight:600;padding:3px 8px;border-radius:4px;display:inline-flex;align-items:center;gap:4px;margin-bottom:6px}
.proj-risk.safe{background:rgba(34,197,94,.08);color:#22c55e}
.proj-risk.warning{background:rgba(245,158,11,.08);color:#f59e0b}
.proj-risk.danger{background:rgba(220,38,38,.08);color:#ef4444}
.proj-risk::before{content:'';width:4px;height:4px;border-radius:50%}
.proj-risk.safe::before{background:#22c55e}
.proj-risk.warning::before{background:#f59e0b;animation:pulse 1.5s infinite}
.proj-risk.danger::before{background:#ef4444;animation:pulse 1s infinite}

/* 项目经营状况 */
.proj-status-line{display:flex;align-items:center;gap:6px;margin-bottom:10px}
.proj-status-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.proj-status-dot.ok{background:#22c55e;box-shadow:0 0 6px rgba(34,197,94,.4)}
.proj-status-dot.warn{background:#f59e0b;box-shadow:0 0 6px rgba(245,158,11,.4);animation:pulse 1.5s infinite}
.proj-status-dot.err{background:#ef4444;box-shadow:0 0 6px rgba(220,38,38,.4);animation:pulse 1s infinite}
.proj-status-text{font-size:10px;color:#a1a1aa;line-height:1.4}
.proj-biz-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-bottom:8px}
.proj-biz-item{text-align:center;padding:6px 2px;background:#0a0a0a;border-radius:4px}
.proj-biz-val{font-size:11px;font-weight:600;font-variant-numeric:tabular-nums;color:#d4d4d8;line-height:1.2}
.proj-biz-val.up{color:#22c55e}
.proj-biz-val.down{color:#ef4444}
.proj-biz-label{font-size:8px;color:#3f3f46;margin-top:2px}
.proj-employee{display:flex;align-items:center;gap:6px;padding:4px 8px;background:#0a0a0a;border-radius:4px;margin-bottom:6px;font-size:9px;color:#a1a1aa}
.proj-employee-num{font-weight:700;color:#d4d4d8;font-size:10px}
.proj-employee-bar{flex:1;height:3px;background:#1a1a1a;border-radius:2px;overflow:hidden}
.proj-employee-fill{height:100%;border-radius:2px;background:#22c55e}
.proj-employee-fill.partial{background:#f59e0b}
.proj-health{display:flex;align-items:center;gap:6px}
.proj-health-bar{flex:1;height:3px;background:#0a0a0a;border-radius:2px;overflow:hidden}
.proj-health-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#22c55e,#4ade80);transition:width .5s ease}
.proj-health-fill.warn{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.proj-health-fill.danger{background:linear-gradient(90deg,#ef4444,#f87171)}
.proj-health-label{font-size:8px;color:#3f3f46;white-space:nowrap;font-variant-numeric:tabular-nums}
.proj-cost-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;margin-bottom:8px}
.proj-cost-item{text-align:center;padding:4px 2px;background:rgba(15,15,15,.8);border-radius:3px;border:1px solid #1a1a1a}
.proj-cost-val{font-size:10px;font-weight:700;font-variant-numeric:tabular-nums;color:#e4e4e7;line-height:1.2}
.proj-cost-label{font-size:7px;color:#3f3f46;margin-top:1px}
.proj-cost-src{font-size:6px;color:#52525b;opacity:.7}
.data-integrations{margin-top:12px;padding:10px 12px;background:#0f0f0f;border-radius:6px;border:1px solid #1a1a1a}
.data-integrations-title{font-size:9px;font-weight:600;color:#52525b;margin-bottom:8px;letter-spacing:.5px}
.data-src-list{display:flex;flex-wrap:wrap;gap:6px}
.data-src{display:flex;align-items:center;gap:4px;font-size:8px;padding:3px 8px;background:#0a0a0a;border-radius:4px;color:#a1a1aa}
.data-src-dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}
.data-src-dot.live{background:#22c55e;box-shadow:0 0 4px rgba(34,197,94,.5)}
.data-src-dot.sync{background:#f59e0b;box-shadow:0 0 4px rgba(245,158,11,.3)}
.data-src-dot.off{background:#ef4444;box-shadow:0 0 4px rgba(239,68,68,.3)}

.proj-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:8px;padding:6px;background:#0a0a0a;border-radius:4px}
.proj-metric{text-align:center}
.proj-metric-label{display:block;font-size:8px;color:#3f3f46;margin-bottom:2px;text-transform:uppercase;letter-spacing:.3px}
.proj-metric-value{display:block;font-size:11px;color:#a1a1aa;font-weight:600}
.proj-pnl{font-size:14px;font-weight:700}
.proj-pnl.pos{color:#22c55e}
.proj-pnl.neg{color:#ef4444}

/* ========== 工作流 ========== */
.workflow{padding:0}
.wf-summary{display:flex;gap:12px;margin-bottom:12px;padding:8px;background:#0a0a0a;border-radius:6px}
.wf-summary-item{text-align:center;flex:1}
.wf-summary-val{font-size:14px;font-weight:700}
.wf-summary-lbl{font-size:8px;color:#52525b;margin-top:2px}
.wf-steps{position:relative;padding-left:20px}
.wf-step{position:relative;padding:10px 14px;background:#18181b;border:1px solid #1f1f23;border-radius:8px;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center;font-size:11px;transition:all .15s}
.wf-step:hover{background:#1c1c1f;border-color:#2a2a2e}
.wf-step::before{content:'';position:absolute;left:-12px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:50%;border:2px solid #3f3f46;background:#09090b}
.wf-step.done::before{background:#22c55e;border-color:#22c55e}
.wf-step.run::before{background:#f59e0b;border-color:#f59e0b;animation:pulse 1.5s infinite}
.wf-step.err::before{background:#ef4444;border-color:#ef4444}
.wf-step.wait::before{background:#3b82f6;border-color:#3b82f6;animation:pulse 2s infinite}
.wf-left{display:flex;flex-direction:column;gap:2px}
.wf-name{font-weight:500}
.wf-detail{font-size:8px;color:#52525b}
.wf-right{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.wf-status{font-size:9px;font-weight:600}
.wf-status.done{color:#22c55e}
.wf-status.run{color:#f59e0b}
.wf-status.err{color:#ef4444}
.wf-status.wait{color:#3b82f6}
.wf-time{font-size:8px;color:#3f3f46;font-family:'SF Mono',monospace}
.wf-line{position:absolute;left:22px;top:0;bottom:0;width:1px;background:#27272a;z-index:-1}

/* 工作流成功率 */
.wf-rate{font-size:8px;padding:1px 5px;border-radius:3px;margin-left:6px}
.wf-rate.good{background:rgba(34,197,94,.1);color:#22c55e}
.wf-rate.mid{background:rgba(245,158,11,.1);color:#f59e0b}
.wf-rate.bad{background:rgba(220,38,38,.1);color:#ef4444}

/* ========== 系统设置抽屉 ========== */
.settings-btn{width:36px;height:36px;background:#18181b;border:1px solid #27272a;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;color:#a1a1aa;font-size:18px}
.settings-btn:hover{background:#27272a;color:#fafafa;border-color:#3f3f46}
.settings-drawer{position:fixed;top:0;right:-800px;width:780px;height:100vh;background:#0f0f0f;border-left:1px solid #1a1a1a;z-index:10000;transition:right .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;box-shadow:-10px 0 40px rgba(0,0,0,.5);overflow:hidden;visibility:hidden}
.settings-drawer.open{right:0;visibility:visible}
.settings-header{padding:20px 24px;border-bottom:1px solid #1a1a1a;display:flex;align-items:center;gap:12px;flex-shrink:0}
.settings-close{width:32px;height:32px;border:none;background:#18181b;color:#a1a1aa;border-radius:6px;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;transition:all .15s}
.settings-close:hover{background:#27272a;color:#fafafa}
.settings-title{font-size:16px;font-weight:600;flex:1}
.settings-body{flex:1;overflow-y:auto;padding:20px 24px;min-height:0}
.settings-section{margin-bottom:24px}
.settings-section-title{font-size:11px;font-weight:600;color:#52525b;text-transform:uppercase;letter-spacing:1px;margin-bottom:12px;padding-bottom:6px;border-bottom:1px solid #1a1a1a}
.settings-field{margin-bottom:16px}
.settings-label{display:block;font-size:11px;color:#a1a1aa;margin-bottom:6px;font-weight:500}
.settings-input{width:100%;background:#18181b;border:1px solid #27272a;border-radius:6px;padding:10px 12px;color:#fafafa;font-size:12px;font-family:inherit;transition:border-color .15s}
.settings-input:focus{outline:none;border-color:#3f3f46}
.settings-input::placeholder{color:#52525b}
.settings-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.settings-toggle{display:flex;align-items:center;gap:10px;cursor:pointer}
.settings-toggle input{display:none}
.settings-toggle-slider{width:36px;height:20px;background:#27272a;border-radius:10px;position:relative;transition:background .15s}
.settings-toggle-slider::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;background:#52525b;border-radius:50%;transition:all .15s}
.settings-toggle input:checked + .settings-toggle-slider{background:#22c55e}
.settings-toggle input:checked + .settings-toggle-slider::after{left:18px;background:#fff}
.settings-toggle-label{font-size:11px;color:#a1a1aa}
.settings-save{width:100%;padding:12px;background:#22c55e;border:none;border-radius:8px;color:#000;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;margin-top:20px}
.settings-save:hover{background:#16a34a;transform:translateY(-1px)}
.settings-save:active{transform:scale(.98)}
.settings-test{width:100%;padding:10px;background:#18181b;border:1px solid #27272a;border-radius:6px;color:#a1a1aa;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s;margin-top:8px}
.settings-test:hover{background:#27272a;color:#fafafa;border-color:#3f3f46}
.settings-status{margin-top:12px;padding:10px 12px;background:#0a0a0a;border-radius:6px;font-size:11px;display:flex;align-items:center;gap:8px}
.settings-status.ok{border-left:3px solid #22c55e;color:#22c55e}
.settings-status.err{border-left:3px solid #ef4444;color:#ef4444}
.settings-status.loading{border-left:3px solid #f59e0b;color:#f59e0b}

/* ===== Settings Tabs ===== */
.settings-tabs{display:flex;gap:0;border-bottom:1px solid #1a1a1a;padding:0 24px;flex-shrink:0;background:#0f0f0f}
.settings-tab{padding:12px 20px;font-size:12px;font-weight:600;color:#52525b;border:none;background:transparent;cursor:pointer;font-family:inherit;position:relative;transition:all .15s}
.settings-tab:hover{color:#a1a1aa}
.settings-tab.active{color:#22c55e}
.settings-tab.active::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#22c55e;border-radius:1px}
.settings-tab-pane{display:none}
.settings-tab-pane.active{display:block}

/* ===== Agent Config Panel ===== */
.agent-config-panel{display:flex;height:100%;gap:0}
.agent-config-sidebar{width:200px;border-right:1px solid #1a1a1a;display:flex;flex-direction:column;flex-shrink:0}
.agent-config-search{padding:12px;border-bottom:1px solid #1a1a1a}
.agent-config-search input{width:100%;background:#18181b;border:1px solid #27272a;border-radius:6px;padding:8px 10px;color:#fafafa;font-size:11px;font-family:inherit;outline:none;transition:border-color .15s}
.agent-config-search input:focus{border-color:#3f3f46}
.agent-config-search input::placeholder{color:#52525b}
.agent-config-list{flex:1;overflow-y:auto;padding:8px}
.agent-config-item{display:flex;align-items:center;gap:8px;padding:10px;border-radius:8px;cursor:pointer;transition:all .15s;margin-bottom:4px;border:1px solid transparent}
.agent-config-item:hover{background:#18181b;border-color:#27272a}
.agent-config-item.selected{background:#18181b;border-color:#3f3f46;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.agent-config-item .ac-icon{font-size:18px;flex-shrink:0}
.agent-config-item .ac-info{flex:1;min-width:0}
.agent-config-item .ac-name{font-size:11px;font-weight:600;color:#fafafa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-config-item .ac-type{font-size:9px;color:#52525b;margin-top:1px}
.agent-config-item .ac-status{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.agent-config-item .ac-status.ok{background:#22c55e;box-shadow:0 0 4px rgba(34,197,94,.4)}
.agent-config-item .ac-status.warn{background:#f59e0b;box-shadow:0 0 4px rgba(245,158,11,.4)}
.agent-config-item .ac-status.err{background:#ef4444;box-shadow:0 0 4px rgba(239,68,68,.4)}

.agent-config-main{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column}
.agent-config-main::-webkit-scrollbar{width:5px}
.agent-config-main::-webkit-scrollbar-track{background:transparent}
.agent-config-main::-webkit-scrollbar-thumb{background:#27272a;border-radius:3px}
.ac-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;color:#3f3f46;gap:8px}
.ac-empty-icon{font-size:40px;opacity:.5}
.ac-empty-text{font-size:13px}

.ac-form-section{margin-bottom:20px}
.ac-form-section-title{font-size:11px;font-weight:600;color:#52525b;text-transform:uppercase;letter-spacing:1px;margin-bottom:12px;padding-bottom:6px;border-bottom:1px solid #1a1a1a}
.ac-form-group{margin-bottom:14px}
.ac-form-label{display:flex;align-items:center;gap:6px;font-size:11px;color:#a1a1aa;margin-bottom:6px;font-weight:500}
.ac-form-label .ac-hint{font-size:9px;color:#3f3f46;font-weight:400}
.ac-form-input{width:100%;background:#18181b;border:1px solid #27272a;border-radius:6px;padding:8px 10px;color:#fafafa;font-size:12px;font-family:inherit;transition:border-color .15s;outline:none}
.ac-form-input:focus{border-color:#3f3f46}
.ac-form-input::placeholder{color:#52525b}
.ac-form-select{width:100%;background:#18181b;border:1px solid #27272a;border-radius:6px;padding:8px 10px;color:#fafafa;font-size:12px;font-family:inherit;outline:none;cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
.ac-form-select:focus{border-color:#3f3f46}

.ac-slider-row{display:flex;align-items:center;gap:10px}
.ac-slider-row input[type=range]{flex:1;-webkit-appearance:none;height:4px;background:#27272a;border-radius:2px;outline:none}
.ac-slider-row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;background:#22c55e;border-radius:50%;cursor:pointer;box-shadow:0 0 6px rgba(34,197,94,.3)}
.ac-slider-row .ac-slider-val{font-size:11px;color:#a1a1aa;min-width:40px;text-align:right;font-variant-numeric:tabular-nums;font-family:'SF Mono',monospace}

/* Toggle switch for Agent config */
.ac-toggle{display:flex;align-items:center;gap:10px;cursor:pointer}
.ac-toggle input{display:none}
.ac-toggle-track{width:36px;height:20px;background:#27272a;border-radius:10px;position:relative;transition:background .15s}
.ac-toggle-track::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;background:#52525b;border-radius:50%;transition:all .15s}
.ac-toggle input:checked + .ac-toggle-track{background:#22c55e}
.ac-toggle input:checked + .ac-toggle-track::after{left:18px;background:#fff}
.ac-toggle-label{font-size:11px;color:#a1a1aa}

/* Tag input for string[] */
.ac-tags{display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#18181b;border:1px solid #27272a;border-radius:6px;min-height:38px;align-items:center;transition:border-color .15s;cursor:text}
.ac-tags:focus-within{border-color:#3f3f46}
.ac-tag{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;background:#27272a;border:1px solid #3f3f46;border-radius:4px;font-size:11px;color:#fafafa;animation:tagIn .2s ease}
@keyframes tagIn{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}
.ac-tag-remove{background:none;border:none;color:#71717a;cursor:pointer;font-size:13px;line-height:1;padding:0 2px;transition:color .15s}
.ac-tag-remove:hover{color:#ef4444}
.ac-tag-input{border:none;background:transparent;color:#fafafa;font-size:11px;outline:none;min-width:60px;flex:1;font-family:inherit}
.ac-tag-input::placeholder{color:#52525b}

/* Nested object form */
.ac-nested{border:1px solid #1a1a1a;border-radius:8px;padding:12px;background:#0a0a0a;margin-top:4px}
.ac-nested .ac-form-group:last-child{margin-bottom:0}

/* Datasource bindings */
.ac-datasources{margin-top:auto;padding-top:16px;border-top:1px solid #1a1a1a}
.ac-datasources-title{font-size:11px;font-weight:600;color:#52525b;text-transform:uppercase;letter-spacing:1px;margin-bottom:10px;display:flex;align-items:center;gap:6px}
.ac-ds-list{display:flex;flex-direction:column;gap:6px}
.ac-ds-item{padding:10px 12px;background:#18181b;border:1px solid #27272a;border-radius:8px;transition:all .15s}
.ac-ds-item:hover{border-color:#3f3f46}
.ac-ds-name{font-size:11px;font-weight:600;color:#fafafa;display:flex;align-items:center;gap:6px;margin-bottom:4px}
.ac-ds-name .ac-ds-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.ac-ds-name .ac-ds-dot.live{background:#22c55e;box-shadow:0 0 4px rgba(34,197,94,.5)}
.ac-ds-name .ac-ds-dot.off{background:#ef4444;box-shadow:0 0 4px rgba(239,68,68,.3)}
.ac-ds-desc{font-size:9px;color:#52525b;margin-bottom:6px}
.ac-ds-bound{display:flex;flex-wrap:wrap;gap:4px}
.ac-ds-bound-agent{font-size:9px;padding:2px 6px;background:#0a0a0a;border-radius:3px;color:#a1a1aa;border:1px solid #1a1a1a}
.ac-ds-bound-agent.current{border-color:rgba(34,197,94,.3);color:#22c55e;background:rgba(34,197,94,.05)}

.ac-save-bar{padding:16px 0 0;margin-top:16px;border-top:1px solid #1a1a1a;display:flex;gap:8px;align-items:center}
.ac-save-btn{padding:10px 24px;background:#22c55e;border:none;border-radius:8px;color:#000;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;font-family:inherit}
.ac-save-btn:hover{background:#16a34a;transform:translateY(-1px)}
.ac-save-btn:active{transform:scale(.98)}
.ac-save-btn:disabled{background:#27272a;color:#52525b;cursor:not-allowed;transform:none}
.ac-save-status{font-size:11px;color:#52525b;transition:all .2s}
.ac-save-status.ok{color:#22c55e}
.ac-save-status.err{color:#ef4444}

/* ===== 模块配置按钮 ===== */
.mod-config-btn{width:28px;height:28px;background:rgba(39,39,42,.8);border:1px solid rgba(63,63,70,.5);border-radius:6px;color:#a1a1aa;font-size:14px;cursor:pointer;transition:all .15s;display:inline-flex;align-items:center;justify-content:center;padding:0}
.mod-config-btn:hover{background:rgba(63,63,70,.9);color:#fafafa;border-color:rgba(82,82,91,.8);transform:translateY(-1px)}
.mod-config-btn:active{transform:scale(.95)}

/* ===== 配置抽屉（右侧滑入） ===== */
.config-drawer{position:fixed;top:0;right:-400px;width:400px;height:100vh;background:rgba(9,9,11,.98);backdrop-filter:blur(20px);border-left:1px solid rgba(63,63,70,.5);z-index:9999;transition:right .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;box-shadow:-10px 0 40px rgba(0,0,0,.5)}
.config-drawer.open{right:0}
.config-drawer-header{padding:20px 24px;border-bottom:1px solid rgba(63,63,70,.3);display:flex;align-items:center;justify-content:space-between}
.config-drawer-title{font-size:16px;font-weight:600;color:#fafafa}
.config-drawer-close{width:32px;height:32px;background:rgba(39,39,42,.8);border:1px solid rgba(63,63,70,.5);border-radius:6px;color:#a1a1aa;font-size:18px;cursor:pointer;transition:all .15s;display:flex;align-items:center;justify-content:center;padding:0}
.config-drawer-close:hover{background:rgba(239,68,68,.2);color:#ef4444;border-color:rgba(239,68,68,.3)}
.config-drawer-body{flex:1;overflow-y:auto;padding:24px}
.config-drawer-body::-webkit-scrollbar{width:6px}
.config-drawer-body::-webkit-scrollbar-track{background:transparent}
.config-drawer-body::-webkit-scrollbar-thumb{background:rgba(63,63,70,.5);border-radius:3px}
.config-drawer-body::-webkit-scrollbar-thumb:hover{background:rgba(82,82,91,.8)}

/* ============================================
   1. GLOBAL SEARCH (Cmd+K)
   ============================================ */
.search-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:20000;display:none;align-items:flex-start;justify-content:center;padding-top:120px}
.search-overlay.active{display:flex}
.search-box{width:600px;max-width:90vw;background:#18181b;border:1px solid #27272a;border-radius:12px;box-shadow:0 24px 48px rgba(0,0,0,.5);overflow:hidden}
.search-input{width:100%;height:48px;background:transparent;border:none;border-bottom:1px solid #27272a;color:#fafafa;font-size:16px;padding:0 18px;outline:none;font-family:inherit}
.search-input::placeholder{color:#52525b}
.search-results{max-height:360px;overflow-y:auto;padding:8px 0}
.search-results::-webkit-scrollbar{width:6px}
.search-results::-webkit-scrollbar-thumb{background:rgba(63,63,70,.5);border-radius:3px}
.search-result-item{display:flex;align-items:center;gap:12px;padding:10px 18px;cursor:pointer;transition:background .15s}
.search-result-item:hover{background:rgba(63,63,70,.3)}
.search-result-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:#27272a;font-size:16px;flex-shrink:0}
.search-result-text{flex:1;min-width:0}
.search-result-title{font-size:14px;color:#fafafa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-result-desc{font-size:12px;color:#71717a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-hint{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;background:#27272a;border:1px solid #3f3f46;border-radius:6px;font-size:11px;color:#a1a1aa;cursor:pointer;font-family:inherit}
.search-hint kbd{font-family:inherit;font-size:10px;color:#fafafa;background:#3f3f46;padding:1px 5px;border-radius:3px}

/* ============================================
   2. NOTIFICATION CENTER
   ============================================ */
.notif-btn{position:relative;background:none;border:1px solid #27272a;border-radius:8px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#a1a1aa;font-size:16px;transition:all .15s}
.notif-btn:hover{background:#27272a;color:#fafafa;border-color:#3f3f46}
.notif-badge{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;background:#ef4444;color:#fff;font-size:10px;font-weight:600;border-radius:8px;display:flex;align-items:center;justify-content:center;padding:0 4px;line-height:1}
.notif-panel{position:absolute;top:calc(100% + 8px);right:0;width:400px;max-height:480px;background:#18181b;border:1px solid #27272a;border-radius:12px;box-shadow:0 16px 40px rgba(0,0,0,.4);overflow:hidden;display:none;z-index:15000}
.notif-panel.active{display:block}
.notif-panel-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #27272a}
.notif-panel-header h3{font-size:14px;color:#fafafa;font-weight:600;margin:0}
.notif-item{display:flex;gap:12px;padding:12px 18px;border-bottom:1px solid #1f1f23;cursor:pointer;transition:background .15s}
.notif-item:hover{background:rgba(63,63,70,.2)}
.notif-item.unread{background:rgba(34,197,94,.04)}
.notif-item.unread .notif-item-text{color:#fafafa}
.notif-item-icon{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#27272a;font-size:14px;flex-shrink:0}
.notif-item-body{flex:1;min-width:0}
.notif-item-text{font-size:13px;color:#a1a1aa;line-height:1.4}
.notif-item-time{font-size:11px;color:#52525b;margin-top:4px}

/* ============================================
   3. DECISION HISTORY PANEL
   ============================================ */
.history-drawer{position:fixed;top:0;right:-420px;width:400px;height:100vh;background:#141416;border-left:1px solid #27272a;z-index:10000;transition:right .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column}
.history-drawer.active{right:0}
.history-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #27272a}
.history-drawer-header h3{font-size:16px;color:#fafafa;font-weight:600;margin:0}
.history-drawer-body{flex:1;overflow-y:auto;padding:16px 22px}
.history-item{padding:14px 0;border-bottom:1px solid #1f1f23}
.history-item:last-child{border-bottom:none}
.history-item-text{font-size:13px;color:#fafafa;line-height:1.5;margin-bottom:8px}
.history-item-meta{display:flex;align-items:center;gap:10px}
.history-item-date{font-size:11px;color:#52525b}
.history-outcome{font-size:11px;padding:2px 8px;border-radius:4px;font-weight:500}
.history-outcome.good{background:rgba(34,197,94,.12);color:#22c55e}
.history-outcome.bad{background:rgba(239,68,68,.12);color:#ef4444}
.history-outcome.pending{background:rgba(245,158,11,.12);color:#f59e0b}

/* ============================================
   4. AGENT PERFORMANCE RANKING
   ============================================ */
.rank-card{background:#18181b;border:1px solid #27272a;border-radius:12px;padding:18px 22px}
.rank-card h3{font-size:14px;color:#fafafa;font-weight:600;margin:0 0 16px}
.rank-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #1f1f23}
.rank-row:last-child{border-bottom:none}
.rank-number{width:24px;font-size:12px;color:#52525b;text-align:center;flex-shrink:0}
.rank-medal{width:24px;text-align:center;font-size:14px;flex-shrink:0}
.rank-name{flex:1;font-size:13px;color:#fafafa;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rank-bar-wrap{flex:2;display:flex;align-items:center;gap:8px}
.rank-bar{flex:1;height:6px;background:#27272a;border-radius:3px;overflow:hidden}
.rank-bar-fill{height:100%;border-radius:3px;background:linear-gradient(90deg,#22c55e,#3b82f6);transition:width .5s ease}
.rank-earnings{font-size:12px;color:#22c55e;font-weight:500;min-width:60px;text-align:right}

/* ============================================
   5. TREND COMPARISON
   ============================================ */
.trend-pills{display:flex;gap:4px;background:#27272a;border-radius:8px;padding:3px}
.trend-pill{padding:5px 12px;font-size:12px;color:#71717a;border-radius:6px;border:none;background:transparent;cursor:pointer;transition:all .15s;font-family:inherit}
.trend-pill.active{background:#3f3f46;color:#fafafa}
.trend-pill:hover:not(.active){color:#a1a1aa}
.trend-compare{display:flex;gap:24px;margin-top:12px}
.trend-compare-item{display:flex;flex-direction:column;gap:4px}
.trend-compare-label{font-size:11px;color:#52525b}
.trend-compare-value{font-size:20px;font-weight:600;color:#fafafa}
.trend-compare-arrow{font-size:12px;margin-left:4px}
.trend-compare-arrow.up{color:#22c55e}
.trend-compare-arrow.down{color:#ef4444}
.sparkline-mini{display:inline-block;vertical-align:middle;height:24px;width:64px}
.sparkline-mini path{fill:none;stroke:#22c55e;stroke-width:1.5}

/* ============================================
   6. OKR TRACKING
   ============================================ */
.okr-card{background:#18181b;border:1px solid #27272a;border-radius:12px;padding:18px 22px;display:flex;gap:16px;align-items:center}
.okr-ring{width:56px;height:56px;flex-shrink:0;position:relative}
.okr-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.okr-ring circle{fill:none;stroke-width:4}
.okr-ring .okr-ring-bg{stroke:#27272a}
.okr-ring .okr-ring-fill{stroke:#22c55e;stroke-linecap:round;transition:stroke-dashoffset .5s ease}
.okr-ring-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:#fafafa}
.okr-body{flex:1;min-width:0}
.okr-goal{font-size:14px;color:#fafafa;font-weight:500;margin-bottom:4px}
.okr-progress{font-size:12px;color:#a1a1aa;margin-bottom:4px}
.okr-deadline{font-size:11px;color:#52525b}

/* ============================================
   7. CASH FLOW PREDICTION
   ============================================ */
.cashflow-chart{position:relative;width:100%;height:160px;background:#141416;border:1px solid #27272a;border-radius:12px;overflow:hidden;padding:12px}
.cashflow-chart svg{width:100%;height:100%}
.cashflow-line{fill:none;stroke:#22c55e;stroke-width:2}
.cashflow-area{fill:url(#cashflowGradient);opacity:.3}
.cashflow-danger{fill:rgba(239,68,68,.1);stroke:#ef4444;stroke-width:1;stroke-dasharray:4,3}
.cashflow-label{font-size:10px;fill:#52525b}

/* ============================================
   8. COMPETITOR MONITOR
   ============================================ */
.comp-card{background:#18181b;border:1px solid #27272a;border-radius:12px;padding:18px 22px}
.comp-card h3{font-size:14px;color:#fafafa;font-weight:600;margin:0 0 14px}
.comp-item{padding:10px 0;border-bottom:1px solid #1f1f23}
.comp-item:last-child{border-bottom:none}
.comp-name{font-size:13px;color:#fafafa;font-weight:500;margin-bottom:6px}
.comp-metrics{display:flex;gap:16px;flex-wrap:wrap}
.comp-metric{display:flex;flex-direction:column;gap:2px}
.comp-metric-label{font-size:11px;color:#52525b}
.comp-metric-value{font-size:13px;color:#a1a1aa;font-weight:500}
.comp-trend{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:500}
.comp-trend.up{color:#22c55e}
.comp-trend.down{color:#ef4444}

/* ============================================
   9. AUDIT LOG
   ============================================ */
.audit-drawer{position:fixed;top:0;right:-420px;width:400px;height:100vh;background:#141416;border-left:1px solid #27272a;z-index:10000;transition:right .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column}
.audit-drawer.active{right:0}
.audit-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #27272a}
.audit-drawer-header h3{font-size:16px;color:#fafafa;font-weight:600;margin:0}
.audit-drawer-body{flex:1;overflow-y:auto;padding:16px 22px}
.audit-item{padding:12px 0;border-bottom:1px solid #1f1f23;display:flex;flex-direction:column;gap:6px}
.audit-item:last-child{border-bottom:none}
.audit-item-top{display:flex;align-items:center;gap:8px}
.audit-timestamp{font-size:11px;color:#52525b;flex-shrink:0}
.audit-actor{font-size:12px;color:#a1a1aa;font-weight:500}
.audit-action{font-size:13px;color:#fafafa;line-height:1.4}
.audit-type{font-size:10px;padding:2px 6px;border-radius:3px;font-weight:600;text-transform:uppercase;letter-spacing:.3px}
.audit-type.decision{background:rgba(168,85,247,.12);color:#a855f7}
.audit-type.auto{background:rgba(59,130,246,.12);color:#3b82f6}
.audit-type.system{background:rgba(245,158,11,.12);color:#f59e0b}

/* ============================================
   10. DECISION SIMULATOR
   ============================================ */
.sim-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);z-index:18000;display:none;align-items:center;justify-content:center}
.sim-overlay.active{display:flex}
.sim-panel{width:680px;max-width:90vw;max-height:80vh;background:#18181b;border:1px solid #27272a;border-radius:12px;overflow-y:auto;padding:24px}
.sim-panel h3{font-size:16px;color:#fafafa;font-weight:600;margin:0 0 20px}
.sim-compare{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.sim-before,.sim-after{padding:16px;background:#141416;border:1px solid #27272a;border-radius:8px}
.sim-before h4,.sim-after h4{font-size:12px;color:#71717a;text-transform:uppercase;letter-spacing:.5px;margin:0 0 12px}
.sim-after{border-color:rgba(34,197,94,.3)}
.sim-metric{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #1f1f23}
.sim-metric:last-child{border-bottom:none}
.sim-metric-label{font-size:13px;color:#a1a1aa}
.sim-metric-value{font-size:13px;color:#fafafa;font-weight:500}
.sim-impact{margin-top:16px;padding:14px;background:rgba(34,197,94,.06);border:1px solid rgba(34,197,94,.2);border-radius:8px}
.sim-impact-value{font-size:24px;font-weight:700}
.sim-impact-value.positive{color:#22c55e}
.sim-impact-value.negative{color:#ef4444}
.sim-impact-label{font-size:12px;color:#71717a;margin-top:4px}

/* ============================================
   11. AGENT COLLABORATION GRAPH
   ============================================ */
.collab-canvas{width:100%;height:280px;background:#141416;border:1px solid #27272a;border-radius:12px;overflow:hidden}
.collab-canvas svg{width:100%;height:100%}
.collab-node{cursor:pointer;transition:opacity .15s}
.collab-node circle{fill:#27272a;stroke:#3f3f46;stroke-width:2;transition:all .2s}
.collab-node:hover circle{stroke:#22c55e;fill:#1f1f23}
.collab-node text{fill:#fafafa;font-size:10px;text-anchor:middle;pointer-events:none}
.collab-edge{stroke:#3f3f46;stroke-width:1.5;fill:none;transition:stroke .2s}
.collab-edge.active{stroke:#22c55e;stroke-width:2}

/* ============================================
   12. EXPORT BUTTON
   ============================================ */
.export-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:#27272a;border:1px solid #3f3f46;border-radius:8px;color:#a1a1aa;font-size:12px;cursor:pointer;transition:all .15s;font-family:inherit}
.export-btn:hover{background:#3f3f46;color:#fafafa}
.export-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:160px;background:#18181b;border:1px solid #27272a;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.3);overflow:hidden;display:none;z-index:12000}
.export-menu.active{display:block}
.export-menu-item{display:flex;align-items:center;gap:8px;padding:10px 14px;font-size:13px;color:#a1a1aa;cursor:pointer;transition:background .15s}
.export-menu-item:hover{background:rgba(63,63,70,.3);color:#fafafa}

/* ============================================
   13. ROLE SWITCHER
   ============================================ */
.role-switcher{position:relative;display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:#27272a;border:1px solid #3f3f46;border-radius:8px;color:#a1a1aa;font-size:12px;cursor:pointer;transition:all .15s;font-family:inherit}
.role-switcher:hover{background:#3f3f46;color:#fafafa}
.role-switcher-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:150px;background:#18181b;border:1px solid #27272a;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.3);overflow:hidden;display:none;z-index:12000}
.role-switcher-menu.active{display:block}
.role-option{display:flex;align-items:center;gap:8px;padding:10px 14px;font-size:13px;color:#a1a1aa;cursor:pointer;transition:background .15s}
.role-option:hover{background:rgba(63,63,70,.3);color:#fafafa}
.role-option.active{color:#22c55e}

/* ============================================
   14. SKELETON LOADING
   ============================================ */
.skeleton{background:linear-gradient(90deg,#27272a 25%,#3f3f46 50%,#27272a 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:6px}
.skeleton-text{height:14px;width:60%;margin-bottom:8px}
.skeleton-title{height:20px;width:40%;margin-bottom:12px}
.skeleton-chart{height:160px;width:100%;border-radius:12px}
.skeleton-card{height:120px;width:100%;border-radius:12px}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ============================================
   15. MOBILE RESPONSIVE
   ============================================ */
@media(max-width:768px){
  .dashboard-grid{grid-template-columns:1fr !important}
  .header-title{font-size:18px}
  .header-right{gap:8px}
  .search-hint span{display:none}
  .notif-panel{width:calc(100vw - 32px);right:-60px}
  .history-drawer,.audit-drawer,.alert-drawer{width:100%;right:-100%}
  .history-drawer.active,.audit-drawer.active,.alert-drawer.active{right:0}
  .sim-panel{width:95vw;padding:16px}
  .sim-compare{grid-template-columns:1fr}
  .rank-bar-wrap{display:none}
  .trend-compare{flex-wrap:wrap;gap:12px}
  .card{padding:14px 16px}
  .okr-card{flex-direction:column;text-align:center}
  .collab-canvas{height:200px}
  .export-menu,.role-switcher-menu{right:-20px}
}
@media(max-width:480px){
  .header{padding:12px 16px}
  .header-title{font-size:16px}
  .header-right{gap:6px}
  .notif-btn,.export-btn,.role-switcher{padding:4px 8px;font-size:11px}
  .trend-pills{flex-wrap:wrap}
  .comp-metrics{gap:8px}
  .sim-panel h3{font-size:14px}
  .search-box{width:95vw}
  .search-overlay{padding-top:60px}
}

/* ============================================
   16. KEYBOARD SHORTCUTS HINT
   ============================================ */
.kbd-hint{position:fixed;bottom:24px;right:24px;background:#18181b;border:1px solid #27272a;border-radius:12px;padding:16px 20px;box-shadow:0 8px 24px rgba(0,0,0,.3);z-index:19000;display:none;max-width:280px}
.kbd-hint.active{display:block}
.kbd-hint h4{font-size:12px;color:#71717a;text-transform:uppercase;letter-spacing:.5px;margin:0 0 12px}
.kbd-hint-row{display:flex;align-items:center;justify-content:space-between;padding:4px 0}
.kbd-hint-label{font-size:12px;color:#a1a1aa}
kbd{display:inline-block;padding:2px 6px;font-size:11px;font-family:inherit;color:#fafafa;background:#27272a;border:1px solid #3f3f46;border-radius:4px;line-height:1.4;box-shadow:0 1px 0 #3f3f46}

/* ============================================
   17. ALERT CENTER
   ============================================ */
.alert-drawer{position:fixed;top:0;right:-420px;width:400px;height:100vh;background:#141416;border-left:1px solid #27272a;z-index:10000;transition:right .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column}
.alert-drawer.active{right:0}
.alert-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #27272a}
.alert-drawer-header h3{font-size:16px;color:#fafafa;font-weight:600;margin:0}
.alert-drawer-body{flex:1;overflow-y:auto;padding:16px 22px}
.alert-item{padding:14px 16px;margin-bottom:10px;background:#18181b;border:1px solid #27272a;border-radius:8px;border-left:3px solid #3f3f46}
.alert-item:last-child{margin-bottom:0}
.alert-item-title{font-size:13px;color:#fafafa;font-weight:500;margin-bottom:4px}
.alert-item-desc{font-size:12px;color:#a1a1aa;line-height:1.4;margin-bottom:6px}
.alert-item-time{font-size:11px;color:#52525b}
.alert-severity.critical{border-left-color:#ef4444}
.alert-severity.critical .alert-item-title{color:#ef4444}
.alert-severity.warning{border-left-color:#f59e0b}
.alert-severity.warning .alert-item-title{color:#f59e0b}
.alert-severity.info{border-left-color:#3b82f6}
.alert-severity.info .alert-item-title{color:#3b82f6}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 0;
  padding: 0 32px;
  background: transparent;
  border-bottom: 1px solid #27272a;
  margin-bottom: 32px;
}

.tab-nav button {
  background: transparent;
  border: none;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #71717a;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-nav button:hover {
  color: #a1a1aa;
}

.tab-nav button.active {
  color: #fafafa;
}

.tab-nav button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: #22c55e;
}

/* Page Containers */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
  padding: 0 32px;
}

.summary-card {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.summary-card:hover {
  border-color: #3f3f46;
  transform: translateY(-2px);
}

.summary-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #fafafa;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-card h3 .icon {
  font-size: 16px;
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-item {
  font-size: 12px;
  color: #a1a1aa;
  padding-left: 24px;
  line-height: 1.5;
}

.summary-item::before {
  content: '•';
  color: #22c55e;
  margin-right: 6px;
}


/* ===== DECISION DETAIL DRAWER ===== */
.dec-detail-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  height: 100vh;
  background: #18181b;
  border-left: 1px solid #27272a;
  z-index: 10001;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.4);
}
.dec-detail-drawer.open {
  right: 0;
}
.dec-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #27272a;
  position: sticky;
  top: 0;
  background: #18181b;
  z-index: 1;
}
.dec-detail-header h3 {
  font-size: 16px;
  color: #fafafa;
  margin: 0;
  font-weight: 600;
}
.dec-detail-close {
  background: none;
  border: none;
  color: #71717a;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.dec-detail-close:hover {
  background: #27272a;
  color: #fafafa;
}
.dec-detail-body {
  padding: 24px;
}
.dec-detail-section {
  margin-bottom: 20px;
}
.dec-detail-section h4 {
  font-size: 12px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px 0;
  font-weight: 500;
}
.dec-detail-section p {
  font-size: 13px;
  color: #d4d4d8;
  margin: 0;
  line-height: 1.6;
}
.dec-detail-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dec-detail-metric {
  background: #1f1f23;
  border-radius: 8px;
  padding: 12px 14px;
}
.dec-detail-metric .label {
  font-size: 11px;
  color: #71717a;
  margin-bottom: 4px;
}
.dec-detail-metric .value {
  font-size: 16px;
  font-weight: 600;
  color: #fafafa;
}
.dec-detail-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dec-detail-timeline-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dec-detail-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-top: 5px;
  flex-shrink: 0;
}
.dec-detail-timeline-content {
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.5;
}
.dec-detail-timeline-content .time {
  color: #52525b;
  font-size: 11px;
}
.dec-detail-actions {
  padding: 20px 24px;
  border-top: 1px solid #27272a;
  position: sticky;
  bottom: 0;
  background: #18181b;
  display: flex;
  gap: 10px;
}
.dec-detail-actions .btn {
  flex: 1;
  padding: 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
}

/* ===== CONFIRMATION MODAL ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
}
.confirm-overlay.active {
  display: flex;
}
.confirm-box {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 32px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}
.confirm-icon {
  font-size: 32px;
  margin-bottom: 16px;
}
.confirm-title {
  font-size: 16px;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 8px;
}
.confirm-desc {
  font-size: 13px;
  color: #a1a1aa;
  margin-bottom: 24px;
  line-height: 1.6;
}
.confirm-impact {
  background: #1f1f23;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 24px;
}
.confirm-impact-title {
  font-size: 11px;
  color: #71717a;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.confirm-impact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.confirm-impact-item {
  font-size: 12px;
  color: #d4d4d8;
  display: flex;
  justify-content: space-between;
}
.confirm-impact-item .val {
  font-weight: 500;
}
.confirm-btns {
  display: flex;
  gap: 10px;
}
.confirm-btns .btn {
  flex: 1;
  padding: 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}
.confirm-btn-cancel {
  background: #27272a;
  color: #a1a1aa;
}
.confirm-btn-cancel:hover {
  background: #3f3f46;
  color: #fafafa;
}
.confirm-btn-confirm {
  background: #22c55e;
  color: #fff;
}
.confirm-btn-confirm:hover {
  background: #16a34a;
}
.confirm-btn-confirm.danger {
  background: #ef4444;
}
.confirm-btn-confirm.danger:hover {
  background: #dc2626;
}

/* ===== VIEW DETAIL BUTTON ===== */
.dec-view-detail {
  background: none;
  border: 1px solid #3f3f46;
  color: #71717a;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s;
}
.dec-view-detail:hover {
  border-color: #22c55e;
  color: #22c55e;
}



/* ========== 集团管理页面样式 ========== */
#page-group { padding: 20px 32px; }
#page-group .page-header { margin-bottom: 24px; }
#page-group .page-header h2 { font-size: 24px; font-weight: 600; color: #fff; margin: 0 0 8px 0; }
#page-group .page-desc { font-size: 14px; color: #a1a1aa; margin: 0; }
.group-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.group-stat-card { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 20px; }
.group-stat-card .stat-label { font-size: 12px; color: #71717a; margin-bottom: 8px; font-weight: 500; }
.group-stat-card .stat-value { font-size: 28px; font-weight: 700; color: #fafafa; margin-bottom: 4px; }
.group-stat-card .stat-trend { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.group-stat-card .stat-trend.up { color: #22c55e; }
.group-stat-card .stat-trend.down { color: #ef4444; }
.group-section { margin-bottom: 28px; }
.group-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.group-section-header h3 { font-size: 16px; font-weight: 600; color: #fafafa; margin: 0; display: flex; align-items: center; gap: 8px; }
.group-section-header .add-btn { background: #22c55e; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background 0.2s; }
.group-section-header .add-btn:hover { background: #16a34a; }
.group-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.group-card { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 20px; position: relative; transition: border-color 0.2s; }
.group-card:hover { border-color: #3f3f46; }
.group-card .card-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px; }
.group-card .card-icon.brand { background: rgba(139,92,246,0.15); }
.group-card .card-icon.platform { background: rgba(59,130,246,0.15); }
.group-card .card-icon.entity { background: rgba(245,158,11,0.15); }
.group-card .card-title { font-size: 15px; font-weight: 600; color: #fafafa; margin: 0 0 6px 0; }
.group-card .card-subtitle { font-size: 12px; color: #71717a; margin: 0 0 14px 0; }
.group-card .card-metrics { display: flex; gap: 16px; margin-bottom: 14px; }
.group-card .card-metric { flex: 1; }
.group-card .card-metric .metric-label { font-size: 11px; color: #71717a; margin-bottom: 2px; }
.group-card .card-metric .metric-value { font-size: 14px; font-weight: 600; color: #fafafa; }
.group-card .card-status { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 500; }
.group-card .card-status.active { background: rgba(34,197,94,0.12); color: #22c55e; }
.group-card .card-status.inactive { background: rgba(239,68,68,0.12); color: #ef4444; }
.group-card .card-actions { position: absolute; top: 16px; right: 16px; display: flex; gap: 6px; opacity: 0; transition: opacity 0.2s; }
.group-card:hover .card-actions { opacity: 1; }
.group-card .card-actions button { background: #27272a; border: none; border-radius: 6px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #a1a1aa; font-size: 13px; transition: background 0.2s; }
.group-card .card-actions button:hover { background: #3f3f46; color: #fafafa; }

/* ========== 集团经营页面样式 ========== */
#page-projects .page-header { margin-bottom: 24px; }
#page-projects .page-header h2 { font-size: 24px; font-weight: 600; color: #fff; margin: 0 0 8px 0; }
#page-projects .page-header .page-desc { font-size: 14px; color: #a1a1aa; margin: 0; }

.gp-sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 10px;
  width: fit-content;
}
.gp-sub-tab {
  padding: 8px 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.gp-sub-tab:hover { color: #fafafa; background: rgba(255,255,255,.04); }
.gp-sub-tab.active {
  background: #27272a;
  color: #fafafa;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.gp-tab-content { display: none; }
.gp-tab-content.active { display: block; }

/* 集团概览容器：单列居中布局，内容居中展示 */
.gp-overview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.gp-overview-container > * {
  width: 100%;
}
/* 品牌/平台贡献区：整体居中 */
.gp-contribution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 0;
}
/* 响应式：窄屏单列 */
@media (max-width: 900px) {
  .gp-contribution-grid { grid-template-columns: 1fr; }
}

/* Form inputs in modals */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: #a1a1aa; margin-bottom: 6px; font-weight: 500; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  color: #fafafa;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: #22c55e; }
.form-input::placeholder { color: #52525b; }
select.form-input { appearance: auto; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid #27272a; }
.btn-primary {
  padding: 10px 24px;
  background: #22c55e;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: #16a34a; }
.btn-secondary {
  padding: 10px 24px;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  color: #fafafa;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: #3f3f46; }

/* ========== 审批中心页面样式 ========== */
#page-approval { padding: 20px 32px; }
#page-approval .page-header { margin-bottom: 24px; }
#page-approval .page-header h2 { font-size: 24px; font-weight: 600; color: #fff; margin: 0 0 8px 0; }
#page-approval .page-desc { font-size: 14px; color: #a1a1aa; margin: 0; }
.approval-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.approval-stat { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 20px; text-align: center; }
.approval-stat .stat-icon { font-size: 24px; margin-bottom: 8px; }
.approval-stat .stat-num { font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.approval-stat .stat-num.pending { color: #f59e0b; }
.approval-stat .stat-num.approved { color: #22c55e; }
.approval-stat .stat-num.rejected { color: #ef4444; }
.approval-stat .stat-num.total { color: #3b82f6; }
.approval-stat .stat-label { font-size: 12px; color: #71717a; }
.approval-tabs { display: flex; gap: 0; border-bottom: 1px solid #27272a; margin-bottom: 20px; }
.approval-tabs button { background: transparent; border: none; padding: 12px 20px; font-size: 13px; font-weight: 500; color: #71717a; cursor: pointer; position: relative; transition: color 0.2s; }
.approval-tabs button:hover { color: #a1a1aa; }
.approval-tabs button.active { color: #fafafa; }
.approval-tabs button.active::after { content: ''; position: absolute; bottom: 0; left: 20px; right: 20px; height: 2px; background: #22c55e; }
.approval-list { display: flex; flex-direction: column; gap: 12px; }
.approval-item { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 20px; transition: border-color 0.2s; }
.approval-item:hover { border-color: #3f3f46; }
.approval-item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.approval-item-title { font-size: 15px; font-weight: 600; color: #fafafa; margin: 0 0 4px 0; }
.approval-item-meta { font-size: 12px; color: #71717a; display: flex; gap: 12px; }
.approval-item-tag { font-size: 11px; padding: 3px 10px; border-radius: 6px; font-weight: 500; }
.approval-item-tag.urgent { background: rgba(239,68,68,0.12); color: #ef4444; }
.approval-item-tag.normal { background: rgba(59,130,246,0.12); color: #3b82f6; }
.approval-item-tag.low { background: rgba(113,113,122,0.12); color: #a1a1aa; }
.approval-item-body { font-size: 13px; color: #a1a1aa; margin-bottom: 14px; line-height: 1.5; }
.approval-flow { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 12px; background: #0a0a0a; border-radius: 8px; }
.approval-flow-step { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.approval-flow-step .step-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.approval-flow-step .step-dot.done { background: #22c55e; color: #fff; }
.approval-flow-step .step-dot.current { background: #f59e0b; color: #fff; animation: pulse 2s infinite; }
.approval-flow-step .step-dot.waiting { background: #27272a; color: #71717a; }
.approval-flow-step .step-name { color: #a1a1aa; }
.approval-flow-arrow { color: #3f3f46; font-size: 14px; }
.approval-item-actions { display: flex; gap: 8px; }
.approval-item-actions button { border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.approval-item-actions .btn-approve { background: #22c55e; color: #fff; }
.approval-item-actions .btn-approve:hover { background: #16a34a; }
.approval-item-actions .btn-reject { background: rgba(239,68,68,0.15); color: #ef4444; }
.approval-item-actions .btn-reject:hover { background: rgba(239,68,68,0.25); }
.approval-item-actions .btn-transfer { background: #27272a; color: #a1a1aa; }
.approval-item-actions .btn-transfer:hover { background: #3f3f46; color: #fafafa; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ========== 审计日志页面样式 ========== */
#page-audit { padding: 20px 32px; }
#page-audit .page-header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-start; }
#page-audit .page-header h2 { font-size: 24px; font-weight: 600; color: #fff; margin: 0 0 8px 0; }
#page-audit .page-desc { font-size: 14px; color: #a1a1aa; margin: 0; }
.audit-view-toggle { display: flex; gap: 0; border: 1px solid #27272a; border-radius: 8px; overflow: hidden; }
.audit-view-toggle button { background: transparent; border: none; padding: 8px 16px; font-size: 13px; color: #71717a; cursor: pointer; transition: all 0.2s; }
.audit-view-toggle button.active { background: #27272a; color: #fafafa; }
.audit-filters { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.audit-filter { display: flex; align-items: center; gap: 6px; }
.audit-filter label { font-size: 12px; color: #71717a; font-weight: 500; }
.audit-filter select, .audit-filter input { background: #18181b; border: 1px solid #27272a; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #fafafa; outline: none; transition: border-color 0.2s; }
.audit-filter select:focus, .audit-filter input:focus { border-color: #22c55e; }
.audit-filter select option { background: #18181b; }
.audit-table-wrap { background: #18181b; border: 1px solid #27272a; border-radius: 12px; overflow: hidden; }
.audit-table { width: 100%; border-collapse: collapse; }
.audit-table th { text-align: left; padding: 14px 16px; font-size: 12px; font-weight: 600; color: #71717a; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #27272a; background: #0f0f12; }
.audit-table td { padding: 14px 16px; font-size: 13px; color: #d4d4d8; border-bottom: 1px solid #27272a; }
.audit-table tr:last-child td { border-bottom: none; }
.audit-table tr:hover td { background: rgba(255,255,255,0.02); }
.audit-table .op-type { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 500; }
.audit-table .op-type.create { background: rgba(34,197,94,0.12); color: #22c55e; }
.audit-table .op-type.update { background: rgba(59,130,246,0.12); color: #3b82f6; }
.audit-table .op-type.delete { background: rgba(239,68,68,0.12); color: #ef4444; }
.audit-table .op-type.login { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.audit-table .op-type.export { background: rgba(245,158,11,0.12); color: #f59e0b; }
.audit-table .risk-level { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.audit-table .risk-level.high { background: #ef4444; }
.audit-table .risk-level.medium { background: #f59e0b; }
.audit-table .risk-level.low { background: #22c55e; }
.audit-timeline { display: none; position: relative; padding-left: 24px; }
.audit-timeline.active { display: block; }
.audit-timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: #27272a; }
.audit-timeline-item { position: relative; margin-bottom: 20px; padding: 16px; background: #18181b; border: 1px solid #27272a; border-radius: 12px; }
.audit-timeline-item::before { content: ''; position: absolute; left: -20px; top: 20px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #27272a; background: #18181b; }
.audit-timeline-item.high::before { border-color: #ef4444; background: rgba(239,68,68,0.2); }
.audit-timeline-item.medium::before { border-color: #f59e0b; background: rgba(245,158,11,0.2); }
.audit-timeline-item .tl-time { font-size: 11px; color: #71717a; margin-bottom: 6px; }
.audit-timeline-item .tl-title { font-size: 14px; font-weight: 500; color: #fafafa; margin-bottom: 4px; }
.audit-timeline-item .tl-detail { font-size: 12px; color: #a1a1aa; line-height: 1.5; }
.audit-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.audit-pagination .page-info { font-size: 13px; color: #71717a; }
.audit-pagination .page-btns { display: flex; gap: 4px; }
.audit-pagination .page-btns button { background: #18181b; border: 1px solid #27272a; border-radius: 6px; padding: 6px 12px; font-size: 13px; color: #a1a1aa; cursor: pointer; transition: all 0.2s; }
.audit-pagination .page-btns button:hover { border-color: #3f3f46; color: #fafafa; }
.audit-pagination .page-btns button.active { background: #22c55e; border-color: #22c55e; color: #fff; }

/* ========== 通知提示样式 ========== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10001;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease-out;
}

.notification-success {
  border-left: 4px solid #22c55e;
}

.notification-error {
  border-left: 4px solid #ef4444;
}

.notification-info {
  border-left: 4px solid #3b82f6;
}

.notification-message {
  color: #fafafa;
  font-size: 14px;
}

.notification-close {
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.notification-close:hover {
  color: #fafafa;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========== 系统设置页样式（原集成管理，三页合并） ========== */
#page-sysadmin {
  padding: 20px;
}

#page-sysadmin .page-header {
  margin-bottom: 24px;
}

#page-sysadmin .page-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px 0;
}

#page-sysadmin .page-desc {
  font-size: 14px;
  color: #a1a1aa;
  margin: 0;
}

.integrations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.integration-card {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 24px;
}

.integration-card .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #27272a;
}

.integration-card .card-icon {
  font-size: 32px;
}

.integration-card .card-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.integration-card .card-subtitle {
  font-size: 13px;
  color: #71717a;
  margin: 4px 0 0 0;
}

.integration-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: #a1a1aa;
}

.form-input {
  background: #0a0a0a;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: #fafafa;
  font-family: 'SF Mono', Monaco, monospace;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #22c55e;
  background: #0f0f0f;
}

.form-input::placeholder {
  color: #52525b;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* ========== 表单弹窗样式 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 32px;
  max-width: 720px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #27272a;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #fafafa;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 32px;
  color: #71717a;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #27272a;
  color: #fafafa;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #a1a1aa;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: #fafafa;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #22c55e;
  background: #0f0f0f;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #52525b;
}

.form-group select {
  cursor: pointer;
}

.form-group select option {
  background: #18181b;
  color: #fafafa;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #27272a;
}

.btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: #22c55e;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: #22c55e;
  color: #fff;
}

.btn-primary:hover {
  background: #16a34a;
}

.btn-secondary {
  background: #27272a;
  color: #a1a1aa;
}

.btn-secondary:hover {
  background: #3f3f46;
  color: #fafafa;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.test-status {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  display: none;
}

.test-status.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid #22c55e;
  color: #22c55e;
  display: block;
}

.test-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
  display: block;
}

.sync-panel {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 24px;
}

.sync-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #27272a;
}

.sync-panel h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.sync-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.sync-status-item {
  background: #0a0a0a;
  border-radius: 8px;
  padding: 16px;
}

.sync-status-label {
  font-size: 12px;
  color: #71717a;
  margin-bottom: 8px;
}

.sync-status-value {
  font-size: 16px;
  font-weight: 600;
  color: #fafafa;
}

.sync-status-value.success {
  color: #22c55e;
}

.sync-status-value.error {
  color: #ef4444;
}

.sync-status-value.pending {
  color: #f59e0b;
}

.sync-log {
  background: #0a0a0a;
  border-radius: 8px;
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
}

.sync-log-header {
  font-size: 13px;
  font-weight: 600;
  color: #a1a1aa;
  margin-bottom: 12px;
}

.sync-log-item {
  padding: 10px;
  border-left: 3px solid #27272a;
  margin-bottom: 8px;
  background: #141416;
  border-radius: 4px;
}

.sync-log-item.success {
  border-left-color: #22c55e;
}

.sync-log-item.error {
  border-left-color: #ef4444;
}

.sync-log-time {
  font-size: 11px;
  color: #71717a;
  margin-bottom: 4px;
}

.sync-log-message {
  font-size: 13px;
  color: #a1a1aa;
}

/* ========== 战略看板页面样式 ========== */
#page-strategy {
  padding: 20px;
}

#page-strategy .page-header {
  margin-bottom: 24px;
}

#page-strategy .page-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px 0;
}

#page-strategy .page-desc {
  font-size: 14px;
  color: #a1a1aa;
  margin: 0;
}

.strategy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.strategy-panel {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 20px;
}

.strategy-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #27272a;
}

.strategy-panel .panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fafafa;
  margin: 0;
}

.strategy-panel .config-btn {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.strategy-panel .config-btn:hover {
  background: #27272a;
  color: #fafafa;
}

.okr-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.okr-item {
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 16px;
}

.okr-item .okr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.okr-item .okr-title {
  font-size: 14px;
  font-weight: 500;
  color: #fafafa;
}

.okr-item .okr-progress {
  font-size: 13px;
  font-weight: 600;
  color: #22c55e;
}

.okr-item .okr-bar {
  width: 100%;
  height: 8px;
  background: #27272a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.okr-item .okr-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.okr-item .okr-key-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.okr-item .kr-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #18181b;
  border-radius: 6px;
  font-size: 12px;
}

.okr-item .kr-name {
  color: #a1a1aa;
}

.okr-item .kr-value {
  color: #fafafa;
  font-weight: 500;
}

.rank-tabs {
  display: flex;
  gap: 4px;
}

.rank-tabs button {
  background: transparent;
  border: 1px solid #27272a;
  color: #a1a1aa;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.rank-tabs button:hover {
  background: #27272a;
  color: #fafafa;
}

.rank-tabs button.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.rank-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 8px;
  transition: all 0.2s;
}

.rank-item:hover {
  border-color: #3f3f46;
  background: #18181b;
}

.rank-item .rank-position {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.rank-item .rank-position.gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.rank-item .rank-position.silver {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.rank-item .rank-position.bronze {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.rank-item .rank-position.normal {
  background: #27272a;
  color: #a1a1aa;
}

.rank-item .rank-info {
  flex: 1;
  min-width: 0;
}

.rank-item .rank-name {
  font-size: 14px;
  font-weight: 500;
  color: #fafafa;
  margin-bottom: 4px;
}

.rank-item .rank-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #a1a1aa;
}

.rank-item .rank-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rank-item .rank-score {
  font-size: 18px;
  font-weight: 600;
  color: #22c55e;
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  .strategy-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Agent Profile Editor ===== */
.profile-editor-panel{display:flex;height:100%;gap:0;overflow-y:auto;max-height:100%}
.profile-sidebar{width:180px;border-right:1px solid #1a1a1a;display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto}
.profile-sidebar-search{padding:12px;border-bottom:1px solid #1a1a1a}
.profile-sidebar-search input{width:100%;background:#18181b;border:1px solid #27272a;border-radius:6px;padding:8px 10px;color:#fafafa;font-size:11px;font-family:inherit;outline:none;transition:border-color .15s}
.profile-sidebar-search input:focus{border-color:#3f3f46}
.profile-sidebar-search input::placeholder{color:#52525b}
.profile-sidebar-list{flex:1;overflow-y:auto;padding:8px}
.profile-agent-item{display:flex;align-items:center;gap:8px;padding:10px;border-radius:8px;cursor:pointer;transition:all .15s;margin-bottom:4px;border:1px solid transparent}
.profile-agent-item:hover{background:#18181b;border-color:#27272a}
.profile-agent-item.selected{background:#18181b;border-color:#3f3f46;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.profile-agent-item .pa-emoji{font-size:20px;flex-shrink:0}
.profile-agent-item .pa-name{font-size:12px;font-weight:600;color:#fafafa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}

.profile-main{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;min-height:0}
.profile-main::-webkit-scrollbar{width:6px}
.profile-main::-webkit-scrollbar-track{background:#0a0a0a}
.profile-main::-webkit-scrollbar-thumb{background:#27272a;border-radius:3px}
.profile-main::-webkit-scrollbar-thumb:hover{background:#3f3f46}
.profile-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;color:#3f3f46;gap:8px}
.profile-empty-icon{font-size:48px;opacity:.5}
.profile-empty-text{font-size:13px}

.profile-basic{margin-bottom:20px;padding:16px;background:#0a0a0a;border:1px solid #1a1a1a;border-radius:10px;overflow:hidden}
.profile-basic-title{font-size:12px;font-weight:600;color:#52525b;text-transform:uppercase;letter-spacing:1px;margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid #1a1a1a}
.profile-basic-grid{display:grid;grid-template-columns:1fr;gap:14px;overflow:hidden}
.profile-basic-full{grid-column:1 / -1;overflow:hidden}
.profile-form-group{margin-bottom:14px}
.profile-form-label{display:block;font-size:11px;color:#a1a1aa;margin-bottom:6px;font-weight:500}
.profile-form-input{width:100%;background:#18181b;border:1px solid #27272a;border-radius:6px;padding:8px 10px;color:#fafafa;font-size:12px;font-family:inherit;transition:border-color .15s;outline:none;box-sizing:border-box;max-width:100%}
.profile-form-input:focus{border-color:#3f3f46}
.profile-form-input:disabled{opacity:.5;cursor:not-allowed}
.profile-form-textarea{width:100%;background:#18181b;border:1px solid #27272a;border-radius:6px;padding:10px 12px;color:#fafafa;font-size:12px;font-family:inherit;transition:border-color .15s;outline:none;resize:vertical;min-height:80px;line-height:1.6;box-sizing:border-box;max-width:100%}
.profile-form-textarea:focus{border-color:#3f3f46}

.profile-avatar-wrap{display:flex;align-items:center;gap:12px;width:100%}
.profile-avatar-preview{width:48px;height:48px;border-radius:50%;background:#27272a;display:flex;align-items:center;justify-content:center;font-size:24px;overflow:hidden;border:2px solid #3f3f46;flex-shrink:0}
.profile-avatar-preview img{width:100%;height:100%;object-fit:cover}
.profile-avatar-upload{padding:6px 12px;background:#27272a;border:1px solid #3f3f46;border-radius:6px;color:#a1a1aa;font-size:11px;cursor:pointer;transition:all .15s;white-space:nowrap;flex-shrink:0}
.profile-avatar-upload:hover{background:#3f3f46;color:#fafafa}
.profile-avatar-upload input{display:none}

.profile-emoji-picker{display:flex;align-items:center;gap:8px;width:100%;overflow:hidden}
.profile-emoji-current{font-size:28px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:#18181b;border-radius:8px;border:1px solid #27272a;flex-shrink:0}
.profile-emoji-btn{padding:6px 12px;background:#27272a;border:1px solid #3f3f46;border-radius:6px;color:#a1a1aa;font-size:11px;cursor:pointer;transition:all .15s;white-space:nowrap;flex-shrink:0}
.profile-emoji-btn:hover{background:#3f3f46;color:#fafafa}
.profile-emoji-popup{position:fixed;background:#18181b;border:1px solid #27272a;border-radius:8px;padding:8px;box-shadow:0 8px 24px rgba(0,0,0,.4);z-index:20001;display:none;max-width:320px;flex-wrap:wrap;gap:4px}
.profile-emoji-popup.show{display:flex}
.profile-emoji-popup span{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:18px;cursor:pointer;border-radius:4px;transition:background .1s}
.profile-emoji-popup span:hover{background:#27272a}

/* Profile inner tabs */
.profile-tabs{display:flex;gap:0;border-bottom:1px solid #1a1a1a;margin-bottom:16px;flex-wrap:wrap}
.profile-tab{padding:10px 16px;font-size:11px;font-weight:600;color:#52525b;border:none;background:transparent;cursor:pointer;font-family:inherit;position:relative;transition:all .15s}
.profile-tab:hover{color:#a1a1aa}
.profile-tab.active{color:#22c55e}
.profile-tab.active::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#22c55e;border-radius:1px}
.profile-tab-pane{display:none}
.profile-tab-pane.active{display:block}

/* Profile markdown editor */
.profile-md-editor{width:100%;min-height:400px;background:#18181b;border:1px solid #27272a;border-radius:8px;padding:14px 16px;color:#fafafa;font-size:12px;font-family:'SF Mono',Menlo,monospace;line-height:1.7;resize:vertical;outline:none;transition:border-color .15s;box-sizing:border-box;max-width:100%}
.profile-md-editor:focus{border-color:#3f3f46}
.profile-md-toolbar{display:flex;gap:4px;margin-bottom:8px}
.profile-md-toolbar button{padding:4px 8px;background:#27272a;border:1px solid #3f3f46;border-radius:4px;color:#a1a1aa;font-size:11px;cursor:pointer;transition:all .15s;font-family:inherit}
.profile-md-toolbar button:hover{background:#3f3f46;color:#fafafa}
.profile-md-toolbar button.active{background:#22c55e;color:#000;border-color:#22c55e}

/* Profile cron table */
.profile-cron-table{width:100%;border-collapse:collapse;font-size:11px}
.profile-cron-table th{text-align:left;padding:8px 10px;color:#52525b;font-weight:600;font-size:10px;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #27272a}
.profile-cron-table td{padding:8px 10px;border-bottom:1px solid #1a1a1a;color:#a1a1aa}
.profile-cron-table tr:hover td{background:#18181b}
.profile-cron-actions{display:flex;gap:4px}
.profile-cron-btn{padding:4px 8px;border-radius:4px;border:none;font-size:10px;cursor:pointer;font-family:inherit;transition:all .15s}
.profile-cron-btn-edit{background:#27272a;color:#a1a1aa;border:1px solid #3f3f46}
.profile-cron-btn-edit:hover{background:#3f3f46;color:#fafafa}
.profile-cron-btn-del{background:rgba(220,38,38,.1);color:#ef4444;border:1px solid rgba(220,38,38,.2)}
.profile-cron-btn-del:hover{background:rgba(220,38,38,.2)}
.profile-cron-add{padding:8px 14px;background:#27272a;border:1px solid #3f3f46;border-radius:6px;color:#a1a1aa;font-size:11px;cursor:pointer;transition:all .15s;font-family:inherit;margin-top:10px;display:inline-flex;align-items:center;gap:4px}
.profile-cron-add:hover{background:#3f3f46;color:#fafafa}

/* Profile cron edit modal */
.profile-cron-modal{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:20000;display:none;align-items:center;justify-content:center}
.profile-cron-modal.show{display:flex}
.profile-cron-modal-body{width:420px;background:#18181b;border:1px solid #27272a;border-radius:12px;padding:20px;box-shadow:0 16px 40px rgba(0,0,0,.5)}
.profile-cron-modal-body h4{font-size:14px;color:#fafafa;margin:0 0 16px;font-weight:600}
.profile-cron-modal-body .profile-form-group{margin-bottom:12px}

/* Profile config dynamic form */
.profile-config-group{margin-bottom:16px;padding:14px;background:#0a0a0a;border:1px solid #1a1a1a;border-radius:8px}
.profile-config-group-title{font-size:11px;font-weight:600;color:#52525b;text-transform:uppercase;letter-spacing:.5px;margin-bottom:10px}

/* Save bar */
.profile-save-bar{padding:16px 0;margin-top:auto;border-top:1px solid #1a1a1a;display:flex;gap:10px;align-items:center;flex-shrink:0;background:#0f0f0f;position:sticky;bottom:0}
.profile-save-btn{padding:10px 24px;background:#22c55e;border:none;border-radius:8px;color:#000;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;font-family:inherit}
.profile-save-btn:hover{background:#16a34a;transform:translateY(-1px)}
.profile-save-btn:active{transform:scale(.98)}
.profile-save-btn:disabled{background:#27272a;color:#52525b;cursor:not-allowed;transform:none}
.profile-save-status{font-size:11px;color:#52525b;transition:all .2s}
.profile-save-status.ok{color:#22c55e}
.profile-save-status.err{color:#ef4444}
.profile-changed-hint{font-size:10px;color:#f59e0b;margin-left:auto}

.insights-grid { display: grid; gap: 16px; padding: 0 32px; }
  .insights-grid .card { background:#18181b; border:1px solid #27272a; border-radius:12px; padding:20px; margin-bottom:16px; }
  .insights-grid .card h3 { font-size:14px; font-weight:600; color:#fafafa; margin:0 0 16px 0; display:flex; align-items:center; gap:8px; }
  .insights-grid .card .subtitle { color:#71717a; font-size:12px; margin:0 0 16px 0; }
  .insights-grid .val-up { color:#22c55e; font-size:24px; font-weight:700; }
  .insights-grid .val-down { color:#ef4444; font-size:24px; font-weight:700; }
  .insights-grid .val-neutral { color:#a1a1aa; font-size:12px; }
  .insights-grid .trend-toggle { display:flex; gap:8px; margin-bottom:16px; }
  .insights-grid .trend-toggle button { background:#27272a; border:1px solid #3f3f46; color:#a1a1aa; padding:6px 14px; border-radius:6px; cursor:pointer; font-size:12px; transition:all .2s; }
  .insights-grid .trend-toggle button.active { background:#22c55e; color:#fff; border-color:#22c55e; }
  .insights-grid .funnel-step { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid #27272a; }
  .insights-grid .funnel-step:last-child { border-bottom:none; }
  .insights-grid .funnel-bar { height:32px; border-radius:6px; background:linear-gradient(90deg,#22c55e,#16a34a); position:relative; display:flex; align-items:center; padding:0 12px; }
  .insights-grid .funnel-bar span { font-size:12px; color:#fff; font-weight:600; white-space:nowrap; }
  .insights-grid .funnel-meta { display:flex; justify-content:space-between; align-items:center; flex:1; }
  .insights-grid .funnel-meta .rate { color:#22c55e; font-size:13px; font-weight:600; }
  .insights-grid .funnel-meta .count { color:#a1a1aa; font-size:12px; }
  .insights-grid .profile-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
  .insights-grid .profile-section h4 { color:#d4d4d8; font-size:13px; margin:0 0 10px 0; font-weight:600; }
  .insights-grid .profile-bar-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
  .insights-grid .profile-bar-row .label { width:60px; color:#a1a1aa; font-size:12px; text-align:right; }
  .insights-grid .profile-bar-row .bar { height:20px; border-radius:4px; background:#22c55e; }
  .insights-grid .profile-bar-row .val { color:#fafafa; font-size:12px; }
  .insights-grid .gender-row { display:flex; gap:16px; margin-bottom:12px; }
  .insights-grid .gender-item { display:flex; align-items:center; gap:6px; }
  .insights-grid .gender-dot { width:10px; height:10px; border-radius:50%; }
  .insights-grid .channel-table { width:100%; border-collapse:collapse; }
  .insights-grid .channel-table th { text-align:left; color:#71717a; font-size:11px; font-weight:500; padding:8px 12px; border-bottom:1px solid #27272a; }
  .insights-grid .channel-table td { padding:10px 12px; font-size:13px; color:#fafafa; border-bottom:1px solid #27272a; }
  .insights-grid .channel-table tr:last-child td { border-bottom:none; }
  .insights-grid .product-list { list-style:none; padding:0; margin:0; }
  .insights-grid .product-list li { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid #27272a; }
  .insights-grid .product-list li:last-child { border-bottom:none; }
  .insights-grid .product-rank { width:24px; height:24px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#fff; flex-shrink:0; }
  .insights-grid .product-rank.top3 { background:linear-gradient(135deg,#f59e0b,#d97706); }
  .insights-grid .product-rank.normal { background:#27272a; color:#a1a1aa; }
  .insights-grid .product-info { flex:1; min-width:0; }
  .insights-grid .product-name { color:#fafafa; font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .insights-grid .product-stats { display:flex; gap:16px; align-items:center; flex-shrink:0; }
  .insights-grid .product-stats span { font-size:12px; color:#a1a1aa; white-space:nowrap; }
  .insights-grid .product-stats .star { color:#22c55e; font-weight:600; }

.factory-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 32px; }
  .factory-grid .card { background:#18181b; border:1px solid #27272a; border-radius:12px; padding:20px; margin-bottom:16px; }
  .factory-grid .card h3 { font-size:14px; font-weight:600; color:#fafafa; margin:0 0 16px 0; display:flex; align-items:center; gap:8px; }
  .factory-grid .card .subtitle { color:#71717a; font-size:12px; margin:0 0 16px 0; }
  
  /* KPI卡片样式 */
  .factory-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .factory-kpi { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:16px; text-align:center; }
  .factory-kpi-label { font-size:11px; color:#71717a; margin-bottom:8px; font-weight:500; }
  .factory-kpi-value { font-size:28px; font-weight:700; margin-bottom:4px; font-variant-numeric:tabular-nums; }
  .factory-kpi-trend { font-size:11px; display:flex; align-items:center; justify-content:center; gap:4px; }
  .factory-kpi-trend.up { color:#22c55e; }
  .factory-kpi-trend.down { color:#ef4444; }
  
  /* 产线状态 */
  .production-line { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:14px; margin-bottom:10px; }
  .production-line:last-child { margin-bottom:0; }
  .production-line-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
  .production-line-name { font-size:13px; font-weight:600; color:#fafafa; display:flex; align-items:center; gap:8px; }
  .production-line-status { font-size:10px; padding:3px 10px; border-radius:12px; font-weight:600; }
  .status-running { background:rgba(34,197,94,.15); color:#22c55e; }
  .status-maintenance { background:rgba(245,158,11,.15); color:#f59e0b; }
  .status-idle { background:rgba(113,113,122,.15); color:#71717a; }
  .production-line-details { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; font-size:11px; }
  .production-line-detail { text-align:center; }
  .production-line-detail .label { color:#71717a; margin-bottom:4px; }
  .production-line-detail .value { color:#fafafa; font-weight:600; }
  
  /* 质量看板 */
  .quality-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
  .quality-metric { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:14px; text-align:center; }
  .quality-metric-label { font-size:11px; color:#71717a; margin-bottom:8px; }
  .quality-metric-value { font-size:24px; font-weight:700; margin-bottom:4px; }
  .quality-metric-bar { height:6px; background:#27272a; border-radius:3px; margin-top:8px; overflow:hidden; }
  .quality-metric-bar-fill { height:100%; border-radius:3px; transition:width .3s; }
  
  /* BOM成本分析 */
  .bom-product { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:14px; margin-bottom:10px; }
  .bom-product:last-child { margin-bottom:0; }
  .bom-product-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
  .bom-product-name { font-size:13px; font-weight:600; color:#fafafa; }
  .bom-product-total { font-size:14px; font-weight:700; color:#22c55e; }
  .bom-breakdown { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
  .bom-item { text-align:center; }
  .bom-item-label { font-size:10px; color:#71717a; margin-bottom:4px; }
  .bom-item-value { font-size:13px; font-weight:600; color:#a1a1aa; }
  .bom-item-bar { height:4px; background:#27272a; border-radius:2px; margin-top:4px; overflow:hidden; }
  .bom-item-bar-fill { height:100%; border-radius:2px; }
  
  /* 库存健康度 */
  .inventory-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
  .inventory-stat { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:14px; text-align:center; }
  .inventory-stat-label { font-size:11px; color:#71717a; margin-bottom:8px; }
  .inventory-stat-value { font-size:22px; font-weight:700; margin-bottom:4px; }
  .inventory-abc { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
  .inventory-abc-item { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:12px; text-align:center; }
  .inventory-abc-label { font-size:14px; font-weight:700; margin-bottom:4px; }
  .inventory-abc-count { font-size:12px; color:#a1a1aa; }
  
  /* 供应商评分卡 */
  .supplier-card { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:14px; margin-bottom:10px; }
  .supplier-card:last-child { margin-bottom:0; }
  .supplier-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
  .supplier-name { font-size:13px; font-weight:600; color:#fafafa; }
  .supplier-score { font-size:16px; font-weight:700; }
  .supplier-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
  .supplier-metric { text-align:center; }
  .supplier-metric-label { font-size:10px; color:#71717a; margin-bottom:4px; }
  .supplier-metric-value { font-size:14px; font-weight:600; margin-bottom:4px; }
  .supplier-metric-bar { height:4px; background:#27272a; border-radius:2px; overflow:hidden; }
  .supplier-metric-bar-fill { height:100%; border-radius:2px; }
  
  /* 现金流预测 */
  .cashflow-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:16px; }
  .cashflow-item { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:14px; text-align:center; }
  .cashflow-item-label { font-size:11px; color:#71717a; margin-bottom:8px; }
  .cashflow-item-value { font-size:20px; font-weight:700; }
  
  /* 甘特图 */
  .gantt-chart { background:#0a0a0a; border:1px solid #27272a; border-radius:8px; padding:16px; }
  .gantt-row { display:grid; grid-template-columns:120px 1fr; gap:12px; align-items:center; margin-bottom:12px; }
  .gantt-row:last-child { margin-bottom:0; }
  .gantt-label { font-size:12px; color:#a1a1aa; font-weight:500; }
  .gantt-bar-container { position:relative; height:28px; background:#27272a; border-radius:4px; }
  .gantt-bar { position:absolute; height:100%; border-radius:4px; display:flex; align-items:center; padding:0 10px; font-size:11px; color:#fff; font-weight:600; }
  .gantt-dates { display:grid; grid-template-columns:120px 1fr; gap:12px; margin-top:12px; padding-top:12px; border-top:1px solid #27272a; }
  .gantt-date-labels { display:flex; justify-content:space-between; font-size:10px; color:#71717a; }
/* ==================== 财务管理页面样式 ==================== */
#page-finance {
  padding: 20px;
}

.finance-overview {
  margin-bottom: 30px;
}

.finance-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
}

.metric-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.metric-change {
  font-size: 13px;
}

.metric-change.positive {
  color: var(--success);
}

.metric-change.negative {
  color: var(--danger);
}

.finance-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 30px;
}

.finance-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
}

.finance-tab-btn:hover {
  color: var(--text-primary);
}

.finance-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.finance-tab-content {
  display: none;
}

.finance-tab-content.active {
  display: block;
}

.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.summary-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item span {
  color: var(--text-secondary);
  font-size: 14px;
}

.summary-item .value {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.summary-item .value.negative {
  color: var(--danger);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.data-table-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--bg-tertiary);
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
}

.data-table .status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.data-table .status-pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.data-table .status-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.data-table .status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.data-table .profit-positive {
  color: var(--success);
  font-weight: 600;
}

.data-table .profit-negative {
  color: var(--danger);
  font-weight: 600;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.metrics-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.metrics-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-row span:first-child {
  color: var(--text-secondary);
  font-size: 14px;
}

.metric-row .value {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.metric-row .value.positive {
  color: var(--success);
}

@media (max-width: 1200px) {
  .finance-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .finance-summary-grid {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== 表单弹窗样式 ==================== */
/* 删除重复的modal-overlay定义，保留第1526行的完整定义 */

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 32px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: 1 / -1;
  padding: 0 28px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-secondary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid var(--border-color);
}

.btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  .form-group.full-width {
    padding: 0 20px;
  }
  
  .form-actions {
    padding: 16px 20px;
  }
  
  .modal-container {
    width: 95%;
  }
}

/* ========== 财务模块扩展样式 ========== */

/* KPI Cards */
.kpi-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: linear-gradient(180deg, #141416 0%, #111113 100%);
  border: 1px solid #1f1f23;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
}

.kpi-card:hover {
  border-color: #2a2a2e;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.kpi-label {
  font-size: 12px;
  color: #71717a;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: #fafafa;
  margin-bottom: 4px;
}

.kpi-change {
  font-size: 12px;
  font-weight: 600;
}

.kpi-change.positive {
  color: #22c55e;
}

.kpi-change.negative {
  color: #ef4444;
}

/* Chart Container */
.chart-container {
  background: linear-gradient(180deg, #141416 0%, #111113 100%);
  border: 1px solid #1f1f23;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 16px;
}

.chart-container canvas {
  width: 100%;
  display: block;
}

/* Section Actions */
.section-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.section-actions select {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #fafafa;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.section-actions select:focus {
  border-color: #22c55e;
}

/* Period Switcher */
.period-switcher {
  display: flex;
  gap: 2px;
  background: #0a0a0a;
  border-radius: 8px;
  padding: 2px;
}

.period-switcher button {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: #71717a;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.period-switcher button.active {
  background: #27272a;
  color: #fafafa;
}

.period-switcher button:hover:not(.active) {
  color: #a1a1aa;
}

/* Report Summary */
.report-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #141416 0%, #111113 100%);
  border: 1px solid #1f1f23;
  border-radius: 12px;
  padding: 20px;
}

.report-summary .summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-summary .label {
  font-size: 12px;
  color: #71717a;
  font-weight: 500;
}

.report-summary .value {
  font-size: 20px;
  font-weight: 700;
  color: #fafafa;
}

/* Withdraw Stats */
.withdraw-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(180deg, #141416 0%, #111113 100%);
  border: 1px solid #1f1f23;
  border-radius: 12px;
  padding: 20px;
}

.stat-label {
  font-size: 12px;
  color: #71717a;
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #fafafa;
}

/* Cost Overview */
.cost-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.cost-card {
  background: linear-gradient(180deg, #141416 0%, #111113 100%);
  border: 1px solid #1f1f23;
  border-radius: 12px;
  padding: 20px;
}

.cost-label {
  font-size: 12px;
  color: #71717a;
  font-weight: 500;
  margin-bottom: 8px;
}

.cost-value {
  font-size: 28px;
  font-weight: 700;
  color: #fafafa;
  margin-bottom: 4px;
}

.cost-change {
  font-size: 12px;
  font-weight: 600;
}

.cost-change.positive {
  color: #22c55e;
}

.cost-change.negative {
  color: #ef4444;
}

/* Commission Stats */
.commission-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* Allocation Summary */
.allocation-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #141416 0%, #111113 100%);
  border: 1px solid #1f1f23;
  border-radius: 12px;
  padding: 20px;
}

.allocation-summary .summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.allocation-summary .label {
  font-size: 12px;
  color: #71717a;
  font-weight: 500;
}

.allocation-summary .value {
  font-size: 20px;
  font-weight: 700;
  color: #fafafa;
}

/* Form Hint */
.form-hint {
  display: block;
  font-size: 11px;
  color: #71717a;
  margin-top: 4px;
}

/* Checkbox Group */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
  background: #0a0a0a;
  border-radius: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #a1a1aa;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #22c55e;
}

.checkbox-item:hover {
  color: #fafafa;
}

/* Positive/Negative text */
.positive {
  color: #22c55e !important;
}

.negative {
  color: #ef4444 !important;
}

/* Finance Tab Button Scroll */
.finance-tabs {
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid #27272a;
}

.finance-tabs::-webkit-scrollbar {
  height: 4px;
}

.finance-tab-btn {
  display: inline-block;
  margin-right: 8px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .kpi-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .report-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .withdraw-stats,
  .commission-stats {
    grid-template-columns: 1fr;
  }
  
  .checkbox-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .kpi-cards {
    grid-template-columns: 1fr;
  }
  
  .report-summary {
    grid-template-columns: 1fr;
  }
  
  .cost-overview {
    grid-template-columns: 1fr;
  }
  
  .allocation-summary {
    grid-template-columns: 1fr;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
}

/* ========== RBAC Permission Toast ========== */
.permission-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 1px solid #ef4444;
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3), 0 0 20px rgba(239, 68, 68, 0.2);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 320px;
  max-width: 500px;
}

.permission-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.permission-toast-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.permission-toast-content {
  flex: 1;
}

.permission-toast-title {
  color: #ef4444;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.permission-toast-desc {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

/* Role switcher menu enhancement */
.role-option.active {
  background: rgba(59, 130, 246, 0.2) !important;
  border-left: 3px solid #3b82f6 !important;
}

.role-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   组织架构树 - 企业微信风格
   ============================================ */

/* 操作按钮区 */
.org-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #111;
  border-radius: 8px;
  border: 1px solid #1f1f23;
  flex-wrap: wrap;
  align-items: center;
}

.org-search {
  flex: 1;
  max-width: 300px;
  min-width: 180px;
  padding: 8px 12px;
  background: #0a0a0a;
  border: 1px solid #27272a;
  border-radius: 6px;
  color: #fafafa;
  font-size: 13px;
}
.org-search:focus {
  outline: none;
  border-color: #22c55e;
}
.org-search::placeholder { color: #52525b; }

.org-action-btn {
  padding: 6px 14px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.org-action-btn:hover { background: #27272a; color: #fafafa; }

/* 公司根节点 */
.org-company {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.05);
}

.org-company-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.org-company-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  backdrop-filter: blur(10px);
}

.org-company-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.org-company-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.org-company-stats {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.org-company-stat {
  text-align: center;
  padding: 10px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  min-width: 72px;
  backdrop-filter: blur(10px);
}

.org-company-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  font-family: 'SF Mono', Menlo, monospace;
}

.org-company-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* 部门容器 */
.org-dept {
  background: #0e0e10;
  border: 1px solid #1f1f23;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.org-dept:hover {
  border-color: #2a2a2e;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.org-dept-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: linear-gradient(90deg, #141416 0%, #0e0e10 100%);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  gap: 10px;
}

.org-dept-header:hover {
  background: linear-gradient(90deg, #1a1a1c 0%, #141416 100%);
}

.org-dept-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #52525b;
  transition: transform 0.3s ease;
  font-size: 10px;
  flex-shrink: 0;
}

.org-dept-toggle.expanded {
  transform: rotate(90deg);
}

.org-dept-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.org-dept-icon.dept-tech { background: rgba(99,102,241,0.15); }
.org-dept-icon.dept-product { background: rgba(168,85,247,0.15); }
.org-dept-icon.dept-ops { background: rgba(236,72,153,0.15); }
.org-dept-icon.dept-market { background: rgba(249,115,22,0.15); }
.org-dept-icon.dept-finance { background: rgba(34,197,94,0.15); }
.org-dept-icon.dept-hr { background: rgba(59,130,246,0.15); }
.org-dept-icon.dept-sales { background: rgba(245,158,11,0.15); }
.org-dept-icon.dept-supply { background: rgba(20,184,166,0.15); }
.org-dept-icon.dept-default { background: rgba(113,113,122,0.15); }

.org-dept-info {
  flex: 1;
  min-width: 0;
}

.org-dept-name {
  font-size: 15px;
  font-weight: 600;
  color: #e4e4e7;
}

.org-dept-leader {
  font-size: 11px;
  color: #71717a;
  margin-top: 1px;
}

.org-dept-count {
  background: #18181b;
  color: #a1a1aa;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  border: 1px solid #27272a;
}

/* 部门内容区 */
.org-dept-content {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  border-top: 1px solid #1f1f23;
  max-height: 800px;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.org-dept-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

/* 员工卡片 - 企业微信风格 */
.org-emp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #141416;
  border: 1px solid #1f1f23;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.org-emp-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: 3px 0 0 3px;
  transition: background 0.2s;
}

.org-emp-card:hover {
  background: #1a1a1c;
  border-color: #2a2a2e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 管理者标识 */
.org-emp-card.is-manager::before {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.org-emp-card.is-manager {
  background: linear-gradient(90deg, rgba(245,158,11,0.04) 0%, #141416 60%);
}

/* 员工头像 */
.org-emp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  letter-spacing: 1px;
}

.org-emp-avatar.bg-0 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.org-emp-avatar.bg-1 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.org-emp-avatar.bg-2 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.org-emp-avatar.bg-3 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.org-emp-avatar.bg-4 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.org-emp-avatar.bg-5 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.org-emp-avatar.bg-6 { background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%); }
.org-emp-avatar.bg-7 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }

/* 管理者皇冠 */
.org-emp-crown {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 14px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  z-index: 1;
}

/* 员工信息 */
.org-emp-info {
  flex: 1;
  min-width: 0;
}

.org-emp-name {
  font-size: 13px;
  font-weight: 600;
  color: #e4e4e7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.org-emp-manager-tag {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.org-emp-position {
  font-size: 11px;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* 状态指示灯 */
.org-emp-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.org-emp-status.active { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.org-emp-status.probation { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.3); }
.org-emp-status.resigned { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.3); }

/* 部门人力统计面板 */
.org-stats-panel {
  background: #0e0e10;
  border: 1px solid #1f1f23;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.org-stats-title {
  font-size: 14px;
  font-weight: 600;
  color: #e4e4e7;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.org-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.org-stat-card {
  background: #141416;
  border: 1px solid #1f1f23;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.org-stat-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
}

.org-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #fafafa;
  font-family: 'SF Mono', Menlo, monospace;
}

.org-stat-label {
  font-size: 11px;
  color: #71717a;
}

/* 空状态 */
.org-empty {
  text-align: center;
  padding: 60px 20px;
  color: #52525b;
}

.org-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.org-empty-text {
  font-size: 14px;
  color: #71717a;
}

/* ========== 业务运营页面美化 ========== */
.page-operations {
  animation: fadeIn 0.4s ease-in-out;
}

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

.page-operations .metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.page-operations .metric-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.page-operations .metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.page-operations .metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.page-operations .metric-card:hover::before {
  transform: scaleX(1);
}

.page-operations .metric-label {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-weight: 500;
}

.page-operations .metric-value {
  font-size: 32px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 8px;
  font-family: 'DIN', 'Arial', sans-serif;
}

.page-operations .metric-change {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-operations .metric-change.up {
  color: #10b981;
}

.page-operations .metric-change.down {
  color: #ef4444;
}

/* 图表容器 */
.chart-container {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.chart-title {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

/* 环形图 */
.donut-chart {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
}

.donut-svg {
  transform: rotate(-90deg);
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.2));
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #cbd5e1;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 柱状图 */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding: 16px;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bar {
  width: 100%;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: all 0.3s ease;
  animation: barGrow 0.6s ease-out;
}

@keyframes barGrow {
  from { height: 0; }
}

.bar:hover {
  filter: brightness(1.2);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.bar-label {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.bar-value {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
}

/* 折线图 */
.line-chart {
  padding: 16px;
}

.line-svg {
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.15));
}

.line-chart .line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: lineDraw 1s ease-out;
}

@keyframes lineDraw {
  from { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
  to { stroke-dasharray: 1000; stroke-dashoffset: 0; }
}

.line-chart .dot {
  fill: #fff;
  stroke-width: 2;
  animation: dotPop 0.3s ease-out 0.8s both;
}

@keyframes dotPop {
  from { r: 0; }
  to { r: 4; }
}

/* 审批流转动画 */
.approval-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.approval-flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.step-dot.done {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  animation: stepComplete 0.4s ease-out;
}

@keyframes stepComplete {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.step-dot.current {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  animation: stepPulse 2s infinite;
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

.step-dot.waiting {
  background: rgba(71, 85, 105, 0.3);
  color: #64748b;
  border: 2px dashed rgba(71, 85, 105, 0.5);
}

.approval-flow-arrow {
  color: #475569;
  font-size: 18px;
  animation: arrowMove 0.6s ease-out;
}

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

/* 子Tab切换动画 */
.ops-subtab-content {
  animation: tabFadeIn 0.3s ease-in-out;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 数据卡片悬停效果 */
.page-operations .card {
  transition: all 0.3s ease;
}

.page-operations .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 进度条动画 */
.progress-bar {
  height: 8px;
  background: rgba(71, 85, 105, 0.3);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
  animation: progressGrow 1s ease-out;
  position: relative;
}

@keyframes progressGrow {
  from { width: 0; }
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 徽章动画 */
.page-operations .badge {
  animation: badgePop 0.3s ease-out;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.page-operations .badge.urgent {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
