@import url("/notices/assets/notices.css");
/* 비밀번호 보기/숨기기 */
.pw-field {
  position: relative;
  display: block;
  width: 100%;
}
.pw-field input[type="password"],
.pw-field input[type="text"] {
  width: 100%;
  padding-right: 44px !important;
  box-sizing: border-box;
}
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pw-toggle:hover,
.pw-toggle.is-on {
  color: #b45309;
  background: #fff7ea;
}
.pw-toggle svg {
  display: block;
  pointer-events: none;
}

/* type scale: title 700 / subtitle 500 / text 400 */
* { letter-spacing: -0.03em; }
h1, h2, .store-edit-head h1 { font-weight: 700; letter-spacing: -0.03em; }
h3, .section-label, .field label, .hint, .lead, .photo-panel label.section-label { font-weight: 500; letter-spacing: -0.03em; }
p, input, textarea, select { font-weight: 400; letter-spacing: -0.03em; }


/* 헤더 로고타입 — 전 관리 페이지 공통 */
.brand .site-logo {
  height: 34px;
  width: auto;
  max-width: min(220px, 52vw);
  display: block;
  object-fit: contain;
}

/* ===== 공통 ===== */
.admin-shell { padding: 24px 0 70px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; font-weight: 500; font-size: 14px; cursor: pointer;
  font: inherit; text-decoration: none; color: inherit;
}
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-danger { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.btn-ghost { background: #fff; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.status-ok { color: #047857; font-weight: 500; font-size: 13px; }
.status-err { color: #be123c; font-weight: 500; font-size: 13px; }
.empty {
  padding: 48px 20px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 16px; background: #fff;
}
.badge {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px;
  border-radius: 999px; background: #fff4d6; color: #b45309; font-size: 11px; font-weight: 500;
}

/* ===== 로그인 ===== */
.login-box {
  max-width: 440px; margin: 48px auto;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: var(--shadow);
}
.login-box h2 { margin: 0 0 8px; letter-spacing: -0.03em; }
.login-box > p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.store-login-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.store-login-tabs button {
  flex: 1; min-height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  font: inherit; font-weight: 500; font-size: 13px; cursor: pointer; color: #92640a;
}
.store-login-tabs button.is-active {
  background: #1f2937; border-color: #1f2937; color: #fff;
}
.login-box .field { margin-bottom: 12px; }
.login-box label {
  display: block; font-size: 12px; font-weight: 500; color: #92640a; margin-bottom: 6px;
}
.login-box input {
  width: 100%; height: 46px; border: 1px solid var(--line);
  border-radius: 12px; padding: 0 12px; font: inherit; background: #fffcf7;
}
.login-box .err { color: #be123c; font-size: 13px; font-weight: 500; min-height: 18px; margin-bottom: 8px; }

/* ===== 목록 테이블 ===== */
.table {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow);
}
.row {
  display: grid;
  grid-template-columns: 64px minmax(0, 2.1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 1.6fr);
  gap: 14px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid #f1e8da;
}
.row.head {
  background: #fff7ea; font-size: 12px; font-weight: 600; color: #92640a;
  border-bottom: 1px solid var(--line); padding-top: 11px; padding-bottom: 11px;
  text-transform: none;
}
.row.head > div { text-align: center; }
.row.head > div:nth-child(2) { text-align: left; }
.row:not(.head) > div:nth-child(3),
.row:not(.head) > div:nth-child(4),
.row:not(.head) > div:nth-child(5) { text-align: center; }
.row:not(.head) > div:nth-child(3) > *,
.row:not(.head) > div:nth-child(4) > * { display: inline-block; }
.row:last-child { border-bottom: 0; }
.row:not(.head):nth-child(even) { background: #fffdf9; }
.row:hover:not(.head) { background: #fff3e0; }
.row .title { font-weight: 700; font-size: 14.5px; letter-spacing: -0.03em; line-height: 1.35; }
.row .sub { color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.4; }
.row img.thumb,
.row .thumb {
  width: 60px; height: 46px; object-fit: cover; border-radius: 9px; background: #f3efe6;
}
.row > div { min-width: 0; }
.ops {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
  justify-items: stretch;
}
.ops .btn,
.ops .btn-mini { min-height: 32px; padding: 0 8px; font-size: 11.5px; width: 100%; }
.ops .btn-danger { grid-column: 1 / -1; }

.mgr-cell { display: grid; gap: 6px; }
.mgr-ops { display: grid; gap: 4px; }
.btn-mini {
  min-height: 24px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 11px; font-weight: 500; cursor: pointer; color: #1f2937;
  white-space: nowrap;
}
.btn-mini:hover { background: #fff7ea; border-color: #f0d9a8; color: #92640a; }
.btn-mini.danger { color: #be123c; }
.btn-mini.danger:hover { background: #fff1f2; border-color: #fecdd3; }

.admin-filter-bar { display: grid; gap: 12px; margin-bottom: 6px; }
.admin-filter-bar input[type="search"] {
  width: 100%; max-width: 440px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px; padding: 0 14px;
  font: inherit; background: #fff;
}
.admin-cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: #6b7280;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.admin-cat-chip:hover { border-color: #f0c56a; color: #b45309; background: #fff7ea; }
.admin-cat-chip.is-active {
  background: var(--orange); border-color: var(--orange); color: #fff;
  box-shadow: 0 6px 14px rgba(240,160,0,.25);
}
.admin-cat-chip .chip-count {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px;
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.08);
}
.admin-cat-chip.is-active .chip-count { background: rgba(255,255,255,.28); }

.cat-badge {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 11px; font-weight: 500;
  background: #fff4d6; color: #b45309;
}
.cat-badge.cat-식당 { background: #fff1e8; color: #c2410c; }
.cat-badge.cat-카페 { background: #ecfdf5; color: #047857; }
.cat-badge.cat-생활·건강,
.cat-badge.cat-생활건강 { background: #eff6ff; color: #1d4ed8; }
.cat-badge.cat-뷰티 { background: #fdf2f8; color: #be185d; }
.cat-badge.cat-부동산 { background: #f5f3ff; color: #6d28d9; }
.cat-badge.cat-상점 { background: #f3f4f6; color: #374151; }

/* ===== 매장 편집 페이지: 정상 스크롤 ===== */
body.store-edit-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(240,160,0,.10), transparent 32%),
    var(--cream);
}
body.store-edit-page .topbar {
  position: sticky;
  top: 0;
  z-index: 40;
}
body.store-edit-page .admin-shell {
  padding: 20px 0 100px;
  max-width: 980px;
}

.store-edit-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.store-edit-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid #f1e8da;
  background: linear-gradient(180deg, #fffaf2 0%, #fff 100%);
}
.store-edit-head h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.03em;
}
.store-edit-head .lead {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.store-edit-body {
  padding: 20px 22px 8px;
  display: grid;
  gap: 18px;
}

.store-edit-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.photo-panel {
  background: #fffcf7;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  position: sticky;
  top: 84px;
}
.photo-panel label.section-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #92640a;
  margin-bottom: 10px;
}
.gallery-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
  margin-bottom: 10px;
}
.gallery-empty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  text-align: center;
  color: #b0a08a;
  font-size: 12px;
  font-weight: 500;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
}
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f3efe6;
  aspect-ratio: 1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-cover {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #f0a000;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.gallery-ops {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}
.g-btn {
  flex: 1;
  min-height: 26px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: #1f2937;
}
.g-btn.danger { color: #be123c; }
.photo-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.photo-actions .btn { width: 100%; }
.url-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}
.url-add-row input,
.video-field input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  background: #fff;
}
.video-field {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.video-field .section-label { margin-bottom: 8px; }

.fields-panel { min-width: 0; }
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}
.field label {
  font-size: 12px;
  font-weight: 500;
  color: #92640a;
}
.field input[type="text"],
.field input[type="password"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #f0a000;
  box-shadow: 0 0 0 3px rgba(240,160,0,.18);
}
.field textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.7;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-category-block {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #f0d9a8;
  background: #fffaf0;
  margin-bottom: 14px;
}
.field-category-block > label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #92640a;
  margin-bottom: 10px;
}
.category-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.category-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  margin: 0;
  transition: all .15s ease;
}
.category-radios input { position: absolute; opacity: 0; pointer-events: none; }
.category-radios label:has(input:checked),
.category-radios label.is-on {
  background: #f0a000;
  border-color: #f0a000;
  color: #fff;
  box-shadow: 0 6px 14px rgba(240,160,0,.22);
}

.manager-box {
  margin-top: 4px;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed #e8c98a;
  background: linear-gradient(180deg, #fffaf0, #fff);
}
.manager-box h3 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.03em;
}
.manager-box .hint { margin: 0 0 12px; }

.store-edit-footer {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: 8px;
  padding: 14px 22px;
  border-top: 1px solid #f1e8da;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.store-edit-footer .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#msg.store-msg {
  min-height: 18px;
  margin: 0;
}

/* 소식 / 메뉴 / SNS 관리 섹션 */
.ext-section {
  padding: 18px 22px;
  border-top: 1px solid #f1e8da;
}
.ext-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.ext-section h3 .hint {
  font-size: 12px;
  font-weight: 400;
  color: #9ca3af;
  margin-left: 6px;
}
.ext-list {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.ext-item {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr 32px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffcf7;
}
.ext-item-photo {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3efe6;
  border: 1px solid var(--line);
}
.ext-item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ext-item-ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #b8a888;
  text-align: center;
}
.ext-upload-btn {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  min-height: 24px;
  border-radius: 0;
  font-size: 11px;
  background: rgba(0,0,0,.55);
  color: #fff;
  text-align: center;
  padding: 4px 0;
}
.ext-item-fields { min-width: 0; }
.ext-item-fields .field { margin-bottom: 8px; }
.ext-item-fields .field:last-child { margin-bottom: 0; }
.ext-item-fields textarea { min-height: 60px; }
.ext-del {
  align-self: start;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 실시간 예약시스템 */
.resv-mode-radios { margin-bottom: 4px; }
.resv-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed #e8c98a;
  background: linear-gradient(180deg, #fffaf0, #fff);
}
.resv-panel .btn { margin-top: 4px; }

/* 예약 현황 관리 페이지 */
.resv-row {
  grid-template-columns: 84px minmax(0,1fr) 130px 64px minmax(0,1.2fr) 72px 190px;
}
.badge.st-pending { background: #fff4d6; color: #b45309; }
.badge.st-confirmed { background: #ecfdf5; color: #047857; }
.badge.st-cancelled { background: #fff1f2; color: #be123c; }
@media (max-width: 860px) {
  .resv-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .resv-row.head { display: none; }
  .resv-row > :nth-child(3),
  .resv-row > :nth-child(4),
  .resv-row > :nth-child(5),
  .resv-row > :nth-child(6) {
    display: none;
  }
  .resv-row > :nth-child(7) {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
.sns-field-label {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.sns-field-label svg { display: block; flex: 0 0 auto; }
@media (max-width: 640px) {
  .ext-item {
    grid-template-columns: 72px 1fr 28px;
  }
  .ext-item-photo { width: 72px; height: 72px; }
  .field-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .store-edit-layout {
    grid-template-columns: 1fr;
  }
  .photo-panel {
    position: static;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }
  .row.head { display: none; }
  .row > :nth-child(3),
  .row > :nth-child(4),
  .row > :nth-child(5) {
    display: none;
  }
  .row > :nth-child(6) {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
