/* ============================================================
   창조 현장 업무 — 새 웹(16-가 회차 1) 화면 틀
   B안(현장형): 따뜻한 회색 바탕 + 안전 주황 포인트, 글자·버튼 한 단계 크게
   - 크기는 rem(화면 전체 글자 기준) — 한 곳(html)만 바꾸면 라벨까지 같이 커짐
   - 회사 로고(파랑·분홍)는 로고 그림으로만 — 화면 색은 무채색 + 주황 하나
   - 작은 글씨도 대비 4.5:1 이상(Fable 검토 반영)
   ============================================================ */
:root {
  --bg: #f2f1ed;
  --surface: #ffffff;
  --surface-2: #f7f6f3;
  --sidebar: #ffffff;
  --sidebar-ink: #2b2a27;
  --line: #dddad3;
  --line-strong: #c7c3ba;
  --text: #191816;
  --muted: #57554f;
  --faint: #66645e;
  --accent: #c2410c;
  --accent-hover: #a8380a;
  --accent-ink: #ffffff;
  --accent-soft: #fbebe2;
  --accent-text: #a8380a;
  --warn: #8a5a08;
  --warn-soft: #faf0dc;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #2d6a3e;
  --ok-soft: #e7f1e9;
  --radius: .625rem;
  --control-h: 2.75rem;
  --btn-h: 2.75rem;
  --shadow: 0 1px 3px rgba(25, 24, 22, .06);
  --side-w: 15rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
  font-size: .9375rem;          /* PC 15px */
  line-height: 1.55;
  word-break: keep-all;         /* 한글은 낱말 단위 줄바꿈 */
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--surface); padding: .5rem 1rem; border-radius: var(--radius); }

.ic { width: 1.125rem; height: 1.125rem; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .8125rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- 틀: 왼쪽 메뉴(PC) + 위 띠 + 본문 + 아래 메뉴(휴대폰) ---------------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--sidebar); border-right: 1px solid var(--line);
  padding: 1.125rem .75rem 1rem; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .625rem; padding: .25rem .5rem 1rem; }
