/* 필지서류함: 지번 서류 자동 발급·합본·명부 추출 사내 프로그램 시연 (registry) */

.rg {
  --bg: #EDEFEA;
  --surface: #FFFFFF;
  --surface-2: #F6F7F3;
  --text: #18212C;
  --muted: #56606E;
  --faint: #7F8996;
  --line: #D8DCD4;
  --line-strong: #B9C0B8;
  --primary: #1D3A5C;
  --primary-press: #142B45;
  --primary-soft: #E4EBF3;
  --accent: #B4632A;
  --ok: #23784A;
  --ok-soft: #E2F1E8;
  --warn: #8F5600;
  --warn-soft: #FFF1D6;
  --warn-line: #DDA035;
  --danger: #B3261E;
  --danger-soft: #FBE7E5;
  --k-land: #4A7A2C;
  --k-land-soft: #EAF2E1;
  --k-bldg: #2B6B9B;
  --k-bldg-soft: #E2EDF6;
  --k-reg: #96491F;
  --k-reg-soft: #F6E8DD;
  --side: #1B2B3E;
  --side-text: #C7D1DD;
  --font: "IBM Plex Sans KR", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --mono: "IBM Plex Mono", "IBM Plex Sans KR", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
.rg {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
html.rg-lock, html.rg-lock body { overflow: hidden; }
:where(.rg) :where(p, h1, h2, h3, ol, ul, dl, dd, fieldset) { margin: 0; }
:where(.rg) :where(ol, ul) { padding: 0; list-style: none; }
:where(.rg) fieldset { border: 0; padding: 0; min-width: 0; }
:where(.rg) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.rg a { color: var(--primary); }
.rg [hidden] { display: none !important; }
.rg :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rg .num { font-variant-numeric: tabular-nums; }
.rg .mono { font-family: var(--mono); font-size: .94em; letter-spacing: -.01em; }
.rg .r { text-align: right; }
.rg-dim { color: var(--faint); }
.rg-warntext { color: var(--warn); }
.rg-tag {
  display: inline-block; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 3px;
  font-size: 10.5px; font-style: normal; font-weight: 500; line-height: 16px; color: var(--muted); vertical-align: 1px;
}
.rg-note { font-size: 12.5px; color: var(--muted); }

/* 안내 띠 */
.rg .demo-notice {
  order: -1; flex: none; height: 28px; display: flex; align-items: center; justify-content: center;
  padding: 0 16px; background: #DDE2DA; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 틀: 왼쪽 메뉴 + 본문 */
.rg-app { flex: 1; display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 0; }
.rg-side {
  position: sticky; top: 0; align-self: start; height: calc(100vh - 28px);
  display: flex; flex-direction: column; gap: 22px; padding: 18px 14px;
  background: var(--side); color: var(--side-text);
}
.rg-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff !important; padding: 0 4px; }
.rg-brand__mark { flex: none; }
.rg-brand__text { display: grid; line-height: 1.25; }
.rg-brand__text b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.rg-brand__text small { font-size: 11.5px; color: #9FB0C3; }
.rg-nav { display: grid; gap: 2px; }
.rg-nav__item {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: var(--r);
  color: var(--side-text) !important; text-decoration: none; font-weight: 500;
}
.rg-nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }
.rg-nav__item.is-on { background: #F3EFE6; color: var(--side) !important; font-weight: 700; }
.rg-side__label { font-size: 11px; color: #8DA0B5; margin-bottom: 8px; padding: 0 4px; }
.rg-side__sites ul { display: grid; gap: 4px; }
.rg-sitedot { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; padding: 5px 4px; font-size: 12.5px; }
.rg-sitedot i { width: 8px; height: 8px; border-radius: 50%; background: #5FBF86; }
.rg-sitedot--warn i { background: #F0B24A; }
.rg-sitedot b { font-weight: 500; font-size: 11.5px; color: #9FB0C3; }
.rg-sitedot--warn b { color: #F0C57A; }
.rg-side__pc { margin-top: auto; display: grid; gap: 2px; padding: 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r); font-size: 11.5px; color: #9FB0C3; }
.rg-side__pc .mono { color: #fff; font-size: 12px; }

.rg-body { min-width: 0; display: flex; flex-direction: column; }
.rg-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 28px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.rg-top__crumb { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-top__right { display: flex; align-items: center; gap: 12px; }
.rg-user { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.rg-user i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-style: normal; font-weight: 700; font-size: 12px; }
.rg-main { padding: 24px 28px 96px; max-width: 1180px; width: 100%; }

/* 버튼 */
.rg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text) !important;
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.rg-btn:hover { border-color: var(--primary); }
.rg-btn:disabled, .rg-btn.is-disabled { opacity: .45; cursor: not-allowed; }
.rg-btn--primary { background: var(--primary); border-color: var(--primary); color: #fff !important; }
.rg-btn--primary:hover:not(:disabled) { background: var(--primary-press); }
.rg-btn--ghost { background: transparent; }
.rg-btn--sm { min-height: 34px; padding: 0 11px; font-size: 13px; }
.rg-iconbtn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r); background: transparent; cursor: pointer; color: var(--muted); }
.rg-iconbtn:hover { background: var(--surface-2); color: var(--text); }

/* 머리 */
.rg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.rg-h1 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.rg-h1__id { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.rg-h1__cust { font-size: 17px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.rg-h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.rg-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.rg-head__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rg-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700; }
.rg-banner { margin: -6px 0 16px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; }
.rg-banner[data-tone="warn"] { border-color: var(--warn-line); background: var(--warn-soft); color: #5E3900; }
.rg-banner[data-tone="ok"] { border-color: #9ACDAF; background: var(--ok-soft); color: #134D2E; }

/* 카드 */
.rg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.rg-card--flush { padding: 0; overflow: hidden; }
.rg-card__head { margin-bottom: 12px; }
.rg-card--flush > .rg-card__head { padding: 14px 18px 12px; margin: 0; border-bottom: 1px solid var(--line); }
.rg-card__head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rg-card__foot { padding: 10px 18px; border-top: 1px solid var(--line); display: flex; justify-content: center; }

/* 상태 표시 */
.rg-state { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 3px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rg-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rg-state--ok { background: var(--ok-soft); color: var(--ok); }
.rg-state--warn { background: var(--warn-soft); color: var(--warn); }
.rg-state--run { background: var(--primary-soft); color: var(--primary); }
.rg-state--wait { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* 발급 현황 */
.rg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.rg-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: grid; gap: 2px; }
.rg-kpi span { font-size: 12.5px; color: var(--muted); }
.rg-kpi b { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.rg-kpi b small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.rg-kpi--warn { border-color: var(--warn-line); background: linear-gradient(var(--warn-soft), var(--surface) 80%); }
.rg-kpi--warn b { color: var(--warn); }

.rg-sites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.rg-site { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 12px 19px; overflow: hidden; }
.rg-site::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k); }
.rg-site--land { --k: var(--k-land); }
.rg-site--bldg { --k: var(--k-bldg); }
.rg-site--reg { --k: var(--k-reg); }
.rg-site__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rg-site__head h2 { font-size: 15.5px; font-weight: 700; }
.rg-site__head p { font-size: 12.5px; color: var(--muted); }
.rg-site__check { margin-top: 10px; font-size: 12.5px; font-weight: 600; }
.rg-site__steps { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.rg-site__steps li { display: inline-flex; align-items: center; gap: 3px; }
.rg-site__steps svg { color: var(--ok); }
.rg-site__meta { display: flex; gap: 18px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.rg-site__meta div { display: grid; }
.rg-site__meta dt { font-size: 11.5px; color: var(--faint); }
.rg-site__meta dd { font-size: 15px; font-weight: 700; }
.rg-site__note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.rg-site--bldg .rg-site__note { color: var(--warn); }

.rg-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }

/* 표 */
.rg-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rg-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rg-table th small { font-weight: 400; color: var(--faint); margin-left: 3px; }
.rg-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rg-table tbody tr:last-child td { border-bottom: 0; }
.rg-table td small { display: block; font-size: 11.5px; color: var(--faint); }
.rg-table--jobs td:first-child a { font-weight: 600; text-decoration: none; }
.rg-table--jobs td small { white-space: nowrap; }
.rg-table--jobs td[data-label="명부"] { white-space: nowrap; }
.rg-table--jobs td[data-label="고객"] { min-width: 150px; }
.rg-table--jobs td:first-child a:hover { text-decoration: underline; }
.rg-newrow td { background: #FBF7EE; }
.rg-bars { display: grid; grid-template-columns: repeat(3, minmax(28px, 1fr)); gap: 4px; min-width: 150px; }
.rg-bar { display: block; height: 10px; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.rg-bar i { display: block; height: 100%; background: var(--k); }
.rg-bar--land { --k: var(--k-land); }
.rg-bar--bldg { --k: var(--k-bldg); }
.rg-bar--reg { --k: var(--k-reg); }
.rg-bar--off { background: repeating-linear-gradient(-45deg, transparent 0 3px, var(--line) 3px 4px); }

.rg-checks { display: grid; }
.rg-checks li + li { border-top: 1px solid var(--line); }
.rg-checks a { display: grid; gap: 2px; padding: 9px 0; text-decoration: none; color: var(--text) !important; }
.rg-checks a:hover .rg-checks__text { text-decoration: underline; }
.rg-checks__meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.rg-checks__meta b { color: var(--primary); font-weight: 600; }
.rg-checks__text { font-size: 13.5px; font-weight: 600; color: #5E3900; }
.rg-card .rg-note { margin-top: 10px; }

/* 신청 등록 */
.rg-intake { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 14px; align-items: start; }
.rg-form { display: grid; gap: 16px; }
.rg-field { display: grid; gap: 6px; }
.rg-field__label { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 0; }
.rg-field__label small { font-weight: 400; color: var(--faint); margin-left: 4px; }
.rg-input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.rg-input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.rg-textarea { min-height: 260px; resize: vertical; line-height: 1.65; font-size: 13px; }
.rg-kindpick { display: grid; gap: 6px; }
.rg-kindpick__item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-left: 4px solid var(--k); border-radius: var(--r); cursor: pointer; }
.rg-kindpick__item input { width: 17px; height: 17px; accent-color: var(--primary); }
.rg-kindpick__item span { display: grid; line-height: 1.3; }
.rg-kindpick__item b { font-weight: 600; font-size: 13.5px; }
.rg-kindpick__item small { font-size: 11.5px; color: var(--faint); }
.rg-kindpick__item--land { --k: var(--k-land); }
.rg-kindpick__item--bldg { --k: var(--k-bldg); }
.rg-kindpick__item--reg { --k: var(--k-reg); }
.rg-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; font-size: 13.5px; }
.rg-switch input { width: 17px; height: 17px; accent-color: var(--primary); }
.rg-switch--sm { font-size: 13px; min-height: 32px; }
.rg-form__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-file { position: relative; overflow: hidden; }
.rg-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rg-preview { display: flex; flex-direction: column; }
.rg-preview__scroll { max-height: 560px; overflow: auto; }
.rg-preview__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.rg-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.rg-sum div { display: grid; padding: 10px 18px; }
.rg-sum div + div { border-left: 1px solid var(--line); }
.rg-sum span { font-size: 12px; color: var(--muted); }
.rg-sum b { font-size: 19px; font-weight: 700; }
.rg-sum b small { font-size: 12px; font-weight: 500; color: var(--muted); }
.rg-sum--inline { display: flex; border: 0; gap: 0; }
.rg-sum--inline div { padding: 0 14px; }
.rg-sum--inline div:first-child { padding-left: 0; }
.rg-sum--inline b { font-size: 16px; }
.rg-table--preview td.mono { color: var(--muted); }
.rg-table--preview tr.is-skip td { background: #FBF9F4; }
.rg-empty td { text-align: center; color: var(--muted); padding: 42px 12px !important; }
.rg-kchips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rg-kchip { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11.5px; font-weight: 600; background: var(--ks); color: var(--k); white-space: nowrap; }
.rg-kchip--land { --k: var(--k-land); --ks: var(--k-land-soft); }
.rg-kchip--bldg { --k: var(--k-bldg); --ks: var(--k-bldg-soft); }
.rg-kchip--reg { --k: var(--k-reg); --ks: var(--k-reg-soft); }
.rg-kchip--na { --k: var(--faint); --ks: var(--surface-2); text-decoration: line-through; font-weight: 500; }
.rg-flag { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.rg-flag--warn { background: var(--warn-soft); color: var(--warn); }
.rg-flag--dim { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.rg-flag--info { background: var(--primary-soft); color: var(--primary); white-space: normal; }
.rg-flag--ok { background: var(--ok-soft); color: var(--ok); }

/* 진행·합본 */
.rg-jobgrid { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 14px; align-items: start; }
.rg-jobmain { display: grid; gap: 14px; min-width: 0; }
.rg-jobside { display: grid; gap: 14px; position: sticky; top: 12px; }
.rg-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rg-lane { position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--k); border-radius: var(--r); padding: 10px 14px 12px; min-width: 0; }
.rg-lane--land { --k: var(--k-land); }
.rg-lane--bldg { --k: var(--k-bldg); }
.rg-lane--reg { --k: var(--k-reg); }
.rg-lane--off { --k: var(--line-strong); opacity: .7; }
.rg-lane header { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; }
.rg-lane header b { font-weight: 700; color: var(--k); }
.rg-lane header span { color: var(--muted); }
.rg-lane__count { margin-top: 4px; font-size: 13px; color: var(--muted); }
.rg-lane__count b { font-size: 22px; color: var(--text); font-weight: 700; }
.rg-lane__bar { height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 8px; }
.rg-lane__bar i { display: block; height: 100%; background: var(--k); transition: width .3s ease; }
.rg-lane__now { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-lane.is-run .rg-lane__now { color: var(--text); font-weight: 500; }
.rg-lane__extra { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rg-lane__extra b { color: var(--text); }

.rg-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.rg-legend li { display: inline-flex; align-items: center; gap: 5px; }
.rg-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.rg-dot--wait { background: var(--surface); border: 1px solid var(--line-strong); }
.rg-dot--run { background: var(--primary); }
.rg-dot--done { background: var(--ok); }
.rg-dot--na { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 2px, var(--line-strong) 2px 3px); border: 1px solid var(--line-strong); }
.rg-dot--issue { background: var(--warn-line); }
.rg-docs__scroll { overflow-x: auto; }
.rg-table--docs td { padding: 7px 12px; }
.rg-table--docs td:nth-child(2) b { font-weight: 600; }
.rg-table--docs td:nth-child(2) small { display: inline; margin-left: 6px; }
.rg-chip {
  display: inline-flex; align-items: center; gap: 6px; min-width: 104px; min-height: 26px; padding: 2px 9px;
  border-radius: 3px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.rg-chip--wait { background: var(--surface); border-color: var(--line); color: var(--faint); font-weight: 500; }
.rg-chip--run { background: var(--primary-soft); color: var(--primary); border-color: #BFD0E3; }
.rg-chip--done { background: var(--ok-soft); color: var(--ok); }
.rg-chip--na { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 4px, #ECEEE9 4px 5px); color: var(--muted); font-weight: 500; border-color: var(--line); }
.rg-chip--issue { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.rg-chip--excluded { background: var(--surface-2); color: var(--faint); text-decoration: line-through; font-weight: 500; }
.rg-chip--off { background: transparent; color: var(--faint); font-weight: 400; border: 1px dashed var(--line); }
.rg-spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #BFD0E3; border-top-color: var(--primary); animation: rg-spin .8s linear infinite; }
@keyframes rg-spin { to { transform: rotate(360deg); } }

.rg-issues__empty { font-size: 13px; color: var(--muted); }
.rg-issues__list { display: grid; gap: 10px; }
.rg-issue { border: 1px solid var(--warn-line); border-left-width: 4px; border-radius: var(--r); padding: 10px 12px; background: #FFFBF2; }
.rg-issue__title { font-size: 13.5px; }
.rg-issue__text { font-size: 12.5px; color: #5E3900; margin-top: 3px; }
.rg-issue__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rg-path { font-size: 12px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); overflow-wrap: anywhere; }
.rg-dl { display: grid; gap: 6px; margin-top: 10px; font-size: 12.5px; }
.rg-dl div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.rg-dl dt { color: var(--faint); }
.rg-dl .mono { font-size: 12px; }
.rg-log__list { display: grid; gap: 6px; font-size: 12px; max-height: 300px; overflow: auto; font-family: var(--font) !important; letter-spacing: 0 !important; }
.rg-log__list li { display: grid; grid-template-columns: auto 1fr; gap: 8px; color: var(--muted); line-height: 1.45; }
.rg-log__list li:not(:has(time)) { grid-template-columns: 1fr; }
.rg-log__list time { color: var(--faint); font-family: var(--mono); font-size: 11.5px; }
.rg-log__list li.is-warn span { color: var(--warn); }
.rg-log__list li.is-ok span { color: var(--ok); font-weight: 500; }

.rg-merge { display: grid; gap: 14px; }
.rg-merge .rg-card__head { margin: 0; }
.rg-merge__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rg-merge__facts div { padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.rg-merge__facts dt { font-size: 12px; color: var(--muted); }
.rg-merge__facts dd { font-size: 20px; font-weight: 700; }
.rg-merge__facts dd small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.rg-stack { display: grid; gap: 6px; }
.rg-stack li { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 10px; }
.rg-stack__lot { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-stack__pages { display: flex; flex-wrap: wrap; gap: 3px; }
.rg-pg {
  display: inline-grid; place-items: center; width: 26px; height: 34px; border-radius: 2px; font-size: 10px; font-style: normal; font-weight: 700;
  background: var(--ks); color: var(--k); border: 1px solid color-mix(in srgb, var(--k) 45%, transparent); box-shadow: 1px 1px 0 rgba(0, 0, 0, .06);
}
.rg-pg--land { --k: var(--k-land); --ks: var(--k-land-soft); }
.rg-pg--bldg { --k: var(--k-bldg); --ks: var(--k-bldg-soft); }
.rg-pg--reg { --k: var(--k-reg); --ks: var(--k-reg-soft); }
.rg-pg--cover { --k: #fff; --ks: var(--side); color: #fff; border-color: var(--side); font-size: 9px; }
.rg-files { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rg-files__head { padding: 7px 12px; font-size: 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--muted); }
.rg-files ul { font-size: 12px; }
.rg-files li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 12px; }
.rg-files li + li { border-top: 1px dashed var(--line); }
.rg-files li b { font-weight: 500; color: var(--muted); white-space: nowrap; }
.rg-files li.is-merged { background: #FBF7EE; font-weight: 600; }
.rg-merge__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 명부 */
.rg-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rg-select .rg-input { width: auto; min-width: 220px; }
.rg-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.rg-source { display: grid; gap: 2px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--k); border-radius: var(--r); }
.rg-source b { font-size: 13px; color: var(--k); }
.rg-source span { font-size: 12.5px; color: var(--muted); }
.rg-source--reg { --k: var(--k-reg); }
.rg-source--land { --k: var(--k-land); }
.rg-source--bldg { --k: var(--k-bldg); }
.rg-roster__scroll { overflow-x: auto; }
.rg-table--roster td { white-space: nowrap; }
.rg-table--roster td[data-label="주소"] { white-space: normal; min-width: 220px; }
.rg-rrow { cursor: pointer; }
.rg-rrow:hover td { background: #F4F6FA; }
.rg-rrow.is-flag td { background: #FFFAEE; }
.rg-rrow.is-flag td:first-child { box-shadow: inset 4px 0 0 var(--warn-line); }
.rg-emptycard { display: grid; gap: 10px; justify-items: start; padding: 28px; }
.rg-emptycard p { color: var(--muted); }

.rg-drawer { position: fixed; inset: 0; z-index: 60; }
.rg-drawer__scrim { position: absolute; inset: 0; background: rgba(16, 24, 34, .38); }
.rg-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); overflow: auto;
  background: var(--bg); border-left: 1px solid var(--line); padding: 16px 18px 40px; display: grid; gap: 12px; align-content: start;
}
.rg-drawer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rg-drawer__head .rg-h2 { font-size: 19px; }
.rg-dflags { display: grid; gap: 4px; }
.rg-dflags li { padding: 7px 10px; border-radius: var(--r); background: var(--warn-soft); color: #5E3900; font-size: 13px; border: 1px solid var(--warn-line); }
.rg-papers { display: grid; gap: 10px; }
.rg-paper { background: #FFFEFB; border: 1px solid var(--line-strong); border-radius: 2px; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 3px 3px 0 #E4E2DA; padding: 10px 12px 12px; }
.rg-paper header { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
.rg-paper header span { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.rg-paper table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rg-paper th, .rg-paper td { border: 1px solid #C9CCC4; padding: 5px 7px; text-align: left; vertical-align: top; }
.rg-paper th { background: #F2F2EE; font-weight: 600; white-space: nowrap; color: var(--muted); }
.rg-paper small { color: var(--muted); }
.rg-paper__scan { background: repeating-linear-gradient(0deg, #FAF8F2 0 3px, #F2EFE6 3px 4px); color: var(--muted); font-size: 11.5px; }
.rg-hl { padding: 0 2px; border-radius: 2px; color: inherit; background: var(--ks); box-shadow: inset 0 -2px 0 var(--k); }
.rg-hl--land { --k: var(--k-land); --ks: var(--k-land-soft); }
.rg-hl--bldg { --k: var(--k-bldg); --ks: var(--k-bldg-soft); }
.rg-hl--reg { --k: var(--k-reg); --ks: var(--k-reg-soft); }
.rg-hl--warn { --k: var(--warn-line); --ks: var(--warn-soft); }

/* 알림·대응표 */
.rg-toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 80; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px));
  padding: 10px 16px; border-radius: var(--r); background: var(--side); color: #fff; font-size: 13.5px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.rg-toast[data-tone="warn"] { background: #6A4200; }
.rg-toast.is-in { animation: rg-in .2s ease-out; }
@keyframes rg-in { from { opacity: 0; transform: translate(-50%, 6px); } }
.rg-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--side); color: #fff; font-weight: 600; font-size: 13.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .22); cursor: pointer;
}
.rg-sheet { position: fixed; inset: 0; z-index: 90; }
.rg-sheet__scrim { position: absolute; inset: 0; background: rgba(16, 24, 34, .45); }
.rg-sheet__panel {
  position: absolute; right: 20px; bottom: 74px; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 120px); overflow: auto;
  background: var(--surface); border-radius: 6px; padding: 16px 18px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.rg-sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rg-sheet__head h2 { font-size: 16px; }
.rg-map { counter-reset: m; display: grid; }
.rg-map li { counter-increment: m; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.rg-map li span::before { content: counter(m) ". "; color: var(--faint); }
.rg-map a { font-weight: 600; white-space: nowrap; }
.rg-sheet__note { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* 1100px 이하 */
@media (max-width: 1100px) {
  .rg-split, .rg-jobgrid { grid-template-columns: minmax(0, 1fr); }
  .rg-jobside { display: contents; }
  .rg-issues { order: -1; }
  .rg-intake { grid-template-columns: 320px minmax(0, 1fr); }
}

/* 900px 이하: 왼쪽 메뉴를 위로 */
@media (max-width: 900px) {
  .rg-app { grid-template-columns: minmax(0, 1fr); }
  .rg-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 16px; }
  .rg-side__sites, .rg-side__pc { display: none; }
  .rg-nav { display: flex; gap: 4px; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .rg-nav__item { flex: none; min-height: 40px; padding: 0 12px; }
  .rg-top { padding: 0 16px; min-height: 46px; }
  .rg-user { display: none; }
  .rg-main { padding: 16px 16px 96px; }
  .rg-intake { grid-template-columns: minmax(0, 1fr); }
  .rg-sites, .rg-lanes, .rg-sources { grid-template-columns: minmax(0, 1fr); }
  .rg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 640px 이하: 표를 카드로 */
@media (max-width: 640px) {
  .rg-h1 { font-size: 20px; }
  .rg-h1__cust { display: block; margin: 2px 0 0; font-size: 14px; }
  .rg-head { align-items: stretch; }
  .rg-head__actions { width: 100%; }
  .rg-head__actions .rg-btn { flex: 1 1 auto; }
  .rg-select { width: 100%; }
  .rg-select .rg-input { flex: 1; min-width: 0; }
  .rg-kpi b { font-size: 21px; }
  .rg-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rg-sum div:nth-child(3) { border-left: 0; }
  .rg-sum div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .rg-sum--inline { flex-wrap: wrap; gap: 6px 0; }
  .rg-sum--inline div, .rg-sum--inline div:nth-child(n) { border-top: 0; }
  .rg-sum--inline div + div { border-left: 1px solid var(--line); }
  .rg-nav__item { padding: 0 9px; gap: 7px; font-size: 13.5px; }
  .rg-merge__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rg-stack li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .rg-top__crumb { font-size: 12px; }

  .rg-table thead { display: none; }
  .rg-table, .rg-table tbody, .rg-table tr, .rg-table td { display: block; width: 100%; }
  .rg-table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .rg-table tbody tr:last-child { border-bottom: 0; }
  .rg-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 0; border: 0; text-align: right; min-height: 28px; }
  .rg-table td::before { content: attr(data-label); flex: none; font-size: 12px; color: var(--faint); text-align: left; }
  .rg-table td small { display: inline; margin-left: 6px; }
  .rg-table td.r { text-align: right; }
  .rg-table--roster tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
  .rg-table--roster td { display: block; padding: 0; text-align: left !important; min-height: 0; white-space: normal; }
  .rg-table--roster td::before { display: block; font-size: 11px; }
  .rg-table--roster td[data-label="순번"] { display: none; }
  .rg-table--roster td[data-label="주소"], .rg-table--roster td[data-label="확인"] { grid-column: 1 / -1; min-width: 0; }
  .rg-table--preview tr { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 3px 10px; }
  .rg-table--preview td { display: block; padding: 0; text-align: left; min-height: 0; }
  .rg-table--preview td::before { content: none; }
  .rg-table--preview td:nth-child(1) { grid-column: 1; grid-row: 1 / span 4; text-align: right; color: var(--faint); }
  .rg-table--preview td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .rg-table--preview td:nth-child(2) { grid-column: 2; grid-row: 2; font-size: 12px; }
  .rg-table--preview td:nth-child(2)::before { content: "받은 표기 "; display: inline; font-size: 11px; }
  .rg-table--preview td:nth-child(4) { grid-column: 2; grid-row: 3; }
  .rg-table--preview td:nth-child(5) { grid-column: 2; grid-row: 4; }
  .rg-table--preview td:empty { display: none; }
  .rg-roster__scroll, .rg-docs__scroll { overflow: visible; }
  .rg-rrow.is-flag td:first-child { box-shadow: none; }
  .rg-rrow.is-flag { box-shadow: inset 4px 0 0 var(--warn-line); background: #FFFAEE; }
  .rg-bars { min-width: 140px; width: 150px; }
  .rg-chip { min-width: 0; }
  .rg-empty td { display: block; text-align: center; }
  .rg-empty td::before { content: none; }
  .rg-table--docs tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 6px; }
  .rg-table--docs td { display: block; padding: 0; text-align: left; min-height: 0; }
  .rg-table--docs td::before { display: block; margin-bottom: 2px; font-size: 11px; }
  .rg-table--docs td:nth-child(1), .rg-table--docs td:last-child { display: none; }
  .rg-table--docs td:nth-child(2) { grid-column: 1 / -1; padding-bottom: 2px; }
  .rg-table--docs td:nth-child(2)::before { content: none; }
  .rg-table--docs td:nth-child(2) small { display: inline; }
  .rg-table--docs .rg-chip { width: 100%; min-width: 0; justify-content: center; padding: 2px 4px; font-size: 12px; }
  .rg-preview__scroll { max-height: none; }
  .rg-sheet__panel { right: 12px; left: 12px; width: auto; bottom: 72px; }
  .rg-fab { right: 14px; bottom: 14px; }
  .rg .demo-notice { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .rg-spin { animation: none; }
  .rg-lane__bar i { transition: none; }
  .rg-toast.is-in { animation: none; }
}
