body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    height: 100vh;
    overflow-x: hidden;
}

/* ✨ 상단 패널 스타일 */
#top-panel {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    transition: height 0.3s ease, overflow 0.3s ease;
    z-index: 100;
}

#top-panel.collapsed {
    height: 50px;
    overflow: hidden;
}

#top-panel-header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    user-select: none;
    min-height: 30px;
}

#top-panel-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
    flex-grow: 1;
}

#top-toggle-btn {
    width: 30px;
    height: 30px;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    margin-left: auto;
}

#top-toggle-btn:hover {
    background-color: #0056b3;
}

#top-toggle-btn .arrow {
    transition: transform 0.3s ease;
}

#top-panel.collapsed #top-toggle-btn .arrow {
    transform: rotate(180deg);
}

#top-panel-content {
    padding: 20px;
    transition: opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
}

#top-panel.collapsed #top-panel-content {
    opacity: 0;
    padding: 0 20px;
    pointer-events: none;
}

/* 토글 버튼 스타일 개선 */
.toggle-btn {
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-btn.active {
    background-color: #28a745;
    color: white;
    box-shadow: 0 3px 6px rgba(40, 167, 69, 0.3);
    transform: translateY(-1px);
}

.toggle-btn.inactive {
    background-color: #6c757d;
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 섹션별 스타일 개선 */
.toggleable-section {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    transition: all 0.4s ease;
    transform: translateY(0);
    opacity: 1;
    max-height: 1000px;
    overflow: hidden;
}

.toggleable-section.hidden {
    max-height: 0;
    padding: 0 15px;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(-10px);
    border-color: transparent;
}

/* Upload Form Styles */
#upload-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

#upload-form label {
    font-weight: bold;
    color: #333;
}

#upload-form input[type="file"] {
    margin-left: 10px;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background-color: white;
}

#upload-form button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

#upload-form button:hover {
    background-color: #0056b3;
}

/* Time Range Controls 스타일 개선 */
#time-range-controls {
    padding: 0;
    background-color: transparent;
    border: none;
}

.range-control {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.range-control label {
    min-width: 30px;
    font-weight: bold;
    color: #333;
}

.range-control input[type="range"] {
    flex-grow: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
}

.range-control input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
}

.range-control .value-display {
    min-width: 60px;
    text-align: center;
    font-weight: bold;
    color: #007bff;
    background-color: #e7f3ff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

/* 🔧 필터 컨트롤 섹션 */
#filter-controls {
    padding: 0;
    background-color: transparent;
    border: none;
    transition: opacity 0.3s ease;
    opacity: 0.5;
    pointer-events: none;
}

#filter-controls.active {
    opacity: 1;
    pointer-events: auto;
}

.filter-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.filter-title {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.filter-toggle {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.filter-toggle.active {
    background-color: #28a745;
}

.filter-controls-inner {
    display: none;
    margin-top: 15px;
}

.filter-controls-inner.active {
    display: block;
}

.filter-param {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.filter-param label {
    min-width: 100px;
    font-weight: 500;
    color: #555;
}

.filter-param input[type="range"] {
    flex-grow: 1;
    margin: 0 10px;
}

.filter-param .value-display {
    min-width: 60px;
    text-align: center;
    font-weight: bold;
    color: #007bff;
    background-color: #e7f3ff;
    padding: 4px 8px;
    border-radius: 4px;
}

.filter-apply-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.2s;
}

.filter-apply-btn:hover {
    background-color: #0056b3;
}

.filter-reset-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-reset-btn:hover {
    background-color: #c82333;
}

/* Main Container */
#container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    background-color: white;
    margin: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    transition: padding-left 0.3s ease;
    min-height: calc(100vh - 300px);
}

#container.sidebar-collapsed {
    padding-left: 40px;
}

/* Signal List Wrapper */
#signal-list-wrapper {
    position: absolute;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    z-index: 10;
    overflow: visible;
}

#signal-list-wrapper.collapsed {
    transform: translateX(-280px);
}

#sidebar-toggle {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 60px;
    background-color: #007bff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 11;
    box-shadow: 2px 0 4px rgba(0,0,0,0.2);
}

#sidebar-toggle:hover {
    background-color: #0056b3;
}

/* Signal List Styles */
#signal-list {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 15px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

#signal-list-wrapper.collapsed #signal-list {
    opacity: 0;
    pointer-events: none;
}

#signal-list h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

