/* ===========================
   ic-bi - Bootstrap Icons 버튼
   [class*="ic-"] 충돌 방지: text-indent, overflow 재정의 + ::before에 text-indent:0 명시
   =========================== */
.btn.ic-bi {
    width: 28px;
    min-width: 28px;
    text-indent: -9999px; /* 텍스트 숨김 (ic-* 패턴 유지) */
    overflow: hidden;
    background-color: unset;
    background-image: none !important;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-3);
}
.btn.ic-bi::before {
    font-family: "bootstrap-icons";
    display: block;
    flex-shrink: 0;
    line-height: 1;
    text-indent: 0; /* 부모 text-indent 상속 차단 */
}
.btn.ic-bi:hover { color: var(--primary); }
.btn.ic-bi.no-border { border: none; }
.btn.ic-bi.sm  { width: 24px; min-width: 24px; font-size: 14px; }
.btn.ic-bi.lg  { width: 32px; min-width: 32px; font-size: 18px; }
.btn.ic-bi.xlg { width: 36px; min-width: 36px; font-size: 20px; }

/* 템플릿 선택 영역 제목/설명 세로 정렬 */
.tree-lnb-header.info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.tree-lnb-header.info-text > span {
    margin: 0;
    color: #999
}

/* bi-table — 폴더 통계 */
.btn.ic-bi-table::before { content: "\f5aa"; }

/* bi-arrows-expand — 전체 펼치기 */
.btn.ic-bi-expand-all::before { content: "\f14c"; }

/* bi-arrows-collapse — 전체 접기 */
.btn.ic-bi-collapse-all::before { content: "\f14b"; }

/* ===========================
   UserInfo - 내 정보 페이지
   =========================== */
.user-info-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px;
    height: 100%;
}

/* 프로필 헤더 */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background-color: #F9FAFD;
    border: 1px solid var(--line);
    border-radius: 8px;
}
/* 프로필 헤더 드롭박스 */
.user-profile-header .drop-box {
    width: auto;
    height: auto;
    flex-shrink: 0;
}
.user-profile-header .drop-box .dropLabel {
    overflow: visible;
    border: none;
    padding: 0;
    height: auto;
    width: auto;
}
.user-profile-header .drop-box .dropLabel img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}
.user-profile-header .drop-box .user-profile-avatar.dropLabel {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-profile-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.user-profile-summary .profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
}
.user-profile-summary .profile-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-5);
}
.user-profile-summary .profile-meta .divider {
    width: 1px;
    height: 12px;
    background-color: var(--gray-de);
}

/* 정보 섹션 */
.user-info-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.user-info-section .section-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}
.user-info-section .section-header .btns {
    display: flex;
    gap: 8px;
}

/* 데이터 뷰 확장 - 내 정보 */
.user-info-section .data-view table {
    border-top: 1px solid var(--line);
}
.user-info-section .data-view th {
    width: 140px;
    background-color: var(--bg-gray);
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
}
.user-info-section .data-view td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--text-2);
}

/* 데이터 등록 확장 - 내 정보 수정 */
.user-info-section .data-regist {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0;
}
.user-info-section .data-regist table {
    width: 100%;
}
.user-info-section .data-regist th {
    width: 140px;
    background-color: var(--bg-gray);
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.user-info-section .data-regist td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
}
.user-info-section .data-regist tr:last-child th,
.user-info-section .data-regist tr:last-child td {
    border-bottom: none;
}

/* 페이지 내 탭 */
.user-info-page .page-tab {
    padding: 0;
    border-bottom: 1px solid var(--line);
}

/* 폼 하단 버튼 영역 */
.user-info-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 12px;
}

/* ===========================
   Error Pages - 에러 페이지
   =========================== */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
}
.error-page-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}
.error-page .error-code {
    font-size: 80px;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    letter-spacing: -2px;
}
.error-page .error-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-1);
}
.error-page .error-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-5);
    word-break: keep-all;
}
.error-page .error-actions {
    margin-top: 12px;
}

