:root {
  --green-900: #14301c;
  --green-800: #1b3f25;
  --green-700: #235031;
  --green-600: #2f6b40;
  --green-500: #3d8350;
  --green-50:  #f4f9f4;
  --green-100: #e8f1e8;
  --line:      #e3eae2;
  --line-soft: #eef3ed;
  --ink:       #1c241c;
  --muted:     #707a6e;
  --ok-bg: #e7f4ec;   --ok-fg: #1f7a3d;
  --hold-bg: #fbf1e1; --hold-fg: #97631a;
  --out-bg: #fcebe9;  --out-fg: #c0352c;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: #fbfcfb; color: var(--ink);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.6; padding: 44px 24px 72px;
}
.sheet { max-width: 1000px; margin: 0 auto; }

.page-head { margin-bottom: 22px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green-600); margin: 0 0 6px;
}
.page-head h1 {
  font-size: 27px; font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--green-900);
}

/* 편집기로 작성된 본문 */
.richtext { font-size: 15px; color: var(--ink); }
.richtext.intro { margin: 0; }
.richtext.outro { margin: 26px 0 0; }
.richtext h2 { font-size: 19px; color: var(--green-900); margin: 22px 0 10px; letter-spacing: -0.01em; }
.richtext h3 { font-size: 16px; color: var(--green-800); margin: 18px 0 8px; }
.richtext h4 { font-size: 14.5px; color: var(--green-700); margin: 14px 0 6px; }
.richtext p { margin: 8px 0; }
.richtext ul, .richtext ol { margin: 8px 0; padding-left: 22px; }
.richtext li { margin: 3px 0; }
.richtext a { color: var(--green-600); }
.richtext img { max-width: 100%; height: auto; }
.richtext table { border-collapse: collapse; margin: 12px 0; }
.richtext table td, .richtext table th { border: 1px solid var(--line); padding: 6px 10px; }

/* 상단 텍스트 접기/펼치기 */
.intro-block { margin: 0 0 40px; }
.intro-wrap { position: relative; }
.intro-wrap.collapsed { max-height: 11em; overflow: hidden; }
.intro-wrap.collapsed::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px;
  background: linear-gradient(to bottom, rgba(251,252,251,0), #fbfcfb 92%);
  pointer-events: none;
}
.intro-toggle {
  display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%;
  margin: 18px 0 10px;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--green-600);
  background: none; border: 0; cursor: pointer; padding: 6px 0;
}
.intro-toggle:hover { color: var(--green-700); text-decoration: underline; }

/* 필터 */
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-btn {
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--green-700);
  padding: 8px 16px; border-radius: 999px; transition: all 0.15s ease;
}
.filter-btn:hover { background: var(--green-50); }
.filter-btn.active { background: var(--green-600); color: #fff; border-color: transparent; }

.region-select {
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--green-700);
  border: 1px solid var(--line); background-color: #fff; border-radius: 999px;
  padding: 8px 34px 8px 16px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23707a6e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.region-select:hover { background-color: var(--green-50); }
.region-select:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }

.admin-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  transition: all 0.15s ease;
}
.admin-link svg { width: 15px; height: 15px; }
.admin-link:hover { color: var(--green-700); border-color: var(--green-100); background: var(--green-50); }

/* 표 */
.table-wrap {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px rgba(20,48,28,0.04), 0 8px 28px rgba(20,48,28,0.05);
}
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
thead th {
  background: var(--green-800); color: #eaf3ea;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  text-align: center; padding: 15px 18px; border-bottom: 1px solid var(--green-700);
}
thead th .sub { display: block; font-size: 11px; font-weight: 500; color: #aecbb1; margin-top: 1px; }
tbody td { padding: 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 14px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: var(--green-50); }
tbody tr.inactive { background: #f7f8f7; }
tbody tr.inactive:hover { background: #f1f3f1; }
tbody tr.inactive .no { color: #b8bfb7; }
tbody tr.inactive .org .lead, tbody tr.inactive .org .sub { color: #9aa39a; }
tbody tr.inactive .badge { opacity: 0.82; }
.empty-row { text-align: center; color: var(--muted); padding: 40px 0; }

.col-no { width: 56px; text-align: center; }
.col-check { width: 120px; text-align: center; }
.col-note { width: 110px; text-align: center; }
.no { font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.org .lead { display: block; font-weight: 600; color: var(--green-900); letter-spacing: -0.01em; }
.org .sub  { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.addr .addr-line { color: var(--ink); }
.addr .zip { color: var(--muted); font-weight: 500; }
.addr .meta { margin-top: 7px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.addr .meta .tel, .addr .meta .fax { font-variant-numeric: tabular-nums; }
.addr a { color: var(--green-600); text-decoration: none; font-weight: 500; }
.addr a:hover { text-decoration: underline; }
.addr .note-flag { margin-top: 7px; color: var(--out-fg); font-weight: 600; font-size: 13.5px; }
.empty { display: block; text-align: center; color: #c4cdc3; }

/* 배지 */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge.hold { background: var(--hold-bg); color: var(--hold-fg); }
.badge.out { background: var(--out-bg); color: var(--out-fg); }
.badge .n { font-weight: 700; font-variant-numeric: tabular-nums; }

/* 요약 */
.foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 22px; }
.foot .total { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--green-900); }
.counts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 560px) {
  body { padding: 28px 14px 48px; }
  .page-head h1 { font-size: 22px; }
}
