/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

/* 확대/축소 지원 */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

@supports (zoom: 1) {
    html {
        zoom: 1;
    }
}

/* 고해상도 디스플레이 지원 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    :root {
        --scale-factor: 1.1;
    }
}

/* 사용자 확대/축소 시 레이아웃 유지 */
@media (min-width: 20rem) and (max-width: 120rem) {
    .app-container {
        transform-origin: center top;
        transition: transform 0.3s ease;
    }
}

:root {
    --primary-color: #4E97FD;
    --text-color: #111827;
    --secondary-text: #6B7280;
    --bg-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --sidebar-bg: #f3f4f6;
    --border-color: #E5E7EB;
    --chart-blue: #4E97FD;
    --chart-orange: #FF9F5A;
    --chart-yellow: #FFCF55;
    --chart-green: #50D1B2;
    --icon-blue-bg: rgba(34, 204, 226, 0.1);
    --icon-orange-bg: rgba(254, 159, 94, 0.1);
    --icon-yellow-bg: rgba(255, 212, 84, 0.1);
    --icon-green-bg: rgba(61, 204, 121, 0.1);
    /* 반응형 스케일링을 위한 변수 */
    --base-font-size: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
    --scale-factor: 1;
    --sidebar-width: clamp(3.5rem, 5vw, 4.375rem); /* 56px - 70px */
    --sidebar-expanded-width: clamp(12rem, 15vw, 15rem); /* 192px - 240px */
    --header-height: clamp(3rem, 4vw, 4rem); /* 48px - 64px */
    --card-padding: clamp(0rem, 0vw, 0rem); /* 16px - 24px */
    /*--card-padding: clamp(1rem, 2vw, 1.5rem);*/ /* 16px - 24px */
    --card-gap: clamp(0.75rem, 1.5vw, 1.25rem); /* 12px - 20px */
    --border-radius: clamp(0.75rem, 1.5vw, 1.25rem); /* 12px - 20px */
    --border-radius-sm: clamp(0.25rem, 0.5vw, 0.5rem); /* 4px - 8px */
    --border-radius-md: clamp(0.5rem, 1vw, 0.75rem); /* 8px - 12px */
    /* 동적 타이포그래피 */
    --font-size-xs: clamp(0.625rem, 0.8vw, 0.75rem); /* 10px - 12px */
    --font-size-sm: clamp(0.75rem, 1vw, 0.875rem); /* 12px - 14px */
    --font-size-base: clamp(0.875rem, 1.2vw, 1rem); /* 14px - 16px */
    --font-size-lg: clamp(1rem, 1.5vw, 1.125rem); /* 16px - 18px */
    --font-size-xl: clamp(1.125rem, 2vw, 1.5rem); /* 18px - 24px */
    --font-size-2xl: clamp(1.25rem, 2.5vw, 1.75rem); /* 20px - 28px */
    --font-size-3xl: clamp(1.5rem, 3vw, 2rem); /* 24px - 32px */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: var(--font-size-base);
    line-height: 1.5;
    position: relative;
    min-width: 20rem; /* 320px */
    overflow-x: auto;
}

    body::before {
        content: none;
    }

    body::after {
        content: none;
    }

a {
    color: var(--primary-color);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

button {
    cursor: pointer;
    background: none;
    border: none;
}

.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh; /* 동적 뷰포트 높이 */
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    min-width: 20rem; /* 320px */
    width: 100%;
    max-width: 100%;
}

    .app-container.sidebar-expanded .main-content {
        margin-left: 0;
    }

    .app-container::before {
        content: '';
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
        width: 20px;
        background-color: #f3f4f6;
        z-index: 1000;
        pointer-events: none;
    }

    .app-container::after {
        content: none;
    }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.1875rem; /* 19px */
    border-right: none;
    transition: width 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

    /* 사이드바 확장 스타일 */
    .sidebar.expanded {
        width: var(--sidebar-expanded-width);
        align-items: flex-start;
        padding-left: 0;
    }

.logo-container {
    margin-bottom: 1.8125rem; /* 29px */
    display: flex;
    align-items: center;
    width: 100%;
    padding-left: 1.25rem; /* 20px */
}

.logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
   /* background: var(--primary-color);*/
    margin-right: 12px;
}

.logo-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: white;
}

.logo-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    display: none;
    margin-left: 0.75rem; /* 12px */
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--text-color);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar.expanded .logo-text {
    display: block;
    opacity: 1;
}

.sidebar.expanded .logo-container {
    padding-left: 1.25rem; /* 20px */
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.1875rem; /* 19px */
    width: 100%;
}

.nav-item {
    width: 2rem; /* 32px */
    height: 2rem; /* 32px */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.875rem; /* 14px */
    color: var(--secondary-text);
    transition: all 0.2s;
    position: relative;
}

    .nav-item img {
        width: 1.25rem; /* 20px */
        height: 1.25rem; /* 20px */
        object-fit: contain;
    }

.sidebar.expanded .nav-item img {
    margin-left: 0;
}

.nav-item-text {
    display: none;
    margin-left: 0.75rem; /* 12px */
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--secondary-text);
}

.sidebar.expanded .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding-left: 1.5625rem; /* 25px */
    margin-right: 0;
}

.sidebar.expanded .nav-item-text {
    display: block;
    opacity: 1;
}

.nav-item.active {
    width: 2.375rem; /* 38px */
    height: 2.375rem; /* 38px */
    background-color: white;
    color: var(--primary-color);
    border-radius: 1rem; /* 16px */
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
}

    .nav-item.active .nav-item-text {
        color: var(--primary-color);
    }

.sidebar.expanded .nav-item.active {
    width: 12.5rem; /* 200px */
    border-radius: 1rem; /* 16px */
    height: 2.375rem; /* 38px */
    padding-right: 0;
    margin-right: 0.625rem; /* 10px */
    margin-left: 0.9375rem; /* 15px */
    background-color: white;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
    padding-left: 0.625rem; /* 10px */
}

.nav-item:hover:not(.active) {
    background-color: var(--bg-color);
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #ffffff;
    position: relative;
    border-radius: 0;
    border-top-left-radius: 0;
    transition: all 0.3s ease;
}

    .main-content::before {
        content: none;
    }

    .main-content::after {
        content: none;
    }

/* Header */
.header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    background-color: #f3f4f6;
    justify-content: space-between;
    padding: 0 1.1875rem; /* 19px */
    border-bottom: none;
    border-top-left-radius: 0;
    border-radius: 0;
    padding-right: 47px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem; /* 16px */
    flex: 1;
    margin-right: 1.25rem; /* 20px */
}

