/* 폰트 적용 강제화 */
@font-face {
    font-family: 'Pretendard';
    src: url('../font/Pretendard-Regular.woff2') format('woff2');
    font-weight: 400;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../font/Pretendard-Medium.woff2') format('woff2');
    font-weight: 500;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../font/Pretendard-Bold.woff2') format('woff2');
    font-weight: 700;
}

:root {
    /* 공통 포인트 컬러 */
    --primary: #0C8A72;
    --primary-dark: #0e8a5c;
    --bg-main: #f9fafb;
    /* Light Mode (기본) */
    /* --bg-main: #f4f7f6; */
    /* 전체 배경 */
    --bg-card: #ffffff;
    /* 본문 박스 배경 */
    --bg-sidebar: #222222;
    /* 사이드바 배경 */
    --text-main: #3E4641;
    /* 기본 글자색 */
    --text-muted: #666666;
    /* 부가 정보 글자색 */
    --border-gray: #CACACA;
    /* 테두리 색상 */
    --header-bg: #fff;
    /* 헤더 배경 */
    --bg-pill: #f1f3f2;
    --title: #3E4641;
    --tree-h: 765px;
    /*main의 높이*/
    --text-base: #333333;
    --menu-defult: #fff;
    --dept-over: #D0EFE9;
    --menu-over: #81FAE3;
    --btn-defult: #93A3A0;
    --input-border: #cacaca;
    /* 기본 테두리 */
    --input-focus: #0C8A72;
    /* 호버/포커스 시 포인트 컬러 */
    --search-btn-bg: #93a3a0;
    /* 버튼 기본 배경 */
    --search-btn-hover: #7a8a87;
    /* 버튼 호버 배경 */
    --query: #484848;
    --btn-radius: 0.25rem;
    --t-height1: 622px;
    --t-height2: 560px;
    --t-height3: 500px;
    --t-height4: 464px;
    --thead-bg: #D2E5E1;
    --date-icon-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666666' stroke-width='2'%3E%3Cpath d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E");
    --picker-scheme: light;
    --icon-color: #3E4641;
    --card-type01: #4F46E5;
    --card-type02: #F97316;
    --card-type03: #44638E;
    --btn-card-default: #777777;
    --btn-card-default-hover: #444444;
    --btn-card-danger: #C44E4E;
    --btn-card-danger-hover: #9b3a3a;
    --border-point: #72B9AD;
    --border-th: #fff;
    --warning-b: #C44E4E;
    --login-bg-image: url(../img/loginbg.png);
    --text-xs: 0.75rem;
    --text-xs--line-height: calc(1 / 0.75);
    --spacing-sidebar-width: 15.3125rem;
    --spacing-sidebar-mini: 4rem;
    --spacing-header-height: 3.5rem;
    --color-primary: #0C8A72;
    --color-secondary: #222222;
    --color-text-base: #333333;
    --color-bg-main: #f4f5f7;
    --color-white: #ffffff;
    --color-border: #cacaca;
    --border-radius: .5rem;
}

/* Dark Mode 설정 */
[data-theme='dark'] {
    --bg-main: #0f172a;
    /* 어두운 네이비 배경 */
    --bg-card: #1e293b;
    /* 카드 형태 배경 */
    --bg-sidebar: #2d3748;
    /* 사이드바 어두운 배경 */
    --text-main: #f8fafc;
    /* 밝은 글자색 */
    --text-muted: #94a3b8;
    /* 회색빛 글자색 */
    --border-gray: #334155;
    /* 어두운 테두리 */
    --header-bg: #1e293b;
    /* 헤더 어두운 배경 */
    --bg-pill: #2d3748;
    --title: #3E4641;
    --menu-defult: #fff;
    --menu-over: #81FAE3;
    --date-icon-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23cbd5e1' stroke-width='2'%3E%3Cpath d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E");
    --picker-scheme: dark;
    --icon-color: #cbd5e1;
    --card-type01: #4F46E5;
    --card-type02: #F97316;
    --card-type03: #44638E;
    --btn-card-default: #777777;
    --btn-card-default-hover: #444444;
    /* 호버 시 더 진하게 */

    /* 삭제 버튼 (#C44E4E 계열) */
    --btn-card-danger: #C44E4E;
    --btn-card-danger-hover: #9b3a3a;
    /* 호버 시 더 진하게 */
}

* {
    font-family: 'Pretendard', sans-serif !important;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Pretendard', sans-serif !important;
    background-color: var(--bg-main);
    color: var(--text-main);
    letter-spacing: -0.01em;
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 100vh;
    overflow: hidden;
    font-size: 0.875rem;
    color: var(--color-text-base);
}

html,
body,
button,
input,
select,
textarea {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    position: relative;
    display: flex;
    height: 100%;
    width: 100%;
}

select {
    /* 1. 브라우저 기본 화살표 완전히 제거 */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    /* 2. 커스텀 화살표 아이콘 (SVG) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;

    /* 3. 화살표 위치: 오른쪽에서 12px 띄우고 중앙 정렬 */
    background-position: right 12px center !important;
    background-size: 14px !important;

    /* 4. 텍스트 여백: 화살표와 겹치지 않게 오른쪽 패딩(32px) 확보 */
    padding-right: 32px !important;
    padding-left: 10px !important;

    height: 30px !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 0.5rem !important;
    font-size: 12px !important;
    background-color: #fff !important;
    color: var(--text-main) !important;
    outline: none !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out !important;

    flex: none !important;
    transition: border-color 0.25s ease-in-out,
        box-shadow 0.25s ease-in-out,
        background-color 0.25s ease-in-out;
}


