/* ============================================================
 * 上海迪士尼度假区 · 团体销售数字化运营平台（演示环境）
 * 视觉规范：深海军蓝 #0e2a5c / #16337a · 点缀金 #f5b70a · 冷灰渐变背景
 * 风格：现代 SaaS 精致感 + 迪士尼品牌识别
 * ============================================================ */

:root {
  --navy-900: #0e2a5c;
  --navy-800: #16337a;
  --navy-700: #1f4296;
  --gold: #f5b70a;
  --gold-deep: #e0a409;
  --gold-soft: rgba(245, 183, 10, 0.14);
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #1d2b45;
  --muted: #6b7a99;
  --muted-2: #8a94ad;
  --line: #e8edf6;
  --red: #e5484d;
  --amber: #f5a524;
  --green: #30a46c;
  --violet: #8a63d2;
  --blue: #2f6fed;
  --shadow-sm: 0 1px 2px rgba(14, 42, 92, 0.05), 0 8px 24px rgba(14, 42, 92, 0.06);
  --shadow-md: 0 2px 4px rgba(14, 42, 92, 0.06), 0 12px 32px rgba(14, 42, 92, 0.10);
  --radius: 16px;
  --radius-sm: 12px;
  --tr: 0.2s ease;
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  font-family: var(--font);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(1000px 340px at 88% -90px, rgba(22, 51, 122, 0.10), transparent 62%),
    radial-gradient(720px 300px at 8% -70px, rgba(245, 183, 10, 0.05), transparent 58%),
    linear-gradient(180deg, #f1f4fa 0%, #f5f7fb 42%, #f2f5fa 100%);
}

.app { display: flex; min-width: 1200px; min-height: 100vh; }

::selection { background: rgba(245, 183, 10, 0.3); }

/* 全局滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(14, 42, 92, 0.22); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(14, 42, 92, 0.34); }

/* ================= 侧边栏 ================= */
.sidebar {
  width: 234px;
  flex: 0 0 234px;
  background: linear-gradient(180deg, #0a1c40 0%, #10295e 52%, #16337a 100%);
  color: #c3d0ea;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-logo-box {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: rgba(245, 183, 10, 0.12);
  border: 1px solid rgba(245, 183, 10, 0.28);
  box-shadow: 0 0 16px rgba(245, 183, 10, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo { width: 28px; height: 28px; }

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.4px;
  line-height: 1.35;
}

.brand-sub {
  font-size: 10.5px;
  color: rgba(245, 183, 10, 0.92);
  margin-top: 4px;
  letter-spacing: 1.2px;
}

.nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: transparent;
  color: #b3c2e2;
  font-size: 13.5px;
  font-family: var(--font);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-item svg { width: 19px; height: 19px; flex: 0 0 19px; opacity: 0.9; }

.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }

.nav-item.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-weight: 600;
  text-shadow: 0 0 14px rgba(245, 183, 10, 0.35);
}
.nav-item.active svg { opacity: 1; color: var(--gold); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #ffd666, var(--gold));
  box-shadow: 0 0 10px rgba(245, 183, 10, 0.55);
}

.sidebar-foot {
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.foot-label { font-size: 11px; color: #7e92bb; letter-spacing: 2.5px; }
.foot-value { font-size: 13px; color: #fff; font-weight: 600; margin-top: 5px; letter-spacing: 0.5px; }

/* ================= 顶栏 ================= */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.header {
  height: 76px;
  flex: 0 0 76px;
  background: linear-gradient(100deg, #122c66 0%, var(--navy-800) 38%, var(--navy-900) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(10, 25, 60, 0.30);
}

.header-deco {
  position: absolute;
  right: 215px;
  bottom: -2px;
  height: 68px;
  width: auto;
  pointer-events: none;
}

.header-title { position: relative; z-index: 1; }

.header-title h1 { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.header-title p { font-size: 12.5px; color: rgba(255, 255, 255, 0.52); margin-top: 6px; letter-spacing: 0.4px; }

.badge-demo {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #ffd766;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

/* ================= 内容区 ================= */
.content { padding: 24px 28px 44px; flex: 1; }

/* 备用访问提示条 */
.notice-bar {
  display: none;
  align-items: center;
  gap: 8px;
  background: #fff8e6;
  border: 1px solid #f3dfa8;
  color: #7a5d0b;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 16px;
}
.notice-bar.show { display: flex; }
.notice-bar b { color: #6b4e00; }
.notice-close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #b98a06;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 6px;
}
.notice-close:hover { background: rgba(245, 183, 10, .15); }

.view { display: none; }
.view.active { display: block; animation: fadeUp 0.35s ease; }

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

/* ================= 卡片 ================= */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  transition: box-shadow var(--tr), transform var(--tr);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-900);
  position: relative;
  white-space: nowrap;
  padding-left: 12px;
  letter-spacing: 0.2px;
}
.card-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffd666, var(--gold));
  box-shadow: 0 0 6px rgba(245, 183, 10, 0.35);
}

.card-tip { font-size: 12px; color: var(--muted); }
.card-tip b { color: var(--navy-800); }

/* ================= KPI 卡片 ================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: box-shadow var(--tr), transform var(--tr);
}
.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.kpi-top { display: flex; gap: 13px; align-items: flex-start; }

.kpi-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--tr);
}
.kpi:hover .kpi-icon { transform: scale(1.06); }
.kpi-icon svg { width: 21px; height: 21px; }

.kpi-icon.gold { background: rgba(245, 183, 10, 0.15); color: #b98a06; }
.kpi-icon.green { background: rgba(48, 164, 108, 0.13); color: #2b8f5c; }
.kpi-icon.blue { background: rgba(47, 111, 237, 0.11); color: var(--blue); }
.kpi-icon.violet { background: rgba(138, 99, 210, 0.12); color: var(--violet); }

.kpi-body { min-width: 0; }

.kpi-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.kpi-value {
  font-size: 27px;
  font-weight: 800;
  color: var(--navy-900);
  margin-top: 4px;
  letter-spacing: 0.3px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.kpi-value small { font-size: 14px; font-weight: 600; margin-left: 2px; }
.kpi-value em { font-style: normal; color: #b98a06; }
.kpi-value .up { color: var(--green); }

.kpi-sub { font-size: 12px; color: var(--muted); line-height: 1.55; }
.kpi-sub .up { color: var(--green); font-weight: 700; }
.kpi-sub .warn { color: var(--red); font-weight: 700; }

.kpi-foot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  color: #8a6807;
  background: rgba(245, 183, 10, 0.09);
  border: 1px solid rgba(245, 183, 10, 0.24);
  border-radius: 8px;
  padding: 4px 10px;
  letter-spacing: 0.3px;
}
.kpi-foot svg { width: 12px; height: 12px; flex: 0 0 12px; }

/* ================= 布局栅格 ================= */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
.dash-grid .span-2 { grid-column: span 2; }

.auto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.profit-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.profit-split > .card { min-width: 0; }

.dm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

/* ================= 表格 ================= */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }

.table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted-2);
  font-size: 11.5px;
  letter-spacing: 0.6px;
  padding: 10px;
  background: #f6f8fc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 10px;
  border-bottom: 1px solid #f0f3f9;
  color: var(--ink);
  white-space: nowrap;
}
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover { background: #f8faff; }

.table-select tbody tr { cursor: pointer; }
.table-select tbody tr.sel {
  background: #eef3fd;
  box-shadow: inset 3px 0 0 var(--gold);
}
.table-select tbody tr.sel td:first-child { font-weight: 700; color: var(--navy-800); }

.mono { font-family: Consolas, "SF Mono", monospace; font-size: 12px; color: var(--navy-800); }

/* ================= 徽章 / 进度条 ================= */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge.risk-high { background: rgba(229, 72, 77, 0.10); color: #d03a3f; }
.badge.risk-mid { background: rgba(245, 165, 36, 0.14); color: #a86e04; }
.badge.risk-ok { background: rgba(48, 164, 108, 0.12); color: #2b8f5c; }

.pbar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #edf1f8;
  overflow: hidden;
}
.pbar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--navy-700), var(--navy-800));
  transition: width 0.6s ease;
}
.pbar > i.gold { background: linear-gradient(90deg, #e0a409, var(--gold)); }
.pbar > i.red { background: linear-gradient(90deg, #d03a3f, var(--red)); }
.pbar > i.amber { background: linear-gradient(90deg, #e29213, var(--amber)); }
.pbar > i.green { background: linear-gradient(90deg, #25915d, var(--green)); }

.pbar.lg { height: 12px; }

.ratio-cell { min-width: 110px; }
.ratio-cell .pbar { margin-top: 5px; }
.ratio-cell .ratio-txt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ================= 图表 ================= */
.chart-box { position: relative; }
.chart { width: 100%; height: auto; display: block; }

.grid { stroke: #eef2f9; stroke-width: 1; }
.axis-line { stroke: #dde4f0; stroke-width: 1.2; }
.axis-txt { font-size: 11.5px; fill: var(--muted-2); }
.axis-note { font-size: 11px; fill: #9aa8c4; }
.crosshair { stroke: #b6c2d9; stroke-width: 1; stroke-dasharray: 6 6; }

.chart-legend { display: flex; gap: 10px; margin-bottom: 10px; padding-left: 64px; }
.legend-item {
  font-size: 12px;
  color: var(--muted);
  background: #f6f8fc;
  border: 1px solid #e9eef7;
  border-radius: 999px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s ease;
}
.legend-item:hover { background: #eef2f9; }
.legend-item i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.bar-val { font-size: 15px; font-weight: 800; fill: var(--navy-900); font-variant-numeric: tabular-nums; }
.bar-tag { fill: var(--gold); filter: drop-shadow(0 2px 5px rgba(245, 183, 10, 0.35)); }
.bar-tag-txt { font-size: 11.5px; font-weight: 800; fill: #5c4403; letter-spacing: 0.5px; }

/* tooltip */
.chart-tip {
  position: absolute;
  display: none;
  min-width: 150px;
  background: rgba(14, 30, 66, 0.96);
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 10px 13px;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(8, 18, 44, 0.42);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 30;
}
.tip-title { font-weight: 700; margin-bottom: 7px; font-size: 12.5px; color: #ffd766; }
.tip-row { display: flex; align-items: center; gap: 7px; margin-top: 4px; }
.tip-row i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.tip-row span { color: #b9c6e2; flex: 1; padding-right: 14px; }
.tip-row b { font-variant-numeric: tabular-nums; }

/* 环形图 */
.donut-wrap { display: flex; align-items: center; gap: 10px; }
.donut-svg-box { flex: 0 0 46%; position: relative; }
.donut-center { font-size: 21px; font-weight: 800; fill: var(--navy-900); font-variant-numeric: tabular-nums; }
.donut-center-sub { font-size: 11.5px; fill: var(--muted-2); }

.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  border-radius: 9px;
  padding: 7px 10px;
  transition: background 0.15s ease;
  cursor: default;
}
.donut-legend-item:hover { background: #f6f8fc; }
.donut-legend-item i { width: 10px; height: 10px; border-radius: 3.5px; flex: 0 0 10px; }
.donut-legend-item .dl-name { color: var(--ink); font-weight: 600; }
.donut-legend-item .dl-val { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ================= 新旧流程对比 ================= */
.flow-card { margin-bottom: 18px; padding-bottom: 16px; }

.flow-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.flow-head h3 { font-size: 15px; font-weight: 700; color: var(--navy-900); padding-left: 12px; position: relative; }
.flow-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffd666, var(--gold));
  box-shadow: 0 0 6px rgba(245, 183, 10, 0.35);
}

.seg {
  display: inline-flex;
  background: #edf1f7;
  border-radius: 999px;
  padding: 3px;
}
.seg-btn {
  border: none;
  background: transparent;
  padding: 7px 20px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s ease;
}
.seg-btn.active {
  background: linear-gradient(120deg, var(--navy-700), var(--navy-800));
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 42, 92, 0.32);
}

.flow-panel {
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 26px;
  animation: fadeUp 0.3s ease;
}
.flow-panel.hidden { display: none; }
.flow-old { background: linear-gradient(95deg, #fdf1f1, #fdf7f7); border: 1px solid rgba(229, 72, 77, 0.20); }
.flow-new { background: linear-gradient(95deg, #effaf4, #f5fcf8); border: 1px solid rgba(48, 164, 108, 0.24); }

.flow-tag {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 9px;
  letter-spacing: 1px;
}
.flow-old .flow-tag { background: rgba(229, 72, 77, 0.12); color: #cf3a3f; }
.flow-new .flow-tag { background: rgba(48, 164, 108, 0.15); color: #1e7a4e; }

.flow-list { flex: 1; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 12.8px; color: #45536e; line-height: 1.55; }
.flow-old .flow-list b { color: #cf3a3f; }
.flow-new .flow-list b { color: #1e7a4e; }
.flow-list li { padding-left: 16px; position: relative; }
.flow-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; }
.flow-old .flow-list li::before { background: var(--red); }
.flow-new .flow-list li::before { background: var(--green); }

.flow-stat {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 800;
  padding: 11px 18px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.flow-stat.bad { color: #cf3a3f; background: rgba(229, 72, 77, 0.10); border: 1px solid rgba(229, 72, 77, 0.18); }
.flow-stat.good { color: #1e7a4e; background: rgba(48, 164, 108, 0.13); border: 1px solid rgba(48, 164, 108, 0.2); }

/* ================= 利润核算 · 详情面板 ================= */
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 10px;
}
.detail-title { font-size: 15.5px; font-weight: 800; color: var(--navy-900); letter-spacing: 0.2px; }
.detail-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.contract-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 14px;
  background: linear-gradient(180deg, #f8fafd, #f5f8fc);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  margin-bottom: 14px;
}
.cg-item .cg-label { font-size: 12px; color: var(--muted-2); letter-spacing: 0.3px; }
.cg-item .cg-value { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.cg-item.full { grid-column: 1 / -1; }

.pay-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pay-row b { color: var(--navy-800); font-variant-numeric: tabular-nums; }

.cost-table { margin-bottom: 14px; overflow-x: auto; }
.cost-table .table { min-width: 460px; }
.cost-table .table td { white-space: nowrap; }
.cost-table .table td.note { white-space: normal; color: var(--muted); font-size: 12px; min-width: 130px; }

.sum-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.sum-card {
  border-radius: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe, #f7f9fd);
  transition: box-shadow 0.15s ease;
}
.sum-card:hover { box-shadow: 0 4px 12px rgba(14, 42, 92, 0.08); }
.sum-card .s-label { font-size: 11.5px; color: var(--muted-2); letter-spacing: 0.3px; }
.sum-card .s-value { font-size: 17px; font-weight: 800; margin-top: 5px; font-variant-numeric: tabular-nums; }
.sum-card.c-cogs .s-value { color: var(--navy-800); }
.sum-card.c-margin .s-value { color: #b98a06; }
.sum-card.c-rate .s-value { color: var(--navy-900); }

.rate-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.rate-row b { color: #b98a06; font-variant-numeric: tabular-nums; }

.detail-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-sec-title svg { width: 15px; height: 15px; color: var(--gold); flex: 0 0 15px; }

.lineage-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.65; }

.ln-contract { fill: url(#lnGrad); }
.ln-t1 { font-size: 12.5px; font-weight: 700; fill: #fff; }
.ln-t2 { font-size: 10.5px; fill: rgba(255, 255, 255, 0.78); }
.ln-doc { fill: #f8fafd; stroke: #e2e8f3; }
.ln-t3 { font-size: 11px; font-weight: 700; fill: var(--navy-900); }
.lineage .ln-doc-t2 { font-size: 10px; fill: var(--muted-2); }
.ln-link { fill: none; stroke: #c3cfe4; stroke-width: 1.6; stroke-dasharray: 5 4; }

/* ================= 自动化中心 ================= */
.desc { font-size: 13px; color: #45536e; line-height: 1.7; margin-bottom: 14px; }
.desc b { color: var(--red); }
.desc-list { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 12.8px; color: #45536e; line-height: 1.6; }
.desc-list li { padding-left: 16px; position: relative; }
.desc-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: linear-gradient(135deg, #ffd666, var(--gold)); }
.desc-list b { color: var(--navy-800); }

.rpa-meta {
  display: flex;
  gap: 22px;
  font-size: 12.5px;
  color: var(--muted);
  background: linear-gradient(180deg, #f8fafd, #f4f7fb);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.rpa-meta b { color: var(--navy-800); font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 22px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid rgba(245, 183, 10, 0.6); outline-offset: 2px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(120deg, #ffc81a, var(--gold) 45%, var(--gold-deep));
  color: #4a3702;
  box-shadow: 0 4px 14px rgba(240, 169, 9, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-gold:hover:not(:disabled) {
  box-shadow: 0 7px 22px rgba(240, 169, 9, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-ghost {
  background: transparent;
  border: 1px solid #dde3ef;
  color: var(--muted);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
}
.btn-ghost:hover { background: #f5f7fb; border-color: #c9d5ea; color: var(--navy-800); }

.steps { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 0; }
.steps li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 4px;
  font-size: 12.8px;
  color: #93a1bd;
  position: relative;
  transition: color 0.2s ease;
}
.steps li .dot {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  border: 2px solid #d9e1ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  background: #fff;
  color: #93a1bd;
  transition: all 0.2s ease;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: -2px;
  width: 2px;
  background: #e8edf5;
  transition: background 0.2s ease;
}
.steps li.running { color: var(--navy-900); font-weight: 700; }
.steps li.running .dot {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 4px rgba(245, 183, 10, 0.16);
  animation: pulse 1.1s ease infinite;
}
.steps li.done { color: var(--ink); }
.steps li.done .dot {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.steps li.done:not(:last-child)::after { background: rgba(48, 164, 108, 0.4); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(245, 183, 10, 0.22); }
  50% { box-shadow: 0 0 0 8px rgba(245, 183, 10, 0.07); }
}

/* 日志 */
.log-card { padding-bottom: 14px; }
.log-panel {
  background: linear-gradient(180deg, #0d1e45, #0a1736);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  height: 230px;
  overflow-y: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.9;
  color: #c4d2ee;
  box-shadow: inset 0 2px 10px rgba(4, 10, 28, 0.5);
}
.log-empty { color: #5f7099; }
.log-line { display: flex; gap: 10px; animation: fadeUp 0.25s ease; position: relative; padding-left: 14px; }
.log-line::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7d8db0;
}
.log-line.ok::before { background: #3ecf8e; box-shadow: 0 0 6px rgba(62, 207, 142, 0.5); }
.log-time { color: var(--gold); flex: 0 0 auto; opacity: 0.92; }
.log-line.ok .log-msg { color: #7bd8a8; }
.log-line.info .log-msg { color: #c4d2ee; }

/* ================= 数据中台 ================= */
.dm-desc {
  font-size: 13px;
  color: #45536e;
  line-height: 1.8;
  max-width: 860px;
  margin: 6px auto 0;
  text-align: center;
}
.dm-desc b { color: var(--navy-800); }

.dm-keys { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.key-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-800);
  background: rgba(22, 51, 122, 0.06);
  border: 1px solid rgba(22, 51, 122, 0.16);
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}
.key-chip:hover { background: rgba(245, 183, 10, 0.1); border-color: rgba(245, 183, 10, 0.4); color: #8a6807; }

.dm-card { padding: 16px 18px; }
.dm-card-title { font-size: 13.5px; font-weight: 800; padding-left: 10px; position: relative; margin-bottom: 8px; }
.dm-card-title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3.5px; border-radius: 2px; }
.dm-card-title.t1::before { background: var(--navy-700); }
.dm-card-title.t2::before { background: var(--gold); }
.dm-card-title.t3::before { background: var(--green); }
.dm-card-title.t4::before { background: var(--violet); }
.dm-fields { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* SVG 关系图 */
.dm-link { stroke: #c3cfe4; stroke-width: 1.8; fill: none; }
.dm-hub-box { fill: url(#dmGrad); filter: drop-shadow(0 8px 18px rgba(14, 42, 92, 0.30)); }
.dm-hub-t1 { font-size: 15px; font-weight: 800; fill: #fff; }
.dm-hub-t2 { font-size: 11px; fill: rgba(255, 255, 255, 0.75); }
.dm-sat-box {
  fill: #fff;
  stroke: #e2e8f3;
  stroke-width: 1.2;
  filter: drop-shadow(0 2px 6px rgba(14, 42, 92, 0.07));
  transition: transform 0.18s ease, filter 0.18s ease;
  transform-box: fill-box;
  transform-origin: center;
  cursor: default;
}
.dm-sat-box:hover { transform: translateY(-3px); filter: drop-shadow(0 8px 16px rgba(14, 42, 92, 0.16)); }
.dm-sat-t1 { font-size: 13.5px; font-weight: 800; fill: var(--navy-900); }
.dm-sat-t2 { font-size: 10.5px; fill: var(--muted-2); }
.dm-chip { fill: #fff7e0; stroke: #f2cd69; stroke-width: 1; filter: drop-shadow(0 2px 4px rgba(14, 42, 92, 0.10)); }
.dm-chip-txt { font-size: 10.5px; font-weight: 700; fill: #8a6807; text-anchor: middle; }

.cf-box { fill: #fff; stroke: #dbe3f2; stroke-width: 1.3; filter: drop-shadow(0 3px 8px rgba(14, 42, 92, 0.10)); }
.cf-box.hl { fill: url(#cfGrad); stroke: none; }
.cf-t1 { font-size: 13px; font-weight: 800; fill: var(--navy-900); }
.cf-t1.hl { fill: #fff; }
.cf-t2 { font-size: 10px; fill: var(--muted-2); }
.cf-t2.hl { fill: rgba(255, 255, 255, 0.78); }
.cf-arrow { stroke: #aebbd6; stroke-width: 1.8; fill: none; }
.cf-chip { fill: #fff7e0; stroke: rgba(245, 183, 10, 0.55); stroke-width: 1; }
.cf-chip-txt { font-size: 10.5px; font-weight: 700; fill: #8a6807; text-anchor: middle; }


/* ================= 驾驶舱扩展：KPI 达成条 / 逾期 / 园区画像 / 账龄 ================= */
.kpi-bar { margin-top: 9px; height: 7px; max-width: 190px; }
.kpi-sub b { color: var(--navy-800); font-variant-numeric: tabular-nums; }

.ov-bad { color: var(--red) !important; font-weight: 700; }

.table-scroll { overflow-x: auto; }

.loc-head {
  display: grid;
  grid-template-columns: 150px 1fr 86px 74px;
  gap: 12px;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-2);
  letter-spacing: 0.6px;
  padding: 8px 12px;
  background: #f6f8fc;
  border-radius: 9px;
  margin-bottom: 6px;
}
.loc-head .num { text-align: right; }

.loc-row {
  display: grid;
  grid-template-columns: 150px 1fr 86px 74px;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 9px;
  transition: background 0.15s ease;
}
.loc-row:hover { background: #f8faff; }
.loc-row + .loc-row { border-top: 1px solid #f0f3f9; }

.loc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.loc-name i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  background: #f0f4fb;
  border-radius: 999px;
  padding: 1px 8px;
}
.loc-bar .pbar { height: 8px; }
.loc-rev { font-size: 13px; font-weight: 700; color: var(--navy-900); text-align: right; font-variant-numeric: tabular-nums; }
.loc-rate { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.loc-rate.hi { color: #b98a06; }

.aging-row {
  display: grid;
  grid-template-columns: 74px 1fr 64px;
  gap: 12px;
  align-items: center;
  padding: 9px 4px;
}
.aging-row + .aging-row { border-top: 1px solid #f0f3f9; }
.aging-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.aging-bar .pbar { height: 8px; }
.aging-amt { font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.aging-total {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(48, 164, 108, 0.07);
  border: 1px solid rgba(48, 164, 108, 0.16);
  border-radius: 9px;
  padding: 8px 12px;
  line-height: 1.6;
}
.aging-total b { color: #1e7a4e; font-variant-numeric: tabular-nums; }

/* 驾驶舱全宽平台价值横幅（与 KPI 卡内 pill 同类的淡金横条） */
#view-dashboard > .kpi-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: -2px 0 18px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.6;
}

/* 折线图 legend 虚线系（目标线） */
.legend-item i.dash {
  width: 13px;
  height: 0;
  border-radius: 0;
  border-top: 2px dashed;
  background: none !important;
}
