/* aops 담당 CSS — 클래스 접두어 .aops- 만 쓰세요(kit/병렬작업계약.md). 색은 var(--토큰), 크기는 rem.
   관리자 구독자·구독 운영·주문·결제·환불 화면. */

/* 요약 지표 */
.aops-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 1rem; }
.aops-stats.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .aops-stats, .aops-stats.is-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .aops-stats, .aops-stats.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aops-stats .stat { padding: .75rem .85rem; }
  .aops-stats .stat .v { font-size: 1.375rem; }
}

/* 조회 조건 */
.aops-filter { padding: 1rem 1.1rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: .85rem; }
.aops-filter-row { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; }
.aops-filter .field { gap: .3rem; }
.aops-filter .field > label { font-size: .875rem; font-weight: 700; color: var(--ink-2); }
.aops-filter .input, .aops-filter .select { min-height: 2.75rem; }
.aops-f-grow { flex: 1 1 14rem; }
.aops-f-date { flex: 0 1 10.5rem; }
.aops-f-sel { flex: 0 1 10.5rem; }
.aops-f-actions { display: flex; gap: .5rem; margin-left: auto; }
.aops-f-actions .btn { min-height: 2.75rem; }
.aops-chips .chip { min-height: 2.5rem; padding: 0 .9rem; font-size: .9375rem; }
.aops-chip-n { font-size: .8125rem; opacity: .8; }
.aops-filter .field-err { margin-top: -.35rem; }
@media (max-width: 760px) {
  .aops-f-date, .aops-f-sel, .aops-f-grow { flex: 1 1 100%; }
  .aops-f-actions { margin-left: 0; width: 100%; }
  .aops-f-actions .btn { flex: 1; }
}

/* 목록 위 줄(건수 + 정렬) */
.aops-listbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .75rem 1.1rem; border-bottom: 1px solid var(--line); }
.aops-listbar .muted { font-size: .875rem; }
.aops-sort { display: flex; align-items: center; gap: .4rem; }
.aops-sort .select { min-height: 2.75rem; width: auto; min-width: 10rem; }

/* 반응형 표: 좁은 화면에서 카드로 */
.aops-who b { display: block; font-weight: 700; }
.aops-who small { display: block; font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.aops-table td.aops-acts { white-space: nowrap; text-align: right; }
.aops-acts-in { display: inline-flex; gap: .25rem; align-items: center; }
.aops-icon-btn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-sm); color: var(--ink-2); }
.aops-icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.aops-icon-btn[aria-disabled="true"] { color: var(--line-strong); pointer-events: none; }
.aops-dup { background: var(--warn-soft); }
.aops-sub { color: var(--ink-3); font-size: .875rem; font-weight: 600; }
.aops-tag { display: inline-block; margin-left: .3rem; }
@media (max-width: 760px) {
  .aops-table { min-width: 0; }
  .aops-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .aops-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .35rem .9rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
  .aops-table tbody tr:last-child { border-bottom: 0; }
  .aops-table tbody td, .aops-table tbody th { display: block; padding: 0; border: 0; text-align: left; }
  .aops-table tbody td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 700; color: var(--ink-3); margin-bottom: 1px; }
  .aops-table .aops-main-cell { grid-column: 1 / -1; }
  .aops-table td.aops-acts { grid-column: 1 / -1; text-align: left; border-top: 1px dashed var(--line); padding-top: .4rem; }
  .aops-table .num, .aops-table .right { text-align: left; }
  .aops-hide-m { display: none !important; }
}

/* 상세 2단 */
.aops-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1rem; align-items: start; }
.aops-layout > * { min-width: 0; }
@media (max-width: 1100px) { .aops-layout { grid-template-columns: minmax(0, 1fr); } }
.aops-stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.aops-kv { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .6rem 1rem; }
.aops-kv dt { color: var(--ink-3); font-size: .9375rem; }
.aops-kv dd { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .aops-kv { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .aops-kv dd { margin-bottom: .55rem; }
}
.aops-kv-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem 2rem; }
@media (max-width: 900px) { .aops-kv-2 { grid-template-columns: minmax(0, 1fr); } }
.aops-headline { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.aops-headline h2 { font-size: 1.375rem; }
.aops-acts-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.aops-acts-row .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.aops-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.aops-money > div { padding: .75rem .9rem; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--line); }
.aops-money dt { font-size: .8125rem; color: var(--ink-3); }
.aops-money dd { font-size: 1.125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.aops-money .is-key { background: var(--accent-soft); border-color: var(--accent-soft); }

/* 이력(타임라인) */
.aops-log li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.aops-log li:last-child { border-bottom: 0; }
.aops-dot { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.aops-dot .ic { width: .9rem; height: .9rem; }
.aops-dot.is-admin { background: var(--accent-soft); color: var(--accent-ink); }
.aops-log b { font-size: .9375rem; }
.aops-log small { display: block; color: var(--ink-3); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.aops-log p { font-size: .9375rem; color: var(--ink-2); margin-top: 2px; }

/* 운영 메모 */
.aops-memos li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.aops-memos li:last-child { border-bottom: 0; }
.aops-memo-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: .8125rem; color: var(--ink-3); }
.aops-memo-head b { color: var(--ink); }
.aops-memos p { margin-top: .3rem; color: var(--ink); }

/* 시트(주소 있는 모달) */
.aops-who-box { display: flex; gap: .75rem; align-items: center; padding: .75rem .9rem; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--line); }
.aops-who-box > div:nth-child(2) { flex: 1; min-width: 0; }
.aops-who-box b { display: block; }
.aops-who-box small { display: block; color: var(--ink-3); font-size: .8125rem; }
.aops-who-st { flex: 0 0 auto; }
.aops-preview { padding: .85rem 1rem; border-radius: var(--r-sm); border: 1px dashed var(--line-strong); background: var(--surface-3); }
.aops-preview dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1rem; font-size: .9375rem; }
.aops-preview dt { color: var(--ink-3); }
.aops-preview dd { font-weight: 650; }
.aops-sheet .seg-opt { flex: 1 1 9rem; }
.aops-sheet .seg-opt span { min-height: 3rem; }
@media (max-width: 560px) {
  .aops-sheet .sheet-page { padding: 0; place-items: stretch; }
  .aops-sheet .sheet { border-radius: 0; min-height: calc(100vh - 3.5rem); width: 100%; }
  .aops-sheet .modal-foot { flex-direction: column-reverse; }
}
.aops-done { text-align: center; padding: 1rem .5rem; }
.aops-done .ico-box { margin: 0 auto .75rem; }

/* 폼 */
.aops-form-panel { padding: 1.25rem; }
.aops-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.25rem; }
@media (max-width: 760px) { .aops-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.aops-form-foot { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; padding-top: .5rem; }
@media (max-width: 560px) { .aops-form-foot .btn { flex: 1; } }
.aops-count { font-size: .8125rem; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.aops-summary-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: .85rem 1.1rem; }
.aops-summary-bar div { display: flex; flex-direction: column; gap: .1rem; min-width: 8rem; }
.aops-summary-bar dt { font-size: .8125rem; color: var(--ink-3); }
.aops-summary-bar dd { font-weight: 700; }
@media (max-width: 560px) { .aops-summary-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .aops-summary-bar div { min-width: 0; } }
fieldset.aops-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.aops-fs > legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.aops-inline-form { display: inline; }
.aops-ok { color: var(--ok); }