select:hover,
select:focus {
    border-color: var(--input-focus) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 90%) !important;
}



input[type="checkbox"] {
    /* 1. 기본 스타일 제거 */
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    border: 1.5px solid var(--input-border) !important;
    border-radius: 0.25rem !important;
    background-color: #fff !important;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-in-out !important;
    margin: 0;
    vertical-align: middle;
}

/* 호버 시 테두리 강조 */
input[type="checkbox"]:hover {
    border-color: var(--input-focus) !important;
}

/* 체크되었을 때 스타일 */

input[type="checkbox"]:checked {
    /* 1. 배경색 농도 조절: var(--input-focus) 색상을 70% 정도의 농도로 부드럽게 변경 */
    background-color: color-mix(in srgb, var(--input-focus), transparent 20%) !important;
    border-color: var(--input-focus) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-size: 10px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 체크박스 포커스 효과 (접근성) */
input[type="checkbox"]:focus {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 85%) !important;
}

header {
    background-color: var(--header-bg) !important;
    border-bottom: 1px solid var(--border-gray) !important;
}

header .info-menu img {
    filter: brightness(0) invert(1) !important;
}


aside .bg-sidebar {
    background-color: var(--bg-sidebar) !important;
}

/* =========================================
   가변형 커스텀 셀렉트 (쫀득한 애니메이션)
   ========================================= */

.custom-select-group {
    /* 기본 사이즈 정의 */
    --select-w: 150px;
    --select-h: 30px;
    width: var(--select-w);
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

/* 1. 트리거 (버튼부) */
.custom-select-trigger {
    width: 100%;
    height: var(--select-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border: 1px solid var(--input-border) !important;
    border-radius: 0.5rem;
    background-color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

.custom-select-trigger:hover {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 85%);
}


/* 2. 옵션 리스트 (스르륵 내려오는 부분) */
.custom-options {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    background-color: #fff;
    border: 1px solid var(--input-border) !important;
    border-radius: 0.5rem;
    box-shadow: none;
    z-index: 1000 !important;
    transition: all 0.25s ease-in-out;
    transform: translateY(-10px);
    overflow: hidden;
    padding: 2px 0;
}

/* 타입 1. 기본형 (아래로 떨어짐) */
.custom-select-group:not(.is-up) .custom-options {
    top: calc(100% + 2px);
    transform: translateY(-10px);
    border-radius: 0.5rem;
}

/* 타입 2. 위로형 (클래스 is-up 추가 시) */
.custom-select-group.is-up .custom-options {
    top: auto !important;
    bottom: calc(100% + 2px);
    transform: translateY(10px);
    border-radius: 0.5rem;
}

/* 호버 시 노출 (공통) */
.custom-select-group:hover .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) !important;
}

/* Alpine.js x-cloak: 인라인 style="display:none" 방지용 */
[x-cloak] {
    display: none !important;
}

/* 3. 마우스 올렸을 때(호버) 인풋창과 완벽히 동일한 진한 초록색 효과 덮어씌우기 */
.custom-select-group:hover .custom-select-trigger,
.custom-select-trigger:focus {
    border-color: var(--input-focus) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 85%) !important;
    transition: all 0.2s ease-in-out !important;
}

.custom-select-group.is-up .custom-select-trigger {
    border-color: var(--input-focus) !important;
}

/* 화살표 회전 애니메이션 */
.custom-select-group:hover .custom-select-trigger svg {
    transform: rotate(180deg);
}

.custom-options li a {
    display: block;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-main);
    transition: all 0.2s;
    text-decoration: none;
}

.custom-options li a:hover {
    background-color: #f8fafc;
    color: var(--primary);
    font-weight: 600;
}

/* 3. 사이즈 유틸리티 클래스 */
.custom-select-group.is-lg {
    --select-w: 300px;
}

.custom-select-group.is-md {
    --select-w: 150px;
}

.custom-select-group.is-sm {
    --select-w: 100px;
}

.custom-select-group.is-xs {
    --select-w: 85px;
}

.custom-select-group.is-md2 {
    --select-w: 243px;
}

/* 소형 (페이지네이션용) */

.date-picker {
    position: relative;
    width: 135px !important;
    background-image: var(--date-icon-svg) !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 14px !important;
    padding-right: 28px !important;
    font-size: 11px !important;
    color-scheme: var(--picker-scheme) !important;
    transition: border-color 0.25s ease-in-out, box-shadow 0.25s ease-in-out, background-color 0.25s ease-in-out !important;
}

.date-picker:hover,
.date-picker:focus {
    border-color: var(--input-focus) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 90%) !important;
}

[data-theme='dark'] .date-picker {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
    z-index: 5;
}


.date-picker {
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 16px !important;
    padding-right: 30px !important;
    /* 아이콘과 텍스트 겹침 방지 */
}


input[type="date"] {
    line-height: 1.2;
    font-size: 12px;
}

/* 1600px 중앙 정렬 */
.layout-max {
    max-width: 1440px;
    width: 100%;
}

.bg-sidebar {
    background-color: var(--bg-sidebar) !important;
}

/*
.f-height {
    height: var(--tree-h);
}
*/

/*
.nav-item {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 64px;
    color: var(--menu-defult);
    font-size: 15px;
    white-space: nowrap;
    transition: color 0.25s ease-in-out, background-color 0.25s ease-in-out !important;
}

.nav-item:hover {
    color: var(--menu-over);
    opacity: 0.9;
}

.nav-item.active {
    color: var(--menu-over);
    font-weight: 700;
}


.nav-item:hover .icon-mask,
.nav-item.active .icon-mask {
    background-color: var(--menu-over);
}
*/
.info-icon1 {
    width: 22px;
    height: 26px;
}

