/* 정산대장: 크리에이터 정산 관리자 시연 (payout) */

.po {
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #FAF8F4;
  --paper: #FFFDF7;
  --text: #1E1A24;
  --muted: #5F5A66;
  --faint: #8A8590;
  --line: #E4DFD6;
  --line-strong: #CBC4B8;
  --primary: #3F2A7A;
  --primary-press: #33216A;
  --primary-soft: #EEEAF6;
  --accent: #D4581A;
  --accent-soft: #FDEEE3;
  --ok: #1C7A4D;
  --ok-soft: #E4F3EA;
  --warn: #8F5B00;
  --warn-soft: #FFF2D6;
  --danger: #B3261E;
  --danger-soft: #FCE9E7;
  --font: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
.po {
  margin: 0;
  min-height: 100vh;
  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;
  font-variant-numeric: tabular-nums;
}
:where(.po) :where(p, h1, h2, h3, ol, ul) { margin: 0; }
:where(.po) :where(ol, ul) { padding: 0; list-style: none; }
:where(.po) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.po [hidden] { display: none !important; }
.po :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.po a { color: var(--primary); }
.po-muted { color: var(--muted); font-size: 13px; }
.po-warn-text { color: var(--warn); }

/* ---------- 머리글 ---------- */
.po-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.po-head__inner { max-width: 1240px; margin: 0 auto; padding: 12px 24px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.po-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text) !important; }
.po-logo span { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.po-logo small { font-size: 12px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); }
.po-head__right { display: flex; align-items: center; gap: 10px; }
.po-role { font-size: 12px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 3px 10px; }
.po-nav { overflow-x: auto; scrollbar-width: none; }
.po-nav::-webkit-scrollbar { display: none; }
.po-nav__inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; }
.po-nav__item { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--muted) !important; text-decoration: none; border-bottom: 3px solid transparent; }
.po-nav__item:hover { color: var(--text) !important; }
.po-nav__item.is-on { color: var(--primary) !important; font-weight: 700; border-bottom-color: var(--accent); }

/* ---------- 본문 틀 ---------- */
.po-main { max-width: 1240px; margin: 0 auto; padding: 24px 24px 32px; }
.po-page { display: flex; flex-direction: column; gap: 16px; }
.po-titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.po-titlebar__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.po-eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
.po-h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.po-h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.po-lead { color: var(--muted); max-width: 760px; }
.po-note { font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: var(--r); padding: 8px 12px; }

.po-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.po-card--flush { padding: 0; overflow: hidden; }
.po-card__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.po-card--flush > .po-card__head { padding: 16px 18px 0; }

/* ---------- 버튼·입력 ---------- */
.po-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid transparent; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.po-btn--primary { background: var(--primary); color: #fff !important; }
.po-btn--primary:hover { background: var(--primary-press); }
.po-btn--primary:disabled { background: var(--line-strong); cursor: not-allowed; }
.po-btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text) !important; }
.po-btn--ghost:hover { border-color: var(--primary); color: var(--primary) !important; }
.po-btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.po-btn--icon { width: 40px; padding: 0; background: var(--surface); border-color: var(--line-strong); }
.po-icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: var(--r); cursor: pointer; color: var(--muted); font-size: 18px; }
.po-icon-btn:hover { background: var(--surface-2); color: var(--danger); }
.po-icon-btn--sm { width: 32px; height: 36px; }
.po-link { align-self: flex-start; background: none; border: 0; padding: 6px 0; color: var(--primary); font-weight: 600; font-size: 13px; cursor: pointer; }
.po-input, .po-select { height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding: 0 10px; font-size: 14px; min-width: 0; width: 100%; }
.po-input:focus, .po-select:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
.po-input:disabled, .po-select:disabled { background: var(--surface-2); color: var(--muted); }
.po-input--amt { text-align: right; font-variant-numeric: tabular-nums; }
.po-input.is-bad { border-color: var(--danger); background: var(--danger-soft); }
.po-select { width: auto; padding-right: 28px; }
.po-select--sm { height: 34px; font-size: 13px; }
.po-select--wide { min-width: 280px; }
.po-suffix { display: inline-flex; align-items: center; gap: 6px; }
.po-suffix .po-input { width: 84px; text-align: right; }