.menu-icon {
    width: 1.125rem; /* 18px */
    height: 1.125rem; /* 18px */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sidebar-expanded .menu-icon {
    transform: rotate(90deg);
}

.search-container {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    border-radius: 1rem; /* 16px */
    padding: 0.375rem 0.625rem; /* 6px 10px */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1;
}

    .search-container svg {
        color: var(--secondary-text);
        margin-right: 0.5rem; /* 8px */
    }

    .search-container input {
        border: none;
        background: none;
        outline: none;
        color: var(--text-color);
        width: 100%;
        min-width: 0;
        flex: 1;
    }

/* Search Results Dropdown */
.search-container {
    position: relative;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 0.25rem;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: 0.5rem 0.5rem 0 0;
}

.search-results-header span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

.close-search-results {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: var(--secondary-text);
    transition: background-color 0.2s ease;
}

.close-search-results:hover {
    background-color: var(--border-color);
}

.search-results-list {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

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

.search-result-item:hover {
    background-color: var(--bg-color);
}

.search-result-icon {
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    color: var(--secondary-text);
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-description {
    font-size: 0.75rem;
    color: var(--secondary-text);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.search-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6875rem;
}

.search-result-section {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.search-result-date {
    color: var(--secondary-text);
}

/* MRS Data Search Box Enhancements */
.search-box {
    position: relative;
}

.clear-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: var(--secondary-text);
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}

.search-box input {
    padding-right: 2rem; /* Make room for clear button */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8125rem; /* 13px */
    padding-right: 0.9375rem; /* 15px */
    margin-left: 0.625rem; /* 10px */
}

.icon-btn {
    width: 2rem; /* 32px */
    height: 2rem; /* 32px */
    border-radius: 1rem; /* 16px */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    transition: background-color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

    .icon-btn:hover {
        background-color: var(--bg-color);
    }

    .icon-btn svg {
        width: 18px !important;
        height: 18px !important;
        display: block !important;
        fill: currentColor !important;
        stroke: currentColor !important;
        color: inherit !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

/* 강제로 아이콘 표시 - 테두리만 표시 */
.header-actions .icon-btn svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    fill: none !important;
    stroke: #6B7280 !important;
    stroke-width: 2 !important;
    color: #6B7280 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 드래그 앤 드롭 영역 스타일 */
.image-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.image-upload-area:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.image-upload-area.drag-over {
    border-color: #007bff;
    background-color: #e6f3ff;
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 1rem;
    color: #6b7280;
}

.upload-icon svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    fill: none;
}

.file-input-label {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.file-input-label:hover {
    color: #0056b3;
}

.user-avatar, .user-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
   /* background: var(--primary-color);*/
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-avatar span {
    font-size: 16px;
    font-weight: 600;
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: var(--primary-color);*/
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin-right: 16px;
}

.user-badge span {
    font-size: 18px;
    font-weight: 600;
}

.user-badge-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.more-options-btn {
    color: var(--secondary-text);
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: var(--card-padding);
    padding-left: 0.5rem; /* 8px - 좌측만 작게 */
    padding-right: 2.75rem; /* 44px = 24px + 20px */
    padding-bottom: 0rem; /* 60px */
    overflow-y: auto;
    display: grid !important;
    grid-template-columns: 1.5fr 0.5fr !important; /* 우측 사이드바를 1fr에서 0.5fr로 변경하여 절반 크기로 축소 */
    gap: var(--card-padding);
    background-color: #ffffff;
    position: relative;
    min-height: 0; /* 스크롤 작동을 위한 중요 속성 */
    border-radius: 0;
    width: 100%;
    max-width: 100%;
}

    .dashboard-content::before {
        content: none;
    }

    .dashboard-content::after {
        content: none;
    }

    /* Custom Scrollbar - Show when scrolling */
    .dashboard-content::-webkit-scrollbar {
        width: 10px;
    }

    .dashboard-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .dashboard-content::-webkit-scrollbar-thumb {
        background-color: #d1d5db;
        border-radius: 5px;
    }

        .dashboard-content::-webkit-scrollbar-thumb:hover {
            background-color: #9ca3af;
        }

/* Firefox scrollbar */
.dashboard-content {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

/* Left Content */
.left-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-top-left-radius: 0;
    overflow: visible; /* 내용이 잘리지 않도록 변경 */
    background-color: #ffffff;
    padding-bottom: 60px;
}

/* Right Sidebar */
.right-sidebar {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    min-width: 200px; /* 280px에서 200px로 줄여서 더 작은 공간에도 맞도록 */
    background-color: #ffffff;
    padding: 0;
    position: relative;
    visibility: visible !important;
    opacity: 1 !important;
}

    .right-sidebar::before {
        content: none;
    }

    .right-sidebar::after {
        content: none;
    }

.user-profile-section, .calendar-wrapper, .activity-wrapper, .recent-activity {
    position: relative;
    z-index: 2;
}

.user-profile-section {
    background-color: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    padding: 16px;
    padding-top: 0; /* 상단 패딩 제거 */
    position: relative;
}

.calendar-wrapper {
    background-color: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    aspect-ratio: 1 / 1;
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px;
}

    .calendar-wrapper::after {
        content: none;
    }

.activity-wrapper {
    background-color: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    flex-grow: 1;
    min-height: 550px;
    display: flex;
    flex-direction: column;
    border: none;
    margin-top: 0;
    width: 100%;
}

    .activity-wrapper::before {
        content: none;
    }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 12px;
    padding-left: 12px;
}

    .dashboard-header h1 {
        font-size: var(--font-size-3xl);
        font-weight: 600;
        color: #111827;
    }

.add-task-btn {
    display: flex;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
}

    .add-task-btn svg {
        margin-right: 8px;
    }

    .add-task-btn:hover {
        background-color: #2563EB;
    }

/* Stats and Analytics Container - 3개 박스 배치 */
.stats-analytics-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3개 동일한 크기 컬럼 */
    gap: var(--card-gap);
    margin-bottom: clamp(1.5rem, 3vw, 2rem); /* 24px - 32px */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    container-type: inline-size;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: var(--card-gap);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    container-type: inline-size;
}

.stats-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: var(--card-padding); /* 원래 패딩으로 복원 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1;
    height: auto;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #e0e0e0;
    text-align: center;
    container-type: inline-size;
}

.stats-icon {
    width: clamp(2.5rem, 4vw, 3rem); /* 40px - 48px (원래 크기) */
    height: clamp(2.5rem, 4vw, 3rem); /* 40px - 48px (원래 크기) */
    border-radius: 1rem; /* 16px (원래 크기) */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem; /* 12px (원래 크기) */
}

    .stats-icon.blue {
        background-color: #22CCE2;
    }

    .stats-icon.orange {
        background-color: #FE9F5E;
    }

    .stats-icon.yellow {
        background-color: #FFD454;
    }

    .stats-icon.green {
        background-color: #3DCC79;
    }

    /* 아이콘 안의 이미지 크기 원래대로 */
    .stats-icon img {
        width: clamp(1rem, 2vw, 1.25rem); /* 16px - 20px (원래 크기) */
        height: clamp(1rem, 2vw, 1.25rem); /* 16px - 20px (원래 크기) */
        object-fit: contain;
    }

.stats-info {
    text-align: center;
    width: 100%;
    min-width: 0;
}

    .stats-info h2 {
        font-size: clamp(1.25rem, 3vw, 1.75rem); /* 20px - 28px (원래 크기) */
        font-weight: 600;
        margin-bottom: 0.25rem; /* 4px (원래 크기) */
        color: #111827;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }

    .stats-info p {
        color: var(--secondary-text);
        font-size: var(--font-size-base); /* 기본 폰트 크기 (원래 크기) */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Analytics Section */
.analytics-section {
    background-color: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #e0e0e0;
}

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

    .analytics-header h2 {
        font-size: var(--font-size-xl);
        font-weight: 600;
    }

.more-btn {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
}

    .more-btn svg {
        width: 20px;
        height: 20px;
    }

.analytics-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: space-between;
}

.donut-chart {
    margin-bottom: 16px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.chart-placeholder {
    width: 150px; /* 원래 크기 */
    height: 150px; /* 원래 크기 */
    border-radius: 50%;
    background: conic-gradient( #FE9F5E 0deg 120deg, #FFD454 120deg 240deg, #409FFF 240deg 360deg );
    position: relative;
}

    .chart-placeholder::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90px; /* 원래 크기 */
        height: 90px; /* 원래 크기 */
        background-color: white;
        border-radius: 50%;
    }

.analytics-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: auto;
}

.analytic-stat {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-color-box {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}

    .stat-color-box.orange {
        background-color: #FE9F5E;
    }

    .stat-color-box.yellow {
        background-color: #FFD454;
    }

    .stat-color-box.blue {
        background-color: #409FFF;
    }

.analytic-stat h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.analytic-stat p {
    color: var(--secondary-text);
    font-size: 14px;
}

/* User Profile Header */
.user-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .user-info h3 {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .user-info p {
        font-size: 12px;
        color: var(--secondary-text);
    }

.user-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin-right: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-badge span {
    font-size: 18px;
    font-weight: 600;
}

.user-badge-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.more-options-btn {
    color: var(--secondary-text);
}

/* Calendar Section */
.calendar-section {
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.calendar-header {
    margin-bottom: 16px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .calendar-nav h3 {
        font-size: 16px;
        font-weight: 600;
    }

    .calendar-nav span {
        color: var(--secondary-text);
        font-weight: 400;
    }

.calendar-prev, .calendar-next {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
}

    .calendar-prev:hover, .calendar-next:hover {
        background-color: var(--bg-color);
    }

.calendar-grid {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.calendar-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Recent Activity */
.recent-activity {
    padding: 16px;
    overflow-y: auto;
    flex-grow: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: transparent;
    position: relative;
    z-index: 1;
}

    .recent-activity h3 {
        font-size: 24px; /* 16px * 1.5 = 24px */
        font-weight: 600;
        margin-bottom: 20px;
    }

.activity-date {
    margin-bottom: 20px;
}

    .activity-date h4 {
        font-size: 14px;
        font-weight: 500;
        margin-bottom: 16px;
        color: var(--secondary-text);
    }

.activity-item {
    display: flex;
    margin-bottom: 16px;
}

.activity-time {
    width: 48px;
    font-size: 12px;
    color: var(--secondary-text);
    margin-right: 12px;
    font-weight: 500;
}

.activity-content {
    flex: 1;
    display: flex;
    gap: 12px;
    position: relative;
}

.activity-marker {
    width: 4px;
    height: 100%;
    border-radius: 2px;
    min-height: 40px;
    position: absolute;
    left: 0;
}

.activity-details {
    padding-left: 16px;
}

.activity-marker.blue {
    background-color: #4E97FD;
}

.activity-marker.orange {
    background-color: #FF9F5A;
}

.activity-marker.red {
    background-color: #FF6B6B;
}

.activity-marker.green {
    background-color: #51CF66;
}

.activity-marker.yellow {
    background-color: #FFD43B;
}

.activity-marker.gray {
    background-color: #868E96;
}

.activity-details h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.activity-details p {
    font-size: 13px;
    color: var(--secondary-text);
    line-height: 1.4;
}

.activity-details a {
    color: #4E97FD;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 87.5rem) { /* 1400px */
    :root {
        --scale-factor: 0.95;
    }

    .dashboard-content {
        grid-template-columns: 2fr 1fr;
        gap: 1.25rem; /* 20px */
    }

    .stats-analytics-container {
        grid-template-columns: 1fr;
        gap: 1rem; /* 16px */
    }

    .stats-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem; /* 16px */
    }

    .analytics-section {
        grid-column: span 1;
    }

    .right-sidebar {
        width: 100%;
        max-width: 21.875rem; /* 350px */
    }
}

@media (max-width: 75rem) { /* 1200px */
    :root {
        --scale-factor: 0.9;
    }

    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 1.25rem; /* 20px */
    }

    /* Overview 페이지에서는 큰 화면에서도 그리드 유지 */
    #dashboard-section .dashboard-content {
        grid-template-columns: 1.5fr 0.5fr !important; /* 1200px 미만에서도 우측 사이드바 절반 크기 */
    }

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

    .stats-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem; /* 16px */
    }

    .analytics-section {
        grid-column: span 1;
    }

    .right-sidebar {
        width: 100%;
        max-width: none;
        padding-top: 1.25rem; /* 20px */
    }

    .user-profile-section {
        margin-top: 0;
        top: 0;
    }
}

@media (max-width: 64rem) { /* 1024px */
    :root {
        --scale-factor: 0.85;
        --card-padding: 1rem; /* 16px */
        --card-gap: 0.75rem; /* 12px */
    }

    .main-content {
        padding: 0;
    }

    .dashboard-content {
        padding: var(--card-padding);
        padding-right: var(--card-padding);
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--card-gap);
    }

    .stats-card {
        padding: var(--card-gap);
    }

    .analytics-section {
        padding: var(--card-gap);
    }

    .statistics-section {
        padding: var(--card-padding);
    }

    .chart-placeholder {
        width: 9.375rem; /* 150px (원래 크기) */
        height: 9.375rem; /* 150px (원래 크기) */
    }

        .chart-placeholder::after {
            width: 5.625rem; /* 90px (원래 크기) */
            height: 5.625rem; /* 90px (원래 크기) */
        }
}

@media (max-width: 48rem) { /* 768px */
    :root {
        --scale-factor: 0.8;
        --sidebar-width: 100%;
        --sidebar-height: 3.75rem; /* 60px */
        --card-padding: 1rem; /* 16px */
        --card-gap: 0.75rem; /* 12px */
    }

    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: var(--sidebar-width);
        height: var(--sidebar-height);
        min-width: var(--sidebar-width);
        flex-direction: row;
        padding: 0 var(--card-padding);
        align-items: center;
    }

    .sidebar-nav ul {
        flex-direction: row;
        gap: 12px;
    }

    .nav-item {
        width: 40px;
        height: 40px;
    }

        .nav-item.active {
            width: 40px;
            height: 40px;
        }

    .sidebar.expanded .nav-item {
        width: 40px;
        padding-left: 0;
        justify-content: center;
    }

    .nav-item-text {
        display: none !important;
    }

    .logo-container {
        margin-bottom: 0;
        margin-right: 20px;
    }

    .logo-text {
        display: none !important;
    }

    .header {
        padding: 0 16px;
    }

    .header-left {
        gap: 12px;
    }

    .search-container {
        max-width: 200px;
    }

    .header-actions {
        gap: 8px;
    }

    .dashboard-content {
        padding: 16px;
        gap: 16px;
    }

    /* 모바일에서도 Overview 페이지에서는 그리드 유지 */
    #dashboard-section .dashboard-content {
        grid-template-columns: 1fr !important;
    }

    #dashboard-section .right-sidebar {
        display: flex !important;
        width: 100% !important;
        margin-top: 20px !important;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stats-card {
        padding: 12px;
        border-radius: 12px;
    }

    .stats-info h2 {
        font-size: 20px;
    }

    .stats-info p {
        font-size: 12px;
    }

    .analytics-section {
        padding: 12px;
    }

    .chart-placeholder {
        width: 120px; /* 원래 크기 */
        height: 120px; /* 원래 크기 */
    }

        .chart-placeholder::after {
            width: 70px; /* 원래 크기 */
            height: 70px; /* 원래 크기 */
        }

    .statistics-section {
        padding: 12px;
    }

    .bar-chart-inner {
        height: 200px !important;
    }

    .calendar-wrapper {
        aspect-ratio: auto;
    }

    .recent-activity h3 {
        font-size: 18px;
    }

    .activity-item {
        margin-bottom: 12px;
    }

    .activity-time {
        width: 40px;
        font-size: 11px;
    }

    .activity-details h5 {
        font-size: 13px;
    }

    .activity-details p {
        font-size: 12px;
    }

    /* MRS Data 모바일 스타일 */
    #mrs-data-section .dashboard-content {
        grid-template-columns: 1fr;
        padding: var(--card-padding);
    }

    #mrs-data-section .mrs-data-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

        #mrs-data-section .mrs-data-header h1 {
            font-size: 20px;
        }

    #mrs-data-section .export-btn-container {
        margin: 0;
    }

    #mrs-data-section .tabs-container {
        overflow-x: auto;
        white-space: nowrap;
    }

    #mrs-data-section .tab {
        display: inline-block;
        margin-right: 20px;
    }

    #mrs-data-section .data-table-container {
        overflow-x: auto;
        padding: 12px;
    }

    #mrs-data-section .data-table {
        min-width: 800px;
    }

        #mrs-data-section .data-table th,
        #mrs-data-section .data-table td {
            padding: 8px;
            font-size: 12px;
        }

    #mrs-data-section .product-name-col {
        min-width: 200px;
    }

    #mrs-data-section .search-box {
        width: 100%;
        max-width: 280px;
    }

    #mrs-data-section .data-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    #mrs-data-section .filter-sort-container {
        width: 100%;
        justify-content: flex-end;
    }

    #mrs-data-section .pagination {
        flex-direction: column;
        gap: 12px;
    }

    #mrs-data-section .pagination-info {
        justify-content: center;
    }

    #mrs-data-section .pagination-controls {
        justify-content: center;
    }
}

