@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

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

@media print { .vs-no-print { display: none !important; } }

html, body {
  height: 100%;
  font-family: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.55;
  letter-spacing: -0.005em;       /* v3.1: 한글 가독성 미세 보정 */
  color: var(--text-primary);
  background: var(--surface-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root { height: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: inherit; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }

/* ─── App Shell ─── */
.app { display: flex; height: 100vh; overflow: hidden; }

/* 이슈 리스트 전체화면 모드 — 페이지 본문을 확장 */
.issue-list-fs {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100 !important;
}

.side-rail {
  width: 56px;
  background: var(--surface-sunken);  /* v3.1.2: 살짝 진한 회색으로 1단계 분리 명확히 */
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  flex-shrink: 0;
  z-index: 20;
}

.issue-nav {
  width: 256px;             /* v3.1: 240 → 256 — "내가 결재할 이슈" 같은 라벨 잘림 방지 */
  height: 100%;             /* v3.1.3: 부모 높이 채워서 내부 .scrollable이 정상 동작 */
  background: var(--surface-base);   /* v3.1.2: 흰색 유지 */
  display: flex;
  flex-direction: column;
  overflow: hidden;         /* v3.1.3: 가로 overflow 차단 — 내부 .scrollable이 세로 스크롤 담당 */
  flex-shrink: 0;
  z-index: 10;
}
.issue-nav::-webkit-scrollbar { width: 4px; }
.issue-nav::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 2px; }

.main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-base);
  position: relative;
}

/* ═══ Page header — v3.1 ═══ */
.page-hd {
  height: 52px;            /* was 48 — 여유 */
  padding: 0 18px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: var(--surface-base);
}
.page-hd-title {
  font-size: var(--fs-h2);  /* was h3 — 페이지 타이틀 위계 ↑ */
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}
.page-hd-sep { color: var(--text-disabled); font-size: var(--fs-meta); }

.page-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  position: relative;
}

/* ─── Utility ─── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 2px; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-sm { font-size: var(--fs-meta); }
.text-xs { font-size: var(--fs-caption); }
.text-xxs { font-size: var(--fs-tiny); }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }
.color-secondary { color: var(--text-secondary); }
.color-tertiary { color: var(--text-tertiary); }
.color-red { color: var(--explan-red); }
.w-full { width: 100%; }
.h-full { height: 100%; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }

/* Scrollbar */
.scrollable { overflow-y: auto; }
.scrollable::-webkit-scrollbar { width: 4px; }
.scrollable::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 2px; }

/* ── 태블릿 모드 (개발정의서_태블릿화면 §4) ────────────────────────────────────
   .tablet-mode 는 TabletStage 가 콘솔 루트에 붙인다. 실기기에서는 같은 규칙을
   미디어쿼리(뷰포트 ≤1366 + 터치)로 걸면 프레임 없이도 그대로 성립한다.
   ★기능을 빼지 않는다 — 여기서 하는 건 손가락으로 누를 수 있게 만드는 것뿐이다. */
.tablet-mode { --tablet: 1; height: 100%; }
/* 스테이지 안에서는 100vh 가 '브라우저 창'을 가리켜 프레임을 뚫고 나간다 — 컨테이너 기준으로 */
.tablet-mode .app { height: 100%; }
/* 터치 타깃 — 마우스 포인터 기준(28px)으로는 손끝이 옆 항목을 누른다 */
.tablet-mode .rail-btn,
.tablet-mode .rail-item { min-width: 40px; min-height: 40px; }
.tablet-mode .sidebar-item,
.tablet-mode .nav-item { min-height: 40px; }
/* 세로 모드: 밀도 높은 표는 컬럼을 줄이지 않고 가로로 스크롤한다(전 컬럼 접근 보장) */
.tablet-portrait .issue-table { min-width: 980px; }
.tablet-portrait .table-scroll,
.tablet-portrait .list-scroll { overflow-x: auto; }