#search-signal {
    width: 60%;
    margin-bottom: 10px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#search-signal:focus {
    outline: none;
    border-color: #007bff;
}

#signal-items {
    max-height: calc(96% - 100px);
    overflow-y: auto;
}

.signal-item {
    padding: 8px 5px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: background-color 0.2s;
}

.signal-item:hover {
    background-color: #e3f2fd;
}

.signal-item:active {
    background-color: #bbdefb;
}

.selected-signal {
    background-color: #e8f5e8 !important;
    border-left: 4px solid #28a745;
    font-weight: bold;
}

.selected-signal:hover {
    background-color: #d4edda !important;
}

/* Plot Area Styles */
#plot-area {
    flex-grow: 1;
    min-width: 0;
    margin-left: 320px;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
#plot-area h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    flex-shrink: 0;
}
#container.sidebar-collapsed #plot-area {
    margin-left: 40px;
}



#chart-container {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 800px;
    max-height: 1500px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    margin-top: 10px;
}

#chart {
    width: 100% !important;
    height: 100% !important;
}

#top-panel.collapsed ~ #container #chart-container {
    height: 80vh;
    max-height: 1500px;
}

/* Scrollbar Styling */
#signal-list::-webkit-scrollbar,
#signal-items::-webkit-scrollbar {
    width: 8px;
}

#signal-list::-webkit-scrollbar-track,
#signal-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#signal-list::-webkit-scrollbar-thumb,
#signal-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#signal-list::-webkit-scrollbar-thumb:hover,
#signal-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 범례 스타일 추가 */
.chart-legend-custom {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    z-index: 10;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 20px;
    height: 3px;
    margin-right: 8px;
    border-radius: 2px;
}







/* 기본 반응형 디자인 + 높이 반응형 */

/* ==================== 너비 + 높이 반응형 ==================== */

/* Extra Large Desktop (2560px+) */
@media (min-width: 2560px) {
    #chart-container {
        height: 90vh;
        max-height: 1200px;
    }
    
    #signal-list-wrapper {
        height: 90vh;
        max-height: 1200px;
    }
    
    #top-panel-header {
        padding: 20px 25px;
    }
    
    #top-panel-content {
        padding: 25px;
    }
}



/* Large Desktop (1440px - 2559px) */
@media (min-width: 1440px) and (max-width: 2559px) {
    #chart-container {
        height: 90vh;
        max-height: 1200px;
        min-height: 500px;
    }
    
    #signal-list-wrapper {
        height: 90vh;
        max-height: 1200px;
        min-height: 400px;
    }
}

/* Medium Desktop (1200px - 1439px) - 너비 + 높이 고려 */
@media (min-width: 1200px) and (max-width: 1439px) {
    #chart-container {
        height: 90vh;
        max-height: 700px;
        min-height: 400px;
    }
    
    #signal-list-wrapper {
        height: 90vh;
        max-height: 700px;
        min-height: 300px;
    }
    
    .sidebar-tab {
        font-size: 12px;
        padding: 10px 6px;
    }
}

/* Tablet and Small Desktop (768px - 1199px) */
@media (max-width: 1200px) {
    #container {
        flex-direction: column;
        padding-left: 20px !important;
        min-height: auto;
    }
    
    #signal-list-wrapper {
        position: relative;
        width: 100% !important;
        height: clamp(250px, 30vh, 350px); /* 높이 반응형 */
        transform: none !important;
        margin-bottom: 20px;
    }

    #signal-list-wrapper.collapsed {
        height: clamp(35px, 8vh, 50px); /* 접힘 높이도 반응형 */
    }

    #sidebar-toggle {
        right: 50% !important;
        top: auto;
        bottom: -15px;
        transform: translateX(50%);
        width: 60px;
        height: 30px;
        border-radius: 0 0 8px 8px;
    }
    .sidebar-tab {
        font-size: 12px;
        padding: 10px 6px;
    }
    
    #plot-area {
        margin-left: 0 !important;
    }
    
    #chart-container {
        height: clamp(400px, 50vh, 600px); /* 높이 반응형 */
        min-height: 300px;
        max-height: 600px;
    }
    

}