@media (max-width: 30rem) { /* 480px */
    :root {
        --scale-factor: 0.75;
        --card-padding: 0.75rem; /* 12px */
        --card-gap: 0.5rem; /* 8px */
        --base-font-size: 0.875rem; /* 14px */
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: var(--card-gap);
    }

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

    .analytics-section {
        grid-column: span 1;
    }

    .header-left {
        flex: 1;
        min-width: 0;
    }

    .search-container {
        max-width: 150px;
    }

    .header-actions {
        gap: 6px;
    }

    .icon-btn {
        width: 28px;
        height: 28px;
    }

    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .dashboard-header h1 {
        font-size: 20px;
    }

    .add-task-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .stats-card {
        padding: 10px;
    }

    .stats-info h2 {
        font-size: 18px;
    }

    .chart-placeholder {
        width: 100px; /* 원래 크기 */
        height: 100px; /* 원래 크기 */
    }

        .chart-placeholder::after {
            width: 60px; /* 원래 크기 */
            height: 60px; /* 원래 크기 */
        }

    .analytic-stat h3 {
        font-size: 18px;
    }

    .statistics-section {
        padding: 10px;
    }

    .bar-chart-inner {
        height: 150px !important;
    }

    .calendar-dates {
        gap: 1px;
    }

    .date-cell {
        font-size: 11px;
        margin: 1px;
    }

    .recent-activity {
        padding: 10px;
    }

        .recent-activity h3 {
            font-size: 16px;
        }

    .activity-time {
        width: 35px;
        font-size: 10px;
    }

    .activity-details h5 {
        font-size: 12px;
    }

    .activity-details p {
        font-size: 11px;
    }

    /* MRS Data 작은 화면 스타일 */
    #mrs-data-section .mrs-data-header {
        gap: 12px;
    }

        #mrs-data-section .mrs-data-header h1 {
            font-size: 18px;
        }

      #mrs-data-section .export-btn,
  #mrs-data-section .dropdown-btn,
  #mrs-data-section .add-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  #mrs-data-section .add-btn {
    width: 42px;
    height: 42px;
  }

    #mrs-data-section .tab {
        font-size: 12px;
        margin-right: 16px;
    }

    #mrs-data-section .data-table-container {
        padding: 8px;
    }

    #mrs-data-section .search-box {
        padding: 6px 8px;
        font-size: 12px;
    }

      #mrs-data-section .filter-btn,
  #mrs-data-section .action-btn {
    height: 42px;
    font-size: 12px;
  }

  #mrs-data-section .filter-btn {
    width: 42px;
  }

  #mrs-data-section .pagination-btn {
    width: 42px;
    height: 42px;
  }
}