/* ===========================
   User Popup - 사용자 정보 팝업
   =========================== */
.layor-container-user {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    padding-top: 12px;
    z-index: 100;
}
.layor-container-user:after {
    display: block;
    content: '';
    width: 14px;
    height: 14px;
    border: 1px solid #dedede;
    border-width: 1px 1px 0 0;
    background-color: #fff;
    transform: rotate(-45deg);
    position: absolute;
    right: 12px;
    top: 5px;
}
.layor-container-user .layor-user-inner {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #DEDEDE;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.global-util-item.user.active .layor-container-user {
    display: block;
}

/* 프로필 영역 */
.user-popup-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background-color: #F9FAFD;
}
.user-popup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.user-popup-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.user-popup-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
}
.user-popup-id {
    font-size: 13px;
    color: var(--text-5);
}

/* 상세 정보 */
.user-popup-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.user-popup-dl {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
}
.user-popup-dl dt {
    flex-shrink: 0;
    width: 40px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-5);
}
.user-popup-dl dd {
    font-size: 13px;
    color: var(--text-2);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 메뉴 */
.user-popup-menu {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}
.user-popup-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
    text-decoration: none;
}
.user-popup-menu-item:hover {
    background-color: var(--primary-bg);
    color: var(--primary);
}

/* ===========================
   ProjectCodeList - 출처 배지
   =========================== */
.source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.source-badge.erp {
    background-color: #E8F5E9;
    color: #2E7D32;
}
.source-badge.manual {
    background-color: #F5F5F5;
    color: #757575;
}

/* ERP fetch 결과 알림 */
.erp-fetch-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    margin: 0 16px 8px;
    background-color: #E8F5E9;
    border: 1px solid #C8E6C9;
    border-radius: 4px;
}
.fetch-result-text {
    font-size: 13px;
    color: #2E7D32;
    font-weight: 500;
}
.btn-fetch-close {
    border: none;
    background: none;
    font-size: 18px;
    color: #2E7D32;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.project-code-search .dashboard-filter-form {
    flex: 1;
    flex-wrap: wrap;
    justify-content: space-between;
}
.project-code-search .form-period {
    width: auto;
}
.project-code-search .form-period .input-date {
    width: 130px;
}
.project-code-search .input-keyword {
    width: 140px;
}

/* ===========================
   BIM Library - 첨부파일 목록
   =========================== */
