* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
}

.chat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-th {
    width: 130px !important;
}

.chat-item i {
    margin-left: 8px;
}

.chat-banner-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.toggle-category {
    color: #000 !important;
}

.chat-side-banner {
    flex: 0 0 calc(50% - 5px);
    /* 한 줄에 2개 */
    text-align: center;
}

.chat-side-banner img {
    width: 100%;
    max-width: 100%;
    /* 컨테이너 안에서 꽉 채우기 */
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.ai-message.markdown-body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    background-color: #fefefe;
    max-width: 768px;
    padding: 0px;
}

.ai-message.markdown-body h3 {
    font-size: 20px;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #002060;
    border-left: 4px solid #002060;
    padding-left: 10px;
}

.ai-message.markdown-body h4 {
    font-size: 17px;
    margin-top: 16px;
    margin-bottom: 8px;
    color: #003366;
}

.ai-message.markdown-body ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.ai-message.markdown-body ul ul {
    margin-top: 4px;
    margin-bottom: 4px;
}

.ai-message.markdown-body li {
    margin-bottom: 6px;
}

.ai-message.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    margin-bottom: 24px;
    font-size: 15px;
}

.ai-message.markdown-body th,
.ai-message.markdown-body td {
    border: 1px solid #ccc;
    padding: 10px 12px;
    text-align: left;
}

.ai-message.markdown-body th {
    background-color: #f0f4f8;
    font-weight: 600;
}

.ai-message.markdown-body strong {
    color: #001F3F;
}

.ai-message.markdown-body p {
    margin-bottom: 16px;
}

@media screen and (max-width: 768px) {
    .ai-message.markdown-body {
        font-size: 15px;
        padding: 20px;
    }

    .ai-message.markdown-body h3 {
        font-size: 18px;
    }

    .ai-message.markdown-body table th,
    .ai-message.markdown-body table td {
        font-size: 14px;
        padding: 8px;
    }
}

.ai-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.ai-text th,
.ai-text td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.ai-text h3,
.ai-text h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.markdown-body p,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6,
.markdown-body ul,
.markdown-body ol,
.markdown-body li,
.markdown-body table,
.markdown-body blockquote {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.5;
}



/* 제목(h3) 위 공백만 약간 주고 아래는 거의 없음 */
.ai-message h3 {
    font-size: 17px;
    margin: 0px 0 0px;
    color: #002060;
}

/* 리스트 초기화 */
.ai-message ul,
.ai-message ol {
    list-style: none;
    margin: 4px 0;
    padding-left: 0;
}

/* 리스트 마커 제거 */
.ai-message li::marker {
    content: '';
}

/* 리스트 항목 간격 */
.ai-message li {
    margin: 2px 0;
    padding-left: 0;
}

/* 표 */
.ai-message table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 14px;
}

.ai-message th,
.ai-message td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: left;
}

.ai-message thead {
    background-color: #f1f1f1;
}

.ai-message hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 8px 0;
}

.ai-message p>strong {
    font-size: 18px;
    color: #001F3F;
}

.ai-message ul>li {
    font-size: 16px;
    color: #444;
    margin-bottom: 0.5em;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-size: unset;
    font-family: "Pretendard", sans-serif;
}

.user-file-label {
    align-self: flex-end;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    color: #333;
    display: inline-block;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    max-width: 90%;
    padding: 8px 14px;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

.user-file-label a {
    color: #0074D9;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.95rem;
    color: #333;
    min-width: 1260px;
    /* 테이블 최소 너비 PC 기준 1260px */
}

table th,
table td {
    padding: 10px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    /* 텍스트 줄바꿈 방지 */
}

table th {
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f7ff;
}

.user-file-label a:hover {
    text-decoration: underline;
}

.pdf-icon {
    width: 30px;
    height: 30px;
}

.footer_margin {
    margin-top: 0px !important;
}

html {}

ol,
ul {
    padding-left: 0 !important;
    margin-left: 0;
}

.container-fluid {
    padding: 0;
    display: flex;
    height: 100vh;
}

#content {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

#sidebar {
    position: absolute;
    /* 추가 */
    top: 0px;
    left: 0;
    height: 100%;
    background-color: #f8f9fa;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* scroll → auto 권장 */
    width: 250px;
    /* 필요하면 고정 너비 지정 */
}

#sidebar::-webkit-scrollbar {
    display: none;
}

#sidebar.collapsed {
    width: 80px !important;
}

.new-chat-btn {
    padding: 8px 8px 8px 8px;
}

.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    padding: 10px 0px;
    box-sizing: border-box;
}

