* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4f5f7; --panel: #fff; --line: #e8eaed; --text: #1f2b38; --muted: #8a93a0;
  /* 컬쳐임팩트 키컬러 — 코랄(주황)을 메인으로 (플로우 보라처럼) */
  --primary: #F0674F; --primary-d: #db553f;    /* 코랄 = 메인 (버튼·레일·활성) */
  --accent: #F0674F; --accent-d: #db553f; --tint: #fdecea;  /* 활성 강조 = 코랄 */
  --navy: #16324F; --navy-d: #0f2740;          /* 네이비 = 보조 */
  --cream: #F5E6C8;
  --gold: #16324F; --gold-d: #0f2740;          /* 초대하기 = 네이비(대비) */
  --rail-a: #F27860; --rail-b: #e0563f;        /* 코랄 그라데이션 레일 */
  --shadow: 0 1px 3px rgba(20,24,40,.06), 0 1px 2px rgba(20,24,40,.04);
}
html, body { height: 100%; }
body { font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
#app { display: flex; flex-direction: column; height: 100vh; }
button { font-family: inherit; }

/* 상단바 */
.topbar { height: 54px; min-height: 54px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding-right: 18px; z-index: 30; }
.tb-rail-sp { width: 58px; min-width: 58px; }
.tb-search { flex: 1; display: flex; justify-content: center; }
.tb-search { position: relative; }
.tb-search input { width: 380px; max-width: 46vw; border: 1.5px solid #d9d0ff; border-radius: 22px; padding: 9px 40px 9px 38px; font-size: 14px; background: #faf9ff; }
.tb-search .tb-s-ico { position: absolute; left: calc(50% - 190px + 14px); top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); }
.tb-search .tb-s-send { position: absolute; right: calc(50% - 190px + 10px); top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--primary); cursor: pointer; font-size: 13px; }
.tb-right { display: flex; align-items: center; gap: 14px; }
.tb-ico { border: 0; background: none; cursor: pointer; font-size: 18px; position: relative; color: #4b5162; }
.tb-badge { position: absolute; top: -6px; right: -8px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; border-radius: 20px; padding: 1px 5px; }
.tb-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }

/* 본체 */
.shell { flex: 1; display: flex; min-height: 0; }