/* Mobile Large (480px - 767px) */
@media (max-width: 768px) {
    #chart-container {
        height: clamp(300px, 40vh, 500px); /* 높이 반응형 */
        min-height: 250px;
        max-height: 500px;
    }
    
    #signal-list-wrapper {
        height: clamp(200px, 25vh, 300px); /* 높이 반응형 */
    }
    
    #signal-list-wrapper.collapsed {
        height: clamp(30px, 6vh, 40px); /* 접힘 높이 반응형 */
    }
    
    #top-panel-header {
        padding: clamp(8px, 2vh, 15px) clamp(10px, 3vw, 20px);
    }
    
    #top-panel-header h1 {
        font-size: clamp(16px, 4vw, 18px);
    }
    
    #top-panel-content {
        padding: clamp(8px, 2vh, 15px);
    }
    
    .toggleable-section {
        margin-bottom: clamp(8px, 1.5vh, 12px);
        padding: clamp(8px, 1.5vh, 12px);
    }
}

/* Mobile Small (320px - 479px) */
@media (max-width: 479px) {
    #chart-container {
        height: clamp(250px, 35vh, 350px); /* 높이 반응형 */
        min-height: 200px;
        max-height: 350px;
    }
    
    #signal-list-wrapper {
        height: clamp(150px, 20vh, 200px); /* 높이 반응형 */
    }
    
    #signal-list-wrapper.collapsed {
        height: clamp(25px, 5vh, 35px); /* 접힘 높이 반응형 */
    }
    
    #top-panel-header {
        padding: clamp(6px, 1.5vh, 10px) clamp(8px, 2vw, 15px);
    }
    
    #top-panel-content {
        padding: clamp(6px, 1.5vh, 10px);
    }
    
    .sidebar-tab {
        font-size: clamp(10px, 2vw, 12px);
        padding: clamp(6px, 1.5vh, 8px) clamp(4px, 1vw, 6px);
    }
    
    .filter-section {
        margin-bottom: clamp(8px, 1.5vh, 12px);
        padding: clamp(6px, 1.5vh, 10px);
    }
}

/* ==================== 높이 기반 미디어 쿼리 ==================== */



/* 매우 높은 화면 (1440px+) */
@media (min-height: 1440px) {
    #chart-container {
        height: 90vh;
        max-height: 1200px;
    }
    
    #signal-list-wrapper {
        height: 95vh;
        max-height: 1200px;
    }
    
    #top-panel-content {
        padding: 30px;
    }
    
    .toggleable-section {
        padding: 20px;
        margin-bottom: 20px;
    }
}

/* 높은 화면 (1080px - 1439px) */
@media (min-height: 1080px) and (max-height: 1439px) {
    #chart-container {
        height: 90vh;
        max-height: 1150px;
    }
    
    #signal-list-wrapper {
        height: 95vh;
        max-height: 1150px;
    }
}

/* 일반 화면 (768px - 1079px) */
@media (min-height: 768px) and (max-height: 1079px) {
    #chart-container {
        height: 90vh;
        max-height: 750px;
        min-height: 400px;
    }
    
    #signal-list-wrapper {
        height: 90vh;
        max-height: 760px;
        min-height: 400px;
    }
}

/* 낮은 화면 (600px - 767px) */
@media (max-height: 767px) {
    #chart-container {
        height: 80vh;
        max-height: 700px;
        min-height: 250px;
    }
    
    #signal-list-wrapper {
        height: 80vh;
        max-height: 700px;
        min-height: 250px;
    }
    
    #top-panel-header {
        padding: 8px 15px;
    }
    
    #top-panel-content {
        padding: 10px 15px;
    }
    
    .toggleable-section {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
}

/* 매우 낮은 화면 (480px 이하) */
@media (max-height: 480px) {
    #chart-container {
        height: 80vh;
        max-height: 200px;
        min-height: 180px;
    }
    
    #signal-list-wrapper {
        height: 80vh;
        max-height: 120px;
        min-height: 100px;
    }
    
    #signal-list-wrapper.collapsed {
        height: 25px;
    }
    
    #top-panel-header {
        padding: 5px 10px;
        min-height: 25px;
    }
    
    #top-panel-content {
        padding: 5px 10px;
    }
    
    .sidebar-tab {
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* ==================== 가로/세로 조합 미디어 쿼리 ==================== */

/* 가로 모드 모바일 (낮은 높이) */
@media (max-height: 600px) and (orientation: landscape) {
    #chart-container {
        height: 90vh; /* 통일된 비율 */
        max-height: 450px; /* 비례 축소 */
        min-height: 350px; /* 비례 축소 */
    }

    #signal-list-wrapper {
        height: 95vh; /* 통일된 비율 */
        max-height: 450px; /* 비례 축소 */
        min-height: 350px; /* 비례 축소 */
    }

    #signal-list-wrapper.collapsed {
        height: clamp(40px, 8vh, 50px);
    }

    #top-panel-content {
        padding: clamp(5px, 1vh, 8px) clamp(10px, 2vw, 15px);
    }
    
    .toggleable-section {
        margin-bottom: clamp(5px, 1vh, 8px);
        padding: clamp(6px, 1vh, 8px);
    }
}

