@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.css');

/* ===== 공통 스타일 ===== */
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;

    /* 2. 폰트 크기 및 굵기: 현대적인 웹의 가장 표준적이고 안정적인 세팅 */
    font-size: 14px;
    font-weight: 400; /* Regular */

    /* 3. 색상: 쨍한 순수 블랙(#000)을 피해 눈의 피로도를 낮추고 고급스러움 강조 */
    color: #333333;
    background-color: #ffffff;

    /* 4. 행간 및 자간: 숨통이 트이는 줄간격과 살짝 조여준 자간으로 세련미 추가 */
    line-height: 1.6;
    letter-spacing: -0.01em;

    /* 5. 한국어 최적화: 단어 중간에서 줄이 넘어가지 않도록 설정 (가독성 핵심) */
    word-break: keep-all;
    overflow-wrap: break-word;

    /* 6. 렌더링 최적화: 특히 Mac/iOS 환경에서 글씨가 너무 굵게 번져 보이지 않고 또렷하게 보이도록 처리 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* 브라우저 기본 여백 초기화 */
    margin: 0;
    flex-direction: column;
    min-height: 100vh;
}
:root{
    --bs-nav-link-color: #27272A !important;
}

main {
    flex: 1;
}

/* ===== 스피너 (로딩 인디케이터) ===== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.spinner-overlay.show {
    display: flex;
}

.spinner-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.spinner-overlay .spinner-text {
    margin-top: 1rem;
    color: #333;
    font-weight: 500;
}

/* 페이지 초기 로딩용 스피너 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.page-loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* 버튼 내 스피너 */
.btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
    margin-right: 0.5rem;

}
.btn-primary{
    background-color: #18181B !important;
    border-color: #18181B !important;
}
.btn-primary:hover {
    background-color: #27272A !important;
    border-color: #27272A !important;
}
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* ===== 레이아웃 컨테이너 ===== */
.layout-wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
}

.layout-content {
    flex: 1;
    transition: margin-left 0.3s ease;
    padding: 1.5rem;
}

/* LNB가 열려있을 때 */
body.lnb-open .layout-content {
    margin-left: 250px;
}

/* ===== LNB (Left Navigation Bar) 스타일 ===== */
.lnb {
    position: fixed;
    top: 56px;
    left: -250px;
    width: 250px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1040;
    background-color: #f8f9fa;
}

.lnb.show {
    left: 0;
}

.lnb-header {
    background-color: #fff;
}

.lnb-header h5 {
    font-weight: 600;
    color: #333;
}

/* LNB 메뉴 스타일 */
.lnb-nav {
    padding: 0.5rem 0;
}

.lnb-nav .nav-link {
    padding: 0.75rem 1rem;
    color: #495057;
    border-radius: 0;
    transition: all 0.2s ease;
}

.lnb-nav .nav-link:hover {
    background-color: #e9ecef;
    color: #212529;
}

.lnb-nav .nav-link.active {
    background-color: #18181B;
    color: #fff;
}

/* 1Depth 메뉴 */
.lnb-1depth {
    font-weight: 500;
    font-size: 0.95rem;
}

.lnb-1depth.has-children {
    cursor: pointer;
}

.lnb-1depth .lnb-arrow {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.lnb-1depth[aria-expanded="true"] .lnb-arrow {
    transform: rotate(180deg);
}

/* 2Depth 메뉴 */
.lnb-2depth {
    font-size: 0.875rem;
    padding-left: 2.5rem !important;
    color: #6c757d;
}

.lnb-2depth:hover {
    color: #18181B;
    background-color: #e3f2fd !important;
}

.lnb-2depth.active {
    color: #18181B;
    font-weight: 500;
    background-color: #e3f2fd;
}

/* 서브메뉴 영역 */
.submenu {
    background-color: #fff;
}

/* LNB 오버레이 - 사용하지 않음 (콘텐츠 조작 가능하도록) */
.lnb-overlay {
    display: none !important;
}

/* LNB 토글 플로팅 버튼 */
.lnb-toggle-float {
    position: fixed;
    top: 70px;
    left: 10px;
    z-index: 1035;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.lnb-toggle-float:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lnb-toggle-float i {
    font-size: 1.2rem;
}

/* LNB가 열렸을 때 토글 버튼 위치 이동 */
body.lnb-open .lnb-toggle-float {
    left: 260px;
}

/* LNB 닫기 버튼 스타일 */
.lnb-close-btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 반응형 스타일 ===== */
@media (min-width: 992px) {
    /* 데스크탑에서 LNB가 열렸을 때 컨텐츠 밀기 */
    body.lnb-open .layout-content {
        margin-left: 250px;
    }

    /* 데스크탑에서 LNB가 열렸을 때 토글 버튼 위치 */
    body.lnb-open .lnb-toggle-float {
        left: 260px;
    }
}

@media (max-width: 991.98px) {
    /* 모바일에서 LNB */
    .lnb {
        z-index: 1050;
    }

    body.lnb-open .layout-content {
        margin-left: 0;
    }

    /* 모바일에서 LNB가 열렸을 때 토글 버튼 위치 조정 */
    body.lnb-open .lnb-toggle-float {
        left: 260px;
    }
}

/* ===== GNB 드롭다운 스타일 ===== */
.navbar .dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0.5rem 0;
    z-index: 9999;
}

.navbar .dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background-color: #e3f2fd;
    color: #27272A;
}

.navbar .dropdown-item:active {
    background-color: #27272A;
    color: #fff;
}

/* ===== 테이블 스타일 ===== */
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table td a {
    color: #212529;
    text-decoration: none;
}

.table td a:hover {
    color: #27272A;
    text-decoration: underline;
}

/* ===== 카드 스타일 ===== */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* ===== 버튼 스타일 ===== */
.btn {
    border-radius: 0.375rem;
}

/* ===== 폼 스타일 ===== */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ===== Footer 스타일 ===== */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* ===== 페이지 타이틀 ===== */
.page-title {
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.5rem;
}

/* ===== 빈 상태 메시지 ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

