/* ============================================================
   SCC 托管云 · 智能调度中心 —— 仿深信服控制台风格主题
   ============================================================ */
:root {
  --primary: #2F6FED;
  --primary-hover: #578BFF;
  --primary-bg: rgba(47, 111, 237, .08);
  --danger: #F54A4A;
  --danger-hover: #FF7A7A;
  --success: #23A55A;
  --success-bg: rgba(35, 165, 90, .1);
  --warn: #F5A623;
  --warn-bg: rgba(245, 166, 35, .12);
  --sidebar-bg: #0F1D33;
  --sidebar-text: #A9B7CE;
  --bg: #F0F2F5;
  --card: #FFFFFF;
  --border: #E4E9F2;
  --text: #1F2D3D;
  --text-2: #5A6B82;
  --text-3: #8A97A8;
  /* 层级色 */
  --t1: #F5A623;  /* L1 金 */
  --t2: #4C7FE8;  /* L2 蓝 */
  --t3: #94A0B4;  /* L3 灰 */
  /* 资源池色 */
  --pool-gold: #F5A623;
  --pool-silver: #4C7FE8;
  --pool-bronze: #A87C4F;
  --shadow: 0 1px 4px rgba(15, 29, 51, .06);
  --radius: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.muted { color: var(--text-2); font-weight: normal; }
b { font-weight: 600; }

/* ============ 整体布局 ============ */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ============ 左侧导航 ============ */
.sidebar {
  width: 220px; flex: 0 0 220px; background: var(--sidebar-bg);
  display: flex; flex-direction: column; color: var(--sidebar-text);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 7px; flex: 0 0 34px;
  background: linear-gradient(135deg, #2F6FED, #6DA3FF);
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center;
}
.logo-name { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; }
.logo-mod { font-size: 11px; color: var(--sidebar-text); margin-top: 1px; }
.nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 6px; color: var(--sidebar-text); cursor: pointer;
  text-decoration: none; font-size: 13px; transition: background .15s, color .15s;
  position: relative;
}
.nav-item svg { width: 16px; height: 16px; flex: 0 0 16px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-hot {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--warn);
  animation: blink 1.6s infinite;
}
.nav-item.active .nav-hot { background: #fff; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.demo-badge {
  display: inline-block; font-size: 11px; color: var(--warn);
  background: rgba(245,166,35,.12); border: 1px solid rgba(245,166,35,.35);
  padding: 3px 8px; border-radius: 10px;
}
.ver { margin-top: 8px; font-size: 11px; color: rgba(169,183,206,.6); }

/* ============ 顶部栏 ============ */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 54px; flex: 0 0 54px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.crumb { font-size: 13px; color: var(--text-2); }
.crumb b { color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary-bg);
  color: var(--primary); font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.content { flex: 1; overflow-y: auto; padding: 18px 20px 32px; }
.screen { display: none; animation: screenIn .25s ease; }
.screen.active { display: block; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ 通用组件 ============ */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.empty { color: var(--text-3); padding: 20px; text-align: center; border: 1px dashed var(--border); border-radius: 6px; font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 4px; font-size: 13px; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 14px; font-weight: 600; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 3px 10px; border-radius: 10px; background: var(--bg); color: var(--text-2);
  border: 1px solid transparent; white-space: nowrap;
}
.chip-info { background: var(--primary-bg); color: var(--primary); }
.chip-warn { background: var(--warn-bg); color: #C77E00; }
.chip-mini { font-size: 11px; padding: 2px 8px; background: var(--bg); color: var(--text-3); }
.chip-ok { background: var(--success-bg); color: var(--success); }

.screen-title { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.screen-title h2 { font-size: 18px; font-weight: 600; }
.screen-title p { margin-top: 4px; font-size: 12px; }

/* ============ 导览页 ============ */
.hero {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, #0F1D33 0%, #14294A 55%, #1B3A6E 100%);
  border-radius: 10px; padding: 34px 40px; color: #fff; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px;
  border-radius: 50%; background: radial-gradient(circle, rgba(87,139,255,.28), transparent 70%);
}
.hero-kicker { font-size: 12px; letter-spacing: 2px; color: #8FB3FF; margin-bottom: 10px; }
.hero h1 { font-size: 30px; font-weight: 700; margin-bottom: 10px; }
.hero-sub { font-size: 14px; color: #C6D4EF; margin-bottom: 16px; }
.hero-sub b { color: #FFC95C; }
.hero-meta { display: flex; gap: 8px; }
.hero-meta .chip { background: rgba(255,255,255,.1); color: #DCE6FA; }
.hero-right { flex: 0 0 220px; display: flex; justify-content: center; position: relative; z-index: 1; }
.hero-orbit { position: relative; width: 190px; height: 190px; }
.orbit-core {
  position: absolute; inset: 62px; border-radius: 50%;
  background: linear-gradient(135deg, #2F6FED, #6DA3FF);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; box-shadow: 0 0 26px rgba(87,139,255,.65);
}
.orbit-ring { position: absolute; border-radius: 50%; border: 1px dashed rgba(143,179,255,.4); }
.orbit-ring.r1 { inset: 34px; animation: spin 14s linear infinite; }
.orbit-ring.r2 { inset: 6px; animation: spin 22s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-node {
  position: absolute; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35);
  animation: float 3.4s ease-in-out infinite;
}
.orbit-node.n1 { background: var(--t1); top: 22px; left: 78px; }
.orbit-node.n2 { background: var(--t2); bottom: 16px; left: 16px; animation-delay: 1.1s; }
.orbit-node.n3 { background: var(--t3); bottom: 16px; right: 16px; animation-delay: 2.2s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.act-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.act-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.act-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.act-card.a1::before { background: var(--t2); }
.act-card.a2::before { background: var(--danger); }
.act-card.a3::before { background: var(--success); }
.act-card.hot { border-color: rgba(245,74,74,.4); box-shadow: 0 2px 12px rgba(245,74,74,.12); }
.act-tag { font-size: 11px; color: var(--text-2); margin-bottom: 8px; }
.act-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.act-card p { font-size: 12px; color: var(--text-2); margin-bottom: 10px; min-height: 34px; }
.act-points { list-style: none; margin-bottom: 14px; flex: 1; }
.act-points li { font-size: 12px; color: var(--text); padding: 4px 0 4px 16px; position: relative; }
.act-points li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-size: 11px; }
.act-foot { display: flex; align-items: center; justify-content: space-between; }

.concept-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.concept-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.concept-item .c-head { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 4px; }
.concept-item .c-desc { font-size: 11px; color: var(--text-2); line-height: 1.5; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 9px; }

/* ============ 总览页 ============ */
.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat-num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--text-2); margin: 4px 0 6px; }
.stat-sub { font-size: 11px; color: var(--text-3); }
.stat-num.t1 { color: var(--t1); } .stat-num.t2 { color: var(--t2); } .stat-num.t3 { color: var(--t3); }
.stat-num.ok { color: var(--success); }

.grid-3 { display: grid; grid-template-columns: 1.05fr 1.25fr 1fr; gap: 14px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
.grid-2 > .card, .grid-2 > div > .card { margin-bottom: 14px; }

/* 分层列表 */
.tier-block { margin-bottom: 14px; }
.tier-block:last-child { margin-bottom: 0; }
.tier-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.tier-head .cnt { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--text-2); }
.tier-body { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.tier-body.t1 { border-left: 3px solid var(--t1); }
.tier-body.t2 { border-left: 3px solid var(--t2); }
.tier-body.t3 { border-left: 3px solid var(--t3); }
.app-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; }
.app-row .vm-count { margin-left: auto; color: var(--text-3); font-size: 11px; }

/* 资源池 */
.pool-block { margin-bottom: 16px; }
.pool-block:last-child { margin-bottom: 0; }
.pool-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.pool-head .p-desc { font-weight: 400; font-size: 11px; color: var(--text-3); }
.host-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.host-card {
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  background: #FBFCFE; transition: all .25s; position: relative;
}
.host-card .host-name { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.host-card .host-name .tag { font-size: 10px; color: var(--text-3); font-weight: 400; }
.host-card .util-bar { height: 4px; background: #EDF1F7; border-radius: 2px; margin: 6px 0; overflow: hidden; }
.host-card .util-fill { height: 100%; border-radius: 2px; transition: width .5s ease; }
.host-card .vm-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.vmchip {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10px;
  padding: 1px 6px; border-radius: 8px; background: var(--bg); color: var(--text-2);
}
.vmchip i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.host-card.failed { border-color: var(--danger); background: #FFF1F1; animation: shake .5s ease; }
.host-card.failed .host-name { color: var(--danger); }
.host-card .fail-flag {
  position: absolute; top: -8px; right: 8px; background: var(--danger); color: #fff;
  font-size: 10px; padding: 2px 8px; border-radius: 8px; box-shadow: 0 1px 6px rgba(245,74,74,.5);
}
@keyframes shake { 0%,100%{transform:none} 20%{transform:translateX(-3px)} 40%{transform:translateX(3px)} 60%{transform:translateX(-2px)} 80%{transform:translateX(2px)} }

/* SLA 仪表 */
.gauge-wrap { display: flex; flex-direction: column; align-items: center; padding: 4px 0; }
.gauge-value { font-size: 26px; font-weight: 700; color: var(--success); margin-top: 2px; }
.gauge-label { font-size: 11px; color: var(--text-3); }

/* 事件流 */
.feed { max-height: 240px; overflow-y: auto; }
.feed-item { display: flex; gap: 8px; padding: 7px 4px; border-bottom: 1px dashed #EEF2F8; font-size: 12px; animation: feedIn .4s ease; }
.feed-item:last-child { border-bottom: none; }
.feed-time { color: var(--text-3); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.feed-type { flex: 0 0 auto; font-weight: 600; }
.feed-text { color: var(--text-2); }
@keyframes feedIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.event-stat { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.event-stat b { font-variant-numeric: tabular-nums; }

/* ============ 故障演练页 ============ */
.drill-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, #3B0F0F 0%, #5C1717 60%, #7A1F1F 100%);
  border-radius: 10px; padding: 20px 26px; color: #fff; margin-bottom: 14px;
}
.drill-banner.done { background: linear-gradient(120deg, #0B2E1C 0%, #13472B 60%, #1A5C39 100%); }
.drill-kicker { font-size: 11px; letter-spacing: 2px; color: #FFB3B3; margin-bottom: 6px; }
.drill-banner.done .drill-kicker { color: #8FE0B4; }
.drill-banner h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.drill-banner .muted { color: #E8C4C4; }
.drill-banner.done .muted { color: #BCE5CD; }
.drill-banner-right { display: flex; align-items: center; gap: 12px; }
.drill-banner .chip { background: rgba(255,255,255,.12); color: #fff; }
.drill-left { min-width: 0; }

.pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245,74,74,.55); } 70% { box-shadow: 0 0 0 14px rgba(245,74,74,0); } 100% { box-shadow: 0 0 0 0 rgba(245,74,74,0); } }

/* 曲线图 */
.curve-wrap { position: relative; }
.curve-legend { display: flex; gap: 14px; margin-bottom: 8px; font-size: 12px; }
.curve-legend span { display: inline-flex; align-items: center; gap: 6px; }
.curve-legend i { width: 16px; height: 0; border-top: 2px solid; display: inline-block; }
.curve-legend .lg-bad i { border-top-style: dashed; border-top-color: var(--danger); }
.curve-legend .lg-good i { border-top-color: var(--success); }
.curve-wrap svg { display: block; width: 100%; height: auto; }
.curve-bad, .curve-good { opacity: 0; }
.curve-fault-line { stroke: var(--danger); stroke-dasharray: 4 4; }

/* 损失对比 */
.loss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.loss-card { border-radius: 8px; padding: 12px 14px; border: 1px solid var(--border); }
.loss-card.bad { background: #FFF5F5; border-color: #FFD9D9; }
.loss-card.good { background: #F2FBF6; border-color: #C9EFDA; }
.loss-head { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.loss-num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.loss-card.bad .loss-num { color: var(--danger); }
.loss-card.good .loss-num { color: var(--success); }
.loss-rows { margin-top: 8px; font-size: 11px; color: var(--text-2); line-height: 1.9; }
.loss-rows b { color: var(--text); }

/* 等待队列 */
.queue-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px; margin-bottom: 6px; font-size: 12px;
  animation: feedIn .4s ease; background: #FBFCFE;
}
.queue-item .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t3); animation: qPulse 1.4s infinite; }
@keyframes qPulse { 0% { box-shadow: 0 0 0 0 rgba(148,160,180,.5); } 100% { box-shadow: 0 0 0 7px rgba(148,160,180,0); } }
.queue-item .q-note { margin-left: auto; font-size: 11px; color: var(--warn); }

/* ============ 成本对比页 ============ */
.save-banner {
  display: flex; align-items: baseline; gap: 18px;
  background: linear-gradient(120deg, #0B2E1C 0%, #13472B 55%, #1A5C39 100%);
  border-radius: 10px; padding: 22px 28px; color: #fff; margin-bottom: 14px;
}
.save-num { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; color: #7CE8A8; }
.save-label { font-size: 13px; color: #BCE5CD; }
.save-sub { margin-left: auto; font-size: 12px; color: #8FC9A8; }

.cmp-table { width: 100%; font-size: 12px; }
.cmp-table td { padding: 8px 6px; border-bottom: 1px dashed #EEF2F8; }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table .metric { color: var(--text-2); width: 96px; }
.cmp-table .bar-cell { width: 46%; }
.cmp-bar { height: 8px; background: #EDF1F7; border-radius: 4px; overflow: hidden; }
.cmp-bar i { display: block; height: 100%; border-radius: 4px; transition: width .6s ease; }
.cmp-bar.bad i { background: #C3CCD9; }
.cmp-bar.good i { background: var(--primary); }
.cmp-num { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-num.bad { color: var(--text-3); }
.cmp-num.good { color: var(--primary); }

.host-chart { display: flex; align-items: flex-end; gap: 40px; padding: 10px 30px 0; }
.host-bar-col { flex: 1; text-align: center; }
.host-bar { height: 130px; display: flex; align-items: flex-end; justify-content: center; }
.host-bar i { width: 54px; border-radius: 6px 6px 0 0; transition: height .6s ease; }
.host-bar i.bad { background: linear-gradient(#D7DEE9, #C3CCD9); }
.host-bar i.good { background: linear-gradient(#578BFF, #2F6FED); }
.host-bar-num { font-size: 18px; font-weight: 700; margin-top: 6px; }
.host-bar-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.host-bar-num.good { color: var(--primary); } .host-bar-num.bad { color: var(--text-3); }

.roi-form { display: flex; flex-direction: column; gap: 14px; }
.roi-row label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.roi-row label b { color: var(--primary); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--primary); }
.roi-output { background: #F7FAFF; border: 1px solid #DCE8FF; border-radius: 8px; padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.roi-item { text-align: center; }
.roi-item .v { font-size: 20px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.roi-item .l { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* ============ 策略配置页 ============ */
.policy-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.policy-col { border: 1px solid var(--border); border-radius: 8px; min-height: 320px; padding: 10px; transition: all .15s; }
.policy-col.drag-over { border-style: dashed; border-color: var(--primary); background: var(--primary-bg); }
.col-head { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 8px; padding: 0 2px; }
.col-head .cnt { margin-left: auto; font-weight: 400; font-size: 11px; color: var(--text-3); }
.col-head small { display: block; font-weight: 400; font-size: 10px; color: var(--text-3); }
.app-card {
  border: 1px solid var(--border); border-radius: 6px; padding: 9px 10px; margin-bottom: 8px;
  background: #fff; cursor: grab; font-size: 12px; border-left: 3px solid var(--border);
  transition: transform .15s, box-shadow .15s; user-select: none;
}
.app-card:hover { box-shadow: 0 2px 8px rgba(15,29,51,.1); transform: translateY(-1px); }
.app-card:active { cursor: grabbing; }
.app-card.dragging { opacity: .5; }
.app-card .ac-head { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.app-card .ac-head .grip { margin-left: auto; color: #C3CCD9; letter-spacing: -2px; font-size: 14px; }
.app-card .ac-vm { margin-top: 4px; font-size: 11px; color: var(--text-3); }

.strategy-card { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.strategy-card:last-child { margin-bottom: 0; }
.strategy-head { padding: 10px 14px; font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.strategy-head .s-desc { font-weight: 400; font-size: 11px; color: var(--text-3); }
.strategy-body { border-top: 1px solid var(--border); padding: 10px 14px; display: flex; flex-direction: column; gap: 10px; }
.strat-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-2); gap: 10px; }
.strat-row input[type=range] { width: 120px; }
.strat-row select { border: 1px solid var(--border); border-radius: 4px; padding: 3px 6px; font-size: 12px; color: var(--text); background: #fff; }
.strat-row .v { color: var(--primary); font-weight: 600; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }

.switch { position: relative; width: 34px; height: 18px; flex: 0 0 34px; cursor: pointer; }
.switch input { display: none; }
.switch i {
  position: absolute; inset: 0; border-radius: 9px; background: #C3CCD9; transition: background .15s;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { left: 18px; }

.rule-list { display: flex; flex-direction: column; gap: 8px; }
.rule-item { font-size: 12px; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; background: #FBFCFE; }
.rule-code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 11px; color: var(--text); }
.rule-code .kw { color: var(--primary); font-weight: 600; }
.rule-code .vt { color: #B26A00; }
.rule-code .ac { color: var(--success); font-weight: 600; }

/* ============ 调度记录页 ============ */
.filter-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-chip {
  font-size: 12px; padding: 4px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); cursor: pointer; transition: all .15s;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { text-align: left; color: var(--text-2); font-weight: 600; padding: 10px 12px; background: #F7F9FC; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 12px; border-bottom: 1px solid #EEF2F8; }
.table tbody tr:hover { background: #F7FAFF; }
.table tbody tr:last-child td { border-bottom: none; }
.type-chip { font-size: 11px; padding: 2px 9px; border-radius: 9px; font-weight: 500; white-space: nowrap; }
.type-chip.t-migrate { background: rgba(76,127,232,.12); color: #2D5BC7; }
.type-chip.t-rebuild { background: rgba(245,74,74,.12); color: #D63A3A; }
.type-chip.t-preempt { background: rgba(245,166,35,.14); color: #B26A00; }
.type-chip.t-replan { background: rgba(155,89,182,.14); color: #8E44AD; }
.type-chip.t-done { background: rgba(35,165,90,.12); color: #1E8B4C; }
.tier-tag { font-size: 11px; padding: 1px 8px; border-radius: 8px; color: #fff; font-weight: 600; }
.tier-tag.L1 { background: var(--t1); } .tier-tag.L2 { background: var(--t2); } .tier-tag.L3 { background: var(--t3); }

/* ============ 飞迁动画 ============ */
.fly-dot {
  position: fixed; width: 13px; height: 13px; border-radius: 50%; z-index: 999;
  pointer-events: none; box-shadow: 0 0 10px currentColor;
  transition: transform .55s cubic-bezier(.3,.7,.4,1), opacity .55s;
}
.fly-dot.land { opacity: .9; transform: scale(.4); }

/* ============ Toast / 弹窗 ============ */
.toast-wrap { position: fixed; top: 66px; right: 20px; z-index: 1001; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: 6px; padding: 10px 16px; font-size: 12px; box-shadow: 0 4px 14px rgba(15,29,51,.14);
  animation: toastIn .3s ease; max-width: 340px;
}
.toast.ok { border-left-color: var(--success); }
.toast.warn { border-left-color: var(--warn); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.toast.out { transition: opacity .3s; opacity: 0; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15,29,51,.5); z-index: 1002;
  display: none; align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal { width: 560px; max-height: 82vh; background: #fff; border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border); }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-item { border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.report-item .k { font-size: 11px; color: var(--text-2); margin-bottom: 4px; }
.report-item .v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.report-item .v.good { color: var(--success); }
.report-item .v.blue { color: var(--primary); }
.report-note { margin-top: 12px; font-size: 11px; color: var(--text-3); line-height: 1.7; }

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C9D2E0; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
