/* =========================================================
   시놀로지 NAS 업무스케줄러 - High-End Minimalist Design System
   Matches 쇼핑몰 OS (Notion Workspace Edition) Architecture
   ========================================================= */

:root {
  color-scheme: light;
  /* 배경 팔레트 */
  --bg-app: #F7F6F3;
  --bg-main: #FAFAF9;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F8F8F7;
  --bg-subtle: #F4F3F0;
  --bg-active: #EAE9E5;

  /* 테두리 */
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-card: #E8E7E3;
  --border-focus: #2A2926;

  /* 텍스트 */
  --text-main: #2A2926;
  --text-secondary: #6B6965;
  --text-tertiary: #96948F;
  --text-link: #1A73E8;

  /* 상태별 색상 */
  --color-pending: #CB8B18;
  --color-pending-bg: #FDF8ED;
  --color-pending-border: #F7E4BD;

  --color-progress: #2563EB;
  --color-progress-bg: #EFF6FF;
  --color-progress-border: #BFDBFE;

  --color-completed: #0F7B6C;
  --color-completed-bg: #E8F5F1;
  --color-completed-border: #BBE5D9;

  --color-high: #D44C47;
  --color-high-bg: #FDF0ED;

  /* 섀도우 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 20px 48px rgba(0, 0, 0, 0.16);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* 스크롤바 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* 메인 컨테이너 */
.app-container {
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.scheduler-frame {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* 상단 헤더 */
.top-header {
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-card);
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 최상위 대메뉴 전환 (업무스케줄러 ↔ 마인드맵) */
.main-service-nav {
  display: flex;
  align-items: center;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  gap: 4px;
}

.service-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.6);
}

.service-nav-btn.active {
  background: #FFFFFF;
  color: #2563EB;
  border-color: #BFDBFE;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.service-nav-icon {
  font-size: 16px;
}

.service-nav-title {
  letter-spacing: -0.3px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background-color: var(--color-progress);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: center;
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-main);
  line-height: 1;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

/* 상단 날짜 빠른 보기 & 기간 선택 바 (Date Filter Bar) */
.date-filter-bar {
  background-color: #FAF9F6;
  border-bottom: 1px solid var(--border-card);
  padding: 8px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.date-preset-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-date-chip {
  border: 1px solid var(--border-card);
  background-color: #FFFFFF;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-date-chip:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: #D1D5DB;
}

.btn-date-chip.active {
  background-color: var(--color-progress);
  color: #FFFFFF;
  border-color: var(--color-progress);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.btn-date-chip.today-highlight {
  border-color: #D1D5DB;
  background-color: #FFFFFF;
  color: #1D4ED8;
  font-weight: 600;
}
.btn-date-chip.today-highlight:hover {
  background-color: #EFF6FF;
  border-color: #93C5FD;
}
.btn-date-chip.today-highlight.active {
  background-color: #1D4ED8;
  color: #FFFFFF;
  border-color: #1D4ED8;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.3);
}

.date-custom-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

.date-custom-input {
  border: none;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-main);
  background: transparent;
  outline: none;
}

/* 프로젝트 필터 바 */
.project-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.project-select-filter {
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 11px;
  font-family: inherit;
  background-color: #FFFFFF;
  color: var(--text-main);
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* 상태 다중 필터 그룹 */
.status-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.kanban-column.is-filtered-out {
  opacity: 0.6;
  background-color: #F8FAFC;
}
.kanban-column.is-filtered-out .column-header {
  background-color: #F1F5F9;
}
.kanban-filtered-notice {
  text-align: center;
  padding: 32px 12px;
  color: var(--text-tertiary);
  font-size: 11.5px;
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-sm);
  margin: 12px;
  background: rgba(255, 255, 255, 0.7);
}

/* 네비게이션 & 통계 바 */
.nav-metrics-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-card);
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.view-tabs-group {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-card);
  font-size: 12px;
  font-weight: 600;
}

.view-tab-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.view-tab-btn:hover {
  color: var(--text-main);
}

.view-tab-btn.active {
  background-color: var(--bg-surface);
  color: var(--color-progress);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 통계 및 완료율 */
.metrics-section {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.metric-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.metric-count {
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
}

.metric-count.total { background: #F3F4F6; color: #374151; }
.metric-count.pending { background: var(--color-pending-bg); color: var(--color-pending); border: 1px solid var(--color-pending-border); }
.metric-count.progress { background: var(--color-progress-bg); color: var(--color-progress); border: 1px solid var(--color-progress-border); }
.metric-count.completed { background: var(--color-completed-bg); color: var(--color-completed); border: 1px solid var(--color-completed-border); }

.rate-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border-card);
}

.rate-text-box {
  text-align: right;
  line-height: 1.1;
}

.rate-label {
  font-size: 9px;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
}

.rate-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-completed);
}

.rate-bar-track {
  width: 90px;
  height: 8px;
  background-color: #E5E7EB;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.rate-bar-fill {
  height: 100%;
  background-color: var(--color-completed);
  border-radius: var(--radius-full);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 버튼 스타일 */
.btn-primary {
  background-color: var(--color-progress);
  color: #FFFFFF;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s ease;
}
.btn-primary:hover {
  background-color: #1D4ED8;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}
.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
}

/* 프로젝트 뱃지 */
.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
}
.project-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* 뷰 본문 컨테이너 */
.view-container {
  padding: 16px 20px;
  background-color: var(--bg-main);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.view-pane {
  display: none;
  flex-direction: column;
  flex: 1;
}
.view-pane.active {
  display: flex;
}

/* =========================================================
   1. 보드 보기 (Kanban)
   ========================================================= */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  flex: 1;
}

.kanban-column {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}
.status-dot.pending { background-color: var(--color-pending); }
.status-dot.progress { background-color: var(--color-progress); }
.status-dot.completed { background-color: var(--color-completed); }

.kanban-dropzone {
  flex: 1;
  min-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.kanban-dropzone.dragover {
  background-color: rgba(37, 99, 235, 0.08) !important;
  outline: 2px dashed var(--color-progress) !important;
  outline-offset: -3px;
}

/* 드래그 중 다른 카드들만 포인터 이벤트 차단 (드롭존 수신 정확도 보장) */
body.is-dragging-card .kanban-card:not(.dragging) {
  pointer-events: none !important;
}

/* 칸반 카드 */
.kanban-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-card);
  cursor: grab;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
  user-select: none;
  -webkit-user-drag: element;
  touch-action: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card.dragging {
  opacity: 0.4 !important;
  transform: scale(0.98);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: none !important;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: #D1D5DB;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

.card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 500;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* =========================================================
   2. 목록 보기 (Table & Headers Filter + Inline Editable)
   ========================================================= */
.list-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.list-filter-guide {
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-card);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.list-table th {
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-card);
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-secondary);
  vertical-align: middle;
}

