/* 공통 말줄임표 처리 클래스 */
.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.no-message {
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

/* 메시지 리스트 아이템 높이 및 정렬 통일 */
.message-list-item {
    min-height: 48px;
    align-items: center;
}

.message-list-item .contents {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}


.item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* .writer,
.date {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
} */

.spinner{
    width: 48px;
    height: 48px;
    border: 6px solid #fff;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: bim-spin 1s linear infinite;
}
@keyframes bim-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===========================
    drop-box 드롭다운 잘림 보정
    스크롤 컨테이너 안의 drop-box는 position:fixed로 탈출
    .drop-fixed 클래스를 스크롤 컨테이너에 추가하여 사용
   =========================== */
.drop-fixed .drop-box .dropMenu {
    position: fixed;
    left: auto;
    top: auto;
    right: auto;
    min-width: auto;
    z-index: 100;
}


/* ===========================
    PostComment - 댓글 삭제 버튼
   =========================== */
.comment-list-item {
    position: relative;
}

.comment-list-item>.btn-delete {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);

    width: 20px;
    height: 20px;
    background: url(../img/contents/ic_input_clear.svg) center no-repeat;
    overflow: hidden;
}

.cursor-default{
    cursor: default;
}

/* ===========================
   Quill 콘텐츠 읽기 전용 스타일 리셋
   - 상세보기에서 ql-editor 에디터 기본 스타일 제거
   =========================== */
.board-view-contents.ql-editor {
    height: auto;
    min-height: auto;
    padding: 0;
    margin-bottom: 24px;
    cursor: default;
    overflow: visible;
    white-space: normal;
}

/* ===========================
   댓글 삭제 버튼 - 날짜 옆 배치
   =========================== */
.comment-list-item .date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.comment-list-item .date .btn-delete {
    width: 16px;
    height: 16px;
    background: url(../img/contents/ic_input_clear.svg) center/contain no-repeat;
    text-indent: -9999px;
    overflow: hidden;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}



/* ===========================
   File Dropzone - 파일 드래그앤드롭 영역
   =========================== */
.file-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80px;
    padding: 16px;
    border: 2px dashed var(--line);
    border-radius: 6px;
    background-color: #FAFBFE;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.file-dropzone:hover {
    border-color: var(--primary);
    background-color: #F0F4FF;
}

.file-dropzone-active {
    border-color: var(--primary);
    background-color: #E8EEFF;
}

.file-dropzone-text {
    font-size: 13px;
    color: var(--text-5);
    text-align: center;
    word-break: keep-all;
}

/* 멀티파일 업로드 리스트 */
.file-upload-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
}

.file-upload-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background-color: #F9FAFD;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 13px;
}

.file-upload-item .file-upload-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-2);
}

.file-upload-item .btn-clear-x {
    border: none;
    background: none;
    font-size: 16px;
    color: var(--text-5);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.file-upload-item .btn-clear-x:hover {
    color: #E53935;
}




/* ===========================
   대시보드 설정 페이지
   =========================== */
.dashboard-setting-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #F5F7FB;
}

.dashboard-setting-page .page-header {
    padding: 16px 20px;
    background-color: #fff;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.dashboard-setting-page .page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-2);
}

.dashboard-setting-page .page-footer {
    padding: 12px 20px;
    background-color: #fff;
    border-top: 1px solid var(--line);
    flex-shrink: 0;
    display: flex;
}

.dashboard-setting-page .footer-action {
    margin-left: auto;
    display: inline-flex;
    gap: 8px;
}

.dashboard-setting-page .footer-action .btn {
    min-width: 68px;
}

.dashboard-setting-layout {
    flex: 1;
    display: flex;
    align-items: stretch;
    min-height: 0;
}

/* 좌측 지표 선택 패널 */
.dashboard-setting-layout .indicator-panel {
    width: 200px;
    flex-shrink: 0;
    background-color: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.indicator-panel-header {
    padding: 16px 20px 12px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.indicator-panel-header .title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
}

.indicator-panel-header .btn-indicator-add {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background-color: #fff;
    color: var(--text-2);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color .15s, border-color .15s, color .15s;
}

.indicator-panel-header .btn-indicator-add:hover {
    background-color: var(--primary-3);
    border-color: var(--primary-3);
    color: #fff;
}

.indicator-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.indicator-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    background-color: #fff;
    padding: 10px;
    cursor: grab;
    transition: border-color .15s, box-shadow .15s;
}

.indicator-card:hover {
    border-color: var(--primary-3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}

.indicator-card.is-added {
    opacity: .45;
    cursor: not-allowed;
}

.indicator-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
    word-break: keep-all;
}

