/* assets/css/style.css */
body {
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    overflow: hidden;
}

/* Bootstrap 툴팁: 항상 최상위 레이어에 표시 (모달, 팝업, 플로팅 패널 위) */
.tooltip {
    z-index: 99999 !important;
}

.tooltip .tooltip-inner {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    max-width: 260px;
}

.app-layout {
    display: flex;
    height: 100vh;
    overflow-y: hidden;
    overflow-x: auto;
}

/* 좌측 사이드바 */
.sidebar {
    width: 300px;
    background-color: #ffffff;
    border-right: 1px solid #e0e4e8;
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e0e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fbfdff;
}

.sidebar-header h5 {
    margin: 0;
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    cursor: pointer;
}

.note-list-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 30px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.note-list-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* 폴더 및 노트 리스트 (Sortable) */
.folder-group {
    margin-bottom: 0px;
}

.folder-header {
    position: relative;
    padding: 10px 65px 10px 15px;
    background-color: #f7f9fc;
    border-bottom: 1px solid #eef2f5;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.folder-header:hover {
    background-color: #f1f5f9;
}

.folder-toggle-icon {
    transition: transform 0.3s ease;
}

.folder-group.is-collapsed .folder-toggle-icon {
    transform: rotate(-90deg);
}

/* 폴더 아이콘 모달 그리드 설정 */
.folder-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 10px;
    height: 280px;
    overflow-y: auto;
}

.folder-icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    height: 42px;
    width: 42px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.folder-icon-item:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

.folder-icon-item.selected {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
}

/* .folder-header styles fixed */
.folder-header {
    position: relative;
    padding: 10px 65px 10px 15px;
    background-color: #f7f9fc;
    border-bottom: 1px solid #eef2f5;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    user-select: none;
}

.folder-header.folder-handle {
    cursor: grab;
}

.folder-header.folder-handle:active {
    cursor: grabbing;
}

.folder-header span.flex-grow-1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-body {
    min-height: 10px;
    background-color: #fff;
}

.note-list-item {
    position: relative;
    padding: 12px 65px 12px 30px;
    border-bottom: 1px solid #f1f4f8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-size: 14px;
    background-color: #fff;
}

.note-list-item:hover {
    background-color: #f4f7fb;
}

.note-list-item.active {
    background-color: #2d4f8c;
    color: #ffffff;
    border-left: 3px solid #5b9cf6;
    padding-left: 27px;
    font-weight: 600;
    /* overflow 클리핑 해결은 JS 오버레이 탭(#sidebarActiveTab)으로 처리 */
}

.note-list-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 폴더 및 노트 공통 설정/삭제 버튼 (절대 위치 고정) */
.folder-settings-btn,
.note-settings-btn {
    position: absolute !important;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
    font-size: 14px;
    opacity: 0 !important;
    cursor: pointer;
    transition: opacity 0.2s, color 0.15s, transform 0.2s;
}

.folder-delete-sidebar-btn,
.note-delete-sidebar-btn {
    position: absolute !important;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
    font-size: 14px;
    opacity: 0 !important;
    cursor: pointer;
    transition: opacity 0.2s, color 0.15s, transform 0.2s;
}

/* 항목 호버 시 투명도 조절 */
.folder-header:hover .folder-settings-btn,
.folder-header:hover .folder-delete-sidebar-btn,
.note-list-item:hover .note-settings-btn,
.note-list-item:hover .note-delete-sidebar-btn {
    opacity: 0.55 !important;
}

