body {
    font-family: Arial, sans-serif;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

.navbar {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.nav-link.dropdown-toggle::after {
    display: none;
}

.navbar-light .navbar-nav .nav-link {
    color: #333;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #007bff;
}

.navbar-brand {
    font-weight: bold;
    color: #007bff !important;
}

h2 {
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-text {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.form-actions {
    margin-top: 30px;
}

.btn {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    background-color: #007bff;
    border: none;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
    color: white;
    margin-left: 10px;
}

.btn-primary:hover, .btn-secondary:hover {
    opacity: 0.9;
}

table .btn {
    padding: 0 10px;  /* 상하 패딩 0, 좌우 패딩 10px */
    height: 30px;  /* 버튼의 높이를 줄임 */
    line-height: 30px;  /* 텍스트를 수직 중앙에 배치 */
    font-size: 14px;  /* 글자 크기를 줄임 */
}

/* 테이블 스타일 */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

/* 테이블 스트라이프 배경색 조정 */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.03);
}

.summary-cell {
    max-width: 500px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 반응형 테이블 */
@media screen and (max-width: 600px) {
    .table-responsive {
        border: 0;
    }
    
    .table-responsive table {
        border: 0;
    }
    
    .table-responsive table caption {
        font-size: 1.3em;
    }
    
    .table-responsive table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    
    .table-responsive table tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: .625em;
    }
    
    .table-responsive table td {
        border-bottom: 1px solid #ddd;
        display: block;
        font-size: .8em;
        text-align: right;
    }
    
    .table-responsive table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
    }
    
    .table-responsive table td:last-child {
        border-bottom: 0;
    }
}

.icon-3d {
    padding: 10px;
    color: #fff;
    background: #2980b9;
    border-radius: 50%;
}

.icon-3d:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px !important;
    }
}

/* 모달 테이블 스타일 개선 */
.modal .table {
    margin-bottom: 0;
    width: 100%;
}

.modal .table th,
.modal .table td {
    padding: 12px 8px;
    white-space: nowrap;
}

/* 요약 필드는 줄바꿈 허용 */
.modal .table td:nth-child(5) {
    white-space: normal;
    min-width: 200px;
}

/* 테이블 내 스크롤 영역 최대 높이 설정 */
.modal .table-responsive {
    max-height: 60vh;
    overflow-y: auto;
}

/* 새 데이터 행 강조 */
.modal .table tr.table-warning {
    background-color: #fff3cd;
}

/* 구분선 스타일 */
.modal .table tr.table-secondary td {
    padding: 4px;
    background-color: #e9ecef;
}

/* 모바일 대응 스타일 */
@media screen and (max-width: 768px) {
    /* 업로드 버튼 숨기기 */
    .mobile-hide {
        display: none !important;
    }
    
    /* 필터 영역 스타일 */
    .filter-collapse {
        margin-bottom: 1rem;
    }
    
    .filter-collapse .card {
        border: none;
        box-shadow: none;
    }
    
    .filter-collapse .card-header {
        background: none;
        padding: 0.5rem 0;
        border: none;
    }
    
    .filter-collapse .card-body {
        padding: 0.5rem 0;
    }
    
    /* 필터 내부 입력 필드 */
    .filter-collapse .form-control,
    .filter-collapse .form-select {
        font-size: 0.9rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* 요약 카드 스타일 */
    .summary-cards .card {
        margin-bottom: 0.5rem;
    }
    
    .summary-cards .card-body {
        padding: 0.75rem;
    }
    
    /* 테이블 스타일 개선 */
    .table-responsive {
        margin-top: 1rem;
    }
}

/* 필터 아코디언 화살표 아이콘 스타일 */
.fa-chevron-down.rotate-180 {
    transform: rotate(180deg);
}

/* 아코디언 트랜지션 - Removed for performance */

/* 모바일 페이지네이션 스타일 */
@media screen and (max-width: 768px) {
    .pagination {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
        margin: 1rem 0;
    }

    .pagination .page-item {
        margin: 0 2px;
    }

    .pagination .page-link {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 35px;
        text-align: center;
    }

    /* 처음/마지막 페이지 버튼 숨기기 */
    .pagination .page-item:first-child,
    .pagination .page-item:last-child {
        display: none;
    }

    /* 현재 페이지 강조 */
    .pagination .page-item.active .page-link {
        background-color: #007bff;
        border-color: #007bff;
    }
}

/* Form element heights */
.form-height {
    height: 38px !important;
}

.input-group .form-height {
    display: flex;
    align-items: center;
}