.list-table td {
  border-bottom: 1px solid var(--border-card);
  padding: 10px 12px;
  color: var(--text-main);
  vertical-align: middle;
}

.list-table tr:hover {
  background-color: var(--bg-surface-hover);
}

.filter-select {
  font-size: 11px;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-xs);
  padding: 2px 4px;
  background-color: #FFFFFF;
  margin-left: 4px;
  font-family: inherit;
}

/* 태그 다중 선택 필터 트리거 & 팝오버 */
.filter-multiselect-trigger {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  background-color: #FFFFFF;
  margin-left: 4px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-main);
  line-height: 1.2;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.filter-multiselect-trigger:hover {
  border-color: var(--color-progress);
  background-color: #F8FAFC;
}

.filter-multiselect-trigger.active {
  background-color: #EFF6FF;
  border-color: #3B82F6;
  color: #1D4ED8;
  font-weight: 600;
}

.filter-multiselect-menu {
  width: 240px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14), 0 4px 10px rgba(0, 0, 0, 0.06);
  padding: 10px 12px;
  font-size: 12px;
  text-align: left;
  font-weight: normal;
  box-sizing: border-box;
}

.filter-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 6px;
}

.filter-menu-title {
  font-weight: 700;
  font-size: 11.5px;
  color: var(--text-main);
}

.btn-clear-filter {
  background: none;
  border: none;
  font-size: 10.5px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.12s ease;
}

.btn-clear-filter:hover {
  color: var(--color-high);
  background-color: #FEF2F2;
}

.filter-match-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 4px 6px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-xs);
  font-size: 10.5px;
}

.filter-mode-label {
  color: var(--text-secondary);
  font-size: 10.5px;
}

.filter-mode-pills {
  display: flex;
  gap: 3px;
}

.mode-pill {
  border: 1px solid transparent;
  background: none;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  transition: all 0.12s ease;
}

.mode-pill.active {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: var(--color-progress);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.filter-menu-search-wrap {
  margin-bottom: 6px;
}

.filter-menu-search {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  font-size: 11px;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-xs);
  outline: none;
  font-family: inherit;
}

.filter-menu-search:focus {
  border-color: var(--color-progress);
}

.filter-tag-list {
  max-height: 170px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}

.filter-tag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.1s ease;
  font-size: 11.5px;
}

.filter-tag-item:hover {
  background-color: #F8FAFC;
}

.filter-tag-item input[type="checkbox"] {
  cursor: pointer;
  margin: 0;
  accent-color: var(--color-progress);
}

.filter-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-tag-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-tertiary);
}

.filter-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid #F1F5F9;
  margin-top: 6px;
}

.btn-select-all {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 3px 6px;
}

.btn-select-all:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.btn-apply-filter {
  background: var(--color-progress);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-xs);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-apply-filter:hover {
  background-color: #1D4ED8;
}

/* 인라인 편집 셀 (Inline Editable Cell) */
.inline-cell-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.inline-cell-badge:hover {
  box-shadow: 0 0 0 1px #9CA3AF;
  transform: translateY(-1px);
}

.inline-title-cell {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-xs);
  transition: background-color 0.15s ease;
}
.inline-title-cell:hover {
  background-color: #F3F4F6;
  text-decoration: underline;
}

/* =========================================================
   3. 일정 타임라인 (15분 스냅 & 핸들 리사이즈)
   ========================================================= */
.timeline-layout {
  display: flex;
  gap: 16px;
  flex: 1;
}

.timeline-main-pane {
  flex: 1;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.timeline-toolbar {
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-card);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

/* 타임라인 상단 날짜별 원클릭 퀵 이동 탭 바 */
.timeline-date-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 16px;
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-card);
  scrollbar-width: thin;
}

.timeline-date-strip::-webkit-scrollbar {
  height: 4px;
}
.timeline-date-strip::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.timeline-date-pill {
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  background-color: #FFFFFF;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.timeline-date-pill:hover {
  border-color: #93C5FD;
  background-color: #EFF6FF;
  color: var(--color-progress);
}

.timeline-date-pill.active {
  background-color: var(--color-progress);
  color: #FFFFFF;
  border-color: var(--color-progress);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.timeline-date-pill .pill-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 8px;
  background-color: #F1F5F9;
  color: var(--text-secondary);
  font-weight: 600;
}

.timeline-date-pill.active .pill-badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.timeline-canvas-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  height: 580px;
  max-height: 580px;
  padding: 16px 20px 24px 16px;
  background-color: #FFFFFF;
}

.timeline-container {
  position: relative;
  width: 100%;
  height: 1152px;
  min-height: 1152px;
  box-sizing: border-box;
}

/* 시간 축 마커 열 (00:00 ~ 24:00) - Flex Column 자연 흐름 방식 */
.timeline-hour-column {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 56px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  user-select: none;
  z-index: 5;
}

.timeline-hour-label {
  height: 48px;
  box-sizing: border-box;
  text-align: right;
  padding-right: 8px;
  font-family: "Pretendard", monospace, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #4B5563;
  line-height: 1;
  margin-top: -6px;
  flex-shrink: 0;
}

/* 그리드 레이어 (시간선 & 30분 보조선) */
.timeline-grid-layer {
  position: absolute;
  left: 56px;
  right: 0;
  top: 0;
  height: 1152px;
  border-left: 2px solid #CBD5E1;
  pointer-events: none;
  background-size: 100% 48px;
  background-image: 
    linear-gradient(to bottom, #E2E8F0 1px, transparent 1px),
    linear-gradient(to bottom, #F8FAFC 1px, transparent 1px);
  background-position: 0 0, 0 24px;
}

/* 작업 카드 레이어 */
.timeline-card-layer {
  position: absolute;
  left: 58px;
  right: 12px;
  top: 0;
  height: 1152px;
  z-index: 10;
  pointer-events: auto;
}

/* 날짜별 일정 비어있을 때 친절한 안내 배너 */
.timeline-empty-notice {
  position: absolute;
  top: 100px;
  left: 80px;
  right: 24px;
  background-color: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  z-index: 2;
}

.timeline-empty-notice b {
  color: var(--color-progress);
}

/* 3-Way 카드 퀵 액션 버튼 (복사 & 삭제) */
.btn-card-action {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  padding: 2px 5px;
  font-size: 11px;
  line-height: 1;
  color: var(--text-tertiary);
  transition: all 0.15s ease;
}

.btn-card-action:hover {
  background-color: #F1F5F9;
  border-color: var(--border-card);
  color: var(--text-main);
}

.btn-card-action.del:hover {
  background-color: #FEE2E2;
  border-color: #FCA5A5;
  color: #DC2626;
}

/* 타임라인 카드 내부 퀵 버튼 */
.btn-timeline-action {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
  color: #FFFFFF;
  padding: 1px 5px;
  font-size: 10px;
  line-height: 1.2;
  transition: background 0.15s ease;
}

.btn-timeline-action:hover {
  background: rgba(0, 0, 0, 0.5);
}

.btn-timeline-action.del:hover {
  background: rgba(220, 38, 38, 0.9);
}

.timeline-card {
  position: absolute;
  left: 6px;
  right: 6px;
  min-height: 28px;
  background-color: #2563EB;
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  cursor: move;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.15s ease, left 0.2s ease, right 0.2s ease;
  z-index: 10;
  box-sizing: border-box;
}

.timeline-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.95);
  z-index: 99 !important;
}