.attachment-file-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.attachment-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background-color: #F9FAFD;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 13px;
}
.attachment-file-item .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}
.attachment-file-item .file-size {
    color: var(--text-5);
    flex-shrink: 0;
}
.attachment-file-item .btn-clear-x {
    margin-left: auto;
    border: none;
    background: none;
    font-size: 16px;
    color: var(--text-5);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.attachment-file-item .btn-clear-x:hover {
    color: #E53935;
}
.file-guide-text {
    font-size: 12px;
    color: var(--text-5);
}

/* ===========================
   TreeView - disabled 체크박스 (부모 잠금)
   =========================== */
.folder-checkbox input[type="checkbox"]:disabled {
    border-color: #90CAF9;
    background-color: #fff;
    cursor: not-allowed;
}
.folder-checkbox input[type="checkbox"]:checked:disabled {
    background-color: #90CAF9;
    border-color: #90CAF9;
}
.folder-checkbox input[type="checkbox"]:checked:disabled::before {
    border-color: #fff;
}

/* ===========================
   TreeView - 폴더 접근 요청 뱃지 (폴더 아이콘에 빨간점 오버레이)
   =========================== */
.folder-icon {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}
.folder-icon.has-access::after {
    content: '';
    position: absolute;
    top: 1px;
    right: 0px;
    width: 6px;
    height: 6px;
    background: #FF5252;
    border-radius: 50%;
    z-index: 999;
}

/* ===========================
   TreeView - 폴더 선택 하이라이트 애니메이션
   =========================== */
@keyframes folder-highlight {
    0%, 100% { background-color: transparent; }
    25%, 75% { background-color: rgba(59, 130, 246, 0.15); }
}
.tree .item.folder-highlight {
    animation: folder-highlight 0.7s ease;
}

/* ===========================
   접근 요청 빈 상태
   =========================== */
.access-request-empty {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background-color: #F9FAFD;
    border: 1px dashed #DEE2F1;
    border-radius: 4px;
    color: var(--text-5);
    font-size: 13px;
}
.access-request-empty .bi {
    font-size: 14px;
    color: #A0AEC0;
}

/* ===========================
   drop-box 내 버튼 중앙 정렬
   =========================== */
.drop-box.center .dropLabel {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

/* ===========================
   TreeView - 폴더명 스타일
   =========================== */
.tree .item a.folder-name {
    white-space: nowrap;
    flex: 1 1 auto;        /* 축소 허용 */
    min-width: 0;           /* flex 자식 오버플로 방지 */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 선택된 폴더: 토글 영역 제외, 폴더아이콘부터 배경 적용 */
.tree .item:has(a.folder-name.selected) {
    z-index: 0;
}
.tree .item:has(a.folder-name.selected)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 20px;
    background-color: #0040ff28;
    border-radius: 4px;
    z-index: -1;
    pointer-events: none;
}
.tree .item:has(a.folder-name.selected) .folder-button {
    background: linear-gradient(#0040ff28, #0040ff28), #F8F8F8;
}

/* folder-button: absolute로 레이아웃 흐름에서 제외 → 텍스트 영향 없음, 진동 없음 */
.tree .item {
    position: relative;
}
.tree .item .folder-button {
    display: flex !important;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #F8F8F8;
    padding-left: 4px;
}
.tree .item:hover .folder-button {
    visibility: visible;
    pointer-events: auto;
}

/* 개수 뱃지 */
.folder-count {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #999;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ===========================
   ellipsis - flex 자식 말줄임표 보정
   =========================== */
/* flex 자식이 콘텐츠 너비 이하로 줄어들 수 있도록 */
.data-view-title {
    min-width: 0;
    overflow: hidden;
}

/* ===========================
   CheckboxDropdown - 드롭다운 내 검색
   =========================== */
.drop-search-wrap {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
}
.drop-search-wrap .drop-search-input {
    width: 100%;
    height: 26px;
    padding: 0 8px;
    border: 1px solid var(--line-input);
    border-radius: 2px;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}
.drop-search-wrap .drop-search-input:focus {
    border-color: var(--primary);
}
.drop-label-ellipsis {
    display: flex !important;
    min-width: 0;
}
.drop-label-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.drop-label-count {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ===========================
   Tag wrap - 가로 스크롤
   =========================== */
.tag-wrap {
    overflow-x: auto;
    white-space: nowrap;
}
.tag-wrap::-webkit-scrollbar {height: 6px;}
.tag-wrap::-webkit-scrollbar-thumb {background-color: rgba(0,0,0,0.08); border: none;}
.tag-wrap::-webkit-scrollbar-track {background-color: transparent;}

/* ===========================
   Lock Tooltip - 잠금 사용자 툴팁 (위쪽)
   =========================== */
td.lock-cell {
    overflow: visible !important;
}
.lock-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.lock-tooltip {
    display: none;
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    z-index: 10;
}
.lock-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: #333;
}
.lock-tooltip-wrap:hover .lock-tooltip {
    display: block;
}

/* ===========================
   FolderStatistics - 계층형 테이블
   =========================== */
.folder-statistics-table table {
    border-collapse: collapse;
}
.folder-statistics-table th,
.folder-statistics-table td {
    border: 1px solid var(--line);
    padding: 8px 12px;
    vertical-align: middle;
    white-space: nowrap;
}
.folder-statistics-table th {
    background-color: #F5F5F5;
    font-weight: 600;
    text-align: center;
}
.folder-statistics-table td.hierarchy-cell {
    background-color: #FAFAFA;
    font-weight: 600;
    vertical-align: middle;
}
.folder-statistics-table td.text-right {
    text-align: right;
}
.tree-cell-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}
.tree-cell-name {
    text-align: left;
    flex: 1;
}
.tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    border-radius: 3px;
    color: var(--text-5);
}
.tree-toggle:hover {
    background-color: var(--primary-bg);
    color: var(--primary);
}
.tree-icon-expand::before {
    content: '\25BC';
    font-size: 10px;
}
.tree-icon-collapse::before {
    content: '\25B6';
    font-size: 10px;
}

/* ===========================
   Calendar - 연/월 선택 팝업
   =========================== */
.calendar-nav-group {
    position: relative;
}
.calendar-date-picker {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100;
    padding: 12px;
}
.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.picker-year {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
}
.date-picker-months {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.month-btn {
    padding: 8px 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
}
.month-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
}
.month-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}

/* ===========================
   DepartmentDropdown - 정렬 버튼
   =========================== */
.dept-sort-header {
    display: flex;
    justify-content: flex-end;
    padding: 4px 8px;
    border-bottom: 1px solid var(--line);
}
.btn-dept-sort {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    font-size: 11px;
    color: var(--text-5);
    cursor: pointer;
    white-space: nowrap;
}
.btn-dept-sort:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===========================
   tree-folder-manage - 비활성 링크
   =========================== */
.tree-folder-manage a.disabled,
.dep2 a.disabled,
.page-tab a.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* ===========================
   AI Search - 대화 화면 래퍼
   =========================== */
.ai-platform .ai-talk-page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===========================
   AI Search - 스키마 선택 토글
   =========================== */
.ai-schema-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    width: 680px;
    max-width: 100%;
    margin: 0 auto 8px;
}
.ai-schema-toggle button {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 12px;
    border: 1px solid #D0D5E8;
    background-color: transparent;
    color: #888;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.ai-schema-toggle button:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.ai-schema-toggle button.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* AI Search - 검색폼 비활성 상태 */
.ai-search-box.disabled {
    background-image: linear-gradient(#E9EBF0, #E9EBF0), linear-gradient(90deg, #9EA4B4, #9EA4B4);
    box-shadow: none;
    pointer-events: none;
}
.ai-search-box.disabled .ai-search-form .app-thumb {
    opacity: 0.4;
}
.ai-search-box.disabled .ai-search-form .input-keyword textarea {
    background-color: transparent;
    color: #999;
}
.ai-search-box.disabled .ai-search-form .btn-submit {
    opacity: 0.3;
}

/* 질문 말풍선 내 선택된 스키마 표시 */
/* AI 답변 말풍선 내 테이블 세로 스크롤 */
.ai-balloon .data-list {
    max-height: 260px;
}
.ai-balloon .data-list td {
    max-width: 180px;
}

.ai-balloon .ai-schema-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-bg);
    border-radius: 8px;
    padding: 1px 8px;
    margin-top: 6px;
}