/* 세로 모드 (높은 높이, 좁은 너비) */
@media (max-width: 480px) and (min-height: 800px) and (orientation: portrait) {
    #chart-container {
        height: 90vh; /* 통일된 비율 */
        max-height: 650px; /* 비례 확대 */
        min-height: 500px; /* 비례 확대 */
    }
    
    #signal-list-wrapper {
        height: 95vh; /* 통일된 비율 */
        max-height: 650px; /* 비례 확대 */
        min-height: 500px; /* 비례 확대 */
    }
    
    #top-panel-content {
        padding: clamp(15px, 3vh, 25px);
    }
}

/* ==================== 풀스크린 및 특수 모드 ==================== */

@media (display-mode: fullscreen) {
    #chart-container {
        height: 75vh;
        max-height: none;
    }
    
    #signal-list-wrapper {
        height: 70vh;
    }
    
    #top-panel-content {
        padding: 15px 20px;
    }
}

/* 브라우저 풀스크린 (F11) */
@media (display-mode: browser) and (min-height: 1150px) {
    #chart-container {
        height: 90vh;
        max-height: 1150px;
    }
}

/* ==================== 접근성 및 사용자 환경설정 ==================== */

/* 줄어든 모션 선호 시 높이 조정도 부드럽게 */
@media (prefers-reduced-motion: reduce) {
    #chart-container,
    #signal-list-wrapper {
        transition: height 0.1s ease;
    }
}

/* 고대비 모드에서 높이 여백 증가 */
@media (prefers-contrast: high) {
    .toggleable-section {
        padding: clamp(12px, 2vh, 18px);
        margin-bottom: clamp(12px, 2vh, 18px);
    }
}


.info-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#mini-sidebar-icon {
    position: absolute;
    top: 15px;
    left: 8px;
    font-size: 20px;
    color: #007bff;
    display: none;
    z-index: 12;
}

#signal-list-wrapper.collapsed #mini-sidebar-icon {
    display: block;
}



.sidebar-tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background-color: #e9ecef;
    color: #6c757d;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.sidebar-tab:hover {
    background-color: #dee2e6;
    color: #495057;
}

.sidebar-tab.active {
    background-color: white;
    color: #007bff;
    border-bottom-color: #007bff;
}

/* 사이드바 콘텐츠 */
.sidebar-content {
    display: none;
    height: calc(100% - 100px);
    position: relative;
}

.sidebar-content.active {
    display: block;
}

/* 필터 토글 버튼 활성화 상태 */
.filter-toggle.active {
    background-color: #28a745 !important;
}

/* 필터 컨트롤 활성화 상태 */
.filter-controls-inner.active {
    display: block !important;
}

/* 버튼 호버 효과 */
.filter-apply-btn:hover {
    background-color: #0056b3 !important;
}

.filter-reset-btn:hover {
    background-color: #c82333 !important;
}

/* 스크롤바 스타일 */
#filters-section::-webkit-scrollbar {
    width: 6px;
}

#filters-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#filters-section::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#filters-section::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 반응형 디자인 */

* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    
}

input[type="range"]::-webkit-slider-track {
    background: #dee2e6;
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #007bff;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    margin-top: -6px;
}

input[type="range"]::-moz-range-track {
    background: #dee2e6;
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-moz-range-thumb {
    background: #007bff;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    border: none;
}

/* Quick Range Buttons */
.quick-range {
    transition: all 0.2s;
}

.quick-range:hover {
    background-color: #e9ecef !important;
    border-color: #adb5bd !important;
}

.quick-range:active {
    background-color: #dee2e6 !important;
}

/* Filter Controls */
.filter-toggle:hover {
    opacity: 0.9;
}

.filter-apply-btn:hover {
    background-color: #0056b3 !important;
}

.filter-reset-btn:hover {
    background-color: #c82333 !important;
}
    /* Difference 모드용 추가 스타일 */
#difference-charts-container {
    display: none;
    flex-direction: column;
    height: 100%;
}