.timeline-card.layered-top {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
}

/* 계단식 부채꼴 호버 펼침 (Hover Fan-out) */
.timeline-card.cluster-expanded {
  z-index: 70;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.85);
}

.timeline-card.cluster-expanded:hover {
  z-index: 99 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 0 2px #FFFFFF !important;
}

/* 동일 시간대 겹침 안내 뱃지 */
.cluster-stack-badge {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  pointer-events: auto;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cluster-stack-badge:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: #FFFFFF;
}

.timeline-card.pending {
  background-color: #D97706;
}

.timeline-card.completed {
  background-color: #0D9488;
}

/* 인라인 드롭다운 전역 투명 백드롭 (어디를 눌러도 100% 즉시 닫힘) */
.popover-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2990;
  background: transparent;
  cursor: default;
}

.resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  cursor: s-resize;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.resize-handle:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.resize-pill {
  width: 24px;
  height: 2px;
  background-color: #FFFFFF;
  border-radius: 2px;
}

.drag-time-badge {
  position: absolute;
  top: -26px;
  left: 4px;
  background-color: #111827;
  color: #FFFFFF;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  z-index: 20;
}

/* 시간 미정 패널 */
.undated-pane {
  width: 280px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.undated-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 10px;
}

.undated-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =========================================================
   태그 자동완성 & 키보드 탐색 인풋 컴포넌트 (Slack/Notion 스타일)
   ========================================================= */
.tag-autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.tag-input-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px 8px;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-sm);
  background-color: #FFFFFF;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tag-input-box:focus-within {
  border-color: var(--color-progress);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.tag-chip-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  user-select: none;
}

.tag-chip-del {
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  color: #3B82F6;
  margin-left: 2px;
}
.tag-chip-del:hover {
  color: #EF4444;
}

/* 태그 관리 모달 내 태그 아이템 & 상태 뱃지 */
.tag-manage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-card);
  padding: 5px 8px 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}
.tag-manage-chip:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.tag-manage-name {
  font-weight: 600;
  color: #1E40AF;
}
.tag-manage-status {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 500;
}
.tag-manage-status.status-active {
  background-color: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}
.tag-manage-status.status-trash {
  background-color: #F3F4F6;
  color: #6B7280;
  border: 1px solid #E5E7EB;
}
.tag-manage-status.status-unused {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}
.tag-manage-del-btn {
  background: none;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #9CA3AF;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 2px;
  padding: 0;
}
.tag-manage-del-btn:hover {
  background-color: #FEE2E2;
  color: #DC2626;
}

.tag-typing-input {
  border: none;
  outline: none;
  font-size: 12px;
  font-family: inherit;
  flex: 1;
  min-width: 120px;
  padding: 4px 2px;
  color: var(--text-main);
  background: transparent;
}

/* 태그 드롭다운 팝업 */
.tag-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 4px;
}

.tag-dropdown-menu.open {
  display: flex;
}

.tag-dropdown-item {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
  transition: background-color 0.1s ease;
}

.tag-dropdown-item:hover, .tag-dropdown-item.active {
  background-color: #EFF6FF;
  color: #1D4ED8;
  font-weight: 600;
}

.tag-dropdown-create-item {
  padding: 7px 10px;
  font-size: 11px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--color-progress);
  background-color: #F8FAFC;
  border-top: 1px solid var(--border-subtle);
  font-weight: 600;
}
.tag-dropdown-create-item:hover, .tag-dropdown-create-item.active {
  background-color: #EFF6FF;
}

/* =========================================================
   모달 공통
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open,
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-window,
.modal-backdrop.active .modal-window {
  transform: translateY(0);
}

.modal-header {
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-card);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 14px;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-tertiary);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 12px;
}

.modal-body > * {
  flex-shrink: 0;
}

.modal-footer {
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-card);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 폼 컨트롤 */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 12px;
}

.form-input, .form-textarea, .form-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #2563EB !important;
  background-color: #FFFFFF !important;
  color-scheme: light !important;
  opacity: 1 !important;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  opacity: 1 !important;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-progress) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18) !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  background-color: #FFFFFF !important;
}

/* 브라우저 자동완성(Autofill) 시 텍스트 투명화/배경색 반전 방지 */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #FFFFFF inset !important;
  -webkit-text-fill-color: #0F172A !important;
  color: #0F172A !important;
  caret-color: #2563EB !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* WebKit 날짜 인풋 안정화 */
input[type="date"].form-input {
  min-height: 38px;
  appearance: auto;
  -webkit-appearance: auto;
}
input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1.2em;
}

/* 파일 업로드 D&D 존 */
.file-dropzone {
  border: 2px dashed #D1D5DB;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background-color: var(--bg-main);
  transition: all 0.15s ease;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--color-progress);
  background-color: var(--color-progress-bg);
}

/* 토스트 메시지 */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #1F2937;
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 2000;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* 반응형 */
@media (max-width: 900px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
  .timeline-layout {
    flex-direction: column;
  }
  .undated-pane {
    width: 100%;
  }
}

/* 타임라인 날짜 이전/다음 이동 화살표 버튼 */
.btn-timeline-arrow {
  cursor: pointer;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  background-color: #FFFFFF;
  color: var(--text-main);
  transition: all var(--trans-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-timeline-arrow:hover {
  background-color: var(--bg-surface-hover);
  border-color: #CBD5E1;
  color: var(--color-progress);
}

.btn-timeline-arrow.today {
  padding: 3px 8px;
  background-color: #EFF6FF;
  border-color: #BFDBFE;
  color: var(--color-progress);
  font-weight: 600;
}

.btn-timeline-arrow.today:hover {
  background-color: #DBEAFE;
}

/* =========================================================
   휴지통 (Trash) 스타일
   ========================================================= */
.trash-badge {
  background-color: var(--color-high);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 2px;
}

.trash-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trash-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  transition: background-color 0.12s ease;
}

.trash-item-row:hover {
  background-color: var(--bg-surface-hover);
}

.trash-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  flex: 1;
  margin-right: 12px;
}