.indicator-card-thumb {
    width: 100%;
    height: 80px;
    background-color: #fafbfd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.indicator-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 우측 Gridstack 드롭 영역 */
.indicator-grid-wrap {
    flex: 1;
    position: relative;
    padding: 20px;
    overflow: auto;
}

.indicator-grid-wrap .grid-stack {
    min-height: 480px;
    background-color: transparent;
}

.indicator-grid-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3, #888);
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
}

/* Gridstack 아이템 카드 스타일 */
.grid-stack>.grid-stack-item>.grid-stack-item-content {
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    inset: 4px;
}

.grid-stack>.grid-stack-item.ui-draggable-dragging>.grid-stack-item-content,
.grid-stack>.grid-stack-item.ui-resizable-resizing>.grid-stack-item-content {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

/* 컴포넌트 마운트용 타겟 — 위젯 본문 전체를 채움 */
.grid-stack>.grid-stack-item>.grid-stack-item-content>.widget-mount {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px;
    overflow: hidden;
}

/* 마운트된 차트 컴포넌트 내부 구조도 세로 flex 로 연결 */
.grid-stack-item-content>.widget-mount>.item-header {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.grid-stack-item-content>.widget-mount>.item-header .title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
}

.grid-stack-item-content>.widget-mount>.item-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: block;
    padding: 0;
    background-color: transparent;
}

.grid-stack-item-content>.widget-mount>.item-body>.chart-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.grid-stack-item-content>.widget-mount>.item-body>.chart-wrap>.chart {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 컴포넌트 지표 위에 오버레이된 닫기 버튼 */
.grid-stack>.grid-stack-item>.grid-stack-item-content>.btn-grid-close {
    position: absolute;
    right: 6px;
    top: 6px;
    z-index: 2;
}

/* ===========================
   지표 생성 모달 (DashboardCreateForm)
   =========================== */
#dashboardCreateModal .form-inline-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#dashboardCreateModal .form-inline-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    min-width: 16px;
}

#dashboardCreateModal .w80px {
    width: 80px;
}

#dashboardCreateModal .thumbnail-preview {
    margin-top: 8px;
    max-width: 240px;
    max-height: 140px;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background-color: #fafbfd;
}

#dashboardCreateModal .thumbnail-preview img {
    display: block;
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.grid-stack-placeholder>.placeholder-content {
    background-color: #EEF3FF;
    border: 2px dashed var(--primary-3);
    border-radius: 8px;
    inset: 4px;
}

.grid-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.grid-item-header .title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    word-break: keep-all;
}