.chat-history2 {
    flex-grow: 1;
    /* 남는 공간 차지 */
    padding: 15px;
}

.sidebar-menu {
    margin-top: auto;
    /* 아래로 밀기 */
    padding-top: 10px;
}

.chat-banner-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chat-side-banner {
    width: calc(50% - 4px);
    /* 2개씩 줄바꿈 */
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.money-input {
    font-size: 12px !important;
}

.chat-side-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.table-title {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    text-align: center;
    background-color: #DBEBE7;
}

.new-chat-btn .btn-primary {
    width: 100%;
    padding: 10px;
    background-color: #1C2252;
    border-color: #1C2252;
    transition: background-color 0.3s ease;
}

.new-chat-btn .btn-primary:hover {
    background-color: #2E347F;
    border-color: #2E347F;
}

.chat-history {
    overflow-y: scroll;
    height: 100%;
}

.chat-history::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-track {
    background: #f8f9fa;
    /* 스크롤바 트랙 배경 (사이드바 배경과 조화) */
    border-radius: 3px;
}

.chat-history::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    /* 스크롤바 색상 */
    border-radius: 3px;
    transition: background 0.2s ease;
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
    /* 호버 시 약간 더 진한 색상 */
}

.chat-history-title {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 1rem;
}

.delete-thread-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #d00;
    flex-shrink: 0;
    font-size: 18px;
}

.delete-thread-btn:hover {
    color: #ff3b3b;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0px;
    color: #495057;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s;
    overflow: hidden;
    flex: 1;
    text-decoration: none;
    overflow: hidden;

}

.chat-item:hover {
    background-color: #e9ecef;
    color: #212529;
}

.chat-item.active {
    background-color: #e2e8f0;
    color: #212529;
    font-weight: 500;
}

.chat-item i {
    color: #1C2252;
    font-size: 1.1rem;
    margin-right: 8px;
    flex-shrink: 0;
}

.sidebar-menu {
    margin-top: auto;
}

#sidebar .nav-link {
    color: #495057;
    padding: 12px 20px;
    display: flex;
    align-items: center;
}

#sidebar .nav-link:hover {
    background-color: #e9ecef;
}

.nav-label {
    margin-left: 10px;
    white-space: nowrap;
}

#sidebar.collapsed .nav-label {
    display: none;
}

#sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

#sidebar.collapsed .sidebar-title {
    display: none;
}

#sidebar.collapsed .new-chat-btn .btn-primary {
    padding: 10px 0;
    justify-content: center;
}

#sidebar.collapsed .chat-history-title,
#sidebar.collapsed .chat-title {
    display: none;
}

#sidebar.collapsed .chat-item {
    justify-content: center;
    padding: 10px 0;
}

.toggle-btn {
    border: none;
    background: transparent;
    cursor: pointer;
}

#sidebar.collapsed .toggle-btn .bi-chevron-left {
    display: none;
}

#sidebar.collapsed .toggle-btn .bi-chevron-right {
    display: inline-block;
}

.toggle-btn .bi-chevron-right {
    display: none;
}

body.sidebar-collapsed #content {
    margin-left: 80px;
    width: calc(100% - 80px);
}

.chat-messages {
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    max-width: 1280px;
}

.center-input-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* ✅ 왼쪽 정렬로 변경 */
    width: 100%;
    max-width: 1280px;
    /* ✅ 입력창 최대 너비 제한 */
    margin: 0 auto;
    /* ✅ 전체 중앙에 배치 */
}

.empty-message {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #6c757d;
    font-size: 1.2rem;
    text-align: center;
    justify-content: center;
}

.message-input {
    padding: 5px 0;
    width: 100%;
    max-width: 1280px;
}

textarea.form-control {
    resize: none;
}

#sendButton {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

#sendButton:hover {
    opacity: 0.8;
}


/* 모바일 말풍선 메뉴 버튼 - 기본적으로 숨김 */
.mobile-menu-toggle {
    position: fixed;
    top: 60px;
    left: 20px;
    z-index: 1050;
    background-color: #1C2252;
    border: none;
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* 사이드바가 열렸을 때 버튼을 사이드바 우측에 위치 */
.mobile-menu-toggle.sidebar-open {
    left: 305px; /* 사이드바 너비(300px) + 여백(20px) */
}

.mobile-menu-toggle:hover {
    background-color: #2E347F;
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}



/* 모바일 오버레이 - 기본적으로 숨김 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    display: none;
    /* 기본적으로 숨김 */
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {

    /* 모바일에서만 말풍선 버튼 표시 */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* 모바일에서만 오버레이 활성화 */
    .mobile-overlay {
        display: block;
    }

    /* 사이드바 기본 숨김 */
    #sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        width: 300px !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1045;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    /* 사이드바 활성화 시 */
    #sidebar.mobile-active {
        transform: translateX(0);
    }

    /* 메인 컨텐츠 영역 조정 */
    .right-wrap {
        margin-left: 0 !important;
        width: 100% !important;
        /* 햄버거 버튼 공간 확보 */
    }

    #content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .chat-container {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    .message-input {
        left: 0;
        transform: none;
        max-width: 100%;
    }

    /* PC용 사이드바 토글 버튼 숨김 */
    #sidebarToggle {
        display: none !important;
    }
}

