* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f2f7; color: #1f2937; }

.topbar { background: linear-gradient(135deg, #1e3a5f 0%, #2b5a8a 100%); color: #fff; padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 46px; height: 46px; background: #f59e0b; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #1e3a5f; }
.brand h1 { font-size: 20px; letter-spacing: 1px; }
.brand p { font-size: 12px; opacity: .8; margin-top: 2px; }
.meta { display: flex; gap: 10px; }
.badge { background: rgba(255,255,255,.15); padding: 5px 12px; border-radius: 20px; font-size: 12px; }
.badge.sync-btn { border: 1px solid rgba(255,255,255,.4); cursor: pointer; font-family: inherit; color: #fff; transition: all .15s; }
.badge.sync-btn:hover { background: #f59e0b; color: #1e3a5f; border-color: #f59e0b; }
.badge.sync-btn:disabled { opacity: .6; cursor: wait; }

.rolebar { display: flex; gap: 8px; padding: 14px 28px; background: #fff; border-bottom: 1px solid #e5e7eb; flex-wrap: wrap; }
.role-btn { border: none; background: #f3f4f6; padding: 10px 18px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: all .15s; color: #4b5563; }
.role-btn:hover { background: #e5e7eb; }
.role-btn.active { background: #2b5a8a; color: #fff; box-shadow: 0 2px 8px rgba(43,90,138,.35); }
.role-ico { font-size: 16px; }

.view { padding: 20px 28px 40px; max-width: 1900px; margin: 0 auto; }
.section-title { font-size: 15px; font-weight: 700; color: #1e3a5f; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 4px; height: 16px; background: #2b5a8a; border-radius: 2px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border-top: 3px solid #2b5a8a; }
.kpi .label { font-size: 12px; color: #6b7280; }
.kpi .value { font-size: 24px; font-weight: 800; color: #1e3a5f; margin-top: 6px; }
.kpi .sub { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.kpi.alt { border-top-color: #f59e0b; }
.kpi.green { border-top-color: #10b981; }
.kpi.red { border-top-color: #ef4444; }

.charts { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.card { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card h3 { font-size: 13px; color: #374151; margin-bottom: 8px; font-weight: 600; }
.chart { width: 100%; height: 280px; }
.w-4 { grid-column: span 4; } .w-5 { grid-column: span 5; } .w-6 { grid-column: span 6; } .w-7 { grid-column: span 7; } .w-8 { grid-column: span 8; } .w-12 { grid-column: span 12; }
@media (max-width: 1100px) { .w-4,.w-5,.w-6,.w-7,.w-8 { grid-column: span 12; } }

.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.insight { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border-left: 4px solid #2b5a8a; }
.insight.warn { border-left-color: #f59e0b; background: #fffbeb; }
.insight.danger { border-left-color: #ef4444; background: #fef2f2; }
.insight.info { border-left-color: #06b6d4; background: #ecfeff; }
.insight-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 8px; }
.insight-body { font-size: 13px; line-height: 1.7; color: #374151; }
.insight-body b { color: #111827; }
.insight-why { font-size: 11px; color: #9ca3af; margin-top: 8px; border-top: 1px dashed #e5e7eb; padding-top: 6px; }

.actions { display: flex; flex-direction: column; gap: 10px; }
.action { display: flex; gap: 12px; background: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border-left: 4px solid #9ca3af; }
.action.p0 { border-left-color: #ef4444; background: #fef2f2; }
.action.p1 { border-left-color: #f59e0b; background: #fffbeb; }
.action.p2 { border-left-color: #06b6d4; background: #ecfeff; }
.action-no { font-size: 18px; font-weight: 800; color: #d1d5db; min-width: 24px; }
.action-title { font-size: 13px; font-weight: 700; color: #111827; }
.action-title .lv { display: inline-block; background: #1e3a5f; color: #fff; font-size: 10px; padding: 1px 7px; border-radius: 8px; margin-right: 4px; }
.action.p0 .lv { background: #ef4444; }
.action.p1 .lv { background: #f59e0b; }
.action.p2 .lv { background: #06b6d4; }
.action-detail { font-size: 12px; color: #6b7280; margin-top: 4px; line-height: 1.6; }

.c360 { width: 100%; border-collapse: collapse; font-size: 12px; }
.c360 th { background: #f3f4f6; color: #374151; text-align: left; padding: 8px 10px; font-weight: 600; }
.c360 td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; color: #1f2937; }
.c360 .cname { font-weight: 600; }
.c360 .neg { color: #dc2626; }
.c360 .sub { color: #9ca3af; font-size: 11px; }
.c360-row { cursor: pointer; }
.c360-row:hover { background: #f0f6ff; }
.c360-row.sel { background: #dbeafe; }

/* 业务流程链路图 */
.flowchain { display: flex; align-items: flex-start; gap: 2px; overflow-x: auto; padding: 18px 10px; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 16px; }
.fnode { flex: 0 0 auto; text-align: center; }
.fbox { background: #f0f6ff; border: 1.5px solid #2b5a8a; border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600; color: #1e3a5f; white-space: nowrap; }
.fbox small { display: block; font-weight: 400; color: #6b7280; font-size: 10px; margin-top: 3px; }
.fkey { font-size: 10px; color: #f59e0b; margin-top: 5px; line-height: 1.4; }
.farrow { align-self: center; font-size: 18px; color: #9ca3af; margin: 0 4px; }

/* 🔍 生命周期追踪 */
.lc-banner { background: linear-gradient(135deg, #1e3a5f 0%, #2b5a8a 100%); color: #fff; border-radius: 12px; padding: 14px 20px; font-size: 14px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(43,90,138,.25); }
.lc-banner b { color: #fbbf24; font-family: Consolas, monospace; }
.lc-search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 16px; flex-wrap: wrap; }
.lc-search input { flex: 1; min-width: 260px; border: 1.5px solid #dbeafe; border-radius: 8px; padding: 10px 14px; font-size: 14px; color: #1f2937; outline: none; font-family: Consolas, "Microsoft YaHei", monospace; }
.lc-search input:focus { border-color: #2b5a8a; box-shadow: 0 0 0 3px rgba(43,90,138,.12); }
.lc-search button { border: none; background: #2b5a8a; color: #fff; font-size: 14px; font-weight: 700; padding: 10px 22px; border-radius: 8px; cursor: pointer; }
.lc-search button:hover { background: #1e3a5f; }
.lc-chips { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7280; flex-wrap: wrap; }
.lc-chips a { background: #f0f6ff; color: #2b5a8a; border: 1px solid #dbeafe; padding: 5px 10px; border-radius: 14px; cursor: pointer; font-weight: 600; }
.lc-chips a:hover { background: #dbeafe; }
.lc-loading { background: #fff; border-radius: 12px; padding: 40px; text-align: center; color: #2b5a8a; font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.lc-notfound { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 30px; text-align: center; color: #92400e; font-size: 14px; line-height: 2; }
.lc-cols3 { display: grid; grid-template-columns: 1.15fr 1.3fr 0.95fr; gap: 16px; align-items: start; }
@media (max-width: 1600px) { .lc-cols3 { grid-template-columns: 1fr 1fr; } .lc-cols3 > :last-child { grid-column: span 2; } }
@media (max-width: 1000px) { .lc-cols3 { grid-template-columns: 1fr; } .lc-cols3 > :last-child { grid-column: auto; } }
.lc-col { min-width: 0; }
.lc-timeline { position: relative; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 18px 18px 6px; }
.lc-stage { display: flex; gap: 12px; position: relative; padding-bottom: 22px; }
.lc-stage::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 2px; background: #dbeafe; }
.lc-stage:last-child::before { display: none; }
.lc-dot { flex: 0 0 32px; height: 32px; border-radius: 50%; background: #2b5a8a; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; z-index: 1; }
.lc-body { flex: 1; padding-top: 5px; min-width: 0; }
.lc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-head b { font-size: 14px; color: #1e3a5f; }
.lc-tag { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: #eef2ff; color: #4338ca; }
.lc-tag.tri { background: #fffbeb; color: #b45309; }
.lc-tag.fund { background: #ecfeff; color: #0e7490; }
.lc-tag.ok { background: #ecfdf5; color: #047857; }
.lc-detail { font-size: 12px; color: #374151; line-height: 1.85; margin-top: 4px; word-break: break-all; }
.lc-note { font-size: 11px; color: #6b7280; margin-top: 4px; font-style: italic; }
.lc-muted { font-size: 12px; color: #9ca3af; }

.lc-fundcard { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 14px 16px; margin-bottom: 12px; }
.lc-fundhead { font-size: 13px; font-weight: 700; color: #1e3a5f; border-bottom: 1px dashed #e5e7eb; padding-bottom: 8px; margin-bottom: 10px; }
.lc-plan { border-left: 3px solid #f59e0b; background: #fffbeb; border-radius: 0 10px 10px 0; padding: 10px 12px; margin-bottom: 10px; }
.lc-plan-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.lc-plan-head b { font-size: 13px; color: #1f2937; }
.lc-planno { display: inline-flex; width: 22px; height: 22px; background: #f59e0b; color: #fff; border-radius: 50%; font-weight: 800; font-size: 12px; align-items: center; justify-content: center; }
.lc-exec { font-size: 12px; color: #374151; margin: 4px 0 6px; line-height: 1.7; }
.lc-exec b { color: #b45309; }
.lc-flows { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-flow { border: 1.5px solid #9ca3af; border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 700; display: inline-flex; flex-direction: column; line-height: 1.4; }
.lc-flow small { font-weight: 400; font-size: 10px; opacity: .8; }

.lc-platcard { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 14px 16px; margin-bottom: 12px; border-top: 3px solid #06b6d4; }
.lc-plat-head { font-size: 13px; color: #374151; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lc-plat-head b { color: #0e7490; }
.lc-plat-amt { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.lc-plat-detail { font-size: 12px; color: #374151; line-height: 1.9; }
.lc-plat-detail small { color: #9ca3af; }

.lc-merge { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 0; }
.lc-merge-step { border-radius: 10px; padding: 10px 14px; font-size: 12px; font-weight: 700; color: #fff; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.lc-merge-step small { display: block; font-weight: 400; font-size: 10px; opacity: .9; margin-top: 3px; }
.lc-merge-step.s-goods { background: #7c3aed; }
.lc-merge-step.s-contract { background: #2b5a8a; }
.lc-merge-step.s-sale { background: #059669; }
.lc-merge-step.s-fund { background: #d97706; }
.lc-merge-step.s-flow { background: #dc2626; }
.lc-merge-step.s-plat { background: #0891b2; }
.lc-merge-step.s-close { background: #0e7490; }
.lc-merge-arrow { font-size: 18px; color: #9ca3af; font-weight: 700; }
.lc-verdict { margin-top: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 10px 14px; font-size: 12px; color: #065f46; line-height: 1.9; }

/* 💰 资金变动全景 */
.fm-table td { vertical-align: top; line-height: 1.7; }
.fm-chip { display: inline-block; border: 1.5px solid #9ca3af; border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; margin: 2px 4px 2px 0; white-space: nowrap; }
.fm-chip small { display: block; font-weight: 400; font-size: 10px; opacity: .75; }
.fm-mech { font-size: 11px; color: #6b7280; line-height: 1.6; max-width: 380px; }

.foot { text-align: center; color: #9ca3af; font-size: 12px; padding: 20px; }