/* 아이콘 레일 */
.rail { width: 58px; min-width: 58px; background: linear-gradient(180deg, var(--rail-a), var(--rail-b)); display: flex; flex-direction: column; justify-content: space-between; padding: 8px 0 12px; overflow-y: auto; }
.rail::-webkit-scrollbar { display: none; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; cursor: pointer; color: #fff; opacity: .82; }
.rail-item:hover { opacity: 1; }
.rail-item.active { opacity: 1; }
.rail-ico { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.rail-ico.logo { background: #fff; padding: 3px; }
.rail-ico.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pc-logo-img { width: 30px; height: 33px; object-fit: contain; }
.brand-logo-img { width: 40px; height: 44px; object-fit: contain; }
.brand-logo-wide { width: 210px; max-width: 80%; object-fit: contain; display: block; margin: 0 auto; }
/* 좌측바 임팩트 앱 바로가기 */
.panel-shortcuts { margin-top: 14px; }
.ps-short { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: #3a4050; text-decoration: none; }
.ps-short:hover { background: var(--tint); color: var(--primary); }
.ps-short .sc-ico { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; }
.rail-ico.gift { background: rgba(255,255,255,.22); }
.rail-item.active .rail-ico:not(.logo) { background: rgba(255,255,255,.22); }
.rail-item span { font-size: 10px; }

/* 프로젝트 패널 */
.panel { width: 236px; min-width: 236px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 12px 0; overflow-y: auto; }
.panel-company { display: flex; align-items: center; gap: 8px; padding: 6px 4px 12px; }
.pc-logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #6C5CE7, #a06bff); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.panel-company b { font-size: 15px; }
.btn-new { width: 100%; padding: 11px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }
.btn-new:hover { background: var(--primary-d); }
.panel-menu { margin-top: 12px; }
.pm-item { display: flex; align-items: center; gap: 9px; padding: 8px 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: #3a4050; }
.pm-item.sm { font-weight: 500; color: #5b6272; }
.pm-item:hover { background: #f3f4f8; }
.pm-item.active { background: var(--tint); color: var(--accent); }
.pm-ico { width: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.pm-count { margin-left: auto; font-size: 11px; color: var(--muted); background: #eef0f5; border-radius: 20px; padding: 1px 7px; }
.panel-sec { margin-top: 16px; }
.ps-title { font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 8px 6px; display: flex; align-items: center; gap: 6px; }
.count { background: #eef0f5; color: var(--muted); border-radius: 20px; padding: 1px 8px; font-size: 11px; }
.project-list { display: flex; flex-direction: column; }
.pitem { display: flex; align-items: center; gap: 9px; padding: 8px 8px; border-radius: 8px; cursor: pointer; }
.pitem:hover { background: #f3f4f8; }
.pitem.active { background: var(--tint); }
.pdot { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto; }
.pitem .pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.pitem .pstar { color: #f5b301; font-size: 12px; }
.pitem .pbadge { font-size: 11px; color: var(--muted); }

/* 사용자 영역 */
.side-user { margin-top: auto; position: sticky; bottom: 0; background: #fff; display: flex; align-items: center; gap: 9px; padding: 10px 6px; border-top: 1px solid var(--line); }
.su-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.su-info { flex: 1; display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.su-info b { font-size: 13px; }
.su-info span { font-size: 11px; color: var(--muted); }
.su-btn { border: 0; background: none; cursor: pointer; font-size: 15px; color: #8a91a0; padding: 4px; border-radius: 6px; }
.su-btn:hover { background: #eef0f5; color: var(--primary); }
.avatar-sm { width: 26px; height: 26px; border-radius: 50%; background: #cbd0dc; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: 0 0 auto; }

/* 메인 */
.main { flex: 1; overflow-y: auto; background: var(--bg); }
.empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); gap: 12px; }

/* 홈 화면 (즐겨찾기/참여중) */
.home-view { padding: 24px 30px; max-width: 900px; }
.home-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.home-head h1 { font-size: 24px; }
.home-sec-title { font-size: 15px; font-weight: 700; margin: 18px 0 6px; }
.hp-row { display: flex; align-items: center; gap: 14px; padding: 13px 8px; border-bottom: 1px solid #f0f1f4; cursor: pointer; }
.hp-row:hover { background: #fafbff; }
.hp-color { width: 40px; height: 40px; border-radius: 9px; flex: 0 0 auto; }
.hp-star { font-size: 18px; cursor: pointer; flex: 0 0 auto; }
.hp-star.on { color: #f5b301; }
.hp-star.off { color: #d5d8e0; }
.hp-name { flex: 1; font-weight: 700; font-size: 15px; }
.hp-code { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 8px; }
.hp-mem { font-size: 12px; color: var(--muted); }
.hp-badge { background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 8px; min-width: 22px; text-align: center; }

/* 안읽음 배지 (사이드바) */
.pitem .pbadge.unread { background: #ef4444; color: #fff; border-radius: 20px; padding: 1px 7px; font-weight: 700; }

/* 해시태그 */
.hashtags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hashtag { font-size: 12px; color: var(--primary); background: var(--tint); border-radius: 20px; padding: 2px 9px; cursor: pointer; }
/* 업무번호 */
.post-no { font-size: 11px; color: #fff; background: var(--navy); border-radius: 5px; padding: 1px 7px; font-weight: 700; letter-spacing: .3px; }
.empty-icon { font-size: 52px; }
.empty h2 { color: var(--text); font-size: 20px; }

/* 프로젝트 헤더 */
.project-view { padding: 20px 26px; }
.pv-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pv-color { width: 40px; height: 40px; border-radius: 10px; }
.pv-star { border: 0; background: none; font-size: 20px; cursor: pointer; color: #f5b301; }
.pv-menu { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.pv-header h1 { font-size: 22px; }
.pv-globe { color: var(--muted); font-size: 15px; }
.pv-spacer { flex: 1; }
.pv-avatars { display: flex; align-items: center; }
.pv-avatars .avatar-sm { width: 30px; height: 30px; border: 2px solid #fff; margin-left: -8px; }
.pv-avatars .more { background: #eef0f5; color: #5b6272; }
.btn-invite { background: var(--gold); color: #fff; border: 0; border-radius: 9px; padding: 9px 14px; font-weight: 700; cursor: pointer; font-size: 13.5px; margin-left: 10px; }
.btn-invite:hover { background: var(--gold-d); }

/* 탭 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { border: 0; background: none; padding: 11px 16px; font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab.disabled { color: #c3c7d0; font-weight: 500; }

/* 피드 레이아웃 (피드 + 참여자) */
.feed-wrap { display: flex; gap: 20px; align-items: flex-start; }
.feed-main { flex: 1; min-width: 0; max-width: 720px; }
.feed-side { width: 300px; min-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }

/* 컴포저 */
.composer { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 12px; margin-bottom: 16px; box-shadow: var(--shadow); }
.composer-types { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 6px 6px 8px; margin-bottom: 10px; }
.ctype { border: 0; background: none; border-radius: 8px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; font-weight: 600; color: #5b6272; display: flex; align-items: center; gap: 5px; }
.ctype:hover { background: #f3f4f8; }
.ctype.active { color: var(--accent); background: var(--tint); }
.c-title { width: calc(100% - 20px); margin: 0 10px 8px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 14px; }
.c-body { width: calc(100% - 20px); margin: 0 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 14px; min-height: 60px; resize: vertical; font-family: inherit; }
.c-extra { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 10px 0; }
.c-extra label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.c-extra input, .c-extra select { border: 1px solid var(--line); border-radius: 7px; padding: 7px; font-size: 13px; font-family: inherit; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; margin: 10px 10px 0; }
.cf-left { display: flex; align-items: center; gap: 14px; }
.cf-icons { display: flex; gap: 12px; color: var(--muted); font-size: 15px; }
.cf-icons span { cursor: pointer; }
.cf-vis { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.cf-vis select { border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; font-size: 12px; font-family: inherit; color: #4b5162; }
.c-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 10px 0; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; background: #f3f4f8; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; font-size: 12px; color: #4b5162; text-decoration: none; }
.file-chip:hover { background: #eceef3; }
.file-chip .fc-x { cursor: pointer; color: #b7bcc7; }
.file-chip .fc-x:hover { color: #ef4444; }
.fvis-badge { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 1px 7px; margin-left: 6px; }

/* 댓글 */
.fcomments { margin-top: 12px; border-top: 1px solid #f0f1f4; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.cmt { display: flex; gap: 8px; }
.cmt .avatar-sm { width: 30px; height: 30px; }
.cmt-body { flex: 1; }
.cmt-bub { background: #f5f6f8; border-radius: 10px; padding: 8px 12px; }
.cmt-bub b { font-size: 12.5px; }
.cmt-bub .cmt-txt { font-size: 13px; color: #3a4050; white-space: pre-wrap; margin-top: 2px; }
.cmt-act { display: flex; gap: 10px; margin: 4px 0 0 4px; font-size: 11.5px; color: var(--muted); }
.cmt-act span { cursor: pointer; }
.cmt-act span:hover { color: var(--accent); }
.cmt-replies { margin: 8px 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.reply-box { display: flex; gap: 6px; margin: 6px 0 0 4px; }
.reply-box input { flex: 1; border: 1px solid var(--line); border-radius: 16px; padding: 6px 12px; font-size: 12.5px; }
.reply-box button { border: 0; background: var(--primary); color: #fff; border-radius: 16px; padding: 6px 12px; font-size: 12px; cursor: pointer; }

/* 피드 */
.feed-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13.5px; }
.feed-toolbar .ft-filter { color: var(--muted); cursor: pointer; }
.feed-list { display: flex; flex-direction: column; gap: 12px; }
.fcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.fcard .fmeta { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.fcard .fmeta .avatar-sm { width: 34px; height: 34px; font-size: 13px; }
.fcard .fm-name { font-weight: 700; font-size: 14px; }
.fcard .fm-sub { font-size: 12px; color: var(--muted); }
.fcard .ftag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-left: 4px; }
.ftag.article { background: #eef0f5; color: #5b6272; }
.ftag.task { background: #e8ecff; color: var(--primary); }
.ftag.schedule { background: #e3f5ec; color: #10a05a; }
.ftag.todo { background: #fff2df; color: #c07a10; }
.ftag.poll { background: #fde8f3; color: #c0398a; }
.fcard h3 { font-size: 15px; margin-bottom: 6px; }
.fcard .fbody { font-size: 14px; color: #3a4050; white-space: pre-wrap; }
.fcard .fsub { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.fcard .factions { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f1f4; font-size: 13px; color: #6b7280; }
.fcard .factions button { border: 0; background: none; cursor: pointer; color: #6b7280; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.fcard .factions button:hover { color: var(--primary); }
.fcard .factions .fread { margin-left: auto; color: var(--muted); font-size: 12px; }
.fcard .fdel:hover { color: #ef4444 !important; }
.fcomment { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.fcomment .avatar-sm { width: 30px; height: 30px; }
.fcomment input { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 9px 14px; font-size: 13px; background: #fafbfc; }

/* 참여자 패널 */
.fs-head { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.fs-sec-label { font-size: 12px; color: var(--muted); font-weight: 700; margin: 6px 0 8px; }
.fs-ai { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); }
.fs-ai-ico { width: 34px; height: 34px; border-radius: 50%; background: #eef0f5; display: flex; align-items: center; justify-content: center; }
.fs-ai-txt b { font-size: 13.5px; }
.fs-toggle { margin-left: auto; width: 38px; height: 22px; border-radius: 20px; background: #d5d8e0; position: relative; cursor: pointer; }
.fs-toggle::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .15s; }
.fs-toggle.on { background: var(--primary); }
.fs-toggle.on::after { left: 18px; }
.fs-grp-title { font-size: 13px; font-weight: 700; margin: 14px 0 8px; }
.fs-person { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.fs-person .avatar-sm { width: 36px; height: 36px; }
.fs-person .fp-info { flex: 1; line-height: 1.3; }
.fs-person .fp-info b { font-size: 13.5px; }
.fs-person .fp-info span { font-size: 11.5px; color: var(--muted); display: block; }
.fs-person .fp-chat { color: #b7bcc7; cursor: pointer; }
.fs-foot { display: flex; gap: 8px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.fs-foot button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 9px; cursor: pointer; font-size: 13px; font-weight: 600; color: #4b5162; }
.fs-foot button:hover { background: #f3f4f8; }

/* 업무 툴바 */
.task-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tt-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tt-chip { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 11px; font-size: 12.5px; color: #4b5162; cursor: pointer; }
.tt-chip.active { border-color: var(--accent); color: var(--accent); background: var(--tint); }
.tt-right { display: flex; align-items: center; gap: 12px; }
.tt-total { font-size: 12.5px; color: var(--muted); }

/* 업무 테이블 */
.task-head, .trow { display: grid; grid-template-columns: minmax(220px, 1fr) 108px 118px 128px 128px 96px 128px 72px; align-items: center; gap: 6px; }
.task-head { padding: 9px 12px; font-size: 12px; color: var(--muted); font-weight: 700; background: #fbfbfc; border: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.task-table { background: var(--panel); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.trow { padding: 9px 12px; border-bottom: 1px solid #f0f1f4; }
.trow:hover { background: #fafbff; }
.trow .tname { display: flex; align-items: center; gap: 6px; overflow: hidden; }
.tname .caret { width: 16px; text-align: center; cursor: pointer; color: var(--muted); flex: 0 0 auto; user-select: none; }
.tname .caret.hidden { visibility: hidden; }
.tname .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; cursor: text; }
.trow select, .trow input { border: 1px solid transparent; border-radius: 6px; padding: 5px 6px; font-size: 12.5px; font-family: inherit; background: transparent; width: 100%; }
.trow select:hover, .trow input:hover { border-color: var(--line); background: #fff; }
.trow input[type=date] { color: #4b5162; }
.prog-wrap { display: flex; align-items: center; gap: 6px; }
.prog-num { font-size: 11px; color: var(--muted); width: 30px; text-align: right; }
.trow .tact { display: flex; gap: 4px; justify-content: flex-end; }
.iconbtn { border: 0; background: none; cursor: pointer; color: #b7bcc7; font-size: 14px; padding: 2px 4px; border-radius: 6px; }
.iconbtn:hover { background: #eef0f5; color: var(--primary); }
.iconbtn.del:hover { color: #ef4444; }
.addtask-row { padding: 10px 12px; }
.addtask-row button, .inline-input { font-family: inherit; }
.addtask-row button { border: 1px dashed var(--line); background: #fff; color: var(--muted); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.addtask-row button:hover { color: var(--primary); border-color: var(--primary); }

/* 상태 칩 */
.st-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.status-cell { border: 1px solid transparent; background: none; cursor: pointer; padding: 2px; border-radius: 7px; display: inline-flex; align-items: center; gap: 3px; }
.status-cell:hover { border-color: var(--line); background: #fff; }
.status-cell .st-caret { color: #b7bcc7; font-size: 10px; }
.st-pop { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(20,24,40,.16); padding: 8px; width: 210px; max-height: 380px; overflow-y: auto; }
.st-pop .st-group { font-size: 11px; color: var(--muted); font-weight: 700; padding: 8px 8px 4px; }
.st-pop .st-opt { padding: 5px 8px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; }
.st-pop .st-opt:hover { background: #f3f4f8; }
.st-pop .st-opt.sel { background: var(--tint); }
.st-pop .st-edit { border-top: 1px solid var(--line); margin-top: 6px; padding: 9px 8px 4px; display: flex; align-items: center; gap: 6px; cursor: pointer; color: #4b5162; font-size: 13px; font-weight: 600; }
.st-pop .st-edit:hover { color: var(--primary); }

/* 담당자 */
.worker-cell { border: 1px solid transparent; background: none; cursor: pointer; padding: 3px 5px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; width: 100%; text-align: left; }
.worker-cell:hover { border-color: var(--line); background: #fff; }
.worker-cell .wname { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker-cell .wempty { color: var(--muted); font-size: 12.5px; }
.wk-pop { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(20,24,40,.16); padding: 6px; width: 200px; max-height: 300px; overflow-y: auto; }
.wk-pop .wk-opt { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.wk-pop .wk-opt:hover { background: #f3f4f8; }
.wk-pop .wk-opt.sel { background: var(--tint); }

/* 상태 편집 모달 */
.se-list { max-height: 50vh; overflow-y: auto; margin-top: 6px; }
.se-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.se-group-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.se-group-head input { flex: 1; font-weight: 700; }
.se-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.se-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; position: relative; flex: 0 0 auto; }
.se-row input.se-label { flex: 1; }
.se-del { border: 0; background: none; color: #c3c7d0; cursor: pointer; font-size: 14px; }
.se-del:hover { color: #ef4444; }
.se-addstatus, .se-addgroup { border: 1px dashed var(--line); background: #fff; color: var(--muted); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.se-addstatus:hover, .se-addgroup:hover { color: var(--primary); border-color: var(--primary); }
.se-palette { position: absolute; top: 26px; left: 0; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: grid; grid-template-columns: repeat(5, 20px); gap: 5px; box-shadow: var(--shadow); }
.se-palette span { width: 20px; height: 20px; border-radius: 5px; cursor: pointer; }

/* 공통 버튼 / 입력 */
.btn-primary { border: 0; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 700; padding: 10px 16px; cursor: pointer; font-size: 14px; }
.btn-primary:hover { background: var(--primary-d); }
.btn-primary.sm { padding: 8px 14px; font-size: 13px; }
.btn-ghost { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 13px; color: #4b5162; }
.btn-ghost:hover { background: #f3f4f8; }
.btn-ghost.danger:hover { color: #ef4444; border-color: #ef4444; }
.muted { color: var(--muted); }

/* 준비중 탭 */
.placeholder { display: flex; align-items: center; justify-content: center; min-height: 300px; }
.ph-box { text-align: center; color: var(--muted); }
.ph-box .ph-ico { font-size: 40px; }
.ph-box b { display: block; margin: 8px 0 4px; color: var(--text); font-size: 16px; }

/* 모달 */
.modal { position: fixed; inset: 0; background: rgba(20,24,40,.4); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal[hidden] { display: none; }
[hidden] { display: none !important; }
.modal-box { background: #fff; border-radius: 14px; padding: 22px; width: 420px; max-width: 92vw; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal-box.wide { width: 520px; }
.modal-box h3 { margin-bottom: 14px; font-size: 17px; }
.modal-box label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.modal-box input, .modal-box textarea, .modal-box select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px; font-size: 14px; font-family: inherit; }
.color-row { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.color-dot { width: 26px; height: 26px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.color-dot.sel { border-color: #1f2430; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* 구성원 관리 */
.mm-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.mm-row .mm-name { flex: 1; font-weight: 600; }
.mm-row .role-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 700; }
.role-badge.admin { background: #e8ecff; color: var(--primary); }
.role-badge.staff { background: #eef0f5; color: #5b6272; }
.role-badge.external { background: #fff2df; color: #c07a10; }

/* 로그인 화면 */
.auth-screen { position: fixed; inset: 0; background: linear-gradient(135deg, var(--tint), #f4f5f7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.auth-box { background: #fff; border-radius: 16px; padding: 30px; width: 360px; max-width: 92vw; box-shadow: 0 20px 60px rgba(20,24,40,.15); }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #6C5CE7, #a06bff); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 20px; font-size: 18px; }
.auth-box h3 { font-size: 17px; margin-bottom: 4px; text-align: center; }
.auth-box .auth-sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 18px; }
.auth-box label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.auth-box input, .auth-box select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px; font-size: 15px; font-family: inherit; }
.auth-box .btn-primary { width: 100%; margin-top: 18px; }
.auth-err { color: #ef4444; font-size: 13px; margin-top: 10px; text-align: center; min-height: 18px; }
.member-pick { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; margin-top: 6px; }
.member-pick .mp { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.member-pick .mp:hover { background: #f3f4f8; }
.member-pick .mp.sel { border-color: var(--primary); background: var(--tint); }

/* 프로필 사진 아바타 */
.avatar-sm.has-img { overflow: hidden; background: #eef0f5; }
.avatar-sm.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: #cbd0dc; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex: 0 0 auto; }
.avatar-lg.has-img { overflow: hidden; background: #eef0f5; }
.avatar-lg.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.su-avatar, .tb-avatar { cursor: pointer; overflow: hidden; }
.su-avatar img, .tb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* 파일 미리보기 */
.file-chip.clickable { cursor: pointer; }
.file-chip .fc-dl { text-decoration: none; color: #8a91a0; margin-left: 2px; padding: 0 2px; }
.file-chip .fc-dl:hover { color: var(--primary); }
.modal-box.xl { width: 780px; }
.fp-body { max-height: 68vh; overflow: auto; margin-top: 6px; }
.fp-img { max-width: 100%; border-radius: 8px; display: block; margin: 0 auto; }
.fp-frame { width: 100%; height: 64vh; border: 1px solid var(--line); border-radius: 8px; }
.fp-pre { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.7; background: #f8f9fb; padding: 14px; border-radius: 8px; border: 1px solid var(--line); font-family: inherit; }
.fp-none { text-align: center; padding: 44px 12px; color: var(--muted); line-height: 1.8; font-size: 13px; }

/* 알림 패널 */
.notif-pop { position: fixed; z-index: 60; width: 350px; max-height: 480px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.16); }
.notif-head { padding: 12px 14px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; }
.notif-item { display: flex; gap: 9px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid #f2f3f6; font-size: 12.5px; line-height: 1.5; }
.notif-item:hover { background: #f7f8fa; }
.notif-item.unread { background: #fdecea; }
.notif-item.unread:hover { background: #fbdfdb; }
.notif-item .ni-ico { font-size: 16px; flex: 0 0 auto; }
.notif-item .ni-time { color: var(--muted); font-size: 11px; margin-top: 2px; }
.notif-empty { padding: 34px; text-align: center; color: var(--muted); font-size: 13px; }

/* ===== 플로우식 업무 카드 ===== */
.fcard-title-row { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 12px; }
.fcard-title-row h3 { flex: 1; font-size: 18px; }
.tno-badge { border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tno-badge b { color: #3a4050; }
.tf-row { display: flex; align-items: center; gap: 8px; margin: 9px 0; min-height: 30px; }
.tf-label { width: 88px; flex: 0 0 88px; font-size: 13px; color: #6b7180; }
.tf-row select { border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-size: 12.5px; font-family: inherit; }
.tf-date { border: 1px solid transparent; border-radius: 7px; padding: 4px 6px; font-size: 12.5px; font-family: inherit; color: #3a4050; }
.tf-date:hover, .tf-date:focus { border-color: var(--line); background: #fafbfc; }
.st-chip-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; cursor: pointer; padding: 2px; border-radius: 8px; }
.st-chip-btn:hover { background: #f3f4f8; }
.st-chip-btn .st-caret { font-size: 10px; color: var(--muted); }
.st-chip-btn.sm .st-chip { font-size: 11.5px; }
.tf-add { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; padding: 5px 12px; font-size: 12.5px; color: var(--muted); font-family: inherit; }
.tf-add:hover { border-color: var(--accent); color: var(--accent); }
.tf-add b { color: #3a4050; }
.tf-add .avatar-sm { width: 22px; height: 22px; font-size: 10px; }
.tf-x { color: #b7bcc7; cursor: pointer; padding: 0 2px; }
.tf-x:hover { color: #ef4444; }
.tf-more { display: inline-block; font-size: 13px; color: #3a4050; cursor: pointer; margin: 10px 0; font-weight: 600; }
.tf-more:hover { color: var(--accent); }

/* 하위업무 (플로우식: 상태칩 + 이름 행) */
.sub-sec { border-top: 1px solid #f0f1f4; margin-top: 12px; padding-top: 12px; }
.sub-head { font-size: 13.5px; font-weight: 700; color: #3a4050; margin-bottom: 8px; }
.sub-list { display: flex; flex-direction: column; }
.sub-row { display: flex; align-items: center; gap: 10px; border: 1px solid #eef0f4; border-bottom: 0; padding: 9px 12px; font-size: 13.5px; }
.sub-row:first-child { border-radius: 8px 8px 0 0; }
.sub-row:last-child { border-bottom: 1px solid #eef0f4; border-radius: 0 0 8px 8px; }
.sub-row:only-child { border-radius: 8px; }
.sub-row .sub-name { color: #6b7180; flex: 1; }
.sub-addwrap { margin-top: 8px; }
.sub-add { border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; padding: 6px 12px; font-size: 12.5px; color: #3a4050; font-family: inherit; font-weight: 600; }
.sub-add:hover { border-color: var(--accent); color: var(--accent); }
.sub-input { width: 100%; border: 1px solid var(--accent); border-radius: 7px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
.sub-addwrap { display: flex; gap: 6px; }
.fm-role { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 3px; }

/* 핀 고정 */
.pinbtn { opacity: .45; }
.pinbtn.on { opacity: 1; color: var(--accent) !important; }
.pin-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.pin-row { display: flex; align-items: center; gap: 8px; background: #fdf8ec; border: 1px solid #f3e8cd; border-radius: 8px; padding: 9px 12px; font-size: 13px; cursor: pointer; }
.pin-row:hover { background: #faf1dd; }
.pin-row .pin-ico { font-size: 12px; }
.fcard.pinned { border-color: #f0d9a8; }
.fcard.flash { box-shadow: 0 0 0 3px var(--tint, #fdecea); transition: box-shadow .3s; }

/* 댓글 탭 (전체 N / 댓글 N) */
.cmt-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.ct-chip { font-size: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 3px 10px; color: var(--muted); }
.ct-chip.on { background: #2b3040; color: #fff; border-color: #2b3040; font-weight: 700; }

/* @멘션 */
.mention { color: #2563eb; font-weight: 700; background: #eff4ff; border-radius: 4px; padding: 0 3px; }
.mn-pop { position: fixed; z-index: 80; width: 240px; max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.mn-opt { display: flex; align-items: center; gap: 9px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.mn-opt.sel, .mn-opt:hover { background: #f3f4f8; }

/* 구성원 선택 팝업 (검색 + 리스트) */
.mb-pop { position: fixed; z-index: 70; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.16); overflow: hidden; }
.mb-search { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mb-search input { flex: 1; border: 0; outline: none; font-size: 13px; font-family: inherit; }
.mb-list { max-height: 300px; overflow-y: auto; }
.mb-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; font-size: 13.5px; }
.mb-opt:hover, .mb-opt.sel { background: #f7f8fa; }
.mb-opt .avatar-sm { width: 32px; height: 32px; }
.mb-info { flex: 1; line-height: 1.3; }
.mb-info span { display: block; font-size: 11px; color: var(--muted); }
.mb-check { color: var(--accent); font-weight: 700; }

/* 컴포저 트리거 바 */
.composer-fake { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; color: var(--muted); font-size: 13.5px; cursor: text; border-top: 1px solid #f0f1f4; }
.composer-fake:hover { background: #fafbfc; }

/* 게시물 작성 모달 */
.cm-head { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 4px; }
.cm-head .cm-sep { color: #d7dae2; font-weight: 400; }
.cm-head .pdot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cm-proj { font-size: 13px; color: #3a4050; }
.cm-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 10px 0 4px; }
.cm-tab { border: 0; background: none; cursor: pointer; font-family: inherit; font-size: 13.5px; color: var(--muted); padding: 9px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cm-tab.active { color: var(--ink, #1f2430); font-weight: 700; border-bottom-color: var(--accent); }
.cm-title { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; font-size: 17px !important; padding: 12px 2px !important; font-weight: 600; }
.cm-title:focus { outline: none; border-bottom-color: var(--accent) !important; }
.cm-body { min-height: 110px; border: 0 !important; resize: vertical; padding: 10px 2px !important; font-size: 14px !important; }
.cm-body:focus { outline: none; }
.cm-foot { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 10px; }
.cm-ico { cursor: pointer; font-size: 16px; }
.cm-ico:hover { transform: scale(1.1); }
.cm-foot .cf-vis select { width: auto; }

/* 템플릿 갤러리 */
.tpl-gallery { border: 1px solid var(--line); border-radius: 10px; max-height: 220px; overflow-y: auto; padding: 6px; margin-top: 4px; }
.tpl-cat { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 8px 8px 4px; }
.tpl-card { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; border: 1px solid transparent; }
.tpl-card:hover { background: #f7f8fa; }
.tpl-card.sel { border-color: var(--accent); background: var(--tint, #fdecea); }
.tpl-card .pdot { width: 12px; height: 12px; border-radius: 4px; flex: 0 0 auto; }
.tpl-card b { flex: 1; }
.tpl-card .muted { font-size: 11.5px; }
.tpl-ico { font-size: 14px; }

/* 업무/하위업무 상세 패널 (우측 슬라이드오버) */
.detail-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 640px; max-width: 92vw; background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(20,24,40,.14); z-index: 40; overflow-y: auto; animation: dt-in .18s ease; }
@keyframes dt-in { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.detail-panel > div { padding: 18px 24px 30px; }
.dt-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.dt-crumb { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #3a4050; flex-wrap: wrap; }
.dt-crumb-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: 0 0 auto; }
.dt-gt { color: #b7bcc7; font-weight: 400; }
.detail-panel h3.dt-editable { cursor: pointer; }
.detail-panel h3.dt-editable:hover { text-decoration: underline; text-decoration-color: #d7dae2; }
.dt-title-input { flex: 1; border: 1px solid var(--accent); border-radius: 8px; padding: 7px 10px; font-size: 17px; font-weight: 700; font-family: inherit; }
.sub-row.clickable { cursor: pointer; }
.sub-row.clickable:hover { background: #fafbfc; }
.sub-row.clickable:hover .sub-name { color: #1f2430; }
.fcard h3.clickable { cursor: pointer; }
.fcard h3.clickable:hover { text-decoration: underline; text-decoration-color: #d7dae2; }

/* 게시물 ⋮ 메뉴 · 수정 모달 하위업무 */
.pmenu-pop .st-opt { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.pmenu-pop .st-opt.danger:hover { color: #ef4444; }
.sub-delall { float: right; font-size: 11.5px; color: var(--muted); cursor: pointer; font-weight: 400; }
.sub-delall:hover { color: #ef4444; text-decoration: underline; }
.sub-name.editable { cursor: pointer; }
.sub-name.editable:hover { text-decoration: underline; text-decoration-color: #d7dae2; color: #1f2430; }

/* 하위업무 행 ⋮ */
.sub-dots { opacity: .35; font-size: 14px; padding: 2px 6px; flex: 0 0 auto; }
.sub-row:hover .sub-dots { opacity: 1; }

/* 할일 체크박스 투두리스트 */
.todo-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; }
.todo-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.todo-item:hover { background: #f7f8fa; }
.todo-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex: 0 0 auto; }
.todo-item.done span { color: var(--muted); text-decoration: line-through; }
.todo-progress { font-size: 11.5px; color: var(--muted); padding: 4px 10px 0; }
/* 작성 모달 할일 에디터 */
.todo-editor { margin: 6px 0; }
.todo-edit-list { display: flex; flex-direction: column; margin-bottom: 8px; }
.todo-edit-row { display: flex; align-items: center; gap: 9px; border: 1px solid #eef0f4; border-bottom: 0; padding: 8px 12px; font-size: 13.5px; }
.todo-edit-row:first-child { border-radius: 8px 8px 0 0; }
.todo-edit-row:last-child { border-bottom: 1px solid #eef0f4; border-radius: 0 0 8px 8px; }
.todo-edit-row:only-child { border-radius: 8px; }
.todo-box { cursor: pointer; font-size: 15px; color: #b7bcc7; }
.todo-box.on { color: var(--accent); }
.todo-text { flex: 1; cursor: pointer; }
.todo-text.done { color: var(--muted); text-decoration: line-through; }
.todo-text:hover { text-decoration: underline; text-decoration-color: #d7dae2; }

/* 수정(연필) 아이콘 = 코랄 키컬러로 강조 */
.iconbtn.edit-pen { color: var(--accent); opacity: 1; font-size: 17px; font-weight: 700; }
.iconbtn.edit-pen:hover { background: var(--tint, #fdecea); }
.st-opt.edit-pen { color: var(--accent); font-weight: 700; }
.st-opt.edit-pen:hover { background: var(--tint, #fdecea); }

/* 본문 더보기/접기 */
.fbody.clamped { max-height: 132px; overflow: hidden; position: relative; }
.fbody.clamped::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); }
.body-more { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent); cursor: pointer; margin: 4px 0 2px; border: 1px solid var(--tint, #fdecea); background: var(--tint, #fdecea); border-radius: 20px; padding: 3px 12px; }
.body-more:hover { filter: brightness(.97); }