/* Statistics Section */
.statistics-section {
    display: block;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-height: 480px !important;
    height: auto !important;
    padding-bottom: 20px !important;
    overflow: visible;
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
    grid-column: 1 / span 3; /* 이미지 업로드 영역 위치까지 가로 확장 */
}

.statistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    grid-column: 1 / -1;
}

    .statistics-header h2 {
        font-size: 18px;
        font-weight: 600;
    }

.date-selector {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--secondary-text);
    background-color: var(--bg-color);
    padding: 6px 12px;
    border-radius: 6px;
}

    .date-selector svg {
        margin-left: 4px;
    }

.stat-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
}

    .stat-card h3 {
        font-size: 14px;
        color: var(--secondary-text);
        margin-bottom: 8px;
    }

    .stat-card .value {
        font-size: 24px;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .stat-card .change {
        font-size: 12px;
        color: var(--success-color);
        display: flex;
        align-items: center;
        gap: 4px;
    }

.chart-container,
.bar-chart,
.bar-chart-inner {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    background: #fff !important;
}

.bar-chart-inner {
    height: 384px !important;
    overflow: visible !important;
    align-items: stretch !important;
    display: grid !important;
    grid-template-columns: repeat(17, 1fr); /* 17개 바를 위해 17개 컬럼 */
    gap: 5px !important; /* 간격을 줄여서 더 많은 바가 들어갈 수 있게 */
    padding-bottom: 0 !important;
}

.bar-chart {
    height: 384px !important;
    background-color: var(--bg-color);
    border-radius: 8px;
    position: relative;
    overflow: visible !important;
    padding: 0 !important;
    grid-column: 1 / -1;
    margin: 0 !important;
    width: 100% !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.bar-chart-inner {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(17, 1fr); /* 17개 바를 위해 17개 컬럼 */
    align-items: end;
    padding-bottom: 0 !important;
    width: 100% !important;
    gap: 5px !important; /* 간격을 5px로 설정 */
}

.chart-bar {
    position: relative;
    width: 30%; /* 40%에서 30%로 줄임 */
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bar-gray {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #F3F4F6;
    border-radius: 6px 6px 0 0;
    z-index: 1;
}

.bar-orange {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: var(--chart-orange);
    z-index: 2;
    border-radius: 0 0 6px 6px;
}

.bar-blue {
    position: absolute;
    left: 0;
    width: 100%;
    background: var(--chart-blue);
    z-index: 3;
    border-radius: 6px 6px 0 0;
}

.bar-chart-inner {
    padding-bottom: 0 !important;
}

/* Image Upload Area - Analytics와 동일한 스타일 */
.image-upload-area {
    background-color: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #e0e0e0;
    position: relative;
    z-index: 1;
}

.upload-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--secondary-text);
}

.image-upload-area p {
    color: var(--secondary-text);
}

.image-upload-area a {
    color: var(--primary-color);
    font-weight: 500;
}

.file-input-label {
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.file-input-label:hover {
    opacity: 0.8;
}



.upload-progress {
    margin-top: 16px;
    width: 100%;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.upload-message {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.upload-message.success {
    background-color: rgba(80, 209, 178, 0.1);
    color: #059669;
    border: 1px solid rgba(80, 209, 178, 0.3);
}

.upload-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Calendar Grid */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}

.day-label {
    font-size: 11px;
    color: var(--secondary-text);
    font-weight: 500;
    padding: 6px 0;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 2px;
    flex: 1;
}

.date-cell {
    height: auto;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    margin: 2px;
}

    .date-cell:hover {
        background-color: var(--bg-color);
    }

    .date-cell.active {
        background-color: var(--primary-color);
        color: white;
    }

.prev-month, .next-month {
    color: var(--secondary-text);
    opacity: 0.5;
}

/* Override the specific colors for stats-icons */
.stats-icon.blue {
    background-color: var(--icon-blue-bg);
}

.stats-icon.orange {
    background-color: var(--icon-orange-bg);
}

.stats-icon.yellow {
    background-color: var(--icon-yellow-bg);
}

.stats-icon.green {
    background-color: var(--icon-green-bg);
}

.chart-container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.bar-chart {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.bar-chart-inner {
    padding-bottom: 0 !important;
}

.statistics-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

    .legend-dot.blue {
        background: var(--chart-blue);
    }

    .legend-dot.orange {
        background: var(--chart-orange);
    }

.bar-chart-inner .day-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px; /* 13px에서 9px로 줄임 (약 1.4배 축소) */
    color: #222;
    font-weight: 600;
    background: none;
    padding: 0;
    z-index: 10;
    white-space: nowrap;
}

/* 콘텐츠 섹션 스타일 */
.content-section {
    display: none;
    width: 100%;
}

    .content-section.active {
        display: block;
        width: 100%;
    }

/* Overview 페이지에서는 dashboard-section을 그리드 아이템으로 동작 */
#dashboard-section.active {
    display: block;
    width: 100%;
    height: 100%;
}

/* 섹션 콘텐츠 스타일 */
.section-content {
    padding: 20px;
}

/* MRS Data 섹션 스타일 */
.mrs-data-content {
    padding: 0; /* 대시보드 콘텐츠에서 패딩을 처리하므로 제거 */
    background-color: #ffffff;
}

.mrs-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 12px;
    padding-left: 12px;
}

    .mrs-data-header h1 {
        font-size: 24px;
        font-weight: 600;
        color: #111827;
    }

.export-btn-container {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 10px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px 0 0 6px;
    padding: 8px 16px;
    font-weight: 500;
    color: var(--text-color);
}

.dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 6px 6px 0;
    padding: 8px 10px;
    height: 100%;
}

.add-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.tabs-container {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-text);
    cursor: pointer;
    position: relative;
}

    .tab.active {
        color: var(--primary-color);
    }

        .tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: var(--primary-color);
        }

.data-table-container {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.data-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px; /* 요소들 사이 간격 추가 */
}

/* MRS Data 페이지 data-table-header에서 search-box가 더 많은 공간 차지 */
#mrs-data-section .data-table-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding-left: 20px !important;
    gap: 16px !important;
    width: 98% !important;
}

/* filter-sort-container를 우측에 고정 */
#mrs-data-section .filter-sort-container {
    flex-shrink: 0 !important;
    display: flex !important;
    gap: 12px !important;
    width: auto !important;
    min-width: fit-content !important;
    justify-content: flex-end !important;
}

/* 더 강력한 search-box 확장 */
#mrs-data-section .data-table-header .search-box {
    flex: 1 1 auto !important;
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 150px) !important;
}

.filter-sort-container {
    display: flex;
    align-items: center;
    gap: 12px; /* filter와 actions 사이 간격 */
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    border-radius: 6px;
    padding: 8px 12px;
    width: 100%; /* 300px에서 100%로 변경하여 가로 길게 */
    min-width: 400px; /* 최소 너비 설정 */
    max-width: 600px; /* 최대 너비 증가 */
    border: 1px solid var(--border-color);
    flex: 1; /* 유연한 크기 조정 */
}

    .search-box svg {
        margin-right: 8px;
        color: var(--secondary-text);
    }

    .search-box input {
        border: none;
        background: none;
        outline: none;
        width: 100%;
        color: var(--text-color);
    }

