/* ===== 치과 경영자문 회계 솔루션 — 공통 스타일 (prototype/assets/style.css 이식) ===== */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --sidebar: #0f172a;
  --sidebar-2: #1e293b;
  --sidebar-text: #cbd5e1;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ===== Layout shell ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar-slot {
  flex-shrink: 0; width: 232px; position: sticky; top: 0; height: 100vh; z-index: 25;
}
.sidebar {
  width: 100%; height: 100%; background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column;
}
.sidebar .brand { padding: 16px 16px 14px; border-bottom: 1px solid var(--sidebar-2); position: relative; }
.sidebar .brand .logo-short { display: none; }
.sidebar nav a .menu-short { display: none; }
.menu-group .group-label-short { display: none; }
.sidebar-close { display: none; }
.sidebar-backdrop { display: none; }
.sidebar .brand .logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  color: #fff;
}
.sidebar .brand .logo-full {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}
.sidebar .brand-ko {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}
.sidebar .brand-div {
  width: 1px;
  height: 12px;
  background: #475569;
  flex-shrink: 0;
}
.sidebar .brand-en {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #94a3b8;
  line-height: 1;
  white-space: nowrap;
}
.sidebar .brand-ver {
  font-size: 10px;
  color: #64748b;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.sidebar .brand .sub { color: #64748b; font-size: 11px; margin-top: 3px; }
.sidebar nav { padding: 8px 10px; overflow-y: auto; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 20px; border-radius: 8px;
  color: var(--sidebar-text); font-size: 13px; margin-bottom: 1px;
}
.sidebar nav a .ic { width: 14px; text-align: center; opacity: .75; font-size: 12.5px; flex-shrink: 0; }
.sidebar nav a:hover { background: var(--sidebar-2); color: #fff; }
.sidebar nav a.active { background: var(--accent); color: #fff; }
.sidebar nav a .menu-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; }
.sidebar nav a.active .menu-badge { background: #fff; color: var(--accent); }
/* 그룹(1차) 접기/펼치기 — 하위 항목(2차)보다 한 단계 무거운 톤으로 구분 */
.menu-group + .menu-group { margin-top: 2px; }
.menu-group .group-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: #94a3b8; font-size: 12.5px; font-weight: 600; letter-spacing: .1px; padding: 14px 12px 8px;
}
.menu-group .group-toggle:hover { color: #e2e8f0; }
.menu-group.open .group-toggle { color: #e2e8f0; }
.menu-group .group-toggle .chev { font-size: 10px; opacity: .7; transition: transform .18s ease; }
.menu-group.open .group-toggle .chev { transform: rotate(180deg); }
.menu-group .group-items { display: grid; grid-template-rows: 0fr; overflow: hidden; transition: grid-template-rows .2s ease; }
.menu-group.open .group-items { grid-template-rows: 1fr; }
.menu-group .group-items-inner { overflow: hidden; min-height: 0; }
.sidebar .foot { padding: 8px 10px 12px; border-top: 1px solid var(--sidebar-2); font-size: 11px; color: #64748b; }
.sidebar-mode-btn {
  width: 100%; display: flex; align-items: center; gap: 6px;
  background: none; border: none; color: #64748b;
  border-radius: 6px; padding: 5px 4px; font-size: 12px; font-family: inherit;
  cursor: pointer; margin-bottom: 2px;
}
.sidebar-mode-btn .mode-ic {
  width: 16px; height: 16px; flex-shrink: 0; display: block;
}
.sidebar-mode-btn:hover { color: #e2e8f0; }
.sidebar-mode-btn .mode-expand { display: none; }

html.sidebar-compact .sidebar-slot { width: 80px; }
html.sidebar-compact .sidebar { width: 80px; overflow: hidden; }
html.sidebar-compact .sidebar .brand .logo-full,
html.sidebar-compact .sub,
html.sidebar-compact .menu-label,
html.sidebar-compact .group-label-full,
html.sidebar-compact .chev { display: none; }
html.sidebar-compact .group-label-short { display: block; }
html.sidebar-compact .sidebar .brand .logo-short {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: #fff;
}
html.sidebar-compact .brand { padding: 14px 6px 12px; text-align: center; }
html.sidebar-compact .sidebar .brand .logo { flex-direction: column; align-items: center; gap: 4px; }
html.sidebar-compact .brand-ver { margin-top: 0; }
html.sidebar-compact nav { padding: 6px 4px; }
html.sidebar-compact nav a {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 7px 4px;
  margin-bottom: 1px;
}
html.sidebar-compact nav a .ic { width: 14px; font-size: 13px; text-align: center; }
html.sidebar-compact .sidebar nav a .menu-short {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.3px;
  line-height: 1;
  color: #94a3b8;
  white-space: nowrap;
}
html.sidebar-compact .sidebar nav a.active .menu-short,
html.sidebar-compact .sidebar nav a:hover .menu-short { color: #fff; }
html.sidebar-compact .group-toggle { display: none; }
html.sidebar-compact .menu-group + .menu-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
html.sidebar-compact .menu-group .group-items { grid-template-rows: 1fr; }
html.sidebar-compact .sidebar-mode-btn {
  justify-content: center;
  padding: 6px 0;
}
html.sidebar-compact .sidebar-mode-btn .mode-ic { transform: rotate(180deg); }
html.sidebar-compact .sidebar-mode-btn .mode-collapse { display: none; }
html.sidebar-compact .sidebar-mode-btn .mode-expand { display: none; }
html.sidebar-compact .foot { padding: 8px 4px 10px; }

@media (hover: hover) and (min-width: 861px) {
  html.sidebar-compact .sidebar { overflow: visible; transition: width .16s ease; }
  html.sidebar-compact .sidebar:hover {
    position: absolute; left: 0; top: 0; width: 232px; height: 100%;
    z-index: 36; box-shadow: 8px 0 28px rgba(15, 23, 42, .22);
  }
  html.sidebar-compact .sidebar:hover .brand .logo-full { display: flex; }
  html.sidebar-compact .sidebar:hover .sub,
  html.sidebar-compact .sidebar:hover .menu-label,
  html.sidebar-compact .sidebar:hover .group-label-full,
  html.sidebar-compact .sidebar:hover .chev { display: block; }
  html.sidebar-compact .sidebar:hover .menu-label,
  html.sidebar-compact .sidebar:hover .group-label-full { display: inline; }
  html.sidebar-compact .sidebar:hover .brand .logo-short,
  html.sidebar-compact .sidebar:hover nav a .menu-short,
  html.sidebar-compact .sidebar:hover .group-label-short { display: none; }
  html.sidebar-compact .sidebar:hover .brand { padding: 16px 16px 14px; text-align: left; }
  html.sidebar-compact .sidebar:hover .brand .logo { flex-direction: row; align-items: center; gap: 8px; }
  html.sidebar-compact .sidebar:hover .brand-ver { margin-top: 0; }
  html.sidebar-compact .sidebar:hover nav { padding: 8px 10px; }
  html.sidebar-compact .sidebar:hover nav a {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 9px;
    padding: 8px 12px 8px 20px;
  }
  html.sidebar-compact .sidebar:hover nav a .ic { width: 14px; font-size: 12.5px; }
  html.sidebar-compact .sidebar:hover .group-toggle {
    display: flex; justify-content: space-between; padding: 14px 12px 8px; font-size: 12.5px;
  }
  html.sidebar-compact .sidebar:hover .menu-group + .menu-group {
    margin-top: 2px; padding-top: 0; border-top: none;
  }
  html.sidebar-compact .sidebar:hover .menu-group .group-items { grid-template-rows: 0fr; }
  html.sidebar-compact .sidebar:hover .menu-group.open .group-items { grid-template-rows: 1fr; }
  html.sidebar-compact .sidebar:hover .group-toggle .chev { display: inline; }
  html.sidebar-compact .sidebar:hover .foot { padding: 8px 10px 12px; }
  html.sidebar-compact .sidebar:hover .sidebar-mode-btn {
    justify-content: flex-start;
    padding: 5px 4px;
  }
  html.sidebar-compact .sidebar:hover .sidebar-mode-btn .mode-expand { display: inline; }
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; flex-wrap: nowrap; padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 20;
}
.menu-toggle { flex-shrink: 0; }
/* 좁아지면 줄바꿈하는 대신 말줄임(...) 처리 — 남는 공간은 role-label/버튼 라벨에 우선 양보 */
.topbar .page-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
.topbar .spacer { flex: 1; min-width: 0; }
.topbar .role-switch { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.topbar select {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.topbar .user { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* 역할은 별도 글자 없이 아바타(이니셜 마크)로만 표시 — PC/모바일 공통 */
.topbar .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
/* 상단바 버튼 — 글자를 그대로 유지하고 줄어들지 않게 고정 (좁아지면 대신 페이지 제목이 말줄임 처리됨) */
.topbar-btn { white-space: nowrap; flex-shrink: 0; }
.content { padding: 24px 24px 120px; max-width: 1688px; width: 100%; }

/* ===== Typography ===== */
h1.page-h { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.page-desc { color: var(--muted); margin-top: 4px; font-size: 13px; }
h2.sec { font-size: 15px; font-weight: 600; margin: 4px 0 12px; }
.a-block { margin-top: 28px; }
.a-block > h2.sec { margin-top: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card .card-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.card .card-head h3 { font-size: 14px; font-weight: 600; }
.card .card-body { padding: 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 12px; align-items: center; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}

/* ===== Stat cards ===== */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
a.stat { color: inherit; display: block; transition: border-color .12s ease, background .12s ease; }
a.stat:hover { border-color: #93c5fd; background: #f8fafc; }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -0.5px; }
.stat .value small { margin-left: 2px; font-size: 12px; font-weight: 600; color: var(--faint); }
.stat .delta { font-size: 12px; margin-top: 4px; }
.dash-stat-unpaid { background: var(--red-soft); border-color: #fecaca; }
.dash-stat-wait { background: var(--amber-soft); border-color: #fde68a; }
.dash-board + .dash-board { margin-top: 28px; }
.dash-board-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.2px; }
.dash-group { margin-bottom: 14px; }
.dash-group-title { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.dash-todos { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.dash-todo {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.dash-todo span { color: var(--muted); font-size: 13px; }
.dash-todo b { font-size: 18px; letter-spacing: -0.3px; margin-left: auto; }
.dash-todo em { flex: 1 0 100%; font-style: normal; font-size: 11.5px; color: var(--red); }
.dash-todo.has-n { border-color: #fde68a; background: var(--amber-soft); }
.dash-todo.has-n b { color: var(--amber); }
.dash-todo.is-info { background: #f8fafc; }
.dash-todo-progress { min-width: 240px; }
.dash-bar {
  flex: 1 0 100%;
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.dash-bar i {
  display: block;
  height: 100%;
  background: #22c55e;
  border-radius: 999px;
}
.dash-todo-progress.has-n .dash-bar i { background: var(--amber); }
.dash-todo-split {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--muted);
}
.dash-todo-split a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.dash-todo-split em { flex: 0; font-style: normal; color: var(--faint); }
@media (max-width: 720px) {
  .dash-todos { grid-template-columns: 1fr 1fr; }
  .dash-todo-progress { grid-column: 1 / -1; }
}
.stat .delta.up { color: var(--green); }
.stat .delta.down { color: var(--red); }
.pr-payout-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 8px;
}
.pr-payout-stat .value { font-size: 22px; }
.pr-payout-stat .value small {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.pr-payout-n { font-weight: 600; color: var(--faint); }
.pr-payout-stat.is-wait { background: var(--accent-soft); border-color: #bfdbfe; }
.pr-payout-stat.is-wait .value { color: #1d4ed8; }
.pr-payout-stat.is-paid { background: var(--green-soft); border-color: #a7f3d0; }
.pr-payout-stat.is-paid .value { color: var(--green); }
.pr-payout-stat.is-due { background: var(--red-soft); border-color: #fecaca; }
.pr-payout-stat.is-due .value { color: var(--red); }
.pr-payout-stat.is-all { background: #f8fafc; }
.amt-paid { color: var(--green); }
.amt-unpaid { color: var(--red); }
.amt-tax { color: #1d4ed8; }
.amt-tax-local { color: #4338ca; }
.tax-overview {
  margin: 16px 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tax-overview-total {
  padding: 14px 18px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.tax-overview-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.tax-overview-kicker span {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 11px;
}
.tax-overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tax-overview-metrics .metric .k {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
  margin-bottom: 3px;
}
.tax-overview-metrics .metric .v {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
}
.tax-overview-metrics .metric .v small {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}
.tax-overview-metrics .metric.is-main .v { color: var(--green); }
.tax-overview-metrics .metric.is-loss .v { color: var(--red); }
.tax-overview-metrics .metric.is-tax .v { color: #1d4ed8; }
.tax-overview-metrics .metric.is-tax .k { color: #3b82f6; }
.tax-overview-metrics .metric.is-tax-local .v { color: #4338ca; }
.tax-overview-metrics .metric.is-tax-local .k { color: #6366f1; }
.tax-overview-metrics .metric .d {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 600;
}
.tax-overview-metrics .metric .d.up { color: var(--green); }
.tax-overview-metrics .metric .d.down { color: var(--red); }
.tax-overview-metrics .metric .d.flat { color: var(--muted); }
.dash-todo-hint {
  flex: 1 0 100%;
  font-size: 11.5px;
  color: var(--muted);
}
.tax-company-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tax-company-stat {
  display: block;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background .12s ease;
}
.tax-company-stat:hover { background: #f8fafc; }
.tax-company-stat.is-on {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tax-company-stat.is-empty { opacity: .55; }
.tax-company-stat.is-empty.is-on { opacity: 1; }
.tax-company-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.tax-company-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.tax-company-stat.is-on .tax-company-name { color: var(--accent); }
.tax-company-stat .tax-overview-metrics .metric .v { font-size: 16px; }
@media (max-width: 720px) {
  .pr-payout-stats { grid-template-columns: 1fr; }
  .tax-company-stats { grid-template-columns: 1fr; }
  .tax-company-stat { border-right: none; border-top: 1px solid var(--border); }
}

.list-toolbar .fpill { margin-right: auto; }
.fpill { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fpill a {
  display: inline-flex; align-items: center;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  color: var(--muted); font-size: 12.5px; font-weight: 600;
}
.fpill a:hover { border-color: #bfdbfe; color: var(--accent); background: var(--accent-soft); }
.fpill a.is-on {
  background: var(--accent-soft); border-color: #93c5fd; color: var(--accent);
}
.mb8 { margin-bottom: 8px; }
.stats-custom { display: inline-flex; align-items: center; gap: 4px; }
.stats-custom .range-tilde { color: var(--muted); padding: 0 2px; }
.stats-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 16px;
}
.stats-kpi {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: inherit;
  min-width: 0;
}
.stats-kpi .k { display: block; font-size: 11.5px; color: var(--faint); margin-bottom: 4px; }
.stats-kpi .v {
  display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stats-kpi .s { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.stats-kpi.is-unpaid { background: var(--red-soft); border-color: #fecaca; }
.stats-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
}
.stats-chart-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.stats-chart-legend {
  display: flex; gap: 12px; font-size: 12px; color: var(--muted);
}
.stats-chart-legend i {
  display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px;
}
.stats-chart-legend i.is-billed { background: #60a5fa; }
.stats-chart-legend i.is-cost { background: #f87171; }
.stats-chart-legend i.is-expense { background: #fb923c; }
.stats-chart-legend i.is-profit { background: #34d399; }
.stats-chart-note { font-size: 12px; color: var(--faint); }
.stats-chart-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats-chart-modes { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stats-chart-modes button {
  border: 0; background: var(--surface); color: var(--muted); font: inherit;
  font-size: 12px; padding: 4px 10px; cursor: pointer;
}
.stats-chart-modes button + button { border-left: 1px solid var(--border); }
.stats-chart-modes button.is-on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.stats-chart-body { position: relative; min-height: 220px; }
.stats-chart-body svg { display: block; width: 100%; height: 220px; }
.stats-chart-empty {
  min-height: 180px; display: grid; place-items: center; color: var(--muted); font-size: 13px;
}
.stats-wf-bar { cursor: pointer; }
.stats-wf-bar:hover { filter: brightness(0.92); }
.stats-ln-hit { cursor: pointer; }
.stats-ln-dot { pointer-events: none; }
.stats-tip {
  position: fixed; z-index: 80; min-width: 168px; max-width: 240px;
  padding: 8px 10px; border-radius: 8px; pointer-events: none;
  background: #0f172a; color: #e2e8f0; box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
  font-size: 12px; line-height: 1.35;
}
.stats-tip-h { font-weight: 700; color: #fff; margin-bottom: 6px; }
.stats-tip-row {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 3px;
}
.stats-tip-row span { color: #94a3b8; }
.stats-tip-row b { font-weight: 600; color: #fff; }
.stats-tip-row.is-plus b { color: #6ee7b7; }
.stats-tip-row.is-minus b { color: #fca5a5; }
@media (max-width: 1100px) {
  .stats-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .stats-kpis { grid-template-columns: 1fr 1fr; }
}

.pr-approve-heroes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 720px) {
  .pr-approve-heroes { grid-template-columns: 1fr; }
}
.pr-approve-hero {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.pr-approve-hero.is-pay {
  background: var(--green-soft);
  border-color: #a7f3d0;
}
.pr-approve-hero.is-pay .pr-approve-hero-kicker,
.pr-approve-hero.is-pay .pr-approve-hero-title b { color: #047857; }
.pr-approve-hero-kicker { font-size: 12px; font-weight: 600; color: #b45309; margin-bottom: 4px; }
.pr-approve-hero-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.pr-approve-hero-title b { color: #b45309; }
.pr-approve-hero-sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.pr-approve-inbox { border-color: #fde68a; }
.pr-pay-inbox { border-color: #a7f3d0; }
.pr-approve-row.is-seen td { background: #fffbeb; }
.pr-approve-seen { font-size: 12px; }
.pr-approve-done {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 16px 14px;
}
.pr-approve-done > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
}
.pr-approve-done > summary::-webkit-details-marker { display: none; }
.pr-approve-done > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  color: var(--muted);
}
.pr-approve-done[open] > summary::before { content: '▾'; }
.pr-approve-modal { max-width: min(960px, 96vw); }
.pr-approve-modal .modal-body { max-height: calc(90vh - 140px); overflow: auto; }
.inv-layout--embed { margin: 0; grid-template-columns: 1fr; }
.inv-layout--embed .inv-side { position: static; }

/* ===== Table =====
 * 규칙: 표는 항상 .table-wrap으로 감싸고, 칸은 기본적으로 줄바꿈하지 않는다(white-space: nowrap).
 * 화면이 좁아지면 칸을 억지로 줄이는 대신(한글이 한 글자씩 줄바꿈되는 문제 발생) .table-wrap이
 * 가로 스크롤을 담당한다. 설명/메모처럼 길게 줄바꿈되어도 괜찮은 칸에는 td에 class="wrap"을 추가한다.
 */
table.tbl { width: 100%; border-collapse: collapse; background: var(--surface); }
table.tbl th, table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; white-space: nowrap; }
table.tbl th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: var(--surface-2); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.wrap, table.tbl th.wrap { white-space: normal; }
table.tbl tfoot td {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border-top: 2px solid #94a3b8;
  border-bottom: none;
  padding-top: 13px;
  padding-bottom: 13px;
  font-weight: 700;
  color: #0f172a;
}
table.tbl tfoot tr:hover td {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}
table.tbl tfoot .tbl-sum-label {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  background: #334155;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
table.tbl tfoot .tbl-sum-count {
  margin-left: 8px;
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}
table.tbl tfoot td.num { font-size: 13.5px; letter-spacing: -0.02em; }
table.tbl tfoot td.tbl-sum-net { color: #1d4ed8; font-size: 14.5px; }
table.tbl.stats-pl-tbl tfoot td {
  background: #f8fafc;
  border-top: 3px double #334155;
  padding-top: 11px;
  padding-bottom: 11px;
  font-weight: 700;
  color: inherit;
}
table.tbl.stats-pl-tbl tfoot tr:hover td { background: #f8fafc; }
table.tbl.stats-pl-tbl tfoot td:first-child { color: #111827; }
table.tbl.stats-pl-tbl tfoot td.amt-paid { color: var(--green); }
table.tbl.stats-pl-tbl tfoot td.amt-unpaid { color: var(--red); }
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; }
/* 목록 행 클릭 시 수정화면으로 진입하는 공통 패턴. 행 안의 링크/버튼/폼 클릭은 제외(app.js에서 처리). */
table.tbl tr[data-href] { cursor: pointer; }

/* 목록 위 검색 — 항상 표 우측 상단에 컴팩트하게 배치 */
.list-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 16px 0 8px; flex-wrap: wrap; }
.list-toolbar .list-count { margin: 0 auto 0 0; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.list-search { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.list-search select,
.list-search input {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  font-size: 12.5px; background: var(--surface); color: var(--text); font-family: inherit;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.list-search input,
.list-search input[type="month"],
.list-search input[type="search"],
.list-search input[type="text"] {
  appearance: auto; -webkit-appearance: auto;
  background-image: none;
  padding-right: 10px;
}
.list-search .btn { padding: 6px 12px; font-size: 12.5px; }
.list-search select:focus,
.list-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.list-search select { width: auto; min-width: 96px; cursor: pointer; }
.list-search input,
.list-search input[type="search"],
.list-search input[type="text"] { width: 220px; max-width: 42vw; }
.list-search input[type="month"] { width: auto; min-width: 140px; }
.list-search .month-range { display: inline-flex; align-items: center; gap: 4px; }
.list-search .month-range .range-tilde { color: var(--muted); padding: 0 2px; font-size: 13px; }
.list-search .month-range .btn.month-nav {
  padding: 6px 10px; min-width: 32px; line-height: 1; font-size: 16px;
}
.list-toolbar .hint { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ===== Badges / pills ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.badge.gray { background: #f3f4f6; color: #4b5563; }
.badge.blue { background: var(--accent-soft); color: var(--accent); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.btn:hover { border-color: var(--faint); }
.btn:disabled, .btn[disabled] {
  opacity: 0.45; cursor: not-allowed; pointer-events: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost.active { color: var(--accent); background: var(--accent-soft); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
/* 업무일지 상태 전이 — 파랑(accent)과 구분: 제출=틸, 확정=초록, 승인=딥톤 */
.wl-head-actions .btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  min-height: 34px;
  box-sizing: border-box;
  justify-content: center;
}
.btn.btn-submit {
  background: #e6f7f5; border-color: #99f6e4; color: #0f766e;
  font-weight: 600;
}
.btn.btn-submit:hover { background: #ccfbf1; border-color: #5eead4; color: #0d9488; }
.btn.btn-confirm {
  background: var(--green-soft); border-color: #a7f3d0; color: #047857;
  font-weight: 600;
}
.btn.btn-confirm:hover { background: #d1fae5; border-color: #6ee7b7; }
.btn.btn-approve {
  background: #f1f5f9; border-color: #cbd5e1; color: #334155;
  font-weight: 600;
}
.btn.btn-approve:hover { background: #e2e8f0; border-color: #94a3b8; }
.btn.btn-reopen {
  background: var(--surface); border-color: #d1d5db; color: var(--muted);
}
.btn.btn-reopen:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.btn.btn-excel {
  background: #ecfdf3; border-color: #86efac; color: #15803d;
  font-weight: 600;
}
.btn.btn-excel:hover { background: #dcfce7; border-color: #4ade80; }
.btn.btn-pdf {
  background: var(--red-soft); border-color: #fecaca; color: #b91c1c;
  font-weight: 600;
}
.btn.btn-pdf:hover { background: #fee2e2; border-color: #fca5a5; }
.badge.badge-compact {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
}

/* ===== Forms ===== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font-size: 13px; background: var(--surface); color: var(--text); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* number 스피너(▲▼) 숨김 — 휠/드래그로 값 바뀌는 것 방지, 직접 입력만 */
.field input[type="number"] { -moz-appearance: textfield; }
.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field .hint, p.hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.field-inline { display: flex; gap: 8px; align-items: stretch; }
.field-inline input { flex: 1 1 auto; width: auto; min-width: 0; }
.field-inline .btn { align-self: stretch; }
.login-status { display: flex; align-items: center; min-height: 38px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.section-h { font-weight: 600; font-size: 13.5px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }

/* ===== Misc ===== */
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 500; }
.callout { border-radius: 8px; padding: 12px 14px; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface-2); }
.callout.blue { background: var(--accent-soft); border-color: #bfdbfe; color: #1e40af; }
.callout.amber { background: var(--amber-soft); border-color: #fde68a; color: #92400e; }
.callout.green { background: var(--green-soft); border-color: #a7f3d0; color: #065f46; }
.callout.red { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.callout.red strong { display: block; margin-bottom: 8px; font-size: 13px; color: #991b1b; }

.settings-stat-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.settings-stat {
  min-width: 110px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2);
  display: flex; flex-direction: column; gap: 4px;
}
.settings-stat-label { font-size: 12px; color: var(--muted); }
.settings-stat strong { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.settings-warn-list {
  margin: 0; padding-left: 1.15em; display: grid; gap: 6px; line-height: 1.45;
}
.settings-danger-form .settings-ack {
  display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45;
  cursor: pointer;
}
.settings-danger-form .settings-ack input { margin-top: 3px; }
.settings-confirm-label {
  display: flex; flex-direction: column; gap: 6px; font-size: 13px; max-width: 360px;
}
.settings-confirm-input {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.settings-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
.ui-choice { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ui-choice-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); cursor: pointer; font-size: 12.5px; color: var(--text);
}
.ui-choice-item:hover { border-color: #93c5fd; background: #f8fafc; }
.ui-choice-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: #1e40af; }
.ui-choice-item input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.ui-choice-item span { font-weight: 600; line-height: 1.2; }

/* ===== Toast (하단 중앙) ===== */
.toast-host {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 1200; display: flex; flex-direction: column; align-items: center;
  gap: 8px; pointer-events: none; width: min(440px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto; width: 100%;
  padding: 12px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  line-height: 1.45; text-align: center;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
  border: 1px solid transparent;
  opacity: 0; transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hide { opacity: 0; transform: translateY(8px); }
.toast.error { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.toast.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.toast.info { background: #f3f4f6; border-color: #e5e7eb; color: #374151; }
.big-amount { font-size: 30px; font-weight: 700; letter-spacing: -1px; }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a:hover { color: var(--accent); }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 18px 0 20px; overflow-x: auto; }
.tabs .tab { padding: 10px 16px; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs .tab .cnt { font-size: 11px; background: var(--surface-2); color: var(--muted); border-radius: 20px; padding: 1px 7px; }
.tabs .tab.active .cnt { background: var(--accent-soft); color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== 업무일지 상세 셸 (상단 가로 네비 + 콘텐츠) ===== */
.wl-shell { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.wl-nav {
  position: relative; z-index: 1;
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 8px;
}
.wl-nav-title { display: none; }
.wl-nav-item {
  flex: 0 0 auto; display: flex; gap: 8px; align-items: center;
  text-align: left; border: none; background: transparent; cursor: pointer;
  padding: 8px 12px; border-radius: 8px; color: var(--text); white-space: nowrap;
}
.wl-nav-item:hover { background: var(--surface-2); }
.wl-nav-item.active { background: var(--accent-soft); }
.wl-nav-num {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted);
}
.wl-nav-item.active .wl-nav-num { background: var(--accent); color: #fff; }
.wl-nav-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.wl-nav-text strong { font-size: 13px; font-weight: 600; }
.wl-nav-text small { display: none; }
.wl-nav-item.active .wl-nav-text small { color: var(--accent); }

.wl-main {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); min-height: 420px;
  display: flex; flex-direction: column;
}
.wl-panel { display: none; flex: 1; }
.wl-panel.active { display: flex; flex-direction: column; }
.wl-panel-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--border); }
.wl-panel-head h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.wl-panel-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.wl-panel-body { padding: 20px; flex: 1; }
.wl-placeholder {
  border: 1.5px dashed var(--border); border-radius: 10px;
  background: var(--surface-2); padding: 36px 20px; text-align: center;
  min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.wl-placeholder-label {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px;
}
.wl-placeholder p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.wl-foot {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; align-items: center;
}
/* 제출 스냅샷 안내 배너 */
.wl-snapshot-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid #d9c48a;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff9e8 0%, #fff3d1 100%);
  color: #5c4a1a;
}
.wl-snapshot-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 260px;
  font-size: 13px;
  line-height: 1.45;
}
.wl-snapshot-banner-text strong {
  font-size: 14px;
  color: #3d3212;
}
.wl-snapshot-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  white-space: nowrap;
}
.wl-snapshot-pick select {
  min-width: 200px;
  max-width: 280px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #cbb56a;
  background: #fff;
  font-size: 12px;
}

/* 업무일지 페이지 헤더: 좌 타이틀 / 우 상태·액션 */
.wl-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.wl-page-head-left { min-width: 0; flex: 1 1 240px; }
.wl-page-head-left .page-h { margin-bottom: 4px; }
.wl-page-head-right {
  flex: 0 1 auto;
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}
.wl-head-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: 100%;
}
.wl-head-tools-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.wl-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.wl-action-form { display: inline; margin: 0; }
.wl-autosave-status {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.wl-autosave-status[data-state="saving"],
.wl-autosave-status[data-state="pending"] { color: var(--muted); }
.wl-autosave-status[data-state="ok"] { color: #2f6f4e; }
.wl-autosave-status[data-state="error"] { color: #a33; }
.wl-status-events-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  position: relative;
  width: auto;
  max-width: 400px;
}
.wl-invoice-lock {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 8px;
  max-width: 420px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--amber-soft, #fffbeb);
  border: 1px solid #f6d28a;
  color: #92400e;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}
.wl-invoice-lock-label {
  font-weight: 700;
  white-space: nowrap;
}
.wl-invoice-lock-body { min-width: 0; }
.wl-invoice-lock a {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wl-invoice-lock a:hover { color: #92400e; }
.wl-invoice-lock-sep { color: #b45309; }
.wl-invoice-lock-hint {
  display: inline-block;
  margin-left: 4px;
  color: #a16207;
  font-weight: 500;
}
.wl-snap-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #0f766e;
  flex-shrink: 0;
  text-decoration: none;
}
.wl-snap-ico:hover {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0d9488;
}
.wl-status-events--compact {
  position: relative;
  width: auto;
  max-width: 360px;
  background: transparent;
  border: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.wl-status-events--empty {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 2px 0;
  cursor: default;
}
.wl-status-events--empty .wl-status-events-meta { color: var(--faint); }
.wl-status-events--compact .wl-status-events-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  justify-content: flex-end;
}
.wl-status-events-summary::-webkit-details-marker { display: none; }
.wl-status-events--compact .wl-status-events-summary:hover .wl-status-events-meta {
  color: var(--text);
}
.wl-status-events--compact .wl-status-events-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--faint);
}
.wl-status-events--compact .wl-status-events-meta {
  font-size: 11.5px;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-status-events--compact .wl-status-events-toggle {
  margin-left: 0;
  font-size: 11px;
  color: var(--faint);
  flex-shrink: 0;
}
.wl-status-events-toggle::after { content: '▾'; }
.wl-status-events[open] .wl-status-events-toggle::after { content: '▴'; }
/* 우측 헤더 기준 — 패널이 왼쪽으로 펼쳐져 화면 밖으로 안 나가게 */
.wl-status-events--compact .wl-status-events-body {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  text-align: left;
  width: min(560px, 92vw);
  max-width: min(720px, 92vw);
  z-index: 40;
  box-sizing: border-box;
}
.wl-event-list-hint {
  margin: 0 0 8px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}
.wl-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}
.wl-event-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text);
  padding: 6px 8px;
  border-left: 3px solid var(--border);
  background: var(--surface-2);
  min-width: 0;
}
.wl-event-list li.has-snap { border-left-color: #99f6e4; }
.wl-event-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-event-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.wl-event-sep { color: var(--muted); margin: 0 4px; }
.wl-event-who { font-weight: 600; }
.wl-event-action { color: #0f766e; font-weight: 600; }
.wl-event-note { color: var(--muted); }
.wl-event-snap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #0f766e;
  text-decoration: none;
  flex-shrink: 0;
}
.wl-event-snap-spacer {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.wl-event-snap:hover {
  background: #ecfdf5;
  color: #0d9488;
}
@media (max-width: 720px) {
  .wl-page-head-right { width: 100%; margin-left: 0; }
  .wl-head-tools { align-items: stretch; }
  .wl-head-tools-row { justify-content: flex-start; }
  .wl-status-events-wrap { max-width: none; justify-content: flex-start; }
  .wl-status-events--compact { max-width: none; }
  .wl-status-events--compact .wl-status-events-summary { justify-content: flex-start; }
  .wl-status-events--compact .wl-status-events-body {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .wl-event-list li { white-space: normal; }
}
.wl-notice-tbl .col-deliv { width: 48px; text-align: center; vertical-align: middle; }
.wl-notice-tbl .col-method { width: 120px; }
.wl-notice-tbl .col-date { width: 150px; }
.wl-notice-tbl td:first-child { text-align: center; }
.wl-notice-th-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}
.wl-notice-th-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}
.wl-notice-tbl th.col-method {
  vertical-align: middle;
  font-weight: 600;
}
.wl-notice-method-all {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.wl-notice-caution {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: #fff8e8;
}
.wl-notice-caution-list {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.wl-notice-caution-list li { margin-bottom: 6px; }
.wl-notice-ack {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  cursor: pointer;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.wl-notice-ack input { margin-top: 2px; flex-shrink: 0; }
.wl-notice-ack.is-locked { cursor: not-allowed; opacity: 0.85; }
.wl-notice-ack.is-locked input { pointer-events: none; }
.wl-base-col, .wl-base-field { background: #fff8e8; }
.wl-base-col input, .wl-base-field input { background: #fffdf5; }
.wl-claims-meta {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(160px, 220px);
  gap: 0 16px;
  align-items: end;
  margin-bottom: 4px;
}
.wl-claims-meta .field { margin-bottom: 0; position: relative; z-index: 2; }
.wl-claims-meta .field.wl-claims-span { grid-column: 1 / -1; margin-bottom: 12px; }
.wl-claims-meta .field select { cursor: pointer; background: var(--surface); }
.wl-base-value {
  display: flex; align-items: center;
  min-height: 38px; padding: 9px 11px;
  border: 1px solid #f0d78c; border-radius: 8px;
  background: #fffdf5; color: var(--text);
  font-size: 13px; font-weight: 700; line-height: 1.3;
}
.wl-claims-meta .field.is-base input {
  background: #fffdf5; border-color: #f0d78c;
}
.wl-claims-extra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 0 16px;
  align-items: end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.wl-claims-extra .field { margin-bottom: 0; }
.wl-claims-extra .field.is-base input {
  background: #fffdf5; border-color: #f0d78c;
}
@media (max-width: 720px) {
  .wl-claims-extra { grid-template-columns: 1fr; gap: 12px 0; }
}
.wl-attach-block { border-top: 1px solid var(--border); padding-top: 12px; }

/* 모니터링 첨부 — 이미지 크게 인라인 표시 */
.wl-att-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.wl-att-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface);
}
.wl-att-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 8px;
  margin: 0 0 8px;
  border: none;
  border-radius: 8px;
  background: #f8fafc;
  overflow: auto;
  cursor: zoom-in;
}
.wl-att-img-wrap:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.wl-att-img-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 920px);
  max-height: 480px;
  object-fit: contain;
  pointer-events: none;
}
.wl-att-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wl-att-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-att-name:hover { color: var(--accent); }
.wl-att-size { flex-shrink: 0; font-size: 12px; }
.modal.wl-img-modal {
  max-width: min(98vw, 1400px);
  max-height: 96vh;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.modal.wl-img-modal .modal-head {
  background: var(--surface);
  border-radius: 12px 12px 0 0;
}
.wl-img-lightbox-body {
  padding: 12px;
  text-align: center;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 0 0 12px 12px;
  max-height: calc(96vh - 56px);
  overflow: auto;
}
.wl-img-lightbox-body img {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(96vh - 80px);
  object-fit: contain;
  vertical-align: middle;
}

/* 병원 근황 보고 — 엑셀 서식형 세로 레이아웃 */
.wl-hospital { max-width: 860px; }
.wl-hs-title {
  text-align: center; font-size: 16px; font-weight: 700;
  padding: 12px 16px; margin-bottom: 14px;
  background: #c6efce; border: 1px solid var(--border); border-radius: 8px;
}
.wl-hs-sec { margin-bottom: 18px; }
.wl-hs-sec-h {
  margin: 0 0 0; padding: 9px 12px;
  font-size: 13.5px; font-weight: 700;
  background: #bdd7ee; border: 1px solid var(--border);
  border-bottom: none; border-radius: 8px 8px 0 0;
}
.wl-hs-req {
  border: 1px solid var(--border); border-radius: 0 0 8px 8px; overflow: hidden;
  background: var(--surface);
}
.wl-hs-req-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr);
  border-bottom: 1px solid var(--border);
}
.wl-hs-req-row:last-child { border-bottom: none; }
.wl-hs-req-label {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 8px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border-right: 1px solid var(--border);
}
.wl-hs-req-body { padding: 8px; }
.wl-hs-req-body textarea,
.wl-hs-block-body textarea {
  width: 100%; min-height: 72px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 9px 11px; font-size: 13px; font-family: inherit; color: var(--text);
  background: var(--surface); resize: vertical; line-height: 1.5;
}
.wl-hs-req-body textarea:focus,
.wl-hs-block-body textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.wl-hs-block { border: 1px solid var(--border); border-top: none; }
.wl-hs-block:first-of-type { border-top: 1px solid var(--border); }
.wl-hs-sec > .wl-hs-block:first-of-type { border-top: none; }
.wl-hs-sec > .wl-hs-block:last-child { border-radius: 0 0 8px 8px; overflow: hidden; }
.wl-hs-block-h {
  padding: 8px 12px; font-size: 13px; font-weight: 700;
  background: #c6efce; border-bottom: 1px solid var(--border);
}
.wl-hs-block-body { padding: 10px 12px 12px; background: var(--surface); }
.wl-hs-block-body textarea { min-height: 110px; }
.wl-hs-block-body textarea::placeholder { color: var(--faint); white-space: pre-line; }
.wl-panel-body .file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wl-panel-body .file-list .fi { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.wl-panel-body .file-list .fi-name { font-weight: 500; }
.btn.danger { color: var(--red); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }

/* 업무보고서 — 칸 폭만 지정, 여백·인풋은 일반 edit-tbl과 동일 */
.edit-tbl.report-tbl {
  width: 100%;
  table-layout: fixed;
}
.edit-tbl.report-tbl .col-no {
  width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}
.edit-tbl.report-tbl .col-name { width: 12%; }
.edit-tbl.report-tbl .col-day,
.edit-tbl.report-tbl .col-tooth { width: 72px; }
.edit-tbl.report-tbl .col-cat { width: 72px; }
.edit-tbl.report-tbl .col-item { width: 10%; }
.edit-tbl.report-tbl .col-errtype { width: 10%; }
.edit-tbl.report-tbl .col-detail { width: 16%; }
.edit-tbl.report-tbl .col-del {
  width: 48px;
  text-align: center;
  white-space: nowrap;
}

/* ===== Modal ===== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-backdrop.open { display: flex; }

/* 파일 생성·다운로드 대기 (청구서 Excel/PDF 등) */
.dl-progress {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  padding: 20px;
}
.dl-progress[hidden] { display: none !important; }
.dl-progress-card {
  min-width: min(320px, 92vw);
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
}
.dl-progress-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: dl-spin 0.8s linear infinite;
}
@keyframes dl-spin {
  to { transform: rotate(360deg); }
}
.dl-progress-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}
.dl-progress-msg {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
}
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 640px; }
.modal.wide-lg { max-width: 860px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-head .x { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; border: none; background: none; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ===== Search ===== */
.search { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; min-width: 240px; background: var(--surface); }
.search:focus { outline: none; border-color: var(--accent); }

/* 읽기전용 표시값 (수정 불가 필드) */
.readonly-val { padding: 9px 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); font-weight: 500; line-height: 1.4; }
.readonly-val.pw-mask { letter-spacing: 2px; color: var(--muted); user-select: none; }

/* 업무일지 매니저 섹션 */
.wl-sec { margin-bottom: 24px; }
.wl-sec-h { font-weight: 600; font-size: 13.5px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }

/* 항목별 캡처 이미지 첨부 */
.cap-box { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }
.cap-h { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.dropzone.sm { padding: 14px 16px; font-size: 12.5px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb { position: relative; width: 132px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.thumb img { width: 100%; height: 96px; object-fit: cover; display: block; cursor: zoom-in; }
.thumb .cap-name { font-size: 10.5px; color: var(--muted); padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .rm { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(15,23,42,.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.thumb .rm:hover { background: var(--red); }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.chk input { width: 16px; height: 16px; }

/* 편집형 테이블 (업무일지 실적 입력) — 가로 스크롤은 .table-wrap 기본 규칙이 처리 */
.edit-tbl th { padding: 8px 8px; vertical-align: middle; }
.edit-tbl td { padding: 5px 8px; vertical-align: middle; }
.edit-tbl input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.edit-tbl select,
.edit-tbl textarea {
  width: 100%; min-width: 68px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px; padding: 7px 8px;
  font-size: 12.5px; background: var(--surface); color: var(--text); font-family: inherit;
}
.edit-tbl input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):focus,
.edit-tbl select:focus,
.edit-tbl textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.edit-tbl input[type="checkbox"],
.edit-tbl input[type="radio"] { width: 16px; height: 16px; min-width: 0; accent-color: var(--accent); }
.edit-tbl input[readonly] { background: var(--surface-2); color: var(--muted); }
/* 금액·건수·수량 등 숫자 입력 — 엑셀처럼 우측 정렬 */
.edit-tbl input[data-comma],
.edit-tbl input[data-settled],
.edit-tbl input[inputmode="numeric"],
.edit-tbl input[inputmode="decimal"],
.edit-tbl input[type="number"],
.edit-tbl td.num input,
.wl-inline-field input[data-comma],
.wl-inline-field input[inputmode="numeric"],
.wl-inline-field input[inputmode="decimal"],
.field input[data-comma],
.field input[inputmode="numeric"],
.field input[inputmode="decimal"],
.field input[type="number"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.edit-tbl .sumrow td { background: var(--surface-2); font-weight: 600; }
.edit-tbl .fi-x { border: none; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.edit-tbl .fi-x:hover { color: var(--red); }

/* 유형 셀렉트 + 기타(직접입력) — 가로 넘침 방지, 세로 스택 */
.edit-tbl td.wl-type-cell {
  min-width: 168px;
  max-width: 220px;
  vertical-align: top;
}
.edit-tbl .wl-type-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.edit-tbl .wl-type-stack select,
.edit-tbl .wl-type-stack input[data-custom-label] {
  width: 100%;
  min-width: 0;
  display: block;
}
.edit-tbl .wl-type-stack input[data-custom-label].is-hidden {
  display: none !important;
}

/* 테이블 밖 인라인 라벨+입력 (청구 패널 등) */
.wl-inline-field { display: block; margin-top: 12px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.wl-inline-field input, .wl-inline-field select, .wl-inline-field textarea {
  display: block; width: 100%; margin-top: 6px;
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px;
  font-size: 13px; background: var(--surface); color: var(--text); font-family: inherit;
}
.wl-inline-field input:focus, .wl-inline-field select:focus, .wl-inline-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

/* 목록에서 진입 시 해당 행 강조 */
.tbl tr.row-hl > td { background: var(--accent-soft); animation: hlFade 2.4s ease-out; }
@keyframes hlFade { 0% { background: var(--amber-soft); } 100% { background: var(--accent-soft); } }

/* ===== Calendar ===== */
.cal { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); }
.cal-head div { padding: 9px 6px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 104px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); padding: 6px; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.cal-cell:nth-child(7n+1) { border-left: none; }
.cal-cell.dim { background: var(--surface-2); cursor: default; }
.cal-cell:not(.dim):hover { background: var(--accent-soft); }
.cal-day { font-weight: 600; align-self: flex-start; }
.cal-cell.today .cal-day { background: var(--accent); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cal-sun { color: var(--red); }
.cal-sat { color: var(--accent); }
.cal-holy { font-size: 10px; color: var(--red); font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cell.today .cal-day.holiday { background: var(--red); color: #fff; }
.cal.compact .cal-holy { font-size: 9px; }
.cal-ev { font-size: 11px; padding: 2px 6px; border-radius: 4px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { font-size: 10.5px; color: var(--muted); padding-left: 2px; }
.cal.compact .cal-cell { min-height: 70px; padding: 4px; }
.cal.compact .cal-ev { font-size: 10px; padding: 1px 4px; }
@media (max-width: 860px) { .cal-cell { min-height: 62px; } .cal-ev { font-size: 9.5px; } }

.sch-month-nav { gap: 10px; align-items: center; margin: 0; }
.sch-month-nav input[type="month"] {
  width: 160px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.sch-legend { gap: 10px; font-size: 11.5px; }
.sch-legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.sch-legend-item i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sch-day-list { margin-bottom: 14px; }
.sch-day-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.sch-day-item.is-link { cursor: pointer; }
.sch-day-item .faint { margin-left: auto; font-size: 11px; }
.sch-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.sch-share-list { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px; background: var(--surface); }
.field .sch-share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 0;
  cursor: pointer;
  color: var(--text);
  font-weight: 400;
  font-size: 13px;
}
.field .sch-share-item:nth-child(odd) { background: var(--surface); }
.field .sch-share-item:nth-child(even) { background: var(--surface-2); }
.field .sch-share-item:hover { background: var(--accent-soft); }
.field .sch-share-item:has(input:checked) { background: var(--accent-soft); }
.field .sch-share-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: none;
  accent-color: var(--accent);
}
.field .sch-share-item input[type="checkbox"]:focus { box-shadow: none; }
.sch-share-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
  line-height: 1.3;
}
.sch-share-meta b { font-size: 13px; color: var(--text); font-weight: 600; }
.sch-share-meta .faint { font-size: 12px; }
.sch-color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sch-color-row input[type="color"] { width: 42px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; }
.sch-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.sch-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.sch-swatch.is-on { border-color: #0f172a; box-shadow: 0 0 0 2px #fff inset; }
#schUntilWrap[hidden], #schDateHint[hidden] { display: none; }
.schedule-dash { grid-template-columns: 1.6fr 1fr; align-items: start; }
@media (max-width: 860px) { .schedule-dash { grid-template-columns: 1fr; } }

/* ===== Dropzone (첨부파일) ===== */
.dropzone { border: 2px dashed var(--border); border-radius: 10px; padding: 26px 20px; text-align: center; color: var(--muted); font-size: 13px; transition: all .15s; cursor: pointer; background: var(--surface-2); }
.dropzone:hover { border-color: var(--accent); }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone .dz-ic { font-size: 26px; display: block; margin-bottom: 8px; }
.filelist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fileitem { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--surface); }
.fileitem .fi-ic { color: var(--accent); }
.fileitem .fi-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileitem .fi-size { color: var(--faint); font-size: 12px; margin-left: auto; white-space: nowrap; }
.fileitem .fi-x { cursor: pointer; color: var(--faint); border: none; background: none; font-size: 16px; line-height: 1; padding: 0 2px; }
.fileitem .fi-x:hover { color: var(--red); }

/* ===== Login ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--sidebar); }
.login-card { background: var(--surface); border-radius: 14px; padding: 36px 34px; width: 360px; }
.login-card .logo { font-size: 18px; font-weight: 700; margin-bottom: 24px; }
.login-card .logo + .sub { margin-top: -18px; }
.login-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.login-brand-ko {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1;
  color: var(--text);
}
.login-brand-div {
  width: 1px;
  height: 13px;
  background: var(--border);
  flex-shrink: 0;
}
.login-brand-en {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--faint);
  line-height: 1;
}
.login-card .sub { color: var(--muted); font-size: 13px; margin: 6px 0 24px; }
.login-card .btn.primary { width: 100%; justify-content: center; padding: 11px; }
.login-remember {
  display: inline-flex;
  margin: 2px 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  user-select: none;
}
.login-card .otp-code,
.field input.otp-code[inputmode="numeric"] {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.role-pick .rp { border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: 12.5px; cursor: pointer; text-align: center; }
.role-pick .rp:hover { border-color: var(--accent); }
.role-pick .rp.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.dev-quick { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.dev-quick-title { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.dev-quick-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.dev-quick-row .rp {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font-size: 12px; cursor: pointer; background: var(--surface-2); color: var(--text);
  flex: 1 1 calc(50% - 6px); min-width: 0;
}
.dev-quick-row .rp:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dev-quick-hint { font-size: 11px; color: var(--faint); margin: 4px 0 0; line-height: 1.45; }

/* 업무일지 작성 — 담당/역할 선택 버튼 */
.choice-pick { display: grid; gap: 8px; }
.choice-pick .cp {
  border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px;
  font-size: 13px; cursor: pointer; text-align: left; background: var(--surface);
  color: var(--text); line-height: 1.4;
}
.choice-pick .cp:hover { border-color: var(--accent); }
.choice-pick .cp.sel {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent); font-weight: 600;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ===== 계약 요약 ===== */
.cs-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.cs-fact {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.cs-fact span {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
  margin-bottom: 4px;
}
.cs-fact b {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.2px;
}
.cs-fact-sub {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.cs-money-sub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px 16px;
}
.cs-money-sub .metric .k {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
  margin-bottom: 3px;
}
.cs-money-sub .metric .v {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.cs-money-sub .metric .v small {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
}
.cs-alerts { display: grid; gap: 8px; }
.cs-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.cs-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.cs-block-head h3 { font-size: 14px; font-weight: 600; }
.cs-block-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cs-block .empty { padding: 16px 2px; }
.cs-months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}
.cs-month {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 9px 7px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cs-month.is-gap { background: #fafafa; }
.cs-month-ym {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cs-month-ym em {
  font-style: normal;
  font-size: 10px;
  font-weight: 650;
  color: var(--faint);
}
.cs-mark {
  display: block;
  text-align: center;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  padding: 5px 0;
  border-radius: 5px;
  color: #9ca3af;
  background: #f3f4f6;
}
.cs-mark.on { color: #047857; background: #ecfdf5; }
.cs-mark.inv.on { color: #1d4ed8; background: #eff6ff; }
@media (max-width: 860px) {
  .cs-split { grid-template-columns: 1fr; }
  .cs-money-sub { grid-template-columns: 1fr; }
  .cs-block-head { flex-wrap: wrap; }
  .cs-block-meta { white-space: normal; }
}

/* ===== 계약 수정 2단 레이아웃 ===== */
.contract-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 0 24px; align-items: start; }
.contract-aside { position: sticky; top: 24px; }
@media (max-width: 1080px) {
  .contract-layout { grid-template-columns: 1fr; gap: 24px 0; }
  .contract-aside { position: static; }
}

/* 담당자 배정 미니카드 */
.asgn-card { border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px; margin-bottom: 8px; background: var(--surface-2); }
.asgn-card.is-inactive { opacity: 0.78; background: #f8fafc; }
.asgn-card:last-child { margin-bottom: 0; }
.asgn-card-head { display: flex; align-items: center; gap: 8px; }
.asgn-card-name { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asgn-card-sub { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.65; }
.asgn-card-memo {
  margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--border);
  white-space: pre-wrap; word-break: break-word; color: var(--text); font-size: 12px;
}
.asgn-card-del { background: none; border: none; cursor: pointer; color: var(--faint); font-size: 18px; line-height: 1; padding: 1px 4px; border-radius: 4px; flex-shrink: 0; }
.asgn-card-del:hover { color: var(--red); background: var(--red-soft); }
.asgn-svc-row.sel { background: var(--accent-soft); }

/* 거래처 담당자 카드 */
.cc-list { display: grid; gap: 10px; margin-bottom: 10px; }
.cc-card {
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  overflow: hidden;
}
.cc-card.is-primary { border-color: #bfdbfe; box-shadow: 0 0 0 3px var(--accent-soft); }
.cc-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.cc-card.is-primary .cc-card-head { background: #f0f7ff; }
.cc-card-title { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-primary {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap;
}
.cc-primary input { accent-color: var(--accent); }
.cc-card-del {
  background: none; border: none; cursor: pointer; color: var(--faint);
  font-size: 20px; line-height: 1; padding: 0 4px; border-radius: 4px; flex-shrink: 0;
}
.cc-card-del:hover { color: var(--red); background: var(--red-soft); }
.cc-card-body { padding: 14px 14px 4px; }
.cc-card-body .field { margin-bottom: 12px; }

/* ===== 자문료 청구서 ===== */
.inv-create-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.inv-create-form .field { margin-bottom: 0; }
.inv-create-actions-label {
  display: block;
  font-size: 12.5px;
  margin-bottom: 6px;
  line-height: 1;
  visibility: hidden;
  user-select: none;
}

/* ===== 자문료 청구서 상세 ===== */
.inv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.inv-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 74px; }
.inv-doc-top {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  margin-bottom: 16px;
}
.inv-client { font-size: 18px; font-weight: 700; margin-top: 2px; }
.inv-meta { font-size: 12.5px; text-align: right; line-height: 1.55; }
.inv-amount-block {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px 16px; margin: 8px 0 18px;
  border-radius: 10px; background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--border);
}
.inv-amount-block span { font-size: 14px; color: var(--muted); }
.inv-amount-block strong { font-size: 22px; letter-spacing: -0.02em; color: #b91c1c; }
.inv-amount-block small { font-size: 13px; font-weight: 600; color: var(--muted); }
.inv-kv {
  display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px;
  margin: 0 0 18px; font-size: 13px;
}
.inv-kv dt { color: var(--muted); }
.inv-kv dd { margin: 0; }
.inv-sec-h {
  font-size: 13.5px; font-weight: 700; margin: 18px 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl.inv-calc-tbl th {
  width: 28%;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}
table.tbl.inv-calc-tbl td {
  text-align: right;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  white-space: normal;
}

/* 계산 근거 사이드 — 계약 조건 요약 */
.inv-basis { font-size: 13px; line-height: 1.55; }
.inv-basis-meta { display: grid; gap: 4px; margin-bottom: 10px; color: var(--text, #1e293b); }
.inv-basis-formula {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid #fdba74; border-radius: 10px;
  background: #fff7ed;
}
.inv-basis-chip {
  font-weight: 700;
  color: #9a3412;
  font-variant-numeric: tabular-nums;
}
.inv-basis-chip.is-rate {
  color: #c2410c;
  font-size: 15px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffedd5;
}
.inv-basis-sep { color: #fb923c; font-weight: 700; }
.inv-basis-wl { display: grid; gap: 8px; }
.inv-basis-wl-h { font-weight: 600; margin-bottom: 2px; }
.inv-basis-wl-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.inv-basis-wl-item.role-manager {
  background: #eff6ff;
  border-color: #93c5fd;
}
.inv-basis-wl-item.role-manager .inv-basis-wl-role { color: #1d4ed8; font-weight: 700; }
.inv-basis-wl-item.role-manager .inv-basis-wl-name { color: #1e3a8a; }
.inv-basis-wl-item.role-manager .btn.sm {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #fff;
}
.inv-basis-wl-item.role-manager .btn.sm:hover {
  background: #dbeafe;
}
.inv-basis-wl-item.role-writer {
  background: #f0fdf4; border-color: #86efac;
}
.inv-basis-wl-item.role-instructor {
  background: #faf5ff; border-color: #d8b4fe;
}
.inv-basis-wl-item.role-editor {
  background: #fff7ed; border-color: #fdba74;
}
.inv-basis-wl-role { font-size: 11px; color: var(--muted); }
.inv-basis-wl-name { font-weight: 600; }
.inv-pay-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.inv-pay-row .field { min-width: 0; }

@media (max-width: 960px) {
  .inv-layout { grid-template-columns: 1fr; }
  .inv-side { position: static; }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .sidebar-slot { width: 0; height: 0; position: static; overflow: visible; }
  html.sidebar-compact .sidebar-slot { width: 0; }
  .sidebar,
  html.sidebar-compact .sidebar {
    position: fixed; left: -232px; top: 0; width: 232px; height: 100vh; z-index: 50; transition: left .2s;
    overflow: auto; box-shadow: none;
  }
  .sidebar.open { left: 0; }
  html.sidebar-compact .sidebar .brand .logo-full { display: flex; }
  html.sidebar-compact .sidebar .brand .logo-short { display: none; }
  html.sidebar-compact .sidebar .brand { padding: 18px 40px 16px 16px; text-align: left; }
  html.sidebar-compact .sidebar .brand .logo { flex-direction: row; align-items: center; gap: 8px; }
  html.sidebar-compact .sidebar .brand-ver { margin-top: 0; }
  html.sidebar-compact .sidebar nav a .menu-short,
  html.sidebar-compact .group-label-short { display: none; }
  html.sidebar-compact .group-toggle { display: flex; }
  html.sidebar-compact .menu-group + .menu-group {
    margin-top: 2px; padding-top: 0; border-top: none;
  }
  html.sidebar-compact .menu-label,
  html.sidebar-compact .group-label-full { display: inline; }
  html.sidebar-compact nav a {
    flex-direction: row; gap: 9px; padding: 8px 12px 8px 20px;
  }
  .sidebar-mode-btn { display: none; }
  .g2,.g3,.g4,.form-grid,.grid2,.grid3 { grid-template-columns: 1fr; }
  .content { padding: 16px 16px 96px; }
  .menu-toggle { display: inline-flex !important; }
  .sidebar-close { display: inline-flex; }
  .sidebar-backdrop.open { display: block; }

  /* 상단바: 좁은 화면에서는 좌우 여백/간격만 줄인다 (라벨은 PC/모바일 공통으로 이미 짧음) */
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-btn { padding: 7px 9px; }
}
.menu-toggle { display: none; }

/* 모바일 사이드바 배경 클릭 시 닫기용 오버레이 */
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 40; }

/* 모바일 사이드바 닫기 버튼 (데스크탑에서는 숨김) */
.sidebar-close {
  position: absolute; top: 16px; right: 14px; width: 26px; height: 26px; align-items: center; justify-content: center;
  background: none; border: none; color: #94a3b8; font-size: 15px; cursor: pointer; border-radius: 6px;
}
.sidebar-close:hover { background: var(--sidebar-2); color: #fff; }

/* ===== 매뉴얼 ===== */
.manual-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.manual-nav {
  position: sticky;
  top: 74px;
  padding: 12px 10px 14px;
  background: #e8edf3;
  border: 1px solid #d5dde6;
  border-radius: 12px;
}
.manual-nav-toggle {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-family: inherit;
  cursor: default;
}
.manual-nav-title {
  display: block;
  margin: 2px 6px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #334155;
}
.manual-nav-now,
.manual-nav-chev { display: none; }
.manual-search { margin: 0 4px 8px; }
.manual-search input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c5d0dc;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.manual-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.manual-nav-group[hidden] { display: none; }
.manual-nav-sec {
  margin: 12px 6px 5px;
  padding-top: 10px;
  border-top: 1px solid #d5dde6;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: .02em;
}
.manual-nav-group:first-child .manual-nav-sec { margin-top: 0; padding-top: 0; border-top: 0; }
.manual-nav-item {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  line-height: 1.35;
}
.manual-nav-item[hidden] { display: none; }
.manual-nav-item:hover { background: #e5e7eb; color: #111827; }
.manual-nav-item.active { background: #fff; color: var(--accent); font-weight: 650; box-shadow: 0 0 0 1px #dbeafe; }
.manual-nav-item em {
  margin-left: 6px;
  font-style: normal;
  font-size: 11px;
  color: var(--faint);
}
.manual-nav-label mark,
.manual-body mark.manual-hl {
  background: #fde68a;
  color: inherit;
  padding: 0 1px;
  border-radius: 3px;
}
.manual-nav-snip {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 400;
  color: #64748b;
  line-height: 1.4;
  white-space: normal;
}
.manual-nav-snip[hidden] { display: none; }
.manual-search-empty {
  margin: 8px 10px 4px;
  font-size: 13px;
  color: var(--muted);
}
.manual-search-empty[hidden] { display: none; }
.manual-article {
  min-height: 420px;
  padding: 22px 28px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.manual-article-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.manual-article-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.manual-meta { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.manual-body { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14.5px; line-height: 1.75; color: #1f2937; }
.manual-body h2 { margin: 22px 0 8px; font-size: 17px; }
.manual-body h3 { margin: 18px 0 6px; font-size: 15px; }
.manual-body h4 { margin: 14px 0 6px; font-size: 14px; }
.manual-body p { margin: 0 0 12px; }
.manual-body ul, .manual-body ol { margin: 0 0 14px 1.2em; }
.manual-body li { margin: 4px 0; }
.manual-body hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.manual-body code {
  padding: 1px 6px;
  border-radius: 4px;
  background: #f3f4f6;
  font-size: 12.5px;
}
.manual-body strong { font-weight: 700; }
.manual-staff {
  margin: 18px 0 8px;
  padding: 10px 14px 6px;
  border-left: 3px solid #93c5fd;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
}
.manual-staff-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #64748b;
}
.manual-staff > :last-child { margin-bottom: 8px; }
.manual-editor-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.manual-editor-bar .hint { margin: 0; }
@media (max-width: 860px) {
  .manual-layout { grid-template-columns: 1fr; }
  .manual-nav { position: static; padding: 0; }
  .manual-nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    cursor: pointer;
  }
  .manual-nav-title { margin: 0; flex-shrink: 0; }
  .manual-nav-now {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 650;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .manual-nav-chev {
    display: block;
    color: #64748b;
    font-size: 12px;
    transition: transform .16s ease;
  }
  .manual-nav.open .manual-nav-chev,
  .manual-nav.is-searching .manual-nav-chev { transform: rotate(180deg); }
  .manual-search { margin: 0 8px 8px; }
  .manual-nav-list { display: none; padding: 0 8px 10px; }
  .manual-nav.open .manual-nav-list,
  .manual-nav.is-searching .manual-nav-list { display: block; }
  .manual-article { padding: 16px 16px 20px; }
}
