/* 관리자 화면 — admin.css (수상한 거리 2호점) */
:root {
  --bg: #111; --bg-2: #181818; --bg-3: #202020; --line: #2e2e2e; --line-soft: #242424;
  --text: #f2f2f2; --text-2: #b9b9b9; --text-3: #7c7c7c;
  --accent: #fff; --accent-text: #fff;
  --ok: #5ad48e; --danger: #ff6b6b;
  --font-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.6; word-break: keep-all; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 4px; border: 1px solid transparent; font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer; white-space: nowrap; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #e6e6e6; }
.btn-primary:disabled { opacity: .5; cursor: wait; }
.btn-ghost { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.25); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255,255,255,.6); }
.btn-danger { background: none; border-color: transparent; color: var(--danger); padding: 6px 10px; font-weight: 500; }
.btn-danger:hover { background: rgba(255,107,107,.1); }
.icon-btn { background: var(--bg); border: 1px solid var(--line); color: var(--text-2); width: 32px; height: 32px; border-radius: 4px; cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--text-3); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: #000; }
.login-card { width: 100%; max-width: 380px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 32px 28px; display: grid; gap: 14px; }
.login-card img { height: 40px; width: auto; margin-bottom: 4px; }
.login-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.login-card .btn { margin-top: 6px; }
.login-card .back { font-size: 13px; color: var(--text-3); text-align: center; }
.msg { font-size: 13.5px; color: var(--danger); min-height: 1.2em; }

/* 필드 */
.field { display: grid; gap: 5px; }
.field > span { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field input, .field textarea, .inline-form input, .card input, .card textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 9px 11px; color: var(--text); transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .inline-form input:focus, .card input:focus, .card textarea:focus { border-color: #fff; outline: none; }
textarea { resize: vertical; }
.row-btn { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }

/* 레이아웃 */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(16px, 3vw, 28px); height: 60px; background: rgba(0,0,0,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-left img { height: 26px; width: auto; }
.topbar-title { font-weight: 700; font-size: 15px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.who { font-size: 13px; color: var(--text-3); }

.layout { display: grid; grid-template-columns: 200px 1fr; min-height: calc(100vh - 60px); }
.tabs { border-right: 1px solid var(--line-soft); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--bg-2); }
.tab { text-align: left; background: none; border: 0; padding: 11px 14px; border-radius: 6px; color: var(--text-2); cursor: pointer; font-weight: 500; }
.tab:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tab.active { background: #fff; color: #000; font-weight: 700; }
.panel { padding: clamp(20px, 3vw, 36px); max-width: 1080px; width: 100%; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pane-head h2 { font-size: 22px; font-weight: 700; }
.pane-foot { margin-top: 24px; display: flex; justify-content: flex-end; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { color: var(--text-3); font-size: 13.5px; margin-bottom: 18px; max-width: 70ch; }
.sub-h { font-size: 16px; font-weight: 700; margin: 30px 0 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sub-h small { font-size: 12.5px; color: var(--text-3); font-weight: 400; }

.grid-form { display: grid; gap: 22px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 18px 18px 20px; display: grid; gap: 14px; margin: 0; background: var(--bg-2); }
legend { padding: 0 8px; font-size: 13px; font-weight: 700; color: var(--text-2); letter-spacing: .04em; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* 썸네일 */
.thumb { width: 100%; max-width: 320px; aspect-ratio: 3/2; object-fit: cover; border-radius: 4px; background: var(--bg-3); border: 1px solid var(--line); }
.thumb.wide { aspect-ratio: 16/9; }
.thumb.logo-thumb { object-fit: contain; background: #000; padding: 12px; }
.thumb-wrap { display: grid; gap: 8px; justify-items: start; }
.upload-btn { cursor: pointer; }

/* 카드 리스트 (대관 안내 항목) */
.list { display: grid; gap: 10px; }
.card { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: start; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.card .no { font-size: 12px; color: var(--text-3); padding-top: 10px; font-weight: 700; }
.card .fields { display: grid; gap: 10px; }
.card .ctrl { display: flex; flex-direction: column; gap: 4px; }
.card .img-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.card .img-row img { height: 56px; width: auto; border: 1px solid var(--line); border-radius: 4px; }

/* 사진 관리 */
.photo-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.photo-admin li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: grid; }
.photo-admin img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-admin .pbody { padding: 10px; display: grid; gap: 8px; }
.photo-admin .pbody input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 7px 9px; color: var(--text); }
.photo-admin .prow { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.progress { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }

/* 문의 게시판 */
.inq-list { display: grid; gap: 10px; }
.inq { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: grid; gap: 10px; }
.inq.answered { border-color: rgba(90,212,142,.35); }
.inq-top { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--text-2); }
.inq-top .t { font-size: 16px; font-weight: 700; color: var(--text); flex-basis: 100%; }
.inq-top .mono { font-size: 12.5px; color: var(--text-3); }
.inq-body { white-space: pre-wrap; color: var(--text-2); font-size: 14.5px; line-height: 1.6; padding: 10px 12px; background: var(--bg); border-radius: 4px; }
.inq-answer { display: grid; gap: 8px; }
.inq-answer textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 9px 11px; color: var(--text); min-height: 80px; }
.inq-answer textarea:focus { border-color: #fff; outline: none; }
.inq-actions { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-3); margin-left: 8px; vertical-align: middle; }
.badge.on { color: var(--ok); border-color: rgba(90,212,142,.4); }

/* 관리자 */
.inline-form { display: flex; gap: 8px; max-width: 480px; margin-bottom: 16px; }
.admin-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 6px; font-size: 13.5px; }

/* 토스트 */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff; color: #111; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 100; max-width: calc(100% - 32px); }
.toast.err { background: var(--danger); color: #fff; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 8px 12px; gap: 2px; }
  .tab { white-space: nowrap; padding: 9px 12px; font-size: 14px; }
  .row2, .row3, .row-btn { grid-template-columns: 1fr; }
  .card { grid-template-columns: 1fr; }
  .card .ctrl { flex-direction: row; }
  .who { display: none; }
}