/* ===========================
   AI Search - 스키마 토글 그룹
   =========================== */
.ai-schema-group-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    margin-right: 4px;
    white-space: nowrap;
}
.ai-schema-divider {
    display: inline-block;
    width: 1px;
    height: 16px;
    background-color: #D0D5E8;
    margin: 0 8px;
    vertical-align: middle;
}

/* ===========================
   AI Search - 글자수 카운터
   =========================== */
.ai-char-counter {
    font-size: 11px;
    color: #aaa;
    text-align: right;
    padding: 2px 16px 0 0;
    width: 680px;
    max-width: 100%;
    margin: 0 auto;
}
.ai-char-counter .near-limit {
    color: #E53935;
    font-weight: 600;
}

/* ===========================
   AI Search - 추천 질문 칩
   =========================== */
.ai-suggest-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 680px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 20px;
}
.ai-chip {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid #E0E3EE;
    background-color: rgba(255, 255, 255, 0.7);
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    word-break: keep-all;
}
.ai-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-bg);
}

/* ===========================
   AI Search - 검색 히스토리
   =========================== */
.ai-history-dropdown {
    width: 680px;
    max-width: 100%;
    margin: 4px auto 0;
    background-color: #fff;
    border: 1px solid #E0E3EE;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
    position: relative;
}
.ai-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #E0E3EE;
    font-size: 12px;
    font-weight: 600;
    color: #888;
}
.ai-history-header button {
    border: none;
    background: none;
    font-size: 11px;
    color: #999;
    cursor: pointer;
    padding: 2px 4px;
}
.ai-history-header button:hover {
    color: var(--primary);
}
.ai-history-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
}
.ai-history-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.1s;
}
.ai-history-list li:hover {
    background-color: var(--primary-bg);
}
.ai-history-query {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.ai-history-schema {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-bg);
    border-radius: 8px;
    padding: 1px 8px;
    flex-shrink: 0;
    margin-left: 8px;
}

