/* 방재온 업무관리 · 소방설비 업체 ERP 시연 */
:root {
  --bg: #F1F1EE;
  --surface: #FFFFFF;
  --line: #D8D8D2;
  --line-soft: #E8E8E3;
  --text: #1C1C1C;
  --muted: #64645F;
  --primary: #C8281E;
  --accent: #1F2A44;
  --ok: #1E8E5A;
  --ok-text: #16704A;
  --warn: #E0A100;
  --warn-text: #845C00;
  --danger: #8E1B14;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.fs {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  word-break: keep-all; overflow-wrap: anywhere;
  padding-bottom: 28px;
}
.fs :where(h1, h2, h3, p, ul, ol, dl, dd) { margin: 0; }
.fs :where(ul, ol) { padding: 0; list-style: none; }
.fs :where(a) { color: inherit; }
.fs :where(button, input, select) { font: inherit; color: inherit; }
.fs :where(button) { cursor: pointer; }
.fs :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fs [hidden] { display: none !important; }
.num, .num-l { font-variant-numeric: tabular-nums; }
.num-l { white-space: nowrap; }
.num { text-align: right; }
.fs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fs-mock { display: inline-block; padding: 0 6px; border: 1px dashed currentColor; border-radius: var(--r); font-size: 12px; font-weight: 600; color: var(--muted); line-height: 18px; vertical-align: 1px; }

