/* reset */
* {
    box-sizing: border-box;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;

}

@font-face {
    font-family: 'Pretendard Variable';
    font-weight: 45 920;
    font-style: normal;
    /*	font-display: swap;*/
    src: url('../../font/PretendardVariable.woff2') format('woff2-variations');
}

* {
    font-family: 'Pretendard Variable';
    box-sizing: border-box;
    color: var(--text-color);
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

body {
    line-height: 1;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

input:focus {
    outline: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 색상변수 */
:root {
    /* 기본 색상 — V2 Steel Blue 팔레트 */
    --primary-color: #234C6A;
    --primary-hover-color: #163043;
    --secondary-color: #819cbe;
    --secondary-hover-color: #6FB5B5;
    --third-color: #7B8DB8;
    --third-hover-color: #97A5CA;
    --fourth-color: #B8D0E8;
    --negative-color: #ef4444;
    --negative-hover-color: #fca5a5;
    --disabled-color: #e9ecf0;
    /* 상세정보 백그라운드 컬러 */
    --detail-bg-color: #fbfbfb;

    /* 사이드바 */
    --sidebar-color: black;
    --sidebar-hover-color: rgb(217 217 217 / 47%);

    /* 배경색 */
    --bg-color: #f9fafb;
    --light-bg-color: var(--detail-bg-color);
    --white-color: #ffffff;
    --dark-bg-color: var(--primary-color);
    --light-blue-bg: #edf3fa;

    /* 텍스트 색상 */
    --text-color: #374151;

    /* 테두리 색상 */
    --border-color: #e5e7eb;

    /* 상태별 색상 */
    --success-color: #22c55e;
    --alert-color: var(--negative-color);
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    /* 버튼 색상 */
    --button-primary-bg: var(--primary-color);
    --button-primary-text: var(--white-color);
    --button-primary-hover-bg: var(--primary-hover-color);
    --button-secondary-bg: var(--secondary-color);
    --button-secondary-text: var(--white-color);
    --button-secondary-hover-bg: var(--secondary-hover-color);
    --button-third-bg: var(--third-color);
    --button-third-text: var(--white-color);
    --button-third-hover-bg: var(--third-hover-color);
    --button-negative-bg: var(--negative-color);
    --button-negative-text: var(--white-color);
    --button-negative-hover-bg: var(--negative-hover-color);
    --button-excel-download-bg: #16a34a;
    --button-excel-download-text: var(--white-color);
    --button-excel-download-hover-bg: #15803d;
    --button-disabled-bg: var(--disabled-color);
    --button-disabled-text: var(--white-color);
    --button-disabled-hover-bg: var(--disabled-color);

    /* 흑백 계열 */
    --black-050: #ffffff;
    --black-100: #f9fafb;
    --black-150: #f3f4f6;
    --black-200: #e5e7eb;
    --black-225: #d1d5db;
    --black-250: #9ca3af;
    --black-300: #6b7280;
    --black-350: #4b5563;
    --black-400: #374151;
    --black-500: #1f2937;
    --black-600: #111827;
}

button {
    height: 36px;
    background: var(--button-primary-bg);
    color: white;
    border: 0px;
    border-radius: 8px;
    padding: 0 18px;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

button:hover {
    cursor: pointer;
    background-color: var(--button-primary-hover-bg);
}

button.secondary {
    height: 36px;
    background: var(--button-secondary-bg);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
}

button.secondary:hover {
    background: var(--button-primary-hover-bg);
}

button.third {
    height: 36px;
    background: var(--button-third-bg);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
}

button.third:hover {
    background: var(--button-third-hover-bg);
}

button.inverse {
    height: 36px;
    background: var(--white-color);
    color: var(--button-primary-bg);
    border: 1.5px solid var(--button-primary-bg);
    border-radius: 8px;
}

button.inverse:hover {
    cursor: pointer;
    background: var(--light-blue-bg);
    color: var(--button-primary-hover-bg);
    border: 1.5px solid var(--button-primary-hover-bg);
}

button.negative {
    height: 36px;
    background: var(--white-color);
    color: var(--button-negative-bg);
    border: 1.5px solid var(--button-negative-hover-bg);
    border-radius: 8px;
}

button.negative:hover {
    background: #fef2f2;
    color: var(--button-negative-bg);
    border: 1.5px solid var(--button-negative-bg);
}

button.excel-download {
    height: 36px;
    background: var(--button-excel-download-bg);
    color: var(--button-excel-download-text);
    border: none;
    border-radius: 8px;
}

button.excel-download:hover {
    background: var(--button-excel-download-hover-bg);
}

button.underline {
    text-decoration: underline;
    background: none;
    color: var(--primary-color);
    border: none;
}

button.underline:hover {
    background: none;
    color: var(--primary-hover-color);
}

button[disabled] {
    background: var(--button-disabled-bg);
    color: var(--button-disabled-text);
    border: 1px solid var(--button-disabled-bg);
}

button[disabled]:hover {
    cursor: not-allowed;
    background: var(--button-disabled-bg);
    color: var(--button-disabled-text);
    border: 1px solid var(--button-disabled-bg);
}

button.disabled {
    background: var(--button-disabled-bg) !important;
    color: var(--button-disabled-text) !important;
    border: 0px !important;
}

button.disabled:hover {
    cursor: not-allowed;
    background: var(--button-disabled-bg) !important;
    color: var(--button-disabled-text) !important;
    border: 0px !important;
}

#loading-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    background: var(--black-600);
    opacity: 0.3;
}

#loading-container #loading-bar {
    width: 30px;
}

select,
input {
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
}

/* 체크박스 디자인 */
input[type="checkbox"],
input[type="radio"] {
    display: none;
}

label .checkmark {
    display: inline-block;
    width: 15px;
    /* 15px 고정 */
    height: 15px;
    border: 1px solid var(--disabled-color);
    border-radius: 2px;
    background-color: var(--white-color);
    transition: all 0.2s;
    position: relative;
    vertical-align: middle;
}

/* hover시 투명도 0.7 */
label:hover .checkmark {
    /* opacity: 0.7; */
}

/* 체크됐을 때 */
label input[type="checkbox"]:checked+.checkmark {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

label input[type="checkbox"]:disabled+.checkmark {
    border-color: var(--disabled-color);
    background-color: var(--disabled-color);
    opacity: 0.7;
}

label .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid 1px var(--white-color);
    border-width: 0px 3px 3px 0;
    transform: rotate(45deg);
}

/* 체크됐을 때 체크 표시 보이기 */
label input[type="checkbox"]:checked+.checkmark::after {
    display: block;
}

/* 라디오 버튼 디자인 */
label .radio-mark {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 1px solid var(--disabled-color);
    border-radius: 50%;
    background-color: var(--white-color);
    transition: all 0.2s;
    position: relative;
    vertical-align: middle;
}

label:hover {
    /* opacity: 0.7; */
    cursor: pointer;
}

/* 안쪽 input이 disabled이면 hover 효과 없애기 */
label:has(input:disabled):hover {
    opacity: 1;
    cursor: default;
}

/* 체크됐을 때 */
label input[type="radio"]:checked+.radio-mark {
    border-color: var(--secondary-color);
}

/* 라디오 체크 표시 */
label input[type="radio"]:checked+.radio-mark::after {
    content: "";
    position: absolute;
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--secondary-color);
    left: 3px;
    top: 3px;
}

/* 체크박스: 체크 + disabled인 경우 */
label input[type="checkbox"]:checked:disabled+.checkmark {
    border-color: var(--secondary-hover-color);
    background-color: var(--secondary-hover-color);
    opacity: 0.7;
    /* 선택사항: 약간 흐리게 */
}

/* 라디오 버튼: 체크 + disabled인 경우 */
label input[type="radio"]:checked:disabled+.radio-mark {
    border-color: var(--secondary-hover-color);
    background-color: var(--white-color);
    opacity: 0.7;
    /* 선택사항 */
}

label input[type="radio"]:checked:disabled+.radio-mark::after {
    background: var(--secondary-hover-color);
}

select:disabled {
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}

textarea[readonly]:focus {
    outline: none;
}

.hidden {
    display: none !important;
}

/* 버튼 위에 툴팁 설명 */
.tooltip-btn {
    position: relative;
}

/*
 * 기존 CSS ::after/::before 방식은 부모에 overflow:hidden이 있으면 잘림.
 * → JS 기반 body-appended tooltip으로 대체 (xss-utils.js 참고)
 * 아래 ::after/::before 는 JS 미로드 fallback 용으로만 유지
 */

/* JS tooltip이 활성화되면 CSS fallback 숨김 */
.tooltip-js-active .tooltip-btn::after,
.tooltip-js-active .tooltip-btn::before {
    display: none !important;
}

/* CSS Fallback (JS 로드 전) */
.tooltip-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 124%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(51, 51, 51, 0.7);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: pre;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    font-size: 14px;
    z-index: 5000;
}