/* ===========================
   AI Search - 진단 카드
   =========================== */
.ai-risk-overview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.ai-risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
}
.ai-risk-badge.sm {
    padding: 2px 8px;
    font-size: 12px;
}
.ai-risk-badge.safe    { color: #2E7D32; background-color: #E8F5E9; }
.ai-risk-badge.caution { color: #F57F17; background-color: #FFF8E1; }
.ai-risk-badge.warning { color: #E65100; background-color: #FFF3E0; }
.ai-risk-badge.danger  { color: #C62828; background-color: #FFEBEE; }

.ai-diagnosis-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-card {
    border: 1px solid #E0E3EE;
    border-radius: 8px;
    padding: 14px 16px;
    background-color: #FAFBFD;
}
.ai-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.ai-card-header strong {
    font-size: 14px;
    color: #333;
}
.ai-card-metrics {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}
.ai-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ai-metric-label {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}
.ai-metric-value {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}
.ai-metric-value.lg {
    font-size: 20px;
}
.ai-card-issue {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
    word-break: keep-all;
}
.ai-card-issue-label {
    font-weight: 600;
    color: #888;
}
.ai-card-recommendations {
    margin: 4px 0 0 16px;
    padding: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* ===========================
   AI Search - 지연 분석
   =========================== */
.ai-delay-summary-metrics {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.ai-summary-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px;
    border: 1px solid #E0E3EE;
    border-radius: 8px;
    background-color: #FAFBFD;
}
.ai-summary-metric.critical {
    border-color: #FFCDD2;
    background-color: #FFF5F5;
}
.ai-severity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
}
.ai-severity-badge.minor    { color: #2E7D32; background-color: #E8F5E9; }
.ai-severity-badge.moderate { color: #F57F17; background-color: #FFF8E1; }
.ai-severity-badge.severe   { color: #E65100; background-color: #FFF3E0; }
.ai-severity-badge.critical { color: #C62828; background-color: #FFEBEE; }

.ai-overall-recommendations {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #E8EBF5;
}
.ai-overall-recommendations strong {
    font-size: 13px;
    color: #444;
}
.ai-overall-recommendations ul {
    margin: 8px 0 0 16px;
    padding: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* ===========================
   Header Logo - 로고 크기
   =========================== */
.header-logo img {
    width: 150px;
    height: auto;
}

/* ===========================
   Login - 하단 서브 링크 (비밀번호 찾기 등)
   =========================== */
.login-sub-link {
    text-align: center;
}
.login-sub-link a {
    font-size: 13px;
    color: var(--text-5);
    text-decoration: underline;
    text-underline-position: under;
}
.login-sub-link a:hover {
    color: var(--primary);
}

/* ===========================
   FindPassword - 비밀번호 찾기 페이지
   =========================== */
.find-pw-wrap {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F5F7FC 0%, #E8EAF6 100%);
}
.find-pw-card {
    width: 400px;
    max-width: calc(100% - 40px);
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
.find-pw-card .header-logo {
    text-align: center;
    margin-bottom: 32px;
}
.find-pw-card .login-title {
    text-align: center;
    margin-bottom: 28px;
}
.find-pw-card .login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.find-pw-card .login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}
.find-pw-card .login-form .input-text {
    width: 100%;
    height: 36px;
}
.find-pw-card .login-form .form-command input {
    width: 100%;
    height: 36px;
}
.find-pw-card .login-form .form-command input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.login-sub-link a.disabled-link {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* ===========================
   ManageAccess - 접속 관리
   =========================== */
.manage-access > .dashboard-cell:first-child {
    flex-shrink: 0;
}
.manage-access > .dashboard-cell:first-child .data-list {
    max-height: 240px;
    overflow-y: auto;
}
.manage-access > .dashboard-cell.project > .data-list-header {
    flex-shrink: 0;
}


/* 로딩 스피너 (공용) */
.loading-container {
    position: relative;
    min-height: 200px;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 100;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
    vertical-align: middle;
    flex-shrink: 0;
}

.loading-overlay .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}

.btn .loading-spinner {
    width: 15px;
    height: 15px;
    border-width: 2px;
    margin-right: 6px;
}

.loading-overlay .loading-text {
    font-size: 14px;
    color: #666;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.page-contents.ai-platform.no-bg {
    background-image: none;
}
.al-talk-inner.lg {
    width: 80%;
}
.ai-talk-box.question.split {
    width: 100%;
    justify-content: flex-end;
    /* 내용물(아바타+말풍선)을 오른쪽으로 */
    margin-left: 0;
    /* 기존 auto 제거 */
}

.ai-talk-box.answer.split {
    width: 100%;
}

.ai-talk-box .ai-balloon.auto {
    width: auto;
    max-width: 90%;
    /* 말풍선이 너무 길어지지 않게 최대 폭 제한 */
}

/* 결과 테이블이 있는 답변 말풍선은 요약 문장 길이에 맞춰 줄어들지 않고 고정 폭 사용.
   우측 여백을 남겨 오른쪽 정렬된 질문 말풍선과 시각적으로 구분 */
.ai-talk-box.answer .ai-balloon.auto:has(.ai-result-wrap) {
    width: 100%;
    max-width: 80%;
}

/* 답변 테이블 컬럼 최소 폭: 좁은 화면에서는 컬럼이 눌리지 않고 가로 스크롤 */
.ai-balloon .data-list table.resizable-table th {
    min-width: 90px;
}
/* ===========================
   folder-volum-usage - 폴더 사용량 (용량 제한 없음, FolderVolumeWithoutLimit.vue)
   기본: 프로젝트 홈 카드용 / .folder-volum-status-box 안: 사이드바용 (기존 FolderVolume 박스와 동일 톤)
   =========================== */
.folder-volum-usage { width: 100%; word-break: keep-all; }
.folder-volum-usage .usage-label {
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-5);
}
.folder-volum-usage .usage-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1.1;
}
.folder-volum-usage .usage-value .num {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.folder-volum-usage .usage-value .unit {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-5);
}

/* 사이드바(.folder-volum-status-box) 안: 기존 .folder-volum-status 와 같은 박스 스타일 */
.folder-volum-status-box .folder-volum-usage {
    padding: 12px;
    background-color: #fff;
    border: 1px solid #E8EBF5;
    border-radius: 4px;
}
.folder-volum-status-box .folder-volum-usage .usage-label { font-size: 12px; margin-bottom: 2px; }
.folder-volum-status-box .folder-volum-usage .usage-value .num { font-size: 18px; }
.folder-volum-status-box .folder-volum-usage .usage-value .unit { font-size: 12px; }

/* 프로젝트 홈 카운터 행 4등분 / 차트 전체 폭 (contents.css 의 .col-1fr, .col-half 와 같은 계산식) */
.project-front-wrap .col-quarter { width: calc(25% - (20px * 3) / 4); }
.project-front-wrap .col-full { width: 100%; }

/* 프로젝트 홈 현황 영역을 화면 높이에 맞춤 (.contents-body 내부 스크롤 최소화)
   - 그리드 12칸: col-2fr=8, col-1fr=4, col-quarter=3, col-half=6, col-full=12
   - 마지막 행(차트 카드)이 남은 높이를 모두 차지하고, 차트는 카드 높이를 따라감
     (ApexCharts 는 높이 미지정 시 너비/1.61 자동 높이를 쓰므로 .chart 에 실제 높이가 잡혀야 함)
   - 남은 높이가 차트 최소 높이보다 작으면 행(1fr = minmax(auto,1fr))과 카드가 차트만큼 늘어나고 그만큼만 스크롤 */
.project-front-wrap.fit-height {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr;
    gap: 20px;
    height: 100%;
}
.project-front-wrap.fit-height .content-cell { width: auto; flex: none; }
.project-front-wrap.fit-height .col-2fr { grid-column: span 8; }
.project-front-wrap.fit-height .col-1fr { grid-column: span 4; }
.project-front-wrap.fit-height .col-half { grid-column: span 6; }
.project-front-wrap.fit-height .col-quarter { grid-column: span 3; }
.project-front-wrap.fit-height .col-full { grid-column: 1 / -1; margin-bottom: 20px; } /* 하단 여백 (스크롤 시에도 유지) */
.project-front-wrap.fit-height .con-chart,
.project-front-wrap.fit-height .con-chart .chart-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.project-front-wrap.fit-height .con-chart .chart { flex: 1 1 auto; min-height: 320px; } /* 차트 최소 높이: 이보다 작으면 카드가 늘어나고 스크롤 허용 */

/* ===========================
   파일 신규등록 - 선택 파일 목록 (ContainerFileForm)
   =========================== */
.upload-file-panel {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background-color: #fff;
    overflow: hidden;
}
.upload-file-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background-color: #F4F6FB;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--text-5);
}
.upload-file-panel-head .upload-file-count strong {
    color: var(--primary);
    font-weight: 600;
}
.upload-file-panel-head .upload-file-count strong.is-full {
    color: var(--error);
}
.upload-file-panel-head .upload-file-total {
    padding-left: 12px;
    border-left: 1px solid var(--gray-cc);
}
.upload-file-panel-head .btn-upload-clear {
    margin-left: auto;
    padding: 2px 8px;
    border: 1px solid var(--gray-cc);
    border-radius: 4px;
    background-color: #fff;
    font-size: 12px;
    color: var(--text-5);
    cursor: pointer;
    line-height: 1.4;
}
.upload-file-panel-head .btn-upload-clear:hover {
    border-color: var(--error);
    color: var(--error);
}
.upload-file-panel-head .btn-upload-clear:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.upload-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
}
.upload-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 12px;
    border-bottom: 1px solid var(--gray-f1);
    font-size: 13px;
    transition: background-color 0.15s;
}
.upload-file-item:last-child {
    border-bottom: none;
}
.upload-file-item:hover {
    background-color: #F9FAFD;
}
.upload-file-item .upload-file-no {
    flex-shrink: 0;
    min-width: 22px;
    font-size: 11px;
    color: var(--gray-aa);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.upload-file-item .upload-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-2);
}
.upload-file-item .upload-file-size {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-7);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.upload-file-item .btn-clear-x {
    flex-shrink: 0;
    border: none;
    background: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    color: var(--text-7);
    cursor: pointer;
    padding: 0;
}
.upload-file-item .btn-clear-x:hover {
    background-color: #FDECEC;
    color: #E53935;
}
.upload-file-item .btn-clear-x:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