/* 버튼 자체 호버 시 효과 */
.folder-settings-btn:hover,
.folder-delete-sidebar-btn:hover,
.note-settings-btn:hover,
.note-delete-sidebar-btn:hover {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* 노트별 특정 버튼 색상 */
.note-settings-btn:hover {
    color: #0d6efd !important;
}

.note-delete-sidebar-btn:hover {
    color: #dc3545 !important;
}

/* 활성 노트(다크 배경)에서 내부 아이콘/설정버튼 색상 유지 */
.note-list-item.active .bi-file-earmark-text {
    color: #a8c8f8 !important;
}

.note-list-item.active .note-settings-btn,
.note-list-item.active .note-delete-sidebar-btn {
    color: rgba(255, 255, 255, 0.7) !important;
}

.note-list-item.active .note-settings-btn:hover,
.note-list-item.active .note-delete-sidebar-btn:hover {
    color: #ffffff !important;
}

.sortable-ghost {
    opacity: 0.4;
}

/* ---------------------------------------------------
 * 사이드바 활성 노트 돌출 탭 오버레이
 * body에 마운트하여 overflow 클리핑 완전히 탈충
 * JS updateActiveTab()이 위치/크기 동적 제어
 * --------------------------------------------------- */
#sidebarActiveTab {
    position: fixed;
    width: 13px;
    /* 2px 사이드바 경계와 중첩 + 11px 돌출 */
    background-color: #2d4f8c;
    /* JS에서 스킨 색상으로 덮어쓰기 */
    border-radius: 0 6px 6px 0;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.30);
    pointer-events: none;
    /* 클릭 투과, 호버 무시 */
    z-index: 200;
    /* 사이드바(z-index:50)보다 위에 */
    display: none;
    /* JS가 활성 노트에 맞게 표시 */
    /* transition 없음: scroll/resize 시 즉각 이동하여 일체감 유지 */
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    background-color: #353535;
    padding: 30px;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}



/* 홈 화면 (대시보드) */
.home-screen-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.home-screen-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #f8f9fa;
    /* 다크 배경에서 가시성 확보되도록 밝게 수정 */
    display: flex;
    align-items: center;
    gap: 10px;
}

.notebook-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.notebook-card {
    width: 220px;
    height: 280px;
    background-color: #fff;
    border-radius: 5px 15px 15px 5px;
    box-shadow: 4px 6px 15px rgba(0, 0, 0, 0.06);
    border-left: 18px solid #0d6efd;
    padding: 25px 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.notebook-card:hover {
    transform: translateY(-8px);
    box-shadow: 4px 12px 20px rgba(0, 0, 0, 0.1);
}

.notebook-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #333;
    word-break: keep-all;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
}

.notebook-date {
    font-size: 13px;
    color: #888;
    margin-top: 15px;
}

.notebook-card-create {
    border-left: 18px solid #198754;
    background-color: #f4fbf7;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #198754;
}

.notebook-card-create i {
    font-size: 45px;
    margin-bottom: 15px;
}

.notepad-container {
    max-width: none;
    width: auto;
    margin: 0 -21px 0 120px;
    display: flex;
    flex-direction: row;
    background-color: transparent;
    gap: 15px;
}

/* 실제 편집기 도화지 영역 */
.notepad-editor-area {
    flex: 1;
    min-height: 1700px;
    position: relative;
    background-color: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    cursor: text;
    border: 1px solid #c8d3e0;
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg width="10" height="32" xmlns="http://www.w3.org/2000/svg"%3E%3Crect y="31" width="10" height="1" fill="%23e4eaf5"/%3E%3C/svg%3E');
    background-position: 0 80px;
}

/* 고정 너비 모드 활성화 시 (1210px 제한 및 좌측 밀착) */
.notepad-container.is-fixed-width {
    justify-content: flex-start;
}

.notepad-container.is-fixed-width .notepad-left-content {
    flex: 0 0 1210px !important;
    max-width: 1210px !important;
}

.notepad-editor-area::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 80px;
    width: 2px;
    background-color: rgba(255, 99, 132, 0.2);
    z-index: 1;
    pointer-events: none;
}

.note-title-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background-color: #ffffff;
    border-bottom: 2px solid #aec2d4;
    z-index: 2;
    display: flex;
    align-items: center;
    padding-left: 45px;
    padding-right: 20px;
}

/* 우측 페이지 네비게이터 */
.page-navigator {
    width: 220px;
    min-width: 220px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 20px;
}