.composer-container {
    transition: all 0.15s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.composer-container:focus-within {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 2px 5px rgba(0, 0, 0, 0.06);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 4px;
}

.chat-history,
list-group {
    background-color: transparent !important;
}

.first-child-mt-0:first-child {
    margin-top: 0 !important;
}

.text-token-text-primary {
    color: var(--text-primary);
}

:root {
    --sidebar-surface-primary: #f8f9fa;
    --token-sidebar-surface-primary: #e9ecef;
}

.text-primary {
    color: #0D0D0D !important;
    font-weight: bold;
}


.has-messages .empty-message {
    display: none;
}

.chat-item-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
}


.chat-item i {
    margin-right: 8px;
    flex-shrink: 0;
}

.delete-thread-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #d00;
    flex-shrink: 0;
    font-size: 18px;
}

.delete-thread-btn:hover {
    color: #ff3b3b;
}

.chat-side-label {
    display: flex;
    font-size: 0.9rem;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
}

.chat-side-label a {
    text-decoration: none;
}

.chat-date-label {
    display: flex;
    font-size: 0.9rem;
    justify-content: space-between;
    align-items: center;
    padding: 6px 15px;
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
    margin-top: 10px;
}

#sendButton svg {
    width: 26px !important;
    height: 26px !important;
    max-width: none !important;
    max-height: none !important;
    fill: currentColor !important;
}

.right-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-height: 0;
    width: 100%;
    /* 추가된 코드 */
    margin-left: 300px; 
    box-sizing: border-box; /* 패딩이나 보더가 너비에 영향을 주지 않도록 설정 */
}

.scroll-box {
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    scrollbar-color: auto;
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 0px;
}

.top-box {
    flex: 0.5;
    overflow: hidden;
}

.scroll-content {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.inner-content {
    width: 100%;
    max-width: 1300px;
}

.bottom-box {
    overflow-y: auto;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    box-sizing: border-box;
}

#sidebar.collapsed .chat-date-label,
#sidebar.collapsed .delete-thread-btn {
    display: none;
}

.loading {
    display: inline-block;
    font-size: 16px;
    color: #6c757d;
    position: relative;
}

.loading::before {
    content:
        display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1C2252;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}


.uploaded-files-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0;
    z-index: 5;
    position: relative;
}

.upload-card {
    display: inline-flex;
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
    max-width: 100%;
    width: fit-content;
    animation: fadeIn 0.3s ease-in-out;
}

.upload-card .filename {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #000;
}

.upload-card .status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #666;
    margin-left: 10px;
}


.remove-btn {
    background: none;
    border: none;
    margin-left: 8px;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content:
}

.top-box {
    flex: 1;
    transition: flex 0.4s ease;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.top-box .welcome-message {
    font-size: 2rem;
    transition: font-size 0.4s ease, opacity 0.4s ease;
    opacity: 1;
}

.top-box.full .welcome-message {
    font-size: 0;
    /* 또는 작은 글씨 예: 0.8rem */
    opacity: 0;
    pointer-events: none;
}

.loading-dots {
    font-weight: bold;
    font-size: 16px;
    padding-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}


.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    width: 80px;
    /* 기존: 40px */
    height: 80px;
    /* 기존: 40px */
    position: relative;
}

.spinner div {
    position: absolute;
    width: 8px;
    /* 기존: 4px */
    height: 20px;
    /* 기존: 10px */
    background: #888;
    border-radius: 4px;
    /* 기존: 2px */
    top: 8px;
    /* 기존: 4px */
    left: 36px;
    /* 기존: 18px */
    transform-origin: 4px 32px;
    /* 기존: 2px 16px */
    animation: fade 1.2s linear infinite;
}

.spinner div:nth-child(1) {
    transform: rotate(0deg);
    animation-delay: -1.1s;
}

.spinner div:nth-child(2) {
    transform: rotate(30deg);
    animation-delay: -1.0s;
}

.spinner div:nth-child(3) {
    transform: rotate(60deg);
    animation-delay: -0.9s;
}

