:root {
  --bg: #F5F5F3;
  --surface: #FFFFFF;
  --surface-2: #EFEFEC;
  --border: #E3E3DF;
  --text: #1C1C1A;
  --text-2: #68675F;
  --text-3: #9C9B93;
  --accent: #2F5DE8;
  --accent-soft: #E9EFFD;
  --good: #3EA65C;
  --warn: #C2740A;
  --bad: #C93A3A;
  --tag-purple: #7C5CD9; --tag-purple-bg: #F1ECFB;
  --tag-blue: #2F5DE8; --tag-blue-bg: #E9EFFD;
  --tag-orange: #C2740A; --tag-orange-bg: #FBEEDD;
  --tag-red: #C93A3A; --tag-red-bg: #FBEAEA;
  --tag-green: #2F8F4E; --tag-green-bg: #E3F6E8;
  --tag-teal: #0E8074; --tag-teal-bg: #DFF5F1;
  --tag-pink: #C93A82; --tag-pink-bg: #FBE8F3;
  --tag-gray: #6B6A62; --tag-gray-bg: #EFEFEA;
  --tag-yellow: #B38600; --tag-yellow-bg: #FDF3CC;
  --tag-lime: #5B9A0A; --tag-lime-bg: #EAF7D0;
  --tag-sky: #1B8AC4; --tag-sky-bg: #E0F2FB;
  --tag-navy: #2B3A8F; --tag-navy-bg: #E3E7F6;
  --tag-brown: #8A5A3B; --tag-brown-bg: #F3E9E2;
  --tag-magenta: #A3238E; --tag-magenta-bg: #F8E5F5;
  --tag-olive: #6B6B1A; --tag-olive-bg: #EFEFD6;
  --tag-charcoal: #374151; --tag-charcoal-bg: #E5E7EB;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #1E44BE; }

button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1E44BE; }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red-bg, var(--tag-red-bg)); color: var(--bad); }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number],
textarea, select {
  font-family: inherit;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
}
/* 시간 입력(일정 등록): 날짜 칸과 같은 모양·글꼴로 — 크롬의 시간 선택 팝업도 이 입력칸의 글꼴·크기를 따라간다 */
.field input[type=time] { width: 100%; box-sizing: border-box; color-scheme: light; }
input[type=time]::-webkit-datetime-edit { font-family: inherit; font-size: inherit; padding: 0; }
input[type=time]::-webkit-datetime-edit-fields-wrapper { font-family: inherit; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

/* DOT 상세 모달의 제목/설명처럼 값이 자주 바뀌는 입력창에서, 수정 후 "저장됨" 메시지가 뜨기
   전에 크롬이 자체적으로 노란 배경(자동완성/자동저장 추정 하이라이트, rgb(250,255,189))을 아주
   짧게 그렸다가 지우는 경우가 있다 — 우리 CSS와 무관하게 브라우저가 직접 그리는 색이라 배경색을
   지정하는 것만으로는 안 없어진다. 전환(transition) 시간을 사실상 무한으로 늘려서 그 배경색이
   "보이기 전에" 항상 원래 배경(흰색)으로 즉시 덮이게 만드는, 이 문제의 표준적인 우회 방법이다. */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus,
textarea:-webkit-autofill, textarea:-webkit-autofill:hover, textarea:-webkit-autofill:focus,
select:-webkit-autofill, select:-webkit-autofill:hover, select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0px 1000px #fff inset;
  box-shadow: 0 0 0px 1000px #fff inset;
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}

/* 날짜 입력 — 달력 선택 전용 (common.js의 lockDateInputsToCalendar가 매 date 입력을 이 구조로
   감싼다). 처음엔 글자 색만 투명 처리해서 값을 감추려 했는데, 연/월/일 중 한 칸이 포커스되면
   브라우저가 그 칸에 자체 하이라이트(파란 배경)를 색 지정과 무관하게 그려버려서 계속 뭔가
   비쳐 보이는 문제가 있었다 — 그래서 아예 네이티브 입력 자체를 화면에서 완전히 투명(opacity:0)
   하게 만들어 달력을 여는 기능만 담당하게 하고, 보이는 글자/테두리/배경은 전부 우리가 감싼
   .date-input-wrap과 .date-placeholder가 직접 그린다(값이 있으면 그 값을, 없으면 "날짜 선택"을
   표시). 이러면 네이티브 쪽에서 무엇을 어떻게 그리든(하이라이트 포함) 화면에 전혀 비치지 않는다. */
.date-input-wrap {
  position: relative;
  display: block;
  cursor: pointer;
}
.date-input-wrap input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  padding: 0;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}
.date-input-wrap .date-placeholder {
  position: relative;
  display: block;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text-3);
}
.date-input-wrap.has-value .date-placeholder { color: var(--text); }
/* 리스트 화면의 시작일/마감일 칸(.list-start/.list-due)은 폭이 100px로 좁고 원래
   list-date-edit이 쓰던 더 작은 글씨/중앙 정렬/여백을 그대로 옮겨온다. */
.list-start .date-placeholder, .list-due .date-placeholder {
  font-size: 12px;
  text-align: center;
  border-radius: 5px;
  padding: 2px 4px;
  background: var(--surface);
}

/* App shell -------------------------------------------------------- */

