/* 용인정 지역현안 접수창구 — 공통 스타일 (수정 시 layout.php 의 CSS_VER 를 올리세요) */

:root {
  --blue: #004ea2;
  --blue-deep: #0a3570;
  --blue-soft: #e3eefa;
  --bg: #f2f6fa;
  --paper: #ffffff;
  --ink: #1e2b38;
  --mute: #5a6978;
  --line: #cfdbe7;
  --ok: #1d7a4a;
  --ok-soft: #e4f4ea;
  --warn: #a55300;
  --warn-soft: #fff4e2;
  --err: #b3261e;
  --err-soft: #fdeceb;
  --radius: 10px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body.area-admin { font-size: 15px; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 3px solid rgba(0, 78, 162, .35); outline-offset: 2px; }

h1, h2, h3 { color: var(--blue-deep); line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4.2vw, 2.1rem); font-weight: 750; }
h2 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 .9em; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.area-admin .wrap { max-width: 1240px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--paper); padding: 8px 12px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.muted { color: var(--mute); }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* ---------- 머리·꼬리 ---------- */

.site-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.3; }
.brand-org { font-size: .78rem; color: var(--mute); }
.brand-name { font-size: 1.12rem; font-weight: 750; color: var(--blue); letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink); padding: 6px 0; }
.nav a:hover { color: var(--blue); text-decoration: underline; }

