/* ─── 변수 ──────────────────────────────────────────────────── */
:root {
  --sidebar-w: 256px;
  --sidebar-bg: #0f172a;
  --sidebar-hover: rgba(255,255,255,.07);
  --sidebar-active: #2563eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --col-todo: #f8fafc;
  --col-progress: #eff6ff;
  --col-done: #f0fdf4;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── 사이드바 ───────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #fff;
  display: flex; flex-direction: column;
  z-index: 100;
  transition: width .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-nav a span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .btn-logout span,
.sidebar.collapsed .nav-notif-badge,
.sidebar.collapsed .sidebar-favorites { display: none; }
.sidebar.collapsed .sidebar-nav a { justify-content: center; padding: 10px; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 20px 0; }

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px; font-size: 1rem; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.sidebar-brand i { font-size: 1.35rem; color: var(--accent); flex-shrink: 0; }

.sidebar-section-label {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.28); padding: 18px 18px 6px;
  font-weight: 600;
}

.sidebar-nav { list-style: none; margin: 0; padding: 0 10px; flex: 1; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65); text-decoration: none;
  font-size: .875rem; white-space: nowrap; font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.sidebar-nav li a i { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-nav li a:hover { background: var(--sidebar-hover); color: rgba(255,255,255,.95); }
.sidebar-nav li a.active {
  background: rgba(37,99,235,.25);
  color: #60a5fa;
}
.sidebar-nav li a.active i { color: #60a5fa; }

.sidebar-bottom {
  padding: 12px 10px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 10px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}
.user-name { font-size: .82rem; font-weight: 600; color: #f1f5f9; line-height: 1.2; }
.user-info { min-width: 0; }
[class^="badge-role-"] { font-size: .65rem; color: rgba(255,255,255,.45); }

.btn-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.5); text-decoration: none;
  font-size: .82rem; transition: background .15s, color .15s;
}
.btn-logout:hover { background: var(--sidebar-hover); color: rgba(255,255,255,.9); }

/* ─── 메인 레이아웃 ─────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left .22s cubic-bezier(.4,0,.2,1);
}
.sidebar.collapsed ~ .main-wrapper { margin-left: 64px; }

.topbar {
  height: 58px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px; position: sticky; top: 0; z-index: 90;
  box-shadow: var(--shadow-xs);
}
.sidebar-toggle {
  background: none; border: none; font-size: 1.2rem; color: var(--text-muted);
  cursor: pointer; padding: 6px 8px; border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--bg); color: var(--text); }
.topbar-title {
  font-size: .9rem; font-weight: 600; flex: 1;
  display: flex; align-items: center; color: var(--text);
  letter-spacing: -.01em;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ─── 검색박스 ───────────────────────────────────────────────── */
.search-box {
  position: relative; display: flex; align-items: center;
}
.search-box .search-icon {
  position: absolute; left: 10px; color: var(--text-light);
  font-size: .85rem; pointer-events: none;
}
.search-box input {
  padding: 7px 30px 7px 32px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .82rem; outline: none; width: 200px;
  background: var(--bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s, width .2s;
}
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
  background: #fff; width: 260px;
}
.search-box input::placeholder { color: var(--text-light); }
.search-box .search-clear {
  position: absolute; right: 8px; background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: .8rem;
  padding: 2px 4px; border-radius: 4px; display: none;
}
.search-box .search-clear:hover { color: var(--text); }

.search-empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-muted); display: none;
}
.search-empty i { font-size: 2rem; opacity: .3; display: block; margin-bottom: 8px; }

.main-content { padding: 28px 24px; flex: 1; }

