#orgTree.tree,
#orgTree.tree ul {
    list-style: none;
    padding-left: 1em;
}

#orgTree.tree ul {
    margin-left: 1.5em;
    border-left: 1px dashed #e4e4e4;
    padding-left: 0.5em;
}

#orgTree.tree li {
    margin: 0.5em 0;
    position: relative;
}
#orgTree .tree-node {
    padding: 0.4em 0.8em;
    border-radius: 0.4em;
    transition: background 0.2s;
    display: flex;
    display: inline-block;
}

#orgTree .tree-node:hover {
    background-color: #dceafe;
    cursor: pointer;
}

#orgTree .node-name {
    padding: 0.4em 0.8em;
}

#orgTree .selected-node {
    background-color: #b9d5fe;
    font-weight: 700;
}

#orgTree .tree-icon {
    margin-right: 0.5em;
    color: #0d6efd;
}

#orgTree .toggle-icon {
    padding: 6px 8px; /* 클릭 영역 확보 */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.board-layout {
    margin: 0 auto;
    max-width: 1080px;
}

.board-detail .detail-header {
    padding: 2rem 1rem;
    border-bottom: 1px solid #e4e4e4;
}

.board-detail .detail-header .title {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    word-wrap: break-word;
    word-break: keep-all;
}

.board-detail .detail-header .info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #777;
}

.board-detail .detail-header .info .type::after {
    content: "";
    display: inline-block;
    margin: 0 10px;
    width: 1.1px;
    height: 14px;
    background: #aaa;
    transform: translate(0, 10%);
}

.board-detail .detail-content {
    padding: 3rem 2rem;
}

.board-detail .detail-attach {
    margin: 2rem;
}

.board-detail .detail-attach .file-layer {
    display: flex;
    align-items: center;
    width: 100%;
    height: 70px;
    border: 1px solid #efefef;
    border-radius: 8px;
    padding: 1rem 2rem;
}

.board-detail .detail-attach .file-layer a {
    font-size: 0.925rem;
}

.board-detail .detail-footer {
    padding: 3rem 1rem;
    border-top: 1px solid #e4e4e4;
}

.board-detail .detail-footer .footer-btn {
    display: flex;
    justify-content: flex-end;
}

@media screen and (max-width: 768px) {
    .board-detail .detail-header {
        padding: 1.5rem 0;
        border-bottom: 1px solid #efefef;
    }

    .board-detail .detail-content {
        padding: 2rem 0.5rem;
    }

    .board-detail .detail-attach {
        margin: 1rem;
    }

    .board-detail .detail-footer {
        padding: 2rem 0.5rem;
    }
}

.section-body-content #pc-list {
    display: block;
}

.section-body-content #mobile-list {
    display: none;
}

.section-body-content #mobile-list .board-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .section-body-content #pc-list {
        display: none;
    }
    .section-body-content #mobile-list {
        display: block;
    }
}

.dropdown-toggle-custom {
    background: transparent;
    border: none;
    padding: 4px 8px;
    line-height: 1;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

.dropdown-toggle-custom:hover {
    color: #495057;
}

.dropdown-toggle-custom::after {
    display: none;
}

.dropdown-toggle-custom:focus {
    box-shadow: none;
    outline: 0;
}

/* 폼 헤더 그라데이션 */
.form-header.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* 파일 업로드 스택 */
.file-upload-stack .mb-3:last-child {
    margin-bottom: 0 !important;
}

/* 기존 파일 목록의 삭제 표시 */
.existing-file-item.opacity-50 {
    opacity: 0.5;
    text-decoration: line-through;
}

/* 추가 드롭다운 스타일 (기존에 없던 부분) */
.dropdown-item-danger {
    color: #dc3545 !important;
}

.dropdown-item-danger:hover {
    background: #dc3545;
    color: #fff !important;
}

/* 테이블 호버 효과 (기존에 없던 부분) */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 빈 상태 스타일 (기존에 없던 부분) */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    color: #dee2e6;
}

/* 폼 컨테이너/헤더 */
.form-container {
    max-width: 1080px;
    margin: 0 auto;
}
.form-header {
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}
.form-header.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff;
}

/* 카드 공통 */
.card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
    overflow: hidden;
}
.card-header.bg-light {
    background: #fafafa !important;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 16px;
}
.card-body {
    padding: 18px;
}

/* 폼 요소 */
.required-mark {
    color: #dc3545;
    font-weight: 700;
}
.input-group-text {
    background: #f9fafb;
    border-color: #e5e7eb;
}
.form-control,
.form-select {
    border-color: #e5e7eb;
    border-radius: 10px;
}
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

/* 버튼 톤 */
.btn {
    border-radius: 12px;
}
.btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
}
.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}
.btn-outline-primary {
    border-color: #3b82f6;
    color: #2563eb;
}
.btn-outline-primary:hover {
    background: #eff6ff;
    color: #1d4ed8;
}
.btn-outline-danger {
    border-color: #ef4444;
    color: #ef4444;
}
.btn-outline-danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* ‘항목카드(할 일)’ – add 페이지 */
#customItemsContainer .custom-item {
    background: #fafbff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

/* ‘항목카드(할 일)’ – edit 페이지 */
.item-card {
    background: #fafbff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

/* 하단 고정 액션 바(UX 개선: 항목추가 버튼을 항상 하단에) */
.sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding-top: 10px;
}
.sticky-actions .bar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

/* 리스트 테이블 느낌 통일 */
.table.custom-table thead th {
    background: #fbfbfb;
    border-bottom: 1px solid #e5e7eb;
}
.table-hover tbody tr:hover {
    background: #fcfdff;
}

/* 배지 톤 */
.badge.bg-primary {
    background: #eff6ff !important;
    color: #2563eb;
}
.badge.bg-info {
    background: #e0f2fe !important;
    color: #0369a1;
}

/* 드롭다운 아이콘 버튼 일관성 */
.dropdown-toggle-custom {
    color: #6b7280;
}
.dropdown-toggle-custom:hover {
    color: #374151;
}

/* 빈 상태 */
.empty-state i {
    color: #e5e7eb;
}

/* 공통 컨테이너 */
.ap-form,
.ap-wrap {
    max-width: 900px;
    margin: 0 auto;
}

/* 상단 헤더 배경 */
.ap-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 22px;
    border-radius: 12px;
    margin-bottom: 24px;
}

/* 카드 헤더 톤 통일 */
.ap-card .card-header,
.ap-section .card-header {
    background: #f8f9fa;
}

/* 항목 카드 */
.ap-item {
    border: 1px solid #e9ecef;
    background: #fafafa;
    border-radius: 12px;
}
.ap-item .form-control,
.ap-item .form-select {
    border-radius: 0.75rem;
}

/* 하단 바(비고정) */
.ap-footer-bar {
    background: #f8f9fa;
}

/* 하단 고정 액션 바(ADD용) */
.ap-sticky-addbar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 0.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal .dropdown-menu {
    z-index: 1060 !important;
}

.bootstrap-select > .dropdown-toggle.btn {
    border-radius: 0.5rem;
}