.admin-head { background: var(--blue-deep); border-bottom: 0; }
.admin-head .brand-org { color: #b9cbe3; }
.admin-head .brand-name { color: #fff; }
.admin-head .nav a { color: #e8f0fa; }
.admin-head .nav a:hover { color: #fff; }
.whoami { color: #b9cbe3; font-size: .88rem; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.25); }

main.wrap { padding-top: 32px; padding-bottom: 64px; min-height: 60vh; }

.site-foot { border-top: 1px solid var(--line); color: var(--mute); font-size: .85rem; padding: 24px 0 40px; }
.site-foot p { margin: 0 0 .4em; }

/* ---------- 버튼 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 22px;
  border: 1.5px solid var(--blue); border-radius: var(--radius);
  background: var(--blue); color: #fff;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.area-admin .btn { min-height: 40px; padding: 0 16px; }
.btn-line { background: var(--paper); color: var(--blue); }
.btn-line:hover { background: var(--blue-soft); color: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--mute); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); color: var(--err); border-color: var(--err); }
.btn-warn { background: var(--warn); border-color: var(--warn); }
.btn-warn:hover { background: #7f4000; border-color: #7f4000; }
.btn-block { width: 100%; }

.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: .92rem; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:disabled { color: var(--mute); text-decoration: none; cursor: default; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
form.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

/* ---------- 입력 ---------- */

label, .label { display: block; font-weight: 650; margin-bottom: 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--blue); }

input[type=text], input[type=email], input[type=tel], input[type=search], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
}
.area-admin input[type=text], .area-admin input[type=email], .area-admin input[type=search], .area-admin input[type=number], .area-admin select, .area-admin textarea { padding: 8px 10px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(0, 78, 162, .18); outline-offset: 0; }
textarea { resize: vertical; line-height: 1.6; }
input.short { width: 80px; }

.req, .opt { font-style: normal; font-size: .78rem; font-weight: 600; margin-left: 6px; padding: 1px 7px; border-radius: 999px; vertical-align: 2px; }
.check .req, .check .opt { margin: 0 6px 0 0; }
.req { color: var(--blue); background: var(--blue-soft); }
.opt { color: var(--mute); background: #eef1f4; }

.stack > * + * { margin-top: 16px; }
.stack.small > * + * { margin-top: 8px; }
.field { margin: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); }
.err { color: var(--err); font-size: .9rem; margin: 6px 0 0; }
.hint { color: var(--mute); font-size: .9rem; margin: 6px 0 0; }
.static { margin: 0; padding: 4px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- 알림 ---------- */

.flash { padding: 12px 16px; border-radius: var(--radius); margin: 0 0 20px; border: 1px solid; font-size: .95rem; }
.flash-ok { background: var(--ok-soft); border-color: #b5dcc4; color: #13553a; }
.flash-info { background: var(--blue-soft); border-color: #bcd3ee; color: var(--blue-deep); }
.flash-error { background: var(--err-soft); border-color: #f1c0bc; color: #8a1d17; }

/* ---------- 첫 화면 ---------- */

.hero { padding: 20px 0 36px; }
.hero-org { color: var(--blue); font-weight: 650; font-size: .95rem; margin-bottom: 10px; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 2.7rem); font-weight: 800; max-width: 16ch; }
.lead { font-size: 1.05rem; color: #3a4a5a; max-width: 60ch; }
.start-form { margin-top: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.inline-field { display: flex; gap: 10px; }
.inline-field input { flex: 1; min-width: 0; }
.inline-field .btn { flex: none; }

.steps ol { list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 750; display: grid; place-items: center; }
.steps strong { font-size: 1.05rem; }
.steps span { color: var(--mute); font-size: .95rem; }

.privacy-brief { margin-top: 36px; padding: 20px 22px; border-left: 4px solid var(--blue); background: var(--paper); border-radius: 0 12px 12px 0; }
.privacy-brief h2 { font-size: 1.05rem; }
.privacy-brief p { margin: 0; color: #3a4a5a; font-size: .95rem; }

/* ---------- 인증·폼 ---------- */

.auth-box { max-width: 460px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; }
.auth-box form + form { margin-top: 12px; }
.auth-box label + input { margin-bottom: 16px; }
.otp-input { font-size: 1.7rem !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding-left: .5em !important; }
.resend { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.form-page { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; }
.consent { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #f8fafc; }
.consent.has-error { border-color: var(--err); }
.consent summary { cursor: pointer; font-weight: 650; }
.consent dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; font-size: .92rem; margin: 12px 0 14px; }
.consent dt { color: var(--mute); }
.consent dd { margin: 0; }
.consent label.check + label.check, .consent .err + label.check, .consent details + label.check { margin-top: 10px; }
.consent details { margin: 6px 0 0 30px; font-size: .92rem; }
.consent details summary { font-weight: 500; color: var(--mute); }
.consent hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.consent .check-all { font-weight: 700; }
.consent .err, .consent .hint { margin: 6px 0 0 30px; }
.consent-mini { margin: 0 0 16px; padding: 12px 14px; }
.consent-mini label.check { font-size: .95rem; }
.consent-opt .opt-fields { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.consent-opt .opt-fields[disabled] { opacity: .5; }
.consent-opt .opt-fields .hint { margin-left: 0; }
.contact-choice { background: var(--blue-soft); border-radius: var(--radius); padding: 14px 16px; }
.count-line span { font-variant-numeric: tabular-nums; }

/* ---------- 목록 ---------- */

.title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.title-row h1 { margin: 0; }
.title-row .hint { margin: 0; max-width: 60ch; }

.ticket-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ticket-list li + li { border-top: 1px solid var(--line); }
.ticket-list a { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 16px 20px; text-decoration: none; color: var(--ink); }
.ticket-list a:hover { background: #f7fafd; }
.t-no { grid-column: 1; font-size: .85rem; color: var(--mute); font-variant-numeric: tabular-nums; }
.t-title { grid-column: 1; font-weight: 650; font-size: 1.05rem; }
.t-meta { grid-column: 1; font-size: .88rem; color: var(--mute); }
.ticket-list .badge { grid-column: 2; grid-row: 1 / span 3; align-self: center; }

.empty, .notice-page { background: var(--paper); border: 1px dashed var(--line); border-radius: 14px; padding: 36px 24px; text-align: center; }
.empty p { color: var(--mute); }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; padding: 6px 10px; border-radius: 8px; text-align: center; text-decoration: none; border: 1px solid var(--line); background: var(--paper); }
.pager .cur { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- 상태 표시 ---------- */

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; border: 1.5px solid; }
.st-received { color: var(--blue); border-color: var(--blue); background: var(--paper); }
.st-reviewing { color: #6a4b00; border-color: #d9b44a; background: #fff8df; }
.st-in_progress { color: #fff; border-color: var(--blue); background: var(--blue); }
.st-answered { color: #fff; border-color: var(--ok); background: var(--ok); }
.st-closed { color: var(--mute); border-color: var(--line); background: #eef1f4; }
.st-withdrawn { color: var(--mute); border-color: var(--line); background: transparent; text-decoration: line-through; }

/* ---------- 접수증 (이 화면의 중심 요소) ---------- */

.receipt { position: relative; background: var(--paper); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 18px 40px -26px rgba(10, 53, 112, .55); margin-bottom: 26px; }
.receipt-top { background: var(--blue); color: #fff; padding: 20px 26px 18px; }
.receipt-top h1 { color: #fff; margin: 0; font-size: 1.35rem; }
.receipt-org { margin: 0 0 2px; font-size: .82rem; color: #cfe0f5; }
.receipt-body { position: relative; padding: 30px 26px 24px;
  background: linear-gradient(90deg, var(--line) 55%, transparent 0) 0 12px / 14px 2px repeat-x; }
.receipt-body::before, .receipt-body::after { content: ""; position: absolute; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.receipt-body::before { left: -10px; }
.receipt-body::after { right: -10px; }
.receipt-label { margin: 0; font-size: .85rem; color: var(--mute); }
.receipt-no { margin: 0 0 18px; font-size: clamp(2.1rem, 8vw, 3rem); font-weight: 800; letter-spacing: .03em; color: var(--blue-deep); font-variant-numeric: tabular-nums; line-height: 1.15; }
.receipt-meta { display: grid; grid-template-columns: repeat(4, auto); gap: 12px 24px; margin: 0; justify-content: start; }
.receipt-meta dt { font-size: .8rem; color: var(--mute); }
.receipt-meta dd { margin: 0; font-weight: 650; }
.receipt-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: #3a4a5a; font-size: .95rem; }

.receipt.is-new { animation: receipt-print .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes receipt-print {
  from { transform: translateY(-18px); clip-path: inset(0 0 100% 0 round 16px); }
  to { transform: none; clip-path: inset(0 0 0 0 round 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .receipt.is-new { animation: none; }
}

/* 진행 단계 */
.progress { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 26px; padding: 0; }
.progress li { position: relative; text-align: center; font-size: .9rem; color: var(--mute); padding-top: 26px; }
.progress li::before { content: ""; position: absolute; top: 6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); z-index: 1; }
.progress li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.progress li:first-child::after { display: none; }
.progress li.is-done, .progress li.is-current { color: var(--blue-deep); font-weight: 650; }
.progress li.is-done::before { background: var(--blue); border-color: var(--blue); }
.progress li.is-done::after, .progress li.is-current::after { background: var(--blue); }
.progress li.is-current::before { background: var(--paper); border: 4px solid var(--blue); width: 18px; height: 18px; margin-left: -9px; top: 4px; }

.content-block { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-bottom: 20px; }
.loc { color: var(--mute); font-size: .95rem; }
.body-text { white-space: normal; line-height: 1.75; }

/* 답변·의견 */
.thread { margin-bottom: 20px; }
.msg { padding: 14px 16px; border-radius: 12px; margin-top: 12px; background: var(--paper); border: 1px solid var(--line); }
.msg-admin { border-left: 4px solid var(--blue); }
.msg-user { background: #f7f9fb; }
.msg-internal { background: var(--warn-soft); border: 1px dashed #e0b066; border-left: 4px solid var(--warn); }
.msg-who { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-weight: 650; font-size: .92rem; margin-bottom: 6px; }
.msg-who time { font-weight: 400; color: var(--mute); font-size: .85rem; }
.msg-body { line-height: 1.7; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }
.tag-public { background: var(--blue-soft); color: var(--blue); }
.comment-form { margin-top: 18px; }
.comment-form .btn { margin-top: 10px; }

.history { margin-top: 10px; font-size: .92rem; }
.history summary { cursor: pointer; color: var(--blue); }
.history ul, .log-list { list-style: none; padding: 0; margin: 10px 0 0; }
.history li, .log-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.history time, .log-list time { color: var(--mute); font-variant-numeric: tabular-nums; margin-right: 6px; }

/* ---------- 관리자 ---------- */

.back { font-size: .9rem; text-decoration: none; }
.back::before { content: "‹ "; }

.stat-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; }
.stat-strip a { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.stat-strip a[aria-current] { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.stat-strip b { font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--blue-deep); }
.stat-strip .is-alert b { color: var(--warn); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.filters label { font-size: .82rem; font-weight: 600; color: var(--mute); margin: 0; min-width: 120px; }
.filters label select, .filters label input { margin-top: 4px; color: var(--ink); font-weight: 400; }
.filters .grow { flex: 1; min-width: 200px; }

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: .82rem; color: var(--mute); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f7f9fc; position: sticky; top: 0; white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid #e6edf4; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #f8fbfe; }
table.data .title-cell a { color: var(--ink); text-decoration: none; font-weight: 600; }
table.data .title-cell a:hover { color: var(--blue); text-decoration: underline; }
table.data tr.is-off td { color: var(--mute); background: #fafbfc; }
table.data tr.is-reveal td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
table.compact td { padding: 6px 8px; }
table.compact input[type=text] { min-width: 120px; }
.nowrap { white-space: nowrap; }
.empty-cell { text-align: center; color: var(--mute); padding: 32px 12px !important; }

.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 6px 0 18px; }
.receipt-inline { font-size: 1.05rem; font-weight: 750; color: var(--blue); margin: 0 0 4px; letter-spacing: .02em; }
.meta-line { color: var(--mute); margin: 0; }
.view-status .badge { font-size: .95rem; padding: 5px 14px; }

.admin-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px; margin-bottom: 16px; }
.panel h2 { font-size: 1.02rem; margin-bottom: 12px; }
.reply-forms { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.memo-form { margin-top: 20px; }
.assign-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

.pii-list { margin: 0; }
.pii-list > div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid #e9eff5; }
.pii-list dt { color: var(--mute); font-size: .88rem; }
.pii-list dd { margin: 0; font-variant-numeric: tabular-nums; }
.pii-list .masked { letter-spacing: .04em; color: #45535f; }
.pii-panel form { margin-top: 14px; }

.reveal-box { position: relative; overflow: hidden; margin: 14px 0; padding: 14px; border-radius: 10px; background: var(--warn-soft); border: 1.5px solid #e0b066; user-select: none; -webkit-user-select: none; }
.reveal-box .pii-list, .reveal-box .reveal-title, .reveal-box .hint { position: relative; z-index: 1; }
.reveal-box .pii-list dd { font-weight: 700; font-size: 1.05rem; color: var(--ink); user-select: text; -webkit-user-select: text; }
.reveal-title { font-size: .85rem; color: var(--warn); font-weight: 650; }
.watermark { position: absolute; inset: -30% -30%; display: flex; flex-wrap: wrap; gap: 18px 28px; align-content: center; transform: rotate(-20deg); opacity: .09; font-size: .8rem; font-weight: 700; pointer-events: none; }
.reveal-box.is-hidden .pii-list dd { filter: blur(6px); }
.reveal-log { margin-top: 14px; font-size: .88rem; }
.reveal-log summary { cursor: pointer; color: var(--blue); }
.reveal-log ul { list-style: none; padding: 0; margin: 8px 0 0; }
.reveal-log li { padding: 6px 0; border-bottom: 1px solid #e9eff5; }

.row-edit summary { cursor: pointer; list-style: none; }
.row-edit summary::-webkit-details-marker { display: none; }
.row-edit[open] summary { margin-bottom: 8px; }

.add-row { display: flex; gap: 8px; margin-top: 12px; }
.add-row input[type=text] { flex: 1; }

/* ---------- 시민 첫 화면: 약속 ---------- */
.agree-line { margin-top: 12px; font-size: .92rem; }
.agree-line a { font-size: .85rem; margin-left: 4px; }
.promise { margin: 8px 0 36px; padding: 26px 24px; border-radius: 16px; background: linear-gradient(135deg, #0a3570 0%, #004ea2 60%, #1a6cc4 100%); color: #fff; }
.promise h2 { color: #fff; font-size: clamp(1.2rem, 3.6vw, 1.45rem); margin-bottom: 16px; }
.people { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; }
.people li { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); font-size: .92rem; font-weight: 600; }
.people .lead-person { background: #fff; color: var(--blue-deep); border-color: #fff; }
.people .more { background: transparent; border-style: dashed; font-weight: 500; }
.pledges { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; counter-reset: pl; }
.pledges li { counter-increment: pl; background: rgba(255,255,255,.1); border-radius: 12px; padding: 14px 14px 12px; }
.pledges b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.pledges b::before { content: counter(pl); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: #00a0e2; font-size: .8rem; vertical-align: 1px; }
.pledges span { font-size: .9rem; color: #d6e5f7; line-height: 1.55; }
.privacy-brief p + p { margin-top: 8px; }
.privacy-tip { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: #fff8e8; border: 1px solid #f0d9a4; color: #5c4200; font-size: .93rem; line-height: 1.6; }

/* ---------- 관리자 공통 ---------- */
.nav a[aria-current] { color: #fff; font-weight: 700; box-shadow: inset 0 -2px 0 #00a0e2; }
.small { font-size: .82rem; }
mark { background: #fff1a8; color: inherit; padding: 0 1px; border-radius: 2px; }
.narrow { max-width: 760px; }
.kv { margin: 0 0 16px; }
.kv > div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e9eff5; }
.kv dt { color: var(--mute); font-size: .9rem; }
.kv dd { margin: 0; }
.plain-list { margin: 0; padding-left: 18px; line-height: 1.7; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.panel-head a { font-size: .85rem; text-decoration: none; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); font-size: .82rem; text-decoration: none; margin: 0 4px 4px 0; }
.chip:hover { background: var(--blue); color: #fff; }
.urg { display: inline-block; font-size: .74rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; vertical-align: 2px; letter-spacing: 0; }
.urg-low { background: #eef1f4; color: var(--mute); }
.urg-normal { background: var(--blue-soft); color: var(--blue); }
.urg-high { background: #ffe9d2; color: #a14a00; }
.urg-urgent { background: var(--err); color: #fff; }

/* ---------- 목록: 상태 탭·검색 ---------- */
.st-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--line); margin: 0 0 14px; scrollbar-width: thin; }
.st-tabs a { flex: none; padding: 10px 14px; text-decoration: none; color: var(--mute); font-weight: 600; font-size: .93rem; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.st-tabs a b { margin-left: 4px; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; }
.st-tabs a:hover { color: var(--blue); }
.st-tabs a[aria-current] { color: var(--blue); border-bottom-color: var(--blue); }
.st-tabs a[aria-current] b { color: var(--blue); }
.search-box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.search-main { display: flex; gap: 8px; }
.search-main input { flex: 1; min-width: 0; font-size: 1rem !important; min-height: 44px !important; }
.search-main .btn { min-width: 84px; }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.search-row label { font-size: .8rem; font-weight: 600; color: var(--mute); margin: 0; flex: 1 1 140px; min-width: 130px; }
.search-row select, .search-row input { margin-top: 4px; color: var(--ink); font-weight: 400; width: 100%; }
.search-more { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.search-more summary { cursor: pointer; color: var(--blue); font-size: .9rem; font-weight: 600; }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 10px; }
.result-bar p { margin: 0; color: var(--mute); }
.result-bar p b { color: var(--ink); font-size: 1.1rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chips a { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); text-decoration: none; font-size: .84rem; }
.chips a:hover { background: var(--blue); color: #fff; }
.chips a.reset { background: transparent; color: var(--mute); text-decoration: underline; }
.list-table td { font-size: .93rem; }
.list-table .title-cell { min-width: 240px; }
.row-tags { display: block; margin-top: 4px; }
.row-tags a { font-size: .78rem; color: var(--mute); text-decoration: none; margin-right: 6px; }
.row-tags a:hover { color: var(--blue); }
.step-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.step-dots i { width: 8px; height: 8px; border-radius: 50%; background: #dbe4ee; }
.step-dots i.on { background: var(--blue); }
.age { font-size: .78rem; color: var(--mute); }
.age-warn { color: var(--warn); font-weight: 700; }
.age-late { color: var(--err); font-weight: 700; }

/* 페이징 */
.pager { align-items: center; }
.pager .gap { border: 0; min-width: auto; padding: 6px 2px; color: var(--mute); }
.pager .off { color: #b3bdc8; border-color: #e6edf4; background: transparent; }
.pager .edge { min-width: 34px; }
.page-jump { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: .88rem; color: var(--mute); }
.page-jump input { width: 64px !important; min-height: 34px !important; padding: 4px 8px !important; text-align: center; }
.page-jump button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--blue); cursor: pointer; font: inherit; }

/* ---------- 상세: 처리 단계 ---------- */
.view-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.view-tools { display: flex; gap: 8px; }
.who { color: var(--ink); font-weight: 600; }
.tag-row { margin: 8px 0 0; }
.wf-steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0 0 18px; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wf-steps li + li { border-left: 1px solid var(--line); }
.wf-steps a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none; color: var(--mute); height: 100%; }
.wf-steps b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #c9d5e2; font-size: .9rem; }
.wf-steps span { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.wf-steps .is-done a { color: var(--blue-deep); }
.wf-steps .is-done b { background: var(--blue); border-color: var(--blue); color: #fff; }
.wf-steps .is-current { background: var(--blue-soft); }
.wf-steps .is-current a { color: var(--blue); }
.wf-steps .is-current b { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 4px rgba(0,78,162,.15); }
.wf-panel { scroll-margin-top: 16px; }
.wf-panel.is-current { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,78,162,.08); }
.wf-panel.is-locked { background: #fbfcfd; }
.wf-panel.is-locked > h2, .wf-panel.is-locked .wf-head h2 { color: var(--mute); }
.wf-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.wf-head h2 { margin: 0; }
.wf-no { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 6px; background: var(--blue); color: #fff; font-size: .82rem; vertical-align: 1px; }
.is-locked .wf-no { background: #b8c4d1; }
.wf-meta { font-size: .8rem; color: var(--mute); margin: 0 0 12px; }
.ai-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e9eff5; }
.ai-block h3 { font-size: .9rem; color: var(--blue-deep); margin: 0 0 8px; }
.ai-block > summary { cursor: pointer; font-weight: 650; color: var(--blue); font-size: .9rem; }
.ai-overview { font-size: 1rem; line-height: 1.75; margin: 0; }
.kp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.kp { background: #f5f8fc; border-radius: 10px; padding: 10px 12px; border-left: 3px solid var(--blue); }
.kp strong { display: block; font-size: .9rem; color: var(--blue-deep); margin-bottom: 3px; }
.kp p { margin: 0; font-size: .88rem; line-height: 1.55; }
.wf-list { margin: 0; padding-left: 18px; line-height: 1.65; font-size: .93rem; }
.wf-list li + li { margin-top: 6px; }
.ai-verify .wf-list li::marker { color: var(--warn); }
.how { font-size: .84rem; color: #3f6e9e; }
.cert { display: inline-block; font-size: .72rem; font-weight: 700; padding: 0 6px; border-radius: 5px; }
.cert-ok { background: var(--ok-soft); color: var(--ok); }
.cert-check { background: var(--warn-soft); color: var(--warn); }
.juris { margin: 10px 0 0; font-size: .92rem; background: #f5f8fc; padding: 8px 10px; border-radius: 8px; }
.tag-edit .inline-field input { font-size: .92rem; }
.suggest-cat { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 10px; font-size: .9rem; }
.ai-draft { background: #f8fafc; border: 1px solid #e3eaf2; border-radius: 10px; padding: 14px 16px; line-height: 1.8; white-space: normal; }
.ai-warn { background: var(--warn-soft); border: 1px solid #f0d2a2; border-radius: 10px; padding: 10px 14px; }
.ai-warn h3 { color: var(--warn); }
.send-form { margin-top: 22px; padding-top: 16px; border-top: 2px solid var(--blue); }
.send-form h3 { font-size: 1rem; color: var(--blue-deep); margin: 0; }
button.is-busy { cursor: progress; opacity: .85; }
button.is-busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
body.is-waiting button[data-busy]:not(.is-busy) { pointer-events: none; opacity: .5; }
@keyframes spin { to { transform: rotate(360deg); } }

.err-log { border-top: 1px solid #e9eff5; padding: 8px 0; font-size: .88rem; }
.err-log summary { cursor: pointer; color: var(--err); font-variant-numeric: tabular-nums; }
.err-log pre { white-space: pre-wrap; word-break: break-all; background: #f6f8fb; border-radius: 8px; padding: 10px; font-size: .8rem; max-height: 240px; overflow: auto; }

/* ---------- 대시보드 ---------- */
.kpis { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; }
.kpis a, .kpis .kpi-static { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.kpis a:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(0,78,162,.08); }
.kpis span { font-size: .84rem; color: var(--mute); font-weight: 600; }
.kpis b { font-size: 1.9rem; font-weight: 800; color: var(--blue-deep); font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpis b small { font-size: .95rem; margin-left: 2px; font-weight: 700; }
.kpis em { font-style: normal; font-size: .78rem; color: var(--mute); }
.kpis .is-alert a { border-color: #f1c0bc; background: #fffafa; }
.kpis .is-alert b { color: var(--err); }
.kpis .is-warn a { border-color: #f0d2a2; background: #fffcf6; }
.kpis .is-warn b { color: var(--warn); }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dash-grid .panel { margin: 0; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-svg .grid { stroke: #e6edf4; stroke-width: 1; }
.chart-svg .axis { fill: #7a8796; font-size: 11px; font-family: var(--font); }
.chart-legend, .donut-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .84rem; color: var(--mute); }
.swatch { width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.donut { display: flex; flex-direction: column; align-items: center; }
.donut-svg { width: 170px; height: 170px; }
.donut-num { font-size: 26px; font-weight: 800; fill: var(--blue-deep); font-family: var(--font); }
.donut-cap { font-size: 12px; fill: #7a8796; font-family: var(--font); }
.donut-legend { flex-direction: column; width: 100%; gap: 4px; margin-top: 12px; }
.donut-legend li { display: grid; grid-template-columns: 16px 1fr auto 44px; align-items: center; }
.donut-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.donut-legend em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { display: grid; grid-template-columns: minmax(70px, 34%) 1fr 40px; gap: 10px; align-items: center; padding: 5px 0; font-size: .9rem; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-label a { color: var(--ink); text-decoration: none; }
.hb-label a:hover { color: var(--blue); text-decoration: underline; }
.hb-track { display: block; width: 100%; height: 10px; }
.hb-val { text-align: right; font-variant-numeric: tabular-nums; }
.tag-cloud { margin: 0; line-height: 2.2; }
.tc { display: inline-block; margin-right: 10px; text-decoration: none; color: var(--blue); white-space: nowrap; }
.tc small { color: var(--mute); font-size: .75rem; }
.tc-1 { font-size: .88rem; color: #5b86b8; }
.tc-2 { font-size: 1rem; }
.tc-3 { font-size: 1.15rem; font-weight: 650; }
.tc-4 { font-size: 1.35rem; font-weight: 800; color: var(--blue-deep); }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e9eff5; }
.dash-list li:last-child { border-bottom: 0; }
.dash-list a { min-width: 0; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.dl-title { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-meta { font-size: .78rem; color: var(--mute); }
.dash-list a:hover .dl-title { color: var(--blue); text-decoration: underline; }
.dash-list .badge { flex: none; font-size: .74rem; }

/* ---------- 반응형 ---------- */

@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3 { grid-column: span 2; }
}
@media (max-width: 900px) {
  .admin-cols { grid-template-columns: 1fr; }
  .wf-steps { grid-template-columns: repeat(5, minmax(64px, 1fr)); }
  .wf-steps a { flex-direction: column; gap: 4px; padding: 10px 4px; text-align: center; }
  .wf-steps span { font-size: .78rem; }
}
@media (max-width: 720px) {
  .dash-grid { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .pledges { grid-template-columns: 1fr; }
  table.list-table thead { display: none; }
  table.list-table, table.list-table tbody, table.list-table tr, table.list-table td { display: block; width: 100%; }
  .table-wrap:has(.list-table) { background: transparent; border: 0; }
  table.list-table tr { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 8px 12px; }
  table.list-table td { border: 0; padding: 5px 0 5px 84px; position: relative; white-space: normal; min-height: 26px; }
  table.list-table td::before { content: attr(data-th); position: absolute; left: 0; top: 6px; width: 76px; color: var(--mute); font-size: .78rem; font-weight: 600; }
  table.list-table td br { display: none; }
  table.list-table tbody tr:hover td { background: transparent; }
  table.list-table td[data-th="제목"] { padding-left: 0; font-size: 1rem; }
  table.list-table td[data-th="제목"]::before { content: none; }
  .chart { overflow-x: auto; }
  .chart-svg { min-width: 560px; }
  table.list-table td .muted { margin-left: 4px; }
  table.list-table .empty-cell { display: block; padding-left: 0; }
  table.list-table .empty-cell::before { content: none; }
  .page-jump { margin: 8px 0 0; width: 100%; justify-content: center; }
  .search-row label { flex-basis: calc(50% - 5px); }
  .view-top { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .inline-field { flex-direction: column; }
  .receipt-meta { grid-template-columns: repeat(2, auto); }
  .form-page, .auth-box, .content-block { padding: 22px 18px; }
  .head-row { padding-top: 10px; padding-bottom: 10px; }
  .nav { font-size: .9rem; gap: 2px 14px; }
  .view-head { flex-direction: column; }
}