/* ---------- 상태 칩 ---------- */
.po-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.po-chip.is-open { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.po-chip.is-closed { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.po-chip.is-missing { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.po-chip.is-pending { background: var(--surface); color: var(--muted); border-style: dashed; border-color: var(--line-strong); }
.po-chip.is-diff { background: var(--accent-soft); color: #9A3D0C; border-color: transparent; }
.po-chip.is-carry { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-style: normal; margin-left: 4px; }
.po-chip.is-excel { background: var(--surface); color: var(--muted); margin-left: 4px; }
.po-chip.is-type { background: var(--primary-soft); color: var(--primary); border-color: transparent; }

/* ---------- 월 정산: 정산월·상태·지표 ---------- */
.po-monthnav { display: flex; align-items: center; gap: 6px; }
.po-monthnav .po-select { height: 40px; font-weight: 600; }
.po-status { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--r); padding: 12px 16px; }
.po-status[data-kind="closed"] { border-left-color: var(--ok); }
.po-status[data-kind="pending"] { border-left-color: var(--line-strong); border-left-style: dashed; }
.po-status > p { flex: 1 1 280px; color: var(--muted); }
.po-status b { color: var(--text); }
.po-status__acts { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.po-progress { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.po-progress__bar { display: block; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.po-progress__bar i { display: block; height: 100%; background: var(--primary); }

.po-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.po-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.po-kpi span { font-size: 12px; color: var(--muted); }
.po-kpi b { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.po-kpi b small { font-size: 12px; font-weight: 500; margin-left: 2px; color: var(--muted); }
.po-kpi em { font-style: normal; font-size: 11.5px; color: var(--faint); }
.po-kpi.is-pay { background: var(--primary); border-color: var(--primary); color: #fff; }
.po-kpi.is-pay span, .po-kpi.is-pay em, .po-kpi.is-pay b small { color: rgba(255, 255, 255, 0.78); }

.po-split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.po-detail { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 14px; }
.po-detail__head { display: flex; flex-direction: column; gap: 2px; }

/* ---------- 표 ---------- */
.po-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.po-table th, .po-table td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.po-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.po-table .num { text-align: right; white-space: nowrap; }
.po-table td small, .po-table th small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.po-table tbody tr[tabindex] { cursor: pointer; }
.po-table tbody tr[tabindex]:hover { background: var(--surface-2); }
.po-table tbody tr.is-sel { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.po-table tfoot th, .po-table tfoot td { font-weight: 700; background: var(--surface-2); border-bottom: 0; }
.po-pay { font-weight: 700; color: var(--primary); }
.po-tax .is-minus { color: var(--danger); }
.po-tax .is-plus { color: var(--ok); }
.po-tax small { display: block; }
.po-table tr.is-year th, .po-table tr.is-year td { background: var(--surface-2); font-weight: 600; }
.po-table tr.is-total th, .po-table tr.is-total td { background: var(--primary-soft); font-weight: 700; border-bottom: 0; }
.po-table tr.is-empty th, .po-table tr.is-empty td { color: var(--muted); background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(0, 0, 0, 0.025) 8px 16px); }
.po-empty-cell { color: var(--muted); font-size: 13px; }
.po-table th a { font-weight: 600; text-decoration: none; }

/* ---------- 계산 내역(영수증) ---------- */
.po-items { display: flex; flex-direction: column; gap: 14px; }
.po-items__group { display: flex; flex-direction: column; gap: 6px; }
.po-items__group h3 { font-size: 13px; font-weight: 700; }
.po-items__group h3 small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.po-item { display: grid; grid-template-columns: minmax(0, 1fr) 132px 32px; gap: 6px; align-items: center; }
.po-item--exp { grid-template-columns: minmax(0, 1fr) 132px 32px; grid-template-areas: "l a x" "m m ."; }
.po-item--exp > :nth-child(1) { grid-area: l; }
.po-item--exp > :nth-child(2) { grid-area: a; }
.po-item--exp > :nth-child(3) { grid-area: m; width: 100%; }
.po-item--exp > :nth-child(4) { grid-area: x; }
.po-item:has(.po-input:disabled) { grid-template-columns: minmax(0, 1fr) 132px; }
.po-item--exp:has(.po-input:disabled) { grid-template-areas: "l a" "m m"; }

.po-rc {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 18px 16px 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  --tooth: radial-gradient(circle at 6px 0, transparent 5px, var(--paper) 5.5px);
}
.po-rc::before, .po-rc::after { content: ""; position: absolute; left: -1px; right: -1px; height: 6px; background: var(--tooth); background-size: 12px 6px; }
.po-rc::before { top: -1px; }
.po-rc::after { bottom: -1px; transform: scaleY(-1); }
.po-rc--empty { color: var(--muted); text-align: center; padding: 28px 16px; }
.po-rc__title { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; padding-bottom: 8px; border-bottom: 1px dashed var(--line-strong); }
.po-rc__title span { font-weight: 600; color: var(--primary); }
.po-rc__lines { display: flex; flex-direction: column; padding: 6px 0; }
.po-rc__line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; font-size: 13.5px; }
.po-rc__line span small { display: block; font-size: 11.5px; color: var(--faint); }
.po-rc__line b { font-weight: 600; white-space: nowrap; }
.po-rc__line.is-minus b { color: var(--danger); }
.po-rc__line.is-plus b { color: var(--ok); }
.po-rc__line.is-sub { border-top: 1px dotted var(--line-strong); margin-top: 2px; padding-top: 6px; font-weight: 700; }
.po-rc__line.is-op { color: var(--primary); font-weight: 600; }
.po-rc__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--text); padding-top: 10px; }
.po-rc__total span { font-weight: 700; }
.po-rc__total b { white-space: nowrap; font-size: 26px; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; border-radius: 4px; padding: 0 4px; }
.po-rc__total b small { font-size: 14px; margin-left: 2px; }
.po-rc__total b.is-flash { animation: po-flash 0.9s ease-out; }
@keyframes po-flash { from { background: var(--accent-soft); color: var(--accent); } to { background: transparent; } }
.po-rc__carry { margin-top: 10px; font-size: 12.5px; color: var(--danger); background: var(--danger-soft); padding: 6px 10px; border-radius: 4px; }
.po-rc__cmp { margin-top: 10px; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 4px; }
.po-rc__cmp.is-ok { background: var(--ok-soft); color: var(--ok); }
.po-rc__cmp.is-diff { background: var(--accent-soft); color: #9A3D0C; }
.po-rc__rule { margin-top: 10px; font-size: 11.5px; color: var(--faint); }
.po-rc__rule a { color: var(--muted); }

/* ---------- 크리에이터·계약 ---------- */
.po-creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.po-creator { display: flex; flex-direction: column; gap: 12px; }
.po-creator__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.po-creator__type { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.po-contract { border-top: 1px dashed var(--line-strong); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.po-contract__head { display: flex; justify-content: space-between; gap: 10px; }
.po-contract__head small { display: block; font-size: 12px; color: var(--muted); }
.po-contract__rate { text-align: right; }
.po-contract__rate span { display: block; font-size: 11.5px; color: var(--muted); }
.po-contract__rate b { font-size: 22px; color: var(--primary); }
.po-contract__items { font-size: 12.5px; color: var(--muted); }
.po-contract__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.po-hist { display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; }
.po-hist li { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12.5px; color: var(--muted); padding: 3px 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; }
.po-hist li { position: relative; }
.po-hist li + li { margin-left: 20px; }
.po-hist li + li::before { content: "→"; position: absolute; left: -16px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.po-hist li b { color: var(--text); }
.po-hist li.is-now { background: var(--primary-soft); border-color: transparent; }
.po-hist li.is-now b { color: var(--primary); }
.po-inline { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.po-inline__fields { display: flex; gap: 10px 14px; flex-wrap: wrap; }
.po-inline__fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.po-inline__note { font-size: 12.5px; color: var(--muted); }
.po-inline__note b { color: var(--primary); }
.po-inline__acts { display: flex; gap: 6px; justify-content: flex-end; }
.po-newform { border-color: var(--primary); }
.po-form { display: flex; flex-direction: column; gap: 12px; }
.po-form__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.po-form__grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.po-form__grid .po-select { width: 100%; }

/* ---------- 월별 내역 ---------- */
.po-info { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr 1.3fr 1fr; gap: 10px; }
.po-info__cell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.po-info__cell span { font-size: 12px; color: var(--muted); }
.po-info__cell b { font-size: 15px; }
.po-info__cell small { font-size: 12px; color: var(--muted); font-weight: 400; }
.po-info__hist { font-size: 13.5px !important; }
.po-info__cell.is-pay { background: var(--primary); border-color: var(--primary); color: #fff; }
.po-info__cell.is-pay span, .po-info__cell.is-pay small { color: rgba(255, 255, 255, 0.78); }
.po-info__cell.is-pay b { font-size: 19px; }
.po-info__warn { grid-column: 1 / -1; font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: var(--r); padding: 8px 12px; }
.po-chart { overflow-x: auto; padding-bottom: 4px; }
.po-chart svg { display: block; }
.po-chart .g { stroke: var(--line); stroke-width: 1; }
.po-chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.po-chart .ax.warn { fill: var(--danger); font-weight: 600; }
.po-chart .b-closed { fill: var(--primary); }
.po-chart .b-open { fill: var(--accent); }
.po-chart .b-pending { fill: transparent; stroke: var(--line-strong); stroke-dasharray: 3 3; }
.po-chart .mark { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
.po-chart .mk { fill: var(--accent); font-size: 11px; font-weight: 600; font-family: var(--font); }

/* ---------- 엑셀 가져오기 ---------- */
.po-step { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; margin-right: 6px; vertical-align: 1px; }
.po-paste { width: 100%; height: 200px; resize: vertical; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.6; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); white-space: pre; overflow: auto; tab-size: 14; }
.po-paste__acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.po-paste__acts .po-btn--primary { margin-left: auto; }
.po-file { position: relative; overflow: hidden; }
.po-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.po-mapgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.po-mapgrid__cell { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.po-mapgrid__cell em { font-style: normal; color: var(--accent); font-weight: 600; font-size: 11px; }
.po-mapgrid__cell .po-select { width: 100%; }
.po-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 0 18px; }
.po-tile { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; display: flex; flex-direction: column; }
.po-tile span { font-size: 12px; color: var(--muted); }
.po-tile b { font-size: 22px; }
.po-tile.is-ok b { color: var(--ok); }
.po-tile.is-diff b { color: var(--accent); }
.po-tile.is-check b { color: var(--warn); }
.po-tile.is-muted b { color: var(--muted); }
.po-causes { display: flex; flex-direction: column; gap: 8px; padding: 12px 18px 0; }
.po-causes:empty { display: none; }
.po-cause { border: 1px solid #F3C9AE; background: var(--accent-soft); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.po-cause__title { font-weight: 700; color: #8A350A; }
.po-cause__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.po-tabs { display: flex; gap: 6px; padding: 14px 18px 10px; overflow-x: auto; }
.po-tab { flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; cursor: pointer; }
.po-tab b { font-weight: 700; margin-left: 2px; }
.po-tab.is-on { background: var(--text); color: #fff; border-color: var(--text); }
.po-why { color: var(--muted); margin-top: 2px; max-width: 260px; white-space: normal; }
.po-act { white-space: nowrap; }
.po-expand td { background: var(--surface-2); padding: 14px 18px !important; }
.po-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 16px; }
.po-register { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--surface-2); border-top: 1px solid var(--line); }
.po-register > p { flex: 1 1 320px; color: var(--muted); }
.po-register b { color: var(--text); }
.po-done { flex: 1 1 100%; background: var(--ok-soft); color: var(--ok); border-radius: var(--r); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.po-done__links { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 정산 규칙 ---------- */
.po-rules { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.po-rules__main { display: flex; flex-direction: column; gap: 16px; }
.po-rules__try { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 12px; }
.po-typetable { display: flex; flex-direction: column; }
.po-typetable__row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 120px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.po-typetable__row.is-head { font-size: 12px; color: var(--muted); font-weight: 600; padding-top: 0; }
.po-typetable__row small { display: block; font-size: 12px; color: var(--muted); }
.po-radios { display: flex; flex-direction: column; gap: 8px; }
.po-radio { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: pointer; }
.po-radio input { margin-top: 4px; accent-color: var(--primary); width: 16px; height: 16px; }
.po-radio b { display: block; font-size: 14px; }
.po-radio small { display: block; font-size: 12.5px; color: var(--muted); }
.po-radio.is-on { border-color: var(--primary); background: var(--primary-soft); }
.po-try { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.po-try label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.po-try .po-select { width: 100%; }

/* ---------- 공통: 대응표·알림·안내 ---------- */
.po-fab { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--text); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: 0 6px 18px rgba(30, 26, 36, 0.25); }
.po-dialog { border: 0; padding: 0; border-radius: 10px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.po-dialog::backdrop { background: rgba(30, 26, 36, 0.45); }
.po-dialog__body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.po-dialog__head { display: flex; justify-content: space-between; align-items: center; }
.po-dialog__head h2 { font-size: 17px; }
.po-map { display: flex; flex-direction: column; counter-reset: map; }
.po-map li { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.po-map li span { font-weight: 600; }
.po-map li a { color: var(--primary); }
.po-dialog__note { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; }
.po-toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 40; max-width: min(560px, calc(100vw - 32px)); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.po-toast[data-tone="ok"] { background: #18543A; }
.po-toast[data-tone="warn"] { background: #7A4B00; }
.po .demo-notice { text-align: center; font-size: 12px; color: var(--muted); padding: 8px 16px 84px; }

@media (prefers-reduced-motion: reduce) {
  .po *, .po *::before, .po *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1100px) {
  .po-kpis { grid-template-columns: repeat(3, 1fr); }
  .po-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .po-mapgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .po-split, .po-rules { grid-template-columns: minmax(0, 1fr); }
  .po-detail, .po-rules__try { position: static; }
}

@media (max-width: 760px) {
  .po-head__inner { padding: 10px 16px 4px; }
  .po-logo small { display: none; }
  .po-nav__inner { padding: 0 8px; }
  .po-main { padding: 16px 16px 24px; }
  .po-h1 { font-size: 20px; }
  .po-btn, .po-btn--sm { min-height: 44px; }
  .po-input, .po-select { height: 44px; }
  .po-select--wide { min-width: 0; width: 100%; }
  .po-titlebar__acts { width: 100%; }
  .po-titlebar__acts .po-select { flex: 1 1 100%; }
  .po-monthnav { width: 100%; }
  .po-monthnav .po-select { flex: 1; height: 44px; }
  .po-monthnav .po-btn--icon { width: 44px; min-height: 44px; }
  .po-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .po-kpi b { font-size: 17px; }
  .po-status__acts { margin-left: 0; width: 100%; }
  .po-status__acts .po-btn { flex: 1; }
  .po-creators { grid-template-columns: minmax(0, 1fr); }
  .po-form__grid { grid-template-columns: minmax(0, 1fr); }
  .po-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .po-info__cell.is-pay { grid-column: 1 / -1; }
  .po-mapgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .po-tiles { grid-template-columns: repeat(3, 1fr); padding: 0 14px; }
  .po-tile b { font-size: 18px; }
  .po-causes { padding: 12px 14px 0; }
  .po-tabs { padding: 12px 14px 8px; }
  .po-compare { grid-template-columns: minmax(0, 1fr); }
  .po-typetable__row { grid-template-columns: minmax(0, 1fr) 96px 96px; }
  .po-suffix .po-input { width: 72px; }
  .po-try { grid-template-columns: minmax(0, 1fr); }
  .po-map li { grid-template-columns: 1fr; gap: 2px; }
  .po-paste { height: 180px; }
  .po-paste__acts .po-btn--primary { margin-left: 0; flex: 1 1 100%; }
  .po-fab { right: 12px; bottom: 12px; }
  .po-item, .po-item--exp { grid-template-columns: minmax(0, 1fr) 120px 32px; }

  /* 표 → 카드 */
  .po-table thead { display: none; }
  .po-table, .po-table tbody, .po-table tfoot { display: block; }
  .po-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .po-table th, .po-table td { display: flex; flex-direction: column; padding: 0; border: 0; text-align: left !important; }
  .po-table td[data-label]::before, .po-table th[data-label]:not([data-label=""])::before { content: attr(data-label); font-size: 11.5px; font-weight: 500; color: var(--muted); }
  .po-table td:first-child, .po-table th:first-child { grid-column: 1 / -1; }
  .po-table .po-hide-m { display: none; }
  .po-table tfoot tr th { grid-column: 1 / -1; }
  .po-table tfoot td:empty { display: none; }
  .po-table--month tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .po-table--month tbody td:first-child { grid-column: 1 / 3; grid-row: 1; }
  .po-table--month tbody td:last-child { grid-column: 3; grid-row: 1; align-items: flex-end; }
  .po-table--month tbody td:last-child::before { display: none; }
  .po-table--month td:first-child::before { display: none; }
  .po-table--month td:first-child b { font-size: 15px; }
  .po-table tr.is-empty { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(0, 0, 0, 0.025) 8px 16px); }
  .po-table tr.is-empty th, .po-table tr.is-empty td { background: none; }
  .po-table tr.is-empty th::before { display: none; }
  .po-table tr.is-empty td[data-label]::before { display: none; }
  .po-table--ledger tr.is-empty td.po-empty-cell { display: none; }
  .po-table--ledger tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .po-table--ledger tbody th:first-child { grid-column: 1 / 3; grid-row: 1; }
  .po-table--ledger tbody td:last-child { grid-column: 3; grid-row: 1; flex-direction: row; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; }
  .po-table--ledger tbody td:last-child::before { display: none; }
  .po-table--ledger tbody tr.is-year th:first-child, .po-table--ledger tbody tr.is-total th:first-child { grid-column: 1 / -1; }
  .po-table--import tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .po-table--import tbody th:first-child { grid-column: 1; grid-row: 1; }
  .po-table--import tbody td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .po-table--import tbody td:nth-child(7) { grid-column: 2 / 4; grid-row: 1; }
  .po-table--import tbody td:nth-child(3) { grid-column: 2 / 4; grid-row: 2; }
  .po-table--import tbody td:nth-child(4) { grid-row: 3; }
  .po-table--import tbody td:nth-child(5) { grid-row: 3; }
  .po-table--import tbody td:nth-child(6) { grid-row: 3; }
  .po-table--import tbody td.po-act { grid-column: 1 / -1; grid-row: 4; }
  .po-table--import tbody td.po-act::before { display: none; }
  .po-table--import tbody tr.po-expand td { grid-row: auto; }
  .po-table--import td.po-act .po-select { width: 100%; }
  .po-table .po-expand { display: block; padding: 0; }
  .po-table .po-expand td { display: block; }
  .po-table td .po-chip { align-self: flex-start; }
  .po-why { max-width: none; }
}