.trash-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trash-item-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trash-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.trash-empty-notice {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* =========================================================
   상세 내용 리치 텍스트 에디터 (WYSIWYG & Fullscreen)
   ========================================================= */
.rich-editor-wrapper {
  position: relative;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rich-editor-wrapper:focus-within {
  border-color: var(--color-progress);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-card);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  user-select: none;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.toolbar-divider {
  width: 1px;
  height: 18px;
  background-color: #CBD5E1;
  margin: 0 3px;
}

.toolbar-select {
  height: 26px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  background-color: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  padding: 0 6px;
  cursor: pointer;
  outline: none;
}
.toolbar-select:focus {
  border-color: var(--color-progress);
}

.toolbar-btn {
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}
.toolbar-btn:hover {
  background-color: #E2E8F0;
  color: var(--text-main);
}
.toolbar-btn.active {
  background-color: #DBEAFE;
  color: var(--color-progress);
  border-color: #BFDBFE;
}
.toolbar-btn.text-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 0 7px;
}

.toolbar-color-label {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background-color 0.1s ease;
}
.toolbar-color-label:hover {
  background-color: #E2E8F0;
}
.toolbar-color-label input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  left: 0;
  top: 0;
}

.fullscreen-toggle-btn {
  background-color: #EFF6FF;
  color: var(--color-progress);
  border: 1px solid #BFDBFE;
  font-size: 11px;
  font-weight: 600;
  padding: 0 8px;
}
.fullscreen-toggle-btn:hover {
  background-color: #DBEAFE;
}

.rich-editor-content {
  min-height: 120px;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px 14px 34px 14px; /* bottom padding for corner fullscreen button */
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
  outline: none;
  word-break: break-word;
}
.rich-editor-content:empty:before {
  content: attr(data-placeholder);
  color: var(--text-tertiary);
  pointer-events: none;
  display: block;
}
.rich-editor-content h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0 6px 0;
  color: var(--text-main);
}
.rich-editor-content h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 4px 0;
  color: var(--text-main);
}
.rich-editor-content h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 6px 0 3px 0;
  color: var(--text-main);
}
.rich-editor-content p {
  margin: 0 0 6px 0;
}
.rich-editor-content ul, .rich-editor-content ol {
  padding-left: 20px;
  margin: 4px 0 6px 0;
}
.rich-editor-content hr {
  border: none;
  border-top: 1px solid var(--border-card);
  margin: 10px 0;
}

/* 체크박스 할 일 항목 */
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0;
  line-height: 1.5;
}
.todo-checkbox {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--color-progress);
}
.todo-text {
  flex: 1;
  outline: none;
}
.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-tertiary);
}

/* 우측 하단 전체 화면 확대 버튼 (사용자 요청 위치) */
.editor-corner-fullscreen-btn {
  position: absolute;
  bottom: 6px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  z-index: 5;
  transition: all 0.15s ease;
}
.editor-corner-fullscreen-btn:hover {
  background-color: #EFF6FF;
  color: var(--color-progress);
  border-color: #BFDBFE;
  transform: scale(1.03);
}

/* =========================================================
   상세 내용 전용 전체화면 팝업 모달 (기존 창 유지 + 웹사이트 전체화면)
   ========================================================= */
.desc-fullscreen-backdrop {
  z-index: 100050 !important; /* taskModalBackdrop(1000)보다 위에 배치 */
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.desc-fullscreen-backdrop.open {
  display: flex !important;
}

.desc-fullscreen-window {
  width: 96vw;
  height: 94vh;
  max-width: 1440px;
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.desc-fullscreen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-card);
  background-color: #FFFFFF;
}

/* 전체화면 작업 제목 입력 상자 */
.desc-fullscreen-title-box {
  padding: 12px 24px 10px 24px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
}

.desc-fullscreen-title-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.desc-fullscreen-title-input {
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  padding: 9px 12px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  outline: none;
  background-color: #FFFFFF;
  color: var(--text-main);
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.desc-fullscreen-title-input:focus {
  border-color: var(--color-progress);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.desc-fs-toolbar {
  padding: 10px 24px;
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-card);
  border-radius: 0 !important;
}

.desc-fullscreen-body-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background-color: #FFFFFF;
  display: block;
}

.desc-fullscreen-editor {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  outline: none;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main);
  word-break: break-word;
  text-align: left;
}
.desc-fullscreen-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--text-tertiary);
  pointer-events: none;
  display: block;
}
.desc-fullscreen-editor h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 14px 0 8px 0;
  color: var(--text-main);
}
.desc-fullscreen-editor h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 12px 0 6px 0;
  color: var(--text-main);
}
.desc-fullscreen-editor h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 4px 0;
  color: var(--text-main);
}
.desc-fullscreen-editor p {
  margin: 0 0 8px 0;
}
.desc-fullscreen-editor ul, .desc-fullscreen-editor ol {
  padding-left: 24px;
  margin: 6px 0 10px 0;
}
.desc-fullscreen-editor hr {
  border: none;
  border-top: 1px solid var(--border-card);
  margin: 16px 0;
}

.desc-fullscreen-footer {
  display: flex;
  align-items: center;
  padding: 10px 24px;
  border-top: 1px solid var(--border-card);
  background-color: #F8FAFC;
}

/* =========================================================
   에디터 우클릭 컨텍스트 서식 메뉴 (Custom Context Menu)
   ========================================================= */
.editor-context-menu {
  position: fixed;
  z-index: 100060;
  display: none;
  width: 276px;
  background: #FFFFFF;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
  padding: 8px;
  user-select: none;
  animation: ctxFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.editor-context-menu.open {
  display: block;
}

@keyframes ctxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ctx-menu-quick-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background-color: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
}

.ctx-quick-btn {
  flex: 1;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.12s ease;
}
.ctx-quick-btn:hover {
  background-color: #E2E8F0;
  color: var(--color-progress);
}

.ctx-v-divider {
  width: 1px;
  height: 16px;
  background-color: var(--border-card);
  margin: 0 2px;
}

.ctx-divider {
  height: 1px;
  background-color: var(--border-card);
  margin: 6px 0;
}

.ctx-menu-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  padding: 4px 8px 2px 8px;
  letter-spacing: 0.3px;
}

.ctx-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-main);
  text-align: left;
  transition: all 0.12s ease;
}
.ctx-menu-item:hover {
  background-color: #F1F5F9;
  color: var(--color-progress);
}