.filter-sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: var(--secondary-text);
}

.action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    height: 36px;
}

.data-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    margin-bottom: 20px;
}

    .data-table th,
    .data-table td {
        padding: 16px 12px;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        vertical-align: middle;
    }

    .data-table th {
        font-size: 12px;
        font-weight: 600;
        color: var(--secondary-text);
        text-transform: uppercase;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .data-table td {
        font-size: 14px;
        color: var(--text-color);
    }

.checkbox-col {
    width: 40px;
}

.product-name-col {
    min-width: 300px;
}

.product-no-col,
.date-col,
.price-col {
    width: 120px;
}

.status-col {
    width: 120px;
}

.actions-col {
    width: 60px;
    text-align: right;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

    .status-badge.available {
        background-color: rgba(61, 204, 121, 0.1);
        color: #3DCC79;
    }

.more-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    background: none;
    border: none;
}

    .more-btn:hover {
        background-color: var(--bg-color);
    }

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.showing-text {
    color: var(--secondary-text);
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: var(--secondary-text);
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 6px;
}

.page-number {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    font-size: 14px;
    color: var(--text-color);
}

    .page-number.active {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

.page-dots {
    color: var(--secondary-text);
    font-size: 14px;
}

/* MRS Data 섹션에서는 대시보드 콘텐츠 그리드 레이아웃 제거 */
#mrs-data-section .dashboard-content {
    display: block;
    padding: 0;
}

/* 테이블 내 체크박스 스타일 */
.data-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
}

    .data-table input[type="checkbox"]:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

        .data-table input[type="checkbox"]:checked::after {
            content: '';
            position: absolute;
            left: 5px;
            top: 2px;
            width: 5px;
            height: 9px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

/* 테이블 행 호버 효과 */
.data-table tbody tr:hover {
    background-color: rgba(78, 151, 253, 0.05);
}

/* 테이블 헤더 정렬 아이콘 */
.data-table th svg {
    color: #9CA3AF;
}

/* 컨텐츠 섹션이 활성화되었을 때 전체 너비 사용 */
.content-section.active {
    width: 100%;
    display: block;
}

/* Recent Activity 제거 및 MRS Data 페이지 스타일 수정 */
#mrs-data-section {
    position: relative;
}

/* MRS Data 페이지 전체 레이아웃 수정 */
#mrs-data-section {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
}

    #mrs-data-section .section-content {
        padding: 24px;
        width: 100%;
    }

/* 기본 그리드 레이아웃은 위에서 이미 정의됨 */

/* 기본적으로 모든 페이지에서 그리드 활성화 */

/* MRS Data 페이지에서 right-sidebar 숨기기 */
body.mrs-data-active .right-sidebar {
    display: none !important;
}

/* MRS Data 페이지에서 그리드를 1열로 변경 */
body.mrs-data-active .dashboard-content {
    grid-template-columns: 1fr !important;
}

/* Overview 페이지에서 오른쪽 사이드바 표시 (기본 상태) */
.right-sidebar {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    background-color: #ffffff;
    padding: 0 !important;
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 280px !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1 !important;
}

/* 기본 right-sidebar 요소들 표시 */
.user-profile-section,
.calendar-wrapper,
.activity-wrapper,
.recent-activity {
    display: block !important;
    position: relative;
    z-index: 2;
    margin-top: 0 !important;
    padding-top: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: 100% !important;
}

/* Overview 페이지에서만 명시적으로 표시 */
body:not(.mrs-data-active) .user-profile-section,
body:not(.mrs-data-active) .calendar-wrapper,
body:not(.mrs-data-active) .activity-wrapper,
body:not(.mrs-data-active) .recent-activity {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* activity-wrapper는 flex로 표시 */
.activity-wrapper {
    display: flex !important;
    flex-direction: column;
}

/* MRS Data 페이지에서만 ArtTemplate(user-profile-section) 숨기기 */
#mrs-data-section .user-profile-section {
    display: none !important;
}

#mrs-data-section .right-sidebar {
    display: none !important;
}

/* File Manager 페이지가 활성화되었을 때 body 클래스 기반으로 요소 숨기기 */
body.file-manager-active .user-profile-section,
body.file-manager-active .calendar-wrapper,
body.file-manager-active .activity-wrapper,
body.file-manager-active .recent-activity,
body.file-manager-active .right-sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* MRS Data 페이지를 Overview와 완전히 동일하게 만들기 */
#mrs-data-section {
    /* 상단 여백만 제거, 좌우는 유지 */
    padding-top: 0 !important;
    margin-top: -24px !important; /* 더 위로 올려서 Overview와 같은 위치 */
}



/* MRS Data 페이지 스타일 */
#mrs-data-section {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

    #mrs-data-section .left-content {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }

    /* MRS Data 헤더를 Overview와 정확히 같은 위치로 */
    #mrs-data-section .dashboard-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 24px !important;
        padding-top: 12px !important;
        padding-left: 12px !important;
        margin-top: 0 !important;
    }



/* 모든 화면 크기에서 강제 적용 */
@media (max-width: 1400px) {
    #mrs-data-section .dashboard-content .left-content .mrs-data-header {
        margin-top: 0 !important;
        padding-top: 12px !important;
        padding-left: 12px !important;
        margin-bottom: 24px !important;
        flex-direction: row !important;
        align-items: center !important;
    }
}

@media (max-width: 1024px) {
    #mrs-data-section .dashboard-content .left-content .mrs-data-header {
        margin-top: 0 !important;
        padding-top: 12px !important;
        padding-left: 12px !important;
        margin-bottom: 24px !important;
        flex-direction: row !important;
        align-items: center !important;
    }
}



/* MRS Data 사이드바의 타이틀 섹션 스타일 */
.mrs-sidebar .mrs-data-title-section {
    background-color: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    padding: 1rem; /* 16px */
}

    /* MRS Data 사이드바의 타이틀 스타일 */
    .mrs-sidebar .mrs-data-title-section h2 {
        font-size: var(--font-size-xl); /* 18px */
        font-weight: 600;
        color: var(--text-color);
        margin: 0;
    }

/* MRS Data 제목 스타일 */
#mrs-data-section .mrs-data-title-section h2 {
    font-size: var(--font-size-xl); /* 18px */
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

#mrs-data-section .calendar-wrapper,
#mrs-data-section .activity-wrapper,
#mrs-data-section .recent-activity {
    position: relative;
    z-index: 2;
}

/* MRS Data 페이지의 캘린더를 위로 올려서 Overview와 같은 높이로 배치 */
#mrs-data-section .calendar-wrapper {
    background-color: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    padding: 1rem; /* 16px */
    margin-top: -9.75rem; /* -156px - ArtTemplate이 있던 자리로 이동 */
    position: relative;
    top: -1.25rem; /* -20px - 정확한 위치 조정 */
    aspect-ratio: 1 / 1;
    width: 100%;
}

    #mrs-data-section .calendar-wrapper::after {
        content: none;
    }

#mrs-data-section .activity-wrapper {
    background-color: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    flex-grow: 1;
    min-height: 34.375rem; /* 550px */
    display: flex;
    flex-direction: column;
    border: none;
    margin-top: 0;
    width: 100%;
}

    #mrs-data-section .activity-wrapper::before {
        content: none;
    }

#mrs-data-section .recent-activity {
    padding: 1rem; /* 16px */
    overflow-y: auto;
    flex-grow: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: transparent;
    position: relative;
    z-index: 1;
}

    /* MRS Data 페이지의 Recent Activity 제목 크기 조정 */
    #mrs-data-section .recent-activity h3 {
        font-size: var(--font-size-xl); /* 24px -> 18px */
        font-weight: 600;
        margin-bottom: 1.25rem; /* 20px */
    }

