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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 50%, #fce4ec 100%);
    min-height: 100vh;
    display: flex;
}

/* 사이드바 */
.sidebar {
    width: 90px;
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.logo {
    margin-bottom: 30px;
}

.logo img {
    width: 70px;
    height: auto;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 5px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 10px;
    text-align: center;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

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

.nav-item.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

/* 메인 콘텐츠 */
.main-content {
    margin-left: 90px;
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
}

/* 헤더 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 8px 15px;
    border-radius: 20px;
    gap: 10px;
}

.search-box i {
    color: #64748b;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 150px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #64748b;
    font-size: 18px;
}

.user-actions i {
    cursor: pointer;
    transition: color 0.3s;
}

.user-actions i:hover {
    color: #1e293b;
}

.user-actions span {
    font-size: 14px;
    cursor: pointer;
}

/* 탭 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    color: #64748b;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.tab-btn.active {
    background: #fff;
    color: #6366f1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 메트릭 카드 */
.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.metric-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1e293b;
    text-align: center;
}

.progress-ring {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.progress-ring canvas {
    width: 100% !important;
    height: 100% !important;
}

.progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.metric-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.metric-row span:first-child {
    min-width: 35px;
    color: #64748b;
    font-weight: 500;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar.blue { background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%); }
.bar.light-blue { background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%); }
.bar.purple { background: linear-gradient(90deg, #a855f7 0%, #9333ea 100%); }
.bar.light-purple { background: linear-gradient(90deg, #c084fc 0%, #a855f7 100%); }
.bar.orange { background: linear-gradient(90deg, #f97316 0%, #ea580c 100%); }
.bar.light-orange { background: linear-gradient(90deg, #fb923c 0%, #f97316 100%); }
.bar.green { background: linear-gradient(90deg, #10b981 0%, #059669 100%); }
.bar.light-green { background: linear-gradient(90deg, #34d399 0%, #10b981 100%); }

.metric-row span:last-child {
    min-width: 40px;
    text-align: right;
    color: #1e293b;
    font-weight: 600;
}

.metric-diff {
    text-align: center;
    margin-top: 8px;
    font-weight: 700;
    font-size: 14px;
}

.metric-diff.negative {
    color: #ef4444;
}

/* 배경 그라데이션 */
.bg-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.bg-purple {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.bg-orange {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
}

.bg-green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

/* 차트 섹션 */
.chart-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.chart-container {
    position: relative;
    height: 400px;
}

/* 타임라인 섹션 */
.timeline-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

.timeline-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

.timeline-years {
    display: flex;
    gap: 0;
}

.year-section {
    flex: 1;
    text-align: center;
}

.year {
    display: block;
    font-weight: 700;
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 10px;
}

.months {
    display: flex;
    justify-content: space-around;
    font-size: 11px;
    color: #64748b;
}

.timeline-body {
    display: flex;
    flex-direction: column;
}

.timeline-row {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    min-height: 60px;
    position: relative;
}

.timeline-row.highlight {
    background: rgba(147, 197, 253, 0.1);
}

.timeline-label {
    min-width: 180px;
    padding: 15px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    background: rgba(248, 250, 252, 0.8);
    border-right: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.timeline-label small {
    font-size: 10px;
    font-weight: 400;
    color: #64748b;
    display: block;
    margin-top: 3px;
}

.timeline-content {
    flex: 1;
    position: relative;
    padding: 10px 0;
}

.milestone-group {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

.milestone {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s;
}

.milestone:hover {
    transform: scale(1.3);
}

.milestone.gray { background: #94a3b8; }
.milestone.teal { background: #14b8a6; }
.milestone.pink { background: #ec4899; }
.milestone.yellow { background: #fbbf24; }
.milestone.purple { background: #a855f7; }
.milestone.blue { background: #3b82f6; }

.milestone-text {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    position: absolute;
    top: 25px;
    left: 0;
}

/* KEY MILESTONE 라벨 */
.timeline-row::before {
    content: 'KEY MILESTONE';
    position: absolute;
    left: -90px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 1px;
}

.timeline-row:first-child::before {
    content: '';
}

/* 반응형 디자인 */
@media (max-width: 1400px) {
    .metrics-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 15px 5px;
    }

    .nav-item {
        font-size: 9px;
        padding: 10px 5px;
    }

    .nav-item i {
        font-size: 18px;
    }

    .main-content {
        margin-left: 70px;
        padding: 15px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
    }

    .metrics-container {
        grid-template-columns: 1fr;
    }

    .timeline-label {
        min-width: 120px;
        font-size: 11px;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}