.btn-grid-close {
    width: 16px;
    height: 16px;
    background: url(../img/contents/ic_modal_close.svg) center / 14px 14px no-repeat;
    text-indent: -9999px;
    overflow: hidden;
    border: 0;
    background-color: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.grid-item-body {
    flex: 1;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.grid-item-body .chart-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-item-body .chart-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 메세지함 미리보기 */
.message-preview-list {
    width: 100%;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-preview-item {
    border-bottom: 1px dashed var(--line);
    padding-bottom: 8px;
}

.message-preview-item:last-child {
    border-bottom: 0;
}

.message-preview-item .msg-title {
    font-size: 13px;
    color: var(--text-2);
    margin: 0 0 4px 0;
    word-break: keep-all;
}

.message-preview-item .msg-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-3, #888);
}

/* ProjectStatus 페이지 — 내 대시보드 그리드 렌더링 */
.dashboard-status-chart:has(> .grid-stack) {
    display: block;
    position: relative;
    width: 100%;
    /* height: 300px; */
    min-height: 240px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.dashboard-status-chart>.grid-stack {
    width: 100%;
    background-color: transparent;
}

/* 읽기 전용 대시보드 내부 차트 — .chart 가 위젯 본문을 꽉 채우도록 강제 */
.dashboard-status-chart .grid-stack-item-content>.widget-mount>.item-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: block;
}

.dashboard-status-chart .grid-stack-item-content>.widget-mount>.item-body>.chart-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.dashboard-status-chart .grid-stack-item-content>.widget-mount>.item-body>.chart-wrap>.chart {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 대시보드 차트 하단 범례 — 최대 N줄 고정 + 세로 스크롤 (공통) */
.chart-dept-project .apexcharts-legend,
.chart-field-project .apexcharts-legend,
.chart-order-agnc-project .apexcharts-legend {
    /* 24/48/72 */
    max-height: 24px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    align-content: flex-start !important;
}

.chart-dept-project .apexcharts-legend::-webkit-scrollbar,
.chart-field-project .apexcharts-legend::-webkit-scrollbar,
.chart-order-agnc-project .apexcharts-legend::-webkit-scrollbar {
    width: 4px;
    height: 0;
}

.chart-dept-project .apexcharts-legend::-webkit-scrollbar-thumb,
.chart-field-project .apexcharts-legend::-webkit-scrollbar-thumb,
.chart-order-agnc-project .apexcharts-legend::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .25);
    border-radius: 2px;
}


/* ===========================
   resizable-table - 테이블 컬럼 너비 드래그 조절
   =========================== */
.data-list:has(> table.resizable-table),
.data-list:has(> .simplebar-wrapper table.resizable-table) {
    overflow-x: auto;
}

.data-list table.resizable-table {
    table-layout: fixed;
    width: auto;
    min-width: 100%;
}

.data-list table.resizable-table td {
    min-width: 0;
    max-width: 0;
}

.data-list table.resizable-table td>a,
.data-list table.resizable-table td>.txt-link,
.data-list table.resizable-table td>span:not(.badge-project-status) {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

table.resizable-table thead th {
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table.resizable-table thead th .col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 2;
}

table.resizable-table thead th .col-resizer:hover,
table.resizable-table thead th .col-resizer:active {
    background: rgba(0, 0, 0, 0.15);
}

/* ===========================
   message-list-item - 읽은 메시지 제목 연하게
   =========================== */
.message-list-item.read .item-title {
    font-weight: 400;
    color: var(--text-7);
}

.message-list-item.read .item-info .writer a {
    color: var(--text-7);
}

.sidebar-indicator.is-placed {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* ===========================
   ContainerFileForm - 이력정보 예시
   =========================== */
.comment-example-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 10px 12px;
    background-color: #F9FAFD;
    border: 1px solid var(--line);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-example-list li {
    font-size: 10px;
    font-weight: 5 00;
    line-height: 1.5;
    color: var(--text-5);
    word-break: keep-all;
}

/* ===========================
   ContainerFileForm - 파일 등록 실패 표출
   =========================== */
.upload-fail-box {
    margin-top: 8px;
    padding: 10px 12px;
    background-color: #FFF5F5;
    border: 1px solid #F5C6CB;
    border-radius: 4px;
}

.upload-fail-box .upload-fail-header {
    font-size: 13px;
    font-weight: 600;
    color: #C0392B;
    margin-bottom: 6px;
}

.upload-fail-box .upload-fail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-fail-box .upload-fail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    line-height: 1.5;
    word-break: keep-all;
}

.upload-fail-box .fail-reason {
    color: var(--text-2);
}

.upload-fail-box .fail-count {
    flex-shrink: 0;
    font-weight: 600;
    color: #C0392B;
}

.upload-fail-box .upload-fail-default {
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px dashed #F5C6CB;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-5);
    word-break: keep-all;
}

/* ===========================
   Quill Editor - 인라인 서식 복구
   =========================== */
.ql-editor em,
.ql-editor i {
    font-style: italic;
}

.ql-editor cite,
.ql-editor address {
    font-style: italic;
}

/* ===========================
   Quill Editor - 링크 스타일 복구
   =========================== */
.ql-editor a,
.ql-editor a:link,
.ql-editor a:visited {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

.ql-editor a:hover {
    opacity: 0.85;
}

/* ===========================
   Quill Editor - 링크 툴팁 위치 보정
   =========================== */
.ql-snow .ql-container {
    position: relative;
}

.ql-snow .ql-tooltip {
    z-index: 10;
}

/* 입력창이 좁아 잘리는 현상 방지 */
.ql-snow .ql-tooltip input[type="text"] {
    width: 220px;
}


/* ========================================
   첨부파일 업로드 프로그레스바
   ======================================== */
.upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.upload-progress-track {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.upload-progress-text {
    min-width: 42px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* 받는사람 태그가 많아도 모달이 가로로 넘치지 않도록 flex 체인 폭을 고정하고 태그 영역만 내부 가로 스크롤 처리.
   overflow:hidden은 받는사람 영역에만 한정 (form-data 전역에 주면 게시판 '구분' 드롭다운이 잘림) */
.board-regist-form .row {
    min-width: 0;
}

.board-regist-form .form-data {
    min-width: 0;
}

.receiver-select-form {
    min-width: 0;
    overflow: hidden;
}

.receiver-select-form .tag-wrap {
    flex: 1 1 0;
    min-width: 0;
}

/* ===========================
   ContainerFileForm - 이력정보 입력 예시 (복사 방지용 이미지)
   =========================== */
.comment-example-image {
    margin: 8px 0 0;
}

.comment-example-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    /* 이미지 드래그/선택 방지 */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}