.admin { max-width: 960px; margin: 0 auto; padding: 32px 16px 64px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; font-size: 14px; }
.admin-head a { color: var(--muted); }
.admin-logo { font-weight: 700; font-size: 18px; color: var(--text) !important; text-decoration: none; }
.admin h1 { font-size: 22px; margin: 0; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.flash { padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }

.btn { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-danger { color: #c0392b; }

.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.rows li { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows img, .rows .noimg { width: 96px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 6px; background: var(--thumb); display: block; }
.rows .meta { min-width: 0; }
.rows .meta strong { display: block; }
.rows .meta small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .actions { display: flex; gap: 6px; align-items: center; }
.rows .clicks { font-size: 13px; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.rows form { margin: 0; }

.form { display: grid; gap: 16px; max-width: 640px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form small { font-weight: 400; color: var(--muted); }
.form input:not([type=submit]):not([type=checkbox]):not([type=file]), .form textarea { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
.form .errors { color: #c0392b; font-size: 14px; margin: 0; padding-left: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.rows .by { font-weight: 400; font-size: 13px; color: var(--accent); }
.form select { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.rows-pending { border-color: var(--accent); }
.gap { height: 32px; }
.form .buttons { display: flex; gap: 8px; }

@media (max-width: 560px) {
  .rows li { grid-template-columns: 72px 1fr; }
  .rows img, .rows .noimg { width: 72px; }
  .rows .actions { grid-column: 1 / -1; justify-content: flex-end; }
}

.bar-actions { display: flex; gap: 8px; }
.share { margin-bottom: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.share[hidden] { display: none; }
.share textarea { width: 100%; font: inherit; font-size: 14px; line-height: 1.7; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); resize: vertical; }
.share-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; }
.share-count { font-size: 13px; color: var(--muted); }
.share-count.over { color: #c0392b; font-weight: 600; }

.i18n { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 14px; }
.i18n-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.i18n-tabs button { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.i18n-tabs button.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.i18n-tabs .dot { color: #2f9e5b; font-size: 9px; vertical-align: middle; }
.i18n-panel { display: grid; gap: 14px; }
.i18n-panel[hidden] { display: none; }

.langstats { list-style: none; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 8px; }
.langstats li { display: grid; grid-template-columns: 70px 1fr 110px; gap: 10px; align-items: center; font-size: 13px; }
.langstats .lang { font-family: ui-monospace, monospace; }
.langstats .bar { height: 8px; border-radius: 4px; background: var(--thumb); overflow: hidden; }
.langstats .bar span { display: block; height: 100%; background: var(--accent); }
.langstats .num { text-align: right; color: var(--muted); white-space: nowrap; }
.langstats .num b { color: var(--text); font-weight: 600; }
.langstats .num small { margin-left: 6px; font-size: 12px; }
.hint { font-size: 12px; color: var(--muted); }

.image-field { display: grid; gap: 12px; }
.field-label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.image-preview { position: relative; max-width: 420px; aspect-ratio: 1200 / 630; border-radius: 12px; overflow: hidden; background: var(--thumb); border: 1px solid var(--line); }
.image-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.image-source:empty { display: none; }
.image-source { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(20, 18, 16, .65); color: #fff; font-size: 11px; }
.image-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.image-actions .btn { position: relative; }
.check { display: inline-flex !important; grid: none; align-items: center; gap: 6px; font-weight: 400 !important; font-size: 13px !important; color: var(--muted); }
.form .sub { font-weight: 400; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.form .buttons .btn-primary { padding: 10px 22px; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; text-decoration: none; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; vertical-align: 2px; }
.tag-ok { color: var(--muted); border: 1px solid var(--line); }
.tag-warn { color: #c0392b; border: 1px solid currentColor; }
.rows .dupe { color: #c0392b; }

.rows-requests li { grid-template-columns: 56px 1fr auto; align-items: start; }
.rows .kind { display: inline-block; padding: 3px 0; border-radius: 6px; font-size: 12px; font-weight: 700; text-align: center; border: 1px solid currentColor; }
.rows .kind-edit { color: var(--accent); }
.rows .kind-delete { color: #c0392b; }
.rows .req-body { margin: 4px 0 6px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rows .meta small.match, .rows .match { color: #2f9e5b; margin-left: 6px; }
.rows .nomatch { color: var(--muted); margin-left: 6px; }
.rows-requests .meta small { white-space: normal; }
.done-requests summary { cursor: pointer; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.done-requests .rows { opacity: .75; }
.rows .meta small.cert-hint { white-space: normal; color: #c0392b; }

.search-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 8px; }
.search-stats section { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.search-stats h2 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.search-stats ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.search-stats li { display: flex; justify-content: space-between; gap: 8px; }
.search-stats .term { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-stats .num { color: var(--muted); font-size: 12px; white-space: nowrap; }
.search-stats .zero { color: #c0392b; }
.chat-rows li { grid-template-columns: 1fr auto; }

/* 채팅 일별 통계 */
.chat-stats { overflow-x: auto; margin: 4px 0 6px; }
.chat-stats table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.chat-stats th, .chat-stats td { padding: 7px 10px; border-bottom: 1px solid var(--line, #e5e5e5); text-align: right; white-space: nowrap; }
.chat-stats th:first-child, .chat-stats td:first-child { text-align: left; }
.chat-stats th { font-weight: 600; color: var(--muted, #777); }
.chat-stats tr.today td { font-weight: 600; }
.chat-stats tfoot td { font-weight: 600; border-bottom: 0; }

/* 자동 번역 상태 */
.translate-box { margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line, #ddd); border-radius: 10px; font-size: 14px; }
.translate-box p { margin: 0 0 6px; }
.translate-hint { color: var(--muted, #777); font-size: 13px; }
.translate-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.translate-actions form { margin: 0; }
.flash-alert { color: #c0392b; }