.info-icon2 {
    width: 18px;
    height: 18px;
}

/*버튼효과 */
.btn-base {
    cursor: pointer !important;
    transition: all 0.25s ease-in-out !important;
}

.btn-search {
    background-color: #4a4a4a;
    color: white;
    padding: 10px 30px;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-search:hover {
    background-color: #333;
}



.user-info-pill {
    background-color: color-mix(in srgb, var(--bg-pill), transparent 80%);
    padding: 6px 20px;
    border-radius: 0.5rem;
    font-size: 12px;
    color: var(--menu-defult);
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.user-info-pill b {
    color: var(--menu-defult);
    margin-right: 8px;
    font-weight: normal;
}

.user-info-pill span {
    padding-left: 12px;
    border-left: 1px solid var(--border-gray);
    font-weight: 500;
}

.status-tag {
    padding: 2px 12px;
    border-radius: 0.5rem;
    font-size: 11px;
    color: white;
    font-weight: 500;
}

.status-active {
    background-color: #2a85ff;
}


.status-inactive {
    background-color: #999999;
}


section .flex-1 {
    transition: background-color 0.3s, border-color 0.3s;
}


[data-theme='dark'] input,
[data-theme='dark'] select {
    background-color: #1e293b;
    border-color: var(--border-gray);
    color: var(--text-main);
}


[data-theme='dark'] header button {
    background-color: transparent !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

[data-theme='dark'] header button img {
    filter: invert(1) brightness(2);
    transition: filter 0.3s ease;
}


[data-theme='dark'] .nav-item .icon-mask {
    background-color: var(--text-main);

}

[data-theme='dark'] .nav-item:hover .icon-mask,
[data-theme='dark'] .nav-item.active .icon-mask {
    background-color: var(--primary);

}

.footer-copy {
    font-size: 11px !important;
    color: #999999;
    text-align: center;
    text-transform: uppercase;
}

.h-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--title);
}


.tree-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

/* 2차 메뉴 기본 스타일 */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 170px;
    background-color: var(--header-bg);
    border-left: 1px solid var(--border-gray);
    border-right: 1px solid var(--border-gray);
    border-bottom: 3px solid var(--primary);
    border-radius: 0.5rem;
    padding: 8px 0;
    box-shadow: none;
    z-index: 100;
    /* 애니메이션 초기 상태: 숨김 + 살짝 아래로 내려가 있음 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 호버 시 2차 메뉴 노출 */
.group:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 2차 메뉴 아이템 스타일 */
.sub-menu li a {
    display: block;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--menu-defult);
    text-decoration: none;
    transition: all 0.25s ease-in-out !important
}


.sub-menu li a:hover {
    background-color: var(--bg-main);
    color: var(--primary);
    /* padding-left: 24px; */
}


[data-theme='dark'] .sub-menu {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}


.sidebar-container {
    /* 1. 디자인 (배경, 테두리, 모서리) */
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-gray);
    border-radius: 0.5rem;

    /* 2. 레이아웃 뼈대 (너비, 정렬) */
    width: 265px;
    display: flex;
    flex-direction: column;

    /* 3. 높이 꽉 채우기 & 넘침 방지 (이번 수정의 핵심!) */
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sidebar-header {
    background-color: var(--bg-sidebar) !important;
    padding: 15px;
    flex: none;
}

.sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 32px;
}

.sidebar-search-area {
    padding: 15px;
    flex: none;
}

.sidebar-search-area .flex {
    gap: 5px !important;
}

.sidebar-add-btn {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);

}

.sidebar-search-area {
    padding: 15px;
    flex: none;
}


.sidebar-search-area .tree-search-input {
    flex: 1 !important;
}

/* 인풋 호버 및 포커스 시 테두리 색상 변경 */
.tree-search-input:hover,
.tree-search-input:focus {
    border-color: var(--input-focus) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 85%);
}


.tree-search-btn {
    flex-shrink: 0;
    width: 30px !important;
    height: 30px !important;
    background-color: var(--search-btn-bg);
    border: none;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.tree-search-btn:hover {
    background-color: var(--search-btn-hover);

}


.tree-scroll-container {
    flex: 1;
    padding: 0 15px 15px 15px;
    overflow: hidden;
}

.tree-content-inner {
    height: 100%;
    overflow-y: auto;

}

.text-13 {
    font-size: 13px !important;
}


.tree-content-inner::-webkit-scrollbar {
    width: 4px;
}

.tree-content-inner::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.7rem;
}



.section-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-gray);
    border-radius: 0.7rem;
    padding: 13px 20px;
    margin-bottom: 15px;
}

.search-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 12px 20px;
}

.section-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}




/* 1. 테이블 컨테이너 내부 구조 */
.table-container-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-gray);
    /* height: var(--t-height1) !important; */
    /* min-height: var(--t-height1); */
    display: flex;
    border-radius: 0.7rem;
    flex-direction: column;
    overflow: hidden;
    position: relative;

}

.table-container-pop-card {
    background-color: var(--bg-card) !important;
    /* border: 1px solid var(--border-gray); */
    /* border-top: 1px solid var(--border-point); */
    height: var(--t-height3) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;

}


.table-container-pop-card2 {
    background-color: var(--bg-card) !important;
    /* border: 1px solid var(--border-gray); */
    /* border-top: 1px solid var(--border-point); */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;

}