.page-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #fff;
    border-radius: 8px 8px 0 0;
}

.page-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 페이지 섬네일 아이템 */
.page-item {
    position: relative;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.page-item:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-item.active {
    border-color: var(--skin-border, #0d6efd);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.page-item-thumb {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    /* A4 비율 근사치 */
    background-color: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    position: relative;
    transition: background-size 0.2s ease;
}

.page-item:hover .page-item-thumb {
    background-size: 400% auto;
}

.page-item span.page-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(0, 0, 0, 0.35);
    /* 검정색에 65% 투명도 (투영) */
    font-size: 70px;
    font-weight: 900;
    pointer-events: none;
    /* 클릭을 방해하지 않도록 */
    z-index: 2;
}

.btn-delete-page {
    position: absolute;
    top: -12px;
    right: -12px;
    background-color: #dc3545;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.page-item:hover .btn-delete-page {
    display: flex;
}

/* 스킨 연동색 강제 설정용 */
.skin-dark .page-navigator {
    background-color: #2c3e50;
    border-color: #1a252f;
}

.skin-dark .page-nav-header {
    background-color: #34495e;
    color: white;
    border-color: #2c3e50;
}

.skin-dark .page-item-thumb {
    border-color: #7f8c8d;
}

.note-title-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
}

.note-title-input {
    width: 100%;
    font-size: 22pt;
    font-weight: 600;
    color: #2c3e50;
    border: none;
    outline: none;
    background: transparent;
    user-select: none;
    /* 라쏘 드래그 중 텍스트 선택 방지 */
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* 포커스(입력 모드) 상태에서는 텍스트 선택 허용 */
.note-title-input:focus {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
}

.note-title-input::placeholder {
    color: #ccc;
    font-weight: 400;
}

.note-element {
    position: absolute;
    font-size: 16px;
    line-height: 32px;
    color: #2c3e50;
    z-index: 10;
    cursor: default;
    letter-spacing: normal;
}

.note-display {
    white-space: pre-wrap;
    word-break: break-all;
    padding: 0 4px;
    margin: 0;
    outline: 1px solid transparent;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: fit-content;
    max-width: calc(100% - 100px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.note-display:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.note-display.is-selected {
    outline: 1px dashed #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
    z-index: 15;
    cursor: move;
}

.note-display.is-pinned.is-selected {
    outline: 1px solid transparent !important;
    cursor: default;
}

.note-display.is-grouped.is-selected {
    outline: 1px dashed #198754;
    background-color: rgba(25, 135, 84, 0.05);
}

.note-display.is-grouped.is-pinned.is-selected {
    outline: 1px solid transparent !important;
}

.note-input {
    white-space: pre-wrap;
    word-break: break-all;
    padding: 0 4px;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    outline: 1px dashed #0d6efd;
    min-width: 20px;
    width: fit-content;
    max-width: calc(100% - 100px);
    font-family: inherit;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
}

/* 체크박스 디자인 최적화 (높이 및 줄바꿈 수직 정렬 교정) */
.note-display.is-checkbox-block {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.inline-checkbox {
    margin: 0;
    padding: 0;
    width: 18px;
    height: 18px;
    accent-color: #0d6efd;
    cursor: pointer;
    flex-shrink: 0;
    vertical-align: top;
}

.note-display.is-checkbox-block>span {
    display: inline-block;
    word-break: break-all;
}

.checked-text {
    text-decoration: line-through;
    color: #adb5bd !important;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2055;
}

#loadingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 상단 고정 툴바 (Undo) */
.fixed-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #e9eef3 100%);
    border: 1px solid #c8d3e0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    max-width: none;
    margin: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 4px 6px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 5;
}

.fixed-editor-toolbar .btn-undo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
    border: 1px solid #cdd4dc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #495057;
    border-radius: 6px;
    padding: 6px 14px;
}

.fixed-editor-toolbar .btn-undo:hover {
    background: linear-gradient(180deg, #f8f9fa 0%, #e2e6ea 100%);
    color: #212529;
    border-color: #bbc1c7;
}

.fixed-editor-toolbar .btn-undo:active {
    background: #e2e6ea;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 플로팅 툴바 (포토샵 툴박스 스타일) */
.editor-toolbar {
    position: absolute;
    z-index: 2000;
    display: none;
    background: #fff;
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e4e8;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    transition: opacity 0.2s ease;
    width: 125px;
    /* 사이드바 모드에서 1줄로 찌그러지는 현상 방지 및 3개 버튼 강제 유지 */
    max-width: 125px;
}

body[data-toolbar-mode="popup"] .editor-toolbar {
    cursor: grab;
}

body[data-toolbar-mode="popup"] .editor-toolbar:active {
    cursor: grabbing;
    transition: none;
}

body[data-toolbar-mode="sidebar"] .editor-toolbar {
    cursor: default;
    margin-right: 12px;
}

.editor-toolbar.active {
    display: flex;
}

.editor-toolbar .btn-tool {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: #495057;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.editor-toolbar .btn-tool:hover {
    background: #f0f2f5;
    color: #0d6efd;
}

.editor-toolbar .btn-tool.active {
    background: #eaf1fa;
    color: #0d6efd;
    font-weight: bold;
}

.editor-toolbar .divider {
    width: 100%;
    height: 1px;
    background: #e4e8ec;
    margin: 2px 0;
    flex-shrink: 0;
}

/* 다중 선택 툴바 확장 영역 */
.multi-tool-group {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 4px;
}

.editor-toolbar.is-multi .multi-tool-group {
    display: flex;
}

/* URL 북마크 시각적 렌더링 */
.inline-url-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: text-bottom;
}

.inline-url-link {
    color: #4285f4;
    text-decoration: none;
    word-break: break-all;
}

.inline-url-link:hover {
    text-decoration: underline;
}

/* 다중 드래그 선택 올가미 스타일 */
.lasso-selection-box {
    position: absolute;
    border: 1px solid rgba(13, 110, 253, 0.8);
    background-color: rgba(13, 110, 253, 0.1);
    z-index: 9999;
    pointer-events: none;
}

/* 구글 로그인 커튼 화면 */
#loginOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #353535;
    /* 사용자 요청 배경색 */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.login-box {
    background: #fff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    text-align: center;
    border: 1px solid #e0e4e8;
    max-width: 400px;
    width: 90%;
}

/* 구글 로그인 버튼 중앙 정렬 강제 */
.g_id_signin {
    display: flex;
    justify-content: center;
}


/* 테마 스킨 컬러 피커 UI */
.skin-option {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.skin-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.skin-option.active {
    border-color: #0d6efd !important;
    outline: 3px solid rgba(13, 110, 253, 0.4);
}

/* 테마별 사이드바 오버라이드 색상 변수 적용 
   (자바스크립트가 body 태그에 data-sidebar-skin="skin-1" 등을 씌울 때 동작) */
body[data-sidebar-skin="default"] {
    background-color: inherit;
}

/* default defaults to current logic */

/* 10가지 스킨을 위한 동적 재정의 목록 */
body[data-sidebar-skin="skin-1"] .sidebar {
    background-color: #5542b6;
    border-right: none;
}

body[data-sidebar-skin="skin-1"] .sidebar-header {
    background-color: #4a389d;
    border-bottom: none;
}

body[data-sidebar-skin="skin-1"] .sidebar * {
    color: #f8f9fc !important;
}

body[data-sidebar-skin="skin-1"] .note-list-item {
    background-color: #5542b6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-1"] .note-list-item:hover {
    background-color: #644ecf;
}

body[data-sidebar-skin="skin-1"] .note-list-item.active {
    background-color: #43338f;
    border-left-color: #ffc107;
    color: #ffc107 !important;
}

body[data-sidebar-skin="skin-1"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-1"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-2"] .sidebar {
    background-color: #0b5e67;
    border-right: none;
}

body[data-sidebar-skin="skin-2"] .sidebar-header {
    background-color: #094d54;
    border-bottom: none;
}

body[data-sidebar-skin="skin-2"] .sidebar * {
    color: #ebfcf8 !important;
}

body[data-sidebar-skin="skin-2"] .note-list-item {
    background-color: #0b5e67;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-2"] .note-list-item:hover {
    background-color: #0f7580;
}

body[data-sidebar-skin="skin-2"] .note-list-item.active {
    background-color: #084950;
    border-left-color: #20c997;
    color: #20c997 !important;
}

body[data-sidebar-skin="skin-2"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-2"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-3"] .sidebar {
    background-color: #5c0792;
    border-right: none;
}

body[data-sidebar-skin="skin-3"] .sidebar-header {
    background-color: #4b0578;
    border-bottom: none;
}

body[data-sidebar-skin="skin-3"] .sidebar * {
    color: #fae8ff !important;
}

body[data-sidebar-skin="skin-3"] .note-list-item {
    background-color: #5c0792;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-3"] .note-list-item:hover {
    background-color: #7109b3;
}

body[data-sidebar-skin="skin-3"] .note-list-item.active {
    background-color: #46046e;
    border-left-color: #d8b4fe;
    color: #d8b4fe !important;
}

body[data-sidebar-skin="skin-3"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-3"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-4"] .sidebar {
    background-color: #da324b;
    border-right: none;
}

body[data-sidebar-skin="skin-4"] .sidebar-header {
    background-color: #b5253b;
    border-bottom: none;
}

body[data-sidebar-skin="skin-4"] .sidebar * {
    color: #ffeeef !important;
}

body[data-sidebar-skin="skin-4"] .note-list-item {
    background-color: #da324b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-4"] .note-list-item:hover {
    background-color: #ee3c57;
}

body[data-sidebar-skin="skin-4"] .note-list-item.active {
    background-color: #a81c2f;
    border-left-color: #ffdae0;
    color: #ffdae0 !important;
}

body[data-sidebar-skin="skin-4"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-4"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-5"] .sidebar {
    background-color: #f77f00;
    border-right: none;
}

body[data-sidebar-skin="skin-5"] .sidebar-header {
    background-color: #d66c00;
    border-bottom: none;
}

body[data-sidebar-skin="skin-5"] .sidebar * {
    color: #fff9f0 !important;
}

body[data-sidebar-skin="skin-5"] .note-list-item {
    background-color: #f77f00;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-5"] .note-list-item:hover {
    background-color: #ff8c0a;
}

body[data-sidebar-skin="skin-5"] .note-list-item.active {
    background-color: #c26100;
    border-left-color: #ffe6c7;
    color: #ffe6c7 !important;
}

body[data-sidebar-skin="skin-5"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-5"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-6"] .sidebar {
    background-color: #4b52bb;
    border-right: none;
}

body[data-sidebar-skin="skin-6"] .sidebar-header {
    background-color: #3b4299;
    border-bottom: none;
}

body[data-sidebar-skin="skin-6"] .sidebar * {
    color: #eff0fa !important;
}

body[data-sidebar-skin="skin-6"] .note-list-item {
    background-color: #4b52bb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-6"] .note-list-item:hover {
    background-color: #5c64cf;
}

body[data-sidebar-skin="skin-6"] .note-list-item.active {
    background-color: #363c87;
    border-left-color: #cfd2fb;
    color: #cfd2fb !important;
}

body[data-sidebar-skin="skin-6"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-6"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-7"] .sidebar {
    background-color: #8c53e8;
    border-right: none;
}

body[data-sidebar-skin="skin-7"] .sidebar-header {
    background-color: #723bc9;
    border-bottom: none;
}

body[data-sidebar-skin="skin-7"] .sidebar * {
    color: #f5edff !important;
}

body[data-sidebar-skin="skin-7"] .note-list-item {
    background-color: #8c53e8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-7"] .note-list-item:hover {
    background-color: #9f67fa;
}

body[data-sidebar-skin="skin-7"] .note-list-item.active {
    background-color: #652eb8;
    border-left-color: #e5ccff;
    color: #e5ccff !important;
}

body[data-sidebar-skin="skin-7"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-7"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-8"] .sidebar {
    background-color: #20c997;
    border-right: none;
}

body[data-sidebar-skin="skin-8"] .sidebar-header {
    background-color: #17a379;
    border-bottom: none;
}

body[data-sidebar-skin="skin-8"] .sidebar * {
    color: #e7fcf6 !important;
}

body[data-sidebar-skin="skin-8"] .note-list-item {
    background-color: #20c997;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-8"] .note-list-item:hover {
    background-color: #26e0a8;
}

body[data-sidebar-skin="skin-8"] .note-list-item.active {
    background-color: #138764;
    border-left-color: #c9ffe8;
    color: #c9ffe8 !important;
}

body[data-sidebar-skin="skin-8"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-8"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-9"] .sidebar {
    background-color: #0a1f33;
    border-right: none;
}

body[data-sidebar-skin="skin-9"] .sidebar-header {
    background-color: #071524;
    border-bottom: none;
}

body[data-sidebar-skin="skin-9"] .sidebar * {
    color: #dce7f2 !important;
}

body[data-sidebar-skin="skin-9"] .note-list-item {
    background-color: #0a1f33;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-9"] .note-list-item:hover {
    background-color: #0e2b47;
}

body[data-sidebar-skin="skin-9"] .note-list-item.active {
    background-color: #05101a;
    border-left-color: #63a2df;
    color: #63a2df !important;
}

body[data-sidebar-skin="skin-9"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-9"] .folder-body {
    background-color: transparent;
}

body[data-sidebar-skin="skin-10"] .sidebar {
    background-color: #4e342e;
    border-right: none;
}

body[data-sidebar-skin="skin-10"] .sidebar-header {
    background-color: #3e2723;
    border-bottom: none;
}

body[data-sidebar-skin="skin-10"] .sidebar * {
    color: #ede6e4 !important;
}

body[data-sidebar-skin="skin-10"] .note-list-item {
    background-color: #4e342e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-sidebar-skin="skin-10"] .note-list-item:hover {
    background-color: #5d4039;
}

body[data-sidebar-skin="skin-10"] .note-list-item.active {
    background-color: #38241f;
    border-left-color: #d1b8b2;
    color: #d1b8b2 !important;
}

body[data-sidebar-skin="skin-10"] .folder-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

body[data-sidebar-skin="skin-10"] .folder-body {
    background-color: transparent;
}



/* -------------------------------------
 * 팝업 정렬 모드 (Modal Sort Mode)
 * ------------------------------------- */
.sortable-popup-item {
    cursor: grab;
    background-color: #fff;
    border: 1px solid #e0e4e8;
    margin-bottom: 6px;
    border-radius: 6px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    font-size: 14px;
}

.sortable-popup-item:active {
    cursor: grabbing;
}

.sortable-popup-item .drag-handle {
    margin-right: 12px;
    color: #ced4da;
}

.sortable-popup-item.sortable-ghost {
    opacity: 0.4;
    background-color: #e9ecef;
    border: 1px dashed #adb5bd;
}

/* 툴바 정렬 버튼 활성화 시 색상 변경 */
#toolSort.is-active {
    background-color: #e9ecef;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1);
    color: #0d6efd !important;
}

/* === 타이머 알람 시스템 시각 효과 === */
.timer-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.4);
    pointer-events: none;
    z-index: 10;
}

@keyframes timerBlink {
    0% {
        background-color: rgba(220, 53, 69, 0.0);
        border-color: transparent;
    }

    50% {
        background-color: rgba(220, 53, 69, 0.2);
        border-color: #dc3545;
    }

    100% {
        background-color: rgba(220, 53, 69, 0.0);
        border-color: transparent;
    }
}

.note-display.is-ringing {
    animation: timerBlink 1s infinite alternate;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.note-display.is-ringing .timer-badge {
    animation: bounce 0.2s infinite alternate;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-4px);
    }
}