.spinner div:nth-child(4) {
    transform: rotate(90deg);
    animation-delay: -0.8s;
}

.spinner div:nth-child(5) {
    transform: rotate(120deg);
    animation-delay: -0.7s;
}

.spinner div:nth-child(6) {
    transform: rotate(150deg);
    animation-delay: -0.6s;
}

.spinner div:nth-child(7) {
    transform: rotate(180deg);
    animation-delay: -0.5s;
}

.spinner div:nth-child(8) {
    transform: rotate(210deg);
    animation-delay: -0.4s;
}

.spinner div:nth-child(9) {
    transform: rotate(240deg);
    animation-delay: -0.3s;
}

.spinner div:nth-child(10) {
    transform: rotate(270deg);
    animation-delay: -0.2s;
}

.spinner div:nth-child(11) {
    transform: rotate(300deg);
    animation-delay: -0.1s;
}

.spinner div:nth-child(12) {
    transform: rotate(330deg);
    animation-delay: 0s;
}

@keyframes fade {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0.1;
    }
}


.blinking-cursor {
    display: inline-block;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@media (max-width: 1024px) {

    /* 태블릿 이하 */
    .scroll-content {
        padding: 0;
    }
}

/* 테이블 반응형 처리 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* 테이블 스크롤바 스타일링 */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 모바일에서 테이블 스크롤 처리 */
@media (max-width: 768px) {

    /* 모바일 */
    .scroll-content {
        padding: 0;
    }

    /* 테이블 컨테이너 스크롤 설정 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
    }

    /* 모바일에서 테이블 폰트 크기 */
    .table-responsive table,
    .table,
    .excel-table,
    .input-form-table {
        font-size: 10px !important;
    }

    /* 테이블 최소 너비 유지 - PC와 동일하게 1260px */
    .table-responsive table {
        min-width: 1260px !important;
        width: 1260px !important;
        margin-bottom: 0;
        table-layout: fixed !important;
    }

    /* 입력 폼 테이블 처리 */
    .input-form-table {
        min-width: 1260px !important;
        width: 1260px !important;
        table-layout: fixed !important;
    }

    /* 엑셀 테이블 처리 */
    .excel-table {
        min-width: 1260px !important;
        width: 1260px !important;
        table-layout: fixed !important;
    }

    /* 모바일에서 테이블 셀 크기 PC와 동일하게 강제 고정 */
    table.table th,
    table.table td,
    .table th,
    .table td,
    .table-responsive table th,
    .table-responsive table td,
    .input-form-table th,
    .input-form-table td,
    .excel-table th,
    .excel-table td {
        font-size: 10px !important;
        padding: 6px 8px !important;
        min-width: 140px !important;
        width: 140px !important;
        max-width: 140px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        border: 1px solid #dee2e6 !important;
    }

    /* 특정 테이블 헤더 너비 PC와 동일하게 */
    .table-th {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
    }

    /* 입력 필드를 td 크기에 맞게 조정 */
    .money-input {
        width: 100% !important;
        max-width: 124px !important;
        min-width: 124px !important;
        font-size: 10px !important;
        padding: 4px 6px !important;
        border: 1px solid #ccc !important;
        box-sizing: border-box !important;
    }

    /* 폼 컨트롤을 td 크기에 맞게 */
    .form-control {
        width: 100% !important;
        max-width: 124px !important;
        min-width: 124px !important;
        box-sizing: border-box !important;
    }
}

/* 버튼 그룹
 반응형 처리 */
.btn-group-responsive {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.btn-group-responsive .btn {
    flex: 0 1 auto;
    min-width: 140px;
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 25px;
}

.btn-group-responsive .btn i,
.btn-group-responsive .btn svg {
    margin-right: 6px;
    vertical-align: middle;
}

/* 태블릿 크기 */
@media (max-width: 992px) {
    .btn-group-responsive {
        gap: 8px;
    }

    .btn-group-responsive .btn {
        min-width: 120px;
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* 모바일 크기 */
@media (max-width: 768px) {
    .btn-group-responsive {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin: 1.5rem 0;
    }

    .btn-group-responsive .btn {
        width: 100%;
        max-width: 280px;
        min-width: unset;
        padding: 12px 20px;
        font-size: 14px;
        justify-content: center;
        display: flex;
        align-items: center;
    }
}

/* 작은 모바일 크기 */
@media (max-width: 480px) {
    .btn-group-responsive .btn {
        max-width: 100%;
        padding: 10px 16px;
        font-size: 13px;
    }

    .btn-group-responsive .btn i,
    .btn-group-responsive .btn svg {
        margin-right: 4px;
    }
}

/* 버튼 색상 클래스 */
.btn-download {
    background-color: transparent !important;
    border: 2px solid #085c63 !important;
    color: #085c63 !important;
}

.btn-download:hover {
    background-color: #085c63 !important;
    border-color: #085c63 !important;
    color: white !important;
}

.btn-view {
    background-color: #64b4ad !important;
    border-color: #64b4ad !important;
}

.btn-view:hover {
    background-color: #52a199 !important;
    border-color: #52a199 !important;
}

.btn-print {
    background-color: #4C8C86 !important;
    border-color: #4C8C86 !important;
}

.btn-print:hover {
    background-color: #3f7671 !important;
    border-color: #3f7671 !important;
}

.btn-report {
    background-color: #0f828c !important;
    border-color: #0f828c !important;
}

.btn-report:hover {
    background-color: #0d6b74 !important;
    border-color: #0d6b74 !important;
}

/* Card 스
타일 제거 */
.card {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.card-body {
    background-color: transparent !important;
    border: none !important;
}

/* 테이블 색상 클래스 */
.bg-main {
    background-color: #4a90e2 !important;
    color: white !important;
}

.bg-green {
    background-color: #d4edda !important;
    color: #155724 !important;
}

.bg-greenBold {
    background-color: #c3e6cb !important;
    color: #155724 !important;
    font-weight: bold !important;
}

.bg-d6dce4 {
    background-color: #d6dce4 !important;
    color: #333 !important;
}

.bg-yellow {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

.bg-blue {
    background-color: #cce5ff !important;
    color: #004085 !important;
}

.bg-gray {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

.bg-light-blue {
    background-color: #e3f2fd !important;
    color: #0d47a1 !important;
}

.bg-orange {
    background-color: #ffe0b3 !important;
    color: #cc5500 !important;
}

/* 서브 헤더 */
.sub-header {
    background-color: #3a7bd5 !important;
    color: white !important;
}

/* 테이블 행 호버 효과 유지 */
.table tbody tr:hover {
    background-color: #f1f7ff !important;
}

/* 그룹 행 스타일 */
.group-0,
.group-1,
.group-2,
.group-3,
.group-4,
.group-5,
.group-6 {
    background-color: #f8f9fa !important;
}

/* 모바일에서 테이블 크기 PC와 동일하게 강제 고정 */
@media (max-width: 768px){

    /* 부트스트랩 반응형 테이블 오버라이드 */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* 모든 테이블 요소 PC 크기로 강제 고정 */
    .table-responsive table,
    .table,
    .excel-table,
    .input-form-table {
        min-width: 1260px !important;
        width: 1260px !important;
        table-layout: fixed !important;
        font-size: 10px !important;
    }

    /* 모든 테이블 셀 PC와 동일한 크기로 강제 고정 */
    .table th,
    .table td,
    .table-responsive table th,
    .table-responsive table td,
    .input-form-table th,
    .input-form-table td,
    .excel-table th,
    .excel-table td {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
        padding: 6px 8px !important;
        font-size: 10px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        box-sizing: border-box !important;
        border: 1px solid black !important;
    }

    /* 첫 번째 열(구분) 크기 */
    .table-th {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
    }

    /* 입력 필드 크기 조정 */
    .money-input,
    .form-control {
        width: 124px !important;
        max-width: 124px !important;
        min-width: 124px !important;
        font-size: 10px !important;
        padding: 4px 6px !important;
        box-sizing: border-box !important;
    }
	
	.btn-group-responsive{padding:16px;}
	
	table th[rowspan],
	table td[rowspan],
	.table th[rowspan],
	.table td[rowspan] {
		width: 130px !important;
		min-width: 130px !important;
		max-width: 130px !important;
		box-sizing: border-box !important;
	}

	/* 복잡한 테이블 헤더 구조에서 첫 번째 열 강제 고정 */
	table thead tr:first-child th:first-child,
	.table thead tr:first-child th:first-child {
		width: 130px !important;
		min-width: 130px !important;
		max-width: 130px !important;
	}

	/* 모든 테이블 셀에 대해 강력한 크기 제한 */
	table th,
	table td,
	.table th,
	.table td {
		box-sizing: border-box !important;
		word-break: break-word !important;
		overflow-wrap: break-word !important;
	}

	/* 특정 테이블 클래스에 대한 추가 제어 */
	.table.text-center th:first-child,
	.table.text-center td:first-child {
		width: 130px !important;
		min-width: 130px !important;
		max-width: 130px !important;
		text-align: center !important;
	}
		
}