/* 테이블 컨테이너 스타일 수정 */
#mrs-data-section .data-table-container {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* 테이블 스타일 수정 */
#mrs-data-section .data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    #mrs-data-section .data-table th {
        font-size: 12px;
        font-weight: 500;
        color: #6B7280;
        padding: 12px 16px;
        text-transform: uppercase;
        border-bottom: 1px solid #e5e7eb;
        display: table-cell;
        vertical-align: middle;
        text-align: left;
        white-space: nowrap;
    }

        #mrs-data-section .data-table th svg {
            display: inline-block;
            vertical-align: middle;
            margin-left: 4px;
        }

    #mrs-data-section .data-table td {
        padding: 16px;
        border-bottom: 1px solid #e5e7eb;
        vertical-align: middle;
    }

/* 체크박스 열 너비 조정 */
#mrs-data-section .checkbox-col {
    width: 40px;
    padding-left: 16px;
}

/* 제품명 열 스타일 */
#mrs-data-section .product-name-col {
    min-width: 300px;
}

/* 제품번호 열 스타일 */
#mrs-data-section .product-no-col {
    color: #6B7280;
}

/* 날짜 열 스타일 */
#mrs-data-section .date-col {
    color: #6B7280;
}

/* 가격 열 스타일 */
#mrs-data-section .price-col {
    font-weight: 600;
}

/* 상태 열 스타일 */
#mrs-data-section .status-col {
    text-align: center;
}

/* 액션 열 스타일 */
#mrs-data-section .actions-col {
    text-align: right;
    padding-right: 16px;
}

/* 상태 배지 스타일 */
#mrs-data-section .status-badge.available {
    background-color: rgba(61, 204, 121, 0.1);
    color: #3DCC79;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;
}

/* 페이지네이션 스타일 */
#mrs-data-section .pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

#mrs-data-section .pagination-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#mrs-data-section .per-page-selector {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
}

#mrs-data-section .showing-text {
    color: #6B7280;
    font-size: 14px;
}

#mrs-data-section .pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

#mrs-data-section .page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

#mrs-data-section .page-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}

    #mrs-data-section .page-number.active {
        background-color: #4E97FD;
        color: white;
        border-color: #4E97FD;
    }

#mrs-data-section .pagination-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #6B7280;
  cursor: pointer;
}

#mrs-data-section .pagination-btn svg[width="16"][height="16"] {
  width: 20px !important;
  height: 20px !important;
  color: #6B7280 !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

#mrs-data-section .pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#mrs-data-section .pagination-btn:disabled svg {
  color: #9CA3AF;
}

#mrs-data-section .pagination-btn:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

#mrs-data-section .pagination-btn:hover:not(:disabled) svg {
  color: #374151;
}

/* 탭 스타일 수정 */
#mrs-data-section .tabs-container {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
}

#mrs-data-section .tab {
    padding: 12px 0;
    margin-right: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    position: relative;
}

    #mrs-data-section .tab.active {
        color: #4E97FD;
        font-weight: 600;
    }

        #mrs-data-section .tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #4E97FD;
        }

/* 테이블 행 호버 효과 */
#mrs-data-section .data-table tbody tr:hover {
    background-color: rgba(78, 151, 253, 0.05);
}

/* 검색 박스 스타일 */
#mrs-data-section .search-box {
    display: flex !important;
    align-items: center !important;
    background-color: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    flex: 1 !important;
    flex-grow: 1 !important;
    flex-shrink: 1 !important;
    width: 100% !important;
    min-width: 200px !important;
    max-width: none !important;
    margin-right: 0 !important;
}

    #mrs-data-section .search-box svg {
        margin-right: 8px;
        color: #9CA3AF;
    }

    #mrs-data-section .search-box input {
        border: none !important;
        background: none !important;
        outline: none !important;
        width: 100% !important;
        flex: 1 !important;
        color: #111827 !important;
        font-size: 14px !important;
    }

/* MRS Data 헤더 스타일 - Overview와 완전히 동일하게 */
#mrs-data-section .dashboard-header h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: normal;
}

/* MRS Data 페이지 + 버튼 스타일 */
#mrs-data-section .add-task-btn {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
}

    #mrs-data-section .add-task-btn svg {
        width: 16px !important;
        height: 16px !important;
        stroke-width: 2 !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

/* Actions 드롭다운 스타일 */
.actions-dropdown {
    position: relative;
    display: inline-block;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

    .action-btn:hover {
        background-color: var(--bg-color);
    }

/* MRS Data 페이지 전체 레이아웃 조정 */
#mrs-data-section .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0;
}

#mrs-data-section .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* MRS Data 페이지 검색박스 더 길게 */
#mrs-data-section .search-box {
    min-width: 500px !important;
    max-width: 700px !important;
    flex: 2 !important;
}

#mrs-data-section .mrs-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 12px;
    padding-left: 12px;
}

    #mrs-data-section .mrs-data-header h1 {
        font-size: 24px;
        font-weight: 600;
        color: #111827;
    }

#mrs-data-section .export-btn-container {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 10px;
}

#mrs-data-section .export-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px 0 0 6px;
  padding: 8px 16px;
  font-weight: 500;
  color: #111827;
  height: 42px;
}

#mrs-data-section .export-btn svg[width="16"][height="16"] {
  width: 20px !important;
  height: 20px !important;
  color: #111827 !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

#mrs-data-section .dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-left: none;
  border-radius: 0 6px 6px 0;
  padding: 8px 10px;
  height: 42px;
}

#mrs-data-section .dropdown-btn svg[width="16"][height="16"] {
  width: 20px !important;
  height: 20px !important;
  color: #111827 !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

#mrs-data-section .add-btn {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background-color: #4E97FD;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

#mrs-data-section .add-btn svg[width="16"][height="16"] {
  width: 20px !important;
  height: 20px !important;
  color: white !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

/* 액션 버튼 스타일 */
#mrs-data-section .action-btn {
  background-color: #4E97FD;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 500;
  height: 42px;
}

#mrs-data-section .action-btn svg[width="16"][height="16"] {
  width: 20px !important;
  height: 20px !important;
  color: white !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

/* 모든 MRS Data 섹션의 SVG 아이콘 크기 강제 적용 */
#mrs-data-section svg[width="16"][height="16"] {
  width: 20px !important;
  height: 20px !important;
}

/* 더 강력한 SVG 크기 오버라이드 - 모든 SVG에 적용 */
#mrs-data-section svg {
  width: 20px !important;
  height: 20px !important;
}

/* 특정 버튼들의 SVG에 대한 추가 오버라이드 */
#mrs-data-section .filter-btn svg,
#mrs-data-section .pagination-btn svg,
#mrs-data-section .export-btn svg,
#mrs-data-section .dropdown-btn svg,
#mrs-data-section .add-btn svg,
#mrs-data-section .action-btn svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

/* CSS 변수를 사용한 강제 크기 설정 */
#mrs-data-section .filter-btn svg,
#mrs-data-section .pagination-btn svg {
  --svg-width: 20px !important;
  --svg-height: 20px !important;
  width: var(--svg-width) !important;
  height: var(--svg-height) !important;
}

/* 필터 버튼 스타일 */
#mrs-data-section .filter-btn {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  color: #6B7280;
}

#mrs-data-section .filter-btn svg[width="16"][height="16"] {
  width: 20px !important;
  height: 20px !important;
  color: #6B7280 !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

#mrs-data-section .filter-btn:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

#mrs-data-section .filter-btn:hover svg {
  color: #374151;
}

/* 필터 정렬 컨테이너 */
#mrs-data-section .filter-sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 체크박스 스타일 */
#mrs-data-section .data-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
}

    #mrs-data-section .data-table input[type="checkbox"]:checked {
        background-color: #4E97FD;
        border-color: #4E97FD;
    }

        #mrs-data-section .data-table input[type="checkbox"]:checked::after {
            content: '';
            position: absolute;
            left: 5px;
            top: 2px;
            width: 5px;
            height: 9px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