.ctx-item-icon {
  width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
}
.ctx-item-label {
  flex: 1;
  font-weight: 500;
}
.ctx-item-hint {
  font-size: 10px;
  color: var(--text-tertiary);
}
.ctx-item-badge {
  font-size: 9px;
  font-weight: 700;
  background-color: #EFF6FF;
  color: #2563EB;
  padding: 1px 5px;
  border-radius: 3px;
}

.ctx-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 8px;
}
.ctx-color-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ctx-chips-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ctx-color-chip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: transform 0.12s ease;
}
.ctx-color-chip:hover {
  transform: scale(1.25);
}
.ctx-color-chip.transparent-chip {
  background-color: #FFFFFF;
  color: #94A3B8;
  border: 1px dashed #CBD5E1;
}

/* =========================================================
   글자색 & 형광펜 컬러 팔레트 팝오버 (Color Swatch Palette)
   ========================================================= */
.color-palette-popover {
  position: fixed;
  z-index: 100070;
  width: 260px;
  background: #FFFFFF;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.1);
  padding: 10px 12px;
  user-select: none;
  animation: paletteScaleIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes paletteScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.palette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-card);
}

.palette-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
}

.palette-reset-btn {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background: #F1F5F9;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.palette-reset-btn:hover {
  background: #E2E8F0;
  color: var(--color-progress);
}

.palette-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-bottom: 5px;
  letter-spacing: 0.2px;
}

.palette-swatch-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.palette-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  outline: none;
}
.palette-swatch:hover {
  transform: scale(1.18);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
  border-color: rgba(0, 0, 0, 0.35);
}

.palette-divider {
  height: 1px;
  background-color: var(--border-card);
  margin: 6px 0 8px 0;
}

.palette-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  background-color: #F8FAFC;
  border: 1px solid var(--border-card);
  transition: all 0.12s ease;
  position: relative;
}
.palette-custom-row:hover {
  background-color: #EFF6FF;
  border-color: #BFDBFE;
}
.palette-custom-icon {
  font-size: 13px;
}
.palette-custom-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.palette-custom-row:hover .palette-custom-text {
  color: var(--color-progress);
}

.toolbar-color-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px !important;
  gap: 1px;
}

/* =========================================================
   휴지통 할 일 상세 조회 모달 (Trash Item Detail Modal)
   ========================================================= */
.trash-item-row {
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.trash-item-row:hover {
  background-color: #F8FAFC;
  border-color: #CBD5E1;
}

.trash-item-title {
  cursor: pointer;
}
.trash-item-title:hover {
  color: var(--color-progress);
  text-decoration: underline;
}

.trash-detail-meta-box {
  background-color: var(--bg-main);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.trash-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.trash-meta-label {
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 52px;
}
.trash-meta-val {
  color: var(--text-main);
  font-weight: 500;
}

.trash-detail-desc-box {
  background-color: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-height: 120px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-main);
  word-break: break-word;
}
.trash-detail-desc-box:empty:before {
  content: '작성된 상세 지침이나 메모가 없습니다.';
  color: var(--text-tertiary);
  font-style: italic;
}
.trash-detail-desc-box hr {
  border: none;
  border-top: 1px solid var(--border-card);
  margin: 12px 0;
}
.trash-detail-desc-box ul, .trash-detail-desc-box ol {
  padding-left: 20px;
  margin: 6px 0;
}
.trash-detail-desc-box h1 { font-size: 18px; font-weight: 700; margin: 10px 0 4px 0; }
.trash-detail-desc-box h2 { font-size: 16px; font-weight: 700; margin: 8px 0 4px 0; }
.trash-detail-desc-box h3 { font-size: 14px; font-weight: 700; margin: 6px 0 2px 0; }
.trash-detail-desc-box .todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
.trash-detail-desc-box .todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-tertiary);
}

/* =========================================================
   즐겨찾기 (Favorites) 별표 버튼 & 새 작업 즐겨찾기 복제 팝오버
   ========================================================= */
.btn-card-action.btn-fav-card {
  font-size: 13px;
  line-height: 1;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  padding: 2px 4px;
  transition: all 0.15s ease;
}
.btn-card-action.btn-fav-card:hover {
  color: #EAB308;
  transform: scale(1.22);
}
.btn-card-action.btn-fav-card.favorited {
  color: #EAB308 !important;
  text-shadow: 0 0 6px rgba(234, 179, 8, 0.4);
}

.fav-clone-header-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-fav-clone-trigger {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  background-color: #FEF9C3;
  color: #854D0E;
  border: 1px solid #FDE047;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-fav-clone-trigger:hover {
  background-color: #FEF08A;
  border-color: #FACC15;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.25);
  transform: translateY(-1px);
}

#taskModalBackdrop .modal-window {
  max-width: 720px;
  width: 95%;
  overflow: visible;
}
#taskModalBackdrop .modal-header {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}
#taskModalBackdrop .modal-footer {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.fav-clone-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100065;
  width: 420px;
  max-width: min(440px, calc(100vw - 32px));
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08);
  padding: 10px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ctxFadeIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

.fav-clone-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.fav-clone-search-input {
  width: 100%;
  padding: 7px 28px 7px 30px;
  font-size: 11px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  background-color: #F8FAFC;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  color: var(--text-main);
}
.fav-clone-search-input:focus {
  border-color: #2563EB;
  background-color: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.fav-clone-search-icon {
  position: absolute;
  left: 9px;
  font-size: 12px;
  color: var(--text-tertiary);
  pointer-events: none;
  line-height: 1;
}

.fav-clone-search-clear {
  position: absolute;
  right: 8px;
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  display: none;
  line-height: 1;
  border-radius: 50%;
}
.fav-clone-search-clear:hover {
  color: var(--text-main);
  background-color: #E2E8F0;
}

.fav-clone-match-highlight {
  background-color: #FEF08A;
  color: #854D0E;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
}

.fav-clone-list-container {
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.fav-clone-list-container::-webkit-scrollbar {
  width: 6px;
}
.fav-clone-list-container::-webkit-scrollbar-track {
  background: transparent;
}
.fav-clone-list-container::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.fav-clone-list-container::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.fav-clone-menu-header {
  padding: 2px 4px 8px 4px;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 6px;
}
.fav-clone-menu-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}
.fav-clone-menu-subtitle {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 2px;
  line-height: 1.3;
}

.fav-clone-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  margin-bottom: 4px;
}
.fav-clone-item:hover {
  background-color: #FEFCE8;
  border-color: #FDE047;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.15);
}

.fav-clone-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.fav-clone-item-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-clone-item-badge {
  font-size: 10px;
  font-weight: 700;
  background-color: #FEF08A;
  color: #854D0E;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.fav-clone-item-desc {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.fav-clone-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-tertiary);
}

.fav-clone-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