/* ── 상단 ─────────────────────────── */
.fs-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  height: 52px; padding: 0 16px 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.fs-top .fs-top__menu { display: none; }
.fs-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; width: 184px; flex: none; }
.fs-brand__mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r); background: var(--primary); }
.fs-brand__mark svg { width: 18px; height: 18px; fill: #fff; }
.fs-brand__name { font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.fs-brand__name b { font-weight: 800; }
.fs-top__date { font-size: 13px; color: var(--muted); }
.fs-top__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.fs-role { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.fs-role__label { color: var(--muted); }
.fs-role select {
  height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231C1C1C' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 10px center / 10px 6px;
  appearance: none; font-weight: 700; color: var(--accent);
}
.fs-user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.fs-user__avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }

.fs-iconbtn { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; border-radius: var(--r); }
.fs-iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.fs-iconbtn:hover { background: var(--bg); }

.fs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r);
  background: var(--primary); border: 1px solid var(--primary); color: #fff;
  font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.fs .fs-btn { color: #fff; }
.fs-btn:hover { background: #A91F16; border-color: #A91F16; }
.fs-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.fs .fs-btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.fs-btn--ghost:hover { background: var(--bg); border-color: #BDBDB6; }
.fs-btn:disabled { background: #D9D9D4; border-color: #D9D9D4; color: #8A8A85; cursor: not-allowed; }
.fs .fs-btn--ghost:disabled { background: var(--surface); color: #A3A39E; border-color: var(--line-soft); }
.fs-btn.is-locked { color: var(--muted); }
.fs-lock { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; flex: none; }
.fs-btn:not(.is-locked) .fs-lock { display: none; }

/* ── 틀 ───────────────────────────── */
.fs-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: calc(100vh - 80px); }
.fs-menu { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px 24px; }
.fs-menu nav { position: sticky; top: 66px; display: grid; gap: 2px; }
.fs-menu__group { font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 10px 6px; }
.fs-menu__group:first-child { padding-top: 0; }
.fs-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--r); background: none;
  font-size: 14px; text-decoration: none; text-align: left; color: var(--text);
}
.fs-menu__item:hover { background: var(--bg); }
.fs-menu__item.is-active { background: #FBEDEC; color: var(--primary); font-weight: 700; box-shadow: inset 3px 0 0 var(--primary); }
.fs-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.fs-menu__sub { min-height: 34px; padding-left: 14px; gap: 8px; font-size: 13px; color: var(--muted); }
.fs-menu__sub::before { content: ""; width: 14px; flex: none; }
.fs-menu__sub span, .fs-menu__sub small { white-space: nowrap; }
.fs-menu__sub small { margin-left: auto; font-size: 11px; color: var(--muted); }
.fs-menu__sub:not(.is-locked) .fs-lock { display: none; }
.fs-menu__sub.is-locked { color: #8A8A85; }
.fs-menu__sub:not(.is-locked) small { color: var(--ok-text); font-weight: 700; }
.fs-menu__item.is-scope { color: #8E8E89; cursor: default; font-size: 13px; min-height: 32px; }
.fs-menu__item.is-scope:hover { background: none; }
.fs-menu__dot { width: 18px; display: grid; place-items: center; flex: none; }
.fs-menu__dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #C4C4BE; }
.fs-scrim { display: none; }

.fs-main { min-width: 0; }

/* ── 흐름 레일(시그니처) ─────────── */
.fs-rail { position: sticky; top: 52px; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.fs-rail__list { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.fs-rail__cell { position: relative; }
.fs-rail__cell + .fs-rail__cell::before {
  content: ""; position: absolute; left: -5px; top: 50%; width: 9px; height: 9px; z-index: 1;
  border-top: 1.5px solid #B9B9B2; border-right: 1.5px solid #B9B9B2; transform: translateY(-50%) rotate(45deg);
  background: var(--surface);
}
.fs-rail__cell a {
  display: grid; gap: 0; padding: 10px 14px 9px 16px; text-decoration: none; height: 100%;
  border-bottom: 3px solid transparent;
}
.fs-rail__cell a:hover { background: var(--bg); }
.fs-rail__label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fs-rail__count { display: flex; align-items: baseline; gap: 2px; }
.fs-rail__count b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fs-rail__count small { font-size: 12px; color: var(--muted); }
.fs-rail__cell.is-focus a { border-bottom-color: var(--primary); }
.fs-rail__cell.is-focus .fs-rail__label { color: var(--primary); font-weight: 700; }
.fs-rail__cell.is-alert .fs-rail__count b { color: var(--primary); }
.fs-rail__cell.is-bump a { animation: fs-bump 1.2s ease; }
@keyframes fs-bump { 0% { background: #FDE3E0; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .fs-rail__cell.is-bump a { animation: none; } }

/* ── 페이지 ───────────────────────── */
.fs-page { padding: 20px 24px 80px; max-width: 1240px; display: grid; gap: 16px; }
.fs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.fs-crumb { font-size: 12px; color: var(--muted); }
.fs-crumb a { text-decoration: none; }
.fs-crumb a:hover { text-decoration: underline; }
.fs-h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fs-h2 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 6px; }
.fs-head__meta, .fs-head__info { font-size: 13px; color: var(--muted); }
.fs-head__info { margin-top: 4px; }
.fs-head__tools { display: flex; align-items: center; gap: 10px; }
.fs-meta { font-size: 12px; color: var(--muted); }
.fs-label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.fs-link { font-size: 13px; color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
.fs-note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.fs-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg); font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.fs-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.fs-panel--flush { padding: 0; }
.fs-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 12px; }

.fs-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.fs-col-7 { grid-column: span 7; }
.fs-col-5 { grid-column: span 5; }

.fs-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.fs-kpis--client { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fs-kpi { padding: 14px 16px; border-right: 1px solid var(--line-soft); min-width: 0; }
.fs-kpi:last-child { border-right: 0; }
.fs-kpi__label { font-size: 13px; color: var(--muted); }
.fs-kpi__value { display: flex; align-items: baseline; gap: 3px; margin-top: 2px; }
.fs-kpi__value b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.fs-kpi__value small { font-size: 13px; color: var(--muted); }
.fs-kpi__value--sm b { font-size: 20px; }
.fs-kpi__note { font-size: 12px; color: var(--muted); }
.fs-kpi--unpaid { background: #FDF3F2; }
.fs-kpi--unpaid .fs-kpi__value b, .fs-kpi--unpaid .fs-kpi__label { color: var(--primary); }
.fs-kpi--unpaid.is-clear { background: #EFF8F3; }
.fs-kpi--unpaid.is-clear .fs-kpi__value b, .fs-kpi--unpaid.is-clear .fs-kpi__label { color: var(--ok-text); }
.fs-kpis > .fs-kpi:first-child { border-radius: var(--r) 0 0 var(--r); }
.fs-kpis > .fs-kpi:last-child { border-radius: 0 var(--r) var(--r) 0; }

/* 표 */
.fs-tablewrap { overflow-x: auto; }
.fs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fs-tablecap { margin-bottom: 8px; }
.fs-table th, .fs-table td { height: 36px; padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.fs-table thead th { height: 32px; background: #F7F7F4; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.fs-table .num { text-align: right; white-space: nowrap; }
.fs-table td small { display: block; font-size: 12px; color: var(--muted); }
.fs-table td strong { font-weight: 700; }
.fs-table tfoot th, .fs-table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 700; }
.fs-table--plain th, .fs-table--plain td { padding-left: 0; }
.fs-table--plain th { font-weight: 500; display: flex; align-items: center; gap: 8px; border-bottom: 0; height: 36px; }
.fs-table--plain tr { border-bottom: 1px solid var(--line-soft); }
.fs-table--plain .is-total th, .fs-table--plain .is-total td { font-weight: 800; }
.fs-table td.is-warn { color: var(--warn-text); font-weight: 700; }
.fs-table td.is-danger { color: var(--primary); font-weight: 700; }
.fs-cell-act { text-align: right; width: 1%; white-space: nowrap; }
.fs-table tr.is-done td { color: var(--muted); }
.fs-reissue { color: var(--accent) !important; }

.fs-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--r); background: #EEEEEA; font-size: 12px; font-weight: 600; color: #3E3E3A; white-space: nowrap; }
.fs-tag--accent, .fs-tag--navy { background: #E6E9F0; color: var(--accent); }
.fs-tag--red { background: #FBE7E5; color: var(--primary); }
.fs-tag--plain { background: #EEEEEA; }
.fs-h1 .fs-tag { font-size: 12px; }
.fs-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.fs-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.fs-state--ok { color: var(--ok-text); }
.fs-state--warn { color: var(--warn-text); }
.fs-state--warn::before { background: var(--warn); }
.fs-state--due { color: var(--primary); }
.fs-state--due.is-old { color: var(--danger); }

/* 대시보드 */
.fs-stack { display: flex; height: 36px; border-radius: var(--r); overflow: hidden; margin-bottom: 10px; }
.fs-stack__seg { display: flex; align-items: center; padding-left: 10px; color: #fff; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fs-tone-primary { background: var(--primary); }
.fs-tone-accent { background: var(--accent); }
.fs-tone-muted { background: #8A8F99; }
.fs-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.fs-aging { display: grid; gap: 10px; }
.fs-aging li { display: grid; grid-template-columns: 72px minmax(0, 1fr) 128px; gap: 10px; align-items: center; font-size: 13px; }
.fs-aging__label { color: var(--muted); }
.fs-aging__bar { height: 12px; background: #F1F1EE; border-radius: 2px; overflow: hidden; }
.fs-aging__bar span { display: block; height: 100%; background: #E79D97; }
.fs-aging__bar span.is-old { background: var(--primary); }
.fs-aging__val { text-align: right; font-weight: 600; }
.fs-list { display: grid; }
.fs-list__row { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.fs-list__row:last-child { border-bottom: 0; }
.fs-list__main { display: grid; min-width: 0; font-size: 13px; }
.fs-list__main small { color: var(--muted); font-size: 12px; }
.fs-dday { flex: none; display: grid; place-items: center; width: 52px; height: 28px; border-radius: var(--r); background: #F1F1EE; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fs-dday.is-near { background: #FBE7E5; color: var(--primary); }
.fs-projects { display: grid; }
.fs-project { padding: 10px 0 12px; border-bottom: 1px solid var(--line-soft); }
.fs-project:first-child { padding-top: 0; }
.fs-project:last-child { border-bottom: 0; padding-bottom: 0; }
.fs-project__head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.fs-project__head > span:first-child { display: grid; }
.fs-project__head small { color: var(--muted); font-size: 12px; }
.fs-project__head .num { font-weight: 700; }
.fs-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 8px 0 4px; }
.fs-steps li { position: relative; padding-top: 9px; font-size: 12px; color: #9A9A95; text-align: center; }
.fs-steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 2px; background: #E6E6E1; }
.fs-steps li.is-done { color: var(--text); }
.fs-steps li.is-done::before { background: var(--accent); }
.fs-steps li.is-now { color: var(--primary); font-weight: 800; }
.fs-steps li.is-now::before { background: var(--primary); }
.fs-project__note { font-size: 12px; color: var(--muted); }
.fs-insp__big { font-size: 14px; color: var(--muted); }
.fs-insp__big b { font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.fs-meter { height: 10px; border-radius: 5px; background: #EEEEEA; overflow: hidden; margin: 8px 0 12px; }
.fs-meter span { display: block; height: 100%; background: var(--accent); }
.fs-dl { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; font-size: 13px; }
.fs-dl dt { color: var(--muted); }
.fs-dl dd.is-warn { color: var(--warn-text); font-weight: 700; }

/* 거래처 상세 */
.fs-tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.fs-tab { display: grid; text-align: left; gap: 0; min-height: 56px; padding: 10px 20px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; flex: none; }
.fs-tab span { font-size: 15px; font-weight: 700; }
.fs-tab small { font-size: 12px; color: var(--muted); }
.fs-tab.is-active { border-bottom-color: var(--primary); }
.fs-tab.is-active span { color: var(--primary); }
.fs-tab:hover { background: var(--bg); }
.fs-tabpanel { padding: 16px; display: grid; gap: 16px; }
.fs-bldg { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; }
.fs-bldg__info { display: grid; gap: 10px; align-content: start; }
.fs-bldg__info .fs-label { margin-top: 6px; }
.fs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); font-size: 13px; color: #7C7C77; }
.fs-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.fs-chips--toggle .fs-chip { min-height: 36px; }
.fs-chips--toggle .fs-chip:hover { border-color: var(--accent); }
.fs-contracts { display: grid; gap: 8px; }
.fs-contracts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r); font-size: 13px; }
.fs-contracts__type { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fs-contracts__amt { font-weight: 800; }
.fs-contracts small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.fs-timeline { position: relative; display: grid; gap: 0; }
.fs-timeline li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 8px 0; position: relative; }
.fs-timeline li::before { content: ""; position: absolute; left: 58px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.fs-timeline li::after { content: ""; position: absolute; left: 55px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.fs-timeline__date { font-size: 13px; font-weight: 700; padding-top: 2px; }
.fs-timeline__body { padding-left: 14px; font-size: 13px; display: block; }
.fs-timeline__body strong { font-weight: 700; }
.fs-timeline__body small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.fs-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.fs-seg__btn { min-height: 36px; padding: 0 14px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.fs-seg__btn + .fs-seg__btn { border-left: 1px solid var(--line); }
.fs-seg__btn.is-on { background: var(--accent); color: #fff; }

/* 점검보고서 */
.fs-report { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 16px; align-items: start; }
.fs-report__input { display: grid; gap: 16px; min-width: 0; }
.fs-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fs-field { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
.fs-field--wide { grid-column: span 2; }
.fs-field input, .fs-field select {
  height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text); width: 100%;
}
.fs-field input:focus, .fs-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,42,68,.12); }
.fs-field .fs-seg { width: 100%; }
.fs-field .fs-seg__btn { flex: 1; min-height: 38px; }
.fs-report__bar {
  position: sticky; top: 124px; z-index: 5;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--accent); border-radius: var(--r); color: #fff;
}
.fs-progress { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fs-progress__bar { width: 120px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; }
.fs-progress__bar span { display: block; height: 100%; background: #fff; width: 0; }
.fs-report__bar .fs-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.fs-report__bar .fs-btn--ghost:hover { background: rgba(255,255,255,.1); }
.fs-sections { display: grid; gap: 12px; }
.fs-empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.fs-eq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.fs-eq__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); background: #FAFAF8; border-radius: var(--r) var(--r) 0 0; }
.fs-eq__head h3 { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.fs-eq__no { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.fs-eq__qty { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.fs-eq__qty input { width: 84px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.fs-eq__items { display: grid; }
.fs-eq__row { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr); gap: 10px; align-items: center; min-height: 44px; padding: 4px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.fs-eq__row:last-child { border-bottom: 0; }
.fs-eq__row.is-bad { background: #FDF3F2; }
.fs-eq__row.is-flag.is-empty { box-shadow: inset 3px 0 0 var(--primary); background: #FFF8E6; }
.fs-ok { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fs-ok__btn { min-width: 52px; min-height: 34px; padding: 0 10px; border: 0; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); }
.fs-ok__btn + .fs-ok__btn { border-left: 1px solid var(--line); }
.fs-ok__btn.is-ok { background: var(--ok); color: #fff; }
.fs-ok__btn.is-bad { background: var(--primary); color: #fff; }
.fs-eq__note { height: 34px; padding: 0 8px; border: 1px solid var(--line-soft); border-radius: var(--r); font-size: 13px; min-width: 0; width: 100%; }
.fs-eq__note:focus { outline: none; border-color: var(--accent); }

.fs-report__preview { position: sticky; top: 124px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.fs-preview__tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fs-preview__btns { display: flex; gap: 6px; }
.fs-a4 {
  aspect-ratio: 210 / 297; background: #fff; border: 1px solid var(--line); border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px rgba(28,28,28,.06);
  display: flex; flex-direction: column; min-width: 0;
}
.fs-a4__empty { margin: auto; text-align: center; color: var(--muted); font-size: 13px; padding: 24px; }
.fs-a4__empty svg { width: 48px; height: 48px; fill: none; stroke: #BDBDB6; stroke-width: 1.5; margin-bottom: 10px; }
.fs-a4__page { padding: 26px 24px; font-size: 10px; line-height: 1.45; color: #111; min-width: 0; }
.fs-a4__no { font-size: 9px; color: #666; text-align: right; }
.fs-a4__title { font-size: 16px; font-weight: 800; text-align: center; margin: 6px 0 12px; letter-spacing: .02em; }
.fs-a4__meta, .fs-a4__res { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fs-a4__meta th { width: 17%; }
.fs-a4__res thead th:nth-child(1) { width: 21%; }
.fs-a4__res thead th:nth-child(2) { width: 10%; }
.fs-a4__res thead th:nth-child(3) { width: 31%; }
.fs-a4__res thead th:nth-child(4) { width: 10%; }
.fs-a4__meta th, .fs-a4__meta td, .fs-a4__res th, .fs-a4__res td { border: 1px solid #555; padding: 3px 5px; text-align: left; vertical-align: middle; }
.fs-a4__meta th, .fs-a4__res thead th { background: #F0F0EC; font-weight: 700; }
.fs-a4__res th[scope="rowgroup"] { background: #FAFAF8; font-weight: 700; }
.fs-a4__res .c { text-align: center; white-space: nowrap; }
.fs-a4__res .num { text-align: right; white-space: nowrap; padding-left: 3px; padding-right: 4px; }
.fs-a4__res tr.is-bad td:not([rowspan]) { color: var(--danger); font-weight: 700; }
.fs-a4__h { font-weight: 800; margin: 12px 0 5px; font-size: 11px; }
.fs-a4__p { font-size: 10px; }
.fs-a4__sign { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 10px; border-top: 1px solid #999; font-size: 10px; }

/* 입금 매칭 */
.fs-kpis--bank .fs-kpi__value b { font-size: 24px; }
.fs-bank { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.fs-deps { display: grid; gap: 10px; }
.fs-dep { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 6px; background: var(--surface); }
.fs-dep.is-picking { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,42,68,.15); }
.fs-dep.is-done { background: #F7FBF8; border-color: #CFE5D8; }
.fs-dep__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fs-dep__at { font-size: 12px; color: var(--muted); }
.fs-dep__main { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fs-dep__name { font-size: 16px; font-weight: 800; }
.fs-dep__amt { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.fs-dep__why { font-size: 12px; color: var(--muted); }
.fs-dep__to { font-size: 13px; font-weight: 700; color: var(--accent); }
.fs-dep__lines { display: grid; gap: 2px; padding: 8px 10px; background: #F7F7F4; border-radius: var(--r); font-size: 13px; }
.fs-dep__lines li { display: flex; justify-content: space-between; gap: 10px; }
.fs-dep__lines li .num { font-weight: 600; white-space: nowrap; }
.fs-dep__lines .is-sum { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; font-weight: 800; }
.fs-dep__rest { font-size: 12px; color: var(--warn-text); font-weight: 700; }
.fs-dep__err { font-size: 12px; color: var(--primary); font-weight: 700; }
.fs-dep__act { display: flex; justify-content: flex-end; gap: 6px; margin-top: 2px; }
.fs-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 700; }
.fs-badge--auto { background: #E6E9F0; color: var(--accent); }
.fs-badge--unclear { background: #FFF1CC; color: var(--warn-text); }
.fs-badge--warn { background: #FBE7E5; color: var(--primary); }
.fs-badge--ok { background: #DDF1E6; color: var(--ok-text); }
.fs-learn { font-size: 13px; padding: 6px 10px; border-radius: var(--r); background: var(--accent); color: #fff; }
.fs-learn b { font-weight: 800; }
.fs-invs .fs-cell-pick { width: 36px; padding-right: 0; }
.fs-invs:not(.is-picking) .fs-cell-pick, .fs-invs:not(.is-picking) thead th:first-child { display: none; }
.fs-invs input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.fs-invs tr.is-selectable { cursor: pointer; }
.fs-invs tr.is-selectable:hover td { background: #F7F8FB; }
.fs-invs tr.is-picked td { background: #EEF1F7; }
.fs-invs tr.is-paid td { color: #9A9A95; }
.fs-invs tr.is-paid td strong { color: #7C7C77; }
.fs-invs td .fs-tag { margin-top: 3px; }
.fs-aliases { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-aliases li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; }
.fs-aliases li.is-new { border-color: var(--primary); background: #FDF3F2; }
.fs-alias__from { font-weight: 800; }

/* 알림·대응표·안내 */
.fs-toast {
  position: fixed; left: 50%; bottom: 44px; z-index: 80; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px);
  padding: 11px 16px; border-radius: var(--r); background: var(--text); color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.fs-mapbtn {
  position: fixed; right: 16px; bottom: 40px; z-index: 50;
  min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r);
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(31,42,68,.28);
}
.fs .fs-mapbtn { color: #fff; }
.fs-sheet { position: fixed; inset: 0; z-index: 90; }
.fs-sheet__scrim { position: absolute; inset: 0; background: rgba(28,28,28,.4); }
.fs-sheet__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--surface); overflow-y: auto; padding: 20px; }
.fs-sheet__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fs-sheet__head h2 { font-size: 20px; font-weight: 800; }
.fs-map li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.fs-map__no { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; }
.fs-map__req { font-weight: 800; font-size: 14px; }
.fs-map__shown { font-size: 13px; color: var(--muted); }
.fs-map a { font-size: 13px; font-weight: 700; color: var(--accent); }
.fs-sheet__foot { font-size: 12px; color: var(--muted); padding-top: 12px; }

.demo-notice {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  height: 28px; display: flex; align-items: center; justify-content: center; padding: 0 12px;
  background: #E7E7E2; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center;
}

/* ── 반응형 ───────────────────────── */
@media (max-width: 1180px) {
  .fs-report { grid-template-columns: 1fr; }
  .fs-report__preview { position: static; max-width: 560px; }
  .fs-bank { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .fs-top { padding: 0 8px 0 4px; gap: 6px; }
  .fs-top .fs-top__menu { display: grid; }
  .fs-brand { width: auto; }
  .fs-brand__name { font-size: 15px; }
  .fs-top__date, .fs-user, .fs-role__label { display: none; }
  .fs-top__right { gap: 6px; }
  .fs-role select { height: 34px; font-size: 13px; padding-right: 24px; background-position: right 8px center; }
  .fs-top .fs-btn--sm { min-height: 34px; padding: 0 8px; font-size: 12px; }

  .fs-shell { grid-template-columns: 1fr; }
  .fs-menu {
    position: fixed; top: 52px; left: 0; bottom: 0; z-index: 60; width: 260px;
    transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto;
  }
  .fs.is-menu .fs-menu { transform: none; }
  .fs-menu nav { position: static; }
  .fs-menu__item { min-height: 44px; }
  .fs-scrim { display: block; position: fixed; inset: 52px 0 0 0; z-index: 55; background: rgba(28,28,28,.35); }

  .fs-rail { top: 52px; }
  .fs-rail__list { display: flex; overflow-x: auto; scrollbar-width: none; }
  .fs-rail__list::-webkit-scrollbar { display: none; }
  .fs-rail__cell { flex: none; }
  .fs-rail__cell a { padding: 8px 14px 7px 16px; min-width: 84px; }
  .fs-rail__count b { font-size: 18px; }

  .fs-page { padding: 16px 16px 88px; gap: 12px; }
  .fs-h1 { font-size: 22px; }
  .fs-grid { grid-template-columns: 1fr; gap: 12px; }
  .fs-col-7, .fs-col-5 { grid-column: auto; }
  .fs-kpis, .fs-kpis--client { grid-template-columns: 1fr 1fr; }
  .fs-kpi { border-bottom: 1px solid var(--line-soft); padding: 12px 14px; }
  .fs-kpi:nth-child(2n) { border-right: 0; }
  .fs-kpis > .fs-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .fs-kpi__value b { font-size: 20px; }
  .fs-kpi__value--sm b { font-size: 17px; }
  .fs-kpis--bank .fs-kpi__value b { font-size: 20px; }

  .fs-cards-sm thead { display: none; }
  .fs-cards-sm, .fs-cards-sm tbody, .fs-cards-sm tfoot, .fs-cards-sm tr, .fs-cards-sm td, .fs-cards-sm th { display: block; }
  .fs-cards-sm tr { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
  .fs-cards-sm td, .fs-cards-sm tfoot th { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; align-items: center; height: auto; padding: 3px 0; border: 0; text-align: left; }
  .fs-cards-sm td::before { content: attr(data-label); font-size: 12px; color: var(--muted); font-weight: 500; }
  .fs-cards-sm td > * { justify-self: start; }
  .fs-cards-sm td.num { text-align: left; }
  .fs-cards-sm td.fs-cell-act { display: flex; justify-content: flex-end; width: auto; padding-top: 6px; }
  .fs-cards-sm td.fs-cell-act::before, .fs-cards-sm td.fs-cell-pick::before { display: none; }
  .fs-cards-sm tfoot tr { display: grid; grid-template-columns: 1fr auto; gap: 4px; border-bottom: 0; }
  .fs-cards-sm tfoot th, .fs-cards-sm tfoot td { display: block; padding: 0; }
  .fs-cards-sm tfoot td.fs-meta { grid-column: 1 / -1; }
  /* 모바일 압축 카드: 미수 세금계산서 · 청구 대기 */
  .fs-invs tr, .fs-jobs tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; }
  .fs-invs td, .fs-jobs td { display: block; padding: 0; }
  .fs-invs td::before, .fs-jobs td::before { display: none; }
  .fs-invs td[data-label="거래처 · 건물"], .fs-jobs td[data-label="현장 · 업무"] { grid-column: 1; grid-row: 1 / span 2; }
  .fs-invs td[data-label="청구 잔액"], .fs-jobs td[data-label="청구 금액"] { grid-column: 2; grid-row: 1; text-align: right; font-weight: 800; font-size: 14px; }
  .fs-invs td[data-label="청구 잔액"] small { font-weight: 500; }
  .fs-invs td[data-label="상태"] { grid-column: 2; grid-row: 2; text-align: right; }
  .fs-invs td[data-label="발행"] { grid-column: 1; grid-row: 3; font-size: 12px; color: var(--muted); }
  .fs-invs td[data-label="발행"]::after { content: " 발행"; }
  .fs-invs td[data-label="경과"] { grid-column: 2; grid-row: 3; text-align: right; font-size: 12px; }
  .fs-invs td[data-label="업종"] { display: none; }
  .fs-jobs td[data-label="유형"] { grid-column: 2; grid-row: 2; text-align: right; }
  .fs-jobs td[data-label="작성일"] { grid-column: 1; grid-row: 3; font-size: 12px; color: var(--muted); align-self: center; }
  .fs-jobs td.fs-cell-act { grid-column: 2; grid-row: 3; padding-top: 4px; }
  .fs-invs tr { position: relative; }
  .fs-invs.is-picking tr { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .fs-invs.is-picking td.fs-cell-pick { grid-column: 1; grid-row: 1 / span 3; display: block; width: auto; padding-top: 2px; }
  .fs-invs.is-picking td[data-label="거래처 · 건물"], .fs-invs.is-picking td[data-label="발행"] { grid-column: 2; }
  .fs-invs.is-picking td[data-label="청구 잔액"], .fs-invs.is-picking td[data-label="상태"], .fs-invs.is-picking td[data-label="경과"] { grid-column: 3; }
  .fs-invs input[type="checkbox"] { width: 24px; height: 24px; }
  .fs-invs tr.is-picked { background: #EEF1F7; }
  .fs-invs tr.is-picked td { background: none; }
  .fs-toast { bottom: 92px; }

  .fs-aging li { grid-template-columns: 64px minmax(0, 1fr) 118px; }
  .fs-bldg { grid-template-columns: 1fr; gap: 16px; }
  .fs-tabpanel { padding: 12px; }
  .fs-tab { padding: 8px 14px; }
  .fs-form { grid-template-columns: 1fr 1fr; }
  .fs-field--wide { grid-column: 1 / -1; }
  .fs-report__bar { top: 112px; }
  .fs-progress { width: 100%; margin-right: 0; }
  .fs-progress__bar { flex: 1; width: auto; }
  .fs-report__bar .fs-btn { flex: 1; }
  .fs-eq__row { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 12px; }
  .fs-eq__note { grid-column: 1 / -1; }
  .fs-ok__btn { min-height: 40px; }
  .fs-panel__head .fs-seg { width: 100%; }
  .fs-panel__head .fs-seg__btn { flex: 1; min-height: 40px; }
  .fs-sheet__panel { top: auto; left: 0; width: 100%; max-height: 88vh; border-radius: 8px 8px 0 0; }
  .fs-a4__page { padding: 18px 12px; }
  .fs-mapbtn { right: 12px; bottom: 36px; }
  .fs-head__tools { width: 100%; justify-content: space-between; }
}
