refactor: 분석 페이지 코드 정돈 및 AI 엔진 고도화 통합

This commit is contained in:
2026-03-23 17:49:24 +09:00
parent d416fee414
commit be3210463f
14 changed files with 590 additions and 854 deletions

View File

@@ -1,4 +1,6 @@
/* Analysis Page Styles */
/* ==========================================================================
Project Master Analysis - Sabermetrics Style
========================================================================== */
.analysis-content {
padding: 24px;
@@ -6,124 +8,42 @@
margin: var(--topbar-h, 36px) auto 0;
}
.analysis-header {
display: flex;
justify-content: space-between;
align-items: flex-end;
padding: 10px 0 30px 0;
margin-bottom: 10px;
}
/* AI Badge & Header */
.ai-badge {
display: inline-block;
padding: 4px 12px;
background: #6366f1;
color: white;
padding: 2px 10px;
border-radius: 20px;
background: var(--ai-color, linear-gradient(135deg, #6366f1 0%, #a855f7 100%));
color: #fff;
font-size: 11px;
font-weight: 700;
margin-bottom: 10px;
text-transform: uppercase;
font-weight: 800;
display: inline-block;
margin-bottom: 8px;
letter-spacing: 0.5px;
}
.analysis-header h2 { font-size: 24px; font-weight: 800; color: #111; margin: 0; }
.analysis-header p { font-size: 13px; color: #666; margin-top: 6px; }
.btn-refresh {
padding: 10px 20px;
background: #fff;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}
.btn-refresh:hover { background: #f8f9fa; border-color: #bbb; }
/* 1. Metrics Grid */
.metrics-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
margin-bottom: 30px;
}
.metric-card {
background: #fff;
padding: 24px;
border-radius: 16px;
border: 1px solid #eef0f2;
box-shadow: 0 4px 20px rgba(0,0,0,0.04);
.analysis-header {
display: flex;
flex-direction: column;
gap: 12px;
}
.metric-card .label {
font-size: 12px;
font-weight: 600;
color: #888;
display: flex;
align-items: center;
gap: 5px;
position: relative; /* 툴팁 배치를 위해 추가 */
}
/* 툴팁 스타일 추가 */
.metric-card .label:hover::after {
content: attr(data-tooltip);
position: absolute;
bottom: 100%;
left: 0;
width: 220px;
padding: 12px;
background: #1e293b;
color: #fff;
font-size: 11px;
font-weight: 400;
line-height: 1.5;
border-radius: 8px;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
z-index: 10;
margin-bottom: 10px;
pointer-events: none;
white-space: normal;
}
.metric-card .label:hover::before {
content: '';
position: absolute;
bottom: 100%;
left: 20px;
border: 6px solid transparent;
border-top-color: #1e293b;
margin-bottom: -2px;
z-index: 10;
}
.info-icon { width: 14px; height: 14px; border-radius: 50%; background: #eee; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; cursor: help; font-style: normal; }
.metric-card .value { font-size: 32px; font-weight: 800; color: #1e5149; margin: 0; }
.trend { font-size: 11px; font-weight: 700; }
.trend.up { color: #d32f2f; }
.trend.down { color: #1976d2; }
.trend.steady { color: #666; }
.analysis-content.wide {
max-width: 95%;
padding: 20px 40px;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
/* Top Info Grid (AI Info & SOI Deep Dive) */
.top-info-grid {
display: grid;
grid-template-columns: 1fr 2fr; /* AI 정보는 작게, SOI 설명은 넓게 */
grid-template-columns: 1fr 2fr;
gap: 16px;
margin-bottom: 16px;
margin-bottom: 24px;
}
.dl-model-info, .soi-deep-dive {
background: white;
border-radius: 12px;
border: 1px solid #eef2f6;
box-shadow: 0 4px 12px rgba(0,0,0,0.03);
padding: 20px;
}
/* AI 엔진 정보 수직 정렬로 변경 */
.model-desc-vertical {
display: flex;
flex-direction: column;
@@ -136,24 +56,20 @@
gap: 12px;
}
.model-item-vertical p {
font-size: 12.5px;
.model-tag {
background: #f1f5f9;
color: #475569;
margin: 0;
}
/* SOI Deep-Dive 스타일 */
.soi-deep-dive {
background: #fff;
border-radius: 16px;
border: 1px solid #eef2f6;
box-shadow: 0 4px 20px rgba(0,0,0,0.04);
padding: 2px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 700;
white-space: nowrap;
}
.soi-info-columns {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
gap: 20px;
}
.soi-info-column h6 {
@@ -161,8 +77,6 @@
font-weight: 800;
color: #1e5149;
margin: 0 0 8px 0;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.soi-info-column p {
@@ -172,170 +86,20 @@
margin: 0;
}
.soi-info-column p strong {
color: #334155;
font-weight: 700;
}
.model-tag {
padding: 4px 10px;
background: #f0f7ff;
color: #2563eb;
border-radius: 6px;
font-size: 11px;
font-weight: 800;
min-width: 70px;
text-align: center;
border: 1px solid #dbeafe;
}
/* 가이드 리스트 2줄 그리드 */
.guide-list.grid-2-rows {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px 20px;
margin: 0;
padding: 0;
}
.guide-list.grid-2-rows li {
background: #f8fafc;
padding: 4px 10px;
border-radius: 6px;
border: 1px solid #e2e8f0;
font-size: 11.5px;
white-space: nowrap;
}
/* 모달 레이아웃 */
.modal-overlay {
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0, 0, 0, 0.5);
display: none; /* 초기 상태 숨김 */
align-items: center;
justify-content: center;
z-index: 1000;
backdrop-filter: blur(4px);
}
.modal-content {
background: #fff;
width: 600px;
max-width: 90%;
border-radius: 16px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
overflow: hidden;
animation: modal-up 0.3s ease-out;
}
@keyframes modal-up {
from { transform: translateY(20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.modal-header {
padding: 20px 24px;
border-bottom: 1px solid #f1f5f9;
display: flex;
justify-content: space-between;
align-items: center;
background: #fcfcfc;
}
.modal-header h3 { margin: 0; font-size: 18px; color: #1e293b; font-weight: 800; }
.modal-close {
background: none; border: none; font-size: 24px; color: #94a3b8; cursor: pointer;
}
.modal-body { padding: 24px; }
/* 수식 및 설명 스타일 */
.formula-section { margin-bottom: 24px; }
.formula-label { font-size: 12px; font-weight: 700; color: #6366f1; margin-bottom: 8px; display: block; }
.formula-box {
background: #f8fafc;
padding: 16px;
border-radius: 12px;
border: 1px solid #e2e8f0;
font-family: 'Courier New', Courier, monospace;
font-weight: 700;
color: #1e5149;
text-align: center;
font-size: 16px;
}
.desc-text { font-size: 13.5px; color: #475569; line-height: 1.7; }
.desc-list { margin-top: 16px; padding-left: 20px; }
.desc-list li { margin-bottom: 8px; font-size: 13px; color: #64748b; }
/* 도움말 버튼 */
.btn-help {
width: 16px; height: 16px;
display: inline-flex; align-items: center; justify-content: center;
background: #e2e8f0; color: #64748b;
border-radius: 50%; font-size: 10px; font-weight: 800;
margin-left: 6px; cursor: pointer; vertical-align: middle;
transition: all 0.2s; border: none;
}
.btn-help:hover { background: #6366f1; color: #fff; }
/* 2. Main Grid Layout */
.analysis-main-full {
width: 100%;
margin-bottom: 24px;
}
.analysis-card {
background: #fff;
border-radius: 16px;
border: 1px solid #eef2f6;
box-shadow: 0 4px 20px rgba(0,0,0,0.04);
overflow: hidden;
}
.card-header {
padding: 20px 24px;
border-bottom: 1px solid #f1f5f9;
display: flex;
justify-content: space-between;
align-items: center;
}
.card-header h4 { margin: 0; font-size: 15px; font-weight: 700; color: #334155; }
.card-body { padding: 24px; }
/* 테이블 스크롤 래퍼 */
.table-scroll-wrapper {
max-height: 600px;
overflow-y: auto;
border-radius: 8px;
border: 1px solid #eef2f6;
}
/* 스크롤바 커스텀 */
.table-scroll-wrapper::-webkit-scrollbar { width: 6px; }
.table-scroll-wrapper::-webkit-scrollbar-track { background: #f8fafc; }
.table-scroll-wrapper::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.table-scroll-wrapper::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
/* 분석 차트 그리드 */
/* Chart Grid Layout */
.analysis-charts-grid {
display: grid;
grid-template-columns: 1.2fr 2fr; /* 원형 그래프 영역 소폭 확장 */
grid-template-columns: 1.2fr 2fr;
gap: 20px;
margin-bottom: 24px;
}
.chart-container-box {
background: #f8fafc;
background: white;
border-radius: 12px;
padding: 20px;
border: 1px solid #e2e8f0;
height: 320px; /* 고정 높이 */
border: 1px solid #eef2f6;
height: 340px;
display: flex;
flex-direction: column;
}
@@ -344,111 +108,27 @@
margin: 0 0 15px 0;
font-size: 13px;
font-weight: 700;
color: #475569;
display: flex;
align-items: center;
gap: 8px;
color: #334155;
}
.chart-container-box canvas {
flex: 1;
width: 100% !important;
height: 100% !important;
/* Data Table Customization */
.p-war-table-container {
margin-top: 24px;
}
@media (max-width: 1024px) {
.analysis-charts-grid {
grid-template-columns: 1fr;
}
}
.chart-placeholder {
height: 300px;
background: #f8fafc;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: #94a3b8;
border: 1px dashed #e2e8f0;
}
/* D-WAR 테이블 스타일 추가 */
.d-war-table { width: 100%; border-radius: 12px; overflow: hidden; }
.d-war-table th { background: #f1f5f9; color: #475569; font-size: 11px; padding: 12px; }
.d-war-table td { padding: 14px 12px; border-bottom: 1px solid #f1f5f9; }
.d-war-value { font-weight: 800; color: #1e5149; text-align: center; font-size: 15px; }
.p-war-value { font-weight: 800; text-align: center; font-size: 15px; }
.text-plus { color: #1d4ed8; }
.text-minus { color: #dc2626; }
/* 관리 상태 배지 스타일 */
.badge-system {
display: inline-block;
padding: 4px 10px;
background: #450a0a;
color: #fecaca;
border: 1px solid #7f1d1d;
font-size: 11px;
font-weight: 800;
border-radius: 6px;
white-space: nowrap;
}
.badge-active {
display: inline-block;
padding: 4px 10px;
background: #f0fdf4;
color: #166534;
border: 1px solid #dcfce7;
font-size: 11px;
font-weight: 700;
border-radius: 6px;
white-space: nowrap;
}
.badge-warning {
display: inline-block;
padding: 4px 10px;
background: #fffbeb;
color: #92400e;
border: 1px solid #fef3c7;
font-size: 11px;
font-weight: 700;
border-radius: 6px;
white-space: nowrap;
}
.badge-danger {
display: inline-block;
padding: 4px 10px;
background: #fef2f2;
color: #991b1b;
border: 1px solid #fee2e2;
font-size: 11px;
font-weight: 700;
border-radius: 6px;
white-space: nowrap;
}
/* 행 강조 스타일 수정 */
.row-danger { background: #fff1f2 !important; }
.row-warning { background: #fffaf0 !important; }
.row-success { background: #f0fdf4 !important; }
/* 아코디언 상세 행 스타일 */
.p-war-table tbody tr.project-row {
.project-row {
cursor: pointer;
transition: background 0.2s;
transition: background 0.2s ease;
}
.p-war-table tbody tr.project-row:hover {
background: #f1f5f9 !important;
.project-row:hover {
background: #f8fafc !important;
}
/* Accordion Detail Styles */
.detail-row {
display: none;
background: #f8fafc;
background: #fdfdfd;
}
.detail-row.active {
@@ -456,25 +136,60 @@
}
.detail-container {
padding: 20px 30px;
border-bottom: 2px solid #e2e8f0;
padding: 20px 24px;
border-bottom: 2px solid #f1f5f9;
}
.formula-explanation-card {
background: white;
border-radius: 12px;
padding: 20px;
padding: 24px;
border: 1px solid #e2e8f0;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.formula-header {
font-size: 13px;
font-weight: 700;
color: #6366f1;
margin-bottom: 15px;
}
/* Work Effort Bar Area */
.work-effort-section {
background: #f8fafc;
padding: 16px;
border-radius: 8px;
margin-bottom: 20px;
border: 1px solid #eef2f6;
}
.work-effort-header {
display: flex;
flex-direction: column;
gap: 15px;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.work-effort-bar-bg {
width: 100%;
height: 6px;
background: #e2e8f0;
border-radius: 3px;
overflow: hidden;
margin-bottom: 10px;
}
/* Formula Steps Grid */
.formula-steps-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.formula-step {
display: flex;
align-items: flex-start;
gap: 15px;
gap: 12px;
}
.step-num {
@@ -489,107 +204,38 @@
font-size: 11px;
font-weight: 800;
flex-shrink: 0;
margin-top: 2px;
}
.step-content {
flex: 1;
}
.step-title {
font-size: 13px;
font-size: 12px;
font-weight: 700;
color: #334155;
margin-bottom: 4px;
}
.step-desc {
font-size: 12px;
color: #64748b;
line-height: 1.5;
}
.math-logic {
font-family: 'Courier New', Courier, monospace;
font-family: 'Consolas', monospace;
background: #f1f5f9;
padding: 4px 8px;
border-radius: 4px;
font-weight: 700;
color: #0f172a;
font-size: 13px;
margin-top: 6px;
font-size: 12px;
display: inline-block;
}
.final-result-area {
margin-top: 20px;
padding-top: 15px;
border-top: 2px solid #1e5149;
display: flex;
justify-content: space-between;
align-items: center;
}
/* Utility Classes */
.highlight-var { color: #2563eb; }
.highlight-val { color: #059669; }
.highlight-penalty { color: #dc2626; }
.d-war-guide {
display: flex;
gap: 20px;
margin-bottom: 20px;
padding: 12px 20px;
background: #f8fafc;
border-radius: 8px;
border: 1px solid #e2e8f0;
}
.guide-item {
font-size: 12px;
font-weight: 600;
color: #64748b;
display: flex;
align-items: center;
gap: 8px;
}
.guide-item span {
padding: 2px 8px;
border-radius: 4px;
font-size: 11px;
color: #fff;
}
.active-low span { background: #2563eb; }
.warning-mid span { background: #22c55e; }
.danger-high span { background: #f59e0b; }
.hazard-critical span { background: #ef4444; }
/* 3. Risk Signal List */
.risk-signal-list { display: flex; flex-direction: column; gap: 12px; }
.risk-item {
padding: 16px;
border-radius: 12px;
display: grid;
grid-template-columns: 1fr 40px;
gap: 4px;
position: relative;
}
.risk-project { font-size: 13px; font-weight: 700; color: #1e293b; }
.risk-reason { font-size: 11px; color: #64748b; margin-top: 4px; }
.risk-status {
grid-row: span 2;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 800;
border-radius: 8px;
}
.risk-item.high { background: #fff1f2; border-left: 4px solid #f43f5e; }
.risk-item.high .risk-status { color: #f43f5e; }
.risk-item.warning { background: #fffbeb; border-left: 4px solid #f59e0b; }
.risk-item.warning .risk-status { color: #f59e0b; }
.risk-item.safe { background: #f0fdf4; border-left: 4px solid #22c55e; }
.risk-item.safe .risk-status { color: #22c55e; }
/* 4. Factor Section */
.factor-grid { display: flex; flex-direction: column; gap: 16px; }
.factor-item { display: grid; grid-template-columns: 200px 1fr 60px; align-items: center; gap: 20px; }
.factor-name { font-size: 13px; font-weight: 600; color: #475569; }
.factor-bar-wrapper { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.factor-bar { height: 100%; background: var(--ai-color, #6366f1); border-radius: 4px; }
.factor-value { font-size: 12px; font-weight: 700; color: #1e5149; text-align: right; }
.text-plus { color: #059669; font-weight: 700; }
.text-minus { color: #dc2626; font-weight: 700; }