/* ==========================================================================
   관리자 [게임관리] — 여섯 화면 공용 (10단계)
   docs/학습게임_기획/18_상세설계_기록저장과_코인.md §8
   ========================================================================== */

.gm-devnote {
    background: #fff8dc;
    border-left: 3px solid #f0ad4e;
    padding: 9px 14px;
    font-size: 13px;
    color: #765a14;
    border-radius: 4px;
    margin-bottom: 14px;
}
.gm-devnote i { margin-right: 4px; }

/* 여섯 화면을 오가는 줄 — 사이드바를 매번 펼치지 않게 */
.gm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.gm-tabs .gm-tab {
    padding: 7px 14px;
    border: 1px solid #dfe3ea;
    border-radius: 18px;
    background: #fff;
    color: #4a5568;
    font-size: 13px;
    text-decoration: none;
}
.gm-tabs .gm-tab:hover { background: #edf2f7; border-color: #4a90e2; color: #2b6cb0; }
.gm-tabs .gm-tab.on { background: #4a90e2; border-color: #4a90e2; color: #fff; font-weight: 600; }
/* 사용 설명서 — 탭 줄 오른쪽 끝 */
.gm-tabs .gm-manual {
    margin-left: auto;
    padding: 7px 14px;
    border-radius: 18px;
    background: #5a4ad1;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.gm-tabs .gm-manual:hover { background: #4a3cb8; color: #fff; }

.gm-app { padding-bottom: 40px; }
.gm-loading, .gm-empty { color: #718096; text-align: center; padding: 30px; }
.gm-err {
    background: #fff5f5; border: 1px solid #feb2b2; color: #9b2c2c;
    padding: 12px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px;
}

/* 카드 */
.gm-card {
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.gm-card > h5 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}
.gm-card > h5 .gm-hint { font-weight: 400; font-size: 12px; color: #888; margin-left: 6px; }

/* 숫자 요약 */
.gm-kpis { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.gm-kpi {
    flex: 1 1 150px;
    background: #fff; border: 1px solid #e3e6ec; border-radius: 8px;
    padding: 14px 16px;
}
.gm-kpi span { display: block; font-size: 12px; color: #718096; }
.gm-kpi b { font-size: 22px; color: #2d3748; }

/* 표 */
.gm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gm-table th, .gm-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    vertical-align: middle;
}
.gm-table th { background: #f8f9fb; color: #4a5568; font-weight: 600; white-space: nowrap; }
.gm-table td.gm-r, .gm-table th.gm-r { text-align: right; }
.gm-table td.gm-c, .gm-table th.gm-c { text-align: center; }
.gm-table tr.gm-off td { color: #a0aec0; text-decoration: line-through; }
.gm-table tr.gm-warn td { background: #fffaf0; }
.gm-scroll { overflow-x: auto; }

.gm-tag {
    display: inline-block; padding: 1px 7px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
}
.gm-tag.ok   { background: #e6fffa; color: #22705f; }
.gm-tag.no   { background: #edf2f7; color: #718096; }
.gm-tag.warn { background: #fffaf0; color: #975a16; }
.gm-tag.bad  { background: #fff5f5; color: #9b2c2c; }

.gm-form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.gm-form-row label { font-size: 12px; color: #4a5568; display: block; margin-bottom: 3px; }
.gm-form-row input, .gm-form-row select { min-width: 130px; }

.gm-num { width: 92px; }
.gm-money { font-variant-numeric: tabular-nums; }
.gm-dim { color: #a0aec0; font-size: 12px; }
.gm-plus { color: #1a7f37; font-weight: 600; }
.gm-minus { color: #c62828; font-weight: 600; }

/* 설정 화면 */
.gm-cfg-group { margin-bottom: 20px; }
.gm-cfg-group > h6 { font-size: 13px; color: #2b6cb0; font-weight: 700; margin-bottom: 8px; }
.gm-cfg-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.gm-cfg-row .gm-cfg-label { flex: 1; font-size: 13px; color: #2d3748; }
.gm-cfg-row .gm-cfg-def { font-size: 11px; color: #a0aec0; width: 120px; }
.gm-cfg-row input[type="number"] { width: 110px; }
.gm-locked { background: #f7f7f7; color: #999; }

/* ── 방 꾸미기 아이템 (items.js) ─────────────────────────────────── */
.gi-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.gi-chip {
    display: flex; flex-direction: column; align-items: flex-start; min-width: 150px; padding: 10px 16px;
    background: #fff; border: 1px solid #e3e6ec; border-radius: 10px; cursor: pointer; text-align: left;
    transition: border-color .15s, box-shadow .15s;
}
.gi-chip:hover { border-color: #4a90e2; box-shadow: 0 2px 8px rgba(74, 144, 226, .15); }
.gi-chip span { font-size: 12px; color: #718096; }
.gi-chip b { font-size: 22px; color: #2d3748; line-height: 1.2; }

.gi-filter { padding: 12px 16px; }
.gi-filter__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.gi-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 130px; }
.gi-field > span { font-size: 12px; font-weight: 600; color: #4a5568; }
.gi-field--grow { flex: 1 1 220px; }

.gi-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gi-bar__count { font-size: 14px; color: #2d3748; }
.gi-bar__sp { flex: 1 1 auto; }
.gi-size { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: #4a5568; }
.gi-size select { width: auto; }

.gi-table { margin-bottom: 8px; font-size: 14px; }
.gi-table thead th { background: #f8f9fb; color: #4a5568; font-weight: 600; white-space: nowrap; border-bottom-width: 1px; }
.gi-table td { padding-top: 8px; padding-bottom: 8px; }
.gi-col-check { width: 36px; }
.gi-col-check .form-check-input { width: 18px; height: 18px; cursor: pointer; }
.gi-col-thumb { width: 96px; text-align: center; }
.gi-sort { cursor: pointer; user-select: none; }
.gi-sort i { font-size: 11px; color: #a0aec0; }
.gi-sort:hover { color: #2b6cb0; }
.gi-sort.is-on { color: #2b6cb0; }
.gi-sort.is-on i { color: #2b6cb0; }
.gi-name { font-weight: 600; color: #2d3748; }
.gi-kind { background: #edf2f7; color: #4a5568; font-weight: 600; }
.gi-pages { margin-top: 6px; }

.gi-thumb { width: 64px; height: 64px; object-fit: contain; display: inline-block; vertical-align: middle; background: #f6f7fa; border-radius: 8px; }
.gi-thumb--wide { width: 88px; object-fit: cover; }
.gi-thumb--swatch { width: 64px; height: 36px; border: 1px solid #e2e8f0; }
.gi-thumb--big { width: 96px; height: 96px; }
.gi-thumb--big.gi-thumb--wide { width: 140px; }
.gi-thumb--broken { background: repeating-linear-gradient(45deg, #f6f7fa, #f6f7fa 6px, #eceff4 6px, #eceff4 12px); }

/* 수정 창 */
.gi-edit-head { display: flex; gap: 14px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #edf2f7; }
.gi-sec { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: #2d3748; }
.gi-form-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gi-switch { display: flex; align-items: center; gap: 8px; min-width: 150px; margin: 0; padding-left: 0; }
.gi-switch .form-check-input { width: 2.6em; height: 1.4em; margin: 0; float: none; cursor: pointer; }
.gi-switch .form-check-label { font-size: 14px; cursor: pointer; }
.gi-price { width: 170px; }
.gi-ym { width: auto; }
.gi-choice .btn { min-width: 84px; }

/* ── 목록 부품 공용 (common.js sizeSelect · pager · sortTh · switchHtml) ── */
.gx-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.gx-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 130px; }
.gx-field > span { font-size: 12px; font-weight: 600; color: #4a5568; }
.gx-field--grow { flex: 1 1 220px; }
.gx-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gx-bar__sp { flex: 1 1 auto; }
.gx-size { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: #4a5568; }
.gx-size select { width: auto; }
.gx-pages { margin-top: 8px; }
.gx-table { margin-bottom: 8px; font-size: 14px; }
.gx-table thead th { background: #f8f9fb; color: #4a5568; font-weight: 600; white-space: nowrap; border-bottom-width: 1px; }
.gx-sort { cursor: pointer; user-select: none; }
.gx-sort i { font-size: 11px; color: #a0aec0; }
.gx-sort:hover, .gx-sort.is-on, .gx-sort.is-on i { color: #2b6cb0; }
.gx-switch { display: flex; align-items: center; gap: 8px; margin: 0; padding-left: 0; }
.gx-switch .form-check-input { width: 2.6em; height: 1.4em; margin: 0; float: none; cursor: pointer; }
.gx-switch .form-check-label { font-size: 14px; cursor: pointer; }
.gx-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.gx-sec { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: #2d3748; }
.gx-help { font-size: 12px; color: #718096; margin-top: 4px; }
.gx-num { width: 140px; }

.gx-table tr.gg-first td { border-top: 2px solid #e2e8f0; }

/* ── 코인 설정 (config.js) ── */
.cf-row { display: grid; grid-template-columns: minmax(220px, 1fr) 150px 190px; gap: 16px; align-items: center; padding: 12px 10px; border-top: 1px solid #edf2f7; border-radius: 6px; }
.gm-card > h5 + .cf-row { border-top: 0; }
.cf-row.is-changed, .cf-eval tr.is-changed td { background: #fff8e1; }
.cf-row--block { grid-template-columns: 1fr; }
.cf-name { font-weight: 600; color: #2d3748; font-size: 14px; }
.cf-default { font-size: 12px; color: #4a5568; }
.cf-input { display: flex; justify-content: flex-end; }
.cf-eval { max-width: 640px; }
.cf-eval th { font-size: 12px; color: #4a5568; background: #f8f9fb; }
.cf-range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cf-range span { color: #718096; font-size: 12px; }
.cf-cut { width: 110px; }
.cf-coin { width: 130px; margin-left: auto; }
.cf-savebar {
    position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
    background: #fff; border: 1px solid #e3e6ec; border-radius: 10px; padding: 10px 16px; box-shadow: 0 -4px 14px rgba(0,0,0,.06);
}
.cf-savebar span { margin-right: auto; color: #718096; }
.cf-savebar.is-on { border-color: #f6c343; background: #fffdf5; }
.cf-savebar.is-on span { color: #975a16; }
@media (max-width: 900px) { .cf-row { grid-template-columns: 1fr; } .cf-input { justify-content: flex-start; } }

/* 순위 관리 */
.rk-flag { border-color: #f6c343; }
.rk-flag h5 { color: #975a16; }

/* 게임 현황 (stats.js) */
.st-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 18px; }
.st-bar-col { flex: 1 1 0; max-width: 56px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 4px; }
.st-bar { width: 100%; background: #4a90e2; border-radius: 4px 4px 0 0; }
.st-val { font-size: 11px; color: #2d3748; margin-bottom: 2px; }
.st-day { font-size: 11px; color: #718096; margin-top: 4px; white-space: nowrap; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.st-grid > .gm-card { margin-bottom: 0; }