.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* 왼쪽 아이콘 레일 — 평소엔 64px 아이콘 전용 폭을 유지하다가, 맨 아래 펼침/접힘 버튼을
   눌러야 넓어지는 수동 토글 방식이다(자동 호버 확장은 페이지 내용을 가려서 거슬린다는
   피드백으로 제거함). 펼친 상태(.rail.rail-expanded)에서는 .rail 자체의 폭이 넓어지고
   .rail-inner는 그 폭을 100% 그대로 따라가므로, 오버레이가 아니라 실제 레이아웃이 넓어져서
   옆의 본문(main-col)이 오른쪽으로 밀려나고 내용이 사이드바에 가려지지 않는다. 펼침 상태는
   common.js가 localStorage에 기억해뒀다가 다음 방문 때도 그대로 유지한다.
   톤은 앱 전체와 같은 화이트 계열로 두고(사용자 요청: "화이트 톤으로 돌리고"), 선택된
   메뉴의 아이콘/글자 색만 블루 액센트 대신 블랙 톤(#1C1C1A)을 쓴다. */
.rail { width: 64px; flex-shrink: 0; position: relative; z-index: 40; transition: width .16s ease; }
.rail.rail-expanded { width: 190px; }
.rail-inner {
  position: absolute; top: 0; left: 0; bottom: 0; width: 100%; overflow: hidden;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: stretch;
  padding: 18px 0; gap: 4px;
}
.rail-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 16px 17px; flex-shrink: 0; overflow: hidden; }
.rail-inner .logo { width: 30px; height: 30px; object-fit: contain; margin: 0; flex-shrink: 0; }
.rail-brand-text {
  font-size: 16px; font-weight: 800; color: var(--text); white-space: nowrap;
  letter-spacing: -.02em; opacity: 0; transition: opacity .1s ease;
}
.rail.rail-expanded .rail-brand-text { opacity: 1; }
.rail-inner a {
  height: 40px; border-radius: 8px; color: var(--text-2);
  display: flex; align-items: center; gap: 14px;
  margin: 0 10px; padding: 0 13px;
  white-space: nowrap; overflow: hidden; flex-shrink: 0;
}
.rail-inner a:hover { background: var(--surface-2); color: var(--text); }
.rail-inner a.active { background: rgba(28,28,26,.08); color: #1C1C1A; }
.rail-icon {
  width: 20px; height: 20px; flex-shrink: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.rail-label {
  font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .1s ease;
}
.rail.rail-expanded .rail-label { opacity: 1; }
/* 맨 아래 펼침/접힘 토글 버튼 — 다른 메뉴 항목과 같은 좌우 여백/아이콘 위치를 쓰되,
   margin-top:auto로 레일 맨 아래에 붙인다. 화살표 아이콘은 펼친 상태에서 180도 돌아간다. */
.rail-toggle-btn {
  height: 40px; border-radius: 8px; color: var(--text-2); background: none; border: none;
  display: flex; align-items: center; gap: 14px; margin: 4px 10px 0; padding: 0 13px;
  white-space: nowrap; overflow: hidden; flex-shrink: 0; margin-top: auto;
  font-family: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.rail-toggle-btn:hover { background: var(--surface-2); color: var(--text); }
.rail-toggle-btn .rail-icon svg { transition: transform .16s ease; }
.rail.rail-expanded .rail-toggle-btn .rail-icon svg { transform: rotate(180deg); }
.dm-unread-dot {
  display: none; position: absolute; top: -2px; right: -3px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--bad);
  border: 1.5px solid var(--surface);
}

/* DOT 메뉴의 "안읽음 있는 LINE 목록" 펼치기 버튼 — 아이콘 위 빨간 점은 이제 순수 표시 전용
   (눌러도 그냥 아이콘처럼 "하던 작업으로 이동"만 한다)이고, 이 작은 원형 화살표 배지만 눌러야
   목록이 펼쳐진다(common.js renderDotDropdown). 사이드바를 접어서 아이콘만 보이는 상태를 더 자주
   쓴다는 피드백으로, 라벨 옆이 아니라 .rail-icon 모서리에 절대 위치시켜서 접힌/펼친 상태 모두에서
   항상 보이고 눌리게 한다(빨간 점과 자리가 겹치지 않도록 반대쪽 아래 모서리에 둔다). */
.dot-dropdown-arrow {
  display: none; position: absolute; bottom: -6px; right: -7px; width: 16px; height: 16px;
  align-items: center; justify-content: center; cursor: pointer; z-index: 1;
  color: #fff; background: var(--accent); border: 1.5px solid var(--surface);
  border-radius: 50%;
}
.dot-dropdown-arrow:hover { background: #1E44BE; }
/* 사이드바 아이콘 위가 아니라 "채팅" 같은 서브내비 글자 옆에 붙이는 작은 안읽음 점 —
   dm-unread-dot과 달리 절대 위치가 아니라 글자 뒤에 자연스럽게 흐르도록 inline-block으로 둔다. */
.subnav-unread-dot {
  display: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bad); margin-left: 6px; vertical-align: middle;
}

.main-col { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 60px; flex-shrink: 0; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.crumbs .current { color: var(--text); font-weight: 600; }

.avatar {
  border-radius: 50%; color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 700; flex-shrink: 0;
  /* 글씨 크기는 이제 avatarEl()에서 원 크기에 맞춰 직접 정해서 넘칠 일이 없지만,
     혹시 모를 경우(아주 긴 이름 등)에도 항상 깔끔한 원으로만 보이도록 안전장치를 둔다. */
  overflow: hidden; line-height: 1; white-space: nowrap;
}

/* Board -------------------------------------------------------------- */

.board-header {
  padding: 20px 28px 14px; display: flex; align-items: center;
  justify-content: space-between; flex-shrink: 0;
}
.board-header h1 { margin: 0; font-size: 21px; font-weight: 800; }
.board-header .meta { margin-top: 4px; font-size: 13px; color: var(--text-2); }
/* 제목 줄을 낮게: LINE 이름 옆에 "멤버 N명"과 작은 아바타를 같은 줄로 붙인다 */
.board-header { padding: 10px 28px 8px; }
.board-header > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.board-header > div:first-child h1 { font-size: 19px; line-height: 1.3; }
.board-header > div:first-child .meta { margin-top: 0; font-size: 12px; gap: 6px !important; }
.board-header #member-avatars .avatar { width: 20px !important; height: 20px !important; font-size: 8px !important; border-width: 1.5px !important; }
.board-header #member-avatars .avatar + .avatar { margin-left: -6px !important; }

.projects-toolbar {
  padding: 20px 28px 14px; display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0;
}

.columns {
  flex-grow: 1; display: flex; gap: 14px; padding: 0 28px 24px;
  overflow-x: auto; overflow-y: hidden;
}

.column {
  /* 최소 300px, 컬럼이 화면을 다 못 채우면 남는 폭을 똑같이 나눠 가진다(창 크기에 맞춰 늘어남).
     컬럼이 많아 300px씩도 안 들어가면 늘어나지 않고 가로 스크롤(.columns)로 넘어간다. */
  flex: 1 0 300px; min-width: 0; display: flex; flex-direction: column;
  background: var(--surface-2); border-radius: 10px; padding: 12px;
  max-height: 100%;
}
.column-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px 12px; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
/* 컬럼(단계) 구분용 점 — 보드 컬럼 헤더뿐 아니라 타임라인 그룹 라벨, 리스트 상태 칸에서도 재사용한다. */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; flex-shrink: 0; vertical-align: middle; }
.column-body { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.column-body.drag-over { outline: 2px dashed var(--accent); outline-offset: -4px; border-radius: 8px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); cursor: grab;
}
.card.dragging { opacity: .4; }
/* 아직 열어보지 않은 새 DOT — 오른쪽 위 파란 점 */
.card { position: relative; }
.card.is-new::after {
  content: ''; position: absolute; top: 8px; right: 8px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent, #2f6bff); box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}
.card .badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.card .label { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 7px; }
.card .priority-tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }
.priority-low { color: var(--text-3); background: var(--surface-2); }
.priority-normal { color: var(--accent); background: var(--accent-soft); }
.priority-high { color: var(--warn); background: var(--tag-orange-bg); }
.priority-urgent { color: var(--bad); background: var(--tag-red-bg); }
.card .title { font-size: 13.5px; font-weight: 600; line-height: 1.4; margin-bottom: 10px; }
.card .footer { display: flex; align-items: center; justify-content: space-between; }
.card .due { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.card .due.overdue { color: var(--bad); font-weight: 600; }
.card .assignee-stack { display: flex; align-items: center; }
.card .assignee-stack .avatar-sm { border: 2px solid var(--surface); }
.card .assignee-stack .avatar-more {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2);
  color: var(--text-2); font-size: 10px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; border: 2px solid var(--surface);
}

.label-blue { color: var(--tag-blue); background: var(--tag-blue-bg); }
.label-purple { color: var(--tag-purple); background: var(--tag-purple-bg); }
.label-orange { color: var(--tag-orange); background: var(--tag-orange-bg); }
.label-red { color: var(--tag-red); background: var(--tag-red-bg); }
.label-green { color: var(--tag-green); background: var(--tag-green-bg); }
.label-teal { color: var(--tag-teal); background: var(--tag-teal-bg); }
.label-pink { color: var(--tag-pink); background: var(--tag-pink-bg); }
.label-gray { color: var(--tag-gray); background: var(--tag-gray-bg); }
.label-yellow { color: var(--tag-yellow); background: var(--tag-yellow-bg); }
.label-lime { color: var(--tag-lime); background: var(--tag-lime-bg); }
.label-sky { color: var(--tag-sky); background: var(--tag-sky-bg); }
.label-navy { color: var(--tag-navy); background: var(--tag-navy-bg); }
.label-brown { color: var(--tag-brown); background: var(--tag-brown-bg); }
.label-magenta { color: var(--tag-magenta); background: var(--tag-magenta-bg); }
.label-olive { color: var(--tag-olive); background: var(--tag-olive-bg); }
.label-charcoal { color: var(--tag-charcoal); background: var(--tag-charcoal-bg); }

/* 담당자 다중 선택 체크박스 목록 ------------------------------------------- */
.assignee-checklist {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 4px;
  max-height: 150px; overflow-y: auto; display: flex; flex-direction: column;
}
.assignee-checklist-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  font-size: 13px; border-radius: 6px; cursor: pointer;
}
.assignee-checklist-item:hover { background: var(--surface-2); }
.assignee-checklist-item input { margin: 0; flex-shrink: 0; }
/* 이름 + 부서·직급 두 줄 — 부서명이 길어도 괄호로 붙여 한 줄로 쓰면 어색하게 줄바꿈되므로,
   보조줄로 따로 빼고 각각 한 줄을 넘으면 말줄임(...)으로 자른다. */
.assignee-checklist-name-col {
  display: flex; flex-direction: column; min-width: 0; flex-grow: 1; gap: 1px;
}
.assignee-checklist-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignee-checklist-sub {
  font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Modal ---------------------------------------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,20,19,.35);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  width: 720px; max-width: 92vw; max-height: 86vh; background: var(--surface);
  border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  display: flex; overflow: hidden;
}
.modal-main { flex: 1.6; display: flex; flex-direction: column; border-right: 1px solid var(--border); min-width: 0; }
.modal-side { width: 220px; flex-shrink: 0; padding: 20px 18px; background: var(--surface-2); display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.modal-close {
  position: absolute; top: 14px; right: 14px; border: none; background: none;
  color: var(--text-3); font-size: 18px; cursor: pointer;
}

/* 업무 상세 모달 자동저장 상태 표시 — 제목/설명/날짜 등을 고치면 바로 저장되는데, 그게
   실제로 저장됐는지(혹은 실패했는지) 알 수 있게 "저장 중…/저장됨/저장 실패"를 보여준다. */
.cm-save-status { font-size: 11.5px; font-weight: 600; flex-shrink: 0; opacity: 0; transition: opacity .2s; }
.cm-save-status.visible { opacity: 1; }
.cm-save-status.saving { color: var(--text-3); }
.cm-save-status.saved { color: var(--good); }
.cm-save-status.error { color: var(--bad); }

/* Login / project list ------------------------------------------------- */

.centered-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #08080A; position: relative; overflow: hidden;
}
/* 로그인 배경 캔버스 — 격자 위에 마우스를 따라다니는 발광 구체 + 클릭 시 생기는 노드/연결선
   (login.html의 스크립트가 그린다). 로그인 박스 뒤에 깔리도록 절대 위치 + 낮은 z-index. */