/* 프로필 팝업 컬러 리셋 (사이드바 내부 상속으로 인한 스킨 컬러 오버라이드 방어) */
body[data-sidebar-skin] .sidebar .profile-popup * {
    color: #212529 !important;
}

body[data-sidebar-skin] .sidebar .profile-popup .text-muted {
    color: #6c757d !important;
}

body[data-sidebar-skin] .sidebar .profile-popup #dispProfileImgLarge {
    color: #ffffff !important;
}

/* --------------------------------------------------------- */
/* 체크박스 객체: 체크박스를 항상 첫 줄 상단에 고정          */
/* --------------------------------------------------------- */
.is-checkbox-block {
    display: flex !important;
    align-items: flex-start !important;
    /* 세로 중앙이 아닌 상단 기준 정렬 */
    gap: 6px;
}

/* 체크 인풋 자체의 세로 위치를 첫 줄 베이스라인에 고정 */
.is-checkbox-block .inline-checkbox {
    flex-shrink: 0;
    /* 크기 축소 방지 */
    margin-top: 8px;
    /* 32px line-height에서 체크박스를 첫줄 중앙 근처로 보정 */
    cursor: pointer;
}

/* 텍스트 영역 - 32px 줄간격 상속 유지, 줄바꿈 지원 */
.is-checkbox-block span {
    flex: 1;
    line-height: inherit;
    /* .note-element의 32px line-height 상속 */
    word-break: break-word;
    white-space: pre-wrap;
    /* 엔터 줄바꿈 그대로 표시 */
}

