:root {
  --bg: #f4f5f6;
  --surface: #ffffff;
  --surface-2: #f9fafa;
  --line: #e2e5e8;
  --text: #1d2327;
  --muted: #69737b;
  --accent: #1f4e5f;
  --accent-2: #2b6a80;
  --accent-soft: #e6eff2;
  --ok: #2f7d4f;
  --ok-soft: #e5f3ea;
  --warn: #9a6400;
  --warn-soft: #fbf1dc;
  --bad: #b3372f;
  --bad-soft: #fbe7e5;
  --radius: 8px;
  --side: 220px;
  --top: 56px;
  font-synthesis: none;
}
/* 어두운 화면: 기기 설정을 따르되, 내 정보 > 화면에서 밝게·어둡게를 골랐으면 그것을 따른다 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15191c; --surface: #1d2226; --surface-2: #232a2f; --line: #323a40; --text: #e6e9eb; --muted: #9aa4ab;
    --accent: #6fb3c9; --accent-2: #8cc6d8; --accent-soft: #23353c; --ok: #6cc08f; --ok-soft: #1f3328;
    --warn: #e0b45c; --warn-soft: #3a3020; --bad: #ef8b82; --bad-soft: #3d2423;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #15191c; --surface: #1d2226; --surface-2: #232a2f; --line: #323a40; --text: #e6e9eb; --muted: #9aa4ab;
    --accent: #6fb3c9; --accent-2: #8cc6d8; --accent-soft: #23353c; --ok: #6cc08f; --ok-soft: #1f3328;
    --warn: #e0b45c; --warn-soft: #3a3020; --bad: #ef8b82; --bad-soft: #3d2423;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Noto Sans KR", sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.3; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); min-height: 1.2em; }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }

/* 로그인 */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.login-card h1 { color: var(--accent); }

/* 레이아웃 */
.app { min-height: 100%; }
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--accent); white-space: nowrap; }
.search { flex: 1; max-width: 520px; }
.search input { width: 100%; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-chip { font-size: 14px; color: var(--muted); white-space: nowrap; }
.icon-btn { position: relative; background: none; border: 0; padding: 6px; border-radius: 6px; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.badge { position: absolute; top: 0; right: 0; background: var(--bad); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 5px; min-width: 16px; text-align: center; }
.menu-toggle { display: none; }
.sidebar {
  position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); z-index: 15;
  background: var(--surface); border-right: 1px solid var(--line); padding: 12px 8px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar a { display: flex; align-items: center; padding: 9px 12px; border-radius: 6px; color: var(--text); }
.sidebar a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 10px; font-size: 12px; padding: 0 7px; }
.sidebar .count:empty { display: none; }
.sidebar .count.bad { background: var(--bad); }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 8px; }
/* 메뉴 묶음 제목: 누르면 접고 편다. 접혀 있어도 지금 보는 메뉴는 보인다 */
.sidebar .nav-group { display: flex; align-items: center; width: 100%; margin: 10px 0 2px; padding: 9px 12px; border: 0; background: none; font: inherit;
  font-size: inherit; font-weight: 600; color: var(--muted); cursor: pointer; text-align: left; border-radius: 6px; }