/* =========================================================
   프로젝트 관리 모달 내 프로젝트명/색상 인라인 수정 스타일
   ========================================================= */
.project-title-clickable:hover {
  background-color: #F1F5F9;
}
.project-title-clickable:hover .project-dot {
  transform: scale(1.25);
}
.btn-edit-project:hover {
  background-color: #EFF6FF;
  border-color: #93C5FD;
  color: var(--color-progress);
}
.btn-save-project-edit {
  background-color: var(--color-progress);
  color: #FFFFFF;
  border: 1px solid var(--color-progress);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}
.btn-save-project-edit:hover {
  background-color: #1D4ED8;
}
.btn-cancel-project-edit {
  background-color: #F3F4F6;
  color: var(--text-secondary);
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
}
.btn-cancel-project-edit:hover {
  background-color: #E5E7EB;
  color: var(--text-main);
}

/* =========================================================
   상세 내용 서식 템플릿 (Description Templates) 드롭다운 & 모달
   ========================================================= */
.template-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.template-trigger-btn {
  background-color: #EFF6FF !important;
  border-color: #BFDBFE !important;
  color: #1D4ED8 !important;
  font-weight: 600 !important;
  gap: 4px !important;
  padding: 3px 8px !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.template-trigger-btn:hover {
  background-color: #DBEAFE !important;
  border-color: #93C5FD !important;
  color: #1E40AF !important;
}

.desc-template-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 100050;
  display: none;
  width: 320px;
  max-width: min(340px, calc(100vw - 32px));
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
  padding: 8px;
  user-select: none;
  animation: tmplFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.desc-template-dropdown-menu.open {
  display: block;
}

@keyframes tmplFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.template-action-save {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background-color: #F8FAFC;
  border: 1px dashed #93C5FD;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.template-action-save:hover {
  background-color: #EFF6FF;
  border-color: #3B82F6;
}

.template-action-save .tmpl-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.template-action-save .tmpl-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.template-action-save .tmpl-title-bold {
  font-size: 12px;
  font-weight: 700;
  color: #1D4ED8;
}

.template-action-save .tmpl-desc-hint {
  font-size: 10.5px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-menu-divider {
  height: 1px;
  background-color: #E2E8F0;
  margin: 8px 0;
}

.template-menu-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  letter-spacing: -0.2px;
}

.template-count-badge {
  background-color: #F1F5F9;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

.template-item-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.template-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.template-entry:hover {
  background-color: #F8FAFC;
  border-color: #E2E8F0;
}

.template-entry-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.template-entry-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-entry-snippet {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.template-entry-del {
  opacity: 0.85;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  cursor: pointer;
  color: #64748B;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.template-entry:hover .template-entry-del {
  opacity: 1;
  border-color: #CBD5E1;
}

.template-entry-del:hover {
  background-color: #FEE2E2 !important;
  color: #EF4444 !important;
  border-color: #FCA5A5 !important;
  transform: scale(1.05);
}

.template-empty-box {
  padding: 18px 12px;
  text-align: center;
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.4;
}

/* =========================================================
   모바일 & 태블릿 종합 반응형 UI (Mobile Responsive System)
   ========================================================= */

/* 기본 상태: 데스크톱에서는 모바일 전용 컴포넌트 숨김 */
.mobile-fab-btn {
  display: none;
}
.mobile-kanban-tabs {
  display: none;
}

@media (max-width: 768px) {
  /* 1. 컨테이너 & 레이아웃 */
  body, html {
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
  }
  .app-container {
    padding: 0 !important;
    min-height: 100vh;
  }
  .scheduler-frame {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    min-height: 100vh;
  }

  /* 2. 상단 헤더 */
  .top-header {
    padding: 10px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .brand-section {
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
  }
  .brand-text h1 {
    font-size: 17px !important;
    line-height: 1 !important;
  }
  .header-actions {
    display: flex !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px !important;
    gap: 6px !important;
  }
  .header-actions::-webkit-scrollbar {
    display: none;
  }
  .header-actions .btn-secondary,
  .header-actions .btn-primary {
    flex-shrink: 0 !important;
    padding: 7px 11px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
  }

  /* 3. 날짜 필터 & 프로젝트 퀵 바 */
  .date-filter-bar {
    padding: 10px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .date-preset-group {
    display: flex !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px !important;
    gap: 4px !important;
  }
  .date-preset-group::-webkit-scrollbar {
    display: none;
  }
  .btn-date-chip {
    flex-shrink: 0 !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
  .date-custom-picker {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: space-between !important;
    padding: 5px 8px !important;
  }
  .date-custom-input {
    width: 105px !important;
    font-size: 11px !important;
  }
  .project-filter-group {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: space-between !important;
  }
  .project-select-filter {
    flex: 1 !important;
    max-width: none !important;
    font-size: 11.5px !important;
    padding: 5px 8px !important;
  }
  .status-filter-group {
    width: 100% !important;
    justify-content: space-between !important;
  }
  .status-filter-group .filter-multiselect-trigger {
    flex: 1 !important;
    justify-content: space-between !important;
    padding: 5px 8px !important;
    font-size: 11.5px !important;
  }

  /* 4. 네비게이션 탭 & 실시간 통계 바 */
  .nav-metrics-bar {
    padding: 8px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .view-tabs-group {
    display: flex !important;
    width: 100% !important;
  }
  .view-tab-btn {
    flex: 1 !important;
    justify-content: center !important;
    padding: 8px 4px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
  }
  .metrics-section {
    display: flex !important;
    width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 4px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px !important;
  }
  .metrics-section::-webkit-scrollbar {
    display: none;
  }
  .metric-pill {
    flex-shrink: 0 !important;
    padding: 3px 6px !important;
    font-size: 10.5px !important;
    gap: 4px !important;
  }
  .rate-box {
    margin-left: auto !important;
    padding-left: 6px !important;
    flex-shrink: 0 !important;
  }
  .rate-bar-track {
    width: 55px !important;
  }

  /* 5. 뷰 본문 컨테이너 */
  .view-container {
    padding: 12px 14px 80px 14px !important; /* 모바일 FAB 여백 확보 */
    min-height: auto !important;
  }

  /* (1) 보드 보기 (Kanban) 모바일 스와이프 & 스냅 */
  .mobile-kanban-tabs {
    display: flex !important;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
  }
  .mobile-kanban-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    font-size: 11.5px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-kanban-tab-btn.active {
    background-color: var(--bg-subtle);
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 700;
  }

  .kanban-board {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    gap: 12px !important;
    padding-bottom: 8px !important;
  }
  .kanban-board::-webkit-scrollbar {
    height: 4px;
  }
  .kanban-board::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
  }
  .kanban-column {
    min-width: 84vw !important;
    max-width: 86vw !important;
    scroll-snap-align: center !important;
    flex-shrink: 0 !important;
    padding: 12px !important;
  }
  .kanban-dropzone {
    min-height: 380px !important;
  }
  .kanban-card {
    padding: 11px !important;
    user-select: auto;
  }

  /* (2) 목록 보기 (List) 모바일 최적화 */
  .list-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px !important;
  }
  .list-table th, .list-table td {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
  }

  /* (3) 타임라인 보기 (Timeline) 모바일 세로 배치 */
  .timeline-layout {
    flex-direction: column !important;
    gap: 14px !important;
  }
  .timeline-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .timeline-date-strip {
    padding: 6px 10px !important;
    gap: 4px !important;
  }
  .timeline-date-pill {
    padding: 3px 8px !important;
    font-size: 10px !important;
  }
  .timeline-side-pane {
    width: 100% !important;
    min-height: auto !important;
    max-height: 280px !important;
  }

  /* 6. 모달 팝업 모바일 바텀시트 (Bottom Sheet) */
  .modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }
  .modal-window {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    border-radius: 18px 18px 0 0 !important;
    transform: translateY(100%) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .modal-backdrop.open .modal-window,
  .modal-backdrop.active .modal-window {
    transform: translateY(0) !important;
  }
  .modal-header {
    padding: 12px 16px !important;
  }
  .modal-body {
    padding: 14px 16px !important;
    gap: 12px !important;
    max-height: calc(94vh - 120px) !important;
    -webkit-overflow-scrolling: touch;
  }
  .modal-footer {
    padding: 10px 16px !important;
  }
  #scheduleInputsRow {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  #scheduleInputsRow > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  #scheduleInputsRow .form-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .time-adjust-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* 모바일 참고 링크 인풋 2행 분리 & 풀 너비 가시성 */
  .link-inputs-row {
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .link-title-input {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  .link-url-wrapper {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }

  /* 모바일 리치 에디터 툴바 가로 스크롤 */
  .rich-editor-toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 6px 8px !important;
    gap: 3px !important;
  }
  .rich-editor-toolbar::-webkit-scrollbar {
    height: 3px;
  }
  .rich-editor-toolbar::-webkit-scrollbar-thumb {
    background-color: #CBD5E1;
    border-radius: 3px;
  }
  .toolbar-group {
    flex-shrink: 0 !important;
  }
  .rich-editor-content {
    min-height: 110px !important;
    max-height: 200px !important;
    font-size: 13px !important;
  }

  /* 템플릿 드롭다운 모바일 팝업 */
  .desc-template-dropdown-menu {
    position: fixed !important;
    top: auto !important;
    bottom: 70px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 60vh !important;
    z-index: 100060 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important;
  }

  /* 전체화면 상세 에디터 모바일 최적화 */
  .desc-fullscreen-backdrop {
    padding: 0 !important;
  }
  .desc-fullscreen-window {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
  }
  .desc-fullscreen-header {
    padding: 10px 14px !important;
  }
  .desc-fullscreen-header .desc-fs-subtitle {
    display: none !important;
  }
  .desc-fullscreen-title-box {
    padding: 10px 14px 8px 14px !important;
  }
  .desc-fullscreen-title-input {
    font-size: 14px !important;
    padding: 8px 10px !important;
  }
  .desc-fs-toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 6px 10px !important;
  }
  .desc-fullscreen-body-wrap {
    padding: 12px 14px !important;
  }

  /* 7. 모바일 전용 플로팅 액션 버튼 (FAB) */
  .mobile-fab-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: var(--color-progress);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 990;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-fab-btn:active {
    transform: scale(0.92);
    background-color: #1D4ED8;
  }

  /* 모바일 터치 최적화 */
  button, select, input {
    touch-action: manipulation;
  }
}

@media (max-width: 520px) {
  #scheduleInputsRow {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .custom-24h-popover {
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: calc(100vw - 24px) !important;
  }
}

/* =========================================================
   커스텀 24시간 타임 피커 (무한 롤링 차단 & 24시간 표기)
   ========================================================= */
.custom-time-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.custom-time-input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  padding-right: 28px !important;
  font-family: inherit;
  font-weight: 600;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #2563EB !important;
  background-color: #FFFFFF !important;
  color-scheme: light !important;
  user-select: none;
}

.custom-time-input:hover {
  border-color: var(--color-primary);
}

.custom-time-icon {
  position: absolute;
  right: 8px;
  pointer-events: none;
  font-size: 13px;
  opacity: 0.65;
}

.custom-24h-popover {
  position: fixed;
  z-index: 100080;
  width: 260px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  animation: popoverFadeIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.time-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.time-picker-title {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
}

.btn-time-picker-close {
  background: transparent;
  border: none;
  font-size: 13px;
  color: #64748B;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
}
.btn-time-picker-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.time-picker-quick-chips {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  overflow-x: auto;
}

.time-chip {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.time-chip:hover {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
}

.time-picker-body {
  display: flex;
  height: 200px;
  background: #FFFFFF;
}

.time-picker-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #F1F5F9;
}
.time-picker-col:last-child {
  border-right: none;
}

.time-picker-col-head {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #64748B;
  background: #F8FAFC;
  padding: 4px 0;
  border-bottom: 1px solid #E2E8F0;
}

.time-picker-wheel {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 롤링 무한루프 방지: 끝에 도달하면 멈추는 표준 스크롤바와 명확한 상/하단 한계 */
.time-picker-wheel::-webkit-scrollbar {
  width: 4px;
}
.time-picker-wheel::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.time-picker-item {
  width: 100%;
  padding: 5px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.time-picker-item:hover {
  background: #EFF6FF;
  color: #1D4ED8;
}

.time-picker-item.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  font-weight: 700;
}

.time-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
}

.time-picker-current-display {
  font-size: 14px;
  font-weight: 800;
  color: #2563EB;
  font-family: monospace;
}

.btn-time-confirm {
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-time-confirm:hover {
  background: #1D4ED8;
}

/* =========================================================
   우측 하단 일정 시작 플로팅 팝업 알람 (Schedule Alarm)
   ========================================================= */
.schedule-alarm-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100vw - 32px);
}

.schedule-alarm-card {
  pointer-events: auto;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-left: 5px solid #2563EB;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(0, 0, 0, 0.05);
  animation: slideAlarmIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.2s ease, opacity 0.2s ease;
  position: relative;
}

@keyframes slideAlarmIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.schedule-alarm-card.alarm-dismissing {
  opacity: 0;
  transform: translateX(30px);
}

.alarm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.alarm-badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.alarm-bell-icon {
  font-size: 16px;
  animation: ringBell 1.2s ease-in-out infinite;
  display: inline-block;
}

@keyframes ringBell {
  0%, 100% { transform: rotate(0); }
  20%, 60% { transform: rotate(15deg); }
  40%, 80% { transform: rotate(-15deg); }
}

.alarm-label {
  font-size: 12px;
  font-weight: 700;
  color: #2563EB;
  background: #EFF6FF;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #BFDBFE;
}

.alarm-project-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.btn-alarm-close {
  background: transparent;
  border: none;
  font-size: 15px;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-alarm-close:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.alarm-body {
  margin-bottom: 12px;
}

.alarm-task-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
  line-height: 1.35;
  word-break: break-word;
}

.alarm-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 6px;
}

.alarm-countdown-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.alarm-countdown-row.status-normal {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
}

.alarm-countdown-row.status-warning {
  background: #FFFBEB;
  color: #B45309;
  border-color: #FDE68A;
}

.alarm-countdown-row.status-overdue {
  background: #FEF2F2;
  color: #B91C1C;
  border-color: #FECACA;
}

.alarm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-alarm-primary {
  flex: 1;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-alarm-primary:hover {
  background: #1D4ED8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-alarm-snooze {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #475569;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-alarm-snooze:hover {
  background: #F1F5F9;
  color: #0F172A;
}

/* =========================================================
   마인드맵 워크스페이스 & 인터랙티브 캔버스 (Mindmap)
   ========================================================= */
.mindmap-workspace {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 170px);
  min-height: 580px;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-card);
}

/* 마인드맵 상단 툴바 */
.mindmap-top-bar {
  height: 52px;
  min-height: 52px;
  border-bottom: 1px solid var(--border-subtle);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 20;
}

.mindmap-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 280px;
}

