/* 시스템 관리 페이지 (admin.html) — style.css의 색 · 버튼을 그대로 쓴다 */
html, body.admin { overflow: auto; height: auto; min-height: 100%; }
.admin-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 16px 48px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { font-size: 26px; letter-spacing: -0.4px; }
.admin-head p { margin: 4px 0 0; font-size: 14px; }
.admin-head-actions { display: flex; align-items: center; gap: 8px; }
.admin-head-actions a { text-decoration: none; }
.admin-state { padding: 40px 16px; text-align: center; color: var(--muted); background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); line-height: 1.7; }
.admin-state a { color: var(--accent); }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }

.admin-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.admin-tools input { flex: 1 1 200px; width: auto; }
.admin-tools select { flex: 0 0 auto; width: auto; }
.seg { display: inline-flex; background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--muted); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent); color: #2a1d10; font-weight: 700; }
.seg button small { opacity: .75; margin-left: 3px; font-variant-numeric: tabular-nums; }

.table-scroll { overflow-x: auto; background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 1100px; }
.admin-table th { position: sticky; top: 0; background: #2d2737; text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.025); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-table .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.admin-table .uid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--muted); user-select: all; }
.admin-table .none { color: var(--muted); }
.admin-table .rooms { max-width: 160px; }
.role { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.role.admin { background: rgba(242,166,90,0.18); color: var(--accent); }
.role.member { background: rgba(124,196,154,0.16); color: var(--ok); }
.role.guest { background: rgba(255,255,255,0.07); color: var(--muted); }
.online { color: var(--ok); font-weight: 600; white-space: nowrap; }
.online::before { content: '● '; }
.prune { color: var(--warn); }
.role-actions { display: flex; gap: 6px; white-space: nowrap; }
/* 관리 칸: 버튼 글자가 꺾이지 않게 (칸이 좁으면 다른 칸이 양보하고, 그래도 넘치면 표가 가로로 스크롤) */
.admin-table td:last-child, .admin-table td:last-child .btn { white-space: nowrap; }
.admin-foot { margin-top: 14px; line-height: 1.6; }

/* 탭 */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-tabs button { border: none; background: transparent; color: var(--muted); padding: 10px 14px; font-size: 15px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.admin-tabs button:hover { color: var(--text); }
.admin-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.admin-tabs .badge { position: static; }
.admin-table td.reported { color: var(--danger); font-weight: 700; }
.role.gone { background: rgba(255,255,255,0.05); color: var(--muted); font-weight: 500; }

/* 신고 */
.rp-list { display: grid; gap: 12px; }
.rp-card { background: var(--panel-solid); border: 1px solid var(--line); border-left: 4px solid var(--danger); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.rp-card.done { border-left-color: var(--ok); }
.rp-card.rejected { border-left-color: var(--muted); }
.rp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(226,103,91,0.18); color: var(--danger); }
.rp-status.done { background: rgba(124,196,154,0.16); color: var(--ok); }
.rp-status.rejected { background: rgba(255,255,255,0.07); color: var(--muted); }
.rp-reason { font-size: 15px; }
.rp-people { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.rp-person { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.rp-label { font-size: 12px; color: var(--muted); }
.rp-person .uid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--muted); user-select: all; }
.rp-arrow { color: var(--muted); }
.rp-card p { margin: 0; }
.rp-detail { white-space: pre-wrap; word-break: break-word; line-height: 1.6; background: rgba(0,0,0,0.18); border-radius: 10px; padding: 10px 12px; }
.rp-detail.none { color: var(--muted); }
.rp-files { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-file { width: 120px; height: 90px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; cursor: zoom-in; display: grid; place-items: center; }
.rp-file img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-chat summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.rp-chat ol { list-style: none; margin: 8px 0 0; padding: 8px 10px; background: rgba(0,0,0,0.18); border-radius: 10px; max-height: 260px; overflow-y: auto; font-size: 13px; display: grid; gap: 3px; }
.rp-chat li { display: flex; gap: 8px; align-items: baseline; }
.rp-chat li > span:last-child { word-break: break-word; }
.rp-chat .rp-time { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; flex: none; }
.rp-chat li b { flex: none; }
.rp-chat .rp-target { background: rgba(226,103,91,0.16); border-radius: 6px; padding: 1px 4px; margin: 0 -4px; }
.rp-chat .rp-system { color: var(--muted); font-style: italic; }
.rp-handle { display: grid; gap: 8px; }
.rp-memo { width: 100%; resize: vertical; font-size: 13px; }
.rp-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.rp-actions .muted { margin-right: auto; }
.rp-lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.85); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.rp-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* 의견: 기능 요청 · 버그 신고 (카드는 신고와 같은 모양) */
.fb-card { border-left-color: var(--accent); }
.fb-kind-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(242,166,90,0.16); color: var(--accent); white-space: nowrap; }
.fb-kind-tag.bug { background: rgba(226,103,91,0.16); color: var(--danger); }
.fb-env { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 12.5px; background: rgba(0,0,0,0.18); border-radius: 10px; padding: 8px 12px; }
.fb-env dt { color: var(--muted); }
.fb-env dd { margin: 0; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* 책 */
.bk-table { min-width: 980px; }
.bk-book { display: flex; gap: 10px; align-items: flex-start; min-width: 240px; max-width: 380px; }
.bk-thumb { flex: none; width: 38px; height: 55px; border-radius: 2px; object-fit: cover; background: #ddd; box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.4); }
.bk-thumb.blank { display: grid; place-items: center; background: #5b3a29; color: #f6ecd9; font-weight: 700; }
.bk-title { font-weight: 700; color: var(--text); text-decoration: none; }
a.bk-title:hover { text-decoration: underline; }
.bk-form { display: flex; gap: 6px; align-items: center; min-width: 320px; }
.bk-form input { flex: 1; min-width: 180px; padding: 6px 9px; font-size: 13px; }
.bk-msg { display: block; margin-top: 5px; font-size: 12px; }
.bk-msg.ok { color: var(--ok); }
.bk-msg.bad { color: var(--danger); }
