/* ============================================================
   JHR 협업 — Slack 스타일 사이드바 + Notion 스타일 콘텐츠
   ============================================================ */

@font-face {
  font-family: 'Noto Sans KR';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/NotoSansKR-Regular.woff') format('woff');
}
@font-face {
  font-family: 'Noto Sans KR';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/NotoSansKR-Medium.woff') format('woff');
}
@font-face {
  font-family: 'Noto Sans KR';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/NotoSansKR-Bold.woff') format('woff');
}

:root {
  /* Slack 사이드바 */
  --sb-bg: #3F0E40;
  --sb-hover: #350D36;
  --sb-active: #1164A3;
  --sb-text: #CFC3CF;
  --sb-bright: #FFFFFF;
  --sb-border: rgba(255,255,255,.13);
  --badge: #E01E5A;
  /* Notion 콘텐츠 */
  --ink: #37352F;
  --ink-2: #787774;
  --ink-3: #9B9A97;
  --bg: #FFFFFF;
  --bg-2: #F7F6F3;
  --hover: #F1F1EF;
  --border: #E9E9E7;
  --accent: #2383E2;
  --accent-soft: #E7F3F8;
  --green: #007A5A;
  --green-soft: #DFF3ED;
  --red: #D44C47;
  --red-soft: #FDEBEC;
  --amber: #CB912F;
  --amber-soft: #FBF3DB;
  --purple: #9065B0;
  --purple-soft: #F6F3F9;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15,15,15,.06), 0 4px 16px rgba(15,15,15,.08);
  --shadow-lg: 0 10px 40px rgba(15,15,15,.2);
}

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