.mindmap-select-wrap {
  position: relative;
}

.mindmap-select {
  padding: 6px 28px 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  max-width: 200px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mindmap-title-input {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  background: transparent;
  outline: none;
  max-width: 240px;
  transition: all 0.15s ease;
}

.mindmap-title-input:hover,
.mindmap-title-input:focus {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.btn-mindmap-primary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-mindmap-primary:hover {
  background: #1D4ED8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.mindmap-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-mindmap-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-mindmap-tool:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.btn-mindmap-tool.danger {
  color: #DC2626;
  border-color: #FECACA;
}

.btn-mindmap-tool.danger:hover {
  background: #FEF2F2;
  border-color: #F87171;
}

/* 마인드맵 뷰포트 */
.mindmap-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: grab;
  background-color: #F8FAFC;
  background-image: radial-gradient(#CBD5E1 1.2px, transparent 1.2px);
  background-size: 24px 24px;
}

.mindmap-viewport.panning {
  cursor: grabbing;
}

.mindmap-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  pointer-events: none;
}

/* SVG 곡선 레이어 */
.mindmap-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 10000px;
  height: 10000px;
  pointer-events: none;
  overflow: visible;
}

.mindmap-edge {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: stroke 0.2s ease;
}

/* 노드 레이어 */
.mindmap-nodes-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 10000px;
  height: 10000px;
  pointer-events: auto;
}

