* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"PingFang SC","Microsoft YaHei",sans-serif; background:#f0f2f5; color:#1a1a2e; font-size:14px; }
.app-layout { display:flex; min-height:100vh; }
.sidebar { width:220px; background:#0f1629; color:#fff; position:fixed; top:0; bottom:0; overflow-y:auto; z-index:100; }
.logo { padding:20px; font-size:16px; font-weight:700; border-bottom:1px solid rgba(255,255,255,.1); }
.nav { padding:8px 0; }
.nav-group-title { padding:12px 20px 4px; font-size:11px; color:#5a6a8a; letter-spacing:1px; }
.nav a { display:flex; align-items:center; gap:8px; padding:10px 20px; color:#8b9bb4; cursor:pointer; font-size:13px; transition:all .2s; }
.nav a:hover { background:rgba(255,255,255,.05); color:#fff; }
.nav a.active { background:rgba(59,130,246,.15); color:#60a5fa; border-right:3px solid #3b82f6; }
.nav-icon { width:20px; text-align:center; font-size:14px; }
.main { margin-left:220px; flex:1; }
.topbar { background:#fff; padding:0 24px; height:56px; display:flex; align-items:center; justify-content:space-between; box-shadow:0 1px 4px rgba(0,0,0,.06); position:sticky; top:0; z-index:50; }
.topbar-title { font-size:16px; font-weight:600; }
.topbar-right { display:flex; align-items:center; gap:12px; }
.filter-select { padding:6px 12px; border:1px solid #e2e8f0; border-radius:6px; font-size:13px; background:#fff; }
.user-menu { position:relative; display:flex; align-items:center; gap:8px; cursor:pointer; padding:6px 12px; border-radius:6px; }
.user-menu:hover { background:#f1f5f9; }
.user-avatar { width:30px; height:30px; border-radius:50%; background:#3b82f6; color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:600; }
.user-dropdown { position:absolute; top:100%; right:0; background:#fff; border:1px solid #e2e8f0; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,.1); min-width:140px; display:none; }
.user-menu:hover .user-dropdown, .user-dropdown:hover { display:block; }
.user-dropdown a { display:block; padding:10px 16px; font-size:13px; cursor:pointer; }
.user-dropdown a:hover { background:#f1f5f9; }
.content { padding:20px 24px; }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; margin-bottom:20px; }
.kpi-card { background:#fff; border-radius:10px; padding:18px 20px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.kpi-label { font-size:12px; color:#94a3b8; margin-bottom:6px; }
.kpi-value { font-size:26px; font-weight:700; color:#0f172a; font-family:"SF Mono",Consolas,monospace; }
.kpi-sub { font-size:11px; color:#64748b; margin-top:4px; }
.card { background:#fff; border-radius:10px; padding:20px; box-shadow:0 1px 3px rgba(0,0,0,.05); margin-bottom:16px; }
.card-title { font-size:15px; font-weight:600; margin-bottom:14px; display:flex; align-items:center; justify-content:space-between; }
.chart-box { height:320px; }
table.data-table { width:100%; border-collapse:collapse; font-size:13px; }
table.data-table th { text-align:left; padding:10px 12px; background:#f8fafc; color:#475569; font-weight:600; border-bottom:2px solid #e2e8f0; white-space:nowrap; }
table.data-table td { padding:10px 12px; border-bottom:1px solid #f1f5f9; color:#334155; }
table.data-table tr:hover td { background:#f8fafc; }
.badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; }
.badge-green { background:#dcfce7; color:#166534; }
.badge-yellow { background:#fef9c3; color:#854d0e; }
.badge-red { background:#fee2e2; color:#991b1b; }
.badge-blue { background:#dbeafe; color:#1e40af; }
.badge-gray { background:#f1f5f9; color:#64748b; }
.btn { padding:7px 16px; border-radius:6px; border:none; cursor:pointer; font-size:13px; font-weight:500; transition:all .2s; }
.btn-primary { background:#3b82f6; color:#fff; }
.btn-primary:hover { background:#2563eb; }
.btn-danger { background:#ef4444; color:#fff; }
.btn-sm { padding:4px 10px; font-size:12px; }
input,textarea,select { font-family:inherit; font-size:13px; }
.form-input { width:100%; padding:8px 12px; border:1px solid #e2e8f0; border-radius:6px; margin-bottom:10px; }
.form-input:focus { outline:none; border-color:#3b82f6; }
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.4); display:flex; align-items:center; justify-content:center; z-index:1000; }
.modal { background:#fff; border-radius:12px; padding:28px; min-width:400px; max-width:600px; max-height:80vh; overflow-y:auto; }
.modal h3 { margin-bottom:16px; font-size:17px; }
.modal input { width:100%; padding:9px 12px; border:1px solid #e2e8f0; border-radius:6px; margin-bottom:10px; }
.modal button { padding:9px 20px; background:#3b82f6; color:#fff; border:none; border-radius:6px; cursor:pointer; margin-right:8px; margin-top:8px; }
.modal .btn-cancel { background:#e2e8f0; color:#475569; }
.modal-hint { font-size:12px; color:#94a3b8; margin-bottom:12px; }
.feishu-row { margin-bottom:8px; }
.feishu-row label { display:block; font-size:12px; color:#64748b; margin-bottom:2px; }
.feishu-row input { font-size:12px; }
.toast { position:fixed; top:20px; left:50%; transform:translateX(-50%); padding:12px 24px; border-radius:8px; color:#fff; font-size:14px; z-index:2000; box-shadow:0 4px 12px rgba(0,0,0,.15); }
.toast.success { background:#16a34a; } .toast.error { background:#dc2626; } .toast.info { background:#3b82f6; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.tag { display:inline-block; padding:2px 8px; background:#eff6ff; color:#1d4ed8; border-radius:4px; font-size:11px; margin:1px; }
.score-s { color:#16a34a; font-weight:700; } .score-a { color:#3b82f6; font-weight:700; }
.score-b { color:#d97706; font-weight:700; } .score-c { color:#ea580c; font-weight:700; } .score-d { color:#dc2626; font-weight:700; }

.chart-container{width:100%;height:300px;min-height:300px;position:relative;}
.chart-row{display:flex;gap:16px;margin-bottom:16px;flex-wrap:wrap;}
.chart-row .card{flex:1;min-width:300px;position:relative;}


/* V2.3 新增样式 */
.filter-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-wrap:wrap;gap:10px}
.filter-tabs{display:flex;gap:4px}
.filter-tabs button{padding:6px 14px;border:1px solid #e5e7eb;background:#fff;border-radius:6px;cursor:pointer;font-size:13px;transition:all .2s}
.filter-tabs button:hover{border-color:#3b82f6;color:#3b82f6}
.filter-tabs button.active{background:#3b82f6;color:#fff;border-color:#3b82f6}
.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%}
.status-dot.scaling{background:#10b981;box-shadow:0 0 6px #10b981}
.status-dot.declining{background:#ef4444;box-shadow:0 0 6px #ef4444}
.status-dot.normal{background:#9ca3af}
.status-dot.new{background:#3b82f6;box-shadow:0 0 6px #3b82f6}
.status-dot.stopped{background:#d1d5db}
.btn-sm{padding:4px 12px;font-size:12px;border:1px solid #e5e7eb;background:#fff;border-radius:4px;cursor:pointer}
.btn-sm:hover{border-color:#3b82f6;color:#3b82f6}
.drawer-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.4);z-index:1000;display:flex;justify-content:flex-end}
.drawer{width:720px;max-width:90vw;height:100%;background:#fff;box-shadow:-4px 0 20px rgba(0,0,0,.15);display:flex;flex-direction:column;animation:slideIn .25s ease}
@keyframes slideIn{from{transform:translateX(100%)}to{transform:translateX(0)}}
.drawer-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e5e7eb}
.drawer-header h3{font-size:16px;margin:0;max-width:600px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.drawer-close{background:none;border:none;font-size:20px;cursor:pointer;color:#999;padding:4px 8px}
.drawer-close:hover{color:#333}
.drawer-body{flex:1;overflow-y:auto;padding:16px 20px}
.diagnosis-item{padding:8px 0;line-height:1.6;font-size:14px}
.tag-info{background:#eff6ff;color:#3b82f6}
.modal-lg{max-width:680px;width:90%}
.feishu-row{display:flex;align-items:center;gap:10px;padding:6px 0}
.feishu-row label{min-width:100px;font-size:13px}
.feishu-row input{flex:1;padding:6px 10px;border:1px solid #ddd;border-radius:4px;font-size:13px}

.mat-thumb:hover{opacity:0.8;transform:scale(1.05);transition:all .2s}
.funnel-viz{display:flex;flex-direction:column;align-items:center;gap:8px;padding:20px}
.funnel-step{position:relative;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;padding:16px 32px;border-radius:8px;text-align:center;min-width:280px;transition:all .3s}
.funnel-step:nth-child(2){min-width:240px;background:linear-gradient(135deg,#6366f1,#4f46e5)}
.funnel-step:nth-child(3){min-width:200px;background:linear-gradient(135deg,#8b5cf6,#7c3aed)}
.funnel-step:nth-child(4){min-width:160px;background:linear-gradient(135deg,#a855f7,#9333ea)}
.funnel-step:nth-child(5){min-width:120px;background:linear-gradient(135deg,#d946ef,#c026d3)}
.funnel-step .label{font-size:14px;font-weight:600}
.funnel-step .value{font-size:24px;font-weight:700;margin-top:4px}
.funnel-step .rate{font-size:12px;opacity:0.85;margin-top:2px}
.funnel-arrow{color:#9ca3af;font-size:20px}

@keyframes spin{to{transform:rotate(360deg)}}

.sortable{cursor:pointer!important;user-select:none;white-space:nowrap}
.sortable:hover{color:#3b82f6!important}
.sort-arrow{font-size:10px;margin-left:2px;color:#999}
.sortable:hover .sort-arrow{color:#3b82f6}

.score-ring{width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.score-inner{width:58px;height:58px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700}
.spinner-border{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite;margin-right:6px;vertical-align:middle}

.tab-btn{padding:8px 20px;border:none;background:none;cursor:pointer;font-size:14px;color:#6b7280;border-bottom:2px solid transparent;margin-bottom:-1px;}
.tab-btn.active{color:#2563eb;border-bottom-color:#2563eb;font-weight:500;}
.tab-btn:hover{color:#2563eb;}
