html {
    font-size: 10px;
}

@media (max-width: 768px) {
    html {
        font-size: 10px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: 'Pretendard Variable', Pretendard;
}

#Root {
    position: relative; /* absolute를 relative로 변경 */
    top: 0; /* 100px를 0으로 변경 */
    left: 0;
    width: 100%;
    height: calc(100% - 60px); /* header 높이 제외 */
    display: grid;
    grid-template-rows: 1fr 120px; /* header 제거로 인한 그리드 수정 */
    overflow-x: clip;
    box-sizing: border-box !important;
    margin-top: 60px; /* header 높이만큼 margin */
}

#MainPage_Wrapper {
    grid-row: 1;
    width: 100vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
}

footer {
    grid-row: 2;
}

#Root::-webkit-scrollbar {
    display: none;
}

/*body {
  margin-bottom: 60px;
}*/

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Modern Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px 20px 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: fixed; /* sticky에서 fixed로 변경 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

/* 헤더 컨테이너: 좌/우 클러스터 분리 */
.Header_Container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 왼쪽 그룹 ↔ 오른쪽 그룹 */
    gap: 24px;
}

/* 왼쪽: 로고+상태 + (docs/notice/archifilm) 묶음 */
.header-left {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap; /* 줄바꿈 방지 (필요시 wrap으로 변경) */
}

.vertical-divider {
    width: 1px;
    height: 16px;
    background-color: #aaa;
    margin: 0 20px; 
}

.header-left-menu {
    gap: 50px;
    margin-right: 20px;
}

/* 로고 옆 3개 메뉴 */
.header-left-menu,
.header-right-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .header-left-menu li a,
    .header-right-menu li a,
    .header-right-menu li button {
        text-decoration: none;
        color: inherit;
        font-weight: 500;
    }

    .header-right-menu li.language-item {
        border-right: 1px solid #ccc; /* 연한 회색 선 */
        margin-right: 12px; /* 선과 로그인 버튼 사이 여백 */
        padding-right: 12px; /* 선과 언어 토글 버튼 간 여백 */
    }

    .header-left-menu li a {
        display: inline-flex;
        align-items: center; /* 세로 정렬 자동 맞춤 */
        line-height: 1; /* 불필요한 여백 제거 */
    }

        .header-left-menu li a i {
            margin-left: 2px;
            font-size: 11px;
        }