/*thead 에 스크롤 안보이게 막기*/
.scrollbar-mask {
    position: absolute;
    top: 1px;
    right: 0px;
    width: 5px;
    height: 40px;
    background-color: var(--thead-bg) !important;
    z-index: 15;
   border-radius: 0 0.5rem 0 0;/* 순서: 왼쪽위 오른쪽위 오른쪽아래 왼쪽아래 */
   border-bottom: 1px solid var(--border-gray) !important;
}

.scrollbar-mask2 {
    position: absolute;
    top: -1px;
    right: 0px;
    width: 5px;
    height: 37px;
    background-color: var(--thead-bg) !important;
    z-index: 15;

}

.scrollbar-mask3 {
    position: absolute;
    top: 1px;
    right: 0px;
    width: 5px;
    height: 39px;
    background-color: var(--thead-bg) !important;
    z-index: 15;
   border-radius: 0 0.5rem 0 0;/* 순서: 왼쪽위 오른쪽위 오른쪽아래 왼쪽아래 */
   border-bottom: 1px solid var(--border-gray) !important;
}


.table-scroll-area {
    flex: 1;
    overflow-y: auto;
    scrollbar-gutter: stable;
    /* 스크롤바 공간 미리 확보하여 정렬 유지 */
}




.main-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;

}

/* 헤더 고정 (Sticky) 및 배경색 */
.main-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--thead-bg) !important;
    height: 40px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    padding: 0 10px;
    border-bottom: 1px solid var(--border-gray) !important;
}

/* 3. 본문 스타일 및 스크롤바 디자인 */
.main-table tbody td {
    height: 43px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #555555;
}

.table-scroll-area::-webkit-scrollbar {
    width: 5px;
}

.table-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.table-scroll-area::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
}

.main-table tbody tr:nth-child(even) {
    background: #f7f7f7 !important;
}


.main-table tbody tr:hover {
    background-color: #f8fafc;
    cursor: pointer;
}

.main-table tbody tr:nth-child(even):hover {
    background-color: #f8fafc;
}



/* 부서명 등 텍스트 왼쪽 정렬이 필요한 경우 */
.td-left {
    text-align: left !important;
}

/* 3. 상태 배지 (사용중/미사용) */
.badge {
    display: inline-block;
    width: 55px;
    text-align: center;
    padding: 5px 0;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    line-height: 1;
}

.badge-use {
    background-color: #ff8a5d;
}

/* 사용중 */
.badge-unuse {
    background-color: #94a3b8;
}

.badge-default {
    background-color: #6366f1;
    width: auto;
    padding: 5px 8px;
}

/* 미사용 */

/* 4. 테이블 내 아이콘 버튼 
.btn-table-icon {
    width: 25px;
    height: 25px;
    background-color: var(--btn-defult);
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-table-icon:hover {
    background-color: #7a8a87;
}

.btn-table-icon img {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
}
*/

.btn-table-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;

    /* 1. 배경은 하얀색으로 확실히 채우기 */
    background-color: #ffffff !important;

    /* 2. 테두리는 눈에 보이는 연한 회색으로 (참고 이미지 스타일) */
    border: 1px solid #d1d5db !important;

    /* 3. 투명도 제거 (쨍하게 보이도록) */
    opacity: 1 !important;

    /* 4. 아이콘을 하얀색으로 만들던 필터 제거 (원래 어두운색 유지) */
    filter: none !important;

    transition: all 0.2s ease-in-out;
}

/* 내부 아이콘 이미지 살짝 연하게 (세련된 느낌) */
.btn-table-icon img {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* 마우스 올렸을 때 (초록색 포인트) */
.btn-table-icon:hover {
    border-color: var(--primary) !important;
    /* 테두리가 초록색으로 */
    background-color: #f0fdfa !important;
    /* 배경은 아주 연한 초록빛으로 */
}

.btn-table-icon:hover img {
    opacity: 1;
    /* 아이콘도 진해짐 */
}

/* 삭제 버튼은 특별히 빨간색 느낌 유지 */
.btn-table-icon.btn-delete:hover {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.btn-table-icon.btn-delete:hover img {
    /* 테두리 색상(#ef4444)과 똑같은 빨간색을 만들어주는 마법의 필터입니다 */
    filter: invert(39%) sepia(48%) saturate(4051%) hue-rotate(338deg) brightness(100%) contrast(92%) !important;
    opacity: 1 !important; /* 흐릿함 없이 선명하게 */
}

.tree-search-input,
.filter-select {
    height: 30px !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 0.5rem !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    font-weight: 500;
    outline: none !important;
    background-color: #fff !important;
    transition: all 0.2s ease-in-out !important;
    flex: none !important;
}

.text-box {
    height: 60px !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 0.5rem !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    font-weight: 500;
    outline: none !important;
    background-color: #fff !important;
    transition: all 0.2s ease-in-out !important;
    flex: none !important;
}

.text-box:hover,
.text-box:focus,
.tree-search-input:hover,
.tree-search-input:focus,
.filter-select:hover,
.filter-select:focus {
    border-color: var(--input-focus) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 90%) !important;
}

.tree-search-input:read-only {
    cursor: pointer;
}



.search-filter-row {
    display: flex;
    align-items: flex-end;
    /* 라벨 아래로 정렬 맞춤 */
    gap: 15px;
    /* 요소 간 간격 */
}

/* 인풋 사이즈별 클래스 */
.w-input-lg {
    width: 300px !important;
}

/* 부서명용 */
.w-input-md {
    width: 150px !important;
}

/* 사용여부용 */

.label-txt {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-main);
    margin-bottom: 8px;
    display: block;
}