/* 개별 마인드맵 노드 */
.mindmap-node {
  position: absolute;
  box-sizing: border-box;
  border-radius: 10px;
  background: #FFFFFF;
  border: 2px solid #3B82F6;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  text-align: center;
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  z-index: 2;
}

.mindmap-node.is-root {
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
  border-width: 2.5px;
}

.mindmap-node.selected {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28), 0 8px 24px rgba(37, 99, 235, 0.2) !important;
  z-index: 10 !important;
}

.mindmap-node.dragging {
  cursor: grabbing !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2) !important;
  z-index: 20 !important;
}

.mindmap-node-text {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-word;
  font-size: 13.5px;
  line-height: 1.35;
  color: #0F172A;
  outline: none;
  cursor: inherit;
}

.mindmap-node.editing {
  cursor: text !important;
  background: #FFFFFF !important;
}

.mindmap-node.editing .mindmap-node-text {
  cursor: text !important;
  user-select: text !important;
}

/* 크기 조절 핸들 (Resizer) */
.mindmap-node-resizer {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  cursor: se-resize;
  opacity: 0.4;
  transition: opacity 0.15s ease;
  background-image: radial-gradient(#64748B 1px, transparent 1px);
  background-size: 4px 4px;
}

.mindmap-node:hover .mindmap-node-resizer,
.mindmap-node.selected .mindmap-node-resizer {
  opacity: 0.9;
}

/* 퀵 자식/형제 추가 플로팅 버튼 */
.mindmap-node-add-child {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #2563EB;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 15;
}

.mindmap-node:hover .mindmap-node-add-child {
  opacity: 1;
}

.mindmap-node-add-child:hover {
  transform: translateY(-50%) scale(1.15);
  background: #1D4ED8;
}

/* 플로팅 줌 툴바 */
.mindmap-floating-zoom {
  position: absolute;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 20;
}

.mm-zoom-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  transition: background 0.15s ease;
}

.mm-zoom-btn:hover {
  background: #F1F5F9;
}

.mm-zoom-btn.fit {
  font-size: 14px;
}

.mm-zoom-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 44px;
  text-align: center;
}

/* 하단 단축키 가이드 힌트 바 */
.mindmap-bottom-hint {
  position: absolute;
  bottom: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  font-size: 11.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.hint-badge {
  font-weight: 700;
  color: #2563EB;
}

.hint-dot {
  color: #CBD5E1;
}

.shortcut-key {
  display: inline-block;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 11.5px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}

@media (max-width: 768px) {
  .mindmap-top-bar {
    height: auto;
    padding: 10px;
  }
  .mindmap-bottom-hint {
    display: none;
  }
}

/* =========================================================
   마인드맵 보관함 (Library Modal) 및 카드 리스트 스타일
   ========================================================= */
.mindmap-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2563EB;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

.mindmap-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mindmap-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.mindmap-card-item:hover {
  border-color: #93C5FD;
  background: #F8FAFC;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.mindmap-card-item.active {
  border-color: #2563EB;
  background: #EFF6FF;
}

.mindmap-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.mindmap-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mindmap-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mindmap-card-badge-current {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: #2563EB;
  color: #FFFFFF;
  white-space: nowrap;
}

.mindmap-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.mindmap-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 14px;
  flex-shrink: 0;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.btn-card-action:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.btn-card-action.btn-card-primary {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
}

.btn-card-action.btn-card-primary:hover {
  background: #1D4ED8;
}

.btn-card-action.btn-card-del {
  color: #EF4444;
  border-color: #FCA5A5;
}

.btn-card-action.btn-card-del:hover {
  background: #FEF2F2;
  border-color: #EF4444;
}