html, body { height: 100%; }

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* ---------- 앱 레이아웃 ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 40px 60px;
}
/* 전 화면 풀와이드 — narrow 는 과거 폭 제한의 흔적으로 더 이상 제한하지 않음 */
.content.narrow { max-width: none; }
.content.full { padding: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- 사이드바 (Slack) ---------- */
.sidebar {
  width: 264px;
  min-width: 264px;
  background: var(--sb-bg);
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  transition: margin-left .2s ease;
}

.sb-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--sb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sb-title { color: var(--sb-bright); font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.sb-title small { display:block; font-size: 11px; font-weight: 400; color: var(--sb-text); }

.sb-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.sb-nav::-webkit-scrollbar { width: 8px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

.sb-section {
  margin: 14px 8px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.5);
  font-weight: 700;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  margin: 1px 0;
  border-radius: 6px;
  color: var(--sb-text);
  font-size: 14.5px;
  cursor: pointer;
  text-decoration: none !important;
  user-select: none;
}
.sb-item:hover { background: var(--sb-hover); color: var(--sb-bright); }
.sb-item.active { background: var(--sb-active); color: #fff; font-weight: 500; }
.sb-item .ico { width: 20px; display: flex; align-items: center; justify-content: center; }
.sb-item .ico .lni { width: 18px; height: 18px; }
.sb-item .grow { flex: 1; }

/* ── 라인 아이콘 (SVG 스프라이트 참조) ───────────────────── */
.lni {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.14em;
}
.topbar h1 .lni { width: 19px; height: 19px; }
.empty .big .lni { width: 42px; height: 42px; stroke-width: 1.6; }
.solo-card .logo .lni { width: 40px; height: 40px; stroke-width: 1.6; }
.doc-title .lni { width: 24px; height: 24px; }
.composer-tools .tool .lni { width: 18px; height: 18px; }
.sb-user .actions .lni { width: 16px; height: 16px; }

.sb-badge {
  background: var(--badge);
  color: #fff;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.sb-badge.show { display: inline-flex; }

.sb-user {
  border-top: 1px solid var(--sb-border);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-user .info { flex: 1; min-width: 0; }
.sb-user .name { color: var(--sb-bright); font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .role { font-size: 11.5px; color: var(--sb-text); }
.sb-user .actions { display: flex; gap: 4px; }
.sb-user .actions a {
  color: var(--sb-text); font-size: 15px; padding: 4px 6px; border-radius: 4px;
  text-decoration: none !important;
}
.sb-user .actions a:hover { background: var(--sb-hover); color: #fff; }

/* ---------- 탑바 ---------- */
.topbar {
  height: 56px;
  min-height: 56px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: #fff;
}
.topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; display:flex; align-items:center; gap:8px; }
.topbar .sub { color: var(--ink-3); font-size: 13px; font-weight: 400; }
.topbar .spacer { flex: 1; }
.hamburger { display: none; background:none; border:none; font-size:20px; cursor:pointer; color: var(--ink); }

/* ---------- 아바타 ---------- */
.avatar {
  width: 36px; height: 36px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: 12px; border-radius: 5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .1s;
  white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: #148567; }
.btn.blue { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.blue:hover { background: #1b74ca; }
.btn.danger { color: var(--red); border-color: #F1CBCA; background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.xs { padding: 2px 8px; font-size: 12px; border-radius: 5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 입력 ---------- */
.input, .select, .textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(35,131,226,.18);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
.field .input, .field .select, .field .textarea { width: 100%; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13.5px; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--accent); }

/* ---------- 카드/패널 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; display:flex; align-items:center; gap:7px; }
.card h3 .more { margin-left: auto; font-size: 12.5px; font-weight: 400; }
.cards { display: grid; gap: 16px; }
.cards.c2 { grid-template-columns: 1fr 1fr; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c4 { grid-template-columns: repeat(4, 1fr); }

.stat { text-align: left; }
.stat .num { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.stat .lbl { font-size: 12.5px; color: var(--ink-2); }

/* ---------- 테이블 (Notion) ---------- */
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; background:#fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { cursor: default; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover { background: var(--bg-2); }
.tbl .right { text-align: right; }
.tbl .center { text-align: center; }
.tbl .nowrap { white-space: nowrap; }

/* ---------- 칩/뱃지 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.chip.gray { background: var(--hover); color: var(--ink-2); }
.chip.blue { background: var(--accent-soft); color: #1968A8; }
.chip.green { background: var(--green-soft); color: #0F7B6C; }
.chip.red { background: var(--red-soft); color: #C4554D; }
.chip.amber { background: var(--amber-soft); color: #A8790B; }
.chip.purple { background: var(--purple-soft); color: #7A549B; }

.count-badge {
  background: var(--badge); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; padding: 1px 7px; display: inline-block;
}

.pin-flag { color: var(--amber); font-size: 13px; }

/* ---------- 목록 툴바 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.toolbar .input, .toolbar .select { height: 34px; }

/* ---------- 페이지네이션 ---------- */
.pager { display: flex; gap: 4px; justify-content: center; margin-top: 18px; align-items: center; }
.pager button {
  min-width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--ink-2);
}
.pager button:hover { background: var(--hover); }
.pager button.cur { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.pager .meta { font-size: 12px; color: var(--ink-3); margin-left: 10px; }

/* ---------- 모달 ---------- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,15,15,.45);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  animation: pop .14s ease;
}
.modal.wide { max-width: 720px; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 16px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h2 { font-size: 16px; font-weight: 700; }
.modal-head .x { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--ink-3); padding: 4px 8px; border-radius: 6px; }
.modal-head .x:hover { background: var(--hover); }
.modal-body { padding: 16px 20px; }
.modal-foot { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- 토스트 ---------- */
#toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #2B2B2B; color: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: rise .18s ease;
  max-width: 420px;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 탭 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  border: none; background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.tab .cnt { font-size: 12px; color: var(--ink-3); margin-left: 4px; }

/* ---------- 빈 상태 ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty .big { font-size: 34px; margin-bottom: 10px; }

/* ---------- 로그인/차단 독립 페이지 ---------- */
.solo-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
  padding: 20px;
}
.solo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%; max-width: 400px;
  padding: 36px 34px 30px;
}
.solo-card .logo { font-size: 30px; margin-bottom: 6px; }
.solo-card h1 { font-size: 21px; font-weight: 700; letter-spacing: -.4px; margin-bottom: 4px; }
.solo-card .desc { color: var(--ink-2); font-size: 13.5px; margin-bottom: 24px; }
.solo-card .btn { width: 100%; height: 42px; font-size: 14.5px; margin-top: 6px; }
.solo-card .msg { margin-top: 14px; font-size: 13px; color: var(--red); min-height: 18px; }
.solo-card .foot { margin-top: 20px; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ---------- 프로젝트 채널(채팅) ---------- */
.channel { flex: 1; display: flex; min-height: 0; }
.channel-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.channel-aside {
  width: 280px; min-width: 280px;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 18px 16px;
  background: var(--bg-2);
}
.channel-aside h4 { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 8px; }
.channel-aside .member-row { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 6px; font-size: 13.5px; }
.channel-aside .member-row:hover { background: var(--hover); }

.pinned-strip {
  border-bottom: 1px solid var(--border);
  background: var(--amber-soft);
  padding: 8px 22px;
  font-size: 13px;
  max-height: 132px;
  overflow-y: auto;
}
.pinned-strip .pin-item { display: flex; gap: 8px; padding: 3px 0; align-items: baseline; cursor: pointer; }
.pinned-strip .pin-item:hover { text-decoration: underline; }

.timeline { flex: 1; overflow-y: auto; padding: 18px 0 8px; }
.load-older { text-align: center; padding: 6px 0 14px; }

.msg { display: flex; gap: 12px; padding: 7px 24px; position: relative; }
.msg:hover { background: #F8F8F6; }
.msg .m-body { flex: 1; min-width: 0; }
.msg .m-head { display: flex; align-items: baseline; gap: 8px; }
.msg .m-name { font-weight: 700; font-size: 14px; }
.msg .m-dept { font-size: 11.5px; color: var(--ink-3); }
.msg .m-time { font-size: 11.5px; color: var(--ink-3); }
.msg .m-edited { font-size: 11px; color: var(--ink-3); }
.msg .m-content { white-space: pre-wrap; word-break: break-word; font-size: 14px; margin-top: 1px; }
.msg .m-content .mention { background: var(--accent-soft); color: #1968A8; border-radius: 3px; padding: 0 3px; font-weight: 500; }
.msg .m-pin-mark { font-size: 11.5px; color: var(--amber); margin-bottom: 2px; }

.msg .m-actions {
  display: none;
  position: absolute; top: -12px; right: 20px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 2px;
}
.msg:hover .m-actions { display: flex; }
.m-actions button {
  border: none; background: none; cursor: pointer;
  font-size: 13px; padding: 5px 8px; border-radius: 6px; color: var(--ink-2);
}
.m-actions button:hover { background: var(--hover); color: var(--ink); }

.m-attach { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 11px; font-size: 12.5px; background: #fff;
  max-width: 260px;
}
.file-chip .fname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-chip .fsize { color: var(--ink-3); font-size: 11px; }
.file-chip a, .file-chip button.del { text-decoration: none; }
.file-chip button.del { border:none; background:none; color: var(--ink-3); cursor:pointer; font-size: 12px; }
.file-chip button.del:hover { color: var(--red); }
.img-thumb { max-width: 240px; max-height: 170px; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; display:block; }

.m-comments { margin-top: 8px; }
.m-comments .toggle { font-size: 12.5px; color: var(--accent); cursor: pointer; background:none; border:none; padding:0; }
.comment-list { margin-top: 8px; border-left: 2px solid var(--border); padding-left: 12px; display: flex; flex-direction: column; gap: 8px; }
.comment-item { display: flex; gap: 8px; }
.comment-item .c-body { flex: 1; min-width: 0; }
.comment-item .c-head { display: flex; gap: 6px; align-items: baseline; }
.comment-item .c-name { font-weight: 500; font-size: 12.5px; }
.comment-item .c-time { font-size: 11px; color: var(--ink-3); }
.comment-item .c-text { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.comment-item .c-del { border:none; background:none; color: var(--ink-3); cursor:pointer; font-size:11px; }
.comment-item .c-del:hover { color: var(--red); }
.comment-input { display: flex; gap: 6px; margin-top: 8px; }
.comment-input .input { flex: 1; height: 32px; font-size: 13px; }

/* 입력 컴포저 (Slack) */
.composer { padding: 10px 24px 18px; }
.composer-box {
  border: 1px solid #B9B7B4;
  border-radius: 10px;
  background: #fff;
  transition: border-color .12s, box-shadow .12s;
}
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(35,131,226,.15); }
.composer-box textarea {
  width: 100%; border: none; outline: none; resize: none;
  padding: 11px 13px 4px; font-size: 14px; font-family: inherit;
  max-height: 180px; line-height: 1.55; background: transparent;
}
.composer-tools { display: flex; align-items: center; gap: 6px; padding: 5px 8px 7px; }
.composer-tools .spacer { flex: 1; }
.composer-tools .tool {
  border: none; background: none; cursor: pointer; font-size: 15px;
  color: var(--ink-3); padding: 4px 7px; border-radius: 6px;
}
.composer-tools .tool:hover { background: var(--hover); color: var(--ink); }
.composer-tools .send {
  background: var(--green); color: #fff; border: none; border-radius: 6px;
  padding: 5px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.composer-tools .send:disabled { opacity: .4; cursor: default; }
.composer .pending-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; }
.archived-bar {
  background: var(--amber-soft); color: #A8790B; text-align: center;
  padding: 10px; font-size: 13px; border-radius: 8px; margin: 0 24px 16px;
}

/* 멘션 드롭다운 */
.mention-pop {
  position: absolute;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: 200px; overflow-y: auto;
  min-width: 220px;
  z-index: 200;
  display: none;
}
.mention-pop.open { display: block; }
.mention-pop .mi { display: flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer; font-size: 13.5px; }
.mention-pop .mi:hover, .mention-pop .mi.sel { background: var(--accent-soft); }
.mention-pop .mi .dept { color: var(--ink-3); font-size: 11.5px; }

/* ---------- 달력 ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h3 { font-size: 16px; font-weight: 700; min-width: 120px; text-align: center; }
.cal { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { padding: 8px; text-align: center; font-size: 12px; color: var(--ink-3); background: var(--bg-2); border-bottom: 1px solid var(--border); font-weight: 500; }
.cal-cell {
  min-height: 96px; padding: 6px 7px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: 12px;
  overflow: hidden;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.dim { background: var(--bg-2); color: var(--ink-3); }
.cal-cell .d { font-size: 12px; font-weight: 500; margin-bottom: 3px; }
.cal-cell.today .d { color: #fff; background: var(--red); border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.cal-cell .sun { color: var(--red); }
.cal-cell .sat { color: var(--accent); }
.cal-ev {
  display: block;
  border-radius: 4px; padding: 1px 6px; margin-bottom: 2px;
  font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.cal-ev.blue { background: var(--accent-soft); color: #1968A8; }
.cal-ev.green { background: var(--green-soft); color: #0F7B6C; }
.cal-ev.amber { background: var(--amber-soft); color: #A8790B; }
.cal-ev.red { background: var(--red-soft); color: #C4554D; }
.cal-ev.purple { background: var(--purple-soft); color: #7A549B; }
.cal-ev.holiday { background: transparent; color: var(--red); font-weight: 500; cursor: default; }

/* ---------- 대시보드 ---------- */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 16px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 6px; font-size: 13.5px; }
.list-row:hover { background: var(--hover); }
.list-row .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .sub { color: var(--ink-3); font-size: 12px; white-space: nowrap; }

/* ---------- 알림 ---------- */
.notif-row { display: flex; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; }
.notif-row:hover { background: var(--bg-2); }
.notif-row.unread { background: #F3F9FD; }
.notif-row.unread:hover { background: #EAF4FB; }
.notif-row .n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex-shrink: 0; visibility: hidden; }
.notif-row.unread .n-dot { visibility: visible; }
.notif-row .n-body { flex: 1; min-width: 0; }
.notif-row .n-text { font-size: 13.5px; }
.notif-row .n-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.notif-row.deleted { opacity: .55; }

/* ---------- 상세(공지/업무일지) ---------- */
.doc { max-width: none; }
.doc-title { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.3; margin-bottom: 8px; display:flex; gap:10px; align-items:center; }
.doc-meta { display: flex; gap: 14px; color: var(--ink-3); font-size: 13px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; align-items:center; }
.doc-content { font-size: 15px; white-space: pre-wrap; word-break: break-word; min-height: 120px; }
.doc-section { margin-top: 28px; }
.doc-section h4 { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .4px; }
.slide-imgs { display: flex; gap: 10px; flex-wrap: wrap; }

/* 이미지 라이트박스 */
.lightbox { display:none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 400; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 6px; }

/* ---------- 로딩 ---------- */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--ink-2); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box { text-align: center; padding: 40px; color: var(--ink-3); }

/* ---------- 안내 툴팁 (info 버튼 호버) ---------- */
.info-tip {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  border: none; border-radius: 50%; background: none;
  color: var(--ink-3); cursor: help;
}
.info-tip:hover, .info-tip:focus-visible { background: var(--hover); color: var(--accent); outline: none; }
.info-tip .lni { width: 16px; height: 16px; }
/* 말풍선은 App 이 만드는 단일 요소(.tip-pop) — 화면 밖으로 나가지 않게 위치 보정 */
.tip-pop {
  position: fixed; z-index: 200;
  max-width: 320px; padding: 8px 11px;
  background: var(--ink); color: #fff;
  font-size: 12.5px; font-weight: 400; line-height: 1.65; text-align: left;
  white-space: pre-line;
  border-radius: 6px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transform: translateY(-3px);
  transition: opacity .14s, transform .14s;
}
.tip-pop.show { opacity: 1; transform: none; }
.tip-pop::after {
  content: ''; position: absolute;
  bottom: 100%; left: var(--arrow-x, 16px); margin-left: -6px;
  border: 6px solid transparent; border-bottom-color: var(--ink);
}
.tip-pop.above::after { bottom: auto; top: 100%; border-bottom-color: transparent; border-top-color: var(--ink); }

/* ---------- 디자인 시안 뷰어 (/draft) ---------- */
.draft-stage { min-height: 100vh; background: var(--bg-2); padding-bottom: 76px; }
.draft-stage img { display: block; margin: 0 auto; max-width: 100%; }
.draft-menu-btn {
  position: fixed; top: 14px; left: 14px; z-index: 60;
  width: 42px; height: 42px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--sb-bg); color: #fff; opacity: .92;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
}
.draft-menu-btn:hover { opacity: 1; }
.draft-menu-btn .lni { width: 20px; height: 20px; }
.draft-scrim {
  position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.draft-scrim.open { opacity: 1; pointer-events: auto; }
.draft-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 80; width: 280px; max-width: 86vw;
  background: var(--sb-bg); color: var(--sb-text);
  display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .22s ease;
}
.draft-drawer.open { transform: none; box-shadow: var(--shadow-lg); }
.draft-drawer .head { padding: 18px 14px 14px 18px; border-bottom: 1px solid var(--sb-border); display: flex; align-items: flex-start; gap: 8px; }
.draft-drawer .head .tt { color: var(--sb-bright); font-weight: 700; font-size: 16px; line-height: 1.35; word-break: break-all; }
.draft-drawer .head .ver { font-size: 11.5px; margin-top: 3px; }
.draft-drawer .head .x { background: none; border: none; color: var(--sb-text); cursor: pointer; padding: 5px; border-radius: 6px; display: flex; }
.draft-drawer .head .x:hover { background: var(--sb-hover); color: #fff; }
.draft-drawer .head .x .lni { width: 16px; height: 16px; }
.draft-pages { flex: 1; overflow-y: auto; padding: 10px 8px; }
.draft-page-item {
  display: block; width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  color: var(--sb-text); font-family: inherit; font-size: 14px;
  padding: 9px 12px; border-radius: 6px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.draft-page-item:hover { background: var(--sb-hover); color: #fff; }
.draft-page-item.active { background: var(--sb-active); color: #fff; font-weight: 600; }
.draft-drawer .foot { padding: 12px; border-top: 1px solid var(--sb-border); }
.draft-drawer .foot .btn { width: 100%; }
.draft-pager {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-lg);
}
.draft-pager button {
  width: 34px; height: 34px; border: none; background: none; border-radius: 50%; cursor: pointer;
  color: var(--ink-2); display: flex; align-items: center; justify-content: center;
}
.draft-pager button:hover { background: var(--hover); color: var(--ink); }
.draft-pager button:disabled { opacity: .3; cursor: default; background: none; }
.draft-pager .cnt { font-size: 12.5px; color: var(--ink-2); padding: 0 8px; min-width: 52px; text-align: center; }

/* 디자인 시안 관리(관리자) — 썸네일·접속 안내 */
.draft-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 10px; margin-top: 12px; }
.draft-thumb { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.draft-thumb img { width: 100%; height: 92px; object-fit: cover; object-position: top; display: block; cursor: zoom-in; }
.draft-thumb .nm { font-size: 11.5px; padding: 4px 7px; background: #fff; border-top: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-thumb .rm {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.draft-thumb .rm:hover { background: var(--red); }
.draft-thumb .rm .lni { width: 12px; height: 12px; }
.draft-access-box { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.9; }

/* ---------- 마크다운 문서 (연동 가이드) ---------- */
.md-body { font-size: 14px; line-height: 1.85; color: var(--ink); max-width: 900px; }
.md-body .md-h { font-weight: 700; line-height: 1.4; margin: 28px 0 10px; }
.md-body h1.md-h { font-size: 24px; margin-top: 0; }
.md-body h2.md-h { font-size: 19px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.md-body h3.md-h { font-size: 16px; }
.md-body h4.md-h { font-size: 14.5px; color: var(--ink-2); }
.md-body .md-p { margin: 10px 0; }
.md-body .md-list { margin: 8px 0 12px; padding-left: 22px; }
.md-body .md-list li { margin: 4px 0; }
.md-body .md-task { list-style: none; margin-left: -18px; }
.md-body .md-box { color: var(--ink-2); }
.md-body .md-hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.md-body .md-quote { margin: 12px 0; padding: 10px 14px; background: var(--bg-2);
  border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; color: var(--ink-2); }
.md-body code { background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; font-size: 12.5px; font-family: Consolas, 'Courier New', monospace; }
.md-body .md-code { background: #2B2B33; color: #E6E6E6; border-radius: 8px; padding: 14px 16px;
  overflow-x: auto; margin: 12px 0; position: relative; }
.md-body .md-code code { background: none; border: 0; padding: 0; color: inherit;
  font-size: 12.5px; line-height: 1.7; white-space: pre; }
.md-body .md-code[data-lang]::before { content: attr(data-lang); position: absolute; top: 6px; right: 10px;
  font-size: 11px; color: #8A8A99; letter-spacing: .5px; }
.md-body .md-table-wrap { overflow-x: auto; margin: 12px 0; }
.md-body .md-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.md-body .md-table th, .md-body .md-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.md-body .md-table th { background: var(--bg-2); font-weight: 600; white-space: nowrap; }
.md-body a { color: var(--accent); }

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  .sidebar { position: fixed; z-index: 90; height: 100vh; margin-left: -264px; }
  .sidebar.open { margin-left: 0; box-shadow: var(--shadow-lg); }
  .hamburger { display: block; }
  .content { padding: 20px 16px 40px; }
  .dash-grid, .cards.c2, .cards.c3, .cards.c4 { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .channel-aside { display: none; }
}