.btn-query {
    background-color: var(--query);
    color: #fff;
    min-width: 70px;
    height: 30px !important;
    padding: 0 12px;
    border-radius: 0.5rem !important;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border: none;
    margin-left: auto;
}

/* 내부 아이콘 크기 고정 (w-3.5 h-3.5 대체) */
.btn-query img {
    width: 14px;
    height: 14px;
}

/* 호버 효과 (기존 유지) */
.btn-query:hover {
    background-color: #333 !important;
}


.btn-reg {
    background-color: var(--primary);
    color: #fff;
    padding: 0 10px;
    height: 30px;
    border-radius: 0.5rem;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 500;
}


.btn-reg,
.btn-del {
    cursor: pointer;
    transition: all 0.2s ease-in-out !important;
}

/* 2. 등록 버튼(초록색) 호버 효과 */
.btn-reg:hover {
    background-color: var(--primary-dark, #0e8a5c) !important;
    box-shadow: 0 4px 6px -1px rgba(17, 163, 109, 0.3) !important;
    /* 초록색 그림자 */
}


.btn-del:hover {
    background-color: var(--search-btn-hover, #7a8a87) !important;
    box-shadow: 0 4px 6px -1px rgba(147, 163, 160, 0.3) !important;
    /* 회색 그림자 */
}

.w-select-page {
    width: 100px !important;
}

.info-txt {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
}

.info-txt2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.info-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #9C9C9C;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.info-icon-box img {
    width: 12px;
    height: 12px;
    filter: brightness(0) invert(1);
    /* 아이콘을 흰색으로 */
}

.pop-info-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: #9C9C9C;
    border-radius: 0.4rem;
    flex-shrink: 0;
}

.pop-info-icon-box img {
    width: 15px;
    height: 15px;
    filter: brightness(0) invert(1);

}

.warning-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: var(--warning-b);
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.warning-icon-box img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);

}

.warning-txt1 {
    color: var(--warning-b);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.01em;
}


.btn-reg img,
.btn-del img {
    width: 14px;
    height: 14px;
    margin-right: 2px;
    filter: brightness(0) invert(1);

}



.btn-del {
    background-color: var(--btn-defult);
    color: #fff;
    padding: 0 10px;
    height: 30px;
    border-radius: 0.5rem;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 500;
}


.label-txt {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-main);
}

.td-l {
    text-align: left;
    padding-left: 10px;
}

.td-c {
    text-align: center;
}

.td-r {
    text-align: right;
    padding-right: 10px;
}

/* 5. 페이지네이션 영역 */
.pagination-area {
    height: 40px;

    /* border-top: 1px solid var(--border-gray); */
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;

}



.pagination-area button {
    font-size: 11px;
    border: 1px solid var(--input-border);
    color: #45584c;
    border-radius: 0.4rem;
    height: 25px;
    line-height: 18px;
    padding: 4px 0 6px 0;
}

.pagination-area button:hover {
    background-color: #D9D9D9;
}

.pagination-area button.active {
    background-color: #A3AEA7;
    color: #fff;
}

.scenario-content-area {
    flex: 1;
    /* 검색창/액션바를 뺀 나머지 아래 공간을 꽉 채움 */
    background-color: var(--bg-card);
    border: 1px solid var(--border-gray);
    border-radius: 0.5rem;

    /* overflow-y: auto; */
    /* 내용 많아지면 여기서만 스크롤 */
}


.card-h {
    height: var(--t-height2) !important;
    /* 560px */
    overflow-y: auto !important;
    padding: 20px;
    background-color: var(--bg-card);
    scrollbar-width: none !important;
    border-radius: 0.5rem;
}

/* 1. 그리드 컨테이너 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* 2. 카드 기본 스타일 */
.scenario-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-gray);
    border-radius: 0.7rem;
    padding: 14px;
    position: relative;
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
    min-height: 135px;
    margin-bottom:20px;
}

.scenario-card:hover {
    /*  border-right:1px solid #E36666;
    border-top:1px solid #E36666;
    border-bottom:1px solid #E36666;*/
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease-in-out !important;
}

.scenario-card.card-type-menu:hover {
    border-color: var(--card-type01) !important;
}

/* 호통계 안내 타입 (주황) */
.scenario-card.card-type-phone:hover {
    border-color: var(--card-type02) !important;
}

/* 음원 안내 타입 (네이비) */
.scenario-card.card-type-audio:hover {
    border-color: var(--card-type03) !important;
}

/* 3. 호버 시 버튼 내부 아이콘 색상도 함께 변화 (선택 사항) */
.scenario-card:hover .btn-card {
    border-color: rgba(0, 0, 0, 0.1);
    /* 버튼 테두리도 자연스럽게 매칭 */
}


/* 3. 카드 타입별 왼쪽 포인트 컬러 */
.card-type-menu {
    border-left: 3px solid var(--card-type01) !important;
}

.card-type-phone {
    border-left: 3px solid var(--card-type02) !important;
}

.card-type-audio {
    border-left: 3px solid var(--card-type03) !important;
}

/* 4. 카드 상단 (배지 & 체크박스) */
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* 5. 카드 본문 (아이콘 & 타이틀) */
.card-body-content {
    flex: 1;
}

.card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 2px;
}

.card-main-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--card-type01);
    line-height: 1.2;
}

.card-type-phone .card-main-title {
    color: var(--card-type02);
}

.card-type-audio .card-main-title {
    color: var(--card-type03);
}

.card-date-info {
    font-size: 11px;
    color: var(--text-muted);
    padding-left: 0px;
    margin-top: 0;
}

