/* E-MA 지시 사이트 — LINE Design System(LDSG) 시각 언어 적용
   색: LINE Green + Black + 11단 그레이 / 상태: opacity(Hover 70%, Pressed 50%)
   라운드: 5px(버튼) · 7px(카드) · 12px(팝업) / 그림자: 배경별 분리 */
@font-face { font-family: "LINE Seed KR"; font-weight: 400; font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_11-01@1.0/LINESeedKR-Rg.woff2") format("woff2"); }
@font-face { font-family: "LINE Seed KR"; font-weight: 700; font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_11-01@1.0/LINESeedKR-Bd.woff2") format("woff2"); }

:root {
  /* Messenger Primary Palette / Theme Color */
  --primary: #06c755;        /* ldsg-color-linegreen */
  --primary-alt: #04a647;    /* ldsg-color-brand-primary-alt */
  --secondary: #1e2742;      /* ldsg-color-brand-secondary (linenavy) */
  --positive: #06c755;       /* ldsg-color-role-positive */
  --negative: #e8332e;       /* ldsg-color-role-negative */
  --link: #2c7dfa;           /* ldsg-color-role-link */
  --disabled: #e4e4e4;       /* ldsg-color-role-disabled */
  --black: #000000;
  --white: #ffffff;
  /* Gray scale */
  --gray-100: #fcfcfc;
  --gray-150: #f5f5f5;
  --gray-200: #efefef;
  --gray-300: #dfdfdf;
  --gray-350: #c8c8c8;
  --gray-400: #b7b7b7;
  --gray-500: #949494;
  --gray-600: #777777;
  --gray-700: #555555;
  --gray-800: #303030;
  --gray-900: #111111;

  /* 역할별 연결 */
  --bg: var(--gray-150);
  --surface: var(--white);
  --fill: var(--gray-150);
  --text: var(--black);
  --text-2: var(--gray-700);
  --text-3: var(--gray-500);
  --line: var(--gray-300);
  --line-soft: var(--gray-150);
  --placeholder: var(--gray-350);
  --on-primary: var(--white);

  /* Elevation (배경별) */
  --shadow-white-100: 0 0 2px rgb(0 0 0 / .07), 0 1px 2px rgb(0 0 0 / .07);
  --shadow-white-200: 0 1px 6px rgb(0 0 0 / .12);
  --shadow-white-300: 0 1px 20px rgb(0 0 0 / .07);
  --shadow-gray-100: 0 0 1px rgb(0 0 0 / .05), 0 1px 1px rgb(0 0 0 / .05);
  --shadow-gray-200: 0 1px 4px rgb(0 0 0 / .06);
  --shadow-gray-300: 0 1px 15px rgb(0 0 0 / .04);

  /* Rounded */
  --r-100: 3px;
  --r-200: 5px;
  --r-300: 7px;
  --r-400: 12px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

/* LDSG에는 다크 모드가 없어, 같은 그레이 단계를 뒤집어 씁니다 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--gray-900);
    --surface: #1e1e1e;
    --fill: var(--gray-800);
    --text: var(--gray-100);
    --text-2: var(--gray-400);
    --text-3: var(--gray-500);
    --line: var(--gray-700);
    --line-soft: var(--gray-800);
    --placeholder: var(--gray-600);
    --disabled: var(--gray-700);
    --shadow-gray-100: none;
    --shadow-gray-200: none;
    --shadow-gray-300: none;
    --shadow-white-200: 0 1px 6px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "LINE Seed KR", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
::selection { background: rgb(6 199 85 / .2); }
.icon { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 24px; height: 24px; }
.icon.xl { width: 40px; height: 40px; stroke-width: 1.4; }

/* 상태: opacity 기반 (Hover는 PC 전용) */
@media (hover: hover) {
  .btn:hover, .chip-btn:hover, .tab:hover, .nav a:hover, .stat:hover, .staff-btn:hover,
  .more:hover, .back:hover, .report-meta a:hover { opacity: .7; }
}
.btn:active, .chip-btn:active, .tab:active, .nav a:active, .stat:active, .staff-btn:active,
.item-head:active, .thread:active { opacity: .5; }

/* ───────── 상단 바 ───────── */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1040px; margin: 0 auto; height: 56px; padding: 0 16px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); }
.logo-mark {
  width: 28px; height: 28px; border-radius: var(--r-200); background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.logo-text { font-weight: 700; font-size: 18px; }
.nav { display: flex; gap: 4px; flex: 1; height: 100%; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav-soon {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 100%;
  padding: 0 12px; white-space: nowrap; font-size: 16px; color: var(--gray-600);
}
.nav a.active { color: var(--text); font-weight: 700; }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--text); }
.nav-soon { color: var(--disabled); cursor: default; }
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--negative); color: var(--white); font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center; line-height: 1;
}
.nav-badge[hidden] { display: none; }
.today { color: var(--text-3); font-size: 14px; white-space: nowrap; }

/* ───────── 페이지 ───────── */
.page { max-width: 760px; margin: 0 auto; padding: 40px 16px 96px; }
.page > * { animation: rise .25s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero { margin-bottom: 24px; }
.eyebrow { margin: 0 0 4px; font-size: 14px; color: var(--text-3); }
.hero h1 { margin: 0; font-size: 28px; line-height: 1.28; font-weight: 700; }
.hero .sub { margin: 8px 0 0; color: var(--text-2); font-size: 16px; }

.card { background: var(--surface); border-radius: var(--r-300); box-shadow: var(--shadow-gray-300); }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; }
.section-head h2 small { color: var(--text-3); font-weight: 400; font-size: 18px; margin-left: 6px; }

/* ───────── 입력 (Contained 타입으로 통일) ───────── */
.compose { padding: 24px 20px; }
.field { margin-bottom: 20px; }
.label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 700; color: var(--text); }
.label .opt { color: var(--text-3); font-weight: 400; font-size: 14px; }
.input {
  width: 100%; border: 1px solid transparent; border-radius: var(--r-200); background: var(--fill);
  padding: 12px 14px; font-size: 16px; line-height: 1.4; outline: none; transition: border-color .15s;
}
.input::placeholder { color: var(--placeholder); }
.input:focus { border-color: var(--text); background: var(--surface); }
.input-lg { font-size: 18px; padding: 14px; }
textarea.input { min-height: 128px; resize: vertical; }
.help { margin: 6px 0 0; font-size: 14px; color: var(--text-3); }
.compose-foot { display: flex; gap: 12px; align-items: flex-end; }
.compose-foot .date-field { width: 200px; }
.compose-foot .btn { flex: 1; }