.sidebar .nav-group:hover { background: var(--surface-2); }
.sidebar .nav-group::after { content: ''; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.sidebar .nav-group[aria-expanded="false"]::after { transform: rotate(-45deg); }
.sidebar .nav-group.hidden { display: none; }
.sidebar a.nav-fold:not(.active) { display: none; }
.content { margin-left: var(--side); padding: calc(var(--top) + 20px) 24px 40px; max-width: calc(var(--side) + 1200px); }

.dropdown {
  position: absolute; top: calc(var(--top) - 4px); right: 12px; width: 360px; max-width: calc(100vw - 24px);
  max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 30;
}
.notif { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif.unread { background: var(--accent-soft); }
.notif:hover { background: var(--surface-2); }

/* 공통 요소 */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card h2 a.right { font-weight: 400; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid .card { margin-bottom: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.stat { font-size: 26px; font-weight: 700; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary, :root:not([data-theme="light"]) .sidebar .count { color: #10181b; } }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .sidebar .count { color: #10181b; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 4px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=checkbox] { width: auto; }
textarea { min-height: 140px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid > .span-all { grid-column: 1 / -1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }
@media (max-width: 600px) { .tabs { gap: 0; } .tabs a { padding: 8px 9px; font-size: 14px; } }
@media (min-width: 601px) { .tabs { flex-wrap: wrap; } }

table { width: 100%; border-collapse: collapse; word-break: keep-all; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
tr.unread td { font-weight: 600; }
.table-wrap { overflow-x: auto; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 14px; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font-size: 16px; line-height: 1; }

/* 결재선 */
.approval-line { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.approval-line .step { flex: 1 1 120px; padding: 10px; border-right: 1px solid var(--line); text-align: center; }
.approval-line .step:last-child { border-right: 0; }
.approval-line .step .who { font-weight: 600; }

/* 메신저 */
.chat { display: grid; grid-template-columns: 260px 1fr; grid-template-rows: minmax(0, 1fr); height: calc(100vh - var(--top) - 60px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list .item { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; display: block; color: var(--text); }
.chat-list .item:hover { background: var(--surface-2); text-decoration: none; }
.chat-list .item.active { background: var(--accent-soft); }
.chat-list .last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.chat-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 75%; }
.day-sep { align-self: stretch; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 6px 0; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.msg .meta { font-size: 12px; color: var(--muted); }
.msg .bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; white-space: pre-wrap; word-break: break-word; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine .bubble { background: var(--accent-soft); border-color: transparent; text-align: left; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-input textarea { min-height: 42px; height: 42px; }

/* 캘린더 */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dow { padding: 6px; font-size: 13px; color: var(--muted); text-align: center; background: var(--surface-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 96px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); cursor: pointer; overflow: hidden; }
.cal .day.other { background: var(--surface-2); color: var(--muted); }
.cal .day.today .num { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 6px; }
.cal .num { font-size: 13px; display: inline-block; }
.cal .day.holiday .num, .cal .hname { color: var(--bad); }
.cal .day.today.holiday .num { color: #fff; }
.cal .hname { font-size: 11px; white-space: nowrap; }
.cal .ev { font-size: 12px; padding: 1px 4px; margin-top: 2px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.leave { background: var(--warn-soft); color: var(--warn); }
.cal .ev.reservation { background: var(--ok-soft); color: var(--ok); }
.cal .ev.company { background: var(--bad-soft); color: var(--bad); }
.cal .ev[data-evid]:hover { outline: 1px solid currentColor; }
.cal .ev[draggable] { cursor: grab; }
.cal .ev.dragging { opacity: .5; }
.cal .day.drop-day { outline: 2px dashed var(--accent); outline-offset: -2px; }

/* 예약 타임라인 */
.timeline { position: relative; height: 34px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; }
.timeline .slot { position: absolute; top: 3px; bottom: 3px; background: var(--accent); color: #fff; border-radius: 4px; font-size: 12px; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 28px; }
.timeline .mine { background: var(--ok); }
.hours { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 문서 편집 */
.editor { width: 100%; min-height: 60vh; font: 15px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, "D2Coding", monospace; }
.doc-status { font-size: 13px; color: var(--muted); }

/* AI */
.ai-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ai-log { display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
.ai-msg { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.ai-msg.user { align-self: flex-end; background: var(--accent-soft); border-color: transparent; max-width: 80%; white-space: pre-wrap; }
.ai-msg.assistant { max-width: 100%; }
.ai-msg table { margin: 8px 0; font-size: 14px; }
.ai-msg p { margin: 0 0 8px; }
.ai-msg ul { margin: 4px 0 8px; padding-left: 20px; }
.ai-msg code { background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.action-card { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: 10px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.action-card .summary { flex: 1; min-width: 200px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }

/* 모달, 토스트 */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; padding: 20px; }
.toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.2); max-width: 380px; cursor: pointer; }
.toast.error { background: var(--bad); color: #fff; }

/* 모바일 */
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: 240px; box-shadow: 4px 0 16px rgba(0,0,0,.1); }
  .sidebar.open { transform: none; }
  .content { margin-left: 0; padding: calc(var(--top) + 14px) 16px 40px; }
  .search { display: none; }
  .user-chip { display: none; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - var(--top) - 40px); }
  .chat.has-channel .chat-list { display: none; }
  .chat:not(.has-channel) .chat-main { display: none; }
  .cal .day { min-height: 64px; }
  .cal .ev { font-size: 11px; }
  .msg { max-width: 90%; }
  th, td { padding: 8px 6px; }
  .hide-mobile { display: none; }
  /* 휴대폰: 아래 고정 메뉴(.bottombar는 아래에서 켠다) */
  .sidebar { padding-bottom: 76px; }
  .content { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .chat { height: calc(100vh - var(--top) - 40px - 60px); }
  .toasts { bottom: calc(70px + env(safe-area-inset-bottom)); }
}
.bottombar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); justify-content: space-around; }
.bottombar a, .bottombar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: var(--muted);
  text-decoration: none; background: none; border: 0; position: relative; font-family: inherit; cursor: pointer; min-height: 48px; justify-content: center; }
.bottombar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottombar a.active { color: var(--accent); font-weight: 600; }
.bottombar .bcount { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 600; }
.bottombar .bcount:empty { display: none; }
@media (max-width: 860px) { .bottombar { display: flex; } .chat-head { flex-wrap: wrap; row-gap: 6px; } .chat-head #ch-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 40%; } }
@media print { .bottombar { display: none !important; } }
@media (min-width: 861px) { .show-mobile { display: none; } }

.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { height: 28px; max-width: 140px; object-fit: contain; }
.login-logo { display: block; max-height: 64px; max-width: 220px; margin: 0 auto 12px; object-fit: contain; }
.logo-preview { max-height: 80px; max-width: 260px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
@media (max-width: 860px) { .brand-logo { height: 24px; max-width: 96px; } }

.attach-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.drop-on { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.attach-list { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 4px; word-break: break-all; }

.org { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.org-dept h2 { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.org-members { display: grid; gap: 10px; }
.org-person { display: flex; gap: 10px; align-items: flex-start; }
.org-info { min-width: 0; word-break: break-all; }
.avatar { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 600; }
@media (max-width: 400px) { .org { grid-template-columns: 1fr; } }

.poll-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; cursor: pointer; }
.poll-opt.mine { border-color: var(--accent); background: var(--accent-soft); }
.poll-opt input { margin: 0; width: auto; }
.poll-label { min-width: 0; }
.poll-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.poll-bar { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.poll-bar > span { display: block; height: 100%; background: var(--accent); }
.poll-voters { grid-column: 1 / -1; }
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  .print-head { text-align: center; margin-bottom: 16px; }
  .print-head h1 { font-size: 22px; margin: 6px 0; }
  .print-doc { border: 0; padding: 0; }
  .print-doc .approval-line { border-color: #000; width: fit-content; margin-left: auto; border-radius: 0; }
  .print-doc .approval-line .step { flex: 0 0 110px; border-right-color: #000; min-height: 90px; }
  .print-doc table th, .print-doc table td { border: 1px solid #000; }
  .print-doc .pill { border: 1px solid #000; background: none; color: #000; }
  .attach-list a[target] { display: none; }
  .sidebar, .topbar, header, .no-print, #ai-fab, #modal-root, .toasts { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; }
  body, .content { background: #fff; margin: 0 !important; padding: 0 !important; }
}
.meter { height: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.meter > span { display: block; height: 100%; background: var(--accent); }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }

img.avatar { object-fit: cover; padding: 0; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg.mine { flex-direction: row-reverse; }
.msg .msg-body { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.msg.mine .msg-body { align-items: flex-end; }
.msg .avatar { margin-top: 16px; }
.bubble.file { padding: 6px 8px; }
.chat-img { display: block; max-width: min(260px, 60vw); max-height: 260px; border-radius: 6px; }
.chat-file { word-break: break-all; }

.star { background: none; border: 0; padding: 0 4px; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.star.on { color: #d49b00; }

.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 120px; }
.kcol h3 { margin: 0 0 8px; font-size: 14px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stats .stat-tile { margin: 0; }
.stat-v { font-size: 24px; font-weight: 700; margin: 4px 0; }
@media (max-width: 720px) { .kanban { grid-template-columns: 1fr; } }

.wl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
@media (max-width: 720px) { .wl-grid { grid-template-columns: 1fr; } }

.tprog { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.tprog .meter { width: 70px; margin: 0; }
.tprog.wide { display: flex; }
.tprog.wide .meter { flex: 1; width: auto; }
.tprog-n { font-size: 12px; color: var(--muted); min-width: 32px; }
.meter.ok > span { background: var(--ok, #2e8b57); }

.msg .msg-tools { margin-left: 6px; visibility: hidden; }
.msg:hover .msg-tools, .msg:focus-within .msg-tools { visibility: visible; }
@media (hover: none) { .msg .msg-tools { visibility: visible; } }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }
.ai-sum { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: var(--surface-2); }
.thread-item { padding: 12px 16px; }
.thread-item summary { list-style: none; }
.thread-item[open] .thread-peek { display: none; }
.thread-peek { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

/* 첨부 미리 보기 */
.modal.modal-wide { max-width: min(1100px, 96vw); }
.att-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att-thumb { padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); cursor: zoom-in; width: 120px; height: 90px; overflow: hidden; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; max-height: 72vh; overflow: auto; background: var(--surface-2); padding: 12px; border-radius: 6px; margin: 0; }
.pv-sheet { max-height: 70vh; overflow: auto; }
.pv-sheet table { font-size: 12px; width: auto; min-width: 50%; }
.pv-sheet td, .pv-sheet th { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; border: 1px solid var(--line); padding: 3px 6px; }
.pv-sheet th { position: sticky; left: 0; background: var(--surface-2); }
.pv-pdf { max-height: 74vh; overflow: auto; background: #525659; padding: 8px; border-radius: 6px; }
.pv-pdf canvas { display: block; margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pv-pdf p { color: #eee; margin: 0 0 8px; }

/* 견적서 (A4 인쇄) */
.quote-sheet { background: #fff; color: #111; max-width: 800px; margin: 0 auto; padding: 32px 36px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.quote-sheet table { border-collapse: collapse; width: 100%; }
.quote-sheet th, .quote-sheet td { border: 1px solid #555; padding: 5px 7px; vertical-align: middle; background: none; color: #111; }
.quote-sheet th { background: #f1f3f4; font-weight: 600; white-space: nowrap; }
.qs-title { text-align: center; letter-spacing: 12px; font-size: 28px; margin: 0 0 22px; text-decoration: underline; text-underline-offset: 8px; }
.qs-top { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; align-items: start; }
.qs-cust { font-size: 17px; border-bottom: 1px solid #111; padding-bottom: 4px; margin-bottom: 6px; }
.qs-meta { margin-top: 8px; }
.qs-meta th, .qs-meta td { border: 0; border-bottom: 1px dotted #999; background: none; text-align: left; padding: 3px 4px; }
.qs-meta th { width: 72px; color: #444; }
.qs-from .qs-vert { width: 26px; text-align: center; line-height: 1.6; }
.qs-logo { height: 26px; float: right; margin-left: 6px; }
.qs-sum { margin: 18px 0 10px; padding: 9px 12px; border: 2px solid #111; font-size: 15px; }
.qs-sum span { color: #444; font-size: 13px; }
.qs-items td.r { text-align: right; white-space: nowrap; }
.qs-items td.c { text-align: center; }
.qs-items .qs-tot th { text-align: center; }
.qs-memo { margin-top: 12px; border: 1px solid #555; padding: 8px 10px; min-height: 40px; }
@media (max-width: 700px) { .quote-sheet { padding: 16px 12px; } .qs-top { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4; margin: 12mm; }
  .quote-sheet { border: 0; padding: 0; max-width: none; }
  .quote-sheet th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 받는 사람 칸(여러 명) */
.recips { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 38px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); margin: 4px 0 12px; cursor: text; }
.recips:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.recip-chips { display: contents; }
.recip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 13px; max-width: 100%; }
.recip.in { background: rgba(46,160,67,.16); }
.recip.bad { background: rgba(220,38,38,.16); color: var(--bad); }
.recip button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; color: inherit; opacity: .6; }
.recip button:hover { opacity: 1; }
.recips .recip-text { flex: 1; min-width: 160px; border: 0 !important; outline: none; box-shadow: none !important; margin: 0 !important; padding: 4px !important; background: transparent; }
.recip-sug { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); margin-top: 2px; max-height: 280px; overflow: auto; }
.recip-opt { padding: 7px 10px; cursor: pointer; }
.recip-opt.on, .recip-opt:hover { background: var(--accent-soft); }

.cmp th, .cmp td { vertical-align: top; }
.cmp-best { color: #1a7f37; font-weight: 700; }

/* 캘린더 주간 보기 */
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; margin: 0; }
.seg .btn:first-child { border-radius: 6px 0 0 6px; }
.seg .btn:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.seg .btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.wk { min-width: 680px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.wk-row { display: grid; grid-template-columns: 48px repeat(7, 1fr); }
.wk-row > div { border-left: 1px solid var(--line); min-width: 0; }
.wk-row > div:first-child { border-left: 0; }
.wk-head > div { padding: 6px; font-size: 13px; text-align: center; border-bottom: 1px solid var(--line); }
.wk-head .today { color: var(--accent); font-weight: 700; }
.wk-head .holiday { color: var(--bad); }
.wk-allday > div { padding: 3px; min-height: 28px; border-bottom: 1px solid var(--line); }
.wk-allday > div:first-child { display: flex; align-items: center; justify-content: center; }
.wk .ev { font-size: 12px; padding: 1px 4px; margin-bottom: 2px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.wk .ev.leave { background: var(--warn-soft); color: var(--warn); }
.wk .ev.reservation { background: var(--ok-soft); color: var(--ok); }
.wk .ev.company { background: var(--bad-soft); color: var(--bad); }
.wk-hours > div { height: var(--wk-px); font-size: 11px; color: var(--muted); text-align: right; padding-right: 4px; transform: translateY(-6px); }
.wk-hours > div:first-child { transform: none; }
.wk-col { position: relative; height: var(--wk-h); cursor: pointer; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--wk-px) - 1px), var(--line) calc(var(--wk-px) - 1px), var(--line) var(--wk-px)); }
.wk-col.today { background-color: var(--accent-soft); }
.wk-col.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.wk .wk-ev { position: absolute; white-space: normal; text-overflow: clip; overflow: hidden; border-left: 3px solid currentColor; line-height: 1.3; margin: 0; }
.wk-ev:hover { outline: 1px solid currentColor; z-index: 2; }
.wk [draggable] { cursor: grab; }
.wk .dragging { opacity: .5; }
.wk .drop-day { outline: 2px dashed var(--accent); outline-offset: -2px; }
.wk-rs { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.wk-ev:hover .wk-rs { background: linear-gradient(to bottom, transparent 2px, currentColor 2px, currentColor 3px, transparent 3px); background-size: 16px 100%; background-repeat: no-repeat; background-position: center; }
.wk-ev.resizing { z-index: 3; opacity: .85; outline: 1px solid currentColor; }
.wk-tip { position: absolute; right: 2px; bottom: 8px; font-size: 11px; background: var(--surface); color: var(--text, inherit); padding: 0 4px; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.2); white-space: nowrap; }
.wk-sel { position: absolute; left: 2px; right: 2px; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid var(--accent); border-radius: 4px; font-size: 11px; color: var(--accent); padding: 1px 4px; pointer-events: none; z-index: 1; }
.wk-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--bad); z-index: 2; pointer-events: none; }
.wk-now::before { content: ''; position: absolute; left: -4px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.wk-now[hidden] { display: none; }
/* 일정 등록: 그날 바쁜 시간 */
.busy-box:empty { display: none; }
.busy-box { margin: -4px 0 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.busy-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.busy-name { width: 84px; flex: none; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busy-name.bad { color: var(--bad); font-weight: 700; }
.busy-bar { position: relative; flex: 1; height: 16px; background: var(--accent-soft); background: color-mix(in srgb, var(--muted) 10%, transparent); border-radius: 3px; }
.busy-blk { position: absolute; top: 0; bottom: 0; background: var(--muted); opacity: .55; border-radius: 2px; }
.busy-blk.allday { background: var(--warn); opacity: .4; }
.busy-slot { position: absolute; top: -2px; bottom: -2px; border: 2px solid var(--accent); border-radius: 3px; background: color-mix(in srgb, var(--accent) 15%, transparent); }
.busy-ticks { background: none; height: 14px; }
.busy-ticks span { position: absolute; transform: translateX(-50%); font-size: 10px; }
/* 메신저 공감 */
.rx-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; align-items: center; }
.msg.mine .rx-row { justify-content: flex-end; }
.rx { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 0 7px; font-size: 13px; line-height: 22px; cursor: pointer; color: inherit; }
.rx.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.rx-add { position: relative; display: inline-block; }
.rx-pick { position: absolute; top: 18px; left: 0; z-index: 5; white-space: nowrap; display: inline-flex; gap: 2px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.rx-pick.hidden { display: none; }
.rx-pick .rx { border: 0; padding: 0 4px; font-size: 16px; }
.msg.mine .rx-pick { left: auto; right: 0; }
.msg:has(.rx-pick:not(.hidden)) .msg-tools { visibility: visible; }
/* 메신저 답장 */
.chat-quote { font-size: 12px; color: var(--muted); border-left: 3px solid var(--accent); padding: 2px 8px; margin: 2px 0 3px; background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 0 6px 6px 0; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-quote strong { color: inherit; margin-right: 4px; }
.chat-reply { padding: 6px 12px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); gap: 6px; flex-wrap: nowrap; }
.chat-reply.hidden { display: none; }
.chat-reply-body { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.msg.flash .bubble { animation: msgflash 1.6s ease; }
@keyframes msgflash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* 메일 여러 통 선택 */
.m-bulk { margin: -2px 0 8px; gap: 10px; min-height: 30px; }
.m-pick-td { cursor: default; text-align: center; }
.m-pick { margin: 0; width: 16px; height: 16px; cursor: pointer; }
tr.picked td { background: var(--accent-soft); }
tr.kfocus td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.kfocus td { background: var(--accent-soft); }
kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--line, #ccc); border-bottom-width: 2px; border-radius: 4px; font: 12px/1.6 ui-monospace, monospace; background: var(--bg); }
/* 메신저 고정 메시지 */
.chat-pins { border-bottom: 1px solid var(--line); background: var(--accent-soft); padding: 6px 12px; font-size: 13px; }
.chat-pins .pin-top { gap: 8px; flex-wrap: nowrap; }
.chat-pins .pin-main { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.chat-pins .pin-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 220px; overflow: auto; }
.chat-pins .pin-list li { gap: 8px; flex-wrap: nowrap; padding: 4px 0 4px 26px; border-top: 1px solid var(--line); }
/* 메신저 대화방 안에서 찾기 */
.chat-find { border-bottom: 1px solid var(--line); padding: 8px 12px; }
.chat-find .find-hits { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.chat-find .find-hit { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 6px 4px; cursor: pointer; color: inherit; font: inherit; font-size: 13px; }
.chat-find .find-hit:hover, .chat-find .find-hit.on { background: var(--accent-soft); }
.chat-find .find-body { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-find mark { background: #fde68a; color: inherit; padding: 0 1px; border-radius: 2px; }
.chat-gap { justify-content: center; gap: 8px; padding: 8px 0; }
/* 메신저 @부르기 */
.mention { color: var(--accent); font-weight: 600; }
.mention.me { background: #fde68a; color: #7c4a03; border-radius: 3px; padding: 0 2px; }
.bubble.mention-me { box-shadow: inset 3px 0 0 #f59e0b; }
.chat-main { position: relative; }
.chat-at { position: absolute; left: 60px; bottom: 64px; z-index: 20; min-width: 220px; max-width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: 4px; }
.chat-at .at-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; color: inherit; font: inherit; }
.chat-at .at-item.on, .chat-at .at-item:hover { background: var(--accent-soft); }
.chat-at .at-all { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
/* 메신저 사진·파일 모아 보기 */
.cfl-list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cfl-img { margin: 0; }
.cfl-img img { width: 100%; height: 130px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; background: var(--surface-2); }
.cfl-img figcaption { margin-top: 4px; line-height: 1.4; }
.cfl-file { gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.cfl-file .cfl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cfl-more { display: block; margin: 12px auto 0; }
@media (max-width: 700px) { .cfl-file { flex-wrap: wrap; } }
/* 메신저 안 읽은 사람 수 */
.msg .rd { color: #d97706; font-weight: 700; font-size: 11px; margin: 0 4px; cursor: pointer; }
.msg .rd:empty { display: none; }
/* 할 일 보드 끌어 옮기기 */
.kcard[draggable="true"] { cursor: grab; }
.kcard.dragging { opacity: .45; }
.kcol.drop-on { outline: 2px dashed var(--accent); outline-offset: -4px; background: var(--accent-soft); }

/* 회의록 작성 + 주간 업무일지 나란히 보기 */
.min-split.open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 16px; align-items: start; }
.min-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.min-side details { border-top: 1px solid var(--line); padding: 8px 0; }
@media (max-width: 1000px) { .min-split.open { grid-template-columns: 1fr; } .min-side { position: static; max-height: none; } }

/* 주간 업무일지: 지난주 계획 */
.wk-prev { background: var(--bg-soft, rgba(127,127,127,.06)); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
.wk-prev .pre { margin-top: 6px; }

/* 단추 안 숫자 */
.btn .badge { position: static; display: inline-block; margin-left: 4px; }

/* 메일 본문에 붙여 넣은 그림 */
.pre .mail-img { display: block; margin: 6px 0; }
.pre .mail-img img { max-width: 100%; max-height: 640px; border: 1px solid var(--line); border-radius: 6px; }

/* 메신저: 붙여 넣은 그림 미리 보기 */
.chat-paste { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; max-height: 50vh; overflow: auto; }
.chat-paste img { max-width: 100%; max-height: 45vh; border: 1px solid var(--line); border-radius: 6px; }

/* 메일 쓰기 본문: 그림이 보이는 칸 */
.rich-body { min-height: 140px; max-height: 70vh; overflow: auto; margin-top: 4px; white-space: pre-wrap; word-break: break-word; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-weight: normal; cursor: text; resize: vertical; }
.rich-body:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.rich-body img { display: block; max-width: 100%; max-height: 480px; margin: 4px 0; border: 1px solid var(--line); border-radius: 4px; }
.rich-body img:hover { outline: 2px solid var(--accent-soft); }

/* 그림 크게 보기 */
.img-viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .86); display: flex; flex-direction: column; color: #fff; }
.img-viewer .iv-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(0, 0, 0, .5); flex-wrap: wrap; }
.img-viewer .iv-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50vw; }
.img-viewer .muted { color: #ccc; }
.img-viewer .iv-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 12px; }
.img-viewer .iv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; background: #fff; }
.img-viewer .iv-stage.actual { align-items: flex-start; justify-content: flex-start; }
.img-viewer .iv-stage.actual img { max-width: none; max-height: none; cursor: zoom-out; margin: auto; }
.img-viewer .iv-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .15); color: #fff; border: 0; font-size: 40px; line-height: 1; width: 48px; height: 72px; border-radius: 6px; cursor: pointer; z-index: 1; }
.img-viewer .iv-nav:hover { background: rgba(255, 255, 255, .3); }
.img-viewer .iv-nav.prev { left: 12px; }
.img-viewer .iv-nav.next { right: 12px; }

/* 메신저 메시지 전달 */
.cfw-list { max-height: 45vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; margin-bottom: 10px; }
.cfw-item { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-weight: normal; }
.cfw-item.hidden { display: none; }

/* 메일 쓰기: 외부 첨부 크기 경고 */
.ext-size-warn { margin: -6px 0 12px; padding: 6px 10px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }

/* 메신저: 안 읽은 메시지 시작 줄 */
.chat-unread-line { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: var(--accent); font-size: 12px; font-weight: 600; }
.chat-unread-line::before, .chat-unread-line::after { content: ""; flex: 1; border-top: 1px solid var(--accent); opacity: .5; }

/* 메신저 대화 목록 찾기·거르기 */
.ch-filter { display: flex; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); align-items: center; }
.ch-filter input { flex: 1; min-width: 0; margin: 0; padding: 4px 8px; }
.ch-filter .btn { margin: 0; white-space: nowrap; }

/* 일정 찾기에서 고른 일정 */
.cal .ev.flash { outline: 2px solid var(--accent); outline-offset: 1px; animation: msgflash 1.6s ease 2; }

/* 휴가 현황표 */
.lvb table { border-collapse: collapse; font-size: 13px; }
.lvb th, .lvb td { padding: 3px 2px; border-bottom: 1px solid var(--line); }
.lvb .lvb-name { position: sticky; left: 0; background: var(--surface); text-align: left; padding-right: 8px; z-index: 1; min-width: 80px; }
.lvb .lvb-d { text-align: center; min-width: 26px; }
.lvb th.lvb-d { font-weight: 500; }
.lvb .lvb-off { background: var(--surface-2); color: var(--muted); }
.lvb .lvb-today { box-shadow: inset 0 0 0 2px var(--accent); }
.lvb-cell { display: block; border-radius: 4px; font-size: 11px; line-height: 20px; text-align: center; white-space: nowrap; }
.lvb-ok { background: var(--accent); color: var(--surface); }
.lvb-pend { background: var(--warn-soft); color: var(--warn); border: 1px dashed var(--warn); }

/* 메신저 예약 보내기 목록 */
.chat-sched { padding: 4px 10px 8px; display: flex; flex-direction: column; gap: 4px; border-top: 1px dashed var(--line); }

/* 결재 서명·도장 */
img.stamp { display: block; max-width: 72px; max-height: 44px; margin: 4px auto; object-fit: contain; }
@media print { img.stamp { max-height: 40px; } }

/* 왼쪽 메뉴 숨김·정리 */
.sidebar a.nav-off:not(.active) { display: none; }
.nav-edit-row { padding: 2px 0; border-bottom: 1px solid var(--line); gap: 6px; }

/* 캘린더의 할 일 기한 */
.cal .ev.task, .wk .ev.task { background: var(--accent-soft); color: var(--accent); border-left: 3px solid var(--accent); cursor: pointer; }
.cal .ev.task.hi, .wk .ev.task.hi { border-left-color: var(--bad); }

/* 즐겨찾기 */
#fav-btn.on svg { fill: var(--warn); stroke: var(--warn); }
#fav-panel .fav-row { gap: 8px; align-items: center; }
tr.hl td { background: var(--accent-soft); }
.bad-text { color: var(--bad); }
