/* 헤더 */
.header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

/* 메트릭 카드 그리드 */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    
    .dashboard-card.span-25,
    .dashboard-card.span-50,
    .dashboard-card.span-full {
        grid-column: 1 !important;
    }
}

.metric-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 32px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.metric-change {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

.metric-subtitle {
    font-size: 12px;
    color: #999;
}

/* 대시보드 그리드 레이아웃 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.dashboard-card.span-full {
    grid-column: 1 / -1;
}

.dashboard-card.span-2 {
    grid-column: span 2;
}

.dashboard-card.span-25 {
    grid-column: span 1;
}

.dashboard-card.span-50 {
    grid-column: span 2;
}

.card-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.chart-container {
    /* height: 320px;	 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-card.span-2 {
        grid-column: span 2;
    }
	.metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card.span-2 {
        grid-column: span 1;
    } */
	.dashboard-card.span-25 {
		grid-column: span 2;
	}
}

.total-expense {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.total-expense h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.total-expense .amount {
    font-size: 36px;
    font-weight: bold;
    margin: 0;
}

#grid {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    background: white;
}

/* TUI Grid 커스텀 스타일 */
.tui-grid-container {
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: visible !important;
}

/* 헤더 스타일 개선 */
.tui-grid-header-area {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    border-radius: 12px 12px 0 0;
}

.tui-grid-header-area .tui-grid-cell {
    background: transparent;
    /* color: white; */
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tui-grid-header-area .tui-grid-cell:last-child {
    border-right: none;
}

/* 행 호버 효과 */
.tui-grid-body-area .tui-grid-row:hover {
    background-color: #f8f9ff;
}

/* 선택된 행 */
.tui-grid-body-area .tui-grid-row.tui-grid-row-selected {
    background-color: #e8ecff;
}

/* 셀 스타일 */
.tui-grid-cell {
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

/* 체크박스 헤더 */
.tui-grid-row-header {
    background: linear-gradient(135deg, #5568d3 0%, #653d8f 100%);
}

.tui-grid-row-header .tui-grid-cell {
    background: transparent;
    color: white;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* 체크박스 커스터마이징 */
.tui-grid-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 편집 모드 셀 */
.tui-grid-cell-editing {
    background-color: #fff8e1;
}

/* 삭제 버튼 스타일 */
.delete-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
    background-image: url('/images/delete-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
}

.delete-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* 스크롤바 스타일 (Webkit 브라우저) */
.tui-grid-content-area::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.tui-grid-content-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.tui-grid-content-area::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.tui-grid-content-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653d8f 100%);
}

/* DatePicker 스타일 */
.tui-datepicker {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Select 드롭다운 스타일 */
.tui-grid-layer-focus-deactive {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* TUI Grid 오버플로우 방지 */
#grid {
    overflow: visible !important;
}

.tui-grid-container {
    overflow: visible !important;
}

.tui-grid-content-area {
    overflow: visible !important;
}

.tui-grid-body-area {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

/* DatePicker 팝업이 잘리지 않도록 */
.tui-datepicker-container {
    z-index: 10000 !important;
}