/* ───────── Chip (여러 개 선택할 때만) ───────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  background: var(--surface); color: var(--text); font-size: 14px;
}
.chip-btn .icon { width: 16px; height: 16px; }
.chip-btn.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }

/* ───────── Tab (하나만 고를 때) ───────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 12px; border: 0; background: none; color: var(--gray-600); font-size: 15px; white-space: nowrap;
}
.tab .count { font-size: 13px; color: var(--text-3); }
.tab.on { color: var(--text); font-weight: 700; }
.tab.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--text); }
.tab.zero { color: var(--disabled); }
.tabs.fixed { display: grid; grid-template-columns: repeat(2, 1fr); }
.tabs.fixed .tab { justify-content: center; }

/* ───────── Action Button ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--r-200); padding: 0 16px; height: 44px;
  font-size: 16px; font-weight: 700; white-space: nowrap; transition: opacity .15s;
}
.btn:disabled { background: var(--disabled) !important; border-color: var(--disabled) !important; color: var(--white) !important; cursor: default; opacity: 1; }
.btn-lg { height: 52px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 14px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-danger { background: var(--negative); color: var(--white); }
.btn-soft { background: var(--surface); border-color: var(--line); color: var(--text); }

/* ───────── 현황 ───────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.stat {
  text-align: left; border: 2px solid transparent; border-radius: var(--r-300); padding: 16px;
  background: var(--surface); box-shadow: var(--shadow-gray-300);
}
.stat .stat-label { display: block; font-size: 14px; color: var(--text-2); }
.stat .stat-num { display: block; margin-top: 2px; font-size: 28px; line-height: 1.28; font-weight: 700; }
.stat .stat-num small { font-size: 14px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.stat.on { border-color: var(--text); }
.stat.waiting .stat-num { color: var(--primary-alt); }
.stat .stat-sub { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
/* 설명 줄의 종류 하나는 한 묶음: 묶음 안에서는 줄바꿈하지 않고, 넘치면 묶음 단위로 다음 줄 */
.stat .stat-sub-item { white-space: nowrap; }
.stat .stat-sub-item + .stat-sub-item::before { content: " · "; white-space: pre; }
@media (max-width: 720px) {
  .stat .stat-sub-item { display: block; }
  .stat .stat-sub-item + .stat-sub-item::before { content: none; }
}
.stat.attention.has .stat-num { color: var(--negative); }
.stat.attention.none .stat-num { color: var(--text-2); font-size: 22px; line-height: 1.7; }
/* 숫자가 바뀐 타일을 약 0.3초 살짝 강조 */
.stat.stat-flash { animation: stat-flash .3s ease-out; }
@keyframes stat-flash { from { opacity: .35; transform: scale(.98); } to { opacity: 1; transform: none; } }

/* ───────── 검색 ───────── */
.search { position: relative; width: 240px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 18px; height: 18px; }
.search .input { padding: 9px 12px 9px 38px; font-size: 15px; background: var(--surface); border-color: var(--line); }
.search .input:focus { border-color: var(--text); }

/* ───────── 지시 목록 ───────── */
.list { padding: 0; overflow: hidden; }
.item + .item { border-top: 1px solid var(--line-soft); }
.item.open { background: var(--surface); }
.item-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  border: 0; background: none; text-align: left; padding: 14px 16px;
}
.item-icon {
  position: relative; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--fill); color: var(--text);
}
.item-icon-more {
  position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--gray-800); color: var(--white); box-shadow: 0 0 0 2px var(--surface);
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.item-main { flex: 1; min-width: 0; }
.item-title { display: block; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { margin-top: 2px; font-size: 14px; color: var(--text-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dotsep::before { content: "·"; margin-right: 6px; }
.chev { color: var(--gray-400); transition: transform .2s var(--ease); flex-shrink: 0; }
.item.open .chev { transform: rotate(90deg); }
.item-detail { padding: 0 16px 20px 68px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.detail-content {
  margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r-200);
  background: var(--fill); white-space: pre-wrap; font-size: 15px;
}
.timeline { list-style: none; margin: 0 0 16px; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 20px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: -4px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--gray-400); }
.timeline .dot.approved, .timeline .dot.done, .timeline .dot.review_pass { background: var(--positive); }
.timeline .dot.rejected, .timeline .dot.review_reject, .timeline .dot.error { background: var(--negative); }
.timeline .dot.report_submitted, .timeline .dot.question { background: var(--secondary); }
.timeline .dot.task_created { background: var(--text); }
.timeline p { margin: 0; }
.timeline time { color: var(--text-3); font-size: 12px; }
.detail-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--text-3); font-size: 14px; }

/* ───────── 상태 배지 ───────── */
.pill {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 2px 8px; border-radius: var(--r-100); font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--fill); color: var(--link);
}
.pill.orange { background: var(--secondary); color: var(--white); }  /* 대표님 확인 필요 */
.pill.green { color: var(--primary-alt); }
.pill.red { color: var(--negative); }
.pill.gray { color: var(--text-2); font-weight: 400; }
.pill.auto { background: transparent; border: 1px solid var(--line); padding: 1px 7px; color: var(--text-2); font-weight: 400; }  /* 사이트가 자동으로 닫음 */
.pill .icon { width: 14px; height: 14px; }
.due { font-weight: 700; }
.due.soon { color: var(--text); }
.due.over { color: var(--negative); }

/* ───────── 빈 화면 ───────── */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); font-size: 14px; }
.empty .empty-icon { color: var(--gray-400); margin-bottom: 12px; display: flex; justify-content: center; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ───────── 보고·승인 ───────── */
.report { padding: 24px 20px; margin-bottom: 12px; }
.report-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.report-top .spacer { flex: 1; }
.report-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; }
.report-meta { margin: 6px 0 20px; font-size: 14px; color: var(--text-3); }
.report-meta a { color: var(--link); }
.report-body { margin: 0; border-top: 1px solid var(--line-soft); }
.report-body > div { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.report-body dt { font-size: 14px; color: var(--text-3); margin-bottom: 4px; }
.report-body dd { margin: 0; white-space: pre-wrap; font-size: 16px; }
.report-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 20px; }
.decision { margin-top: 20px; padding: 14px 16px; border-radius: var(--r-200); font-size: 14px; background: var(--fill); }
.decision b { display: block; font-size: 15px; }
.decision.approved b { color: var(--primary-alt); }
.decision.rejected b { color: var(--negative); }
.decision span { color: var(--text-2); }