/* 6. 카드 하단 버튼 영역 */
.card-footer-btns {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.card-btn-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.btn-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    white-space: nowrap;
    height: 30px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background-color: var(--bg-card);
    color: var(--text-main);
    font-size: 13px;
}

.btn-card:hover {
    color: var(--btn-card-default-hover) !important;
    border-color: var(--btn-card-default-hover) !important;
    background-color: rgba(0, 0, 0, 0.03);
    /* 배경만 미세하게 어두워짐 */
}

.btn-card-del {
    color: var(--btn-card-danger) !important;
    border-color: var(--btn-card-danger) !important;
}

.btn-card-del:hover {
    color: var(--btn-card-danger-hover) !important;
    border-color: var(--btn-card-danger-hover) !important;
    background-color: rgba(196, 78, 78, 0.05);
    /* 미세한 붉은기 배경 */
}


/* 버튼 아이콘용 필터 (#777 및 #C44E4E 대응) */
.icon-btn-default {
    filter: invert(48%) sepia(0%) saturate(0%) hue-rotate(176deg) brightness(92%) contrast(88%) !important;
    opacity: 1 !important;
    /* ⭐ 흐릿한 현상 제거 */
}

.icon-btn-danger {
    filter: invert(36%) sepia(45%) saturate(1251%) hue-rotate(315deg) brightness(91%) contrast(89%) !important;
    opacity: 1 !important;
    /* ⭐ 빨간색 선명하게 */
}

/* 호버 시 아이콘도 같이 진해지도록 처리 */
.btn-card:hover .btn-icon-img {
    filter: brightness(0.6) !important;
    /* 기본보다 더 어둡고 진하게 */
}

.btn-card-del:hover .btn-icon-img {
    filter: invert(36%) sepia(45%) saturate(1251%) hue-rotate(315deg) brightness(75%) contrast(89%) !important;
}

/* 7. 아이콘 마스크 설정 (색상 변경용) */
.card-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: var(--icon-color);
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;

    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;

    flex-shrink: 0;
    transition: background-color 0.25s ease;
}

.btn-icon {
    width: 13px;
    height: 13px;
}

.card-icon-img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-icon-img {
    width: 13px;
    height: 13px;
    margin-right: 3px;
}

/* 2. 컬러 필터 클래스 (시안의 색상을 정확히 구현) */
.icon-purple {
    filter: invert(24%) sepia(91%) saturate(4155%) hue-rotate(243deg) brightness(91%) contrast(95%);
}

.icon-orange {
    filter: invert(53%) sepia(85%) saturate(2236%) hue-rotate(352deg) brightness(101%) contrast(97%);
}

.icon-cyan {
    filter: invert(37%) sepia(35%) saturate(762%) hue-rotate(176deg) brightness(92%) contrast(87%) !important;
}

.icon-gray {
    filter: brightness(0);
    opacity: 0.4;
}



.card-h::-webkit-scrollbar {
    width: 5px !important;
    display: block !important;
}

/* 2. 스크롤바 트랙 */
.card-h::-webkit-scrollbar-track {
    background: transparent !important;
}

.card-h::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25) !important;
    border-radius: 10px !important;
}


[data-theme='dark'] .card-h::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}




.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-container {
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #aaa;
    overflow: visible !important;
    height: auto !important;

}



.modal-sm {
    width: 520px;
}

.modal-md {
    width: 600px;
}

.modal-lg {
    width: 1000px;
}

.alert-md {
    width: 480px;
}

.modal-header {
    background-color: var(--primary);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
    border-radius: 10px 10px 0 0;
}



.modal-body {
    flex: none !important;
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
    /* 스크롤은 절대 안 생기게! */
    padding: 20px !important;
    background-color: #f8fafc !important;
    position: relative !important;
}



.modal-header h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-body h3 {
    font-size: 14px;
    letter-spacing: -0.02em;
}

/* 다크모드 대응 */
[data-theme='dark'] .modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* 셀렉트 박스 위로 열기 스타일 */
.custom-select-group.is-up .custom-options {
    top: auto !important;
    bottom: calc(100% + 5px) !important;
    transform: translateY(10px) !important;
}

.custom-select-group.is-up:hover .custom-options {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 90%) !important;
}



.custom-options {
    z-index: 100 !important;
}

.w-90 {
    width: 90%;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid var(--border-point);
    border-bottom: 1px solid var(--border-gray);
    background: #fff;
}

.form-table th {
    width: 140px;
    background-color: var(--thead-bg);
    padding: 10px 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-th);
    color: var(--text-main);
}

.last-th {
    border-bottom: 1px solid var(--border-gray) !important;
}

.form-table td {
    padding: 6px 15px;
    border-bottom: 1px solid var(--border-gray);
    font-size: 12px;
    font-weight: 500;
}

/* 필수 항목 표시 (*) */
.required::after {
    content: ' *';
    color: #EF4444;
    margin-left: 2px;
}

.inblock-gap {
    display: inline-block;
    margin-left: 3px;
}

/* 5. 모달 푸터 */
.modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #f8fafc;
    border-radius: 0px 0 10px 10px;
    border-top: 1px solid var(--border-gray);
}

/* 인풋 그룹 (버튼 일체형) */
.input-group {
    display: flex;
    gap: 4px;
    align-items: center;
}



/* =========================================
   얼럿(Alert) 창 전용 스타일
   ========================================= */

