/* ============================================================
   워크허브 — 스타일
   ============================================================ */
@font-face{font-family:"Pretendard Variable";src:url("/fonts/PretendardVariable.woff2") format("woff2");font-weight:45 920;font-style:normal;font-display:swap;}
:root {
  --brand: #4263eb;
  --brand-2: #5b7cfa;
  --brand-soft: #edf1fe;
  --ink: #1b2430;
  --sub: #6b7280;
  --line: #dde2ea;
  --bg: #f6f8fb;
  --card: #ffffff;
  --green: #059669; --green-bg: #d1fae5; --green-ink: #065f46;
  --amber: #b45309; --amber-bg: #fef3c7; --amber-ink: #92400e;
  --red: #dc2626;   --red-bg: #fee2e2;   --red-ink: #991b1b;
  --blue: #1d4ed8;  --blue-bg: #dbeafe;  --blue-ink: #1e40af;
  --gray-ink: #475569; --gray-bg: #e2e8f0;
  --side: #ffffff; --side-ink: #1b2430; --side-sub: #4b5563;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(27,36,48,.05), 0 10px 30px rgba(27,36,48,.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 14.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.login-mode { font-family: Pretendard, system-ui, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
a { color: var(--brand); text-decoration: none; }

/* ---------- 로그인 (좌우 분할 — 밝고 깔끔한 SaaS 스타일) ---------- */
.login-hero { min-height: 100vh; display: flex; align-items: stretch; background: #f6f8fb; }
.lh-left {
  flex: 1.35; display: flex; flex-direction: column; justify-content: center;
  padding: 56px 64px; max-width: 740px;
}
.lh-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 36px; }
.lh-logo .mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #5b7cfa, #4263eb); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px;
  box-shadow: 0 6px 16px rgba(66,99,235,.3);
}
.lh-logo .tag { color: var(--brand); font-weight: 700; letter-spacing: 2.5px; font-size: 12.5px; }
.lh-title { font-size: 33px; font-weight: 800; color: #1b2430; line-height: 1.38; letter-spacing: -.6px; margin-bottom: 14px; }
.lh-sub { color: #6b7280; font-size: 15.5px; margin-bottom: 38px; }
.lh-feats { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.lh-feats li { display: flex; gap: 14px; align-items: flex-start; }
.lh-feats .fi {
  width: 42px; height: 42px; border-radius: 12px; background: #eef1f6;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.lh-feats b { display: block; font-size: 14.2px; color: #1b2430; margin-bottom: 2px; }
.lh-feats .d { color: #6b7280; font-size: 12.8px; }
.lh-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 44px; }
.login-card {
  width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid #e7ebf1; border-radius: 20px;
  padding: 42px 38px 26px;
  box-shadow: 0 10px 40px rgba(27,36,48,.07);
}
.login-card h2 { font-size: 22.5px; font-weight: 800; letter-spacing: -.4px; }
.login-card .lh-desc { color: #6b7280; font-size: 13.5px; margin: 7px 0 24px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card .btn.block { padding: 11px; font-size: 14.5px; border-radius: 11px; }
.lh-divider { display: flex; align-items: center; gap: 10px; color: #9aa3b2; font-size: 12px; margin: 20px 0 4px; }
.lh-divider::before, .lh-divider::after { content: ''; flex: 1; height: 1px; background: #e7ebf1; }
.lh-guide summary {
  cursor: pointer; color: var(--sub); font-size: 12.5px; padding: 8px 2px; user-select: none;
}
.lh-guide summary:hover { color: var(--brand); }
.lh-guide[open] summary { color: var(--brand); font-weight: 600; }
.lh-guide .login-hint { margin-top: 4px; }
.login-hint { margin-top: 18px; font-size: 12.5px; color: var(--sub); background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; line-height: 1.65; }
.login-hint b { color: var(--brand); }
.lh-foot { text-align: center; color: #9aa3b2; font-size: 11.5px; margin-top: 20px; }
.login-err { background: var(--red-bg); color: var(--red-ink); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; display: none; }
body.dark .login-hero { background: #0b1120; }
body.dark .login-card { background: #101a2c; border-color: #263349; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
body.dark .lh-title, body.dark .lh-feats b { color: var(--ink); }
body.dark .lh-logo .tag { color: #7d9bff; }
body.dark .lh-feats .fi { background: #1a2740; }
body.dark .lh-divider::before, body.dark .lh-divider::after { background: #263349; }
body.dark .lh-divider, body.dark .lh-foot { color: #64748b; }
@media (max-width: 980px) {
  .login-hero { flex-direction: column; }
  .lh-left { display: none; }
  .lh-right { padding: 24px; align-items: center; min-height: 100vh; }
}

/* ---------- 레이아웃 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--side); color: var(--side-sub);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; cursor: pointer; user-select: none; }
.side-brand:hover .mark { filter: brightness(1.06); }
.side-brand:active .mark { transform: scale(.94); }
.side-brand .mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg,#5b7cfa,#4263eb); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 17px; box-shadow: 0 4px 12px rgba(66,99,235,.28); }
.side-brand .name { color: var(--side-ink); font-weight: 700; font-size: 16.5px; letter-spacing: .2px; }
.nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.nav-label { font-size: 11px; color: var(--side-sub); padding: 14px 10px 6px; letter-spacing: 1px; opacity: .8; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9.5px 12px; border-radius: 10px;
  color: var(--side-sub); font-size: 14px; margin-bottom: 2px; transition: background .15s;
}
.nav a .ic { width: 20px; text-align: center; font-size: 15px; }
.nav a:hover { background: var(--bg); color: var(--side-ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side-user { padding: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--side-sub); }
.side-user .who { color: var(--side-ink); font-weight: 600; }
.side-user button { margin-top: 8px; width: 100%; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(244,246,250,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 13px 28px;
}
.topbar h1 { font-size: 18px; font-weight: 700; margin-right: auto; }
.top-clock { color: var(--sub); font-size: 13px; font-variant-numeric: tabular-nums; }
.content { padding: 26px 28px 60px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------- 버튼 / 폼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; padding: 8px 14px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: filter .12s, background .12s;
  background: var(--brand); color: #fff; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.subtle { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.subtle:hover { background: var(--bg); filter: none; }
.btn.danger { background: var(--red); }
.btn.ghost-danger { background: #fff; border-color: #fecaca; color: var(--red); }
.btn.gray-on { background: var(--bg); border-color: #cbd5e1; color: var(--sub); font-weight: 700; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .desc { font-size: 12px; color: var(--sub); }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  border: 1px solid #d5dbe7; border-radius: 10px; padding: 9px 11px; background: #fff; width: 100%;
  transition: border .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
/* 비번칸 브라우저 차단 — password 대신 text로 바꾼 칸을 ●●● 로 가림 (app.js pwMaskAll) */
input.pw-mask { -webkit-text-security: disc; }
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.checkline { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.checkline input { width: auto; }

/* ---------- 카드 / 통계 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 4px; }
.card .sub { color: var(--sub); font-size: 13px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin-bottom: 0; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; gap: 13px; align-items: center; }
.stat .ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat .num { font-size: 22px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 12.5px; color: var(--sub); }
.stat.clickable { cursor: pointer; transition: transform .12s; }
.stat.clickable:hover { transform: translateY(-2px); }
.ic.brand { background: var(--brand-soft); } .ic.green { background: var(--green-bg); }
.ic.amber { background: var(--amber-bg); } .ic.red { background: var(--red-bg); }
.ic.blue { background: var(--blue-bg); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* ---------- 칩 ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2.5px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.green { background: var(--green-bg); color: var(--green-ink); }
.chip.amber { background: var(--amber-bg); color: var(--amber-ink); }
.chip.red { background: var(--red-bg); color: var(--red-ink); }
.chip.blue { background: var(--blue-bg); color: var(--blue-ink); }
.chip.gray { background: var(--gray-bg); color: var(--gray-ink); }
.chip.brand { background: var(--brand-soft); color: #4338ca; }
.chip.darkred { background: #7f1d1d; color: #fff; }

/* ---------- 테이블 ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { background: #f8fafc; color: var(--sub); font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl .num { font-variant-numeric: tabular-nums; text-align: right; }
.tbl th.num { text-align: right; }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- 근태 캘린더 표 ---------- */
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.cal { border-collapse: collapse; font-size: 12px; width: max-content; min-width: 100%; }
.cal th, .cal td { border: 1px solid #f1f5f9; text-align: center; }
.cal thead th { background: #f8fafc; padding: 6px 4px; font-size: 11px; color: var(--sub); min-width: 34px; }
.cal thead th.name, .cal tbody th.name { position: sticky; left: 0; background: #f8fafc; z-index: 2; padding: 8px 12px; font-size: 13px; text-align: left; min-width: 110px; border-right: 1px solid var(--line); white-space: nowrap; }
.cal thead th.sum, .cal tbody td.sum { background: #f8fafc; font-weight: 700; font-size: 12px; padding: 4px 8px; min-width: 52px; border-left: 1px solid var(--line); white-space: nowrap; }
.cal tbody td.day { min-width: 36px; height: 36px; cursor: default; font-weight: 600; font-size: 10.5px; line-height: 1.25; border-radius: 2px; }
.cal td.day .out { display: block; font-weight: 500; opacity: .82; }
.cal td.work { background: var(--green-bg); color: var(--green-ink); }
.cal td.late { background: var(--amber-bg); color: var(--amber-ink); }
.cal td.early { background: #e0f2fe; color: #075985; }
.cal td.absent { background: var(--red-bg); color: var(--red-ink); }
.cal td.leave { background: var(--blue-bg); color: var(--blue-ink); }
.cal td.mil { background: #f3e8ff; color: #6b21a8; }
.cal td.holwork { background: #ede9fe; color: #5b21b6; }
.cal td.half { background: #e0e7ff; color: #3730a3; }
.cal td.off { background: repeating-linear-gradient(45deg,#f8fafc,#f8fafc 4px,#f1f5f9 4px,#f1f5f9 8px); color: #94a3b8; }
.cal td.norec { color: #cbd5e1; }
.cal td.today-cell { outline: 2px solid var(--brand); outline-offset: -2px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--sub); margin-top: 10px; }
.legend .sq { display: inline-block; width: 13px; height: 13px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.06); }
.tk-title { cursor: pointer; border-bottom: 1px dotted var(--sub); }
.tk-title:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- 모달 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: fadeIn .15s ease;
}
.modal {
  background: #fff; border-radius: 16px; width: 480px; max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(2,6,23,.35);
  animation: modalIn .24s cubic-bezier(.2,.8,.3,1);
}
/* 부드러운 닫기 (v1.29.10) — .closing이 붙으면 스르륵 사라짐 */
.modal-overlay.closing { animation: ovOut .17s ease forwards; pointer-events: none; }
.modal-overlay.closing .modal { animation: modalOut .17s ease forwards; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.965); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(10px) scale(.965); } }
@keyframes ovOut { to { opacity: 0; } }
/* 파일 뷰어 — 사진은 확대되며 등장, PDF는 은은하게 */
.viewer-img { display: block; margin: 0 auto; animation: imgIn .26s cubic-bezier(.2,.8,.3,1); }
@keyframes imgIn { from { opacity: 0; transform: scale(.93); } }
.viewer-frame { animation: fadeIn .22s ease; }
/* 화면 전환 — 뷰가 살짝 떠오르며 바뀜 (거북하지 않게 아주 짧게) */
#view > * { animation: viewIn .16s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) {
  .modal, .modal-overlay, .viewer-img, #view > * { animation: none !important; }
}
.modal.wide { width: 760px; }
/* PDF 미리보기 — 거의 전체화면 (v1.52.0 — 미리보기 글자 뭉개짐 호소 대응) */
.modal.pdf-full { width: min(96vw, 1320px); }
.modal.pdf-full .modal-head { padding: 12px 16px 0; }
.modal.pdf-full .modal-body { padding: 10px 16px 8px; }
.pdf-zoom-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
/* 매출관리 (v1.53.0) — 월별·상품별 2열 집계 / 등록창 품목 행 */
.sales-agg { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.sl-item { display: grid; grid-template-columns: 1fr 70px 110px 110px 34px; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 900px) { .sales-agg { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .sl-item { grid-template-columns: 1fr 34px; }
  .sl-item .sl-name { grid-column: 1; grid-row: 1; }
  .sl-item [data-slrm] { grid-column: 2; grid-row: 1; }
  .sl-item .sl-qty, .sl-item .sl-price { grid-column: 1; }
  .sl-item .sl-amt { grid-column: 1; text-align: left !important; }
}
.modal-head { display: flex; align-items: center; padding: 18px 22px 0; }
.modal-head h3 { font-size: 16.5px; font-weight: 700; }
.modal-close { margin-left: auto; border: none; background: var(--bg); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--sub); }
.modal-body { padding: 16px 22px; overflow-y: auto; }
.modal-foot { padding: 0 22px 20px; display: flex; gap: 8px; justify-content: flex-end; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #0f172a; color: #fff; border-radius: 12px; padding: 11px 20px;
  font-size: 13.5px; box-shadow: 0 12px 32px rgba(2,6,23,.4); z-index: 200;
  animation: slideUp .2s ease; max-width: 90vw;
}
.toast.err { background: #7f1d1d; }

/* ---------- 기타 ---------- */
.empty { text-align: center; color: var(--sub); padding: 34px 10px; font-size: 13.5px; }
.empty .big { font-size: 30px; margin-bottom: 8px; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.month-nav { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.month-nav b { padding: 0 10px; font-size: 13.5px; min-width: 86px; text-align: center; font-variant-numeric: tabular-nums; }
.month-nav button { border: none; background: var(--bg); border-radius: 7px; width: 26px; height: 26px; cursor: pointer; font-size: 13px; color: var(--ink); }
.month-nav .ym-sel { border: none; background: var(--bg); border-radius: 7px; height: 26px; padding: 0 4px; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--sub); cursor: pointer; }
.tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 13px 16px; font-size: 13.5px; margin-bottom: 16px; }
.banner.warn { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid #fde68a; }
.banner.info { background: var(--brand-soft); color: #4338ca; border: 1px solid #e0e7ff; }
.balance-hero { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.balance-hero .big { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; }
.balance-hero .cap { font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.balance-hero .part { text-align: center; }
.balance-hero .part .v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.report-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border .12s, box-shadow .12s; background: #fff; }
.report-item:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.report-item .top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.report-item .who { font-weight: 700; font-size: 14px; }
.report-item .when { color: var(--sub); font-size: 12.5px; }
.report-item .prev { color: var(--sub); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-detail h4 { font-size: 13px; color: var(--sub); margin: 14px 0 5px; font-weight: 600; }
.report-detail .txt { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 13.8px; line-height: 1.7; }
.board-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f1f5f9; }
.board-row:last-child { border-bottom: none; }
.board-row .who { font-weight: 600; width: 84px; }
.board-row .tm { color: var(--sub); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pw-banner { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border-radius: 12px; padding: 13px 18px; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 13.5px; }
.pw-banner button { margin-left: auto; background: #fff; color: var(--brand); border: none; border-radius: 8px; padding: 6px 12px; font-weight: 700; cursor: pointer; font-size: 12.5px; }

/* ---------- 대시보드 캘린더 위젯 ---------- */
.calw { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calw .h { text-align: center; font-size: 11px; color: var(--sub); padding: 4px 0; font-weight: 700; }
.calw .d { min-height: 54px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 5px; font-size: 11.5px; background: #fff; overflow: hidden; }
.calw .d.off { background: #f8fafc; border-color: #f1f5f9; }
.calw .d.today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(79,70,229,.15); }
.calw .d .n { font-weight: 700; font-size: 12px; margin-bottom: 1px; }
.calw .ev { font-size: 10px; border-radius: 4px; padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calw .ev.pend { opacity: .55; border: 1px dashed currentColor; }
.calw .ev.more { color: var(--sub); background: transparent; }
.d-dots { display: none; } /* 모바일(≤700px)에서만 표시 */
/* 날짜 칸 클릭(상세 모달) + 가독성 */
.calw .d.has-ev { cursor: pointer; }
.calw .d.has-ev:hover { border-color: var(--brand); background: #f7f9ff; }
body.dark .calw .d.has-ev:hover { background: #172033; }
.day-ev { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; background: var(--bg); }
.day-ev b { font-size: 14px; }
.day-ev .sq { flex: 0 0 13px; display: inline-block; width: 13px; height: 13px; border-radius: 4px; border: 1px solid rgba(0,0,0,.06); }
.day-ev .day-ev-kind { margin-left: auto; font-size: 11.5px; color: var(--sub); white-space: nowrap; }
.btn.gcal-on { background: var(--green-bg); color: var(--green-ink); border-color: transparent; }
/* 🏛 관심 공고 마감 이벤트 (v1.104.0) */
.calw .ev.bid { background: #e2e8f0; color: #334155; }
/* 📅 전사 일정 — 대시보드 카드보다 큰 칸 (v1.104.0) */
.calw.big .d { min-height: 92px; }
.calw.big .ev { font-size: 10.5px; white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
/* 📋 계약 진행 칸반보드 (v1.104.0) — 6단계 드래그 없이 ◀▶ 로 이동 */
.kb-wrap { overflow-x: auto; padding-bottom: 6px; }
.kb-board { display: grid; grid-template-columns: repeat(6, minmax(178px, 1fr)); gap: 10px; min-width: 1080px; align-items: start; }
.kb-col { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 8px; min-height: 120px; }
.kb-col h4 { font-size: 12.5px; margin: 2px 4px 8px; color: var(--sub); display: flex; justify-content: space-between; }
.kb-card { border: 1px solid var(--line); border-radius: 9px; background: var(--card, #fff); padding: 8px 9px; margin-bottom: 8px; font-size: 12px; cursor: pointer; }
.kb-card:hover { border-color: var(--brand); }
.kb-card b { font-size: 12.5px; display: block; margin-bottom: 3px; }
.kb-card .kb-sub { color: var(--sub); font-size: 11.5px; }
.kb-move { display: flex; gap: 4px; margin-top: 6px; }
.kb-move .btn { padding: 0 8px; height: 24px; font-size: 12px; }
@media (max-width: 700px) { .kb-board { grid-template-columns: repeat(6, 168px); } }
.comment-bubble { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; }
.comment-bubble .cb-head { display: flex; gap: 8px; align-items: center; margin-bottom: 3px; }
.comment-bubble .cb-head .btn { margin-left: auto; padding: 1px 7px; font-size: 11px; height: auto; }
.comment-bubble .cb-text { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
/* 기간 진행률 바 (과제·계약 기간 표시용) */
.pbar { height: 6px; border-radius: 999px; background: #eef2f7; margin-top: 4px; overflow: hidden; }
.pfill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #22c55e); transition: width .3s; }
.pfill.over { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.stat .ic.gray { background: #f1f5f9; }
/* 과제(지원사업 접수) 카드 목록 */
.pj-list { display: flex; flex-direction: column; gap: 10px; }
.pj-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 13px 16px; }
.pj-item .pj-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pj-item .pj-head .pj-title { font-size: 14.5px; flex: 1; min-width: 220px; line-height: 1.35; }
.pj-item .pj-info { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 7px; font-size: 13px; color: var(--sub); }
.pj-item .pj-info span { display: inline-flex; gap: 4px; align-items: center; }
.pj-item .pj-content { font-size: 13px; color: var(--ink); background: var(--bg); border-radius: 8px; padding: 8px 11px; margin-top: 8px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.pj-item .pj-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.pj-item .pj-result { font-size: 12.5px; color: var(--amber-ink); font-weight: 700; }
.pj-item .pj-actions { display: inline-flex; gap: 6px; align-items: center; }
/* 만료 임박 카드 3열 (인증·계약·과제) */
.exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.exp-grid .card { margin-bottom: 0; }
@media (max-width: 1100px) { .exp-grid { grid-template-columns: 1fr; } }
/* 대시보드 카드 자유 배치 그리드 */
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: start; }
.dash-grid .dash-card { position: relative; min-width: 0; }
.dash-grid .dash-card .card { margin-bottom: 0; height: 100%; }
.dash-card.span2 { grid-column: span 2; }
.card-editbar { position: absolute; top: 8px; right: 10px; z-index: 5; display: flex; gap: 4px; opacity: .85; }
.dash-card { outline: 2px dashed transparent; border-radius: 12px; transition: outline-color .15s, box-shadow .15s; }
.dash-card:hover { outline-color: var(--line); }
/* 모던 드래그 손잡이 */
.drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); color: var(--sub); font-size: 15px; cursor: grab; user-select: none; touch-action: none; }
.drag-handle:hover { color: var(--ink); border-color: #94a3b8; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.drag-handle:active { cursor: grabbing; }
/* 노션식 드래그 — 편집 모드 커서 + placeholder + 들어올린 카드 */
.dash-grid.editing .dash-card { cursor: default; } /* v1.106.0 — 카드 전체 잠금 폐지(모바일 스크롤 막힘) → ⠿ 손잡이로만 드래그 */
.dash-grid.editing .dash-card:active { cursor: grabbing; }
.drag-ph { border-radius: 14px; border: 2px dashed var(--brand-2); background: var(--brand-soft); opacity: .45; animation: phPulse 1.4s ease-in-out infinite; }
@keyframes phPulse { 50% { opacity: .25; } }
.dash-card.dragging { opacity: .96; pointer-events: none; transform: scale(1.03) rotate(.4deg); transition: transform .15s ease; }
.dash-card.dragging > .card { box-shadow: 0 22px 48px rgba(15,23,42,.28); }
.dash-card.dragging .card-editbar { opacity: 0; } /* 끌 때 편집 버튼 숨김 */
/* 위젯 추가 독 */
.dash-dock { position: sticky; bottom: 14px; margin-top: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; box-shadow: 0 8px 24px rgba(15,23,42,.14); z-index: 50; }
.dash-dock .dock-title { font-size: 12px; font-weight: 800; color: var(--sub); letter-spacing: .3px; }
.dash-dock .dock-empty { font-size: 12.5px; color: var(--sub); }
.dash-dock .dock-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 13px; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.dash-dock .dock-chip:hover { border-color: var(--brand); color: var(--brand); }

/* 사이드바 미확인 배지 */
.nav-badge { margin-left: auto; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: none; align-items: center; justify-content: center; padding: 0 5px; }
.nav a.active .nav-badge { background: var(--brand); color: #fff; }

/* ============================================================
   모던 리프레시 — 전체 화면 공통 (관리자·직원 동일 적용)
   ============================================================ */

/* 배경: 아주 은은한 그라데이션 메시 (깔끔한 밝은 톤) */
body {
  background:
    radial-gradient(900px 500px at 90% -5%, rgba(66,99,235,.05), transparent 60%),
    radial-gradient(700px 450px at -5% 105%, rgba(14,165,233,.04), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* 카드: 부드러운 그림자 + 미세 호버 */
.card { transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.card:hover { box-shadow: 0 2px 6px rgba(27,36,48,.05), 0 14px 34px rgba(27,36,48,.07); }

/* 버튼: 요즘 감성 — 호버 리프트 + 누름 효과 */
.btn { transition: transform .12s ease, box-shadow .15s ease, filter .15s ease, background .15s ease; }
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,24,40,.12); }
.btn:not(:disabled):active { transform: translateY(0) scale(.985); box-shadow: none; }

/* 입력칸: 포커스 링 세련화 */
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(66,99,235,.13); }

/* 표: 행 호버 부드럽게 */
.tbl th { letter-spacing: .2px; font-size: 12px; }
.tbl tbody tr { transition: background .12s ease; }

/* 사이드바 메뉴: 좌측 인디케이터 + 미세 이동 호버 */
.nav a { position: relative; border-radius: 12px; transition: background .18s ease, color .18s ease, transform .12s ease; }
.nav a::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%) scaleY(0);
  width: 3px; height: 60%; border-radius: 0 3px 3px 0; background: var(--brand-2);
  transition: transform .18s ease;
}
.nav a.active::before { transform: translateY(-50%) scaleY(1); }
.nav a:not(.active):hover { transform: translateX(2px); }

/* 상단바: 글래스 느낌 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246,248,251,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

/* 통계 카드: 아이콘 살짝 커지는 호버 */
.stat { transition: transform .16s ease, box-shadow .18s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(16,24,40,.05), 0 14px 30px rgba(16,24,40,.09); }
.stat .ic { transition: transform .18s ease; }
.stat:hover .ic { transform: scale(1.07) rotate(-3deg); }

/* 칩·탭 */
.chip { transition: filter .12s ease; }
.chip:hover { filter: brightness(.96); }
.tabs button { transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease; }
.tabs button:not(.on):hover { transform: translateY(-1px); }

/* 토스트: 슬라이드업 애니메이션 */
.toast { animation: toastIn .28s cubic-bezier(.2,.9,.3,1.2); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* 모달: 뜨는 애니메이션 */
.ov { animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ov .modal-wrap, .ov > div { animation: popIn .22s cubic-bezier(.2,.9,.3,1.15); }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* 슬림 스크롤바 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }

/* 보드 행·리스트 호버 */
.board-row, .list-plain li { transition: background .12s ease; border-radius: 8px; }
.board-row:hover, .list-plain li:hover { background: #f8fafc; }

/* 배너 */
.banner { box-shadow: 0 1px 3px rgba(16,24,40,.05); }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } .dash-card.span2 { grid-column: span 1; } }
/* 회사→월 계층 섹션 */
.pj-sec { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; }
.pj-sec:first-child { margin-top: 4px; }
.pj-sec.co { font-size: 15px; font-weight: 800; }
.pj-sec.co .bar { width: 4px; height: 17px; background: var(--brand); border-radius: 2px; display: inline-block; }
.pj-sec.mo { font-size: 13px; font-weight: 700; color: var(--sub); margin: 12px 0 6px 6px; }
.pj-sec .cnt { font-size: 11.5px; color: var(--sub); font-weight: 600; background: var(--bg); border-radius: 999px; padding: 1px 8px; }
/* 상태 즉시 변경 드롭다운 (계약·과제) */
.stage-sel { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 6px; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.stage-sel.run { color: #b45309; background: var(--amber-bg); border-color: #fde68a; }
.stage-sel.ok { color: #15803d; background: var(--green-bg); border-color: #bbf7d0; }
.stage-sel.done { color: var(--sub); background: var(--bg); }
.calw .ev.leave { background: var(--blue-bg); color: var(--blue-ink); }
.calw .ev.mil { background: #f3e8ff; color: #6b21a8; }
.calw .ev.proj { background: #fef3c7; color: #92400e; } /* 과제 마감 (v1.41.0) */
.calw .ev.warn { background: var(--red-bg); color: var(--red-ink); }
.calw .ev.inst { background: #e0f2fe; color: #075985; } /* 설치 예정 (v1.65.7) */
.calw .ev.asrv { background: #ffedd5; color: #9a3412; } /* A/S 예정 */

/* 월간 보고서 인쇄 (v1.43.0) — 모달의 보고서 영역만 종이에 */
@media print {
  @page { size: A4; margin: 12mm; }
  body.printing, body.printing * { visibility: visible; }
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible !important; }
  body > :not(.modal-overlay) { display: none !important; }
  .modal-overlay:not(:has(.print-area)) { display: none !important; }
  body:has([data-print-target]) .modal-overlay:not([data-print-target]) { display: none !important; }
  .print-area { position: static !important; width: 100% !important; max-height: none !important; overflow: visible !important; background: #fff !important; box-shadow: none !important; }
  .modal-overlay { position: static !important; background: none !important; padding: 0 !important; }
  .modal, .modal .modal-body { display: block !important; position: static !important; width: 100% !important; max-width: none !important; height: auto !important; max-height: none !important; overflow: visible !important; box-shadow: none !important; border: none !important; transform: none !important; }
  .modal-head, .modal-foot { display: none !important; }
  .modal-body { padding: 0 !important; }
  .print-area table { table-layout: fixed; }
  .print-area th, .print-area td { border: 1px solid #999; padding: 4px 6px; white-space: normal !important; overflow-wrap: anywhere; }
  .print-area thead { display: table-header-group; }
  .print-area tr, .print-area img { break-inside: avoid; }
  .print-area img { max-width: 100%; height: auto; }
  .print-area { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
.calw .ev.gcal { background: var(--green-bg); color: var(--green-ink); }
.list-plain { list-style: none; }
.list-plain li { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; }
.list-plain li:last-child { border-bottom: none; }
.list-plain .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 7px 12px; font-size: 13.8px; }
.kv dt { color: var(--sub); }
.kv dd { font-weight: 600; }

/* ---------- 반응형 ---------- */
/* ---------- 태블릿/모바일 — 사이드바 슬라이드 서랍 (햄버거) ---------- */
.menu-btn { display: none; }
.drawer-backdrop { display: none; }
@media (max-width: 980px) {
  .two-col { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    width: 262px; height: 100vh; max-height: 100vh;
    transform: translateX(-104%); transition: transform .22s ease;
    box-shadow: none;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 44px rgba(2,6,23,.4); }
  .drawer-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 55; animation: fadeIn .15s ease; }
  .content { padding: 18px 14px 90px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .row2, .row3 { grid-template-columns: 1fr; }
}

/* ---------- 폰(≤700px) 최적화 ---------- */
@media (max-width: 700px) {
  /* 캘린더 위젯 — 좁은 화면에선 일정 라벨 대신 컬러 점 (탭하면 그날 상세 모달) */
  .calw { gap: 3px; }
  .calw .d { min-height: 44px; padding: 3px 3px; border-radius: 7px; }
  .calw .d .n { font-size: 11px; }
  .calw .ev { display: none; }
  .d-dots { display: flex; gap: 3px; margin-top: 3px; align-items: center; flex-wrap: wrap; }
  .d-dots i { width: 7px; height: 7px; border-radius: 50%; }
  .d-dots b { font-size: 8.5px; color: var(--sub); }
  .legend { gap: 8px 12px; font-size: 11.5px; }
  /* 통계 카드 2열 압축 */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .stat { padding: 12px; gap: 9px; }
  .stat .ic { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
  .stat .num { font-size: 17px; }
  /* 입력창 16px — iOS 포커스 시 화면 자동 확대 방지 */
  input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea { font-size: 16px; }
  /* 상단바 정리 */
  .top-clock { display: none; }
  .topbar h1 { font-size: 16px; }
  /* 모달 — 화면에 꽉 맞게 */
  .modal-overlay { padding: 10px; }
  .modal { width: 100%; max-height: calc(100vh - 20px); border-radius: 14px; }
  .modal.wide { width: 100%; }
  .modal-head { padding: 14px 14px 0; }
  .modal-head h3 { font-size: 15px; }
  .modal-body { padding: 12px 14px; }
  .modal-foot { padding: 0 14px 14px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; min-width: 96px; }
  /* 카드 헤더는 좁으면 줄바꿈 */
  .card-head { flex-wrap: wrap; gap: 8px; }
  .content { padding: 14px 10px 100px; }
  /* 알림 패널·검색 팔레트 폭 */
  .alerts-pop { right: 8px; left: 8px; width: auto; }
  .palette { width: calc(100vw - 20px); }
  /* 표 여백 축소 (좌우 스크롤 유지) */
  .tbl { font-size: 12.5px; }
  .tbl th, .tbl td { padding: 8px 9px; }
  /* 채팅(업무보고) — 화면 높이 그대로 활용 */
  .chat-scroll { max-height: none; min-height: 260px; }
  /* 로그인 화면 */
  .lh-right { padding: 14px; }
  .login-card { padding: 28px 20px 24px; border-radius: 16px; }
}

/* ============================================================
   사업비 관리
   ============================================================ */
.money { font-variant-numeric: tabular-nums; }
/* 사업비 카드 — 클릭 가능 강조 */
.bg-item { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.bg-item:hover { border-color: var(--brand-2); box-shadow: 0 3px 12px rgba(16,24,40,.09); }
/* 회사 섹션의 소계 표시 */
.bg-co-sum { font-size: 12px; font-weight: 600; color: var(--sub); background: var(--bg); border-radius: 999px; padding: 2px 10px; }
/* 상세 모달 상단 요약 바 */
.bg-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.bg-summary > div { display: flex; flex-direction: column; gap: 2px; }
.bg-summary span { font-size: 11.5px; color: var(--sub); font-weight: 600; }
.bg-summary b { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.bg-summary .rate { grid-column: 1 / -1; gap: 6px; }
/* 등록 폼 — 비목별 계획 입력 */
.bg-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.bg-plan-row { display: flex; flex-direction: column; gap: 4px; }
.bg-plan-line { display: flex; align-items: center; gap: 8px; }
.bg-plan-line span { font-size: 13px; font-weight: 600; width: 74px; flex-shrink: 0; }
.bg-pi-wrap { display: flex; flex-direction: column; gap: 4px; margin-left: 82px; align-items: flex-start; }
.bg-pi-row { display: flex; gap: 6px; align-items: center; width: 100%; }
.bg-pi-row input { min-width: 0; flex: 1; padding: 4px 8px; font-size: 12.5px; }
.bg-pi-row input[data-pia] { flex: 0 0 118px; text-align: right; }
.bg-pi-sum { font-size: 11.5px; color: var(--sub); }
.pi-check { display: flex; flex-wrap: wrap; gap: 6px; }
.pi-check .chip { cursor: pointer; }
.pi-check .chip b { font-weight: 700; }
@media (max-width: 700px) { .bg-plan-grid { grid-template-columns: 1fr; } .bg-pi-wrap { margin-left: 0; } }
/* 비목별 소계 행 */
.tbl tr.bg-subtotal td { background: #f8fafc; border-top: 2px solid var(--line); }

/* ============================================================
   상단 액션 (알림·검색·테마) + 스마트 알림 패널
   ============================================================ */
.top-actions { display: inline-flex; gap: 6px; align-items: center; }
.icon-btn {
  position: relative; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 10px; width: 34px; height: 34px; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.icon-btn:hover { transform: translateY(-1px); border-color: var(--brand-2); box-shadow: 0 3px 10px rgba(16,24,40,.10); }
.icon-btn .alert-cnt {
  position: absolute; top: -6px; right: -6px; background: #ef4444; color: #fff;
  font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(239,68,68,.45);
}
.alerts-pop {
  position: fixed; top: 56px; right: 20px; z-index: 90; width: 380px; max-width: calc(100vw - 28px);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15,23,42,.22); max-height: 70vh; display: flex; flex-direction: column;
  animation: slideUp .16s ease; overflow: hidden;
}
.alerts-pop .ap-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.alerts-pop .ap-body { overflow-y: auto; }
.alerts-pop .ap-item { display: flex; gap: 9px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .12s; }
.alerts-pop .ap-item:hover { background: var(--bg); }
.alerts-pop .ap-item .lv { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.alerts-pop .ap-item .lv.high { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }
.alerts-pop .ap-item .lv.mid { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.16); }
.alerts-pop .ap-item .lv.low { background: #94a3b8; }
.alerts-pop .ap-item .ic { font-size: 15px; }
.alerts-pop .ap-item .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.alerts-pop .ap-item .tx b { font-size: 13px; line-height: 1.35; }
.alerts-pop .ap-item .tx small { color: var(--sub); font-size: 11.5px; margin-top: 1px; }
.alerts-pop .ap-item .go { color: var(--sub); font-size: 16px; font-weight: 700; }
.alerts-pop .ap-item .ap-check {
  border: 1px solid var(--line); background: var(--bg); color: var(--sub); border-radius: 8px;
  width: 26px; height: 26px; font-size: 13px; cursor: pointer; flex-shrink: 0;
  transition: all .12s ease; display: flex; align-items: center; justify-content: center;
}
.alerts-pop .ap-item .ap-check:hover { background: var(--green-bg); color: var(--green-ink); border-color: var(--green); transform: scale(1.08); }
.alerts-pop .ap-head #apAll { margin-left: auto; }
.alerts-pop .ap-empty { padding: 26px 16px; text-align: center; color: var(--sub); font-size: 13px; line-height: 1.7; }
.alerts-pop .ap-foot { padding: 9px 16px; border-top: 1px solid var(--line); color: var(--sub); font-size: 11.5px; }

/* ============================================================
   커맨드 팔레트 (Ctrl+K)
   ============================================================ */
.palette-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.42); backdrop-filter: blur(2px);
  z-index: 150; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  animation: fadeIn .13s ease;
}
.palette {
  width: 620px; max-width: 100%; background: var(--card); border-radius: 16px; overflow: hidden;
  box-shadow: 0 28px 70px rgba(2,6,23,.4); display: flex; flex-direction: column;
  animation: slideUp .16s ease; border: 1px solid var(--line);
}
.palette .pal-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.palette .pal-input .ic { font-size: 16px; }
.palette .pal-input input { border: none; outline: none; background: transparent; font-size: 15.5px; flex: 1; padding: 0; box-shadow: none !important; }
.palette .pal-input kbd { font-size: 10.5px; color: var(--sub); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--bg); font-family: inherit; }
.palette .pal-body { max-height: 46vh; overflow-y: auto; padding: 8px; }
.palette .pal-sec { font-size: 11px; font-weight: 800; color: var(--sub); letter-spacing: .5px; padding: 9px 12px 4px; }
.palette .pal-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.palette .pal-item:hover, .palette .pal-item.on { background: var(--brand-soft); }
.palette .pal-item .pi-label { font-weight: 600; font-size: 13.8px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .pal-item .pi-sub { color: var(--sub); font-size: 11.5px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .pal-item .pi-go { color: var(--sub); font-size: 12px; opacity: 0; }
.palette .pal-item:hover .pi-go, .palette .pal-item.on .pi-go { opacity: 1; color: var(--brand); }
.palette .pal-empty { padding: 30px 14px; text-align: center; color: var(--sub); font-size: 13px; }
.palette .pal-foot { padding: 9px 16px; border-top: 1px solid var(--line); color: var(--sub); font-size: 11.5px; }

/* ============================================================
   퀵 액션 FAB (+)
   ============================================================ */
.fab-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.fab-wrap .fab, .fab-wrap .fab-menu.open { pointer-events: auto; }
.fab {
  width: 52px; height: 52px; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; font-size: 24px; font-weight: 300;
  box-shadow: 0 10px 26px rgba(79,70,229,.42); display: flex; align-items: center; justify-content: center;
  transition: transform .18s cubic-bezier(.2,.9,.3,1.3), box-shadow .18s ease;
}
.fab:hover { transform: translateY(-2px) scale(1.04); }
.fab.open { transform: rotate(45deg); }
.fab-menu { display: flex; flex-direction: column; gap: 4px; opacity: 0; pointer-events: none; transform: translateY(8px) scale(.96); transform-origin: bottom right; transition: all .18s ease; }
.fab-menu.open { opacity: 1; pointer-events: auto; transform: none; }
.fab-menu button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px;
  padding: 10px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer; text-align: left; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(15,23,42,.13); transition: border-color .12s, transform .12s;
}
.fab-menu button:hover { border-color: var(--brand-2); transform: translateX(-3px); }
@media (max-width: 900px) { .fab-wrap { bottom: 86px; } }

/* 공용 검색 입력 (과제·계약·인증·사업비) */
.search-input { width: 220px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: 13px; background: var(--card); }

/* 사업비 도넛·예측 */
.bg-dash-row { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.bg-donut { flex-shrink: 0; }
.bg-forecast { grid-column: 1 / -1; font-size: 12px; color: var(--sub); background: var(--bg); border-radius: 8px; padding: 7px 10px; line-height: 1.6; }
.bg-forecast b { color: var(--ink); }
/* 현물 구분 칩 */
.chip.violet { background: #f3e8ff; color: #6b21a8; }
body.dark .chip.violet { background: #3b0764; color: #e9d5ff; }
/* 자금 구조 (정부지원금·자부담 현금/현물) */
.bg-funding { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 4px; background: linear-gradient(180deg, rgba(79,70,229,.035), transparent); }
.bg-funding .bf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13.5px; flex-wrap: wrap; }
.bg-funding .bf-head .selfrate { color: var(--amber); font-size: 16px; }
.fbar { display: flex; gap: 2px; height: 34px; border-radius: 9px; overflow: hidden; }
.fbar .seg { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.fbar .seg span { font-size: 11px; font-weight: 800; color: #fff; white-space: nowrap; padding: 0 4px; display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fbar .seg.gov { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.fbar .seg.self { background: linear-gradient(135deg, #f59e0b, #d97706); }
.fbar .seg.inkind { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.bf-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 9px; font-size: 12.5px; color: var(--sub); align-items: center; }
.bf-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bf-legend .sq { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bf-legend .sq.gov { background: #4f46e5; }
.bf-legend .sq.self { background: #d97706; }
.bf-legend .sq.inkind { background: #9333ea; }
.bf-legend .bf-self { margin-left: auto; background: var(--amber-bg); color: var(--amber-ink); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 12px; }
.bg-fund-live { background: var(--bg); border-radius: 10px; padding: 9px 12px; margin: -4px 0 13px; font-size: 12.5px; color: var(--sub); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bg-fund-live .selfrate { color: var(--amber); font-size: 15px; font-weight: 800; }
.bg-fund-live b { color: var(--ink); }

/* ============================================================
   다크 모드 — 상단 🌙 토글 (사용자 브라우저에 저장)
   ============================================================ */
body.dark {
  --brand-soft: #312e81;
  --ink: #e2e8f0; --sub: #94a3b8; --line: #334155; --bg: #0f172a; --card: #1e293b;
  --green-bg: #064e3b; --green-ink: #6ee7b7;
  --amber-bg: #451a03; --amber-ink: #fcd34d;
  --red-bg: #450a0a; --red-ink: #fca5a5;
  --blue-bg: #172554; --blue-ink: #93c5fd;
  --gray-ink: #cbd5e1; --gray-bg: #334155;
  --side: #0b1120; --side-ink: #e2e8f0; --side-sub: #8b98ab;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  color-scheme: dark;
}
body.dark {
  background:
    radial-gradient(900px 500px at 90% -5%, rgba(99,102,241,.14), transparent 60%),
    radial-gradient(700px 450px at -5% 105%, rgba(14,165,233,.10), transparent 60%),
    #0f172a;
  background-attachment: fixed;
}
body.dark .topbar { background: rgba(15,23,42,.85); border-bottom-color: rgba(51,65,85,.9); }
body.dark .modal, body.dark .report-item, body.dark .pj-item, body.dark .calw .d, body.dark .palette,
body.dark .alerts-pop, body.dark .fab-menu button { background: var(--card); }
body.dark .tabs button, body.dark .stage-sel, body.dark .month-nav button, body.dark .month-nav .ym-sel { background: var(--card); color: var(--ink); }
body.dark .month-nav, body.dark .search-input { background: var(--card); border-color: var(--line); }
body.dark input[type=text], body.dark input[type=password], body.dark input[type=date], body.dark input[type=time],
body.dark input[type=number], body.dark select, body.dark textarea,
body.dark input[type=file] { background: #0f172a !important; border-color: #3b4b63; color: var(--ink); }
body.dark .dash-dock { background: rgba(30,41,59,.92); }
body.dark .btn.subtle, body.dark .btn.ghost-danger { background: var(--card); color: var(--ink); }
body.dark .btn.subtle:hover { background: var(--bg); }
body.dark .btn.ghost-danger { color: #fca5a5; border-color: #7f1d1d; }
body.dark .cal thead th, body.dark .cal thead th.name, body.dark .cal tbody th.name, body.dark .cal thead th.sum, body.dark .cal tbody td.sum { background: #172033; }
body.dark .cal td.off { background: repeating-linear-gradient(45deg,#0f172a,#0f172a 4px,#172033 4px,#172033 8px); }
body.dark .tbl th, body.dark .tbl tr.bg-subtotal td { background: #172033; }
body.dark .tbl tbody tr:hover { background: #172033; }
body.dark .pbar { background: #334155; }
body.dark .toast { background: #e2e8f0; color: #0f172a; }
body.dark .toast.err { background: #7f1d1d; color: #fff; }
body.dark .chip.brand { color: #c7d2fe; }
body.dark .chip.green { color: #a7f3d0; } body.dark .chip.amber { color: #fde68a; }
body.dark .chip.red { color: #fecaca; } body.dark .chip.blue { color: #bfdbfe; } body.dark .chip.gray { color: #e2e8f0; }
body.dark .banner.info { background: #1e1b4b; color: #c7d2fe; border-color: #3730a3; }
body.dark .banner.warn { background: #451a03; color: #fde68a; border-color: #92400e; }
body.dark .drag-handle { background: var(--bg); color: var(--sub); }
body.dark .login-hint { background: var(--bg); }
body.dark .modal-close { background: var(--bg); color: var(--sub); }
body.dark .bg-forecast, body.dark .bg-plan-row span { color: var(--sub); }
body.dark .bg-funding { background: linear-gradient(180deg, rgba(99,102,241,.08), transparent); border-color: var(--line); }
body.dark .bf-legend .bf-self { color: #fde68a; }
body.dark .bg-forecast b { color: var(--ink); }
body.dark ::-webkit-scrollbar-thumb { background: #475569; border-color: var(--bg); }

/* ============================================================
   다크모드 가독성 보강 (v1.11) — 표·셀·보조글자 대비
   핵심 수정: .tbl-wrap/.cal-wrap가 흰색 하드코딩이라 다크에서
   흰 글자(=var(--ink))와 겹쳐 안 보이던 것을 카드색으로 교체
   ============================================================ */
body.dark { --sub: #a8b8d0; }
body.dark .tbl-wrap, body.dark .cal-wrap { background: var(--card); }
body.dark .tbl td { border-bottom-color: #2a3a55; }
body.dark .cal th, body.dark .cal td { border-color: #2a3a55; }
body.dark .board-row { border-bottom-color: #2a3a55; }
body.dark .board-row:hover, body.dark .list-plain li:hover { background: #172033; }
body.dark .list-plain li { border-bottom-color: #2a3a55; }
body.dark .alerts-pop .ap-item { border-bottom-color: #2a3a55; }
body.dark .cal td.early { background: #0c4a6e; color: #bae6fd; }
body.dark .cal td.mil { background: #581c87; color: #f3e8ff; }
body.dark .cal td.holwork { background: #3b0764; color: #e9d5ff; }
body.dark .cal td.half { background: #312e81; color: #c7d2fe; }
body.dark .cal td.norec { color: #64748b; }
body.dark .calw .ev.mil { background: #581c87; color: #f3e8ff; }
body.dark .calw .d.off { background: #0b1120; border-color: #1e293b; }
body.dark .stat .ic.gray { background: #334155; }
body.dark .dash-dock .dock-chip { background: var(--card); }
/* 범례 색견본(인라인 파스텔)은 다크에서 어둡게 보정 */
body.dark .legend .sq { filter: brightness(.48) saturate(1.5); border-color: rgba(255,255,255,.14); }

/* ============================================================
   자료실 (특허증·카탈로그 갤러리)
   ============================================================ */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.lib-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; cursor: pointer; transition: transform .14s ease, box-shadow .16s ease, border-color .14s ease; }
.lib-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16,24,40,.13); border-color: var(--brand-2); }
.lib-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lib-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; } /* contain — 사진이 잘리지 않게 전체가 보임 */
.lib-thumb .lib-pdf { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; background: #fff; } /* PDF 첫 페이지 썸네일 (v1.37.2) — 클릭은 카드(상세)로 통과 */
.lib-noimg { font-size: 46px; opacity: .55; }
.lib-document-cover{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:22px;text-align:center;min-width:0;max-width:100%}.lib-document-cover>span{font-size:38px}.lib-document-cover small{font-size:12px;color:var(--sub);overflow-wrap:anywhere;max-width:100%}.lib-card-open{border:0;background:none;color:inherit;font:inherit;font-weight:700;text-align:left;padding:0;cursor:pointer;overflow-wrap:anywhere}
.lib-more { position: absolute; right: 8px; bottom: 8px; background: rgba(15,23,42,.72); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.lib-label { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.lib-label b { font-size: 13.8px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lib-sub { font-size: 12px; color: var(--sub); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lib-view { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.lib-view img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.lib-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 20px 12px; text-align: center; color: var(--sub); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; line-height: 1.7; }
.lib-drop:hover, .lib-drop.over { border-color: var(--brand-2); background: var(--brand-soft); }
.lib-file-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; margin-top: 6px; font-size: 13px; background: var(--card); }
.lib-file-row .sz { color: var(--sub); font-size: 11.5px; flex-shrink: 0; }
.lib-file-row .grow { flex: 1; min-width: 0; }
body.dark .lib-card { border-color: #3e4f6d; }

/* ============================================================
   사업비 — 월별 집행 차트 (v1.12) + 내비 메뉴 편집
   ============================================================ */
.bg-chart { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0 4px; background: var(--bg); }
.bch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13.5px; }
.bch-leg { font-size: 12px; color: var(--sub); display: inline-flex; align-items: center; font-weight: 600; }
.bch-leg .sq { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bch-row { display: flex; align-items: flex-end; gap: 4px; min-height: 104px; }
.bch-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; cursor: help; }
.bch-bar { width: 100%; max-width: 42px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 5px 5px 0 0; overflow: hidden; background: var(--line); }
.bch-cash { background: linear-gradient(180deg, #818cf8, #4f46e5); width: 100%; }
.bch-ink { background: linear-gradient(180deg, #c084fc, #7e22ce); width: 100%; }
.bch-lb { font-size: 10.5px; color: var(--sub); font-weight: 700; }
/* 내비 메뉴 편집 행 */
.ne-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: var(--card); }
.ne-row .ne-ic { width: 22px; text-align: center; }
.ne-row .grow { flex: 1; min-width: 0; font-size: 13.8px; }
.ne-row .btn.sm { min-width: 34px; }
.ne-row.dragging { border-color: var(--brand); box-shadow: 0 16px 36px rgba(15,23,42,.22); background: var(--card, #fff); }
/* ⠿ 견적 품목 번호칸 = 드래그 손잡이 (v1.106.0) */
.qt-item .qf-no { cursor: grab; touch-action: none; user-select: none; text-align: center; }
.qt-item .qf-no:active { cursor: grabbing; }
.qt-item.dragging { border-radius: 10px; background: var(--card, #fff); box-shadow: 0 16px 36px rgba(15,23,42,.22); }
/* ⠿ 청구 내역 행 드래그 (v1.106.0) */
.gm-line.dragging { border-radius: 8px; background: var(--card, #fff); box-shadow: 0 14px 30px rgba(15,23,42,.2); padding: 4px 6px; }

/* ============================================================
   일일 업무보고 — 카톡형 메신저 (v1.13)
   ============================================================ */
.chat-scroll { max-height: calc(100vh - 300px); min-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 16px 14px; display: flex; flex-direction: column; gap: 4px; }
.chat-date { align-self: center; background: var(--card); border: 1px solid var(--line); color: var(--sub); font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 12px; margin: 12px 0 8px; }
.chat-date:first-child { margin-top: 0; }
.msg-row { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-avatar { width: 36px; height: 36px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.msg-main { max-width: 78%; min-width: 0; display: flex; flex-direction: column; }
.msg-row.mine .msg-main { align-items: flex-end; }
.msg-name { font-size: 12px; color: var(--sub); font-weight: 600; margin: 0 2px 3px; }
.msg-bubble { background: var(--card); border: 1px solid var(--line); border-radius: 14px; border-top-left-radius: 4px; padding: 10px 13px; box-shadow: var(--shadow); min-width: 0; }
.msg-row.mine .msg-bubble { border-top-left-radius: 14px; border-top-right-radius: 4px; background: var(--brand-soft); border-color: transparent; }
.msg-text { font-size: 13.8px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.msg-sub { display: flex; flex-direction: column; gap: 1px; margin-top: 7px; padding-top: 6px; border-top: 1px dashed var(--line); }
.msg-sub b { font-size: 11px; color: var(--sub); letter-spacing: .3px; }
.msg-sub span { font-size: 12.8px; white-space: pre-wrap; color: var(--ink); opacity: .92; }
.msg-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 5px; margin-top: 8px; }
.msg-thumbs img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg); border-radius: 9px; cursor: zoom-in; border: 1px solid var(--line); transition: transform .12s ease; } /* contain — 첨부 사진 전체가 보임 */
.msg-thumbs img:hover { transform: scale(1.03); }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-filechip { display: inline-flex; align-items: center; gap: 5px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 5px 10px; font-size: 12.3px; font-weight: 600; color: var(--ink); text-decoration: none; }
.msg-filechip span { color: var(--sub); font-size: 10.5px; font-weight: 500; }
.msg-filechip:hover { border-color: var(--brand-2); }
.msg-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.msg-time { font-size: 11px; color: var(--sub); font-variant-numeric: tabular-nums; }
.msg-act { border: none; background: transparent; color: var(--brand); font-size: 11.5px; font-weight: 700; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.msg-act:hover { background: var(--brand-soft); }
.msg-act.danger { color: var(--red); }
.msg-act.danger:hover { background: var(--red-bg); }
/* 답장 (코멘트) — 말풍선 안에 배기는 대화 */
.msg-reply { background: var(--bg); border-left: 3px solid var(--brand-2); border-radius: 8px; padding: 6px 10px; margin-top: 7px; }
.msg-reply.own { border-left-color: var(--green); }
.mr-head { display: flex; align-items: center; gap: 6px; }
.mr-head b { font-size: 12px; }
.mr-time { font-size: 10.5px; color: var(--sub); }
.mr-text { font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.reply-form { display: flex; gap: 6px; margin-top: 8px; }
.reply-form input { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; flex: 1; min-width: 0; background: var(--card); }
/* 하단 입력바 */
.chat-inputbar { position: sticky; bottom: 12px; margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 26px rgba(15,23,42,.13); z-index: 20; }
.cip-review { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cip-review:not(:empty) { padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.cip-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.cip-chip button { border: none; background: transparent; color: var(--red); cursor: pointer; font-size: 12px; padding: 0; }
.cip-row { display: flex; gap: 8px; align-items: flex-end; }
.cip-row textarea { flex: 1; min-width: 0; resize: none; border-radius: 12px; padding: 9px 13px; max-height: 120px; line-height: 1.5; }
.cip-hint { font-size: 11.3px; color: var(--sub); margin-top: 6px; }
/* 다크 대응 */
body.dark .chat-scroll { background: #131c2e; }
body.dark .msg-bubble { border-color: #334155; }
body.dark .msg-row.mine .msg-bubble { background: #312e81; border-color: transparent; }
body.dark .msg-row.mine .msg-bubble .msg-sub { border-top-color: #4338ca; }
body.dark .chat-date { background: #172033; }

/* ============================================================
   첨부 파일 자동 인식 (v1.14)
   ============================================================ */
.msg-lbl { font-size: 11px; color: var(--sub); font-weight: 700; letter-spacing: .3px; margin-bottom: 3px; }
.ex-note { background: var(--brand-soft); color: #4338ca; border-radius: 10px; padding: 8px 12px; font-size: 12.3px; line-height: 1.6; margin-bottom: 10px; }
.ex-note b { font-weight: 800; }
body.dark .ex-note { background: #312e81; color: #c7d2fe; }
/* 계약 제품 항목 동적 행 — 모델명·사이즈·개수·단가·✕ (v1.101.0 단가 추가) */
.ct-item-row { display: grid; grid-template-columns: 1fr 130px 76px 120px 34px; gap: 6px; margin-bottom: 6px; align-items: center; }
.ct-item-row input { padding: 7px 10px; font-size: 13px; }
.ct-item-row input[data-ip] { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .ct-item-row { grid-template-columns: 1fr 1fr; } .ct-item-row button { grid-column: 2; justify-self: end; } }



/* ============================================================
   v1.29.11 — 모바일 글씨 잘림 방지 (전체)
   ============================================================ */
@media (max-width: 700px) {
  /* 목록 행 제목·파일명: 한 줄 말줄임 대신 최대 2줄로 펼쳐 보여주기 */
  .grow { white-space: normal !important; display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; overflow: hidden; }
  /* 사업비 자금구조 바: 좁은 칸에 글자가 양쪽으로 잘리지 않게 —
     바 안 글자는 숨기고 아래 범례(정부지원금/자부담 현금/현물 전체 금액)로 읽게 함 */
  .fbar .seg span { display: none !important; }
  .fbar { height: 22px; }
  /* 카드 머리글: 제목·칩·버튼이 한 줄에 못 들어가면 다음 줄로 (재고 ＋카테고리/＋품목 추가 등) */
  .card-head { flex-wrap: wrap; row-gap: 8px; }
  .card-head .right { margin-left: 0; flex-wrap: wrap; row-gap: 6px; }
}


/* v1.29.13 — 업무보고 날짜 점프 하이라이트 */
@keyframes jumpFlash {
  0% { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px rgba(66, 99, 235, .22); }
  60% { background: rgba(66, 99, 235, .16); color: var(--ink); }
  100% { background: transparent; }
}
.chat-date.jump-flash { animation: jumpFlash 1.7s ease; border-radius: 8px; }


/* ============================================================
   v1.30.1 — 스켈레톤 로딩 + 근태표 머리글·이름열 고정 (노션식)
   ============================================================ */
.skel-wrap { display: grid; gap: 14px; }
.skel-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 18px; display: grid; gap: 10px; }
.skel-l { height: 13px; border-radius: 7px; background: var(--line); animation: skelPulse 1.05s ease-in-out infinite; }
@keyframes skelPulse { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .skel-l { animation: none; opacity: .6; } }

/* 근태 달력표 — 세로로 스크롤해도 날짜 머리글과 직원명 열이 고정 */
.cal-wrap { max-height: 72vh; overflow: auto; }
.cal thead th { position: sticky; top: 0; z-index: 5; }
.cal thead th.name { z-index: 6; }
.cal .name { position: sticky; left: 0; background: var(--card); z-index: 4; }
.cal thead .name { background: #f8fafc; }


/* v1.31.1 — 재고 목록 카드형 (사진 좌측 크게, 안 눌러도 보이게) */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.inv-card { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 10px; }
.inv-thumb { position: relative; flex: 0 0 104px; width: 104px; height: 104px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.inv-thumb img { width: 100%; height: 100%; object-fit: contain; } /* contain — 제품 사진이 잘리지 않게 전체가 보임 */
.inv-pcnt { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; border-radius: 6px; padding: 1px 5px; }
.inv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.inv-name { font-weight: 700; font-size: 14px; }
.inv-meta { font-size: 12.5px; color: var(--sub); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.inv-memo { font-size: 12px; color: var(--sub); }
.inv-last { font-size: 11.5px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-acts { margin-top: auto; display: flex; gap: 4px; flex-wrap: wrap; padding-top: 6px; }
@media (max-width: 700px) { .inv-grid { grid-template-columns: 1fr; } }


/* v1.31.3 — 재고 보기 방식: 크게 / 세로 목록 */
.inv-grid.big { grid-template-columns: minmax(420px, 1fr); }
.inv-grid.big .inv-thumb { flex-basis: 150px; width: 150px; height: 150px; }
.inv-grid.big .inv-name { font-size: 16px; }
.inv-grid.big .inv-meta b { font-size: 22px; }
.inv-grid.list { grid-template-columns: 1fr; gap: 6px; }
.inv-grid.list .inv-card { padding: 6px 10px; gap: 10px; align-items: center; }
.inv-grid.list .inv-thumb { flex-basis: 44px; width: 44px; height: 44px; border-radius: 8px; }
.inv-grid.list .inv-body { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.inv-grid.list .inv-name { font-size: 13.5px; }
.inv-grid.list .inv-memo, .inv-grid.list .inv-last { display: none; }
.inv-grid.list .inv-meta { margin-left: auto; }
.inv-grid.list .inv-acts { margin-top: 0; padding-top: 0; margin-left: auto; }
@media (max-width: 700px) { .inv-grid.big { grid-template-columns: 1fr; } }

/* ============================================================
   견적서 만들기 (v1.49.4) — 데스크톱 표형 / 모바일 카드형 겸용
   ============================================================ */
.qt-grid4 { display: grid; grid-template-columns: 1.4fr 1fr 1fr .7fr; gap: 8px; }
@media (max-width: 980px) { .qt-grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .qt-grid4 { grid-template-columns: 1fr; } }

/* 품목 입력 — 카드형(모든 폭, v1.50.7): 작성 모달이 760px라 9칸 표는 데스크톱에서도 빡빡 → 칸 정렬 문제 근본 제거 */
.qt-grid-head { display: none; }
.qt-item {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 6px; padding: 12px 10px 10px;
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
  position: relative; background: var(--card, #fff);
}
.qt-item .qfl { display: block; font-size: 11px; color: var(--sub); font-weight: 600; margin-bottom: 3px; }
.qt-item .qf-no { position: absolute; top: 0; right: 42px; min-width: 36px; min-height: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12.5px; color: var(--sub); touch-action: none; cursor: grab; } /* v1.106.3 — 손가락 터치 크기로 */
.qt-item .qf-rm { position: absolute; top: 6px; right: 6px; }
.qt-item .qf-name { grid-column: 1 / -1; padding-right: 100px; }
.qt-item .qf-spec { grid-column: 1 / -1; }
.qt-item .qf-price { grid-column: span 2; }
.qt-item .qf-disc { grid-column: span 2; }
.qt-item .qf-amt {
  grid-column: span 2; text-align: left;
  background: var(--bg); border-radius: 8px; padding: 8px 10px;
}
.qt-item .qf-amt .qfl { margin-bottom: 1px; }
.qt-item .qf-amt b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qt-item input, .qt-item select { width: 100%; min-width: 0; padding: 7px 8px; }
.qt-item .qf-qty input, .qt-item .qf-price input { text-align: right; }
.qt-item .qf-unit input { text-align: center; }
.qt-empty {
  border: 1.5px dashed var(--line); border-radius: 10px; text-align: center;
  color: var(--sub); padding: 18px 10px; font-size: 13px; background: var(--bg);
}
@media (min-width: 640px) {
  /* 넓은 화면에선 카드 안 배치만 여유 있게 (2단: 상단 이름/규격, 하단 수치) */
  .qt-item { grid-template-columns: 84px 64px 1fr 1fr 90px 64px 112px; }
  .qt-item .qf-name { grid-column: 1 / -1; }
  .qt-item .qf-spec { grid-column: 1 / 3; }
  .qt-item .qf-unit { grid-column: 3; }
  .qt-item .qf-qty { grid-column: 4; }
  .qt-item .qf-price { grid-column: 5; }
  .qt-item .qf-disc { grid-column: 6; }
  .qt-item .qf-amt { grid-column: 7; }
}
.qt-pdf-frame { height: 64vh; }

/* 견적 목록 — 모바일(≤700px): 행별 카드 */
@media (max-width: 700px) {
  .qt-list, .qt-list tbody { display: block; }
  .qt-list { border: none; overflow: visible; }
  .qt-list thead { display: none; }
  .qt-list tr {
    display: block; border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; margin-bottom: 10px; background: var(--card, #fff);
    box-shadow: 0 1px 3px rgba(20, 25, 40, .05);
  }
  .qt-list td { display: block; border: none; padding: 2px 0; text-align: left !important; }
  .qt-list .qc-no { display: flex; align-items: baseline; gap: 8px; }
  .qt-list .qc-no b { font-size: 15.5px; }
  .qt-list .qc-date { color: var(--sub); font-size: 12.5px; }
  .qt-list .qc-client { font-size: 14px; font-weight: 600; }
  .qt-list .qc-count { color: var(--sub); font-size: 12.5px; }
  .qt-list .qc-total { font-size: 16px; }
  .qt-list .qc-st select { font-size: 13px; padding: 5px 8px; }
  .qt-list .qc-actions {
    display: flex; gap: 6px; flex-wrap: wrap;
    border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 10px;
  }
  .qt-list .qc-actions .btn { flex: 1 1 auto; }
}

/* ============================================================
   SaaS 폴리시 (v1.58.0) — 카드 호버 리프트·버튼 그라디언트·표 행 호버·
   스크롤바·포커스 링·빈 상태·사이드바 파일 정돈 (기존 스타일 위에 얹음)
   ============================================================ */

/* 카드 — 미묘한 리프트 + 테두리 강조 */
.card {
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(27,36,48,.04);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: 0 4px 14px rgba(27,36,48,.07), 0 1px 3px rgba(27,36,48,.04); border-color: #c8d1e0; }

/* 통계 카드 — 호버 시 살짝 떠오름 + 아이콘 배경 그라디언트 */
.stat {
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  cursor: default;
}
.stat.clickable { cursor: pointer; }
.stat.clickable:hover, .stat[data-inswk]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(27,36,48,.09);
  border-color: var(--brand-2);
}
.stat .ic {
  transition: transform .18s ease;
}
.stat:hover .ic { transform: scale(1.06); }

/* 버튼 — 프라이머리에 미묘한 그라디언트 */
.btn:not(.subtle):not(.ghost-danger) {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  border: none;
  box-shadow: 0 1px 3px rgba(66,99,235,.25);
  transition: filter .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:not(.subtle):not(.ghost-danger):hover {
  filter: brightness(1.08);
  box-shadow: 0 2px 6px rgba(66,99,235,.3);
}
.btn:not(.subtle):not(.ghost-danger):active { transform: scale(.97); }
.btn.subtle {
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  border: 1px solid var(--line);
}
.btn.subtle:hover { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand); }

/* 표 — 행 호버 하이라이트 + 헤더 배경 */
.tbl thead th {
  background: #f8fafd;
  border-bottom: 2px solid var(--line);
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
}
.tbl tbody tr { transition: background .12s ease; }
.tbl tbody tr:hover { background: #f4f7fd; }
.tbl tbody tr[data-conrow]:hover, .tbl tbody tr[data-insrow]:hover { background: var(--brand-soft); }

/* 사이드바 — 활성 링크 필 통일 */
#sidebar a.on, #sidebar a[aria-current="page"] {
  background: var(--brand-soft);
  border-radius: 10px;
  color: var(--brand);
  font-weight: 700;
  position: relative;
}
#sidebar a.on::before {
  content: '';
  position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 2px; background: var(--brand);
}

/* 입력창 — 포커스 링 */
input[type="text"], input[type="search"], input[type="date"], input[type="number"],
input[type="time"], input[type="password"], select, textarea {
  transition: border-color .15s ease, box-shadow .15s ease;
  border: 1.5px solid var(--line);
  border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(66,99,235,.12);
  outline: none;
}

/* 빈 상태 — 중앙 정렬 + 아이콘 */
.empty { text-align: center; color: var(--sub); }
.empty .big { font-size: 36px; margin-bottom: 8px; opacity: .6; }

/* 배너 — 둥근 모서리 + 그림자 */
.banner { border-radius: 10px; border: 1px solid; }
.banner.info { background: #eff6ff; border-color: #bfdbfe; }
.banner.warn { background: #fffbeb; border-color: #fde68a; }
.banner.danger { background: #fef2f2; border-color: #fecaca; }

/* 스크롤바 — 얇고 모던 (WebKit) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 진행 바 — 부드러운 그라디언트 */
.pbar { border-radius: 99px; overflow: hidden; background: #e8edf3; }
.pfill { border-radius: 99px; transition: width .3s ease; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%); }
.pfill.over { background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%); }

/* 칩 — 부드러운 그림자 */
.chip { transition: filter .12s ease; }
.chip:hover { filter: brightness(.95); }

/* 모바일 폴리시 — 터치 타겟·모달·safe-area (v1.58.0) */
@media (max-width: 700px) {
  .btn { min-height: 40px; font-size: 14px; }
  .btn.sm { min-height: 34px; }
  .stat .num { font-size: 20px; }
  .stat .lbl { font-size: 11.5px; }
  .stat .ic { width: 40px; height: 40px; font-size: 19px; }
  .modal-overlay { padding: 6px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 16px); border-radius: 16px 16px 12px 12px; }
  .modal-foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .tbl thead th { font-size: 11px; padding: 7px 6px; }
  .tbl td { padding: 7px 6px; font-size: 13px; }
  .toolbar { gap: 6px; }
  .toolbar .btn, .toolbar select { font-size: 13px; }
  .card-head h3 { font-size: 15px; }
  .stat-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .stat { padding: 12px; }
  #sidebar { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .empty { padding: 24px 14px; font-size: 13.5px; }
  .empty .big { font-size: 32px; }
}

/* ============================================================
   모션 디자인 (v1.63.0 — 사장: "모션디자인도 이쁘게 넣어주고")
   ============================================================ */

/* 화면 전환 — 부드러운 슬라이드+페이드 (기존 viewIn 강화) */
#view > * { animation: viewSlide .3s cubic-bezier(.22,1,.36,1); }
@keyframes viewSlide {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 통계 카드 순차 등장 — 시차 두고 하나씩 나타남 */
.stat-grid .stat {
  animation: statStagger .35s cubic-bezier(.22,1,.36,1) backwards;
}
.stat-grid .stat:nth-child(1) { animation-delay: 0s; }
.stat-grid .stat:nth-child(2) { animation-delay: .06s; }
.stat-grid .stat:nth-child(3) { animation-delay: .12s; }
.stat-grid .stat:nth-child(4) { animation-delay: .18s; }
.stat-grid .stat:nth-child(5) { animation-delay: .24s; }
.stat-grid .stat:nth-child(6) { animation-delay: .30s; }
.stat-grid .stat:nth-child(7) { animation-delay: .36s; }
.stat-grid .stat:nth-child(8) { animation-delay: .42s; }
@keyframes statStagger {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 카드 내부 콘텐츠 순차 등장 */
.card { animation: cardIn .3s cubic-bezier(.22,1,.36,1) backwards; }
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .1s; }
.card:nth-child(4) { animation-delay: .15s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
}

/* 토스트 — 아래에서 탄력 있게 튀어오름 + 나갈 때 축소 */
.toast {
  animation: toastBounce .35s cubic-bezier(.28,1.6,.4,1);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.hide { opacity: 0; transform: translateX(-50%) scale(.9) translateY(10px); }
@keyframes toastBounce {
  from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.9); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 모달 — 위에서 내려오며 열림 + 배경 페이드 (기존 강화) */
.modal-overlay { animation: ovFade .18s ease; }
.modal { animation: modalDrop .25s cubic-bezier(.22,1,.36,1); }
@keyframes ovFade { from { opacity: 0; } }
@keyframes modalDrop {
  from { opacity: 0; transform: translateY(-14px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 표 행 — 하나씩 순차 등장 */
.tbl tbody tr { animation: rowIn .22s ease backwards; }
.tbl tbody tr:nth-child(1) { animation-delay: 0s; }
.tbl tbody tr:nth-child(2) { animation-delay: .02s; }
.tbl tbody tr:nth-child(3) { animation-delay: .04s; }
.tbl tbody tr:nth-child(4) { animation-delay: .06s; }
.tbl tbody tr:nth-child(5) { animation-delay: .08s; }
.tbl tbody tr:nth-child(6) { animation-delay: .10s; }
.tbl tbody tr:nth-child(7) { animation-delay: .12s; }
.tbl tbody tr:nth-child(8) { animation-delay: .14s; }
.tbl tbody tr:nth-child(9) { animation-delay: .16s; }
.tbl tbody tr:nth-child(10) { animation-delay: .18s; }
@keyframes rowIn {
  from { opacity: 0; transform: translateX(-6px); }
}

/* 탭 버튼 — 활성 전환 시 부드럽게 */
.tabs button, .toolbar .btn.sm {
  transition: all .15s cubic-bezier(.22,1,.36,1);
}
.tabs button.on {
  animation: tabPop .2s cubic-bezier(.28,1.4,.4,1);
}
@keyframes tabPop {
  0% { transform: scale(.95); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* 진행 바 — 폭 변화에 스프링 효과 */
.pfill {
  transition: width .4s cubic-bezier(.34,1.3,.5,1);
}

/* 배너 — 등장 시 슬라이드인 */
.banner { animation: bannerIn .28s cubic-bezier(.22,1,.36,1) backwards; }
@keyframes bannerIn {
  from { opacity: 0; transform: translateY(-8px); }
}

/* 통계 숫자 카운트업 (JS에서 .num[data-count]에 적용) */
.stat .num { font-variant-numeric: tabular-nums; }

/* 반응 애니메이션 존중 (접근성) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* 담당자 다중 행 (v1.91.1 — 부서·전화·이메일 겹침 수정: sl-item 그리드와 분리) */
.ctp-row { display: grid; grid-template-columns: 130px 170px 170px 1fr 34px; gap: 6px; align-items: center; margin-bottom: 6px; }
.ctp-row input { width: 100%; min-width: 0; }
@media (max-width: 700px) {
  .ctp-row { grid-template-columns: 1fr 1fr 34px; }
  .ctp-row .ctp-email { grid-column: 1 / span 2; }
}


/* 담당자 표식 정렬 (v1.91.2 — 줄 추가돼도 차분하게) */
.ctp-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.ctp-head { display: grid; grid-template-columns: 130px 170px 170px 1fr 34px; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--sub); padding-bottom: 6px; border-bottom: 1px dashed var(--line); margin-bottom: 6px; }
.ctp-row { display: grid; grid-template-columns: 130px 170px 170px 1fr 34px; gap: 6px; align-items: center; padding: 3px 0; border-bottom: 1px solid #f1f5f9; }
.ctp-row:last-child { border-bottom: none; }
.ctp-row input { width: 100%; min-width: 0; }
.ctp-head { position: sticky; top: 0; background: #fff; z-index: 1; }
@media (max-width: 700px) {
  .ctp-list { max-height: 220px; }
  .ctp-head, .ctp-row { grid-template-columns: 1fr 1fr 34px; }
  .ctp-head span:nth-child(3), .ctp-row .ctp-phone { grid-column: 1; }
  .ctp-head span:nth-child(4), .ctp-row .ctp-email { grid-column: 2; }
  .ctp-head span:nth-child(4) { grid-row: 2; }
  .ctp-row .ctp-email { grid-row: 2; }
}

/* 담당자 동그라미 칩 (v1.92.0 — 카톡 프로필식: 거래처명 아래) */
.ct-pchip { display:inline-flex; align-items:center; gap:5px; background:var(--bg); border:1px solid var(--line); border-radius:20px; padding:2px 9px 2px 2px; font-size:12px; cursor:pointer; max-width:170px; overflow:hidden; white-space:nowrap; }
.ct-pchip:hover { border-color:var(--brand); }
.ct-ava { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; background:var(--brand); color:#fff; font-size:11px; font-weight:700; flex:none; }

/* ⚡ 추가근무 (v1.115.0 — 사장: "추가 근무한 시간 체크하기 편하게 만들어줘") */
.chip.orange { background: #ffedd5; color: #9a3412; }
body.dark .chip.orange { background: #431407; color: #fdba74; }
.cal td.day .out.ot { color: #c2410c; font-weight: 800; opacity: 1; }
body.dark .cal td.day .out.ot { color: #fdba74; }
/* 추가근무 보기 — 칸 색이 진할수록 오래 남은 날 */
.cal td.day.ot0 { background: #f0fdf4; color: #86b89a; }
.cal td.day.ot1 { background: #ffedd5; color: #9a3412; }
.cal td.day.ot2 { background: #fdba74; color: #7c2d12; }
.cal td.day.ot3 { background: #f97316; color: #fff; }
.cal td.day.otq { background: #f8fafc; color: #64748b; font-weight: 800; font-size: 12px; }
.cal td.day.otc { font-size: 11px; font-weight: 800; letter-spacing: -.2px; }
body.dark .cal td.day.ot0 { background: #052e16; color: #4d7c5f; }
body.dark .cal td.day.ot1 { background: #431407; color: #fdba74; }
body.dark .cal td.day.ot2 { background: #9a3412; color: #ffedd5; }
body.dark .cal td.day.ot3 { background: #ea580c; color: #fff; }
body.dark .cal td.day.otq { background: #0f172a; color: #94a3b8; }
.cal tbody td.sum.otsum { color: #c2410c; cursor: pointer; }
.cal tbody td.sum.otsum:hover { text-decoration: underline; }
body.dark .cal tbody td.sum.otsum { color: #fb923c; }
.cal.otmode thead th.sum.ot, .cal.otmode tbody td.sum.otsum { background: #fff7ed; }
body.dark .cal.otmode thead th.sum.ot, body.dark .cal.otmode tbody td.sum.otsum { background: #2a1708; }
/* 이 달 추가근무 요약 카드 */
.ot-card { padding: 14px 18px; }
.ot-card .ot-top { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.ot-card .ot-ttl { font-size: 14px; }
.ot-card .ot-big { font-size: 21px; font-weight: 800; color: #c2410c; font-variant-numeric: tabular-nums; }
.ot-card .ot-split { color: var(--sub); font-size: 12.5px; }
.ot-card .ot-top .btn { align-self: center; }
.ot-card .ot-rule { color: var(--sub); font-size: 11.5px; margin: 4px 0 8px; }
body.dark .ot-card .ot-big { color: #fb923c; }
.ot-rows { display: flex; flex-direction: column; gap: 2px; }
.ot-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.ot-row:hover { background: #fff7ed; }
body.dark .ot-row:hover { background: #2a1708; }
.ot-row .nm { flex: 0 0 76px; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-row .bar { flex: 1; min-width: 40px; height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
body.dark .ot-row .bar { background: #1e293b; }
.ot-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #fdba74, #f97316); border-radius: 999px; }
.ot-row .v { flex: 0 0 auto; min-width: 84px; text-align: right; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ot-row .dd { flex: 0 0 34px; text-align: right; color: var(--sub); font-size: 11.5px; white-space: nowrap; }
.ot-row.zero .v { color: var(--sub); font-weight: 600; }
.ot-card .ot-warn { margin: 10px 0 0; font-size: 12.5px; }
/* 날짜별 내역 팝업 — 합계 4칸 */
.ot-sumrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.ot-sumrow > div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ot-sumrow span { font-size: 11.5px; color: var(--sub); }
.ot-sumrow b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 700px) {
  .ot-sumrow { grid-template-columns: repeat(2, 1fr); }
  .ot-card { padding: 12px 14px; }
  .ot-card .ot-big { font-size: 19px; }
  .ot-row { gap: 8px; padding: 6px 4px; }
  .ot-row .nm { flex-basis: 60px; font-size: 12.5px; }
  .ot-row .v { min-width: 74px; font-size: 12.5px; }
}

/* v1.115.0 검수 보강 — 경고 박스 안 span은 폭 꽉 차게(플렉스 쪼개짐 방지), 다크모드 대비 */
.ot-warn span { flex: 1; min-width: 0; }
body.dark .ot-row .dd { color: #cbd5e1; }
body.dark .legend .sq { border-color: rgba(255,255,255,.32); }

/* 👥 보고 직원 체크 필터 (v1.116.0) */
.btn.subtle.sm.brandon { background: var(--brand-soft); color: #4338ca; border-color: #c7d2fe; font-weight: 700; }
body.dark .btn.subtle.sm.brandon { background: #312e81; color: #c7d2fe; border-color: #4338ca; }
.pick-emp-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 52vh; overflow: auto; }
.pick-emp { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; cursor: pointer; background: var(--card); }
.pick-emp:hover { border-color: var(--brand); }
.pick-emp input { width: 17px; height: 17px; flex: none; accent-color: var(--brand); }
.pick-emp .nm { font-weight: 700; font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .pick-emp-list { grid-template-columns: repeat(2, 1fr); } }

/* 👤 직원 상세 카드 (v1.117.0) */
.emp-name { cursor: pointer; }
.emp-name:hover { color: var(--brand); text-decoration: underline; }
.prof-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.prof-ava { flex: none; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #6366f1, #4338ca); }
.prof-hmain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.prof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.prof-grid > div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prof-grid span { font-size: 11.5px; color: var(--sub); }
.prof-grid b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-grid a { color: var(--brand); font-weight: 700; }
.prof-sec { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; margin: 14px 0 8px; }
.prof-rep { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: var(--card); }
@media (max-width: 700px) {
  .prof-grid { grid-template-columns: repeat(2, 1fr); }
}

/* v1.117.0 검수 보강 — 직원 명부표는 열이 많아 최소폭 보장(좁은 화면에서 찌그러짐 방지, 가로 스크롤) + 카드 소제목 줄바꿈 */
.tbl-emps { min-width: 1080px; }
.prof-sec { flex-wrap: wrap; }

/* v1.117.0 — 직원 명부 이름·회사 열은 무조건 한 줄 (찌그러짐 방지) */
.tbl-emps td:nth-child(1), .tbl-emps td:nth-child(4) { white-space: nowrap; }

/* 👤 보고 볼 사람 체크 칩 (v1.119.3) */
.rep-empchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.emp-chip { border: 1px solid var(--line); background: var(--bg); color: var(--sub); border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .12s ease; }
.emp-chip:hover { border-color: var(--brand); transform: translateY(-1px); }
.emp-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
body.dark .emp-chip { background: #172033; color: #cbd5e1; }
body.dark .emp-chip.on { background: var(--brand); color: #fff; }
@media (max-width: 700px) { .rep-empchips { padding: 8px 10px; gap: 5px; } .emp-chip { padding: 4px 11px; font-size: 12.5px; } }

/* ═══ v1.123.0 깜빡임 제거 — 자연스러운 화면 전환 ═══ */

/* ① 뷰 전환 — 부드러운 페이드인 (route() 호출 시) */
#view > * { animation: viewFadeIn .18s cubic-bezier(.22,1,.36,1) backwards; }
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ② 검색 결과 목록 갱신 — 미세한 페이드 (innerHTML 교체 시 순간 공백 방지) */
.list-refresh { animation: listRefresh .15s cubic-bezier(.22,1,.36,1) backwards; }
@keyframes listRefresh { from { opacity: .3; } to { opacity: 1; } }

/* ③ 스켈레톤 — 덜 자극적으로 */
.skeleton { animation: skelPulse 1.2s ease-in-out infinite; }
@keyframes skelPulse { 0%,100% { opacity: .45; } 50% { opacity: .25; } }

/* ④ 모바일 — 터치 반응 최적화 */
@media (max-width: 700px) {
  #view > * { animation-duration: .22s; }
  .list-refresh { animation-duration: .18s; }
}
body.dark #view > * { animation-name: viewFadeInDark; }
@keyframes viewFadeInDark { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ⑤ 버튼·칩 클릭 시 시각 피드백 (즉각 반응 느낌) */
.btn:not(:disabled):active, .chip:not(:disabled):active, .emp-chip:not(:disabled):active, .tabs button:not(:disabled):active {
  transform: scale(.97);
  transition: transform .06s ease;
}
/* 접근성 — 애니메이션 감소 설정 존중 */
@media (prefers-reduced-motion: reduce) {
  #view > *, .list-refresh, .skeleton { animation: none !important; }
}

/* Routine updates stay visible: no repeated opacity/stagger animation. */
#view > *, body.dark #view > *, .card, .stat, .tbl tbody tr, .banner,
.list-refresh, .skeleton, .skel-l { animation: none !important; }
[hidden] { display: none !important; }
#routeStatus { position:fixed; bottom:80px; right:16px; z-index:30; padding:8px 16px; background:var(--card,#fff); border:1px solid var(--line); border-radius:8px; color:var(--sub); font-size:13px; pointer-events:none; }
#uploadStatus { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); right: 16px; z-index: 12000; width: min(360px, calc(100vw - 32px)); max-height: 35dvh; overflow: auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 24px #0002; padding: 12px; }
.upload-job + .upload-job { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.upload-name { font-weight: 600; overflow-wrap: anywhere; }
.upload-message { font-size: 12px; color: var(--sub); margin: 5px 0; }
.upload-job progress { width: 100%; accent-color: var(--brand); }
.document-editor-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 10px 0; min-width: 0; }
.block-tools, .block-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 5px 0 10px; }
.block-tools { font-size: 12px; }
.block-tools button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: inherit; cursor: pointer; }
.block-tools button:disabled { opacity: .4; cursor: default; }
.document-editor-block textarea { width: 100%; resize: vertical; }
.block-check { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.block-check input { width: auto; }
.block-table { border-collapse: collapse; width: 100%; }
.block-table input { width: 100%; min-width: 110px; }
.block-table td { padding: 3px; }
.document-blocks { overflow-wrap: anywhere; line-height: 1.7; }
.document-blocks p, .document-blocks h3, .document-check { white-space: pre-wrap; }
.document-blocks h3 { margin: 20px 0 8px; }
.document-check { display: flex; gap: 10px; margin: 8px 0; }
.document-blocks hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
button.lib-drop { width: 100%; color: inherit; font: inherit; }
.modal-body, .field, .row2 > *, .row3 > * { min-width: 0; }
.two-col > *, .card { min-width: 0; }
.desc { overflow-wrap: anywhere; }
.modal-body input[type=file] { max-width: 100%; }
@media (max-width: 700px) {
  .modal-overlay { padding: 8px; }
  .modal, .modal.wide { width: 100%; max-width: 100%; max-height: calc(100dvh - 16px); }
  .modal-body { overflow-x: hidden; }
  .modal input:not([type=checkbox]):not([type=radio]), .modal textarea, .modal select, .search-input { font-size: 16px; }
  .block-tools button { min-height: 40px; }
  .lib-file-row .grow { min-width: 0; }
  .toolbar > *, #view { max-width: 100%; }
  #view input[type=file] { min-width: 0; max-width: 100%; }
  .list-plain li { flex-wrap: wrap; }
  .list-plain li > .grow { min-width: 0; overflow-wrap: anywhere; }
  .list-plain li:has([data-cobiz]) > .grow { flex-basis: calc(100% - 54px); white-space: normal; }
  #uploadStatus { bottom: max(96px, calc(env(safe-area-inset-bottom) + 88px)); max-height: 24dvh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}
/* Personal workspace and document organization */
body[data-content-width="full"] .content{max-width:none}
body[data-content-width="reading"] .content{max-width:1120px}
body[data-density="compact"] .tbl td,body[data-density="compact"] .tbl th{padding-top:7px;padding-bottom:7px}
body[data-density="compact"] .card{padding:14px}
body[data-text-size="large"] .content{font-size:16px}
body[data-text-size="large"] .tbl,body[data-text-size="large"] .content input,body[data-text-size="large"] .content select,body[data-text-size="large"] .content .desc{font-size:16px}
.workspace-actions{display:flex;flex-wrap:wrap;gap:8px}.workspace-custom-order{display:flex;align-items:center;gap:8px;margin:12px 0}.workspace-custom-order input{width:auto}
.library-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);gap:20px;align-items:start}
.library-sidebar{background:var(--card,#fff);border:1px solid var(--line);border-radius:12px;padding:14px;position:sticky;top:86px;max-height:calc(100vh - 130px);overflow:auto}
.library-sidebar summary{font-weight:700;cursor:pointer;margin-bottom:12px}.library-sidebar hr{border:0;border-top:1px solid var(--line);margin:16px 0}
.library-folder{display:flex;gap:8px;justify-content:space-between;width:100%;text-align:left;background:transparent;color:inherit;border:0;border-radius:8px;padding:9px 8px;cursor:pointer;overflow-wrap:anywhere}.library-folder.on{background:var(--brand-soft);color:var(--brand);font-weight:700}
.library-folder span{flex:none;color:var(--sub)}.library-tag-heading{margin-bottom:9px}.library-tag-heading .desc{display:block}.library-sidebar .chip{margin:0 3px 6px 0;cursor:pointer}
.library-main{min-width:0}.library-heading h2{font-size:20px;margin:0;overflow-wrap:anywhere}.library-heading{align-items:center;flex-wrap:wrap}.library-main .toolbar{flex-wrap:wrap;gap:8px}
.library-active-filters{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:8px 0}.library-active-filters:empty{display:none}.library-active-filters .chip{cursor:pointer;max-width:100%;white-space:normal;overflow-wrap:anywhere}.library-main #libResultCount{margin:10px 0}.library-main #lib_search{flex-basis:100%;max-width:none;min-height:44px}.library-sidebar summary{min-height:24px}.library-bulk{flex-wrap:wrap}
@media(max-width:650px){.library-main .toolbar .btn,.library-main .toolbar select,.library-active-filters button{min-height:40px}.library-main .toolbar #libClearFilters{flex:1}.library-heading h2{width:100%}.library-sidebar{padding:10px 12px}.library-sidebar details:not([open]) summary{margin:0}}
.library-main .toolbar .search-input{min-width:200px;flex:1}.library-main .toolbar select{width:auto;flex:1 1 145px;min-width:0;max-width:220px}
.library-bulk{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0;font-size:13px}.library-bulk label{display:flex;align-items:center;gap:6px}.library-bulk input{width:17px;height:17px}
.library-rows{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--card,#fff)}.library-row{display:flex;align-items:center;gap:12px;padding:14px;border-bottom:1px solid var(--line);cursor:pointer}.library-row:last-child{border-bottom:0}.library-row-content{flex:1;min-width:0;overflow-wrap:anywhere}.library-row-content b,.library-row-content>.desc{display:block;margin-bottom:5px}
.gs-result{display:flex;flex-direction:column;gap:5px;text-align:left;width:100%;padding:12px;border:1px solid var(--line);border-radius:8px;margin:6px 0;background:var(--card,#fff);color:inherit;cursor:pointer;overflow-wrap:anywhere}.gs-result:hover,.gs-result.selected{background:var(--brand-soft)}.gs-result mark{background:#fde68a;color:#1f2937}
.ne-row .grow{min-width:0;overflow-wrap:anywhere}.ne-row .btn{flex:none}.card-editbar{flex-wrap:wrap}
@media(min-width:901px){body[data-dashboard-columns="1"] .dash-grid{grid-template-columns:minmax(0,1fr)}body[data-dashboard-columns="1"] .dash-card.span2{grid-column:span 1}body[data-dashboard-columns="3"] .dash-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.library-workspace{grid-template-columns:minmax(0,1fr);gap:12px}.library-sidebar{position:static;max-height:250px}.library-main .toolbar .search-input{width:100%;flex-basis:100%;min-width:0}.library-main .toolbar select{flex:1;min-width:100px;max-width:100%}.ne-row{gap:5px}.ne-row .ne-ic{display:none}.ne-row .btn{padding:7px}.top-actions{gap:2px}.top-actions .icon-btn{min-width:32px;padding:5px}.library-bulk .btn{min-height:38px}}


/* Keep compact phone headers within the viewport. Attendance is also shown on the dashboard. */
@media(max-width:650px){.topbar #attStatus{display:none}.topbar h1{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* Searchable contact and certification workspaces */
.record-workspace{max-width:1500px;margin:auto}.record-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.record-heading h2{margin:0 0 6px;font-size:23px}.record-heading p{margin:0;color:var(--sub);font-size:13px;line-height:1.6}.record-stats{display:flex;gap:12px 26px;flex-wrap:wrap;padding:15px 18px;background:var(--card);border:1px solid var(--line);border-radius:12px;margin-bottom:16px;font-size:13px}.record-stats b{margin-left:6px}.record-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.record-filters input{flex:1;min-width:240px;margin:0;max-width:none}.record-filters select{width:auto;max-width:240px;min-height:42px}.record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.record-card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:20px;min-width:0}.record-card-heading{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:10px}.record-title{background:none;border:0;padding:0;text-align:left;color:var(--text);font:inherit;font-size:17px;font-weight:750;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}.record-title:hover{color:var(--brand)}.record-tags{display:flex;flex-wrap:wrap;gap:5px}.contact-person{padding:10px 0;border-bottom:1px solid var(--line)}.contact-person b{font-size:13px}.contact-person small{font-weight:400;color:var(--sub)}.contact-person>div{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:6px;font-size:13px}.contact-person a,.record-meta{overflow-wrap:anywhere}.record-meta,.record-note{font-size:13px;line-height:1.6;color:var(--sub);margin:10px 0}.record-note{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.record-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:15px}.record-dates{display:flex;gap:15px;flex-wrap:wrap;margin:15px 0}.record-dates dt{font-size:11px;color:var(--sub)}.record-dates dd{margin:5px 0 0;font-size:13px;font-weight:650}.record-files{display:flex;flex-direction:column;gap:8px;font-size:12px}.record-files a{overflow-wrap:anywhere}@media(max-width:800px){.record-grid{grid-template-columns:1fr}.record-heading{align-items:start;flex-wrap:wrap}.record-heading h2{font-size:20px}.record-filters input{min-width:100%}.record-filters select{flex:1;min-width:110px;max-width:none}.record-card{padding:16px}.record-actions .btn{min-height:42px}.contact-person a{min-height:32px;display:inline-flex;align-items:center}}
/* A quiet, finite welcome motion; inputs remain stationary. */
.lh-logo .mark{position:relative}.lh-logo .mark:after{content:'';position:absolute;inset:-2px;border:1px solid #6684fa;border-radius:14px;pointer-events:none;opacity:0;animation:whWelcomeGlow 2.4s ease-out 1}.lh-logo .tag{animation:whWelcomeText .7s ease-out 1}@keyframes whWelcomeGlow{0%{transform:scale(.95);opacity:.7}70%{opacity:.15}100%{transform:scale(1.65);opacity:0}}@keyframes whWelcomeText{from{opacity:.35;transform:translateX(-5px)}to{opacity:1;transform:translateX(0)}}@media(prefers-reduced-motion:reduce){.lh-logo .mark:after,.lh-logo .tag{animation:none}}

.document-actions{min-width:230px;white-space:normal!important}.document-actions>.btn{margin:2px}.document-more{display:block;flex-basis:100%;font-size:12px;margin:5px 0}.document-more summary{cursor:pointer;padding:8px;border:1px solid var(--line);border-radius:8px;width:fit-content}.document-more>div{display:flex;gap:6px;flex-wrap:wrap;padding-top:8px}.lib-card-note{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--sub);font-size:12px;line-height:1.6;margin:4px 0}.library-file-names{font-size:12px;color:var(--sub);overflow-wrap:anywhere}@media(max-width:650px){.document-actions>.btn,.qc-actions>.btn{min-height:40px}.document-more .btn{min-height:40px}}

/* 나라장터 공고 탐색 */
.bid-browser{min-width:0}
.bid-browse-head,.bid-list-head,.bid-views,.bid-filters,.bid-period,.bid-quick,.bid-key-form{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bid-browse-head,.bid-list-head{justify-content:space-between}
.bid-browse-head h3,.bid-browse-head p,.bid-list-head p{margin:0}
.bid-browse-head p{margin-top:5px}
.bid-views{margin:18px 0 14px;gap:6px}
.bid-views button,.bid-star,.bid-title{font:inherit;color:var(--text);cursor:pointer}
.bid-views button,.bid-star{border:1px solid var(--line);border-radius:9px;background:var(--card,#fff);min-height:40px}
.bid-views button{padding:7px 12px;font-weight:700}
.bid-views button span{margin-left:3px;font-variant-numeric:tabular-nums}
.bid-views [aria-pressed=true]{border-color:var(--brand);background:var(--brand-soft,#edf2ff);color:var(--text)}
.bid-filters,.bid-period,.bid-key-form{align-items:end}
.bid-filters label,.bid-period label{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:12px;font-weight:700}
.bid-filters .bid-search{flex:1 1 200px}
.bid-browser input,.bid-browser select{min-width:0;max-width:100%;border:1px solid var(--line);border-radius:8px;background:var(--card,#fff);color:var(--text);padding:8px;font:inherit;min-height:40px;font-size:14px;font-weight:400}
.bid-browser select:disabled{opacity:.6}
.bid-conditions{margin:14px 0;border-block:1px solid var(--line);padding:7px 0}
.bid-conditions summary{cursor:pointer;font-size:13px;font-weight:700;padding:7px 0;width:fit-content}
.bid-period,.bid-key-form,.bid-quick{margin:6px 0 10px}
.bid-list-head p,.bid-meta,.bid-due>span:last-child,.bid-match-reason{font-size:12px}
.bid-list-head{margin:12px 0}
.bid-result{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:start;padding:15px 0;border-top:1px solid var(--line)}
.bid-meta{display:flex;gap:4px 10px;flex-wrap:wrap;color:var(--sub)}
.bid-title{display:block;background:none;border:0;text-align:left;padding:2px 0;margin:3px 0;font-size:16px;font-weight:700;line-height:1.5}
.bid-title:hover{text-decoration:underline}
.bid-match-reason{color:var(--text);margin-top:6px}
.bid-match-reason strong{margin-right:4px}
.bid-result-body,.bid-title,.bid-match-reason{overflow-wrap:anywhere}
.bid-due{display:flex;flex-direction:column;gap:5px;align-items:flex-end;color:var(--sub)}
.bid-star{min-width:40px;padding:2px 8px;font-size:20px}
.bid-star[aria-pressed=true]{color:var(--text);background:var(--brand-soft,#edf2ff);border-color:var(--brand)}
.bid-empty{display:grid;justify-items:center;gap:12px;text-align:center;padding:30px 14px;color:var(--sub)}
#bidMore:not([hidden]){display:block;margin:12px auto}
.bid-settings{margin-bottom:0}
.bid-detail-reasons{margin-bottom:15px;background:var(--bg);padding:12px 16px;border-radius:10px}
.bid-detail-reasons h4{margin:0}
@media(max-width:700px){
  .bid-views{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .bid-views button{font-size:12px;min-height:44px;padding:6px 2px}
  .bid-filters,.bid-period{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .bid-filters .bid-search,.bid-period label:first-child{grid-column:1/-1}
  .bid-filters .bid-search{grid-row:1}
  .bid-filters input,.bid-filters select,.bid-period input,.bid-period select{width:100%}
  .bid-result{grid-template-columns:minmax(0,1fr) 44px;gap:5px 8px}
  .bid-result-body{grid-column:1;grid-row:1}
  .bid-star{grid-column:2;grid-row:1;min-height:44px}
  .bid-due{grid-column:1/-1;flex-direction:row;align-items:center;gap:7px}
  .bid-key-form input{width:100%}
}

.card.staff-manual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 8px 16px;
  border-inline-start: 3px solid var(--brand);
}
.staff-manual h2 { font-size: 16px; line-height: 1.4; }
.staff-manual a.btn { display: inline-flex; align-items: center; min-height: 44px; }
.staff-manual a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
