button { font: inherit; }

.full-chain-console { margin-bottom: 18px; }
.run-console-title, .run-controls, .global-run-state, .step-panel-header, .step-panel-heading,
.section-heading, .gis-toolbar, .gis-layer-switches, .evidence-toolbar { display: flex; align-items: center; }
.run-console-title, .global-run-state, .step-panel-header, .section-heading,
.gis-toolbar, .evidence-toolbar { justify-content: space-between; }
.run-console-title { gap: 20px; }
.run-console-title h2, .run-console-title p, .step-panel-header h2,
.step-panel-header p, .node-section h3 { margin: 0; }
.run-console-title h2 { color: #17365d; font-size: 19px; }
.run-console-title p { margin-top: 5px; color: #64748b; font: 12px Consolas, monospace; }
.run-controls { justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.connection-state { display: inline-flex; align-items: center; gap: 7px; margin-right: 4px; color: #64748b; font-size: 12px; }
.connection-state i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.connection-connected i { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .12); }
.connection-reconnecting i { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .12); }
.connection-disconnected i { background: #dc2626; }

.global-run-state { gap: 24px; min-height: 76px; padding: 14px 0 16px; border-bottom: 1px solid #e5edf5; }
.global-run-state > div:first-child { min-width: 0; flex: 1; }
.global-run-state > div:first-child > strong,
.global-run-state > div:first-child > span:not(.el-tag) { display: block; }
.global-run-state > div:first-child > strong { margin-top: 8px; color: #17365d; font-size: 18px; }
.global-run-state > div:first-child > span:not(.el-tag) { margin-top: 5px; color: #64748b; font-size: 13px; }
.global-progress { width: min(42%, 520px); min-width: 320px; }
.global-progress small { display: block; margin-top: 7px; color: #64748b; text-align: right; }

.stage-navigator { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 8px; margin: 14px 0; padding-bottom: 5px; overflow-x: auto; }
.stage-nav-item { position: relative; min-height: 66px; padding: 9px 8px; border: 1px solid #d8e3ee; border-radius: 8px; background: #f8fafc; color: #64748b; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; text-align: left; cursor: pointer; }
.stage-nav-item:hover, .stage-nav-item.selected { border-color: #5d7fa7; box-shadow: inset 0 0 0 1px rgba(23, 54, 93, .14); }
.stage-nav-item > i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e2e8f0; color: #475569; font-size: 12px; font-style: normal; font-weight: 800; }
.stage-nav-item strong, .stage-nav-item small { display: block; }
.stage-nav-item strong { color: inherit; font-size: 13px; line-height: 1.3; }
.stage-nav-item small { margin-top: 5px; color: #64748b; font-size: 11px; }
.stage-nav-item > em { position: absolute; right: 7px; top: 6px; color: #2563eb; font-size: 10px; font-style: normal; }
.stage-nav-item.stage-running, .stage-nav-item.stage-retrying { border-color: rgba(37, 99, 235, .5); background: #eff6ff; color: #1d4ed8; }
.stage-nav-item.stage-running > i, .stage-nav-item.stage-retrying > i { background: #2563eb; color: #fff; }
.stage-nav-item.stage-completed { border-color: rgba(22, 163, 74, .38); background: #f0fdf4; color: #166534; }
.stage-nav-item.stage-completed > i { background: #16a34a; color: #fff; }
.stage-nav-item.stage-failed { border-color: rgba(220, 38, 38, .45); background: #fef2f2; color: #b91c1c; }
.stage-nav-item.stage-failed > i { background: #dc2626; color: #fff; }
.stage-nav-item.stage-cancelled { border-color: rgba(245, 158, 11, .5); background: #fffbeb; color: #92400e; }
.stage-nav-item.stage-cancelled > i { background: #f59e0b; color: #fff; }

.history-notice { margin-bottom: 12px; padding: 8px 12px; border-left: 3px solid #2563eb; background: #eff6ff; color: #334155; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.run-workspace { display: grid; grid-template-columns: minmax(480px, .9fr) minmax(560px, 1.1fr); gap: 14px; align-items: stretch; }
.run-gis-panel, .step-workspace, .evidence-tabs { min-width: 0; border: 1px solid #d8e3ee; border-radius: 8px; background: #fff; overflow: hidden; }

.gis-toolbar { min-height: 48px; padding: 0 13px; border-bottom: 1px solid #e5edf5; gap: 12px; }
.gis-toolbar strong, .gis-toolbar span { display: block; }
.gis-toolbar strong { color: #17365d; font-size: 14px; }
.gis-toolbar span { margin-top: 3px; color: #64748b; font-size: 11px; }
.gis-layer-switches { gap: 8px; flex-wrap: wrap; }
.gis-layer-switches .el-checkbox { margin-right: 0; }
.run-gis-map { position: relative; min-height: 600px; overflow: hidden; background: linear-gradient(90deg, rgba(203,213,225,.22) 1px, transparent 1px), linear-gradient(0deg, rgba(203,213,225,.22) 1px, transparent 1px), linear-gradient(135deg, #f8fbff 0%, #edf7f1 100%); background-size: 64px 64px, 64px 64px, 100% 100%; }
.run-gis-map .track-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.run-gis-map .corridor { fill: none; stroke-linecap: round; }
.run-gis-map .corridor-outer { stroke: rgba(22,101,52,.18); stroke-width: 54; stroke-dasharray: 10 18; }
.run-gis-map .corridor-inner { stroke: rgba(14,165,233,.14); stroke-width: 30; }
.run-gis-map .rail-shadow { fill: none; stroke: rgba(15,23,42,.16); stroke-width: 14; stroke-linecap: round; }
.run-gis-map .rail-line { fill: none; stroke: #17365d; stroke-width: 7; stroke-linecap: round; }
.run-gis-map .route-line { fill: none; stroke: #2563eb; stroke-width: 4; stroke-dasharray: 12 10; stroke-linecap: round; }
.run-gis-map .wire-line { fill: none; stroke: rgba(15,23,42,.55); stroke-width: 1.5; stroke-linecap: round; }
.run-gis-map .flood-zone { fill: rgba(14,165,233,.16); stroke: #0284c7; stroke-width: 2; }
.run-gis-map .protected-zone { fill: rgba(34,197,94,.14); stroke: #16a34a; stroke-width: 2; }
.run-gis-map .mileage-label { fill: #526579; font-size: 14px; font-weight: 700; }
.run-gis-map .uav-marker, .run-gis-map .run-marker { position: absolute; z-index: 2; transform: translate(-50%,-50%); border: 2px solid #fff; cursor: pointer; box-shadow: 0 7px 18px rgba(15,23,42,.25); }
.run-gis-map .uav-marker { min-width: 42px; height: 26px; padding: 0 8px; border-radius: 13px; background: #2563eb; color: #fff; font-size: 11px; font-weight: 800; }
.run-gis-map .run-marker { width: 28px; height: 28px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: #2563eb; color: #fff; font-size: 12px; font-weight: 800; text-align: center; }
.run-gis-map .run-marker.selected { z-index: 4; box-shadow: 0 0 0 5px rgba(37,99,235,.24), 0 10px 24px rgba(15,23,42,.24); }
.run-gis-map .run-marker.severity-critical { background: #dc2626; }
.run-gis-map .run-marker.severity-high { background: #f97316; }
.run-gis-map .run-marker.severity-medium { background: #2563eb; }
.run-gis-map .run-marker.severity-low { background: #16a34a; }
.run-gis-map .run-marker.severity-ai { background: #7c3aed; }
.run-gis-map .run-marker.severity-resource { background: #0f766e; }
.run-gis-map .marker-card { position: absolute; left: 36px; top: 50%; width: 178px; padding: 8px 9px; transform: translateY(-50%); border: 1px solid #dce4ed; border-radius: 5px; background: rgba(255,255,255,.96); color: #1d2733; opacity: 0; pointer-events: none; text-align: left; box-shadow: 0 10px 25px rgba(15,23,42,.12); }
.run-gis-map .run-marker:hover .marker-card, .run-gis-map .run-marker.selected .marker-card { opacity: 1; }
.run-gis-map .marker-card strong, .run-gis-map .marker-card em, .run-gis-map .marker-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-gis-map .marker-card strong { color: #17365d; font-size: 12px; }
.run-gis-map .marker-card em { margin-top: 4px; color: #475569; font-size: 10px; font-style: normal; }
.run-gis-map .marker-card small { margin-top: 3px; color: #64748b; font-size: 10px; font-weight: 500; }
.run-gis-map .map-legend { position: absolute; left: 14px; bottom: 14px; z-index: 1; max-width: calc(100% - 28px); padding: 8px 10px; display: flex; gap: 12px; flex-wrap: wrap; border: 1px solid #dce4ed; border-radius: 5px; background: rgba(255,255,255,.92); color: #475569; font-size: 11px; box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.run-gis-map .map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.run-gis-map .map-legend i { width: 16px; height: 5px; border-radius: 4px; background: #17365d; }
.run-gis-map .legend-route { background: #2563eb; }
.run-gis-map .legend-protected { background: #16a34a; }
.run-gis-map .legend-flood { background: #0284c7; }
.run-gis-map .legend-alarm { background: #f97316; }

.step-workspace { min-height: 650px; max-height: 760px; overflow: auto; }
.step-panel-shell { padding: 14px; }
.step-panel-header { align-items: flex-start; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid #e5edf5; }
.step-panel-heading { gap: 10px; flex-wrap: wrap; }
.step-panel-header h2 { color: #17365d; font-size: 18px; }
.step-panel-header p { margin-top: 6px; color: #64748b; font-size: 12px; line-height: 1.5; }
.step-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.step-progress-row { display: grid; grid-template-columns: 68px minmax(0, 1fr) 86px; align-items: center; gap: 10px; padding: 12px 0; color: #475569; font-size: 12px; }
.step-progress-row small { text-align: right; }

.node-metrics, .summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.node-metrics > div, .summary-grid > div { min-height: 64px; padding: 10px; border-right: 1px solid #e2e8f0; background: #f8fafc; }
.node-metrics strong, .node-metrics span, .summary-grid strong, .summary-grid span { display: block; }
.node-metrics strong, .summary-grid strong { color: #17365d; font-size: 18px; word-break: break-word; }
.node-metrics span, .summary-grid span { margin-top: 5px; color: #64748b; font-size: 11px; }
.node-section { margin-top: 14px; }
.node-section h3 { margin-bottom: 9px; color: #334155; font-size: 14px; }
.section-heading h3 { margin-bottom: 0; }
.section-heading > span { color: #64748b; font-size: 12px; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.detail-item { min-width: 0; padding: 9px 10px; border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { color: #64748b; font-size: 11px; }
.detail-item strong { margin-top: 4px; color: #1d2733; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-list { display: flex; gap: 7px; flex-wrap: wrap; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.dependency-list, .requirement-list, .output-list, .receipt-list, .rule-list { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.dependency-row, .requirement-list > div, .output-list > div, .receipt-list > div, .rule-list > div { min-height: 38px; padding: 8px 10px; border-bottom: 1px solid #eef2f7; display: grid; align-items: center; gap: 8px; }
.dependency-row { grid-template-columns: 12px minmax(0,1fr) auto 48px; }
.requirement-list > div { grid-template-columns: 80px minmax(0,1fr) auto; }
.output-list > div { grid-template-columns: minmax(0,1fr) 70px auto; }
.receipt-list > div { grid-template-columns: minmax(130px,1fr) 110px auto; }
.rule-list > div { grid-template-columns: minmax(130px,1fr) minmax(170px,1.2fr) auto; }
.dependency-row:last-child, .requirement-list > div:last-child, .output-list > div:last-child, .receipt-list > div:last-child, .rule-list > div:last-child { border-bottom: 0; }
.dependency-row em { color: #64748b; font-size: 11px; font-style: normal; text-align: right; }
.requirement-list span, .output-list span, .receipt-list span { color: #64748b; font-size: 12px; }
.rule-list code { color: #475569; font-size: 11px; white-space: normal; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.dot-ready { background: #16a34a; }
.dot-checking { background: #2563eb; }

.process-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.process-strip > div { min-width: 0; min-height: 65px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.process-strip i, .process-strip span, .process-strip small { display: block; }
.process-strip i { width: 22px; height: 22px; border-radius: 50%; background: #e2e8f0; color: #475569; display: grid; place-items: center; font-size: 11px; font-style: normal; }
.process-strip span { margin-top: 5px; color: #334155; font-size: 11px; font-weight: 700; }
.process-strip small { margin-top: 3px; color: #64748b; font-size: 10px; }
.process-strip .process-completed { border-color: rgba(22,163,74,.35); background: #f0fdf4; }
.process-strip .process-completed i { background: #16a34a; color: #fff; }
.process-strip .process-running { border-color: rgba(37,99,235,.4); background: #eff6ff; }
.process-strip .process-running i { background: #2563eb; color: #fff; }
.receipt-row { padding: 10px; border-left: 3px solid #16a34a; background: #f0fdf4; }
.receipt-row h3 { margin-bottom: 5px; }
.receipt-row span { color: #166534; font-size: 13px; font-weight: 700; }
.receipt-row time { display: block; margin-top: 3px; color: #64748b; font-size: 11px; }

.pipeline-list { display: grid; gap: 7px; }
.pipeline-row { display: grid; grid-template-columns: 30px minmax(150px,1fr) minmax(120px,.8fr) 74px 52px; gap: 8px; align-items: center; min-height: 52px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.pipeline-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e2e8f0; font-weight: 800; }
.pipeline-row strong, .pipeline-row small { display: block; }
.pipeline-row strong { color: #334155; font-size: 12px; }
.pipeline-row small { margin-top: 4px; color: #64748b; font-size: 10px; }
.pipeline-row em { color: #64748b; font-size: 10px; font-style: normal; text-align: right; }
.pipeline-completed { border-color: rgba(22,163,74,.3); background: #f7fef9; }
.pipeline-completed .pipeline-icon { background: #16a34a; color: #fff; }
.pipeline-running { border-color: rgba(37,99,235,.4); background: #eff6ff; }
.pipeline-running .pipeline-icon { background: #2563eb; color: #fff; }

.model-matrix { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.model-matrix article { min-width: 0; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.model-matrix header { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.model-matrix header strong { color: #17365d; font-size: 12px; word-break: break-word; }
.model-matrix article > span { display: block; min-height: 30px; margin-top: 6px; color: #64748b; font-size: 10px; }
.model-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; margin-top: 7px; }
.model-stats b, .model-stats small { display: block; text-align: center; }
.model-stats b { color: #17365d; font-size: 14px; }
.model-stats small { color: #64748b; font-size: 9px; }
.model-matrix footer { margin-top: 8px; color: #475569; font-size: 10px; }
.confidence-bars, .quality-bars { display: grid; gap: 7px; }
.confidence-bars > div { display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: center; gap: 8px; }
.confidence-bars span, .quality-bars span { color: #475569; font-size: 11px; }
.quality-bars > div { display: grid; grid-template-columns: 130px minmax(0,1fr); align-items: center; gap: 8px; }
.table-note { display: block; margin-top: 3px; color: #64748b; }

.funnel-row, .flow-metrics, .severity-summary { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; }
.funnel-row > div, .flow-metrics > div, .severity-summary > div { min-height: 60px; padding: 9px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; text-align: center; }
.funnel-row strong, .funnel-row span, .flow-metrics strong, .flow-metrics span, .severity-summary strong, .severity-summary span { display: block; }
.funnel-row strong, .flow-metrics strong, .severity-summary strong { color: #17365d; font-size: 18px; }
.funnel-row span, .flow-metrics span, .severity-summary span { margin-top: 5px; color: #64748b; font-size: 10px; }
.severity-summary { grid-template-columns: repeat(4, minmax(0,1fr)); }
.severity-box.severity-critical { border-color: rgba(220,38,38,.4); background: #fef2f2; }
.severity-box.severity-high { border-color: rgba(249,115,22,.4); background: #fff7ed; }
.severity-box.severity-medium { border-color: rgba(37,99,235,.35); background: #eff6ff; }
.severity-box.severity-low { border-color: rgba(22,163,74,.35); background: #f0fdf4; }
.operation-timeline { padding: 4px 0 0 6px; }
.operation-timeline strong, .operation-timeline span { display: block; }
.operation-timeline strong { color: #334155; font-size: 12px; }
.operation-timeline span { margin-top: 4px; color: #64748b; font-size: 11px; }

.duration-list { display: grid; gap: 7px; }
.duration-list > div { display: grid; grid-template-columns: 130px minmax(0,1fr) 58px 72px; align-items: center; gap: 8px; }
.duration-list > div > span { color: #475569; font-size: 11px; }
.duration-list > div > div { height: 8px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.duration-list > div > div i { display: block; height: 100%; background: #2563eb; }
.duration-list strong { color: #334155; font-size: 11px; text-align: right; }
.node-error { margin-top: 14px; }

.evidence-tabs { margin-top: 14px; padding: 0 12px 10px; }
.evidence-toolbar { min-height: 36px; color: #64748b; font-size: 12px; }
.event-stream-rich { max-height: 260px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.event-stream-rich button { width: 100%; min-height: 38px; padding: 7px 10px; border: 0; border-bottom: 1px solid #eef2f7; background: #fff; display: grid; grid-template-columns: 78px 120px minmax(0,1fr) 66px; gap: 9px; align-items: center; text-align: left; cursor: pointer; }
.event-stream-rich button:hover { background: #f8fafc; }
.event-stream-rich time, .event-stream-rich em { color: #64748b; font-size: 10px; font-style: normal; }
.event-stream-rich strong { color: #17365d; font-size: 11px; }
.event-stream-rich span { color: #475569; font-size: 11px; }
.event-stream-rich .event-failed { background: #fef2f2; }
.event-stream-rich .event-running { background: #eff6ff; }

.detail-json { margin: 14px 0 0; padding: 12px; border: 1px solid #d8e3ee; border-radius: 8px; background: #f8fafc; color: #334155; font: 12px/1.55 Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.business-grid { margin-top: 18px; }

@media (max-width: 1120px) {
  .run-workspace { grid-template-columns: 1fr; }
  .run-gis-map { min-height: 430px; }
  .step-workspace { min-height: auto; max-height: none; }
}

@media (max-width: 980px) {
  .global-run-state { align-items: stretch; flex-direction: column; }
  .global-progress { width: 100%; min-width: 0; }
  .model-matrix { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .run-console-title, .global-run-state, .step-panel-header, .gis-toolbar { align-items: flex-start; flex-direction: column; }
  .run-controls { justify-content: flex-start; }
  .split-section, .detail-grid { grid-template-columns: 1fr; }
  .process-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pipeline-row { grid-template-columns: 30px minmax(0,1fr) 74px; }
  .pipeline-row .el-progress, .pipeline-row em { display: none; }
  .funnel-row, .flow-metrics, .severity-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .event-stream-rich button { grid-template-columns: 70px minmax(0,1fr); }
  .event-stream-rich span, .event-stream-rich em { grid-column: 2; }
  .duration-list > div { grid-template-columns: 110px minmax(0,1fr) 50px; }
  .duration-list .el-tag { display: none; }
}