/* ───────── Popup (너비 288px 고정) ───────── */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .4);
  display: grid; place-items: center; padding: 16px; animation: fade .2s var(--ease);
}
.sheet {
  width: 288px; max-height: 504px; overflow-y: auto; padding: 24px 20px 20px;
  background: var(--surface); border-radius: var(--r-400); animation: pop .25s var(--ease);
}
.sheet h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.33; font-weight: 700; }
.sheet p { margin: 0 0 20px; color: var(--text-3); font-size: 14px; }
.sheet textarea { min-height: 104px; margin-bottom: 4px; font-size: 15px; }
.sheet .error { color: var(--negative); font-size: 13px; min-height: 18px; margin: 0 0 12px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .modal-asked { margin: 0 0 16px; padding: 12px; background: var(--bg); border-radius: var(--r-200); font-size: 13px; }
.sheet .modal-asked > b { display: block; margin-bottom: 8px; color: var(--text); }
.sheet .modal-asked p { margin: 0 0 8px; color: var(--text-2); font-size: 13px; }
.sheet .modal-asked p:last-child { margin-bottom: 0; }
.shake { animation: shake .3s; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ───────── Toast (검정 80%) ───────── */
.toast {
  position: fixed; left: 50%; bottom: 16px; z-index: 60; max-width: calc(100% - 32px);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: var(--r-400); font-size: 16px;
  background: rgb(0 0 0 / .8); color: var(--gray-100);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--negative); color: var(--white); }

.spinner { display: grid; place-items: center; padding: 80px 0; }
.spinner::after {
  content: ""; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── AI 진행 표시 ───────── */
.working-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-alt); font-weight: 700; }
.working-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.direct-tag {
  display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: var(--r-100); vertical-align: 2px;
  border: 1px solid var(--line); color: var(--text-2); font-size: 12px; font-weight: 400;
}
.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding: 12px 14px; border-radius: var(--r-200);
  background: var(--fill); font-size: 14px;
}
.notice.red { color: var(--negative); }
.notice.orange span b { color: var(--secondary); }
.notice b { margin-right: 6px; }
.notice .path { font-weight: 700; word-break: break-all; color: var(--text); }

/* ───────── 메신저 ───────── */
.page.page-wide { max-width: 1120px; padding-top: 16px; padding-bottom: 16px; }
.messenger { display: grid; grid-template-columns: 320px 1fr; gap: 12px; height: calc(100vh - 57px - 32px); min-height: 480px; }
.threads { display: flex; flex-direction: column; overflow: hidden; }
.threads-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.threads-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.thread-list { flex: 1; overflow-y: auto; }
.thread-none { padding: 20px; text-align: center; }
.thread { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; }
@media (hover: hover) { .thread:hover { background: var(--gray-100); } }
.thread.on { background: var(--fill); }
.thread .item-icon { width: 40px; height: 40px; }
.thread.on .item-icon { background: var(--surface); }
.thread-main { flex: 1; min-width: 0; }
.thread-top { display: flex; justify-content: space-between; gap: 8px; }
.thread-top b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-top time { flex-shrink: 0; font-size: 12px; color: var(--text-3); }
.thread-preview { display: block; margin-top: 1px; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-flag { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--link); }
.thread-flag.orange { background: var(--primary); }
.thread-flag.red { background: var(--negative); }
.usage { padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--text-3); }
.usage b { color: var(--text-2); }

.chat { display: flex; flex-direction: column; overflow: hidden; }
.chat-empty { margin: auto; text-align: center; color: var(--text-3); padding: 40px; font-size: 14px; }
.chat-empty .empty-icon { color: var(--gray-400); margin-bottom: 12px; display: flex; justify-content: center; }
.chat-empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.chat-head .back { display: none; font-size: 28px; line-height: 1; color: var(--text); padding: 0 6px 4px 0; }
.chat-title { flex: 1; min-width: 0; }
.chat-title h3 { margin: 0; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title p { margin: 2px 0 0; font-size: 13px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--gray-100); }

.avatar {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--c); color: var(--white); font-size: 14px; font-weight: 700;
}
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.msg { display: flex; gap: 8px; max-width: 84%; }
.msg-body { min-width: 0; }
.msg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; color: var(--text-3); }
.msg-meta b { color: var(--text); font-size: 14px; }
.kind { padding: 0 6px; border-radius: var(--r-100); border: 1px solid var(--line); color: var(--text-2); font-size: 11px; line-height: 18px; }
.kind.kind-rework, .kind.kind-ceo_reject, .kind.kind-error { color: var(--negative); border-color: currentColor; }
.kind.kind-review_pass, .kind.kind-approve, .kind.kind-done { color: var(--primary-alt); border-color: currentColor; }
.kind.kind-question, .kind.kind-report { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.bubble {
  padding: 10px 14px; border-radius: 3px var(--r-400) var(--r-400) var(--r-400);
  background: var(--surface); box-shadow: var(--shadow-white-100);
  white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.5;
}
.bubble.clamp { max-height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.more { margin-top: 4px; border: 0; background: none; color: var(--link); font-size: 13px; padding: 0; }
.msg.mine { align-self: flex-end; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg.mine .bubble { background: var(--primary); color: var(--on-primary); border-radius: var(--r-400) 3px var(--r-400) var(--r-400); box-shadow: none; }
.msg-system { align-self: center; max-width: 80%; text-align: center; font-size: 12px; color: var(--text-3); }
.msg-system p { margin: 0 0 2px; padding: 6px 12px; border-radius: 999px; background: rgb(0 0 0 / .05); color: var(--text-2); white-space: pre-wrap; }
.msg-system.red p { color: var(--negative); }
.typing .bubble { color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gray-400); animation: bounce 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.chat-composer { border-top: 1px solid var(--line-soft); padding: 12px 16px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; resize: vertical; }
.composer-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-3); }
.composer-note.red { color: var(--negative); }
.composer-note.orange { color: var(--text); font-weight: 700; }

.direct-form { padding: 20px; overflow-y: auto; }
.direct-form textarea { min-height: 150px; margin-bottom: 16px; }
.direct-form .btn { width: 100%; }
.staff-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.staff-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px;
  border: 1px solid var(--line); border-radius: var(--r-300); background: var(--surface);
}
.staff-btn.on { border: 2px solid var(--primary); padding: 13px 5px; }
.staff-btn b { font-size: 15px; margin-top: 6px; }
.staff-btn small { color: var(--text-3); font-size: 12px; }

