/* ================================
   호수카 백오피스 공통 스타일
   ================================ */
:root {
  --navy: #14213d;
  --navy-2: #1f3a5f;
  --accent: #ff7a1a;
  --line: #e5e8ef;
  --bg: #f4f6fb;
  --text: #1f2733;
  --muted: #6b7280;
  --ok: #16a34a;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--navy-2); }

/* ----- 상단바 ----- */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--navy);
  color: #fff;
  padding: 0 24px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.tb__brand { font-weight: 900; font-size: 18px; }
.tb__brand span { font-weight: 400; opacity: 0.7; font-size: 13px; }
.tb__nav { display: flex; gap: 4px; margin-left: 8px; }
.tb__nav a {
  color: #cdd5e4;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
}
.tb__nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.tb__nav a.is-active { background: var(--accent); color: #fff; font-weight: 700; }
.tb__user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tb__badge {
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
}
.tb__badge--admin { background: var(--accent); }
.tb__badge--agency1, .tb__badge--agency2 { background: #2563eb; }
.tb__badge--user { background: #6b7280; }
.tb__logout {
  background: rgba(255,255,255,.12); color:#fff; border:0; border-radius:8px;
  padding:7px 12px; cursor:pointer; font-size:13px;
}
.tb__logout:hover { background: rgba(255,255,255,.22); }

/* ----- 레이아웃 ----- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { margin: 0 0 6px; font-size: 24px; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; margin-bottom: 20px;
}
.card > h2 { margin: 0 0 16px; font-size: 17px; }

/* ----- 통계 칩 ----- */
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; min-width: 120px;
}
.stat b { display: block; font-size: 24px; color: var(--navy); }
.stat span { font-size: 13px; color: var(--muted); }

/* ----- 테이블 ----- */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
}
.toolbar input[type="search"] { flex: 1; min-width: 200px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f8fafc; font-weight: 700; color: #374151; }
tbody tr:hover { background: #fafbff; }
.mono { font-variant-numeric: tabular-nums; color: #374151; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.rolepill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; display: inline-block; }
.rolepill--admin { background: var(--accent); }
.rolepill--agency1, .rolepill--agency2 { background: #2563eb; }
.rolepill--user { background: #6b7280; }

/* ----- 폼 ----- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 14px; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 120px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ----- 버튼 ----- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 0; border-radius: 9px; padding: 11px 18px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; text-decoration: none;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { filter: brightness(0.95); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--ghost { background: #eef1f7; color: var(--text); }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: #fee2e2; color: var(--danger); border: 0; border-radius: 7px; padding: 6px 11px; cursor: pointer; font-size: 13px; font-weight: 700; }
.btn-danger:hover { background: #fecaca; }

/* ----- 탭 ----- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 18px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--muted);
}
.tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ----- 미리보기 ----- */
.previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.previews img, .previews video {
  width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line);
}
.spec {
  background: #eef4ff; border: 1px dashed #b9ccf0; color: #1e40af;
  border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px;
}

.msg { padding: 11px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 14px; display: none; }
.msg.show { display: block; }
.msg--ok { background: #dcfce7; color: #166534; }
.msg--err { background: #fee2e2; color: #991b1b; }

/* ----- 콘텐츠 카드 목록 ----- */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.post {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
}
.post__thumb { width: 100%; height: 150px; object-fit: cover; background: #eef1f7; display: block; }
.post__body { padding: 12px 14px; }
.post__cat { font-size: 11px; font-weight: 700; color: var(--accent); }
.post__title { margin: 4px 0 6px; font-size: 15px; }
.post__meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }

/* ----- 인증 페이지 ----- */
.authbox {
  max-width: 400px; margin: 60px auto; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 32px;
}
.authbox h1 { font-size: 22px; margin: 0 0 6px; text-align: center; }
.authbox p.sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.authbox .seed { background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; padding: 12px; font-size: 12.5px; color: #475569; margin-top: 16px; line-height: 1.7; }

@media (max-width: 720px) {
  .row2 { grid-template-columns: 1fr; }
  .tb__nav { display: none; }
}