.brand-mark { width: 2rem; height: 2rem; border-radius: .25rem; flex: none; }
.brand-name { display: block; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.brand-sub { display: block; font-size: .75rem; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { font-size: .75rem; font-weight: 700; color: var(--faint); padding: .875rem .625rem .25rem; letter-spacing: .02em; }
.nav-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; border-radius: .375rem; }
.nav-sec > summary::-webkit-details-marker { display: none; }
.nav-sec > summary::after { content: ""; width: .4375rem; height: .4375rem; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); margin: 0 .25rem .1875rem 0; transition: transform .15s; }
.nav-sec:not([open]) > summary::after { transform: rotate(-45deg); margin-bottom: 0; }
.nav-sec > summary:hover { color: var(--text); }
.nav-sec > a { margin-bottom: 1px; }
.nav a {
  display: flex; align-items: center; gap: .625rem; min-height: 2.25rem; padding: .375rem .625rem; border-radius: .5rem;
  color: var(--sidebar-ink); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.nav a .ext { margin-left: auto; width: .8125rem; height: .8125rem; color: var(--faint); stroke-width: 2; }
.side-foot { margin-top: auto; padding: .875rem .625rem 0; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); line-height: 1.5; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  min-height: 3.75rem; display: flex; align-items: center; gap: .75rem; justify-content: space-between;
  padding: .5rem 1.75rem; border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.m-brand { display: none; }
.site-pick {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.5rem; padding: 0 .875rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius); font-weight: 700; background: var(--surface); max-width: 100%;
}
.site-pick span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-pick .nm-short { display: none; }
.site-pick .caret { color: var(--accent-text); font-weight: 700; font-size: .8125rem; white-space: nowrap; }
.site-pick.empty { border-style: dashed; color: var(--accent-text); }
.who { position: relative; }
.who-btn { display: flex; align-items: center; gap: .625rem; background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; padding: .25rem; border-radius: var(--radius); min-height: 2.75rem; }
.who-btn:hover { background: var(--surface-2); }
.role-chip { font-size: .75rem; padding: .125rem .5rem; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; white-space: nowrap; }
.avatar { width: 2rem; height: 2rem; border-radius: 50%; background: #e8e6e0; display: grid; place-items: center; font-weight: 700; color: var(--sidebar-ink); flex: none; }
.who-menu {
  position: absolute; right: 0; top: calc(100% + .375rem); min-width: 12rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: .375rem; z-index: 20;
}
.who-menu a, .who-menu button {
  display: flex; align-items: center; gap: .625rem; width: 100%; min-height: 2.75rem; padding: 0 .75rem; border-radius: .5rem;
  background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left;
}
.who-menu a:hover, .who-menu button:hover { background: var(--surface-2); }
.who-menu .who-meta { padding: .5rem .75rem .625rem; border-bottom: 1px solid var(--line); margin-bottom: .25rem; font-size: .8125rem; color: var(--muted); }
.who-menu .who-meta b { display: block; color: var(--text); font-size: .9375rem; }

.content { padding: 1.625rem 1.75rem 2.5rem; width: 100%; max-width: 78rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.125rem; flex-wrap: wrap; }
h1 { font-size: 1.4375rem; font-weight: 800; margin: 0; letter-spacing: -.02em; line-height: 1.3; }
.page-sub { color: var(--muted); margin-top: .125rem; }
h2 { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; display: flex; align-items: center; gap: .5rem; }
h2 .ic { color: var(--accent-text); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.card-head h2 { margin: 0; }

/* ---------------- 카드·숫자·표 ---------------- */
.grid { display: grid; gap: 1rem; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); align-items: start; }
.stack { display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.125rem; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 0; }
.stat .label { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.stat .value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: .8125rem; color: var(--muted); margin-top: .125rem; }
.stat.attn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); }
.stat.attn .value { color: var(--warn); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }   /* relative: 안의 sr-only(절대 위치)가 넘쳐 화면 전체가 옆으로 밀리지 않게 */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 700; padding: .5rem .625rem; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.t td { padding: .625rem; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.t td.wrap { white-space: normal; min-width: 12rem; }
.t tr:last-child td { border-bottom: 0; }
.t th.num, .t td.num { text-align: right; }

.badge { display: inline-flex; align-items: center; gap: .3125rem; font-size: .75rem; font-weight: 700; padding: .125rem .5625rem; border-radius: 99px; white-space: nowrap; }
.badge::before { content: ""; width: .375rem; height: .375rem; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-danger { background: var(--danger-soft); color: var(--danger); }
.b-none { background: #ecebe6; color: var(--muted); }

/* 줄 전체를 누르는 목록(장갑 낀 손 · 휴대폰) */
.rows { display: grid; }
.row-link {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; gap: .75rem;
  min-height: 3.5rem; padding: .625rem .25rem; border-bottom: 1px solid var(--line); color: var(--text);
}
.rows > .row-link:last-child { border-bottom: 0; }
.row-link:hover { background: var(--surface-2); }
.row-ic { width: 2.5rem; height: 2.5rem; border-radius: .625rem; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.row-ic .ic { width: 1.25rem; height: 1.25rem; }
.row-t { font-weight: 700; line-height: 1.35; display: block; }
.row-s { font-size: .8125rem; color: var(--muted); display: block; }
.row-go { display: inline-flex; align-items: center; gap: .25rem; font-size: .8125rem; font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.row-go .ic { width: .875rem; height: .875rem; stroke-width: 2.2; }

/* 바로가기 타일 */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .625rem; }
.tile {
  display: flex; align-items: center; gap: .625rem; min-height: 3.5rem; padding: .625rem .75rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); font-weight: 700;
}
.tile:hover { border-color: var(--line-strong); background: var(--surface-2); }
.tile .ic { color: var(--accent-text); width: 1.25rem; height: 1.25rem; }
.tile .ext { margin-left: auto; width: .8125rem; height: .8125rem; color: var(--faint); }
.tile small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }

.note { font-size: .8125rem; color: var(--muted); }
.note .ic { width: .875rem; height: .875rem; vertical-align: -2px; }
.empty-box { text-align: center; padding: 2rem 1rem; color: var(--muted); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
.empty-box b { display: block; color: var(--text); margin-bottom: .25rem; }

/* ---------------- 버튼·입력 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .375rem; min-height: var(--btn-h); padding: 0 1rem;
  border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; text-align: center;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent-text); padding: 0 .5rem; }
.btn.danger-ghost { border-color: transparent; background: transparent; color: var(--danger); padding: 0 .5rem; }
.btn.sm { min-height: 2.25rem; padding: 0 .75rem; font-size: .875rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }

.fld { display: grid; gap: .375rem; margin-bottom: .875rem; }
.fld > .lb { font-size: .8125rem; font-weight: 700; color: var(--sidebar-ink); }
.fld .help { font-size: .75rem; color: var(--muted); }
.fld .err, .errlist { color: var(--danger); font-size: .8125rem; font-weight: 600; }
ul.errorlist { margin: 0; padding: 0; list-style: none; color: var(--danger); font-size: .8125rem; font-weight: 600; }
input[type=text], input[type=date], input[type=number], input[type=password], input[type=search], input[type=email], input[type=tel], input[type=url], select, textarea {
  min-height: var(--control-h); border: 1px solid var(--line-strong); border-radius: calc(var(--radius) - .125rem);
  padding: 0 .75rem; font: inherit; color: var(--text); background: var(--surface); width: 100%;
}
textarea { padding: .5625rem .75rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }

/* 칩(하나 고르기) */
.chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.chips ul, .chips li { list-style: none; margin: 0; padding: 0; display: contents; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span, a.chip {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 .875rem; border-radius: 99px;
  border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; cursor: pointer; font-size: .875rem; white-space: nowrap;
}
.chip input:checked + span, a.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* 알림 띠 */
.flash { display: flex; gap: .5rem; align-items: flex-start; padding: .6875rem .875rem; border-radius: var(--radius); font-weight: 700; margin-bottom: .75rem; border: 1px solid transparent; }
.flash.success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash.error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.flash.warning { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.flash.info { background: var(--surface); color: var(--text); border-color: var(--line); }

/* ---------------- 사진·파일 ---------------- */
.files-layout { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1rem; align-items: start; }
.upload-card { position: sticky; top: 4.75rem; }
.drop {
  display: grid; place-items: center; gap: .375rem; text-align: center; padding: 1.25rem 1rem; border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius); color: var(--muted); cursor: pointer; background: var(--surface-2); min-height: 7.5rem;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ic { width: 1.75rem; height: 1.75rem; color: var(--accent-text); }
.drop b { color: var(--text); font-size: 1rem; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.picked { font-size: .8125rem; color: var(--text); font-weight: 600; margin-top: .375rem; }
.up-progress { height: .5rem; border-radius: 99px; background: var(--line); overflow: hidden; margin: .5rem 0 .25rem; display: none; }
.up-progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
form.uploading .up-progress { display: block; }
form.uploading .up-btn { pointer-events: none; opacity: .6; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .875rem; }
.filters select { width: auto; min-width: 9rem; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; }
.fcard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.fthumb { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.fthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fthumb .ext-badge { font-weight: 800; font-size: .875rem; color: var(--muted); border: 1.5px solid var(--line-strong); border-radius: .375rem; padding: .375rem .625rem; background: var(--surface); }
.fbody { padding: .5rem .625rem .625rem; display: grid; gap: .125rem; }
.fname { font-weight: 700; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmeta { font-size: .75rem; color: var(--muted); }
.factions { display: flex; justify-content: space-between; align-items: center; margin-top: .25rem; }
.factions form { margin: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-top: 1rem; }

/* 현장 사진 미리보기 줄 */
.photo-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.photo-strip a { aspect-ratio: 1; border-radius: .5rem; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 현장 고르기 */
.pick-list { display: grid; gap: .5rem; }
.pick-row {
  display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 3.5rem; padding: .75rem 1rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); font: inherit; font-weight: 700; text-align: left; cursor: pointer; color: var(--text);
}
.pick-row:hover { border-color: var(--accent); }
.pick-row.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.pick-row .ic { color: var(--accent-text); }
.pick-row small { display: block; font-weight: 500; color: var(--muted); }
.pick-row.done { background: var(--surface-2); font-weight: 600; }
.pick-sep { font-size: .8125rem; font-weight: 700; color: var(--muted); margin: .75rem 0 .125rem; }

/* ---------------- 로그인·오류 등 단독 화면 ---------------- */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem calc(1.5rem + var(--safe-b)); }
.bare-card { width: 100%; max-width: 24rem; background: var(--surface); border: 1px solid var(--line); border-radius: .875rem; padding: 2rem 1.75rem 1.5rem; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.bare-logo { display: block; width: 13.5rem; max-width: 80%; height: auto; margin: 0 0 1.375rem; }
.bare-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 .25rem; }
.bare-sub { color: var(--muted); margin: 0 0 1.25rem; font-size: .875rem; }
.bare-foot { margin-top: 1.125rem; font-size: .8125rem; color: var(--muted); text-align: center; }
.bare-code { font-size: 2.5rem; font-weight: 800; color: var(--accent-text); letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.err-id { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-weight: 800; background: var(--surface-2); border: 1px solid var(--line); border-radius: .375rem; padding: .125rem .5rem; color: var(--text); }

/* ---------------- 휴대폰 아래 메뉴 ---------------- */
.m-nav { display: none; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .files-layout { grid-template-columns: minmax(0, 1fr) 18rem; }
}

@media (max-width: 899px) {
  body { font-size: 1rem; }                /* 휴대폰 16px 이상 */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding: .5rem 1rem; min-height: 3.5rem; gap: .5rem; }
  .m-brand { display: block; flex: none; }
  .m-brand img { width: 2rem; height: 2rem; border-radius: .25rem; display: block; }
  .site-pick { flex: 1; min-width: 0; border: 0; padding: 0 .25rem; font-size: 1.0625rem; }
  .site-pick > .ic { display: none; }
  .site-pick .nm-long { display: none; }
  .site-pick .nm-short { display: inline; }
  .who-btn .role-chip, .who-btn .who-name { display: none; }
  .content { padding: 1rem 1rem calc(6rem + var(--safe-b)); }
  h1 { font-size: 1.375rem; }
  .g-main, .g3, .files-layout { grid-template-columns: minmax(0, 1fr); }
  .upload-card { position: static; order: -1; }
  .card { padding: 1rem; border-radius: .875rem; }
  .row-link { min-height: 3.75rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .tile { padding: .625rem; gap: .5rem; }
  .tile .ext { display: none; }
  .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .btn { min-height: 3rem; }
  .btn.sm { min-height: 2.5rem; }
  input[type=text], input[type=date], input[type=number], input[type=password], input[type=search], input[type=email], input[type=tel], input[type=url], select, textarea { min-height: 3.125rem; font-size: 1rem; }
  .m-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: var(--surface); border-top: 1px solid var(--line); padding: .375rem 0 calc(.5rem + var(--safe-b));
  }
  .m-nav a { display: grid; justify-items: center; gap: .125rem; font-size: .75rem; color: var(--muted); font-weight: 700; padding: .25rem 0; min-height: 3rem; }
  .m-nav a.on { color: var(--accent-text); }
  .m-nav .ic { width: 1.5rem; height: 1.5rem; }
}

@media (max-width: 420px) {
  .g4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .625rem; }
  .stat .value { font-size: 1.25rem; }
}

@media print {
  .side, .top, .m-nav, .upload-card { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}

.ic.inline { width: .875rem; height: .875rem; vertical-align: -2px; stroke-width: 2; }

/* ---------------- 본사 관리(회원·현장) — 회차 2 ---------------- */
.banner { display: flex; gap: .75rem; align-items: flex-start; padding: .875rem 1rem; margin-bottom: 1rem; border-radius: var(--radius);
  background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); color: var(--text); font-size: .875rem; line-height: 1.6; }
.banner > .ic { color: var(--warn); margin-top: .1875rem; }
.banner a { color: var(--accent-text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.narrow { max-width: 40rem; }
.form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.cbx-list { display: grid; gap: .375rem; }
.cbx { display: flex; gap: .625rem; align-items: flex-start; min-height: 2.875rem; padding: .625rem .75rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 600; }
.cbx:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.cbx input { width: 1.125rem; height: 1.125rem; margin: .125rem 0 0; accent-color: var(--accent); flex: none; }
.cbx small { display: block; font-weight: 500; color: var(--muted); font-size: .8125rem; }
.cbx.single { margin-top: .25rem; }
.filters .search { margin-left: auto; }
.filters .search input { min-width: 13rem; }
.mlist { display: grid; }
.mrow { display: grid; grid-template-columns: minmax(10rem, 1.4fr) 5rem minmax(10rem, 2fr) 8rem 7.5rem; gap: .75rem; align-items: center;
  padding: .75rem .625rem; border-bottom: 1px solid var(--line); color: var(--text); min-height: 3.5rem; }
.mlist.sites .mrow { grid-template-columns: minmax(12rem, 2fr) minmax(8rem, 1.4fr) 12rem 5rem 6rem; }
a.mrow:hover { background: var(--surface-2); }
.mrow.off { color: var(--muted); }
.mrow.mhead { font-size: .75rem; font-weight: 700; color: var(--muted); min-height: 0; padding-top: .25rem; padding-bottom: .5rem; border-bottom-color: var(--line-strong); }
.mlist > .mrow:last-child { border-bottom: 0; }
.m-name b { display: block; }
.m-name small { display: block; color: var(--muted); font-size: .8125rem; }
.m-sites { font-size: .875rem; }
.m-last { font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.warn-text { color: var(--warn); font-weight: 700; }
.pw-state { margin: 0 0 .75rem; font-weight: 700; }
.pw-state.pw-temp { color: var(--warn); }
.pw-state.pw-none { color: var(--danger); }
.loglist, .plain { list-style: none; margin: 0; padding: 0; display: grid; gap: .375rem; font-size: .875rem; }
.loglist li { display: flex; gap: .625rem; }
.loglist .when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 5.5rem; }
.plain a { font-weight: 700; color: var(--accent-text); }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.hist > li { padding-left: .875rem; border-left: 2px solid var(--line-strong); }
.hist .h-head { font-size: .875rem; }
.hist .when { color: var(--muted); font-variant-numeric: tabular-nums; }
.h-changes { list-style: none; margin: .25rem 0 0; padding: 0; font-size: .8125rem; display: grid; gap: .125rem; }
.h-field { font-weight: 700; margin-right: .25rem; }
.h-old { color: var(--muted); text-decoration: line-through; }
.h-new { color: var(--text); font-weight: 600; }
.dl { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .5rem 1rem; margin: 0; font-size: .9375rem; }
.dl dt { color: var(--muted); font-weight: 600; font-size: .8125rem; padding-top: .125rem; }
.dl dd { margin: 0; }
.temp-card { margin: 1rem auto 0; }
.temp-pw { font-family: ui-monospace, Consolas, "D2Coding", monospace; font-size: 2rem; font-weight: 800; letter-spacing: .08em; text-align: center;
  padding: 1rem; margin: 0 0 .75rem; border: 2px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); color: var(--text); user-select: all; }
.temp-steps { padding-left: 1.125rem; margin: 1rem 0; display: grid; gap: .375rem; font-size: .875rem; }

@media (max-width: 899px) {
  .form-2 { grid-template-columns: minmax(0, 1fr); }
  .filters .search { margin-left: 0; width: 100%; }
  .filters .search input { min-width: 0; width: 100%; }
  .mrow, .mlist.sites .mrow { grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; }
  .mrow.mhead { display: none; }
  .mrow .m-name { grid-column: 1; }
  .mrow > span:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: end; }
  .mrow > span:nth-child(3) { grid-column: 1 / -1; font-size: .875rem; }
  .mrow > span:nth-child(4) { grid-column: 1; font-size: .875rem; }
  .mrow > span:nth-child(5) { grid-column: 2; justify-self: end; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: .125rem; }
  .dl dd { margin-bottom: .5rem; }
  .temp-pw { font-size: 1.625rem; }
}

/* ── 작은 모양 도우미 u-*(2026-10-04 화면 보안 정책) ──────────────────────────
   예전에 HTML 에 style="…" 로 직접 쓰던 것. 화면 보안 정책(CSP)이 HTML 안의 글자 모양을 막아서 여기로 옮김.
   예전 style= 처럼 다른 규칙보다 앞서도록 !important(이 묶음에서만). 새 화면에서도 style= 대신 이것을 쓴다. */
.u-m0 { margin: 0 !important; }
.u-mt0 { margin-top: 0 !important; }
.u-m-top-xs { margin: .5rem 0 0 !important; }
.u-m-top-s { margin: .625rem 0 0 !important; }
.u-m-top-m { margin: .75rem 0 0 !important; }
.u-mt-l { margin-top: .875rem !important; }
.u-mt-xl { margin-top: 1rem !important; }
.u-mb-xs { margin-bottom: .25rem !important; }
.u-mb-xl { margin-bottom: 1rem !important; }
.u-m-under { margin: 0 0 1rem !important; }
.u-m-pull { margin: -.25rem 0 .75rem !important; }
.u-va-mid { vertical-align: middle !important; }
.u-ta-left { text-align: left !important; }
.u-w-narrow { max-width: 36rem !important; }
col.u-w-6r { width: 6rem !important; }
col.u-w-5r { width: 5rem !important; }
.filter-form { margin-left: auto !important; display: flex !important; gap: .5rem !important; align-items: center !important; }

/* ---------------- 재무 — 지출 입력·목록(16-나 회차 3-가) ----------------
   칸 보이기·숨기기는 스크립트 없이 CSS 로: 고른 증빙(:checked) · 켠 칸 · 서버가 알려 준 상태(#vstate 의 v-new·v-oil·v-dup — 미리보기가 바꿔 끼움) */
.entry-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 1rem; align-items: start; }
html:has(.save-bar) { scroll-padding: 4.5rem 0 5.5rem; }       /* 칸으로 옮겨 갈 때 위 띠·아래 저장 띠에 가리지 않게 */
.entry-main { display: grid; gap: 1rem; min-width: 0; }
.fs-plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.fs-plain[disabled] input, .fs-plain[disabled] select { background: var(--surface-2); color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 .875rem; align-items: start; }
.fgrid .span2 { grid-column: span 2; }
.fgrid .span3 { grid-column: span 3; }
.fgrid .span4 { grid-column: 1 / -1; }
.fld .lb small { font-weight: 500; color: var(--muted); }
.fld.bad input, .fld.bad select { border-color: var(--danger); }
.opt-checks { align-self: end; align-content: end; }
.opt-checks .cbx { min-height: var(--control-h); }
.num-in { text-align: right; font-variant-numeric: tabular-nums; }
h2 small { font-weight: 500; font-size: .8125rem; }
.enter-guard { display: none; }

.bill-box, .card-box, .nv-box, .oil-box, .dup-box, .jv-reason, .it-date { display: none; }
.entry:has(select[name=evidence] option[value="세금계산서"]:checked) .bill-box,
.entry:has(select[name=evidence] option[value="계산서(면세)"]:checked) .bill-box,
.entry:has(select[name=evidence] option[value="법인카드"]:checked) .card-box,
.entry:has(select[name=evidence] option[value="현금영수증"]:checked) .card-box { display: grid; }
.entry:has(#vstate.v-new) .nv-box,
.entry:has(#vstate.v-oil) .oil-box,
.entry:has(input[name=oil_open]:checked) .oil-box { display: block; }
.entry:has(#vstate.v-oil) .items-box { display: none; }
.entry:has(#vstate.v-dup) .dup-box { display: flex; }
.entry:has(select[name=jv_status] option[value="제외"]:checked) .jv-reason { display: grid; }
.entry:has(input[name=item_dates]:checked) .it-date { display: block; }
.entry:has(input[name=jv_add]) .jv-fields { display: none; }               /* 줄 없던 옛 기록 — '줄 만들기'를 켜야 칸이 보임 */
.entry:has(input[name=jv_add]:checked) .jv-fields { display: grid; }
.jv-add { margin-bottom: .75rem; }
.nv-box { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
/* 지급 구분(회차 4-가): 기지급 → 지급일 · 유보 → 이유 · 본사가 낸 돈(#vstate.v-hq)이면 구분 칸 대신 글자 · 같은 승인번호(v-split) → 나눠 적기 */
.paid-box, .hold-box, .split-box, .pay-hq { display: none; }
.entry:has(select[name=pay_status] option[value="기지급"]:checked) .paid-box,
.entry:has(select[name=pay_status] option[value="유보"]:checked) .hold-box { display: grid; }
.entry:has(#vstate.v-hq) .pay-fld,
.entry:has(#vstate.v-hq) .paid-box,
.entry:has(#vstate.v-hq) .hold-box { display: none; }
.entry:has(#vstate.v-hq) .pay-hq { display: grid; }
.entry:has(#vstate.v-split) .split-box,
.entry:has(input[name=split_ok]:checked) .split-box { display: grid; }
.pay-hq-text { min-height: var(--control-h); display: flex; align-items: center; color: var(--muted); font-weight: 600; font-size: .875rem; }
/* 빼기 줄: 원래 건에서 그대로 쓰는 칸은 숨김(서버도 원래 건 값으로 덮어씀) */
.is-adjust .adj-hide { display: none !important; }
.adj-box { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.adj-box .dl { margin-bottom: .75rem; }
.release-form { display: grid; gap: 0; }
.release-form .fld { margin-bottom: .5rem; }

/* 항목 표(줄마다 칸) — 칸이 좁으면 표만 옆으로 밀어 보기(오른쪽 '저장 전 확인' 밑으로 넘치지 않게) */
.items-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.items-inner { min-width: 40rem; }
.entry:has(input[name=item_dates]:checked) .items-inner { min-width: 45rem; }
.it-head, .it-row { display: grid; grid-template-columns: minmax(7rem, 2fr) minmax(4.5rem, 1.2fr) 3.5rem 4.5rem 5.5rem 6rem minmax(4rem, 1fr) 2.5rem; gap: .375rem; align-items: center; }
.entry:has(input[name=item_dates]:checked) .it-head,
.entry:has(input[name=item_dates]:checked) .it-row { grid-template-columns: 4.5rem minmax(7rem, 2fr) minmax(4.5rem, 1.2fr) 3.5rem 4.5rem 5.5rem 6rem minmax(4rem, 1fr) 2.5rem; }
.it-head { font-size: .75rem; font-weight: 700; color: var(--muted); padding: 0 0 .375rem; border-bottom: 1px solid var(--line-strong); }
.it-head .num { text-align: right; }
.items { display: grid; gap: .375rem; padding-top: .5rem; }
.it-row input { min-height: 2.5rem; padding: 0 .5rem; }
.it-amt { font-weight: 700; padding-right: .25rem; }
.it-del { padding: 0; min-width: 2.5rem; justify-content: center; }
.items-foot { display: flex; align-items: center; gap: .75rem; margin-top: .625rem; flex-wrap: wrap; }

/* 저장 전 확인 */
.calc { position: sticky; top: 4.75rem; }
.calc h2 { margin-bottom: .625rem; }
.calc-total { padding: .75rem .875rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: .75rem; }
.calc-total .lb { font-size: .8125rem; color: var(--muted); font-weight: 700; }
.calc-total .big { font-size: 1.625rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.25; }
.calc-total .read { color: var(--muted); font-size: .875rem; font-weight: 600; }
.calc-dl { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: .375rem .75rem; margin: 0 0 .75rem; font-size: .875rem; }
.calc-dl dt { color: var(--muted); font-weight: 600; }
.calc-dl dd { margin: 0; font-variant-numeric: tabular-nums; }
.calc-dl small { color: var(--muted); }
.calc-sub { font-size: .8125rem; font-weight: 700; margin: 0 0 .375rem; }
.calc-list { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .375rem; font-size: .8125rem; }
.calc-list li { padding: .5rem .625rem; border-radius: .5rem; line-height: 1.5; }
.calc-list.warn li { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.calc-list.warn a { text-decoration: underline; text-underline-offset: 2px; }
.calc-list.todo li { background: var(--surface-2); border: 1px solid var(--line); }
.calc-ok { color: var(--ok); font-weight: 700; }
.calc-ok.warn-text { color: var(--warn); }

.save-bar { position: sticky; bottom: 0; z-index: 4; display: flex; justify-content: flex-end; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .75rem 0; margin-top: 1rem; background: var(--bg); border-top: 1px solid var(--line); }
.save-bar .cbx.bad { border-color: var(--danger); }
.bar-total { margin-right: auto; display: flex; align-items: baseline; gap: .375rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.bar-total .lb { font-size: .8125rem; color: var(--muted); font-weight: 700; }
.bar-total b { font-size: 1.125rem; }
.bar-total small { color: var(--muted); font-size: .8125rem; }
.wrap-head { flex-wrap: wrap; }
.cell-link { font-weight: 700; color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.exp-t td.wrap { min-width: 7rem; }
.save-btn { min-width: 9rem; }
.row-acts { display: flex; gap: .25rem; align-items: center; }
.row-acts form { margin: 0; }
.dl-tight { grid-template-columns: 5rem minmax(0, 1fr); }

/* 지출 목록 */
.fin-filters select { min-width: 8rem; }
.sum-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 0 0 .875rem; }
.sum-row > div { padding: .625rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.sum-row .lb { display: block; font-size: .75rem; color: var(--muted); font-weight: 700; }
.sum-row b { font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.sum-row small { display: block; color: var(--muted); font-size: .75rem; }
.exp-t tr.off td { color: var(--muted); text-decoration: line-through; }
.exp-t tr.off td:last-child { text-decoration: none; }

@media (max-width: 1100px) {
  .entry-grid { grid-template-columns: minmax(0, 1fr) 16rem; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid .span3, .fgrid .span4 { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  .entry-grid { grid-template-columns: minmax(0, 1fr); }
  .calc { position: static; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .fgrid .span2, .fgrid .span3, .fgrid .span4 { grid-column: auto; }
  .it-head { display: none; }
  .items-inner, .entry:has(input[name=item_dates]:checked) .items-inner { min-width: 0; }
  .it-row, .entry:has(input[name=item_dates]:checked) .it-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: .5rem 0 .625rem; border-bottom: 1px solid var(--line); }
  .it-row .it-name { grid-column: 1 / -1; }
  .it-row input { min-height: 2.75rem; }
  .it-amt { align-self: center; }
  .save-bar { bottom: calc(4rem + var(--safe-b)); justify-content: stretch; }
  .bar-total { width: 100%; }
  .save-bar .save-btn { flex: 1; }
  .sum-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------- 재무 — 업체·차량·수령(16-나 회차 3-나) ---------------- */
.amt-read { font-size: .8125rem; font-weight: 700; color: var(--muted); min-height: 1.1em; font-variant-numeric: tabular-nums; }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1rem; padding-top: .875rem; border-top: 1px solid var(--line); }
.opt-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 .5rem; }
.alias-list { margin-bottom: .75rem; }
.alias-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem 0; border-bottom: 1px solid var(--line); }
.alias-list form { margin: 0; }
.inline-add { display: flex; gap: .5rem; align-items: center; }
.inline-add input { flex: 1; min-width: 0; }
.vend-t td.wrap { min-width: 9rem; }
tr.off-soft td { color: var(--muted); }
.partner-box { display: none; }
.rform:has(select[name=kind] option[value="구성사입금"]:checked) .partner-box { display: grid; }
.cbx.bad { border-color: var(--danger); }

/* ---------------- 재무 — 증빙 파일·붙여 넣기·내려받기(16-나 회차 3-다) ---------------- */
.ev-list { display: grid; gap: .5rem; margin-bottom: .75rem; }
.ev-list:empty { display: none; }
.ev-item { display: grid; grid-template-columns: auto 3.25rem minmax(0, 1fr) auto; align-items: center; gap: .625rem; padding: .5rem .625rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.ev-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ev-item input[type=checkbox] { width: 1.125rem; height: 1.125rem; accent-color: var(--accent); }
.ev-thumb { width: 3.25rem; height: 3.25rem; border-radius: .375rem; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; border: 1px solid var(--line); }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-thumb .ext-badge { font-weight: 800; font-size: .6875rem; color: var(--muted); }
.ev-name { min-width: 0; display: flex; flex-direction: column; }
.ev-name b { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-name small { color: var(--muted); font-size: .75rem; }
.ev-drop { margin-bottom: .25rem; }
.ev-box.uploading .ev-progress { display: block; }
.ev-box.uploading .ev-drop { pointer-events: none; opacity: .6; }
.entry:has(.ev-box.uploading) .save-btn { pointer-events: none; opacity: .6; }
.ev-msgs:empty { display: none; }
.ev-msgs { margin: .25rem 0 .75rem; }
.ev-msg { margin: .25rem 0; font-size: .8125rem; font-weight: 600; }
.ev-msg.error { color: var(--danger); }
.ev-msg.warning { color: var(--warn); }
.ev-msg.info { color: var(--muted); }
.ev-free { margin: .25rem 0 .75rem; }
.ev-free > summary { cursor: pointer; font-weight: 700; font-size: .875rem; padding: .375rem 0; }
.ev-free > .ev-list { margin-top: .5rem; }
.clip-n { display: inline-flex; align-items: center; gap: .125rem; font-size: .75rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.clip-n .ic { width: .875rem; height: .875rem; }
@media (max-width: 720px) {
  .ev-item { grid-template-columns: auto 2.75rem minmax(0, 1fr); }
  .ev-item .btn { grid-column: 2 / -1; justify-self: start; }
  .ev-thumb { width: 2.75rem; height: 2.75rem; }
}
.head-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.plain-list { margin: 0; padding-left: 1.125rem; display: grid; gap: .375rem; font-size: .875rem; color: var(--text); }
.paste-box { width: 100%; min-height: 12rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; line-height: 1.5; white-space: pre; overflow-x: auto; resize: vertical; }
.heads-dl { grid-template-columns: 7rem minmax(0, 1fr); font-size: .8125rem; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .625rem; }
.map-col .lb small { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.err-line { color: var(--danger); font-weight: 700; margin: 0 0 .75rem; }
.paste-t .msg-row td { padding-top: 0; font-size: .8125rem; border-top: 0; white-space: normal; }
.paste-t td.wrap { min-width: 7rem; }
.paste-t td.wrap-s { white-space: normal; min-width: 5.5rem; }          /* 과목·증빙·원가안분 — 좁은 PC(1280)에서도 가로 넘침 없게 */
.paste-t tbody.prow > tr:first-child td { border-bottom: 0; }
.paste-t tbody.prow > tr:last-child td { border-bottom: 1px solid var(--line); }
.paste-t .m-err { color: var(--danger); font-weight: 600; }
.paste-t .m-warn { color: var(--warn); }
.paste-t tbody.row-bad td { background: var(--danger-soft); }
.paste-t tbody.row-dup td { background: var(--warn-soft); }
.paste-t input[type=checkbox] { width: 1.125rem; height: 1.125rem; accent-color: var(--accent); }

/* ---------------- 재무 — 기성청구서 화면(16-나 회차 4-나) ---------------- */
.fld-inline { display: inline-flex; align-items: center; gap: .5rem; }
.fld-inline .lb { font-size: .8125rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.num-s { width: 5.5rem; }
.gs-state { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.gs-warns { margin-top: .75rem; }
.gs-warns > summary, .gs-again > summary, .gs-cancel > summary { cursor: pointer; font-weight: 700; font-size: .875rem; padding: .375rem 0; }
.gs-warns .calc-list { margin-top: .5rem; }
.calc-list.bad li { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.gs-gapji { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gs-t th[scope=rowgroup] { background: var(--surface-2); color: var(--text); font-size: .8125rem; padding-top: .625rem; }
.gs-t tr.gs-sub td { font-weight: 700; background: var(--surface-2); }
.gs-t tr.gs-total td { font-weight: 800; border-top: 2px solid var(--line-strong); }
.gs-t tr.gs-prev td { color: var(--muted); }
.gs-t tr.gs-fixed td:first-child { font-weight: 600; }
.gs-t td.wrap { min-width: 7rem; }
.gs-dl { grid-template-columns: 5.5rem minmax(0, 1fr); font-size: .875rem; margin-bottom: .875rem; }
.gs-again, .gs-cancel { margin-top: .75rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.gs-diff-list li { line-height: 1.6; }
.t tr.on td { background: var(--accent-soft); }
.gs-page > .sum-row { margin: 0; }
.gs-t tr.gs-empty td { color: var(--muted); font-size: .8125rem; padding: .5rem .625rem; white-space: normal; }
/* ---------------- 재무 — 원가안분 화면(16-나 회차 4-라) ---------------- */
.jv-t th[scope=row] { text-align: left; font-weight: 600; white-space: nowrap; }
.jv-t thead th small { font-weight: 500; }
.jv-t tr.jv-strong th, .jv-t tr.jv-strong td { font-weight: 800; background: var(--surface-2); }
.jv-cos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .875rem; align-items: start; }
.jv-co .gs-dl { margin-bottom: .5rem; }
.jv-sub { margin-top: .875rem; border-top: 1px solid var(--line); padding-top: .625rem; }
.jv-sub .calc-sub { display: flex; align-items: center; gap: .375rem; }
.jv-sub p.small { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin: .25rem 0 .5rem; }
.jv-diff { margin-top: .5rem; }
.jv-diff .plain { margin: .25rem 0 .5rem; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2.inline { display: inline-flex; align-items: center; gap: .375rem; margin: 0; }
details.card > summary::after { content: "펼치기"; float: right; font-size: .8125rem; color: var(--muted); }
details.card[open] > summary::after { content: "접기"; }
.jv-lines-t td.wrap { min-width: 6rem; }
/* ---------------- 재무 — 안분 줄 화면(16-나 회차 4-마) ---------------- */
.jvl-form:has(select[name=status] option[value="제외"]:checked) .jv-reason { display: grid; }
.jv-lines-t tr.jvl-temp td { background: var(--warn-soft); }
.jv-lines-t td form { margin: 0; }
.jvc-t input[type=checkbox] { width: 1.125rem; height: 1.125rem; accent-color: var(--accent); }
.jvc-t tr.jvc-have td { color: var(--muted); }
/* ---------------- 재무 — 월 마감 화면(16-나 회차 4-바) ---------------- */
.cl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cl-step { display: grid; grid-template-columns: 2rem minmax(0, 1fr) 9.5rem minmax(10rem, 15rem) 7.5rem; gap: .5rem .75rem;
  align-items: center; padding: .625rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); }
.cl-step.done { background: var(--surface-2); }
.cl-n { font-weight: 800; font-size: 1.125rem; text-align: center; }
.cl-title { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.cl-auto { font-size: .8125rem; color: var(--muted); margin-top: .125rem; line-height: 1.5; }
.cl-step .cbx { min-height: 2.5rem; padding: .375rem .625rem; }
.cl-memo { width: 100%; }
.cl-last { font-size: .75rem; color: var(--muted); }
.cl-hist li { line-height: 1.7; }
@media (max-width: 900px) {
  .cl-step { grid-template-columns: 2rem minmax(0, 1fr); }
  .cl-step .cl-done, .cl-step .cl-memo, .cl-step .cl-last { grid-column: 2; }
}
@media (max-width: 900px) {
  .jv-cos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .jv-page .card-head h2 { flex-wrap: wrap; row-gap: .125rem; }
  .jv-page .card-head h2 small { display: block; flex-basis: 100%; margin-top: .125rem; }
}
@media (max-width: 1100px) {
  .gs-gapji { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .gs-gapji { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-pick .filters { gap: .5rem; }
  .gs-page .card-head h2 small { display: block; margin-top: .125rem; }
  .gs-t td.wrap { min-width: 5.5rem; }
}
/* ---------------- 재무 할 일 · 경리 홈(16-나 회차 4-사) ---------------- */
a.card.stat { display: block; }
a.card.stat:hover { border-color: var(--line-strong); }
.td-months { display: grid; gap: 1rem; }
.td-month + .td-month { border-top: 1px solid var(--line); padding-top: .875rem; }
.td-mhead { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; margin-bottom: .5rem; }
.td-mhead b { font-size: 1rem; }
.td-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .375rem; }
.td-item { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr) auto; gap: .25rem .625rem; align-items: center;
  padding: .5rem .625rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); }
.td-item.late { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: var(--danger-soft); }
.td-item.check { background: var(--surface-2); }
.td-item.off .td-t, .td-item.off .td-sub { color: var(--muted); }
.td-item.off .td-t { font-weight: 600; }
.td-lv { align-self: start; padding-top: .125rem; }
.td-body { min-width: 0; display: grid; gap: .125rem; }
.td-t { font-weight: 700; line-height: 1.45; }
.td-m { color: var(--muted); font-size: .8125rem; }
.td-sub { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.td-links { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .8125rem; }
.td-own { font-size: .75rem; color: var(--faint); }
.td-go { white-space: nowrap; }
.t.td-jv td { white-space: normal; vertical-align: top; }
.t.td-jv td:first-child { white-space: nowrap; }
.td-jvc .badge { margin: 0 .25rem .25rem 0; }
.td-amt { display: block; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.td-others li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .375rem 0; border-bottom: 1px solid var(--line); }
.td-others li:last-child { border-bottom: 0; }
.td-others li > span { min-width: 0; display: grid; }
.td-others form { margin: 0; }
@media (max-width: 899px) {
  .td-item { grid-template-columns: minmax(0, 1fr) auto; }
  .td-lv { grid-column: 1 / -1; padding-top: 0; }
}