.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.foot-actions { display: inline-flex; gap: 8px; }
.report-body dd.requests p { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; }
.report-body dd.requests p:last-child { margin-bottom: 0; }
.red { color: var(--negative); }

/* ───────── 조직도 ───────── */
.org { display: flex; flex-direction: column; align-items: center; }
.org-row { display: flex; justify-content: center; }
.org-line { width: 1px; height: 24px; background: var(--line); }
.org-node.ceo {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 24px;
  background: var(--surface); border-radius: var(--r-300); box-shadow: var(--shadow-gray-300);
}
.org-node small { color: var(--text-3); font-size: 12px; }
.org-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: 100%;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.org-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px 14px; width: 100%; min-width: 150px;
  border: 2px solid transparent; border-radius: var(--r-300); background: var(--surface); box-shadow: var(--shadow-gray-300);
  font: inherit; color: inherit;
}
@media (hover: hover) { .org-card:hover { opacity: .7; } }
.org-card:active { opacity: .5; }
.org-card.on { border-color: var(--primary); }
.org-card b { margin-top: 6px; font-size: 16px; }
.org-card small { color: var(--text-3); font-size: 13px; }
.org-stats { margin-top: 6px; font-size: 12px; color: var(--text-2); }
.org-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 6px; min-height: 20px; }
.org-detail { margin-top: 20px; padding: 24px 20px; }
.org-detail-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.org-detail-head h2 { margin: 0; font-size: 22px; }
.org-detail-head h2 small { font-size: 15px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.org-detail-head p { margin: 2px 0 0; }
.org-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.org-facts div { padding: 12px; border-radius: var(--r-200); background: var(--fill); }
.org-facts span { display: block; font-size: 12px; color: var(--text-3); }
.org-facts b { font-size: 16px; }
.org-detail h3 { margin: 24px 0 8px; font-size: 16px; }
.org-detail h3 small { font-weight: 400; }
.org-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.org-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.org-list time { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.org-list time > span, .org-list time > a { white-space: nowrap; }
.org-actions { margin-top: 20px; }

/* ───────── 업무 기록 ───────── */
.calendar { padding: 16px 16px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-w { text-align: center; font-size: 12px; color: var(--text-3); padding: 4px 0; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px; height: 52px; padding-top: 6px;
  border: 0; border-radius: var(--r-200); background: none; color: var(--text-3); font: inherit;
}
.cal-day.has { color: var(--text); }
.cal-day small { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.cal-day.today span { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cal-day.on { background: var(--primary); color: var(--on-primary); }
.cal-day.on small { background: rgb(255 255 255 / .25); color: var(--on-primary); }
@media (hover: hover) { .cal-day:hover { opacity: .7; } }
.day-list { padding: 4px 0; }
.day-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.day-row:last-child { border-bottom: 0; }
.day-row > time { width: 64px; flex-shrink: 0; font-size: 12px; color: var(--text-3); padding-top: 3px; }
.day-main { flex: 1; min-width: 0; }
.day-main p { margin: 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.day-main .day-text { display: block; margin-top: 2px; color: var(--text-2); }
.day-task { display: inline-block; margin-top: 4px; font-size: 12px; }
.backup-card { margin-top: 40px; padding: 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.backup-card p { margin: 4px 0 0; }
.backup-info { font-size: 13px; color: var(--text-2); word-break: break-all; }

/* ───────── 홈 ───────── */
.hero-tag { vertical-align: 6px; margin-left: 8px; font-size: 13px; }
a.stat { color: inherit; display: block; }
.home-grid { display: grid; grid-template-columns: 1fr 300px; gap: 12px; margin-top: 12px; align-items: start; }
.page:has(.home-grid) { max-width: 1040px; }
.calendar.big { padding: 16px; }
.cal-head-right { display: inline-flex; gap: 6px; }
.cal-note { margin: 10px 0 0; font-size: 12px; }
.cal-w.sun, .mcal-num.sun { color: var(--negative); }
.cal-w.sat, .mcal-num.sat { color: var(--link); }
.mcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line-soft); }
.mcal-grid .cal-w { border-bottom: 1px solid var(--line-soft); }
.mcal-day {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 84px; padding: 4px;
  border: 0; border-bottom: 1px solid var(--line-soft); background: none; text-align: left; font: inherit; color: var(--text); overflow: hidden;
}
@media (hover: hover) { .mcal-day:hover { background: var(--gray-100); } }
.mcal-day.on { background: var(--fill); box-shadow: inset 0 0 0 2px var(--primary); border-radius: var(--r-200); }
.mcal-num { font-size: 13px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.mcal-day.today .mcal-num { background: var(--text); color: var(--surface); font-weight: 700; }
.mcal-holiday { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcal-holiday.off { color: var(--negative); }
.mcal-item {
  font-size: 11px; padding: 1px 4px; border-radius: var(--r-100); background: rgb(6 199 85 / .12); color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mcal-more { font-size: 11px; color: var(--text-3); }
.home-side { display: flex; flex-direction: column; gap: 12px; }
.day-panel, .brief-panel { padding: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel-head b { font-size: 16px; }
.panel-head a { font-size: 13px; }
.sched-list { list-style: none; margin: 0 0 12px; padding: 0; }
.sched-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.sched-time { width: 44px; flex-shrink: 0; font-size: 12px; color: var(--text-2); line-height: 1.4; }
.sched-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sched-main b { font-size: 14px; }
.sched-main small { font-size: 12px; color: var(--text-3); }
.sched-main .sched-remind { color: var(--primary-alt); }
.sched-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.sched-form .form-title { font-size: 14px; }
.sched-form .input { padding: 9px 10px; font-size: 14px; }
.sched-form textarea.input { min-height: 56px; }
.sched-row { display: flex; gap: 8px; align-items: center; }
.sched-row[hidden] { display: none; }
.check { display: inline-flex; gap: 4px; align-items: center; font-size: 14px; white-space: nowrap; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }
.sched-actions { display: flex; gap: 6px; justify-content: flex-end; }
.sched-actions .btn { height: 36px; font-size: 14px; }
.brief { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.brief:last-of-type { border-bottom: 0; }
.brief p { margin: 4px 0 0; font-size: 13px; }
.brief time { font-size: 11px; color: var(--text-3); }
.notify-btn { width: 100%; margin-top: 10px; }
.thread.pinned { border-bottom: 1px solid var(--line-soft); }
.kind.kind-briefing, .kind.kind-reminder { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ───────── 첨부 ───────── */
.attach { border: 1px dashed var(--line); border-radius: var(--r-200); padding: 4px; }
.attach.drag { border-color: var(--primary); background: rgb(6 199 85 / .06); }
.attach-drop { display: flex; align-items: center; gap: 8px; padding: 10px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.attach-drop small { color: var(--text-3); }
@media (hover: hover) { .attach-drop:hover { opacity: .7; } }
.attach-list { list-style: none; margin: 0; padding: 0; }
.attach-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 14px; border-top: 1px solid var(--line-soft); }
.attach-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-list small { color: var(--text-3); }
.attach-list button { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--text-3); padding: 0 4px; }
.attach-files { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px; }
.attach-files a {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: var(--r-200); font-size: 13px; color: var(--text); background: var(--surface);
}
.attach-files .icon { width: 16px; height: 16px; }
.attach-files small { color: var(--text-3); }

/* 직원 결과물 파일 목록 (보고서 카드·처리 완료·업무 상세) — 다온 디자인 명세 2026-10-22 */
.report-body dd.outputs { white-space: normal; }
.out-wrap { margin: 0 0 16px; }
.out-title { margin: 0 0 4px; font-size: 14px; color: var(--text-3); }
.out-cap { margin: 0 0 8px; font-size: 12px; color: var(--text-3); }
.out-files { display: flex; flex-direction: column; gap: 12px; }
.out-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.out-head small { font-size: 12px; color: var(--text-3); }
.out-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-200); background: var(--surface); overflow: hidden; }
.out-list li + li { border-top: 1px solid var(--line-soft); }
.out-file { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; color: var(--text); text-decoration: none; }
.pill.out-type { min-width: 44px; justify-content: center; font-weight: 700; }
.out-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.out-name { font-size: 14px; line-height: 1.4; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out-size { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.out-act { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.out-act .icon { width: 16px; height: 16px; }
.out-more {
  display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 44px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: var(--r-200); background: var(--surface); font: inherit; font-size: 14px; color: var(--text-2); cursor: pointer;
}
.out-more .icon { width: 16px; height: 16px; }
.out-file:active, .out-more:active { opacity: .5; }
@media (hover: hover) { .out-file:hover, .out-more:hover { opacity: .7; } }
@media (max-width: 720px) {
  .out-file { min-height: 48px; }
  .out-text { flex-direction: column; gap: 0; align-items: stretch; }
  .out-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
  .out-act span { display: none; }
}

/* ───────── 메일 ───────── */
.report-body dd.mails { display: flex; flex-direction: column; gap: 6px; }
.mail-card { border: 1px solid var(--line); border-radius: var(--r-200); background: var(--surface); }
.mail-card.warn { border-color: var(--negative); }
.mail-card summary { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; cursor: pointer; list-style: none; }
.mail-card summary::-webkit-details-marker { display: none; }
.mail-card summary b { font-size: 15px; }
.mail-card summary .red { font-size: 13px; }
.mail-to { font-size: 13px; color: var(--text-3); }
.mail-body { margin: 0 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); white-space: pre-wrap; font-size: 14px; }
.mail-card p { margin: 0 12px 8px; font-size: 12px; }
.mail-status { margin: -4px 0 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mail-status p { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.timeline .dot.mail_sent { background: var(--positive); }
.timeline .dot.mail_failed { background: var(--negative); }

/* ───────── 설정 ───────── */
.settings-card { padding: 20px; margin-bottom: 12px; }
.settings-card > p { margin: 0 0 12px; }
.settings-status { font-size: 14px; color: var(--text-2); padding: 12px 14px; border-radius: var(--r-200); background: var(--fill); }
.settings-form { display: flex; flex-direction: column; }
.settings-form .label { margin-top: 12px; font-size: 14px; }
.settings-form .help { margin-bottom: 0; }
.settings-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.step-box { padding: 14px 16px; border-radius: var(--r-200); background: var(--fill); margin-bottom: 8px; }
.step-box.done { display: flex; gap: 8px; align-items: center; background: none; border: 1px solid var(--line-soft); }
.step-box > b { font-size: 15px; }
.step-box p { margin: 4px 0 10px; font-size: 13px; }
.step-box.settings-form .label { margin-top: 0; }
.file-btn { cursor: pointer; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row code { flex: 1; min-width: 0; padding: 8px 10px; border-radius: var(--r-200); background: var(--surface); border: 1px solid var(--line); font-size: 13px; word-break: break-all; }
.sched-main .sched-sync { color: var(--link); }
.mcal-item.ext { background: rgb(44 125 250 / .12); }
.ext-tag { flex-shrink: 0; padding: 2px 6px; border-radius: var(--r-100); border: 1px solid var(--line); font-size: 11px; color: var(--link); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-box { margin-top: 16px; }
.import-box .org-list { margin-bottom: 10px; background: var(--surface); border-radius: var(--r-200); padding: 0 12px; }
.import-box .copy-row .input { flex: 1; min-width: 200px; }
.pair-box { padding: 16px; border-radius: var(--r-200); background: var(--fill); text-align: center; }
.pair-box p { margin: 0 0 10px; font-size: 14px; }
.pair-code { font-size: 26px !important; font-weight: 700; letter-spacing: 1px; margin: 4px 0 14px !important; }
.pair-box .muted { margin: 10px 0 0; font-size: 12px; }
.switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: var(--gray-300); transition: background .2s; }
.switch span::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); box-shadow: var(--shadow-white-200); transition: transform .2s var(--ease);
}
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ───────── 좁은 화면 ───────── */
@media (max-width: 720px) {
  .topbar-inner { gap: 8px; }
  .logo-text, .today { display: none; }
  .page { padding: 24px 16px 80px; }
  .compose-foot { flex-direction: column; align-items: stretch; }
  .compose-foot .date-field { width: 100%; }
  .stats { gap: 8px; grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 12px; }
  .stat .stat-num { font-size: 22px; }
  .section-head { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }
  .item-detail { padding: 0 16px 16px; }
  .page.page-wide { padding: 0; }
  .messenger { grid-template-columns: 1fr; height: calc(100vh - 57px); gap: 0; }
  .messenger .card { border-radius: 0; box-shadow: none; }
  .messenger.has-chat .threads { display: none; }
  .messenger:not(.has-chat) .chat { display: none; }
  .chat-head .back { display: block; }
  .msg { max-width: 100%; }
  .staff-pick { grid-template-columns: repeat(3, 1fr); }
  .notice { flex-direction: column; align-items: flex-start; }
  .report-actions { grid-template-columns: 1fr 1fr; }
  .org-grid { grid-template-columns: repeat(2, 1fr); }
  .org-card { min-width: 0; }
  .org-facts { grid-template-columns: repeat(2, 1fr); }
  .backup-card { flex-direction: column; align-items: stretch; }
  .day-row > time { width: 52px; }
  .home-grid { grid-template-columns: 1fr; }
  .mcal-day { min-height: 56px; }
  .mcal-item { display: none; }
  .mcal-day:has(.mcal-item)::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); margin: 2px auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 다른 컴퓨터에서 접속 */
.nav-logout { margin-left: 12px; flex: none; }
.nav-logout[hidden] { display: none; }
.settings-status .red { color: var(--negative); }

/* 조직도: 업무 원칙 정리 */
.org-list.principles { list-style: decimal; padding-left: 22px; }
.org-list.principles li { display: list-item; }
.org-list.principles li > span { display: inline; }
.org-list.principles li > .btn { float: right; margin-left: 12px; }
.org-list.principles li::after { content: ""; display: block; clear: both; }
.org-btns { display: flex; gap: 6px; flex: none; }
.org-actions.left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.org-actions.left .muted { font-size: 13px; }
.review-box { margin-top: 20px; padding: 16px; border-radius: var(--r-200); background: var(--fill); }
.review-box.pending { box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.review-box p { margin: 8px 0; }
details.from { margin-top: 4px; font-size: 13px; color: var(--text-2); }
details.from summary { cursor: pointer; color: var(--text-3); }
details.from small { display: block; margin-top: 2px; }
.org-archive { margin-top: 24px; }
.org-archive summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.org-archive h4 { margin: 16px 0 6px; font-size: 14px; color: var(--text-2); }
.model-tabs { margin-bottom: 4px; }
.model-tabs .tab { background: none; border: 0; font: inherit; cursor: pointer; white-space: nowrap; }
.model-help { margin: 4px 0 0; font-size: 13px; }

/* 시우의 사이트 개선 */
.section-title { margin: 24px 0 12px; font-size: 18px; }
.section-title small { font-size: 13px; font-weight: 400; margin-left: 6px; }
.dev-error { color: var(--negative); }
.diff-stat { margin: 8px 0 0; padding: 12px; overflow-x: auto; background: var(--fill); border-radius: var(--r-200); font-size: 12px; line-height: 1.5; white-space: pre; }
.dev-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }
.ref-rule { margin-top: 16px; }
.ref-rule-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ref-rule-row select { flex: 0 1 220px; }
.ref-rule-row input { flex: 1 1 240px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head .section-title { margin-right: auto; }
.dev-answer { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dev-answer textarea { min-height: 72px; }
.dev-answer .btn { align-self: flex-end; }
.org-actions .btn + .btn { margin-left: 8px; }

/* 보고·승인: 하나씩 결정 */
.steps { margin-top: 20px; padding: 16px; border-radius: var(--r-300); background: var(--fill); }
.steps-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.steps-head .muted { font-size: 13px; }
.step-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-200); background: var(--surface); }
.step.next { opacity: .5; }
.step.done .step-result { display: block; margin-top: 2px; font-size: 14px; color: var(--text-2); }
.step-no { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 12px; font-size: 13px; font-weight: 700; background: var(--gray-200); color: var(--text-2); }
.step.current .step-no { background: var(--primary); color: var(--on-primary); }
.step.done .step-no { background: var(--gray-200); color: var(--primary); }
.step.done .step-no svg { width: 14px; height: 14px; }
.step-body { flex: 1; min-width: 0; }
.step-body > p { margin: 6px 0; white-space: pre-wrap; }
.step-options { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.step-option { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-200); cursor: pointer; }
.step-option:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.step-option input { margin-top: 3px; accent-color: var(--primary); }
.step-note { font-size: 14px; color: var(--text-2); }
.step-note b { margin-right: 6px; color: var(--text); }
.step-memo { min-height: 56px; margin: 8px 0 0; }
.step .report-actions { margin-top: 12px; }
.auto-body { margin-top: 8px; white-space: pre-wrap; font-size: 14px; color: var(--text-2); }
.auto-settings { margin-top: 20px; padding: 16px; border-radius: var(--r-300); background: var(--fill); }
.auto-settings .panel-head { margin-bottom: 8px; }
.auto-jobs { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.auto-jobs li { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-200); background: var(--surface); }
.auto-jobs li span small { display: block; color: var(--text-3); font-size: 12px; }

/* 확인할 일 · 진행 현황 */
.attn-text { margin: 8px 0; white-space: pre-wrap; }
.attn-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.attn-mail .label { margin-top: 10px; }
.progress-row { display: flex; flex-direction: column; gap: 6px; padding: 16px; margin-bottom: 10px; color: inherit; text-decoration: none; }
.progress-row:hover { opacity: .85; }
.progress-row .muted { font-size: 13px; }
.progress-staff { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.progress-staff span { padding: 2px 8px; border-radius: 10px; background: var(--fill); }
.progress-staff span.done { color: var(--text-3); text-decoration: line-through; }
.progress-staff i { font-style: normal; color: var(--text-3); }
.public-allow { margin: 12px 0; padding: 12px 14px; border-radius: var(--r-200); background: var(--fill); font-size: 14px; line-height: 1.6; word-break: break-all; }

/* ───────── 매출 모니터링 (다온 시안 monitor_screen_draft_v1 · 1단계: 자료 상태) ───────── */
.page.page-monitor { max-width: 1040px; }  /* 표 때문에 기존 760px보다 넓게 */
.mon-card { padding: 16px 20px; }
.mon-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.mon-top b { color: var(--text); }
.mon-num { font-variant-numeric: tabular-nums; }
.mon-scroll { overflow-x: auto; }
.mon-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.mon-table th { text-align: left; font-weight: 400; font-size: 12px; color: var(--text-3); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mon-table td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.mon-table tr:last-child td { border-bottom: 0; }
.mon-table .r { text-align: right; }
.mon-table td.mon-num { white-space: nowrap; }
.mon-fname { font-weight: 700; }
.mon-kind, .mon-sub { font-size: 12px; color: var(--text-3); }
.mon-chg { font-size: 13px; color: var(--text-2); }
.mon-chg span { color: var(--text); }
.mon-off td, .mon-off .mon-fname { color: var(--text-3); }
.mon-badge { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--r-100); font-size: 12px; line-height: 18px; color: var(--text-2); white-space: nowrap; }
.mon-badge.ok { border-color: var(--primary); color: var(--primary-alt); }
.mon-badge.err { border-color: var(--negative); color: var(--negative); }
.mon-badge.none { color: var(--text-3); }
/* 골드: 부분월 표시 (다온 노트에서 골드를 쓰는 3곳 중 하나) */
.mon-partial { display: inline-block; padding: 0 6px; border: 1px solid #c8a24b; border-radius: var(--r-100); font-size: 12px; line-height: 18px; color: var(--text-2); }
.mon-notes { margin-top: 12px; }
.mon-notes .notice { margin-bottom: 8px; }
.mon-notes .notice:last-child { margin-bottom: 0; }
.mon-how { margin: 12px 0 0; font-size: 13px; color: var(--text-3); }
.mon-how + .mon-how { margin-top: 4px; }
.mon-how .path { color: var(--text-2); word-break: break-all; }
.mon-center { margin: -56px 0 24px; text-align: center; }
.mon-next { margin-top: 24px; }

/* 2단계: ② 기간 ③ 요약 ⑤ 카테고리 스캔 (시안 231~322행, 설계 노트 1·4번). 기존 변수만 씀, 골드는 부분월·펼친 행 윗선에만 */
.mon-sec { margin-top: 32px; }
#mon-board { transition: opacity .2s var(--ease); }
#mon-board.mon-busy { opacity: .5; }
.mon-wait { margin: 0; font-size: 14px; color: var(--text-2); }
.mon-card > .notice:last-child { margin-bottom: 0; }
.mon-period { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.mon-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-200); overflow: hidden; background: var(--surface); }
.mon-seg button { border: 0; background: var(--surface); padding: 7px 14px; font-size: 14px; color: var(--text-2); }
.mon-seg button + button { border-left: 1px solid var(--line); }
.mon-seg button.on { background: var(--text); color: var(--surface); font-weight: 700; }
.mon-pick { display: inline-flex; align-items: center; gap: 8px; }
.mon-pick select {
  border: 1px solid var(--line); border-radius: var(--r-200); padding: 7px 10px; background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums;
}
.mon-vs b { color: var(--text); }
.mon-hold, .mon-na { color: var(--text-3); font-weight: 400; }
.mon-help { margin: 8px 0 0; }
.mon-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mon-kpi { min-width: 0; padding: 16px; }
.mon-kpi-lab { font-size: 14px; color: var(--text-2); }
.mon-kpi-val { margin-top: 4px; font-size: 28px; font-weight: 700; line-height: 1.28; overflow-wrap: anywhere; }
.mon-kpi-val small { margin-left: 2px; font-size: 14px; font-weight: 400; color: var(--text-3); }
.mon-kpi-val .mon-na { font-size: 20px; }
.mon-kpi-yoy { margin-top: 4px; font-size: 14px; }
.mon-kpi-vs { color: var(--text-3); }
.mon-kpi-hint { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.mon-yoy { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mon-yoy.up { color: var(--primary-alt); }
.mon-yoy.down { color: var(--negative); }
.mon-yoy.na { color: var(--text-3); font-weight: 400; }
.mon-crumb { padding: 16px 16px 12px; font-size: 14px; color: var(--text-2); }
.mon-crumb b { color: var(--text); }
.mon-crumb-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--link); }
.mon-crumb-sub { color: var(--text-3); }
.mon-stable { width: 100%; border-collapse: collapse; }
.mon-stable th { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; font-weight: 400; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.mon-stable td { padding: 12px; border-bottom: 1px solid var(--line-soft); text-align: right; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mon-stable .l { text-align: left; white-space: normal; }
.mon-row { cursor: pointer; }
.mon-row:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.mon-row.open td { border-top: 2px solid #c8a24b; border-bottom-color: transparent; } /* 골드: 펼친 행 윗선 */
.mon-cat { display: flex; align-items: flex-start; gap: 8px; min-width: 160px; }
.mon-tg {
  flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-100); background: var(--surface); color: var(--text-2); font-size: 12px; line-height: 1;
}
.mon-tg-sp { flex: none; width: 20px; }
.mon-cname { font-weight: 700; }
.mon-cpath { font-size: 12px; color: var(--text-3); }
.mon-stable .mon-chev-td { width: 30px; padding-left: 0; color: var(--text-3); }
.mon-row.open .chev { transform: rotate(90deg); }
.mon-mix { display: flex; width: 96px; height: 8px; margin-left: auto; border-radius: 4px; overflow: hidden; background: var(--gray-200); }
.mon-mix.wide { width: 100%; margin: 10px 0 0; }
.mon-mix .nb, .mon-sw.nb { background: var(--gray-700); }
.mon-mix .pb, .mon-sw.pb { background: var(--link); }
.mon-mixlab { font-size: 12px; color: var(--text-3); text-align: right; }
.mon-detail > td { padding: 0; background: var(--fill); text-align: left; white-space: normal; }
.mon-detail-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; padding: 16px; }
.mon-box { min-width: 0; padding: 12px; border-radius: var(--r-200); background: var(--surface); }
.mon-box h4 { margin: 0 0 8px; font-size: 14px; }
.mon-bars-wrap { overflow-x: auto; }
.mon-bars { display: flex; gap: 4px; min-width: 456px; }
.mon-mb {
  flex: 1; min-width: 34px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 1px;
  border: 1px solid transparent; border-radius: var(--r-100); font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.mon-mb.partial { border-color: #c8a24b; } /* 골드: 부분월 표시 */
.mon-mb-v { color: var(--text-2); white-space: nowrap; }
.mon-mb-bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 84px; }
.mon-mb-bars i { flex: 1; border-radius: 2px 2px 0 0; }
.mon-mb-bars i.prev, .mon-sw.prev { background: var(--gray-350); }
.mon-mb-bars i.cur, .mon-sw.cur { background: var(--gray-800); }
.mon-mb-p { white-space: nowrap; }
.mon-mb-p.up { color: var(--primary-alt); font-weight: 700; }
.mon-mb-p.down { color: var(--negative); font-weight: 700; }
.mon-legend { margin: 8px 0 0; font-size: 12px; color: var(--text-3); }
.mon-foot { margin: 0; padding: 12px 16px; }
.mon-sw { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 8px; border-radius: 2px; vertical-align: -1px; }
.mon-legend .mon-sw:first-child, .mon-np .mon-sw { margin-left: 0; }
.mon-np { font-size: 14px; font-variant-numeric: tabular-nums; }
.mon-np + .mon-np { margin-top: 4px; }
.mon-dl { grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; font-size: 14px; }
.mon-dl dt { color: var(--text-3); }
.mon-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.mon-show-sm { display: none; }
.mon-stable .mon-empty-row { padding: 28px 16px; text-align: center; color: var(--text-3); }

/* 3단계: ④ 기획전 현황, ⑤ 필터 줄 (시안 107~118행, 283~289행). 기존 변수만 씀 */
#mon-camp { transition: opacity .2s var(--ease); }
#mon-camp.mon-busy { opacity: .5; }
.mon-camp-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.mon-camp-pad { padding: 16px 20px; }
.mon-empty { padding: 28px 16px; text-align: center; font-size: 14px; color: var(--text-3); }
.mon-stable td.mon-nowrap { white-space: nowrap; }
.mon-ctable .mon-cname { min-width: 160px; }
.mon-fon { color: var(--text); font-weight: 700; }
.mon-filters { display: grid; grid-template-columns: auto 1fr 1fr 1.4fr auto; gap: 12px; align-items: end; padding: 16px 16px 0; }
.mon-field { min-width: 0; }
.mon-flab { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-3); }
.mon-input { padding: 7px 12px; font-size: 14px; }
.mon-input:disabled { color: var(--text-3); cursor: default; }
.mon-fclear { height: 36px; }
.mon-fnotes { margin: 12px 16px 0; }
.mon-ac-wrap { position: relative; }
.mon-ac {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; max-height: 280px; overflow-y: auto;
  border-radius: var(--r-200); background: var(--surface); box-shadow: var(--shadow-white-200);
}
.mon-ac.on { display: block; }
.mon-ac-i { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.mon-ac-i .n { min-width: 0; overflow-wrap: anywhere; }
.mon-ac-i .s { flex: none; max-width: 55%; font-size: 12px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.mon-ac-i.sel { background: var(--fill); }
.mon-ac-i mark { background: none; color: inherit; font-weight: 700; }
.mon-ac-none { padding: 12px; font-size: 14px; color: var(--text-3); }
.mon-np-off { margin-top: 0; }
@media (hover: hover) {
  .mon-seg button:hover, .mon-tg:hover, .mon-crumb-btn:hover, .mon-row:hover .mon-cname { opacity: .7; }
  .mon-ac-i:hover { background: var(--fill); }
}
.mon-seg button:active, .mon-tg:active, .mon-crumb-btn:active, .mon-ac-i:active { opacity: .5; }
@media (prefers-color-scheme: dark) {
  .mon-mb-bars i.cur, .mon-sw.cur { background: var(--gray-200); }
  .mon-mb-bars i.prev, .mon-sw.prev { background: var(--gray-600); }
  .mon-mix { background: var(--gray-800); }
}

@media (max-width: 760px) {
  .mon-card { padding: 16px; }
  .mon-hide-sm { display: none; }
  .mon-kpis { grid-template-columns: repeat(2, 1fr); }
  .mon-kpi-val { font-size: 22px; }
  .mon-detail-in { grid-template-columns: 1fr; padding: 12px; }
  .mon-show-sm { display: grid; }
  .mon-stable th, .mon-stable td { padding: 10px 8px; }
  .mon-cat { min-width: 120px; }
  /* 필터 2열: NB/PB와 카테고리 검색은 한 줄 전체 (설계 노트 4번). 휴대폰에서 글자 16px — 누를 때 화면이 커지지 않게 */
  .mon-filters { grid-template-columns: 1fr 1fr; }
  .mon-filters .mon-f-nbpb, .mon-filters .mon-f-cat { grid-column: 1 / -1; }
  .mon-input { font-size: 16px; }
  .mon-camp-pad { padding: 16px; }
  .mon-ctable .mon-cname { min-width: 120px; }
}

/* 민정과 대화 */
.chat-box { display: flex; flex-direction: column; height: calc(100vh - 260px); min-height: 420px; padding: 0; overflow: hidden; }
.chat-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.chat-empty { margin: auto; text-align: center; max-width: 420px; }
.chat-row { display: flex; gap: 8px; align-items: flex-start; }
.chat-row.mine { justify-content: flex-end; }
.chat-col { display: flex; flex-direction: column; gap: 6px; max-width: min(640px, 82%); }
.chat-row.mine .chat-col { align-items: flex-end; }
.chat-bubble { padding: 10px 14px; border-radius: 12px; background: var(--fill); white-space: pre-wrap; line-height: 1.6; font-size: 15px; }
.chat-row.mine .chat-bubble { background: var(--primary); color: var(--on-primary); }
.chat-bubble.error { color: var(--negative); }
.chat-typing { color: var(--text-3); }
.chat-typing i { font-style: normal; animation: chatDot 1.2s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .2s; } .chat-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes chatDot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.chat-card { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-300); background: var(--surface); }
.chat-card.dismissed { opacity: .55; }
.chat-card-head { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chat-card p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.chat-card-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-soft); }
.chat-input textarea { flex: 1; resize: none; min-height: 44px; }

/* 보고서 3줄 요약 */
.report-brief { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 14px 16px; border-radius: var(--r-300); background: var(--fill); }
.report-brief p { margin: 0; white-space: pre-wrap; line-height: 1.7; font-size: 16px; }
.report-more { margin: 8px 0; }
.report-more > summary { cursor: pointer; color: var(--text-3); font-size: 14px; padding: 6px 0; }
