/* gacha.on 관리자 — Sneat(core.css·theme-default.css) 위에 얹는 커스텀 오버레이.
   룩은 전부 Sneat 클래스가 담당한다. 여기는 한글 폰트·대시보드 v2 조각·모달/토스트·도메인 위젯만. */

/* 한글 본문 = Pretendard 폴백 (Public Sans는 숫자·영문용으로 유지) */
body {
  font-family: "Public Sans", "Pretendard Variable", Pretendard, "Malgun Gothic",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── 대시보드 v2 조각 (kiosk-jsp-admin templates/dashboard_v2.md 표준) ── */
.kpi-icon {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border-radius: .5rem; font-size: 1.4rem; flex: 0 0 auto;
}
.kpi-num { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: #566a7f; }
.card-title-sm { font-size: .95rem; font-weight: 600; margin: 0; }
.summary-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid #f0f0f2; }
.summary-item:last-child { border-bottom: 0; }

/* 일자표 — 스크롤 + 헤더/합계 고정 */
.day-table { max-height: 220px; overflow: auto; }
.day-table thead th { position: sticky; top: 0; z-index: 1; }
.day-table tfoot td { position: sticky; bottom: 0; }

/* 저장 대기(수정됨) 버튼 상태 */
.btn.btn-dirty { background: #ffab00; border-color: #ffab00; color: #fff; }

/* 구조 데이터(JSON)·고급 옵션 접기 */
details.json-edit summary, details.adv summary { font-size: 12px; color: #a1acb8; cursor: pointer; padding: 4px 0; user-select: none; }
details.json-edit summary:hover, details.adv summary:hover { color: #696cff; }
details.json-edit textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; min-height: 160px; }
details.adv { border-top: 1px dashed #e7e7e8; margin-top: .75rem; padding-top: .5rem; }

/* 썸네일 */
.adm-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; background: #eceef1; display: inline-block; }
.adm-thumb-lg { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; background: #eceef1; }
.adm-thumb-logo { max-width: 160px; max-height: 64px; object-fit: contain; border-radius: 6px; background: #eceef1; padding: 4px; }

/* 이미지 업로드 드롭존 — 클릭 · 드래그 · Ctrl+V */
.adm-drop {
  border: 2px dashed #d9dee3; border-radius: .5rem; padding: 14px 12px; text-align: center;
  color: #697a8d; cursor: pointer; background: #fff; font-size: 13px;
  transition: border-color .15s, background .15s;
}
.adm-drop:hover, .adm-drop:focus-visible, .adm-drop.drag { border-color: #696cff; background: #f4f4ff; outline: none; }
.adm-drop i { font-size: 26px; color: #a1acb8; display: block; margin-bottom: 4px; transition: color .15s; }
.adm-drop:hover i, .adm-drop.drag i { color: #696cff; }
.adm-drop small { display: block; margin-top: 3px; }

/* 모달 (Bootstrap .modal 과 충돌 방지용 자체 오버레이) */
.adm-modal {
  position: fixed; inset: 0; background: rgba(50, 71, 92, .5); z-index: 1090;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.adm-modal-box { width: 600px; max-width: 100%; }
.adm-modal-box.wide { width: 760px; }
.adm-modal-box.narrow { width: 420px; }
#confirm-root .adm-modal { z-index: 1095; align-items: center; }

/* 토스트 (Bootstrap .toast 와 충돌 방지) */
.adm-toast {
  position: fixed; bottom: 24px; right: 24px; background: #566a7f; color: #fff;
  padding: 12px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  font-size: 13px; z-index: 1100; opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 48px);
}
.adm-toast.show { opacity: 1; transform: none; }
.adm-toast.err { background: #ff3e1d; }

/* 상단 사용자 배지 — 아이디는 입력한 대소문자 그대로 (Sneat .badge 의 uppercase 해제) */
#nav-user { text-transform: none; letter-spacing: 0; }

/* 로그인 (login.html) */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: #f5f5f9; }
.login-box { width: 400px; max-width: 100%; }

/* ── 도메인 위젯 ─────────────────────────────────────────── */
/* 온라인 점 */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d9dee3; vertical-align: middle; }
.dot.on { background: #71dd37; box-shadow: 0 0 0 3px rgba(113, 221, 55, .25); }
.dot.off { background: #c9ced6; }
.dot.unknown { background: #ffab00; }

/* 색상 필드 — <input type=color> + hex 텍스트 */
.color-field .form-control-color { width: 36px; min-width: 36px; padding: 2px; }
.color-field input[type=text] { font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; min-width: 84px; padding-left: .4rem; padding-right: .3rem; }

/* 넓은 목록표 — 폰에서 셀을 세로로 쥐어짜지 않고 .table-responsive 안에서 가로 스크롤 */
.adm-nowrap th, .adm-nowrap td { white-space: nowrap; }
.color-field.is-invalid input[type=text] { border-color: #ff3e1d; }

/* 플레이어 컬러 칩 */
.chip { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); vertical-align: middle; }

/* 스킨 미니 프리뷰 */
.skin-prev { border-radius: .5rem; padding: 12px; background-size: cover; background-position: center; border: 1px solid #e7e7e8; }
.skin-prev-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 700; letter-spacing: .04em; }
.skin-prev-head img { max-height: 28px; max-width: 90px; object-fit: contain; }
.skin-prev-box { position: relative; height: 180px; border-radius: 6px; overflow: hidden; }
.skin-prev-box.grid { background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 18px), repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 1px, transparent 1px 18px); }
.skin-prev-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; }
.skin-prev-ball { position: absolute; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset -4px -4px 6px rgba(0,0,0,.18), inset 3px 3px 5px rgba(255,255,255,.55); }
.skin-prev-ball.metal { background-image: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,0) 45%, rgba(0,0,0,.25)); }
.skin-prev-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

/* 키오스크 라이브 패널 */
.live-player { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f0f0f2; font-size: 13px; }
.live-player:last-child { border-bottom: 0; }

/* 교환권 사용 처리 — 현장 스태프 폰 화면 */
.voucher-input { font-size: 1.5rem; letter-spacing: .12em; text-transform: uppercase; font-family: ui-monospace, Consolas, monospace; text-align: center; height: 3.4rem; }
.voucher-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.6rem; letter-spacing: .1em; font-weight: 700; }
.voucher-result .btn-lg { font-size: 1.15rem; padding: .9rem 1rem; }
@media (max-width: 575.98px) {
  .container-p-y { padding-top: .75rem !important; }
  .voucher-input { font-size: 1.3rem; }
}

/* 스킨 편집 카드 소제목 · 아주 작은 아이콘 버튼 */
h6.sk-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #a1acb8; font-weight: 700; margin-bottom: .5rem; }
.btn.btn-xs { padding: .15rem .35rem; line-height: 1; }

/* 표 행 선택 강조 */
tr.row-sel > td { background: #f4f4ff !important; }
tr[data-row] { cursor: pointer; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.w-num { width: 96px; }