/* 취소선 스타일 */
.checked-text {
    text-decoration: line-through;
    color: #adb5bd;
}
/* Edge Scroll Panner Indicator */
.edge-scroll-indicator {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 200px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(9, 30, 66, 0.08) 100%);
    z-index: 9999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    font-size: 32px;
    color: #6c757d;
    transition: background 0.2s, color 0.2s;
}
.edge-scroll-indicator:hover {
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(13, 110, 253, 0.2) 100%);
    color: #0d6efd;
}

/* Left Edge Scroll Panner Indicator */
.edge-scroll-indicator.left-edge {
    left: 250px;
    right: auto;
    background: linear-gradient(-90deg, rgba(255,255,255,0) 0%, rgba(9, 30, 66, 0.08) 100%);
    justify-content: flex-start;
    padding-left: 15px;
    padding-right: 0;
}
.edge-scroll-indicator.left-edge:hover {
    background: linear-gradient(-90deg, rgba(255,255,255,0) 0%, rgba(13, 110, 253, 0.2) 100%);
}

/* ---------------------------------------------------
 * 커스텀 컨텍스트 메뉴 (우클릭 팝업)
 * --------------------------------------------------- */
.custom-context-menu {
    position: absolute;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 6px 0;
    min-width: 180px;
}

.custom-context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-context-menu li {
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.custom-context-menu li i {
    margin-right: 10px;
    font-size: 16px;
    color: #6c757d;
}

.custom-context-menu li:hover {
    background-color: #f4f6f9;
    color: #0d6efd;
}

.custom-context-menu li:hover i {
    color: #0d6efd;
}

.custom-context-menu li.menu-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 4px 0;
    padding: 0;
    cursor: default;
}

/* ---------------------------------------------------
 * 이미지 드래그 앤 드롭 툴팁 피드백
 * --------------------------------------------------- */
.drag-drop-tooltip {
    position: fixed;
    z-index: 10000;
    background: rgba(13, 110, 253, 0.9);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none; /* 마우스 이벤트를 방해하지 않도록 */
}

.drag-drop-tooltip i {
    margin-right: 0;
}