/* 얼럿창 컨테이너 */
.alert-container {
    position: relative;
    /* 상단 아이콘 배치를 위해 필요 */
    background-color: var(--bg-card);
    /* 다크모드 자동 대응 */
    border-radius: 20px;
    /* 시안의 둥근 모서리 구현 */
    padding: 50px 30px 30px 30px;
    /* 상단 패딩을 넓게 주어 아이콘 공간 확보 */
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
    /* 기존 테두리 스타일 유지 */
}

/* 상단 원형 아이콘 래퍼 (박스 밖으로 돌출) */
.alert-icon-wrapper {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    /* 가운데 정렬 */
    width: 100px;
    height: 100px;
    background-color: var(--primary);
    /* 초록색 배경 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 10px solid var(--bg-card);
}

.alert-icon-wrapper2 {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    /* 가운데 정렬 */
    width: 100px;
    height: 100px;
    background-color: var(--btn-card-danger);
    /* 초록색 배경 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 10px solid var(--bg-card);
}


/* 상단 체크 아이콘 (흰색 적용) */
.alert-icon-mask {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #fff;
    /* 아이콘 색상 */
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* 메인 메시지 */
.alert-message-main {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    /* 다크모드 대응 */
    margin-top: 20px;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* 강조 텍스트 (빨간색) */
.text-warning {
    color: var(--warning-b);
    /* 기존 빨간색 변수 활용 */
}

/* 서브 메시지 박스 (회색 배경) */
.alert-sub-box {
    background-color: var(--bg-main);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
    word-break: keep-all;
}

.alert-warning-footer {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #333;
    text-align: left;
    line-height: 1.4;
}


.alert-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #FF8A00;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0;
    position: relative;
}


.alert-warning-icon::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-color: #fff;
    -webkit-mask-image: url('../img/icon/b-warning.svg');
    mask-image: url('../img/icon/b-warning.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.alert-btn-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.alert-btn {
    padding: 10px 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.alert-btn-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    /* 버튼 텍스트 색상 상속 (흰색) */
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}


[data-theme='dark'] .alert-icon-wrapper {
    border-color: var(--bg-card);
    /* 다크모드 배경색에 맞춰 테두리 색상 변경 */
}



@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .user-info-pill {
        display: none !important;
    }

    header .layout-max {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .nav-item {
        padding: 0 8px !important;
        font-size: 14px;
    }

    .section-card {
        padding: 20px;
    }

    .w-input-lg {
        width: 100% !important;
        max-width: 400px;
    }

    .login-container {
        flex-direction: column;
        justify-content: center !important;
        padding-top: 0 !important;
        min-height: 100vh;
        gap: 40px;
    }

    .brand-section {
        margin-bottom: 0 !important;
        text-align: center;
        flex: none;
    }

    .brand-section .login-logo {
        height: 60px;
        margin: 0 auto 15px auto;
    }

    .brand-section p {
        font-size: 14px;
        color: var(--text-muted);
        word-break: keep-all;
    }

    .login-box {
        width: 100%;
        max-width: 440px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .login-container {
        padding-top: 50px;
    }

    .brand-section {
        margin-bottom: 40px;
    }

    .login-box {
        padding: 40px 30px;
        border-radius: 15px;
    }
}



.btn-sort-toggle {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 4px !important;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

/* 마우스 올렸을 때만 테두리 강조 */
.btn-sort-toggle:hover {
    border-color: var(--primary) !important;
}

.icon-switcher {
    position: relative;
    width: 18px;
    height: 18px;
}

.sort-icon-mask {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
    width: 18px;
    height: 18px;

    background-color: var(--text-muted);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;

    transition: opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
        background-color 0.2s ease;
}


.btn-sort-toggle:hover .sort-icon-mask {
    background-color: var(--primary);
}



.icon-asc {
    -webkit-mask-image: url('../img/icon/b-asc.svg');
    mask-image: url('../img/icon/b-asc.svg');
    opacity: 1;
    transform: scale(1);
}

.icon-desc {
    -webkit-mask-image: url('../img/icon/b-desc.svg');
    mask-image: url('../img/icon/b-desc.svg');
    opacity: 0;
    transform: scale(0.8);
}



.btn-sort-toggle.is-desc .icon-asc {
    opacity: 0;
    transform: scale(0.8);
}

.btn-sort-toggle.is-desc .icon-desc {
    opacity: 1;
    transform: scale(1);

}

/* =========================================
   Alpine.js 전용 트랜지션 (x-transition:enter 등)
   ========================================= */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease-in-out !important;
}

.fade-enter-start,
.fade-leave-end {
    opacity: 0 !important;
}

.fade-enter-end,
.fade-leave-start {
    opacity: 1 !important;
}

/* 드롭다운용 트랜지션 (x-transition:enter 등) */
.dropdown-fade-enter-active {
    transition: all 0.1s ease-out !important;
}

.dropdown-fade-leave-active {
    transition: all 0.1s ease-in !important;
}

.dropdown-fade-enter-start,
.dropdown-fade-leave-end {
    opacity: 0 !important;
    transform: translateY(-8px) !important;
}

.dropdown-fade-enter-end,
.dropdown-fade-leave-start {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 인풋 호버 및 포커스 시 테두리 색상 변경 */
.search-input:hover,
.search-input:focus {
    border-color: var(--input-focus) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), transparent 85%);
}


.search-btn {
    flex-shrink: 0;
    width: 30px !important;
    height: 30px !important;
    background-color: var(--search-btn-bg);
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.search-btn:hover {
    background-color: var(--search-btn-hover);

}

.form-group label {
    font-size: 12px;
    white-space: nowrap;
    color: var(--text-base);
    font-weight: 600;
}

.empty-td-t4 {
    height: var(--t-height4) !important;
}

#loading-overlay {
    background: white;
}


.card-footer-btns .btn-edit.is-used {
    background-color: #f3f4f6 !important;
    color: #94a3b8 !important;
    border-color: #e5e7eb !important;
    cursor: default !important;
}

.card-footer-btns .btn-edit.is-used:hover {
    background-color: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #94a3b8 !important;
}

.card-footer-btns .btn-edit.is-used .btn-icon-img {
    filter: grayscale(1) opacity(0.5) !important;
}

/* jsTree 미사용 그룹 스타일 */
li.jstree-unuse>a.jstree-anchor {
    color: #adb5bd !important;
}

.full-size {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    padding-bottom: 18px;
    min-width: 0;
    overflow: visible !important;
}

/*
.btn-login:hover {
    background-color: var(--primary-dark);
}

.btn-login {
    background-color: var(--primary);
    color: #fff;
    height: 48px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
    cursor: pointer;
    border: none;
}

*/

/* =========================================
   새로운 로그인 페이지 전용 스타일 (시안 반영)
   ========================================= */

/* 1. 전체 도화지 (화면 꽉 채우기) */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 💡 핵심: 100vh 대신 아래 두 줄로 남은 공간만 꽉 채웁니다 */
    height: 100%;
    flex: 1; 
    
    /* background-color: #f5f5f5; */
    padding: 20px;
    box-sizing: border-box;
}

/* 다크모드 대응 */
[data-theme='dark'] .login-wrapper {
    background-color: #0f172a;
}

/* 2. 메인 카드 (반반 나뉘는 하얀 박스) */
.login-card {
    display: flex;
    /* width: 100%; */
    width: 720px;
    /* 시안 비율에 맞춘 너비 */
    min-height: 400px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* 부드럽고 큰 그림자 */
    overflow: hidden;
}

/* 3. 왼쪽 초록색 영역 */
.login-left {
   position: relative;
    width: 350px;

    background-color: var(--primary); 
    background-image: url('../img/left-bg.png');
    background-repeat: no-repeat; /* 반복 방지 필수 */
    background-position: right 0px bottom 15px !important;
    
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}


.left-content {
    position: relative;
    z-index: 10;
    color: #ffffff;
}

.left-content .login-logo {
    /* height: 24px; */
    margin-bottom: 15px;
}

.left-content h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.left-content p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    opacity: 0.9;
}

