/* ===== 디자인 토큰 (가독성 + 정보 밀도 균형) ===== */
:root {
  --font-base: 16px;
  --font-table: 0.875rem;   /* 14px — 목록·테이블 */
  --font-meta: 0.75rem;     /* 12px — 라벨·보조 */
  --font-title: 1.25rem;    /* 20px — 페이지 제목 */
  --line-tight: 1.35;
  --line-normal: 1.5;
  --line-relaxed: 1.6;
  --header-h: 3.25rem;
  --detail-w: 26rem;
}

/* ===== 전역 ===== */
* { box-sizing: border-box; }
html { font-size: var(--font-base); }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: var(--line-normal);
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
}

/* ===== 레이아웃 ===== */
#page-task-detail {
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: row;
  min-height: 0;
  overflow: hidden;
}
#task-main-panel {
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
}
#work-detail-panel {
  flex: 0 0 var(--detail-w);
  width: var(--detail-w);
  max-width: 42vw;
  height: 100%;
  min-height: 0;
}

/* 페이지 제목 */
.page-heading { font-size: var(--font-title); line-height: var(--line-tight); }
.page-subheading { font-size: 0.875rem; line-height: var(--line-normal); }

/* ===== 업무 테이블 ===== */
.work-items-table {
  width: 100%;
  table-layout: auto;
  font-size: var(--font-table);
  line-height: var(--line-tight);
}
.work-items-table thead th {
  font-size: var(--font-meta);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6b7280;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  vertical-align: middle;
}
.work-items-table tbody td {
  padding: 0.5625rem 0.75rem;
  vertical-align: middle;
}
.work-items-table tbody tr { transition: background-color  0.15s; }
.work-items-table tbody tr:last-child td { border-bottom: none; }
.work-items-table .col-title { min-width: 10rem; }
.work-items-table .col-assignee { width: 6.5rem; max-width: 6.5rem; }
.work-items-table .col-status { width: 5.75rem; white-space: nowrap; }
.work-items-table .col-due { width: 7.5rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.work-items-table .col-icon { width: 2.75rem; text-align: center; white-space: nowrap; }
.work-items-table .col-updated { width: 4.75rem; white-space: nowrap; font-size: var(--font-meta); color: #9ca3af; }

/* ===== 업무 상세 패널 (목록보다 약간 촘촘) ===== */
#work-detail-panel .panel-header {
  padding: 0.75rem 1rem;
  flex-shrink: 0;
}
#work-detail-panel .panel-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}
#work-detail-content {
  font-size: var(--font-table);
  line-height: var(--line-relaxed);
  padding: 0.75rem 1rem 1rem;
}
#work-detail-content .text-xs { font-size: var(--font-meta); line-height: 1.125rem; }
#work-detail-content .text-sm { font-size: var(--font-table); line-height: var(--line-normal); }
#work-detail-content .text-base { font-size: 1rem; line-height: var(--line-normal); }

/* ===== 사이드바 ===== */
#sidebar { transition: width 0.2s ease; }
.sidebar-task { font-size: var(--font-table); line-height: var(--line-tight); }

/* ===== 스크롤바 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* ===== 기타 ===== */
.nav-item { transition: all 0.15s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.upload-zone:hover { border-color: #6366f1; background-color: #eef2ff; }
.stat-card { transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
[id$="-modal"] { backdrop-filter: blur(4px); }
#notif-badge { animation: badgePop 0.3s ease; }
@keyframes badgePop { from { transform: scale(0); } to { transform: scale(1); } }
#toast-container > div { min-width: 220px; font-size: var(--font-table); }
#notif-dropdown, #user-menu, #search-dropdown { animation: fadeIn 0.15s ease; }