/* File Manager 페이지가 활성화되었을 때 다른 모든 요소 숨기기 */
#file-manager-section.active ~ * .user-profile-section,
#file-manager-section.active ~ * .calendar-wrapper,
#file-manager-section.active ~ * .activity-wrapper,
#file-manager-section.active ~ * .recent-activity,
#file-manager-section.active ~ * .right-sidebar,
body:has(#file-manager-section.active) .user-profile-section,
body:has(#file-manager-section.active) .calendar-wrapper,
body:has(#file-manager-section.active) .activity-wrapper,
body:has(#file-manager-section.active) .recent-activity,
body:has(#file-manager-section.active) .right-sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* File Manager 페이지에서 모든 right-sidebar 숨기기 */
#file-manager-section .user-profile-section,
#file-manager-section .calendar-wrapper,
#file-manager-section .activity-wrapper,
#file-manager-section .recent-activity,
#file-manager-section .right-sidebar {
    display: none !important;
}

/* File Manager 페이지 dashboard-content 스타일 재정의 */
#file-manager-section .dashboard-content {
    display: block !important;
    grid-template-columns: none !important;
    padding: 0 !important;
    height: calc(100vh - 64px) !important;
    overflow: visible !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}

/* File Manager 섹션 기본 위치 - JavaScript로 제어 */
#file-manager-section {
    position: fixed;
    z-index: 10;
    transition: all 0.3s ease;
    transform: translateZ(0);
    padding: 0;
    margin: 0;
}

    /* File Manager가 활성화될 때 다른 content-section 숨기기 */
    #file-manager-section.active ~ .content-section {
        display: none !important;
    }

/* Folders Page Styles */
.folders-container {
    display: grid;
    grid-template-columns: 250px 0.94fr 300px;
    gap: 24px;
    padding: 24px;
    height: 100% !important;
    width: 100% !important;
    overflow: visible;
    position: relative;
    transition: all 0.3s ease;
}

/* Left Sidebar */
.folders-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.folder-tree {
    order: 1;
}

.folders-sidebar h3 {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.folder-tree {
    margin-bottom: 24px;
    position: relative;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    z-index: 2;
}

    .folder-item:hover {
        background-color: #f3f4f6;
    }

    .folder-item.expandable {
        background-color: #f8fafc;
    }

.folder-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .folder-icon img {
        width: 100%;
        height: 100%;
    }

    .folder-icon.small {
        width: 16px;
        height: 16px;
    }

.folder-item span {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.expand-icon {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    transition: transform 0.2s;
}

    .expand-icon.expanded {
        transform: rotate(0deg);
    }

.folder-subitems {
    margin-left: 32px;
    margin-bottom: 8px;
    position: relative;
}

/* Projects 폴더의 하위 항목들에만 점선 표시 */
.folder-item.expandable + .folder-subitems::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 0;
    bottom: 0;
    width: 1px;
    border-left: 1px dashed #d1d5db;
}

.folder-subitem {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    margin-bottom: 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

    .folder-subitem::before {
        content: '';
        position: absolute;
        left: -16px;
        top: 50%;
        width: 12px;
        height: 1px;
        border-top: 1px dashed #d1d5db;
    }

    .folder-subitem:hover {
        background-color: #f3f4f6;
    }

.trash-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
    margin-bottom: 24px;
}


/* Main Content */
.folders-main {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.folders-header {
    margin-bottom: 32px;
    flex-shrink: 0;
}

.folders-main > * {
    flex-shrink: 0;
}

.folders-content,
.files-section {
    flex-grow: 1;
}

.search-upload-container {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.folders-header .search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    max-width: calc(100% - 120px);
}

    .folders-header .search-box svg {
        margin-right: 12px;
        color: #9ca3af;
    }

    .folders-header .search-box input {
        border: none;
        background: none;
        outline: none;
        width: 100%;
        font-size: 14px;
        color: #374151;
    }

.upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}

    .upload-btn:hover {
        background-color: #2563eb;
    }

.folders-content {
    min-height: calc(50vh - 120px);
    display: flex;
    flex-direction: column;
}

    .folders-content h2 {
        font-size: 18px;
        font-weight: 600;
        color: #111827;
        margin-bottom: 20px;
    }

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
    flex: 1;
    justify-items: center;
    align-items: start;
}

.folder-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .folder-card:hover {
        transform: translateY(-2px);
    }


.folder-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .folder-card-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .folder-card-icon.music {
        color: #f59e0b;
    }

    .folder-card-icon.pictures {
        color: #10b981;
    }

    .folder-card-icon.documents {
        color: #3b82f6;
    }

    .folder-card-icon.downloads {
        color: #8b5cf6;
    }


.folder-card-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.folder-card-info p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Files Section */
.files-section {
    margin-top: 80px;
    padding-top: 40px;
    min-height: calc(50vh - 120px);
    display: flex;
    flex-direction: column;
}

    .files-section h2 {
        font-size: 18px;
        font-weight: 600;
        color: #111827;
        margin-bottom: 20px;
    }

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 24px;
    flex: 1;
}

.file-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .file-card:hover {
        transform: translateY(-2px);
    }

.file-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .file-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .file-icon.music {
        color: #f59e0b;
    }

    .file-icon.pictures {
        color: #10b981;
    }

    .file-icon.documents {
        color: #3b82f6;
    }

    .file-icon.downloads {
        color: #8b5cf6;
    }

/* 파일 아이콘 스타일 개선 */
.file-icon svg {
    width: 100%;
    height: 100%;
}

/* 폴더 카드 아이콘 스타일 개선 */
.folder-card-icon svg {
    width: 100%;
    height: 100%;
}



.file-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.file-info p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: #6b7280;
}

