@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

.egu-dashboard-page {
    --primary-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-sub: #64748b;
    --border-color: #e2e8f0;
    --point-blue: #0060df;
    --point-cyan: #38bdf8;
    --point-green: #10b981;

    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 0 0 1.5rem 0;
    width: 100%;
}

/* 대시보드 타이틀 헤더 */
.egu-dashboard-page .egu-dashboard-header h2 {
    font-family: 'Pretendard', sans-serif;
}

/* 대시보드 상단 1행 그리드: 시안 0903 정밀 픽셀 비율 (23.2% : 28.0% : 45.0%) */
.egu-dashboard-page .dashboard-grid-top {
    display: grid;
    grid-template-columns: 2.45fr 2.95fr 4.6fr;
    gap: 1.1rem;
    margin-bottom: 1.1rem;
}

/* 대시보드 하단 2행 그리드: 시안 0903 정밀 픽셀 비율 (12.7% : 12.7% : 38.9% : 30.2%) */
.egu-dashboard-page .dashboard-grid-bottom {
    display: grid;
    grid-template-columns: 1.35fr 1.35fr 4.1fr 3.2fr;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

/* 호환용 12컬럼 그리드 */
.egu-dashboard-page .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.1rem;
    margin-bottom: 1.1rem;
}

.egu-dashboard-page .col-2 { grid-column: span 2; }
.egu-dashboard-page .col-3 { grid-column: span 3; }
.egu-dashboard-page .col-4 { grid-column: span 4; }
.egu-dashboard-page .col-5 { grid-column: span 5; }

@media (max-width: 900px) {
    .egu-dashboard-page .dashboard-grid-top,
    .egu-dashboard-page .dashboard-grid-bottom,
    .egu-dashboard-page .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

.egu-dashboard-page .card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    padding: 1.1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.egu-dashboard-page .card.card-compact {
    padding: 0.85rem 0.65rem;
}

.egu-dashboard-page .card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

.egu-dashboard-page .card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
    letter-spacing: -0.3px;
}

.egu-dashboard-page .card-desc {
    font-size: 0.72rem;
    color: var(--text-sub);
    margin-bottom: 0.7rem;
    line-height: 1.35;
}

/* 차트 레이아웃 안정화 (고정 높이 부여) */
.egu-dashboard-page .chart-container-large {
    position: relative;
    width: 100%;
    height: 215px;
}

.egu-dashboard-page .chart-container-small {
    position: relative;
    width: 100%;
    height: 225px;
}

/* CBL 산정 신뢰도 파라미터 행 및 둥근 막대 바 */
.egu-dashboard-page .cbl-param-row {
    display: flex;
    align-items: center;
    font-size: 0.7rem;
    position: relative;
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.egu-dashboard-page .cbl-param-row:hover {
    background: #f1f5f9;
}

.egu-dashboard-page .cbl-param-label {
    flex: 0 0 76px;
    min-width: 76px;
    width: 76px;
    flex-shrink: 0;
    color: #475569;
    white-space: nowrap;
    margin-right: 0.5rem;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: -0.3px;
}

.egu-dashboard-page .cbl-param-bar-wrap {
    position: relative;
    flex: 1;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.egu-dashboard-page .cbl-param-bar {
    height: 100%;
    border-radius: 5px;
    background: #38bdf8;
    transition: width 0.3s ease, background-color 0.2s ease;
}

.egu-dashboard-page .cbl-param-row:hover .cbl-param-bar {
    background: #0284c7;
}

/* 마우스 오버 시에만 세부 수치가 막대 위 툴팁 배지로 오버레이 표출 */
.egu-dashboard-page .cbl-param-val {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: #0369a1;
    font-size: 0.66rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 5;
    pointer-events: none;
}

.egu-dashboard-page .cbl-param-row:hover .cbl-param-val {
    opacity: 1;
    visibility: visible;
}

/* 푸터 */
.egu-dashboard-page .footer-bar {
    height: 2.8rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 0.75rem;
    color: var(--text-sub);
    flex-shrink: 0;
    margin-top: 0.3rem;
}

/* 7. BEP 도달 현황 카드 스타일 (대시보드_0908 디자인 규격) */
.egu-dashboard-page .bep-card {
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.25rem;
    box-sizing: border-box;
}

.egu-dashboard-page .bep-rate-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 0.2rem;
    margin-bottom: 0.1rem;
}

.egu-dashboard-page .bep-rate-title {
    font-size: 0.94rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    letter-spacing: -0.3px;
}

.egu-dashboard-page .bep-rate-val {
    font-size: 2.55rem;
    font-weight: 800;
    color: var(--point-blue);
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -1px;
}

.egu-dashboard-page .bep-progress-wrap {
    position: relative;
    margin-top: 0.45rem;
    margin-bottom: 1.7rem;
}

.egu-dashboard-page .bep-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 6px;
    width: 100%;
    position: relative;
}

.egu-dashboard-page .bep-fill {
    width: 0%;
    height: 100%;
    background: var(--point-blue);
    border-radius: 6px;
    position: absolute;
    left: 0;
    top: 0;
    transition: width 0.4s ease;
}

.egu-dashboard-page .bep-marker {
    position: absolute;
    left: 0%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #ffffff;
    border: 3.5px solid var(--point-blue);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 102, 255, 0.25);
    z-index: 2;
    transition: left 0.4s ease;
}

.egu-dashboard-page .bep-tooltip {
    position: absolute;
    left: 0%;
    top: 17px;
    transform: translateX(-50%);
    background: var(--point-blue);
    color: #ffffff;
    padding: 0.2rem 0.55rem 0.18rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 3;
    letter-spacing: 0.2px;
    transition: left 0.4s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.egu-dashboard-page .bep-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4.5px solid transparent;
    border-right: 4.5px solid transparent;
    border-bottom: 5px solid var(--point-blue);
}

.egu-dashboard-page .bep-remaining-days {
    position: absolute;
    right: 0;
    top: 17px;
    font-size: 0.74rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

.egu-dashboard-page .bep-bottom-grid {
    display: flex;
    gap: 0.85rem;
    margin-top: 0.2rem;
    flex: 1;
    align-items: stretch;
}

.egu-dashboard-page .bep-metrics-col {
    flex: 1.15;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}

/* 총 투자액 박스 내부: 연한 회색 (#f8fafc) */
.egu-dashboard-page .bep-metric-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.68rem 1.05rem;
    white-space: nowrap;
    box-sizing: border-box;
    flex: 1;
}

.egu-dashboard-page .bep-metric-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.egu-dashboard-page .bep-metric-val {
    font-size: 0.78rem;
    text-align: right;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.egu-dashboard-page .bep-metric-val strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.egu-dashboard-page .bep-metric-val span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
}

.egu-dashboard-page .bep-predict-box {
    flex: 1.05;
    min-width: 0;
    background: #e0f2fe;
    border-radius: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 1.0rem 1.15rem;
    box-sizing: border-box;
}

.egu-dashboard-page .bep-predict-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0284c7;
    margin-bottom: 0.45rem;
    white-space: nowrap;
}

.egu-dashboard-page .bep-predict-date {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1d4ed8;
    margin-bottom: 0.45rem;
    white-space: nowrap;
    letter-spacing: -0.5px;
}

.egu-dashboard-page .bep-predict-period {
    font-size: 0.74rem;
    color: #475569;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