#original-chart-container {
    height : 300px;
    position: relative;
    margin-bottom: 15px;
}

#difference-chart-container {
    height : 300px;
    position: relative;
}

.chart-title {
    text-align: center;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

.signal-selector {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.signal-selector label {
    min-width: 80px;
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.signal-selector select {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 버튼 hover */
#refresh-presets-btn:hover,
#delete-preset-btn:hover,
#create-preset-btn:hover {
  opacity: 0.85;
  transform: scale(1.02);
  transition: all 0.2s;
}

/* 프리셋 파일 hover */
.preset-item:hover {
  background-color: #007bff;     /* 🔵 파란 배경 */
  color: #ffffff;                /* 흰 글씨 */
  border-color: #0056b3;         /* 테두리 진하게 */
  transform: scale(1.05);        /* 살짝 확대 */
  box-shadow: 0 4px 8px rgba(0,0,0,0.25); /* 그림자 */
  transition: all 0.2s ease;
}

/* 디렉토리 hover */
.preset-dir:hover {
  background-color: #28a745;     /* 🟢 초록 배경 */
  color: #ffffff;                /* 흰 글씨 */
  border-color: #1e7e34;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  transition: all 0.2s ease;
}

/* 공통 hover (프리셋+디렉토리) */
.preset-clickable:hover {
  cursor: pointer; /* 마우스 포인터 */
}

/* RMSE Section Styles */
.rmse-content {
    padding: 15px 0;
}

.auto-selected-signals, .rmse-results, .rmse-options {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.signal-item, .rmse-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #dee2e6;
}

.signal-item:last-child, .rmse-item:last-child {
    border-bottom: none;
}

.signal-status {
    color: #28a745;
    font-weight: bold;
}

.rmse-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #007bff;
}

.rmse-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;  /* 🔹 가로 가운데 정렬 */
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 280px;   /* 최소 가로 길이 */
}

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

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.checkbox-label input {
    margin-right: 8px;
}
.rmse-details {
  margin-top: 15px;
  padding: 10px;
  border-top: 2px solid #ccc;
  background: #fff;
}
.stats-grid {
  display: flex;
  gap: 20px;
}
.stat-item {
  flex: 1;
}
.rmse-item {
  display: block;       /* 가로 배치 방지 */
  margin-bottom: 10px;  /* 항목 간 간격 */
}

.rmse-item h5 {
  margin: 0 0 4px 0;    /* 아래쪽에만 살짝 간격 */
  font-size: 1.2em;     /* 기본보다 20% 크게 */
  font-weight: bold;    /* 필요하면 굵게 */
}


.rmse-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.rmse-list li {
  display: flex;
  margin: 2px 0;
}

.rmse-list .label {
  width: 50px;        /* 라벨 고정 폭 */
  text-align: left;   /* 좌측 정렬 */
  font-weight: 500;
}

.rmse-list .colon {
  width: 10px;        /* 콜론은 따로 정렬 */
  text-align: center; /* 항상 세로 맞춤 */
}

.rmse-list .value {
  flex: 1;
  text-align: left;
  padding-left: 6px;  /* 콜론 뒤 살짝 간격 */
}



.dev-request-content {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.todo-form {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.submit-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.submit-btn:hover {
    background-color: #218838;
}

.todo-list {
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.todo-item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 8px;
}

.todo-title {
    font-weight: bold;
    color: #212529;
    flex: 1;
}

.todo-priority {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
}

.status-pending {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-in_progress {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-completed {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #99d3ff;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.todo-description {
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.4;
}

.todo-meta {
    font-size: 12px;
    color: #868e96;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.delete-btn:hover {
    background-color: #c82333;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #495057;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.filter-buttons {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.toolbar-group-sidebar {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.toolbar-group-sidebar h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sidebar-toolbar-btn {
    background: #ffffff;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.sidebar-toolbar-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.sidebar-toolbar-btn.clear-btn:hover {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.sidebar-toolbar-btn.reset-btn:hover {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.sidebar-toolbar-btn.mode-btn {
    grid-column: 1 / -1;
    margin-bottom: 10px;
}

.sidebar-toolbar-btn.mode-btn:hover {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.mode-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.current-mode-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-size: 13px;
}

.mode-indicator {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.mode-description {
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.shortcuts-info {
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    padding: 10px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

kbd {
    background: #f8f9fa;
    border: 1px solid #adb5bd;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: monospace;
}