.empty-state h3 {
    margin: 16px 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Path Navigation */
.path-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.path-navigation h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.back-button:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

/* Login Required Message */
.login-required {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.login-message {
    text-align: center;
    color: #6b7280;
}

.login-message h3 {
    margin: 16px 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.login-message p {
    margin: 0;
    font-size: 14px;
}

/* Right Sidebar */
.folders-right-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    min-height: 400px;
}

.selected-folder-info {
    text-align: center;
}

.folder-preview {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .folder-preview img {
        width: 60px;
        height: 60px;
    }

.folder-preview-simple {
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

    .folder-preview-simple img {
        width: 80px;
        height: 80px;
        object-fit: contain;
    }

.folder-title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.folder-title-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.selected-folder-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0px;
    text-align: center;
}

.folder-details {
    text-align: left;
    margin-bottom: 32px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

    .detail-row:last-child {
        border-bottom: none;
    }

    .detail-row .label {
        font-size: 12px;
        font-weight: 500;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .detail-row .value {
        font-size: 12px;
        color: #374151;
    }

        .detail-row .value.blue-link {
            color: #3b82f6;
            cursor: pointer;
        }

.settings-section {
    text-align: left;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

    .setting-item span {
        font-size: 14px;
        color: #374151;
    }

.toggle-switch {
    width: 44px;
    height: 24px;
    background-color: #e5e7eb;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .toggle-switch.active {
        background-color: #3b82f6;
    }

.toggle-slider {
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .folders-container {
        grid-template-columns: 200px 0.7fr 250px;
        gap: 16px;
        padding: 16px;
        overflow: visible;
    }

    .folders-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) {
    /* 모바일에서 File Manager 위치 조정 */
    #file-manager-section {
        top: 60px !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
    }

    /* 모바일에서는 사이드바 확장이 적용되지 않음 */
    .app-container.sidebar-expanded #file-manager-section,
    body.file-manager-active .app-container.sidebar-expanded #file-manager-section,
    .sidebar.expanded ~ .main-content #file-manager-section.active {
        top: 60px !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
    }

    .folders-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        padding: 16px;
        overflow: visible;
    }

    .folders-sidebar,
    .folders-right-sidebar {
        order: 2;
    }
    
    .folders-right-sidebar {
        max-height: none;
        min-height: auto;
    }

    .folders-main {
        order: 1;
    }

    .search-upload-container {
        flex-direction: column;
        gap: 12px;
    }

    .folders-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
}

/* Session Info Section Styles */
.session-info-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.session-info-header h3 {
    margin: 0 0 16px 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
}

.session-info-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.session-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-label {
    font-weight: 500;
    color: var(--secondary-text);
}

.info-value {
    font-weight: 600;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    background: var(--bg-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

#mrs-data-section .dashboard-content,
#mrs-data-section.dashboard-content,
[data-section="mrs-data-section"] .dashboard-content,
[data-section="mrs-data-section"].dashboard-content,
[data-section="mrs-data"] .dashboard-content,
[data-section="mrs-data"].dashboard-content{
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100% !important;
    max-width:1680px !important;
    margin-inline:auto !important;
    gap:var(--card-padding,1rem) !important;
    box-sizing:border-box !important;
}

#mrs-data-section .dashboard-content > *,
#mrs-data-section.dashboard-content > *,
[data-section="mrs-data-section"] .dashboard-content > *,
[data-section="mrs-data-section"].dashboard-content > *,
[data-section="mrs-data"] .dashboard-content > *,
[data-section="mrs-data"].dashboard-content > *{
    grid-column:auto !important;
}

#mrs-data-section .dashboard-content > .left-content,
#mrs-data-section.dashboard-content > .left-content,
[data-section="mrs-data-section"] .dashboard-content > .left-content,
[data-section="mrs-data-section"].dashboard-content > .left-content,
[data-section="mrs-data"] .dashboard-content > .left-content,
[data-section="mrs-data"].dashboard-content > .left-content{
    grid-column:1 / -1 !important;
}

@media (min-width: 969px) {
    #mrs-data-section .dashboard-content {
        display: grid !important;
        grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr) !important;
        gap: var(--card-padding, 1rem) !important;
        width: 100% !important;
        max-width: 1680px !important;
        margin-inline: auto !important;
        box-sizing: border-box !important;
    }
    #mrs-data-section .dashboard-content > * { grid-column: auto !important; }
    #mrs-data-section .left-content  { grid-column: 1 !important; }
    #mrs-data-section .right-sidebar { grid-column: 2 !important; }
}

@media (min-width: 1440px) {
    #mrs-data-section .dashboard-content {
        max-width: 1800px !important;
        grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.9fr) !important;
    }
}

#mrs-data-section .dashboard-content,
[data-section="mrs-data-section"] .dashboard-content,
[data-section="mrs-data"] .dashboard-content{
    display: grid !important;
    grid-template-columns: 1fr !important;   /* 1열 전체 폭 */
    width: 100vw !important;                 /* 뷰포트 전폭 */
    max-width: none !important;              /* 상위 max-width 무시 */
    margin-left: calc(50% - 50vw) !important;/* 좌우 풀블리드 보정 */
    margin-right: calc(50% - 50vw) !important;
    gap: var(--card-padding, 1rem) !important;
    box-sizing: border-box !important;
    padding-inline: var(--card-padding, 1rem);
}

#mrs-data-section .dashboard-content > .left-content,
[data-section="mrs-data-section"] .dashboard-content > .left-content,
[data-section="mrs-data"] .dashboard-content > .left-content{
    grid-column: 1 / -1 !important;         /* 전체 컬럼 가로지르기 */
}

/* 수평 스크롤 방지(100vw 사용 시 권장) */
html, body { overflow-x: hidden; }

/* ===== MRS DATA 전용: 풀블리드(오른쪽 끝까지) + 좌측 잘림 방지 ===== */
#mrs-data-section .dashboard-content,
[data-section="mrs-data-section"] .dashboard-content,
[data-section="mrs-data"] .dashboard-content {
  display: grid !important;
  grid-template-columns: 1fr !important;         /* 1열 전체폭 */
  width: 100dvw !important;                      /* 뷰포트 동적폭: 스크롤바 변화 대응 */
  max-width: none !important;

  /* 풀블리드 중앙 보정 (스크롤바/패딩/노치 고려) */
  margin-left: calc(50% - 50dvw) !important;
  margin-right: calc(50% - 50dvw) !important;

  /* 좌우 여백을 최소 안전값으로 확보 → '왼쪽 잘림' 방지 */
  padding-left: max(var(--card-padding, 16px), env(safe-area-inset-left), 12px) !important;
  padding-right: max(var(--card-padding, 16px), env(safe-area-inset-right), 12px) !important;

  box-sizing: border-box !important;
  gap: var(--card-padding, 1rem) !important;

  /* 상위가 overflow 숨겨서 잘리는 경우 방지 */
  overflow: visible !important;
}

/* left-content가 전체 너비를 가로질러 사용 */
#mrs-data-section .dashboard-content > .left-content,
[data-section="mrs-data-section"] .dashboard-content > .left-content,
[data-section="mrs-data"] .dashboard-content > .left-content {
  grid-column: 1 / -1 !important;
}

/* 상위 래퍼가 패딩으로 가로 위치를 밀어내는 경우 초기화 */
#mrs-data-section,
#mrs-data-section :is(.page,.page-content,.content,.content-inner,
                      .dashboard-page,.dashboard-wrapper,.container,
                      .container-fluid,.wrap,.shell,.page-container,
                      .page-inner,.main-content,.content-body,
                      [class*="container"],[class*="Wrapper"],[class*="Inner"]) {
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
}

/* 100vw 사용 시 스크롤바 폭 변화로 좌우 흔들림/잘림 방지 */
html { scrollbar-gutter: stable both-edges; }

/* 혹시 수평 스크롤이 생기면 숨김 */
body { overflow-x: hidden; }

/* Prevent text caret/selection on product name cells */
.data-table .product-name-col {
  cursor: default;
  user-select: none;
}
.data-table .product-name-col a {
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

/* Spectrum Modal */
#spectrum-modal{
  position:fixed; inset:0; z-index:10000;
  display:flex; align-items:center; justify-content:center;
}
.spectrum-modal-overlay{
  position:absolute; inset:0;
  background:rgba(0,0,0,0.5);
  backdrop-filter:blur(2px);
}
.spectrum-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    height: 640px;
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalFadeIn .2s ease-out;
}
.spectrum-modal-header{
  display:flex; justify-content:space-between; align-items:center;
  padding:24px 30px; border-bottom:1px solid #e5e7eb;
}
.spectrum-modal-header h2{
  font-size:20px; font-weight:600; color:#1f2937; margin:0;
}
.spectrum-close-btn{
  background:transparent; border:0; cursor:pointer; padding:4px;
  display:flex; align-items:center; justify-content:center;
  color:#6b7280; transition:color .2s;
}
.spectrum-close-btn:hover{ color:#1f2937; }
.spectrum-graph-container{ padding:30px; background:#fff; }
.spectrum-graph-container svg{ width:100%; height:auto; display:block; }
.spectrum-graph-container #modal-spectrum-chart{ height:100%; min-height:400px; }

/* Spectrum toolbar alignment and checkbox styling */
.spectrum-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid #f3f4f6;
}
.spectrum-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}
.spectrum-toolbar input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}
.spectrum-options{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:20px;
  padding:24px 50px; border-top:1px solid #f3f4f6;
}
.spectrum-checkbox-label{ display:flex; align-items:flex-start; gap:10px; cursor:pointer; user-select:none; }
.spectrum-checkbox-label input[type="checkbox"]{
  width:18px; height:18px; cursor:pointer; accent-color:#3b82f6; margin-top:2px; flex-shrink:0;
}
.spectrum-option-text{ font-size:14px; color:#374151; line-height:1.4; }
.spectrum-placeholder{
  height:410px; display:flex; align-items:center; justify-content:center;
  color:#6b7280; border:1px dashed #e5e7eb; border-radius:8px;
}

@keyframes modalFadeIn{
  from{ transform:translateY(6px); opacity:.0; }
  to{ transform:translateY(0); opacity:1; }
}

/* ===== MRS DATA: 안전한 와이드 레이아웃(왼쪽 잘림 방지) ===== */
#mrs-data-section .dashboard-content,
[data-section="mrs-data-section"] .dashboard-content,
[data-section="mrs-data"] .dashboard-content {
  display: grid !important;
  grid-template-columns: 1fr !important;                 /* 1열 전체 폭 */
  inline-size: min(100dvw, 1920px) !important;           /* 뷰포트 전폭 한도 내에서 넓게 */
  width: min(100dvw, 1800px) !important;                 /* 일부 브라우저 호환용 중복 지정 */
  max-width: none !important;

  /* ⚠ 기존 풀블리드 보정(음수 마진) 무력화 → 왼쪽 잘림 방지 */
  margin-left: auto !important;
  margin-right: auto !important;

  /* 좌우 기본 여백 확보(잘림·붙음 방지) */
  padding-inline: clamp(12px, 2vw, 24px) !important;

  box-sizing: border-box !important;
  gap: var(--card-padding, 1rem) !important;

  /* 수평 흔들림/잘림 방지 */
  overflow-x: clip !important;
}

/* left-content가 전체 너비를 가로지르도록 */
#mrs-data-section .dashboard-content > .left-content,
[data-section="mrs-data-section"] .dashboard-content > .left-content,
[data-section="mrs-data"] .dashboard-content > .left-content {
  grid-column: 1 / -1 !important;
}

/* 혹시 남아 있는 span/column 강제 규칙 초기화 */
#mrs-data-section .dashboard-content > * {
  grid-column: auto !important;
}

/* 스크롤바 폭 변화로 인한 점프 방지(권장) */
html { scrollbar-gutter: stable both-edges; }