.tooltip-btn::before {
    content: "";
    position: absolute;
    bottom: 102%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5000;
}

.tooltip-btn:hover::after,
.tooltip-btn:hover::before {
    opacity: 1;
}

/* JS tooltip (body에 직접 붙는 요소) */
.global-tooltip {
    position: fixed;
    background-color: rgba(51, 51, 51, 0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: pre;
    font-size: 14px;
    z-index: 50000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    max-width: 300px;
}

.global-tooltip.visible {
    opacity: 1;
}

.global-tooltip-arrow {
    position: fixed;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-top-color: rgba(51, 51, 51, 0.85);
    z-index: 50000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.global-tooltip-arrow.visible {
    opacity: 1;
}

/* 전체 스크롤바 */
.contents-wrap *::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.contents-wrap *::-webkit-scrollbar-track {
    background: transparent;
}

.contents-wrap *::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.contents-wrap *::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 전체 스크롤바 */
.modal *::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.modal *::-webkit-scrollbar-track {
    background: transparent;
}

.modal *::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.modal *::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* .toast{
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    border-radius: 5px;
    padding: 15px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 10px;
    z-index: 9999;
    animation: 0.3s ease-out 0s 1 normal none running;
}
.toast-info{
    background-color: var(--info-color);
    background: rgb(209, 236, 241);
    border: 1px solid rgb(190, 229, 235);
}
.toast-success{
    background-color: var(--success-color);
    background: rgb(212, 237, 218);
    border: 1px solid rgb(195, 230, 203);
}
.toast-error{
    background-color: var(--error-color);
    background: rgb(248, 215, 218);
    border: 1px solid rgb(245, 198, 203);
}
.toast .toast-header{
    display: flex;
    align-items: center;
}
.toast .toast-header strong{
    flex: 1;
}
.toast .toast-body{
    padding-top: 10px;
}
.toast .toast-header .close{
    height: fit-content;
    background: transparent;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: -10px;
    height: fit-content;
    padding: 0;
}
.toast .toast-header .close:hover{
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    background: transparent;
} */


/* 자동 로그아웃 팝업창 */
.auto-logout-warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    font-family: inherit;
}

.auto-logout-warning-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(0, 0, 0, 0.5); */
    display: flex;
    align-items: center;
    justify-content: center;
}

.auto-logout-warning-modal .modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    max-width: 400px;
    width: 90%;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auto-logout-warning-modal .modal-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
}

.auto-logout-warning-modal .modal-header h3 {
    margin: 0;
    color: #d32f2f;
    font-size: 18px;
}

.auto-logout-warning-modal .modal-body {
    padding: 20px;
    text-align: center;
}

.auto-logout-warning-modal .modal-body p {
    margin: 10px 0;
    color: #333;
    line-height: 1.5;
}

.auto-logout-warning-modal #warning-countdown {
    font-weight: bold;
    color: #d32f2f;
    font-size: 18px;
}

.auto-logout-warning-modal .modal-footer {
    padding: 10px 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.auto-logout-warning-modal .btn-primary {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.auto-logout-warning-modal .btn-primary:hover {
    background: #4A73A5;
}

.auto-logout-warning-modal .btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.auto-logout-warning-modal .btn-secondary:hover {
    background: #4b5563;
}

.force-logout-info {
    font-size: .8rem;
    margin: 10px;
}

.force-logout-info span {
    color: var(--alert-color);
    line-height: 1rem;
}