/* 4. 오른쪽 하얀색 폼 영역 */
.login-right {
    position: relative;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff url('../img/login-rightbg.png') no-repeat;
   background-position: right top 20px;
}

[data-theme='dark'] .login-right {
    background-color: var(--bg-card);
}

/* 우측 상단 점 패턴 
.bg-pattern-right {
    position: absolute;
    top: 20px;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: url('../img/login-rightbg.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top right;
    pointer-events: none;
}
*/
.right-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    /* 폼을 중앙에 정렬 */
}

.right-content h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    color: #444444 !important; /* 💡 텍스트 색상 #444 적용 */
    margin-bottom: 20px;
}

[data-theme='dark'] .right-content h2 {
    color: #ffffff;
}

.login-title-icon {
    width: 22px;
    height: 22px;
    /* 💡 이미지(SVG) 색상을 텍스트와 똑같은 #444 느낌으로 맞추는 필터 */
    filter: invert(26%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(96%) contrast(88%) !important;
}
/* 5. 폼 요소 스타일 */
.input-group-login {
    margin-bottom: 15px;
}

.login-input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    padding: 0 15px;
    font-size: 14px;
    color: var(--text-main);
    background-color: transparent;
    outline: none;
    transition: all 0.2s;
}

.login-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary), transparent 85%);
}

.login-input::placeholder {
    color: #a0aab5;
}

/* 비밀번호 아이콘 래퍼 */
.pw-input-wrapper {
    position: relative;
}

.pw-input-wrapper .login-input {
    padding-right: 40px;
    /* 아이콘을 위한 우측 여백 확보 */
}

.pw-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.4;
    pointer-events: none;
    /* 클릭 방해 금지 */
}

/* 에러 메시지 */
.error-msg {
    margin-top: 6px;
    font-size: 12px;
    color: #EF4444;
}

/* 6. 로그인 버튼 (시안의 다크그레이 색상) */
/* 3. 로그인 버튼 배경색 변경 (#333) */
.btn-login-new {
    width: 100%;
    height: 48px;
    background-color: #333333 !important; /* 💡 기본 배경색 #333 적용 */
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    margin-top: 10px;
}

/* 로그인 버튼 마우스 올렸을 때 (호버) 효과 */
.btn-login-new:hover {
    background-color: #222222 !important; /* 호버 시 조금 더 어두운 #222로 */
}

/* 7. 모바일 (태블릿 이하) 반응형 - 깔끔하게 일렬로 쌓기 */
@media (max-width: 768px) {
    .login-wrapper {
        padding: 15px;
    }

    .login-card {
        flex-direction: column;
        /* 세로 정렬 */
        min-height: auto;
    }

    .login-left {
        width: 100%;
        padding: 40px 30px;
        text-align: center;
        /* 텍스트 가운데 정렬 */
    }

    .left-content .login-logo {
        margin: 0 auto 15px auto;
        /* 로고 중앙 정렬 */
    }

    .bg-pattern-left,
    .bg-pattern-right {
        display: none;
        /* 모바일에서는 지저분할 수 있으니 패턴 숨김 */
    }

    .login-right {
        width: 100%;
        padding: 40px 30px;
    }
}