#login-bg-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; z-index: 0;
}
.login-box {
  position: relative; z-index: 1;
  width: 360px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 32px; box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
/* 로그인 화면 오른쪽 아래 저작권 문구 */
.login-copyright {
  position: absolute; right: 32px; bottom: 24px; z-index: 1; pointer-events: none; user-select: none;
  font-size: 14px; font-weight: 300; letter-spacing: .01em; color: rgba(255,255,255,.6);
}
@media (max-width: 600px) { .login-copyright { right: 0; left: 0; text-align: center; bottom: 16px; font-size: 12px; } }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.login-brand-text { display: flex; flex-direction: column; gap: 0; }
.login-box h1 { font-size: 22px; line-height: 1.1; margin: 0; }
.login-box p.sub { color: #6E6F76; font-size: 12.5px; font-weight: 600; line-height: 1.1; letter-spacing: -.05em; margin: 0; }
/* 로그인 화면만 블랙+회색 톤 — 상단 배경(위)과 버튼/포커스 보더를 블루 액센트 대신 블랙 계열로
   바꾼다. 다른 화면의 .btn-primary/포커스 색은 그대로 파란색을 유지해야 하므로, 반드시
   .login-box를 조상 선택자로 걸어 로그인 화면에만 적용되게 한다. */
.login-box .btn-primary { background: #1C1C1A; }
.login-box .btn-primary:hover { background: #000; }
.login-box input:focus { border-color: #1C1C1A; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }

/* 4칸 고정 폭 그리드 — 화면 너비와 상관없이 항상 같은 (행,열) 위치를 유지해야 사용자가
   자유롭게 카드를 옮겨 놓은 배치가 화면 크기에 따라 흐트러지지 않는다. 화면이 좁으면
   가로 스크롤이 생긴다. 열 개수(4)는 js/projects.js의 GRID_COLS와 반드시 같아야 한다. */
.project-grid {
  display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr));
  grid-auto-rows: 176px; gap: 16px; padding: 24px 28px; overflow-x: auto;
  position: relative;
}
.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
  position: relative; cursor: grab; overflow: hidden;
}
.project-card.dragging { opacity: .4; }
.project-card.drop-target { outline: 2px solid var(--accent); outline-offset: -2px; }
/* 초대받고 아직 한 번도 안 열어본 LINE — 왼쪽 위 파란 점(board.js의 .card.is-new와 같은 디자인
   언어). 관리 버튼(오른쪽 위 점 세개)과 겹치지 않게 반대쪽(왼쪽)에 둔다. */
.project-card.is-new::after {
  content: ''; position: absolute; top: 10px; left: 10px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}
.project-card h3 {
  margin: 0; font-size: 15px; padding-right: 22px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.project-card .desc {
  font-size: 12.5px; color: var(--text-2); min-height: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.project-card .due {
  font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 4px; min-width: 0;
}
/* 마감일이 길어지면(.due-text) 그 텍스트만 말줄임되고, 탭 배지(.line-tab-badges)는 항상 전체가
   보이게 flex-shrink:0 — 전에는 .due 전체가 한 줄 overflow:hidden이라 배지가 텍스트 길이에 따라
   잘려 보이는 문제가 있었다. */
.project-card .due .due-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1;
}
/* 알림 배지는 날짜 줄 아래 별도 줄 — 날짜가 말줄임되지 않고, 배지가 없어도 줄 높이를 비워 둬서 카드 높이가 같다 */
.project-card .pc-badges { min-height: 18px; display: flex; align-items: center; min-width: 0; }
.project-card .pc-badges .line-tab-badges { margin-left: 0; }
.project-card .manager {
  font-size: 11.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; flex: 1;
}
/* "멤버 N명 + 아이콘" — 내 LINE 카드(오른쪽 아래)와 리스트(설명 옆) 공통 */
.member-chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.member-chip .mc-count { font-size: 11.5px; color: var(--text-3); }
.member-chip .mc-stack { display: inline-flex; align-items: center; }
.member-chip .mc-more {
  width: 22px; height: 22px; border-radius: 50%; margin-left: -7px; box-sizing: border-box;
  background: var(--surface-2); color: var(--text-2); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface);
}
/* 카드 맨 아래 줄: 왼쪽 관리자, 오른쪽 "멤버 N명 + 아이콘" — 좁아지면 관리자 이름만 줄어든다 */
.project-card .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.project-card .pc-foot .member-chip { flex-shrink: 0; }
.line-table .lt-members { width: 190px; }
/* 아직 프로젝트가 없는 빈 칸 — 평소엔 안 보이다가, 드래그 중일 때만 놓을 수 있는 자리로
   테두리를 보여준다. */
.grid-slot { pointer-events: none; border-radius: 10px; }
.project-grid.drag-active .grid-slot { border: 1px dashed var(--border); }
.grid-slot.drop-target { border: 2px dashed var(--accent); background: var(--accent-soft); }
.project-card-manage-btn {
  position: absolute; top: 14px; right: 12px; border: none; background: none;
  color: var(--text-3); cursor: pointer; padding: 3px; border-radius: 6px; line-height: 0;
}
.project-card-manage-btn:hover { background: var(--surface-2); color: var(--text); }
/* 내 LINE — 리스트 보기(카드 보기와 같은 LINE을 표 형태로 보여준다) ---------------------- */
.line-list-wrap { padding: 24px 28px; overflow: auto; flex: 1; min-height: 0; }
.line-table {
  width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.line-table th {
  font-size: 11px; font-weight: 700; color: var(--text-3); text-align: left;
  padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2);
  white-space: nowrap;
}
.line-table th .list-sort-btn { margin-left: 4px; }
.line-table td {
  padding: 12px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--border);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.line-table tbody tr:last-child td { border-bottom: none; }
.line-table tbody tr.line-row { cursor: pointer; }
.line-table tbody tr.line-row:hover td { background: var(--surface-2); }
.line-table .lt-name { width: 24%; }
.line-table .lt-desc { width: auto; }
.line-table .lt-date { width: 104px; }
.line-table .lt-mgr { width: 130px; }
.line-table .lt-badge { width: 236px; min-width: 236px; }  /* 배지 5개(보드·캘린더·채팅·WhiteBoard·Wiki)가 모두 들어가야 한다 */
.line-table .lt-badge .line-tab-badges { margin-left: 0; flex-wrap: wrap; row-gap: 4px; }
.line-table .lt-act { width: 44px; text-align: center; }
.line-table td.lt-name a { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.line-table td.lt-date.overdue { color: var(--bad); font-weight: 600; }
.line-table td .lt-sub { display: block; font-size: 11px; color: var(--text-3); }
.line-table .lt-empty { text-align: center; color: var(--text-3); padding: 28px; cursor: default; }
.line-table td.lt-act { padding: 6px; }
.line-table td.lt-act .project-card-manage-btn { position: static; }

/* DM 목록의 안읽음 수(js/dm.js), 서브내비 "보드" 탭의 "새 DOT N" 수(common.js
   refreshSubnavBadges, board.html 등 7개 페이지의 #subnav-board-new-count)가 쓰는, LINE 카드
   배지와는 무관한 원래 배지 스타일. 이름이 같다고 LINE 카드 배지 쪽에서 재사용하면 안 된다. */
.chat-unread-badge {
  display: inline-block; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700;
  border-radius: 8px; padding: 1px 7px; margin-left: 4px;
}
.new-card-badge {
  display: inline-block; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700;
  border-radius: 8px; padding: 1px 7px; margin-left: 4px;
}

/* LINE 카드/리스트의 "탭별 새 항목" 배지 — 탭마다 아이콘+숫자를 한 알약 안에(js/projects.js
   LINE_TAB_BADGES). 클래스명은 위 두 개와 겹치지 않게 card-badge-* 로 새로 쓴다. 숫자를 아이콘
   박스 "바깥"(position:absolute, top 음수)으로 튀어나오게 했더니 부모(.due)의 overflow:hidden에
   위쪽이 잘렸던 적이 있어 — 아이콘+숫자를 inline-flex로 한 알약 안에 나란히 넣어 박스 밖으로
   아무것도 튀어나오지 않게 한다. 덕분에 카드의 기존 .due 한 줄 안에 그대로 들어가서 별도 줄이
   필요 없고, 카드 보기에서는 날짜 아래 별도 줄(.pc-badges)에 둔다. project-grid의 고정 grid-auto-rows(176px) 안에 들어간다. */
.line-tab-badges { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 6px; flex-shrink: 0; }
.line-tab-badge {
  display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0;
  padding: 1px 5px; border-radius: 8px; background: var(--surface-2); color: var(--text-2);
  font-size: 9.5px; font-weight: 700; line-height: 1.4; cursor: pointer;
}
.line-tab-badge svg { flex-shrink: 0; }
.line-tab-badge:hover { background: var(--border); }
/* 탭마다 다른 색으로 한눈에 구분되게(채팅=빨강, 새 DOT=파랑, Wiki=보라, WhiteBoard=청록, 새 일정=주황) */
.line-tab-badge.card-badge-chat { color: var(--bad); }
.line-tab-badge.card-badge-board { color: var(--accent); }
.line-tab-badge.card-badge-docs { color: var(--tag-purple); }
.line-tab-badge.card-badge-wb { color: var(--tag-teal); }
.line-tab-badge.card-badge-cal { color: var(--tag-orange); }

/* 계정 관리 / 내 계정 ---------------------------------------------------- */

.page-pad { padding: 24px 28px; overflow-y: auto; }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px 22px; margin-bottom: 20px;
}
.panel h2 { margin: 0 0 4px; font-size: 15px; }
.panel .panel-sub { font-size: 12.5px; color: var(--text-2); margin: 0 0 16px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; font-size: 11.5px; color: var(--text-2); font-weight: 700;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.data-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.data-table th.sortable:hover { color: var(--text-1, #111); }
.data-table th.sortable.sorted { color: var(--accent); }
.data-table th .sort-arrow { display: inline-block; min-width: 12px; margin-left: 3px; font-size: 9px; }
.pager-btn { padding: 4px 10px; font-size: 12.5px; border: 1px solid var(--border); min-width: 32px; }
.pager-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pager-btn:disabled { opacity: .45; cursor: default; }
.data-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }

.role-badge {
  display: inline-block; font-size: 11px; font-weight: 700; border-radius: 5px;
  padding: 2px 8px;
}
.role-badge.admin { color: var(--tag-red); background: var(--tag-red-bg); }
.role-badge.member { color: var(--tag-blue); background: var(--tag-blue-bg); }
.role-badge.notice { color: var(--tag-purple); background: var(--tag-purple-bg); margin-left: 4px; }

.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { margin-bottom: 0; }

.msg-box {
  font-size: 12.5px; padding: 9px 11px; border-radius: 8px; margin-bottom: 14px;
}
.msg-box.error { background: var(--tag-red-bg); color: var(--bad); }
.msg-box.success { background: var(--tag-blue-bg); color: var(--accent); }

/* 프로젝트 내 서브 내비게이션 (보드 / 타임라인 / 채팅) --------------------- */

.project-subnav {
  display: flex; gap: 22px; padding: 0 28px; border-bottom: 1px solid var(--border);
  background: var(--surface); flex-shrink: 0;
}
.project-subnav a {
  padding: 12px 0; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent;
}
.project-subnav a:hover { color: var(--text); }
.project-subnav a.active { color: var(--text); border-bottom-color: var(--accent); }

/* 타임라인 (간트) --------------------------------------------------------- */

/* 좌측 라벨(이슈명) 영역과 우측 날짜 그리드 영역을 아예 별개의 요소로 분리해서,
   오른쪽만 가로 스크롤되고 왼쪽 라벨 열은 스크롤과 무관하게 항상 그 자리에 고정되도록 한다. */
.tl-outer { display: flex; align-items: flex-start; }
.tl-labels {
  flex: 0 0 200px;
  width: 200px;
  display: grid;
  row-gap: 3px;
}
.tl-outer.standalone .tl-labels { flex: 1 1 auto; width: auto; }
.tl-outer.standalone .tl-scroll { display: none; }
.tl-scroll { flex: 1 1 auto; overflow-x: auto; overflow-y: hidden; }
#timeline-grid {
  display: grid;
  row-gap: 3px;
  /* 칸 폭(px)은 timeline.js의 renderTimeline()이 매번 #timeline-scroll의 실제 폭을 재서
     직접 계산해 grid-template-columns에 박아 넣는다(1fr 등 CSS 자동 분배에 기대지 않음).
     그래서 이 박스는 기본 block 동작(부모 폭까지 채움)이면 되는데, 다만 날짜 범위가 길어서
     계산된 칸 폭 합계가 부모 폭보다 커지는 경우엔 min-width: max-content가 있어야 박스가
     그 내용물 크기만큼 실제로 늘어나서 #timeline-scroll의 가로 스크롤이 정상적으로 생긴다. */
  min-width: max-content;
  position: relative;
}
.tl-deps-svg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
.tl-dep-line { stroke: var(--text-3); stroke-width: 1.5; fill: none; stroke-dasharray: 4 3; opacity: 0.7; }
.tl-dep-arrowhead { fill: var(--text-3); opacity: 0.7; }
.tl-chip {
  flex: none; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 2px 5px; margin-right: 5px;
  border-radius: 8px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.tl-chip.done { background: #E6F4EA; color: #2E7D46; border-color: #BFE0C8; }
.tl-chip.date { margin-right: 0; margin-left: 5px; background: #FFF4E0; color: #B26A00; border-color: #F2D9A8; }
.tl-chip.date.go { cursor: zoom-in; }
.tl-chip.date.go:hover { background: #FFE7B8; }
.tl-wide-reset { color: var(--accent); font-weight: 700; font-size: 12px; }
.tl-chip.pred { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tl-row-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-undated-row .tl-row-title { flex: 1 1 auto; }
.tl-row-label {
  font-size: 12.5px; padding-right: 14px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: pointer; display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
}
.tl-month {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--text-2);
  padding: 3px 0; border-left: 1px solid var(--border);
  /* 월이 바뀌는 경계에서 며칠 안 되는 짧은 구간은 라벨 전체가 안 들어갈 수 있다 —
     칸을 넓히는 대신 넘치는 글자를 말줄임표로 자른다. */
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tl-day {
  text-align: center; font-size: 11px; color: var(--text-3); padding: 5px 0;
  border-left: 1px solid var(--border);
}
.tl-day.saturday { background: var(--surface-2); color: var(--accent); }
.tl-day.holiday { background: var(--surface-2); color: var(--bad); }
.tl-day.today { color: var(--accent); font-weight: 800; background: var(--accent-soft); }
.tl-group-label {
  font-size: 12px; font-weight: 700; color: var(--text-2); padding: 6px 0 2px;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
}
.tl-bar {
  position: relative;
  height: 22px; border-radius: 5px; font-size: 11px; color: #fff; display: flex;
  align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: grab; background: var(--accent);
}
.tl-bar.label-blue { background: var(--tag-blue); }
.tl-bar.label-purple { background: var(--tag-purple); }
.tl-bar.label-orange { background: var(--tag-orange); }
.tl-bar.label-red { background: var(--tag-red); }
.tl-bar.label-green { background: var(--tag-green); }
.tl-bar.label-teal { background: var(--tag-teal); }
.tl-bar.label-pink { background: var(--tag-pink); }
.tl-bar.label-gray { background: var(--tag-gray); }
.tl-bar.label-yellow { background: var(--tag-yellow); }
.tl-bar.label-lime { background: var(--tag-lime); }
.tl-bar.label-sky { background: var(--tag-sky); }
.tl-bar.label-navy { background: var(--tag-navy); }
.tl-bar.label-brown { background: var(--tag-brown); }
.tl-bar.label-magenta { background: var(--tag-magenta); }
.tl-bar.label-olive { background: var(--tag-olive); }
.tl-bar.label-charcoal { background: var(--tag-charcoal); }
.tl-bar.dragging { opacity: 0.75; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18); z-index: 3; }

/* 막대 좌우 끝의 드래그 손잡이 — 기간(시작일/마감일)을 각각 늘리거나 줄이는 데 쓴다.
   막대 몸통(가운데)을 드래그하면 기간은 그대로 두고 통째로 다른 날짜로 옮긴다. */
.tl-bar-handle { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.tl-bar-handle-left { left: 0; }
.tl-bar-handle-right { right: 0; }

/* 세로(날짜 경계)/가로(줄 구분) 보조선 — 헤더에만 있던 경계선을 그리드 전체로 늘려서
   업무가 많아져도 날짜 칸과 줄 구분이 잘 보이게 한다. 클릭에 지장 없도록 통과시킨다. */
.tl-gridline-v { border-left: 1px solid var(--border); pointer-events: none; }
.tl-gridline-h { border-bottom: 1px solid var(--border); pointer-events: none; }

/* 드래그 중에는 마우스가 어디 위를 지나가든 커서를 고정하고 텍스트 선택을 막는다. */
body.tl-dragging, body.tl-dragging * { cursor: grabbing !important; user-select: none !important; }

.tl-undated-row {
  padding: 9px 4px; font-size: 12.5px; border-bottom: 1px solid var(--border); cursor: pointer;
  display: flex; align-items: center; overflow: hidden;
}
.tl-undated-row:hover { background: var(--surface-2); }

/* 타임라인 상단 툴바(이슈별/담당자별 전환, 일/주/월 확대·축소) — 세그먼트 버튼 그룹 형태 */
.tl-toolbar { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tl-seg { display: flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 2px; }
.tl-seg button {
  border: none; background: none; padding: 6px 13px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); border-radius: 6px; white-space: nowrap;
}
.tl-seg button:hover:not(.active) { color: var(--text); }
.tl-seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
/* 담당자별 보기에서 특정 담당자만 골라 보는 선택박스 — 세그먼트 버튼과 나란히 놓이므로 더 작게 */
.tl-toolbar select { font-size: 12.5px; padding: 6px 10px; min-width: 118px; }
.tl-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; white-space: nowrap; }
.tl-check input { margin: 0; width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }

/* 주 단위로 축소했을 때 날짜 헤더에 표시하는 구간 라벨(예: "9/1") — 주 컬럼은 폭이 넉넉해서
   (TL_ZOOM_MIN_PX.week) 굳이 왼쪽으로 치우칠 필요가 없다. 예전엔 왼쪽 정렬 + 옆 칸으로
   넘쳐 보이게 했는데, 그 라벨이 왼쪽 그리드 선에 바짝 붙어 보여서 "그리드 줄이 자기 컬럼이
   아니라 옆 컬럼 것처럼" 보이는 착시를 일으켰다. 그냥 .tl-day의 기본 가운데 정렬을 쓴다. */
.tl-day.tl-day-mark {
  font-size: 10px; font-weight: 700; color: var(--text-2);
}

/* 리스트 (등록 순서대로 나열) ------------------------------------------------ */

.list-scroll { flex-grow: 1; overflow: auto; padding: 0 28px 24px; }  /* 머리글(.board-header)과 같은 28px 들여쓰기 */
.list-head, .list-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
}
.list-head {
  font-size: 11px; font-weight: 700; color: var(--text-3); border-bottom: 1px solid var(--border);
}
.list-row { border-bottom: 1px solid var(--border); cursor: default; }
.list-row:hover { background: var(--surface-2); }
.list-index { width: 36px; flex-shrink: 0; color: var(--text-3); font-size: 12.5px; text-align: center; }
.list-start, .list-due { width: 100px; flex-shrink: 0; font-size: 12.5px; color: var(--text-3); text-align: center; cursor: pointer; }
.list-created { width: 90px; flex-shrink: 0; font-size: 12.5px; color: var(--text-3); text-align: center; }
.list-status { width: 100px; flex-shrink: 0; font-size: 12.5px; text-align: center; }
.list-label { width: 100px; flex-shrink: 0; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; cursor: pointer; }
.list-label .label { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }
.list-priority { width: 90px; flex-shrink: 0; text-align: center; font-size: 12.5px; }
.list-priority .priority-tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }
.list-priority .priority-tag.priority-pill { display: inline-flex; align-items: center; gap: 3px; }

/* 시작일/마감일 칸이 편집 모드로 바뀔 때 쓰는 네이티브 날짜 입력 — 칸 폭에 맞춰 꽉 채운다. */
.list-date-edit {
  width: 100%; font-size: 12px; text-align: center; border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 4px; background: var(--surface); color: var(--text);
}

/* 상태/우선순위 뱃지 — 라벨과 같은 톤(옅은 배경 + 진한 글자)의 버튼으로, 클릭하면
   inline-dropdown-menu가 뜬다. 상태는 컬럼마다 색이 달라 인라인 style로 배경/글자색을
   직접 지정하고(renderStatusPill), 우선순위는 기존 priority-low/normal/high/urgent 색을
   그대로 재사용한다. */
.status-pill, .priority-pill {
  display: inline-flex; align-items: center; gap: 3px; border: none; cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 7px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status-pill { background: var(--surface-2); color: var(--text-2); }
.status-pill:hover, .priority-pill:hover { filter: brightness(0.94); }
.status-pill .chevron, .priority-pill .chevron { font-size: 9px; opacity: .65; flex-shrink: 0; }

/* 공용 플로팅 패널(드롭다운/라벨 편집) — document.body에 붙어 셀 폭에 갇히지 않고, 다른
   행 위로도 자연스럽게 겹쳐 뜬다. */
.inline-dropdown-menu, .label-edit-panel, .label-swatch-popup {
  position: fixed; z-index: 200; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 5px;
}

/* DOT 메뉴 드롭다운(common.js renderDotDropdown) — 안읽음이 있는 LINE 목록. 공용 플로팅
   패널(.inline-dropdown-menu) 스타일을 기본으로 쓰고, 목록 전용 폭/스크롤/행 레이아웃만 얹는다. */
.dot-dropdown { min-width: 240px; max-width: 320px; max-height: 360px; overflow-y: auto; }
.dot-dropdown-empty { padding: 14px 12px; font-size: 12.5px; color: var(--text-3); text-align: center; }
.dot-dropdown-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-radius: 6px;
}
.dot-dropdown-item:hover { background: var(--surface-2); }
.dot-dropdown-name {
  flex: 1; min-width: 0; padding: 8px 6px; font-size: 13px; color: var(--text);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dot-dropdown-badges { display: flex; align-items: center; gap: 4px; flex-shrink: 0; padding-right: 4px; }
.dot-dropdown-badge {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px 6px; border-radius: 10px;
  font-size: 11px; font-weight: 600; text-decoration: none; color: var(--text-2);
  background: var(--surface-2);
}
.dot-dropdown-badge:hover { background: var(--accent-soft); color: var(--accent); }
/* 라벨 색상 트리거 — 카드 모달들에서 <select>를 대신하는 동그라미 하나. 누르면
   .label-swatch-popup(위에서 공용 플로팅 패널 스타일을 같이 쓴다) 안에 16색 스와치(4×4)가 뜬다. */
.label-color-trigger {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14);
  cursor: pointer; padding: 0; flex-shrink: 0; align-self: center;
}
.label-color-trigger:hover { outline: 2px solid var(--border); outline-offset: 1px; }
.inline-dropdown-menu {
  display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; min-width: 110px;
}
.inline-dropdown-item {
  display: flex; align-items: center; gap: 8px; border: none; background: none; cursor: pointer;
  padding: 6px 8px; border-radius: 6px; font-size: 12.5px; color: var(--text); text-align: left;
  font-family: inherit; white-space: nowrap;
}
.inline-dropdown-item:hover { background: var(--surface-2); }
.inline-dropdown-item.active { background: var(--accent-soft); font-weight: 700; }
.inline-dropdown-swatch {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.inline-dropdown-item .priority-tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }

.label-edit-panel { display: flex; flex-direction: column; gap: 8px; width: 168px; }
.list-label-edit {
  width: 100%; font-size: 12.5px; text-align: center; border: 1px solid var(--border);
  border-radius: 5px; padding: 5px 8px; background: var(--surface); color: var(--text);
}
.label-swatch-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 104px; }
.label-swatch {
  width: 18px; height: 18px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
  outline: 2px solid transparent; outline-offset: 2px;
}
.label-swatch.active { outline-color: var(--text-2); }
.label-swatch-blue { background: var(--tag-blue); }
.label-swatch-purple { background: var(--tag-purple); }
.label-swatch-orange { background: var(--tag-orange); }
.label-swatch-red { background: var(--tag-red); }
.label-swatch-green { background: var(--tag-green); }
.label-swatch-teal { background: var(--tag-teal); }
.label-swatch-pink { background: var(--tag-pink); }
.label-swatch-gray { background: var(--tag-gray); }
.label-swatch-yellow { background: var(--tag-yellow); }
.label-swatch-lime { background: var(--tag-lime); }
.label-swatch-sky { background: var(--tag-sky); }
.label-swatch-navy { background: var(--tag-navy); }
.label-swatch-brown { background: var(--tag-brown); }
.label-swatch-magenta { background: var(--tag-magenta); }
.label-swatch-olive { background: var(--tag-olive); }
.label-swatch-charcoal { background: var(--tag-charcoal); }

/* 제목/내용 두 칸이 똑같이 늘어나는(flex-grow) 칸이다 — flex-basis를 0으로 맞춰서 남는
   공간을 정확히 반씩 나눠 가지므로, 창 폭이 바뀌어도 항상 폭이 서로 같다. 그러면서도 둘을
   합치면 여전히 남는 공간을 전부 흡수해서, 좌우 여백 없이 표가 화면 끝까지 꽉 차게 한다.
   글자 자체는 overflow:hidden + ellipsis라 칸이 넓어져도 텍스트가 억지로 늘어나 보이진
   않는다. 안쪽 여백(padding-left)도 셀 왼쪽 테두리에 바짝 붙어 답답해 보이지 않도록
   조금 더 들여줬다. */
.list-title.is-new::before, .line-table tr.is-new td.lt-name a::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%;
  background: var(--accent, #2f6bff); vertical-align: middle; position: relative; top: -1px;
}
.list-title {
  flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; text-align: left; padding-left: 18px; cursor: pointer;
}
/* 내용(설명) 미리보기 — 카드 상세 모달의 설명 입력칸과 같은 텍스트를 한 줄로 잘라서 보여준다. */
.list-content {
  flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px; color: var(--text-3); text-align: left; padding-left: 18px; cursor: pointer;
}
.list-assignees { width: 80px; flex-shrink: 0; display: flex; align-items: center; }
.list-assignees .avatar-sm { border: 2px solid var(--surface); }
.list-assignees .avatar-more {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2);
  color: var(--text-2); font-size: 10px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; border: 2px solid var(--surface);
}
/* 헤더 컬럼(순번 제외)마다 붙는 정렬 버튼 — 안 눌린 상태는 방향 없는 화살표만 옅게 보여주고,
   활성화된 컬럼은 방향(▲/▼)이 있는 화살표를 강조색으로 보여준다. 헤더도 본문 컬럼과 같은
   가운데 정렬을 쓰되, 이미지(아바타) 컬럼인 담당자만 본문과 맞춰 왼쪽 정렬을 유지한다. */
.list-head span { display: flex; align-items: center; justify-content: center; gap: 4px; }
.list-head .list-assignees { justify-content: flex-start; }
.list-sort-btn {
  border: none; background: none; padding: 0; margin: 0; cursor: pointer;
  color: var(--text-3); font-size: 10px; line-height: 1;
}
.list-sort-btn:hover { color: var(--text-2); }
.list-sort-btn.active { color: var(--accent); font-weight: 700; }

/* 채팅 --------------------------------------------------------------------- */

.chat-wrap { flex-grow: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 28px 20px; position: relative; }

/* 파일 드래그 앤 드롭 첨부 — 채팅/DM 영역(.chat-wrap, .dm-thread) 전체가 드롭 대상이 되고,
   드래그 중일 때만 점선 테두리 + 안내 오버레이를 보여준다(기존 파일 선택 버튼과는 별개로 추가). */
.chat-drop-overlay {
  position: absolute; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 2px dashed var(--accent); border-radius: 10px;
  color: var(--accent); font-size: 14px; font-weight: 700; pointer-events: none;
}
.chat-wrap.drag-over .chat-drop-overlay, .dm-thread.drag-over .chat-drop-overlay { display: flex; }
/* gap을 호버 반응 박스(.chat-msg-hover-actions) 높이보다 넉넉하게 줘서, 마우스를 올렸을 때
   그 박스가 바로 위/아래 메시지의 이름·내용과 겹치지 않게 한다(아래 top 값과 함께 맞춰야 한다).
   맨 위쪽 padding도 호버 박스가 완전히 들어갈 만큼(38px, top:-34px와 맞춤) 줘야 한다 — 그렇지
   않으면 목록의 첫 번째 메시지는 위로 올라갈 여백이 모자라서, 박스가 스크롤 영역 바깥으로
   잘려 위쪽 검색창 등에 가려진 것처럼 보인다(.chat-thread의 첫 번째 답글과 같은 문제). */
.chat-messages { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 36px; padding: 38px 0 10px; }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; position: relative; }
.chat-msg .body { display: flex; flex-direction: column; min-width: 0; flex-grow: 1; }
.chat-msg .meta-line { font-size: 12.5px; margin-bottom: 3px; }
.chat-msg .meta-line b { margin-right: 8px; }
.chat-msg .meta-line .time { color: var(--text-3); font-weight: 400; }
.chat-msg .content { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

/* 본인이 쓴 글은 오른쪽 정렬 — 아바타를 오른쪽으로 옮기고, 이름/시간/본문/반응/답글토글을
   본문(.body) 안에서 오른쪽으로 붙인다. .chat-thread(답글 목록)는 그대로 두어서, 그 안의
   답글들은 각자 자신이 mine인지 아닌지에 따라 또 따로 정렬된다.
   반드시 ">"(바로 아래 자식) 선택자여야 한다 — 답글은 "원글(.chat-msg) > .body > .chat-thread >
   답글(.chat-msg)" 구조로 중첩되는데, 자손 선택자(공백)를 쓰면 "내가 쓴 원글 안에 남이 단 답글"
   또는 그 반대의 경우 원글의 mine 여부가 안쪽 답글의 아바타/정렬까지 뚫고 들어가 버려서,
   답글 작성자가 누구든 상관없이 원글 작성자 기준으로 정렬되는 버그가 있었다. */
.chat-msg.mine > .avatar { order: 2; }
.chat-msg.mine > .body { order: 1; }
.chat-msg.mine > .body > .meta-line,
.chat-msg.mine > .body > .content,
.chat-msg.mine > .body > .chat-reactions,
.chat-msg.mine > .body > .chat-reply-toggle { align-self: flex-end; }

/* 이모지 반응 — 메시지에 마우스를 올리면 뜨는 빠른 반응 바(고정 이모지 6개 + 답글 버튼).
   박스 높이(테두리 포함 약 31px)가 top의 음수값보다 더 올라가면 현재 메시지의 이름 줄을
   덮어버리므로(예전에 top:-18px일 때 겹쳐서 이름이 가려지던 문제), 박스가 완전히 메시지
   위 여백(.chat-messages/.chat-thread의 gap:36px) 안에 들어가도록 -34px로 띄운다. */
.chat-msg-hover-actions {
  display: none; position: absolute; top: -34px; right: 8px; z-index: 5;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); padding: 3px;
  align-items: center; gap: 1px;
}
/* 남이 쓴 글(왼쪽 정렬)은 박스도 왼쪽 위에, 본인 글(오른쪽 정렬)은 그대로 오른쪽 위에 뜨게 한다.
   반드시 ">"(바로 아래 자식) 선택자여야 한다 — 답글은 "원글(.chat-msg) > .body > .chat-thread > 답글(.chat-msg)"
   구조로 중첩되는데, 자손 선택자(공백)를 쓰면 "남이 쓴 원글에 내가 단 답글"처럼 원글은 mine이
   아니고 답글만 mine인 경우, 원글 쪽의 :not(.mine) 규칙이 안쪽 답글의 반응박스까지 뚫고 들어가
   덮어써서 내 답글 박스가 왼쪽으로 튀어나가는 버그가 있었다. */
.chat-msg:not(.mine) > .chat-msg-hover-actions { left: 8px; right: auto; }
.chat-msg:hover > .chat-msg-hover-actions { display: flex; }
.chat-msg-hover-actions button {
  border: none; background: none; font-size: 15px; padding: 4px 6px; border-radius: 6px; line-height: 1;
}
.chat-msg-hover-actions button:hover { background: var(--surface-2); }
.chat-msg-hover-actions .reply-action {
  border-left: 1px solid var(--border); margin-left: 3px; padding-left: 9px;
  color: var(--text-2); font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.chat-msg-hover-actions .reply-action:hover { color: var(--text); }

.chat-reactions { display: none; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chat-reaction-pill {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border);
  background: var(--surface-2); border-radius: 12px; padding: 2px 8px; font-size: 12px; cursor: pointer;
}
.chat-reaction-pill:hover { background: var(--accent-soft); }
.chat-reaction-pill.reacted { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* 스레드형 답장 — 원본 메시지 아래에 "답글 N개" 토글로 펼쳐서 보여준다 */
.chat-reply-toggle {
  display: none; margin-top: 6px; border: none; background: none; color: var(--accent);
  font-size: 12px; font-weight: 600; padding: 0; cursor: pointer;
}
.chat-thread {
  display: none; flex-direction: column; gap: 36px;
  /* 위쪽 패딩도 호버 박스가 완전히 들어갈 만큼(38px) 줘서, 스레드의 첫 번째 답글에 마우스를
     올렸을 때 그 박스가 "답글 N개" 토글 위로 삐져나가지 않게 한다. */
  margin: 10px 0 0 6px; padding: 38px 0 2px 16px; border-left: 2px solid var(--border);
}
.chat-thread .chat-msg .content { font-size: 13px; }
.chat-thread-input-row { display: flex; gap: 8px; margin-top: 2px; }
.chat-thread-input-row input { flex-grow: 1; font-size: 12.5px; }
/* 답글 버튼을 눌러 열었다가 안 쓰고 닫을 때 쓰는 버튼 — 답글이 하나도 없으면 "답글 N개" 토글이
   안 보여서 접을 방법이 없었던 걸 메꾼다. */
.chat-thread-close-btn {
  flex-shrink: 0; border: 1px solid var(--border); background: none; color: var(--text-3);
  width: 30px; border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1;
}
.chat-thread-close-btn:hover { background: var(--surface-2); color: var(--text); }
.chat-unread-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--bad); font-size: 12px; font-weight: 600;
  margin: 2px 0;
}
.chat-unread-divider::before, .chat-unread-divider::after {
  content: ''; flex-grow: 1; height: 1px; background: var(--bad); opacity: 0.4;
}
.chat-input-row { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); flex-shrink: 0; align-items: flex-end; }
/* 채팅/DM 입력창 — textarea라서 Shift+Enter로 실제 줄바꿈이 되고, 입력한 줄 수만큼
   자동으로 커진다(js의 autoGrowTextarea가 높이를 계산). 너무 길어지면 max-height부터는
   스크롤로 처리하고, 브라우저 기본 리사이즈 손잡이는 숨긴다. */
.chat-input-row textarea {
  flex-grow: 1; resize: none; max-height: 140px; overflow-y: auto;
  line-height: 1.4; font-family: inherit;
}

/* 전역 검색 (돋보기 아이콘 + 드롭다운) ---------------------------------------- */

.gsearch-wrap { position: relative; display: flex; align-items: center; }
.gsearch-btn {
  position: relative; border: none; background: none; color: var(--text-2);
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.gsearch-btn:hover { background: var(--surface-2); color: var(--text); }
.gsearch-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-height: min(600px, calc(100vh - 80px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 50; display: flex; flex-direction: column;
  padding: 10px;
}
.gsearch-panel input {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px;
  font-size: 13px; font-family: inherit; background: var(--surface-2);
}
.gsearch-panel input:focus { border-color: var(--accent); background: var(--surface); }
.gsearch-results { overflow-y: auto; max-height: min(540px, calc(100vh - 140px)); margin-top: 8px; }
.gsearch-group + .gsearch-group { margin-top: 8px; }
.gsearch-group-label {
  padding: 4px 6px; font-size: 11px; font-weight: 700; color: var(--text-3);
  letter-spacing: .02em;
}
.gsearch-item {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-radius: 8px;
  cursor: pointer; text-decoration: none;
}
.gsearch-item:hover { background: var(--surface-2); }
.gsearch-item-title { font-size: 12.5px; color: var(--text); line-height: 1.4; }
.gsearch-item-sub { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch-empty { padding: 20px 6px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* 알림 (벨 아이콘 + 드롭다운) ------------------------------------------------- */

.notif-wrap { position: relative; display: flex; align-items: center; }
.notif-bell {
  position: relative; border: none; background: none; color: var(--text-2);
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.notif-bell:hover { background: var(--surface-2); color: var(--text); }
.notif-badge {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700;
  align-items: center; justify-content: center; line-height: 1;
}
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-height: 460px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 50; display: flex; flex-direction: column;
}
.notif-dropdown-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700;
}
.notif-dropdown-header button {
  border: none; background: none; color: var(--accent); font-size: 12px; font-weight: 600; padding: 0;
}
/* "전체알림" / "멘션" 카테고리 탭 — 나를 멘션한 알림만 따로 모아 보고 싶다는 요청으로 추가.
   드롭다운 맨 위에서 어느 알림 종류를 볼지 고르고, 그 아래 .notif-tabs(전체/안읽음)는 그
   안에서의 읽음 여부만 다시 거른다. */
.notif-category-tabs { display: flex; border-bottom: 1px solid var(--border); }
.notif-category-tab {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 5px;
  border: none; background: none; color: var(--text-3); font-size: 12.5px; font-weight: 700;
  padding: 12px 10px; cursor: pointer;
}
.notif-category-tab:hover { color: var(--text); }
.notif-category-tab.active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.notif-category-badge {
  display: none; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700;
  align-items: center; justify-content: center; line-height: 1;
}
.notif-tabs button { white-space: nowrap; flex-shrink: 0; }
.notif-tabs .notif-tab { padding: 6px 7px; }
.notif-filter-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 12px; cursor: pointer; margin-left: 2px;
}
.notif-filter-btn:hover { color: var(--text); background: var(--surface-2); }
.notif-filter-btn.on { border-color: var(--accent); color: var(--accent); }
.notif-filter-count:not(:empty) {
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.notif-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.notif-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 11.5px; cursor: pointer;
}
.notif-chip:hover { color: var(--text); }
.notif-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.notif-chip-count { font-size: 10px; font-weight: 700; }
.notif-chip-count:empty { display: none; }
.notif-chip:not(.active) .notif-chip-count { color: var(--bad); }
.notif-chip-reset { border: none; background: none; color: var(--text-3); font-size: 11.5px; cursor: pointer; padding: 3px 4px; }
.notif-chip-reset:hover { color: var(--accent); }
.notif-active { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.notif-active-tag {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px 2px 9px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 11.5px; font-weight: 600;
}
.notif-active-tag button { border: none; background: none; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 0 3px; }
.notif-tabs { display: flex; align-items: center; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid var(--border); }
.notif-tab {
  border: none; background: none; color: var(--text-3); font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 6px 6px 0 0; cursor: pointer;
}
.notif-tab:hover { color: var(--text); }
.notif-tab.active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.notif-tabs #notif-mark-all,
.notif-tabs #notif-settings-btn {
  border: none; background: none; color: var(--accent); font-size: 12px; font-weight: 600;
  padding: 6px 2px; cursor: pointer;
}
.notif-list { overflow-y: auto; max-height: 320px; }
.notif-group-label {
  padding: 8px 14px 4px; font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: .02em;
}
.notif-item { padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }

/* 공지사항 벨 (검색 아이콘 오른쪽, 알림 벨 왼쪽) ------------------------------- */

.notice-wrap { position: relative; display: flex; align-items: center; }
.notice-bell {
  position: relative; border: none; background: none; color: var(--text-2);
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.notice-bell:hover { background: var(--surface-2); color: var(--text); }
.notice-dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--bad); border: 2px solid var(--surface);
}
.notice-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-height: 420px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 50; display: flex; flex-direction: column;
}
.notice-dropdown-header {
  padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700;
}
.notice-list { overflow-y: auto; max-height: 380px; }
.notice-item { padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--surface-2); }
.notice-item-title { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.4; }
.notice-item-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.notice-empty { padding: 24px 14px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* 공지사항 팝업 (벨 드롭다운 클릭 시 + 접속 시 자동) — 상단바 드롭다운들보다 위에 떠야 하므로
   .modal-backdrop보다 높은 z-index를 준다. 왼쪽엔 공지 내역 목록, 오른쪽엔 선택한 공지 상세. */
.notice-popup-backdrop { z-index: 200; }
.notice-popup-modal {
  /* 내용 길이와 상관없이 항상 같은 크기로 고정한다 — 짧은 공지든 긴 공지든 팝업 자체 크기는
     그대로 두고, 넘치는 내용은 .notice-popup-body 안에서만(overflow-y:auto) 스크롤되게 한다.
     내용에 따라 늘었다 줄었다 하지 않도록 height를 auto/min-height 대신 고정값으로 둔다. */
  width: 820px; max-width: 94vw; height: 480px; max-height: 88vh;
  position: relative; padding: 0;
}
.notice-popup-list {
  width: 230px; flex-shrink: 0; background: var(--surface-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.notice-popup-list-header {
  height: 48px; box-sizing: border-box; padding: 0 16px; font-size: 12.5px; font-weight: 700;
  color: var(--text-2); border-bottom: 1px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.notice-popup-list-badge {
  display: none; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700;
  align-items: center; justify-content: center; line-height: 1;
}
.notice-popup-list-items { overflow-y: auto; flex: 1; }
.notice-popup-list-item { padding: 11px 16px; cursor: pointer; border-bottom: 1px solid var(--border); }
.notice-popup-list-item:last-child { border-bottom: none; }
.notice-popup-list-item:hover { background: var(--surface); }
.notice-popup-list-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.notice-popup-list-item-title { display: flex; align-items: center; gap: 6px; line-height: 1.4; }
.notice-popup-list-item-title-text {
  font-size: 12.5px; font-weight: 600; color: var(--text); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notice-popup-list-item.unread .notice-popup-list-item-title-text { font-weight: 700; }
.notice-popup-list-item-dot {
  flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--bad);
}
.notice-popup-list-item-time { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.notice-popup-list-footer { padding: 8px 16px; border-top: 1px solid var(--border); flex-shrink: 0; }
.notice-popup-list-footer .text-link-btn { padding: 4px 0; }
.notice-popup-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.notice-popup-header {
  height: 48px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; background: var(--accent); flex-shrink: 0;
}
.notice-popup-badge {
  display: flex; align-items: center; gap: 6px; color: #fff; font-size: 12.5px;
  font-weight: 700; letter-spacing: .02em;
}
.notice-popup-header .modal-close { position: static; color: rgba(255,255,255,.85); font-size: 18px; }
.notice-popup-header .modal-close:hover { color: #fff; }
.notice-popup-body { padding: 22px 26px 10px; overflow-y: auto; flex: 1; }
.notice-popup-title { font-size: 17px; font-weight: 700; color: var(--text); }
.notice-popup-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.notice-popup-content {
  font-size: 13.5px; color: var(--text-2); line-height: 1.7; margin-top: 18px;
  white-space: pre-wrap; word-break: break-word;
}
.notice-popup-content a { color: var(--accent); text-decoration: underline; }
.notice-popup-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.notice-popup-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  padding: 14px 26px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.text-link-btn {
  border: none; background: none; color: var(--text-3); font-size: 12px; font-weight: 600;
  text-decoration: underline; cursor: pointer; padding: 4px 2px;
}
.text-link-btn:hover { color: var(--text-2); }
.text-link-btn:nth-of-type(2) { margin-right: auto; } /* 확인 버튼을 오른쪽 끝으로 밀어낸다 */

/* 공지사항 관리 모달의 필드 아래 작은 안내 문구 */
.field-hint { font-size: 11.5px; color: var(--text-3); margin: 4px 0 0; }

/* 상단바 내 이름(#me-name) 클릭 — "My Account"로 가는 작은 드롭다운 (notif-wrap과 같은 패턴) */
.account-menu-wrap {
  position: relative; display: flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 6px 8px; border-radius: 8px;
}
.account-menu-wrap:hover { background: var(--surface-2); }
.account-menu-caret { display: flex; align-items: center; color: var(--text-3); }
.account-menu-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 170px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 50; padding: 6px;
}
.account-menu-item {
  display: block; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text);
  text-decoration: none;
}
.account-menu-item:hover { background: var(--surface-2); }
.account-menu-meta { padding: 6px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--text-3); line-height: 1.5; cursor: default; }
.account-menu-meta b { font-weight: 600; color: var(--text-2); font-size: 12px; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: #DFE7FC; }
.notif-msg { font-size: 12.5px; line-height: 1.5; color: var(--text); }
.notif-item-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; }
.notif-time { font-size: 11px; color: var(--text-3); }
.notif-item-mark {
  border: none; background: none; color: var(--accent); font-size: 11px; font-weight: 600;
  padding: 0; opacity: 0; transition: opacity .1s ease;
}
.notif-item.unread:hover .notif-item-mark { opacity: 1; }
.notif-empty { padding: 24px 14px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* @멘션 자동완성 + 렌더링 ---------------------------------------------------- */

.mention-dropdown {
  position: absolute; bottom: calc(100% + 4px); left: 0; min-width: 180px; max-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12); z-index: 60; overflow: hidden;
}
.mention-item { padding: 8px 12px; font-size: 13px; cursor: pointer; }
.mention-item:hover { background: var(--accent-soft); }
/* "#"만 치고 아직 제목을 안 썼을 때 "내 할당 DOT"을 미리 보여주는 목록 — 할당된 DOT이 많아도
   드롭다운이 한없이 커지지 않도록 3개 정도 높이로 고정하고 그 안에서만 스크롤한다. */
.mention-dropdown-scroll { max-height: 118px; overflow-y: auto; }
.mention-tag { color: var(--accent); font-weight: 600; }
/* "#제목" DOT 멘션 — 사람 멘션(@, --accent 파랑)과 색을 다르게 줘서 한눈에 구분되고,
   실제로 클릭해서 열 수 있으니 커서/밑줄로 링크라는 걸 알려준다. */
.card-mention-tag { color: var(--tag-purple); cursor: pointer; }
.card-mention-tag:hover { text-decoration: underline; }

/* 다른 LINE에 존재해서(=삭제/오타가 아니라 권한만 없는) 보라색으로는 보이지만, 클릭하면
   바로 열리는 대신 "접근 권한 요청" 모달이 뜨는 멘션 — card-mention-tag와 색은 같게 하되
   점선 밑줄로 "클릭해도 바로 이동하진 않는다"는 걸 은근히 구분해준다. */
.card-mention-restricted { color: var(--tag-purple); cursor: pointer; text-decoration: underline dashed; text-underline-offset: 2px; }
.card-mention-restricted:hover { text-decoration-style: solid; }

/* 첨부파일 (이슈 카드) ------------------------------------------------------- */

.attach-item {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 8px;
}
.attach-item .name { flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-item .size { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.attach-item a { font-size: 11.5px; color: var(--accent); flex-shrink: 0; }
.attach-item button {
  border: none; background: none; color: var(--text-3); cursor: pointer; flex-shrink: 0; font-size: 13px;
}
.attach-item button:hover { color: var(--bad); }

/* 채팅 첨부파일 칩 ------------------------------------------------------------ */

.chat-attachment {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; color: var(--accent);
  background: var(--surface-2); width: fit-content;
}
.chat-attachment:hover { background: var(--accent-soft); }

/* 채팅 검색 ------------------------------------------------------------------ */

.chat-search-row { display: flex; gap: 8px; padding: 12px 28px 0; flex-shrink: 0; }
.chat-search-row input { flex-grow: 1; }
.chat-search-results {
  margin: 6px 28px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font-size: 12px; color: var(--text-2); flex-shrink: 0;
  max-height: 160px; overflow-y: auto;
}
.chat-search-results .summary { font-weight: 600; margin-bottom: 4px; }
.chat-search-result-item {
  display: block; width: 100%; text-align: left; padding: 5px 0; font-size: 12px;
  color: var(--text-2); border: none; background: none; cursor: pointer;
  border-top: 1px solid var(--border);
}
.chat-search-result-item:first-of-type { border-top: none; }
.chat-search-result-item:hover { color: var(--accent); }
.chat-msg.highlight { background: var(--accent-soft); border-radius: 8px; }
/* DM은 채팅(.chat-wrap)보다 옆 여백이 좁아서(.dm-thread-header/.chat-messages가 20px), 검색
   줄/결과창도 28px가 아니라 20px로 맞춘다. */
.dm-thread .chat-search-row { padding: 12px 20px 0; }
.dm-thread .chat-search-results { margin: 6px 20px 0; }

/* 채팅/DM "선택 삭제" ---------------------------------------------------------- */

.chat-select-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 8px 28px 0; padding: 8px 14px; border-radius: 8px;
  background: var(--accent-soft); font-size: 12.5px; font-weight: 600; flex-shrink: 0;
}
.dm-thread .chat-select-bar { margin: 0 20px; }
.msg-select {
  display: none; align-items: center; padding-top: 3px; flex-shrink: 0; width: 18px;
}
.chat-messages.selection-mode .msg-select.selectable { display: flex; }
.chat-msg.selected { background: var(--accent-soft); border-radius: 8px; }

/* 다이렉트 메시지(DM) --------------------------------------------------------- */

.dm-shell { flex-grow: 1; display: flex; min-height: 0; }
.dm-sidebar {
  width: 280px; flex-shrink: 0; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
}
.dm-sidebar-search { padding: 14px 16px; border-bottom: 1px solid var(--border); position: relative; flex-shrink: 0; }
.dm-sidebar-search input { width: 100%; }
.dm-directory-results {
  position: absolute; left: 16px; right: 16px; top: 54px; z-index: 5;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  max-height: 220px; overflow-y: auto; box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.dm-directory-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px; font-size: 13px;
  border: none; background: none; cursor: pointer; border-bottom: 1px solid var(--border);
  /* 이름 옆에 "(부서 · 직급)"이 붙어 길어질 수 있는데, 사이드바 폭이 좁아서 줄바꿈되면
     어색하므로 한 줄로 말줄임 처리한다(assignee-checklist와 같은 이유). */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-directory-item:last-child { border-bottom: none; }
.dm-directory-item:hover { background: var(--surface-2); }
.dm-directory-empty { padding: 10px 12px; font-size: 12px; color: var(--text-3); }

.dm-conversation-list { flex-grow: 1; overflow-y: auto; padding: 6px 0; }
.dm-empty-hint { padding: 16px; font-size: 12.5px; color: var(--text-3); }
.dm-conversation-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer;
}
.dm-conversation-item:hover { background: var(--surface-2); }
.dm-conversation-item.active { background: var(--accent-soft); }
.dm-conversation-info { flex-grow: 1; min-width: 0; }
.dm-conversation-name { font-size: 13px; font-weight: 600; }
.dm-conversation-preview {
  font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 그룹 채팅방(사이드바 섹션 구분 + 관리 모달의 멤버 목록) --------------------- */
.dm-sidebar-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 6px; font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .02em; flex-shrink: 0;
}
.dm-group-member-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 13px;
}
.dm-group-member-row .name { flex-grow: 1; }
.dm-group-member-row .remove-member-btn {
  font-size: 11.5px; color: var(--bad); border: none; background: none; cursor: pointer; padding: 2px 6px;
}
.dm-group-member-row .remove-member-btn:hover { text-decoration: underline; }
.dm-group-member-row .self-tag { font-size: 11.5px; color: var(--text-3); }

.dm-thread { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.dm-thread-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
/* 위쪽만 38px — DM 상단 검색창 바로 아래부터 메시지가 시작되므로, 첫 메시지의 호버 박스가
   들어갈 자리를 따로 챙겨줘야 한다(위 .chat-messages 기본 규칙과 같은 이유). */
.dm-thread .chat-messages { padding: 38px 20px 16px; }
.dm-empty-state {
  flex-grow: 1; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 13px;
}

/* 대시보드 ---------------------------------------------------------------------- */

.dash-kpi-row { display: flex; gap: 16px; margin-bottom: 20px; }
.dash-kpi {
  flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px;
}
.dash-kpi-value { font-size: 26px; font-weight: 800; }
.dash-kpi-label { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.dash-kpi.overdue .dash-kpi-value { color: var(--bad); }

.dash-two-col { display: flex; gap: 20px; align-items: flex-start; }
.dash-two-col .panel { flex: 1; min-width: 0; }

.dash-project-row {
  display: block; padding: 10px 0; border-bottom: 1px solid var(--border); color: inherit;
}
.dash-project-row:last-child { border-bottom: none; }
.dash-project-top {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px;
  font-size: 13px; gap: 10px;
}
.dash-project-name { font-weight: 700; }
.dash-project-stats { color: var(--text-2); font-size: 12px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.dash-overdue-badge {
  background: var(--tag-red-bg, #FBEAEA); color: var(--bad); font-weight: 700;
  border-radius: 8px; padding: 1px 7px; font-size: 11px;
}
.dash-progress-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.dash-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; }

.dash-workload-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.dash-workload-name { font-size: 12.5px; width: 80px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-workload-bar { flex-grow: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.dash-workload-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.dash-workload-count { font-size: 12.5px; font-weight: 700; width: 20px; text-align: right; flex-shrink: 0; }

.dash-duesoon-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border);
  color: inherit; font-size: 12.5px;
}
.dash-duesoon-row:last-child { border-bottom: none; }
.dash-duesoon-title { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-duesoon-project { color: var(--text-3); flex-shrink: 0; }
.dash-duesoon-date { flex-shrink: 0; font-weight: 600; }
.dash-duesoon-date.overdue { color: var(--bad); }

/* 사람 선택 검색 상자(searchable select) — 후보가 수십~수백 명일 때 긴 <select> 목록 대신 쓴다.
   목록은 모달의 overflow:hidden에 잘리지 않도록 position:fixed로 띄운다(common.js). */
.sp-wrap { position: relative; }
.sp-wrap input.sp-input { width: 100%; padding-right: 30px; }
.sp-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--text-3); font-size: 15px; line-height: 1;
  cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.sp-clear:hover { background: var(--surface-2); color: var(--text); }
.sp-list {
  position: fixed; z-index: 200; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.14); max-height: 240px; overflow-y: auto; padding: 4px 0;
}
.sp-item { padding: 8px 12px; font-size: 13px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.sp-item .sp-sub { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.sp-item.sp-active { background: var(--accent-soft); }
.sp-item.sp-selected { font-weight: 700; }
.sp-item.sp-none { color: var(--text-2); border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.sp-empty { padding: 10px 12px; font-size: 12.5px; color: var(--text-3); }

.sp-disabled { padding: 8px 12px; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; color: var(--text-3); cursor: not-allowed; background: var(--surface-2); }
.sp-disabled .sp-sub { color: var(--text-3); font-size: 12px; white-space: nowrap; }


/* ---- 보드 도구 줄(필터/휴지통/엑셀/반복 DOT) ---- */
.board-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 28px 10px; flex-wrap: wrap; }
.board-tools .bt-left, .board-tools .bt-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-tools .bt-btn { border: 1px solid var(--border); padding: 5px 12px; font-size: 12.5px; text-decoration: none; color: var(--text-2); }
.board-tools .bt-btn.on { background: var(--surface-2); color: var(--text); border-color: var(--text-3); font-weight: 700; }
.board-tools .bt-count { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #2F5DE8; color: #fff; font-size: 10.5px; line-height: 16px; text-align: center; }
.board-tools .bt-hint { font-size: 11.5px; color: #B45309; }
.board-filter-panel { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 28px 12px; margin: 0 28px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.board-filter-panel .bf-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-filter-panel .bf-title { font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.board-filter-panel .bf-chips { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.bf-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 14px; padding: 3px 10px; font-size: 12px; cursor: pointer; font-family: inherit; }
.bf-chip:hover { border-color: var(--text-3); }
.bf-chip.on { background: #2F5DE8; border-color: #2F5DE8; color: #fff; }
.bf-empty { font-size: 12px; color: var(--text-3); }
.column-empty-filter { font-size: 12px; color: var(--text-3); padding: 8px 4px; }

/* 휴지통/반복 DOT 목록 줄 */
.trash-row, .rc-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; }
.trash-row .tr-main, .rc-row .rc-main { flex: 1; min-width: 0; }
.trash-row .tr-title, .rc-row .rc-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-row .tr-sub, .rc-row .rc-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.rc-row.paused { opacity: 0.6; }

/* 채팅/DM 호버 바의 "수정" 버튼 — "답글" 버튼과 같은 모양 */
.chat-msg-hover-actions .edit-action {
  border-left: 1px solid var(--border); margin-left: 3px; padding-left: 9px;
  color: var(--text-2); font-size: 11.5px; font-weight: 600;
}
.chat-msg-hover-actions .edit-action:hover { color: var(--text); }


/* ---- 파일 탭 ---- */
.files-toolbar { display: flex; align-items: center; gap: 10px; padding: 0 28px 12px; flex-wrap: wrap; }
.files-toolbar input[type=text] { width: 260px; }
.files-toolbar select { font-size: 12.5px; padding: 6px 10px; }
.files-summary { font-size: 12px; color: var(--text-3); margin-left: auto; }
.files-wrap { padding: 0 28px 24px; overflow-y: auto; flex: 1; }
.files-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.files-table th { text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.files-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.files-table .f-thumb { width: 44px; }
.files-table .f-thumb img, .files-table .f-icon { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--text-3); }
.files-table .f-name { font-weight: 600; word-break: break-all; }
.files-table .f-name a { color: inherit; text-decoration: none; cursor: pointer; }
.files-table .f-name a:hover { color: var(--accent); text-decoration: underline; }
.files-table .f-sub { color: var(--text-3); font-size: 12px; }
.files-table .f-loc a { color: var(--accent); text-decoration: none; }
.files-table .f-actions a { color: var(--accent); font-size: 12px; text-decoration: none; margin-left: 8px; }
.files-empty { padding: 40px 4px; color: var(--text-3); font-size: 13px; text-align: center; }
/* WhiteBoard 카드 그리드 / Wiki 메인 영역·좌측 트리의 "아직 없습니다" 안내 — 지금까지 전용
   스타일이 없어서 큰 빈 영역 왼쪽 위에 텍스트가 어색하게 붙어 있었다. 다른 탭(리스트/타임라인/
   채팅/LINE 목록)의 빈 상태와 같은 방식으로 가운데 정렬한다. */
.wb-empty { padding: 40px 14px; color: var(--text-3); font-size: 13px; text-align: center; line-height: 1.6; }
.docs-empty { padding: 60px 20px; text-align: center; }
.docs-empty h2 { font-size: 16px; margin: 0 0 8px; color: var(--text-2); }
.docs-empty p { color: var(--text-3); font-size: 13px; margin: 8px 0; }
.docs-tree-empty { padding: 20px 14px; color: var(--text-3); font-size: 12.5px; text-align: center; line-height: 1.6; }

.files-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.82); display: flex; align-items: center; justify-content: center; }
.files-lightbox img { max-width: 88vw; max-height: 82vh; object-fit: contain; background: #fff; border-radius: 4px; }
.files-lightbox .fl-close { position: absolute; top: 16px; right: 20px; border: none; background: none; color: #fff; font-size: 24px; cursor: pointer; }
.files-lightbox .fl-nav { position: absolute; top: 50%; transform: translateY(-50%); border: none; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 34px; width: 46px; height: 64px; cursor: pointer; border-radius: 8px; }
.files-lightbox .fl-prev { left: 18px; }
.files-lightbox .fl-next { right: 18px; }
.files-lightbox .fl-caption { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; }
.files-lightbox .fl-caption a { color: #9DB8FF; margin-left: 10px; }

/* 처음 접속한 사용자에게 "데스크톱 알림을 켜시겠어요?" 안내 카드 (common.js maybeAskDesktopNotif) */
.desktop-notif-ask {
  position: fixed; right: 24px; bottom: 24px; z-index: 900; width: 320px; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
}
.desktop-notif-ask .dna-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.desktop-notif-ask .dna-desc { font-size: 12.5px; line-height: 1.55; color: var(--text-2); margin-bottom: 12px; }
.desktop-notif-ask .dna-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 600px) { .desktop-notif-ask { left: 16px; right: 16px; width: auto; bottom: 16px; } }
/* 모바일: 아래쪽에 두면 채팅·DM 입력창을 덮어 키보드가 안 뜨는 것처럼 보이므로 위쪽(상단바 아래)에 띄운다 */
@media (max-width: 768px) { .desktop-notif-ask { left: 12px; right: 12px; width: auto; bottom: auto; top: calc(56px + env(safe-area-inset-top)); z-index: 950; } }

/* 채팅: 검색창은 숨겨 두고 도구 줄의 [🔍 메시지 검색]으로 펼친다 */
/* 다른 탭(보드 등)의 툴바처럼 board-header 바로 아래 붙도록 — 기본 .chat-search-row의 위쪽 패딩(12px)을 없앤다 */
.chat-tools-row { justify-content: flex-end; padding-top: 0; }
.chat-search-box { padding-top: 8px; }

/* 멤버 선택 목록(renderMemberPicker) — LINE 멤버 관리 · DM 그룹 채팅방 공용 ------------------ */
.mp-search { width: 100%; margin-bottom: 8px; box-sizing: border-box; }
.mp-toolbar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; min-height: 22px; }
.mp-all-label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.mp-count { color: var(--accent); font-weight: 600; margin-left: auto; }
.mp-clear { background: none; border: 0; color: var(--text-3); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }
.mp-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.mp-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.mp-row:hover { background: var(--surface-2); }
.mp-row input { margin: 0; flex-shrink: 0; }
.mp-name { flex: 1 1 auto; min-width: 0; }
.mp-name-main { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-name-sub { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-row-add { border: 1px solid var(--border); flex-shrink: 0; }
.mp-empty { font-size: 12.5px; color: var(--text-3); padding: 6px 4px; }
/* 열 개수를 지정한 피커(공유 설정 등) — 카드형 그리드 */
.mp-list.mp-cols { display: grid; grid-template-columns: repeat(var(--mp-cols, 3), minmax(0, 1fr)); gap: 6px; align-content: start; }
.mp-cols .mp-row { border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px; min-width: 0; background: #fff; }
.mp-cols .mp-row:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mp-cols .mp-empty { grid-column: 1 / -1; }
.mp-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mp-actions .btn { flex: 1 1 auto; }

/* DOT 댓글 첨부파일 */
.cm-files { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.cm-file { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2, #F7F8FB); font-size: 12px; max-width: 460px; }
.cm-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-file-size { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.cm-file a { font-size: 11.5px; color: var(--accent); flex-shrink: 0; }
.cm-file button, .cm-pending-chip button { border: none; background: none; color: var(--text-3); cursor: pointer; padding: 0 2px; font-size: 12px; }
.cm-file button:hover, .cm-pending-chip button:hover { color: var(--bad); }
.cm-pending { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cm-pending-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2, #F7F8FB); font-size: 12px; max-width: 100%; }
.cm-pending-chip .cm-file-name { max-width: 220px; }

/* DOT 템플릿 · 라벨 프리셋 (js/presets.js) ------------------------------------ */
.pr-modal { width: 560px; flex-direction: column; }
.pr-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 8px; }
.pr-head h3 { margin: 0; font-size: 16px; }
.pr-x { border: none; background: none; color: var(--text-3); font-size: 16px; cursor: pointer; }
.pr-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--border); }
.pr-tab { border: none; background: none; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pr-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.pr-body { padding: 16px 22px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.pr-hint { font-size: 12px; color: var(--text-3); margin: 0 0 12px; line-height: 1.5; }
.pr-empty { padding: 22px 0; text-align: center; font-size: 13px; color: var(--text-3); }
.pr-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.pr-row-main { flex: 1; min-width: 0; }
.pr-row-name { font-size: 13.5px; font-weight: 700; }
.pr-row-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pr-row.pr-new { border-bottom: none; padding-top: 14px; }
.pr-sm { padding: 4px 10px; font-size: 12px; border: 1px solid var(--border); }
.pr-del { color: var(--bad); }
.pr-count { margin-left: 10px; font-size: 12px; color: var(--text-3); }
.pr-assignees { max-height: 180px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 6px 0 4px; }
.pr-chips-title { font-size: 11px; color: var(--text-3); margin-right: 2px; }
.pr-chip { border: none; cursor: pointer; font-family: inherit; font-size: 11.5px; font-weight: 600; border-radius: 5px; padding: 2px 8px; }
.pr-chip:hover { filter: brightness(.95); outline: 2px solid var(--border); }
/* 리스트 탭 라벨 편집 패널 안의 칩 줄 — 라벨이 많아도 패널이 화면 밖으로 커지지 않게 */
.list-label-quick { max-height: 112px; overflow-y: auto; overflow-x: hidden; margin: 0; }
.list-label-quick .pr-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pr-ck-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 12.5px; color: var(--text-2); }
.pr-ck-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* LINE 전환 드롭다운 (경로의 LINE 이름을 눌러 다른 LINE으로 이동) */
.crumbs .crumb-line { cursor: pointer; border-radius: 6px; padding: 3px 8px; margin: 0 -4px; color: var(--text); font-weight: 600; }
.crumbs .crumb-line:hover, .crumbs .crumb-line[aria-expanded="true"] { background: var(--surface-2); }
.crumbs .crumb-line:focus-visible { outline: 2px solid var(--accent, #2F5DE8); outline-offset: 1px; }
.crumbs .crumb-line::after {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 2px;
  border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); opacity: .55;
}
.line-switch-panel {
  position: fixed; z-index: 300; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14); display: flex; flex-direction: column; max-height: min(460px, calc(100vh - 90px)); overflow: hidden;
}
.line-switch-panel .ls-search { padding: 10px 10px 6px; }
.line-switch-panel .ls-input {
  width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 13.5px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--text); outline: none;
}
.line-switch-panel .ls-input:focus { border-color: var(--accent, #2F5DE8); }
.line-switch-panel .ls-list { overflow-y: auto; padding: 4px 6px 8px; flex: 1; }
.line-switch-panel .ls-group { font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 8px 8px 4px; }
.line-switch-panel .ls-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.line-switch-panel .ls-item:hover, .line-switch-panel .ls-item.active { background: var(--surface-2); }
.line-switch-panel .ls-item.current { cursor: default; color: var(--text-3); }
.line-switch-panel .ls-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-switch-panel .ls-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); flex-shrink: 0; }
.line-switch-panel .ls-check { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; }
.line-switch-panel .ls-empty { padding: 14px 10px; font-size: 13px; color: var(--text-3); text-align: center; }
.line-switch-panel .ls-foot {
  display: block; padding: 10px 14px; font-size: 12.5px; color: var(--text-2); text-decoration: none; border-top: 1px solid var(--border);
}
.line-switch-panel .ls-foot:hover { background: var(--surface-2); }

/* 보드: 카드를 끌 때 끼워 넣을 자리 표시(위/아래 굵은 선) */
.card.drop-before { box-shadow: 0 -4px 0 0 var(--accent); }
.card.drop-after { box-shadow: 0 4px 0 0 var(--accent); }

/* 검색칸(type=search): 브라우저 기본 모양 제거 */
.gsearch-panel input[type="search"] { -webkit-appearance: none; appearance: none; }
.gsearch-panel input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