.logo-section {
    flex: 0 0 auto;
    margin-left: 10%;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .logo-link:hover {
        transform: translateY(-2px);
        text-decoration: none;
    }

.logo-img {
    height: 45px;
    display: block;
    transition: all 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

/*English 한국어 toggle 버튼*/
.language-toggle-header {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin: 0;
    height: 34px;
}

    .language-toggle-header .btn-lang {
        border: none;
        background: transparent;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        color: #6c757d;
        min-width: 55px;
    }

        .language-toggle-header .btn-lang.active {
            background: white;
            color: #007bff;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .language-toggle-header .btn-lang:hover {
            color: #007bff;
        }

/* 모바일 대응 */
@media (max-width: 768px) {
    .language-toggle-header {
        margin: 10px 0;
    }
}

/* 기존의 logo-wrapper, logo-text 스타일 제거 또는 주석 처리 */
/*
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #2980FF 0%, #0ea5e9 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.logo-wrapper i {
    font-size: 24px;
    color: white;
}

.logo-text {
    color: white;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
*/

.hamburger-btn {
    display: none;
    background: linear-gradient(135deg, #2980FF 0%, #0ea5e9 100%);
    border: none;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    color: white;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

    .hamburger-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }


/*아키필름 갤러리*/

.grid-item-ac img {
    display: block;
    min-width: 100%;
    max-width: 100%;
}

.grid-sizer-ac, .grid-item-ac {
    /* width: 23%;*/
    width: calc((100% - 30px)/4);
}

/* 태블릿: 3개 */
@media (max-width: 1024px) {
    .grid-sizer-ac, .grid-item-ac {
        width: calc((100% - 20px)/3);
    }
}

/* 모바일: 2개 */
@media (max-width: 768px) {
    .grid-sizer-ac, .grid-item-ac {
        width: calc((100% - 10px)/2);
    }
}

.grid-item-ac {
    margin-bottom: 5px;
}

    .grid-item-ac:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    }

.page-load-status {
    display: none;
    padding: 20px;
    text-align: center;
}

.loader-ellips {
    font-size: 20px;
    position: relative;
    width: 4em;
    height: 1em;
    margin: 10px auto;
}

.loader-ellips__dot {
    display: block;
    width: 1em;
    height: 1em;
    border-radius: 0.5em;
    background: #555;
    position: absolute;
    animation-duration: 0.5s;
    animation-timing-function: ease;
    animation-iteration-count: infinite;
}

    .loader-ellips__dot:nth-child(1),
    .loader-ellips__dot:nth-child(2) {
        left: 0;
    }

    .loader-ellips__dot:nth-child(3) {
        left: 1.5em;
    }

    .loader-ellips__dot:nth-child(4) {
        left: 3em;
    }

/* 이미지 컨테이너와 title 스타일 */
.image-container-ac {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.certified-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: auto !important;
    z-index: 2;
}

.image-title-ac {
    position: absolute;
    bottom: 1px;
    left: 1px;
    /*right: 10px;*/
    /*background: rgba(0,0,0,0.7);*/
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    /*text-shadow: 0 2px 4px rgba(0,0,0,1);*/
    border-radius: 4px;
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.image-prompt-ac {
    position: absolute;
    bottom: 30px;
    left: 1px;
    /*right: 10px;*/
    /*background: rgba(0,0,0,0.7);*/
    color: white;
    padding: 8px 12px;
    font-size: 12px;
    /*font-weight: 600;*/
    /*text-shadow: 0 2px 4px rgba(0,0,0,1);*/
    border-radius: 4px;
    text-align: start;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.image-like-ac {
    position: absolute;
    bottom: 1px;
    right: 1px;
    /*right: 10px;*/
    /*background: rgba(0,0,0,0.7);*/
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    /*font-weight: 600;*/
    /*text-shadow: 0 2px 4px rgba(0,0,0,1);*/
    border-radius: 4px;
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

    .image-like-ac img {
        width: 14px !important;
        min-width: auto !important;
        max-width: none !important;
        height: 14px !important;
        flex-shrink: 0;
    }

@keyframes reveal {
    from {
        transform: scale(0.001);
    }

    to {
        transform: scale(1);
    }
}

@keyframes slide {
    to {
        transform: translateX(1.5em)
    }
}

.loader-ellips__dot:nth-child(1) {
    animation-name: reveal;
}

.loader-ellips__dot:nth-child(2),
.loader-ellips__dot:nth-child(3) {
    animation-name: slide;
}

.loader-ellips__dot:nth-child(4) {
    animation-name: reveal;
    animation-direction: reverse;
}




/* 사이드바 오버레이 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1001;
}

/* 사이드바 닫기 버튼 */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 26px;
}

/* main-content 컨테이너 */
.main-content {
    position: relative;
    min-height: calc(100vh - 76px);
    display: block;
    padding-top: 75px; /* 헤더 높이만큼 패딩 추가 */
}

/* 모던 사이드바 */
.sidebar {
    position: fixed;
    top: 100px;
    left: 6%;
    width: 18vw;
    min-width: 240px; /* 최소 너비 설정 */
    max-width: 320px; /* 최대 너비 설정 */
    height: fit-content;
    max-height: calc(100vh - 140px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 100;
    overflow: hidden;
}

/* 사이드바 헤더 */
.sidebar-header {
    padding: 24px 20px 20px 20px;
    background: linear-gradient(135deg, #2980FF 0%, #0ea5e9 100%);
    color: white;
    text-align: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-img {
    height: 28px;
    filter: brightness(0) invert(1); /* 이미지를 흰색으로 변경 */
}

/* 사이드바 네비게이션 */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    margin: 0 16px 8px 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 12px;
    color: #6c757d;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    font-size: 16px;
}

    .nav-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 0;
        background: linear-gradient(135deg, #2980FF 0%, #0ea5e9 100%);
        transition: width 0.3s ease;
        border-radius: 12px;
    }

.nav-icon {
    position: relative;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-text {
    position: relative;
    z-index: 2;
    flex: 1;
    transition: all 0.3s ease;
}

.nav-indicator {
    position: relative;
    z-index: 2;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: #2980FF;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(4px);
    text-decoration: none;
}

    .nav-item:hover::before {
        width: 4px;
    }

    .nav-item:hover .nav-icon {
        background: linear-gradient(135deg, #2980FF 0%, #0ea5e9 100%);
        color: white;
        transform: scale(1.1);
    }

.nav-item.active {
    color: #2980FF;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    transform: translateX(4px);
}

    .nav-item.active::before {
        width: 4px;
    }

    .nav-item.active .nav-icon {
        background: linear-gradient(135deg, #2980FF 0%, #0ea5e9 100%);
        color: white;
    }

    .nav-item.active .nav-indicator {
        background: #2980FF;
        box-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
    }

/* 사이드바 푸터 */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(248, 249, 250, 0.8);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2980FF 0%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
}

.user-status {
    font-size: 12px;
    color: #00b894;
    font-weight: 500;
}

/* content-area */
.content-area {
    margin-left: calc(6% + 18vw + 1vw);
    margin-right: 8%;
    background: transparent;
    color: black;
    padding: 0 0 16px 0;
}

/* content-container */
.content-container {
    max-width: none;
    width: 100%;
    height: auto;
    min-height: 500px;
    margin-bottom: 20px;
    margin-top: 40px;
    margin-left: 20px;
    margin-right: 20px;
    padding: 32px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

/* 반응형 디자인 */
@media (max-width: 1400px) {
    .sidebar {
        left: 5%;
        width: 20vw;
        min-width: 220px;
        max-width: 300px;
    }

    .content-area {
        margin-left: calc(5% + 20vw + 1vw);
        margin-right: 4%;
    }
}

@media (max-width: 1230px) {
    .sidebar {
        left: 3%;
        width: 22vw;
        min-width: 200px;
        max-width: 280px;
    }

    .content-area {
        margin-left: calc(3% + 22vw + 1vw);
        margin-right: 3%;
    }
}

@media (max-width: 1150px) {
    .logo-section {
        margin-left: 0;
    }

    .content-area {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 10px 30px 10px;
    }

    .content-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 24px 20px;
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -300px !important;
        height: 100vh !important;
        margin: 0 !important;
        z-index: 1002 !important;
        width: 280px !important; /* 모바일에서는 고정 크기 */
        border-radius: 0 !important;
        max-height: none !important;
        min-width: auto !important;
        max-width: none !important;
    }

        .sidebar.show {
            left: 0 !important;
            transition: left 0.3s ease !important;
        }

    .hamburger-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .sidebar-close-btn {
        display: block !important;
    }

    .sidebar-header {
        padding-top: 60px;
    }

    .btn-edit, .btn-save, .btn-password {
        padding: 8px 14px;
        font-size: 12px !important;
        min-width: 90px;
    }
}

@media (max-width: 768px) {
    .content-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 24px 20px;
    }

    .sidebar {
        width: 260px;
        left: -260px;
    }

    .logo-img {
        height: 38px;
    }

    .logo-section {
        margin-left: 0;
    }
}

.image-overlay-ac {
    opacity: 0;
}

.image-container-ac img {
    display: block; /* 이렇게 하면 공백이 사라집니다 */
}

.image-container-ac:hover .image-overlay-ac {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0));
    opacity: 1;
}

.empty-div-ac {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 2rem;
    color: #495579;
    font-weight: 600;
}


/* ID로 직접 스타일링 */
#handler-slider {
    height: 20px !important;
}

    /* 슬라이더 트랙(바) */
    #handler-slider .dx-slider-bar,
    #handler-slider .dx-slider-range {
        height: 3px !important;
        /*top: 8px !important;*/ /* 계산된 위치 */
        transform: none !important; /* transform 제거 */
    }

    /* 슬라이더 핸들(손잡이) */
    #handler-slider .dx-slider-handle {
        width: 14px !important;
        height: 14px !important;
        top: 6px !important; /* 계산된 위치 */
        transform: none !important; /* transform 제거 */
    }