/* ─── 로그인 페이지 ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,.25) 0%, transparent 70%);
  pointer-events: none;
}
.login-container { width: 100%; max-width: 400px; padding: 20px; position: relative; z-index: 1; }
.login-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px; padding: 44px 40px;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.login-logo {
  font-size: 2.2rem; color: var(--accent); text-align: center; margin-bottom: 10px;
}
.login-title {
  text-align: center; font-size: 1.4rem; font-weight: 700;
  margin-bottom: 4px; color: #fff;
}
.login-subtitle {
  text-align: center; color: rgba(255,255,255,.4); font-size: .85rem; margin-bottom: 28px;
}
.login-card .form-floating input {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
  color: #fff; border-radius: var(--radius-sm);
}
.login-card .form-floating input:focus {
  background: rgba(255,255,255,.1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.2);
  color: #fff;
}
.login-card .form-floating label { color: rgba(255,255,255,.4); }
.login-card .form-floating input:focus ~ label,
.login-card .form-floating input:not(:placeholder-shown) ~ label { color: rgba(255,255,255,.5); }
.login-card .form-floating input::placeholder { color: transparent; }
.btn-login {
  padding: 12px; font-size: .95rem; font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--accent); border-color: var(--accent);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn-login:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.4); }

/* ─── 데이터 테이블 카드 ─────────────────────────────────────── */
.data-table-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid var(--border);
}
.data-table-card .table { margin: 0; }
.data-table-card .table thead th {
  background: var(--bg); font-size: .75rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border); padding: 12px 18px;
}
.data-table-card .table td {
  padding: 13px 18px; vertical-align: middle; border-color: var(--border-light);
}
.data-table-card .table tbody tr:hover { background: #fafbfc; }

.avatar-sm {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--accent-light); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
}

/* ─── 빈 상태 ───────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 2.8rem; margin-bottom: 16px; opacity: .3; display: block; }
.empty-state h4 { font-size: 1rem; margin-bottom: 6px; color: var(--text); font-weight: 600; }
.empty-state p { font-size: .85rem; color: var(--text-muted); }

/* ─── 칸반 보드 (공통) ──────────────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 960px) {
  .kanban-board { grid-template-columns: 1fr; }
}

.kanban-col {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 340px;
}

.kanban-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-todo        { background: #94a3b8; }
.dot-in-progress { background: #3b82f6; }
.dot-done        { background: #22c55e; }
.col-title { font-weight: 700; font-size: .82rem; flex: 1; letter-spacing: .01em; }
.col-count {
  background: var(--border); color: var(--text-muted);
  font-size: .7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; line-height: 1.5;
}

.kanban-cards {
  display: flex; flex-direction: column; gap: 0; flex: 1;
  padding: 10px;
}

/* ─── 칸반 카드 (공통) ──────────────────────────────────────── */
.kanban-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .18s, transform .18s, border-color .18s;
  margin-bottom: 8px;
  cursor: pointer;
}
.kanban-card:last-child { margin-bottom: 0; }
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}
.kanban-card-inner { padding: 13px 14px; }

.kc-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 6px;
}
.kc-title {
  display: block; font-size: .87rem; font-weight: 600;
  color: var(--text); text-decoration: none; line-height: 1.45;
  margin-bottom: 0;
}
.kc-title:hover { color: var(--accent); }
.kc-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .75rem; color: var(--text-muted); margin-top: 8px;
}

.kc-actions { opacity: 0; transition: opacity .15s; display: flex; gap: 2px; }
.kanban-card:hover .kc-actions { opacity: 1; }

.btn-icon {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 4px 6px; border-radius: 6px; font-size: .85rem;
  transition: background .15s, color .15s;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }

.btn-icon-xs {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 3px 5px; border-radius: 5px; font-size: .82rem;
  transition: background .15s, color .15s;
  line-height: 1;
}
.btn-icon-xs:hover { background: var(--bg); color: var(--text); }
.btn-icon-xs.text-danger:hover { background: #fef2f2; color: #dc2626; }

.btn-add-card {
  background: none; border: none;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding: 10px 16px; font-size: .8rem;
  cursor: pointer; width: 100%; text-align: left;
  transition: background .15s, color .15s;
  display: flex; align-items: center; gap: 6px;
}
.btn-add-card:hover { background: var(--accent-light); color: var(--accent); }
.btn-add-card i { font-size: .9rem; }

/* ─── 프로젝트 목록 보드 ────────────────────────────────────── */
.project-icon-sm {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.proj-desc {
  font-size: .8rem; color: var(--text-muted);
  margin: 5px 0 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.proj-col-empty {
  text-align: center; padding: 32px 12px;
  font-size: .82rem; color: var(--text-light);
}
.proj-col-empty i { display: block; font-size: 1.6rem; margin-bottom: 8px; opacity: .35; }
.badge-admin-only {
  display: inline-flex; align-items: center;
  background: #fffbeb; color: #b45309; border: 1px solid #fde68a;
  border-radius: 4px; padding: 2px 5px; font-size: .68rem;
}

/* ─── 배지 ──────────────────────────────────────────────────── */
.priority-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: .7rem; font-weight: 700; letter-spacing: .02em;
}
.priority-low    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.priority-medium { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.priority-high   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.status-badge-inline {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: .78rem; font-weight: 600;
}
.status-todo        { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.status-in_progress { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-done        { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ─── 카드 상세 ─────────────────────────────────────────────── */
.card-detail-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .card-detail-layout { grid-template-columns: 1fr; }
}

.card-detail-box {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
  border: 1px solid var(--border);
}
.card-detail-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
.card-detail-content { font-size: .9rem; line-height: 1.8; color: #374151; }

/* ─── Quill 에디터 ──────────────────────────────────────────── */
.quill-editor-wrap { background: var(--surface); border-radius: 6px; }
.quill-editor-wrap .ql-toolbar { border-radius: 6px 6px 0 0; border-color: var(--border); background: #f8fafc; }
.quill-editor-wrap .ql-container { border-radius: 0 0 6px 6px; border-color: var(--border); font-size: .9rem; }
.quill-editor-wrap .ql-editor { min-height: 180px; line-height: 1.8; color: #374151; }
.quill-comment-wrap .ql-editor { min-height: 80px; }

/* Quill 렌더링 콘텐츠 (뷰 모드) */
.ql-content { font-size: .9rem; line-height: 1.8; color: #374151; }
.ql-content p { margin-bottom: .4rem; }
.ql-content h1 { font-size: 1.5rem; font-weight: 700; margin: 1rem 0 .5rem; }
.ql-content h2 { font-size: 1.25rem; font-weight: 700; margin: .9rem 0 .4rem; }
.ql-content h3 { font-size: 1.05rem; font-weight: 700; margin: .8rem 0 .3rem; }
.ql-content ul, .ql-content ol { padding-left: 1.5rem; margin-bottom: .5rem; }
.ql-content li { margin-bottom: .2rem; }
.ql-content blockquote { border-left: 4px solid #e2e8f0; padding: .3rem .8rem; color: #64748b; margin: .5rem 0; }
.ql-content pre { background: #1e293b; color: #e2e8f0; border-radius: 6px; padding: .8rem 1rem; font-size: .82rem; overflow-x: auto; margin: .5rem 0; }
.ql-content code { background: #f1f5f9; color: #d63384; padding: .1em .35em; border-radius: 3px; font-size: .85em; }
.ql-content a { color: #2563eb; text-decoration: underline; }
.ql-content strong { font-weight: 700; }
.ql-content em { font-style: italic; }
.ql-content s { text-decoration: line-through; }
.ql-content img { max-width: 100%; height: auto; border-radius: 4px; margin: .3rem 0; }
.quill-editor-wrap .ql-editor img { max-width: 100%; height: auto; }

.card-detail-side { display: flex; flex-direction: column; gap: 8px; }
.side-section {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
  border: 1px solid var(--border);
}
.side-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted); margin-bottom: 6px;
}
.side-value { font-size: .87rem; }

/* ─── 댓글 ──────────────────────────────────────────────────── */
.comment-section {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
  border: 1px solid var(--border);
}
.comment-title { font-size: .95rem; font-weight: 700; margin-bottom: 18px; }

.comment-item {
  display: flex; gap: 12px; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border-light);
}
.comment-item:last-child { border-bottom: none; margin-bottom: 0; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; margin-bottom: 5px; flex-wrap: wrap; }
.comment-text { font-size: .87rem; line-height: 1.6; color: #374151; white-space: pre-wrap; }
.comment-actions { display: flex; gap: 2px; }
.btn-comment-action {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 2px 5px; border-radius: 4px; font-size: .8rem;
  transition: background .15s, color .15s;
}
.btn-comment-action:hover { background: var(--bg); color: var(--text); }
.btn-comment-action.text-danger:hover { background: #fef2f2; color: #dc2626; }
.comment-input-area { display: flex; align-items: flex-start; gap: 12px; }

/* ─── 담당자 아바타 ─────────────────────────────────────────── */
.kc-assignees { display: flex; gap: 2px; flex-wrap: wrap; }
.kc-assignee-av {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  font-size: .63rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
  cursor: default;
  transition: transform .1s;
}
.kc-assignee-av:hover { transform: scale(1.15); z-index: 1; }

/* ─── MentionInput ──────────────────────────────────────────── */
.mention-box {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; padding: 6px 10px; min-height: 44px;
  cursor: text; position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.mention-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.mention-chips-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.mention-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 20px; padding: 3px 8px 3px 4px;
  font-size: .78rem; font-weight: 600;
}
.chip-av {
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--accent); color: #fff;
  font-size: .62rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.chip-rm {
  background: none; border: none; color: var(--accent);
  font-size: .88rem; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .5;
}
.chip-rm:hover { opacity: 1; }
.mention-input-row { position: relative; }
.mention-field {
  border: none; outline: none; width: 100%;
  font-size: .87rem; background: transparent; padding: 2px 0;
}
.mention-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); z-index: 200; overflow: hidden;
  max-height: 220px; overflow-y: auto;
}
.mention-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer; font-size: .87rem;
  transition: background .1s;
}
.mention-opt:hover { background: var(--bg); }
.mention-opt-av {
  width: 26px; height: 26px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff; flex-shrink: 0;
  font-size: .73rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* 카드 상세 — 담당자 패널 */
.assignee-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.assignee-item {
  display: inline-flex; align-items: center;
  background: var(--accent-light); color: var(--accent);
  border-radius: 20px; padding: 3px 10px 3px 5px;
  font-size: .8rem; font-weight: 600; gap: 5px;
}
.assignee-item-av {
  width: 20px; height: 20px; border-radius: 4px;
  background: var(--accent); color: #fff;
  font-size: .63rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ─── 첨부파일 ──────────────────────────────────────────────── */
.att-section { margin-top: 22px; }
.att-section-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.att-list { display: flex; flex-direction: column; gap: 5px; }
.att-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px;
  font-size: .83rem; transition: background .1s, border-color .1s;
}
.att-item:hover { background: var(--accent-light); border-color: #bfdbfe; }
.att-icon { font-size: 1rem; flex-shrink: 0; }
.att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-size { color: var(--text-muted); font-size: .73rem; white-space: nowrap; }

.file-preview-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px; font-size: .75rem; margin: 2px;
}
.file-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; cursor: pointer; text-align: center;
  font-size: .83rem; color: var(--text-muted);
  transition: border-color .15s, background .15s, color .15s;
  position: relative;
}
.file-upload-area:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.file-upload-area input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.comment-attachments { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.comment-att-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px; font-size: .75rem;
  text-decoration: none; color: var(--text); transition: background .1s;
}
.comment-att-chip:hover { background: var(--accent-light); color: var(--accent); }

/* ─── 알림 벨 / 드롭다운 ────────────────────────────────────── */
.notif-bell { position: relative; }
.btn-notif {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; color: var(--text-muted);
  position: relative; transition: background .15s, color .15s;
}
.btn-notif:hover { background: var(--bg); color: var(--text); }
.btn-notif.active { background: var(--accent-light); color: var(--accent); }

.notif-badge {
  position: absolute; top: 3px; right: 3px;
  background: #ef4444; color: #fff;
  font-size: .58rem; font-weight: 700; line-height: 1;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
}

.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 500; overflow: hidden;
}
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.btn-notif-readall {
  background: none; border: none; font-size: .78rem;
  color: var(--accent); cursor: pointer; padding: 3px 8px;
  border-radius: 5px; transition: background .1s;
}
.btn-notif-readall:hover { background: var(--accent-light); }
.notif-panel-body { max-height: 360px; overflow-y: auto; }
.notif-empty { text-align: center; padding: 28px; color: var(--text-muted); font-size: .83rem; }
.notif-panel-footer {
  border-top: 1px solid var(--border); padding: 10px 16px; text-align: center;
  background: var(--bg);
}
.notif-panel-footer a { font-size: .8rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.notif-panel-footer a:hover { text-decoration: underline; }

/* 알림 아이템 */
.notif-item, .notif-page-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  text-decoration: none; color: var(--text);
  transition: background .1s; cursor: pointer;
}
.notif-item:last-child, .notif-page-item:last-child { border-bottom: none; }
.notif-item:hover, .notif-page-item:hover { background: var(--bg); }
.notif-item.unread, .notif-page-item.unread { background: var(--accent-light); }

.notif-icon-wrap {
  width: 34px; height: 34px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.notif-icon-blue   { background: #dbeafe; color: #2563eb; }
.notif-icon-green  { background: #d1fae5; color: #059669; }
.notif-icon-purple { background: #ede9fe; color: #7c3aed; }
.notif-icon-orange { background: #fef3c7; color: #d97706; }
.notif-icon-red    { background: #fee2e2; color: #dc2626; }

.notif-content { flex: 1; min-width: 0; }
.notif-title {
  font-size: .83rem; font-weight: 600; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif-msg {
  font-size: .77rem; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif-time  { font-size: .7rem; color: var(--text-light); margin-top: 3px; }
.notif-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 7px; }

.notif-nav-link { position: relative; }
.nav-notif-badge {
  margin-left: auto; background: #ef4444; color: #fff;
  font-size: .62rem; font-weight: 700;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 알림 목록 페이지 */
.notif-page-list { max-width: 700px; }
.notif-date-group {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px;
  border: 1px solid var(--border);
}
.notif-date-label {
  padding: 8px 16px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* ─── 토스트 ─────────────────────────────────────────────────── */
.toast { border-radius: var(--radius-sm); border: none !important; }

/* ─── 드래그 앤 드롭 ────────────────────────────────────────── */
.kanban-card { cursor: grab; }
.kanban-card-ghost {
  opacity: .3;
  background: var(--accent-light) !important;
  border: 2px dashed var(--accent) !important;
}
.kanban-card-chosen { cursor: grabbing; box-shadow: var(--shadow-lg) !important; }
.kanban-card-drag   { cursor: grabbing; transform: rotate(1.5deg) !important; box-shadow: var(--shadow-lg) !important; }
.kanban-cards.sortable-over {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

/* ─── 프로젝트 그리드 (구형 호환) ──────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.project-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  transition: box-shadow .18s, transform .18s;
}
.project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.project-card-header { padding: 16px 16px 0; display: flex; align-items: flex-start; justify-content: space-between; }
.project-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 700;
}
.project-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.project-card:hover .project-actions { opacity: 1; }
.project-card-body { padding: 12px 16px; flex: 1; text-decoration: none; color: inherit; display: block; }
.project-name { font-size: .95rem; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.project-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-footer {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .77rem; color: var(--text-muted); background: var(--bg);
}

/* ─── 캘린더 커스텀 ─────────────────────────────────────────── */
#calendar-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border: 1px solid var(--border);
  /* topbar(56px) + 상하 패딩(48px) + 여유(16px) 빼고 남은 높이 */
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
#fullcalendar {
  flex: 1;
  min-height: 0;
}
.fc-toolbar-title { font-size: 1rem !important; font-weight: 700; letter-spacing: -.01em; }
.fc-button { font-size: .8rem !important; border-radius: 6px !important; }
.fc-button-primary { background-color: var(--accent) !important; border-color: var(--accent) !important; }
.fc-button-primary:not(:disabled).fc-button-active,
.fc-button-primary:not(:disabled):active {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}
.fc-event { cursor: pointer; font-size: .78rem; border-radius: 5px !important; }
.fc-event-title { font-weight: 600; }
.fc-daygrid-event { border-radius: 5px !important; }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: transform .12s, border-color .12s;
}
.color-swatch:hover { transform: scale(1.18); }
.color-swatch.active { border-color: var(--text) !important; transform: scale(1.15); }
.badge-label {
  display: inline-block; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); min-width: 60px;
}
.assignee-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 20px; padding: 3px 10px 3px 5px;
  font-size: .78rem; font-weight: 600;
}
.assignee-av {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--accent); color: #fff; font-size: .63rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ─── 즐겨찾기 ──────────────────────────────────────────────── */
.fav-star-icon { color: #f59e0b; font-size: .85rem; flex-shrink: 0; width: 20px; text-align: center; }

.btn-fav-proj {
  background: none; border: none; cursor: pointer;
  padding: 3px 5px; border-radius: 5px; font-size: .85rem;
  color: var(--text-light);
  transition: background .15s, color .15s;
  line-height: 1; opacity: 0;
}
.kanban-card:hover .btn-fav-proj { opacity: 1; }
.btn-fav-proj:hover { background: var(--bg); color: #f59e0b; }
.btn-fav-proj.fav-active { color: #f59e0b; opacity: 1; }
.btn-fav-proj.fav-active:hover { background: #fef3c7; }

/* 사이드바 즐겨찾기 섹션 레이블 */
.fav-section-label {
  display: flex; align-items: center; justify-content: space-between;
  padding-right: 10px;
}
.btn-fav-add-group {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.35); font-size: .9rem;
  padding: 2px 4px; border-radius: 4px;
  transition: background .15s, color .15s; line-height: 1;
}
.btn-fav-add-group:hover { background: var(--sidebar-hover); color: rgba(255,255,255,.85); }

/* 즐겨찾기 그룹 컨테이너 */
.sidebar-fav-wrap { padding: 0 10px 6px; }

/* 그룹 헤더 */
.fav-group { margin-bottom: 2px; }
.fav-group-header {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  user-select: none;
  transition: background .12s;
}
.fav-group-header:hover { background: var(--sidebar-hover); }
.fav-group-header:hover .fav-group-actions { opacity: 1; }

.fav-group-drag-handle {
  color: rgba(255,255,255,.25); font-size: .8rem; cursor: grab;
  flex-shrink: 0; padding: 1px 2px; line-height: 1;
  transition: color .12s;
}
.fav-group-drag-handle:hover { color: rgba(255,255,255,.6); }
.fav-group-drag-handle:active { cursor: grabbing; }

.fav-group-toggle {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.4); font-size: .7rem; padding: 1px 3px;
  border-radius: 3px; flex-shrink: 0; line-height: 1;
  transition: color .12s;
}
.fav-group-toggle:hover { color: rgba(255,255,255,.8); }
.fav-chevron { transition: transform .2s; display: block; }
.fav-chevron.rotated { transform: rotate(-90deg); }

.fav-folder-icon { color: #f59e0b; font-size: .9rem; flex-shrink: 0; }
.fav-group-name {
  flex: 1; font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.75); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.fav-group-actions {
  display: flex; gap: 1px; opacity: 0; transition: opacity .15s; flex-shrink: 0;
}
.btn-fav-icon {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.35); font-size: .75rem;
  padding: 2px 4px; border-radius: 4px;
  transition: background .12s, color .12s; line-height: 1;
}
.btn-fav-icon:hover { background: var(--sidebar-hover); color: rgba(255,255,255,.85); }
.btn-fav-icon.text-danger:hover { background: rgba(220,38,38,.2); color: #f87171; }

/* 그룹 내 항목 리스트 */
.fav-group-items { padding: 0 0 0 16px !important; }
.fav-group-items.collapsed { display: none; }

/* ungrouped 즐겨찾기 */
.fav-ungrouped { padding: 0 !important; }

/* 인라인 이름 수정 input */
.fav-rename-input {
  flex: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  border-radius: 4px; color: #fff; font-size: .8rem; font-weight: 600;
  padding: 1px 6px; outline: none; width: 0; min-width: 0;
}
.fav-rename-input:focus { border-color: var(--accent); background: rgba(255,255,255,.15); }

/* 드래그 ghost / chosen */
.fav-drag-ghost { opacity: .35; background: rgba(37,99,235,.15) !important; border-radius: var(--radius-sm); }
.fav-drag-chosen { background: rgba(37,99,235,.12) !important; border-radius: var(--radius-sm); }

/* 사이드바 접힘 시 즐겨찾기 영역 숨김 */
.sidebar.collapsed .sidebar-fav-wrap,
.sidebar.collapsed .fav-section-label { display: none; }

/* ─── 업무 칸반 ─────────────────────────────────────────────── */
.kc-project-tag {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 4px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-card { cursor: pointer; }
.task-empty-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 0;
  color: var(--text-light);
  font-size: .82rem;
}
.task-empty-col i { font-size: 1.4rem; }

/* ─── 대시보드 ───────────────────────────────────────────────── */
.db-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.db-stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
}
.db-stat-blue  { border-left-color: #3b82f6; }
.db-stat-green { border-left-color: #22c55e; }
.db-stat-purple{ border-left-color: #a855f7; }
.db-stat-orange{ border-left-color: #f97316; }
.db-stat-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}
.db-stat-blue  .db-stat-icon { color: #3b82f6; }
.db-stat-green .db-stat-icon { color: #22c55e; }
.db-stat-purple .db-stat-icon{ color: #a855f7; }
.db-stat-orange .db-stat-icon{ color: #f97316; }
.db-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.db-stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.db-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.db-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.db-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-light);
}
.db-card-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
}
.db-card-title i { color: var(--accent); }
.db-card-sub {
  font-size: .75rem;
  color: var(--text-muted);
}
.db-card-link {
  font-size: .75rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.db-card-link:hover { text-decoration: underline; }
.db-card-body { padding: 16px 20px; }

/* 도넛 */
.db-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.db-donut-wrap canvas { flex-shrink: 0; }
.db-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.db-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
}
.db-legend-item strong { margin-left: auto; color: var(--text); font-size: .95rem; }
.db-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 우선순위 바 */
.db-prio-list { display: flex; flex-direction: column; gap: 10px; }
.db-prio-row  { display: flex; align-items: center; gap: 10px; }
.db-prio-label { width: 52px; flex-shrink: 0; }
.db-prio-bar-wrap {
  flex: 1;
  background: var(--border-light);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.db-prio-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  min-width: 4px;
}
.db-prio-high   { background: #ef4444; }
.db-prio-medium { background: #f59e0b; }
.db-prio-low    { background: #64748b; }
.db-prio-cnt { width: 24px; text-align: right; font-size: .8rem; font-weight: 600; color: var(--text); }

/* 프로젝트 진행률 */
.db-proj-list { display: flex; flex-direction: column; gap: 14px; }
.db-proj-row  { display: flex; align-items: center; gap: 12px; }
.db-proj-name {
  width: 130px;
  flex-shrink: 0;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  text-decoration: none;
}
.db-proj-name:hover { color: var(--accent); }
.db-proj-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.db-proj-bar-bg {
  flex: 1;
  background: var(--border-light);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.db-proj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  border-radius: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  min-width: 3px;
}
.db-proj-pct {
  width: 32px;
  text-align: right;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.db-proj-badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.db-badge-todo, .db-badge-prog, .db-badge-done {
  font-size: .68rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.db-badge-todo { background: #f1f5f9; color: #64748b; }
.db-badge-prog { background: #eff6ff; color: #3b82f6; }
.db-badge-done { background: #f0fdf4; color: #16a34a; }

/* 최근 활동 */
.db-activity-list { list-style: none; margin: 0; padding: 0; }
.db-activity-list li { border-bottom: 1px solid var(--border-light); }
.db-activity-list li:last-child { border-bottom: none; }
.db-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.db-activity-item:hover { background: var(--accent-light); }
.db-act-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.db-act-todo        { background: #94a3b8; }
.db-act-in_progress { background: #3b82f6; }
.db-act-done        { background: #22c55e; }
.db-act-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.db-act-title {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-act-project {
  font-size: .72rem;
  color: var(--text-muted);
}

/* 팀 현황 */
.db-team-summary {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.db-team-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-muted);
}
.db-team-stat strong { color: var(--text); font-size: .95rem; }
.db-ts-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.db-member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.db-member-row  { display: flex; align-items: center; gap: 10px; }
.db-member-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.db-member-name { width: 72px; font-size: .8rem; font-weight: 500; flex-shrink: 0; }
.db-member-bar-wrap {
  flex: 1;
  background: var(--border-light);
  border-radius: 4px;
  height: 7px;
  overflow: hidden;
}
.db-member-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  min-width: 4px;
  opacity: .75;
}
.db-member-cnt { width: 20px; text-align: right; font-size: .8rem; font-weight: 600; color: var(--text-muted); }

/* 완료율 큰 숫자 */
.db-big-pct {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -.04em;
}
.db-big-pct span { font-size: 1.5rem; font-weight: 600; }
.db-pct-bar-wrap {
  width: 100%;
  background: var(--border-light);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}
.db-pct-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  border-radius: 6px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.db-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 0;
  color: var(--text-light);
  font-size: .82rem;
}
.db-empty i { font-size: 1.6rem; }

@media (max-width: 1100px) {
  .db-summary-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .db-summary-row { grid-template-columns: 1fr 1fr; }
  .db-grid-2 { grid-template-columns: 1fr; }
  .db-proj-badges { display: none; }
}

/* ─── 반응형 ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .main-wrapper { margin-left: 0; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ─── 매신저 공통 ────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin-icon { display: inline-block; animation: spin 1s linear infinite; }

/* 매신저 페이지에서 main-content 패딩 제거 */
.messenger-page .main-content { padding: 0 !important; }

@media (max-width: 768px) {
  .conv-panel { width: 100%; min-width: unset; }
  .chat-panel { display: none !important; }
  .conv-panel.hidden { display: none !important; }
  .chat-panel.mobile-open { display: flex !important; }
}
