@font-face {
  font-family: "Gmarket Sans";
  src: url("fonts/GmarketSansBold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 5분스피치 관리자 (v2)
   SPEC 결정 9 — CodeIgniter 뷰 구조는 그대로 두고 템플릿과 스타일만 새로 만든다. */

/* 색은 고객 시안(docs/project/sources/시안/)의 청록 계열에 맞춘 것이다.
   시안은 AI 생성 참고물이라 배치까지 따르지는 않고 색만 가져왔다. */
:root {
  --bg: #f4f7f8;
  --panel: #ffffff;
  --ink: #1c2430;
  --ink-soft: #5b6878;
  --ink-faint: #8a97a6;
  --line: #e2e7ec;
  --line-soft: #eef1f4;
  --accent: #0d9488;
  --accent-deep: #0b7d73;
  --accent-bright: #14b8a6;
  --accent-soft: #e6f7f4;
  --accent-line: #b9e5de;
  --danger: #a33232;
  --danger-soft: #fbecec;
  --plus: #17795f;
  --minus: #b3402f;
  --warn-soft: #fdf5e3;
  --side: #16233a;
  --side-ink: #c0cbdb;
  --side-active: #24344f;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 700 14px/1.6 "Gmarket Sans", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------- 레이아웃 */

.shell { display: flex; min-height: 100vh; }

.side {
  width: 208px;
  flex: 0 0 208px;
  background: var(--side);
  color: var(--side-ink);
  display: flex;
  flex-direction: column;
}

.side-brand {
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.side-brand strong { display: block; color: #fff; font-size: 15px; letter-spacing: -.01em; }
.side-brand span { display: block; margin-top: 2px; font-size: 11px; color: #7f8f9f; }

.side-who {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
}
.side-who b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.side-who span { color: #7f8f9f; }

.side nav { padding: 10px 0; flex: 1; }
.side nav a {
  display: block;
  padding: 9px 20px;
  color: var(--side-ink);
  font-size: 13.5px;
}
.side nav a:hover { background: var(--side-active); color: #fff; text-decoration: none; }
.side nav a.on { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }

.side-foot { padding: 14px 20px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-foot a { color: #7f8f9f; font-size: 12.5px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }

.body { padding: 24px 28px 48px; }

/* ---------------------------------------------------------------- 조각 */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.card > h2 {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  font-weight: 600;
}
.card-body { padding: 18px; }

.stats { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.stat {
  flex: 1 1 180px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat span { display: block; color: var(--ink-soft); font-size: 12.5px; }
.stat strong { display: block; margin-top: 6px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.stat em { font-style: normal; font-size: 13px; color: var(--ink-faint); margin-left: 4px; }

.msg {
  padding: 11px 14px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 13.5px;
  border: 1px solid transparent;
}
.msg.ok { background: var(--accent-soft); border-color: var(--accent-line); color: #0a5f56; }
.msg.bad { background: var(--danger-soft); border-color: #eecccc; color: var(--danger); }
.msg.note { background: var(--warn-soft); border-color: #eadfc0; color: #6d5518; }

/* ----------------------------------------------------------------- 표 */

table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  vertical-align: middle;
}
table.grid th {
  background: #f7fafa;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.grid tr:last-child td { border-bottom: 0; }
table.grid tr:hover td { background: #fbfcfd; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 40px 18px; text-align: center; color: var(--ink-faint); font-size: 13.5px; }

.coin { font-variant-numeric: tabular-nums; }
.coin b { font-weight: 600; }
.coin span { color: var(--ink-faint); font-size: 12.5px; }

/* --------------------------------------------------------------- 배지 */

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
}
.tag.hq { background: #e8eefc; border-color: #ccdbf5; color: #23458f; }
.tag.branch { background: var(--accent-soft); border-color: var(--accent-line); color: #0a5f56; }
.tag.user { background: #f0f2f4; border-color: #e0e4e8; color: #4d5a68; }
.tag.off { background: var(--danger-soft); border-color: #eecccc; color: var(--danger); }
.tag.on { background: #eaf5ea; border-color: #cfe6cf; color: #2f6b34; }

/* ---------------------------------------------------------------- 폼 */

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field .hint { margin-top: 5px; font-size: 12.5px; color: var(--ink-faint); }

input[type=text], input[type=password], input[type=email], input[type=search], select {
  width: 100%;
  max-width: 380px;
  padding: 8px 10px;
  border: 1px solid #cfd6dd;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
}
input:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[readonly] { background: #f4f6f8; color: var(--ink-soft); }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--accent-deep); text-decoration: none; color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border-color: #cfd6dd; font-weight: 500; }
.btn.ghost:hover { background: #f4f6f8; color: var(--ink); }
.btn.small { padding: 5px 11px; font-size: 12.5px; }
.btn.danger { background: #fff; color: var(--danger); border-color: #e3bcbc; font-weight: 500; }
.btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

.actions { display: flex; gap: 8px; align-items: center; margin-top: 22px; }
.inline { display: inline; }

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar input[type=text] { max-width: 260px; }
.toolbar .spacer { flex: 1; }
.count { color: var(--ink-soft); font-size: 13px; }

.pager { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 13px;
  color: var(--ink-soft);
}
.pager span.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

dl.spec { display: grid; grid-template-columns: 150px 1fr; gap: 0; margin: 0; }
dl.spec dt {
  padding: 10px 0;
  color: var(--ink-soft);
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
}
dl.spec dd {
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

/* -------------------------------------------------------------- 로그인 */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--side);
}
.login-box {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border-radius: 8px;
  padding: 32px 30px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
}
.login-box h1 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.01em; }
.login-box p.sub { margin: 0 0 24px; color: var(--ink-faint); font-size: 13px; }
.login-box .btn { width: 100%; text-align: center; padding: 10px; }
.login-box input { max-width: none; }

/* --------------------------------------------------------------- 거부 */

.denied {
  max-width: 460px;
  margin: 80px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
}
.denied h1 { margin: 0 0 8px; font-size: 17px; }
.denied p { margin: 0 0 20px; color: var(--ink-soft); font-size: 13.5px; }

/* ============================================================ 조회 도구 */

.filters {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.filters .row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.filters .f { display: flex; flex-direction: column; gap: 4px; }
.filters .f > label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.filters input[type=text], .filters input[type=date], .filters select { max-width: none; width: auto; min-width: 130px; }
.filters .f.wide input { min-width: 220px; }
.filters .go { display: flex; gap: 8px; margin-left: auto; }

input[type=date], input[type=number] {
  padding: 8px 10px;
  border: 1px solid #cfd6dd;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
}
input[type=number] { width: 140px; text-align: right; font-variant-numeric: tabular-nums; }
textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cfd6dd;
  border-radius: var(--radius);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* 정렬 가능한 표 머리글 */
table.grid th a { color: var(--ink-soft); display: inline-block; }
table.grid th a:hover { color: var(--accent); text-decoration: none; }
table.grid th a .ar { color: var(--accent); font-size: 10px; margin-left: 2px; }

/* ============================================================== 원장 */

.amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.amt.plus { color: var(--plus); }
.amt.minus { color: var(--minus); }
.flow { color: var(--ink-soft); font-size: 12.5px; }
.flow b { color: var(--ink); font-weight: 600; }

/* ============================================================== 탭 */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a {
  padding: 9px 15px;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ==================================================== 확인 단계(음영) */

/* SPEC 4장 4번 — 유효기간 연장으로 되살아나는 수량을 음영으로 보이고 확인받는다. */
.preview {
  background: repeating-linear-gradient(135deg, #fbf6e6, #fbf6e6 8px, #f6f0dc 8px, #f6f0dc 16px);
  border: 1px solid #e6dcbc;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.preview h3 { margin: 0 0 10px; font-size: 14px; color: #6d5518; }
.preview .big { font-size: 24px; font-weight: 700; color: #6d5518; font-variant-numeric: tabular-nums; }
.preview dl.spec dt, .preview dl.spec dd { border-bottom-color: #e6dcbc; }

/* ============================================================ 막대 */

.bars { display: flex; flex-direction: column; gap: 9px; }
.bars .b { display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px; align-items: center; }
.bars .b .nm { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .b .tr { display: block; background: var(--line-soft); border-radius: 3px; height: 18px; overflow: hidden; }
/* span 은 인라인이라 height 가 먹지 않는다. 막대는 block 이어야 채워진다. */
.bars .b .fl { display: block; background: var(--accent); height: 100%; border-radius: 3px; min-width: 2px; }
.bars .b .fl.alt { background: var(--accent-bright); }
.bars .b .vl { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 600; }

/* 월별 세로 막대 */
.spark { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 8px; }
.spark .c { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; }
.spark .c .bx { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.spark .c .lb { font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.spark .c .vv { font-size: 11.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ============================================================== 기타 */

.split { display: flex; gap: 20px; flex-wrap: wrap; }
.split > * { flex: 1 1 340px; min-width: 0; }
.muted { color: var(--ink-faint); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.note-line { font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.grid-form .field input, .grid-form .field select { max-width: none; }
.grid-form .full { grid-column: 1 / -1; }

@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .side { width: auto; flex: none; }
  .side nav { display: flex; flex-wrap: wrap; padding: 6px; }
  .side nav a { padding: 8px 12px; }
  .grid-form { grid-template-columns: 1fr; }
  .body { padding: 18px 16px 40px; }
}

/* 표가 좁은 화면에서 페이지 전체를 밀지 않도록 */
.scroll-x { overflow-x: auto; }

/* ========================================================== 대시보드 배치 */

/* .split 은 두 열의 높이가 제각각이라 짧은 쪽 아래가 크게 빈다.
   대시보드는 열 높이를 맞춰야 해서 그리드로 따로 잡는다. */
.dash {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}
.dash > .card { margin-bottom: 0; display: flex; flex-direction: column; }
.dash > .card > .card-body { flex: 1; display: flex; flex-direction: column; }
.dash .spark { flex: 1; min-height: 150px; }

/* 가로로 눕는 요약 줄. 세로로 쌓으면 카드 하나가 열 높이를 혼자 늘린다. */
.rowstats { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.rowstats .it { display: flex; flex-direction: column; gap: 2px; }
.rowstats .it span { color: var(--ink-soft); font-size: 12.5px; }
.rowstats .it b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.rowstats .it b em { font-style: normal; font-size: 13px; color: var(--ink-faint); margin-left: 3px; }
.rowstats .go { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
}

/* ======================================================= 상세 화면 뼈대 */

/* 카드를 세로로 쌓기만 하면 정보 밀도가 낮고 오른쪽이 통째로 빈다.
   상세 화면은 「머리줄 → 가로 요약 → 본문 2열」로 고정한다. */

.head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.head .who { min-width: 0; }
.head .who h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.head .who p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; }
.head .go { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.head .go form { margin: 0; }

/* 라벨 위, 값 아래. 한 줄에 여러 칸이 들어가 세로 길이가 크게 준다. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px 22px;
  margin: 0;
}
.facts .f { min-width: 0; }
.facts dt { color: var(--ink-soft); font-size: 12px; margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 14px; word-break: break-word; }
.facts dd.big { font-size: 20px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.facts dd .sub { display: block; color: var(--ink-faint); font-size: 12.5px; font-weight: 400; letter-spacing: 0; }

/* 본문 2열. 표가 넓은 쪽, 폼·보조 정보가 좁은 쪽. */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cols > * > .card:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .cols, .cols.even { grid-template-columns: 1fr; }
}

/* ====================================================== 커스텀 드롭다운 */

/* 브라우저마다 다르게 그려지는 네이티브 목록 대신 직접 그린다.
   값은 여전히 숨긴 <select> 가 들고 있다(assets/admin.js). */

.dd { position: relative; }
.dd-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dd-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 160px;
  padding: 8px 10px;
  border: 1px solid #cfd6dd;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.dd-btn:hover { border-color: #b6c0ca; }
.dd.is-open .dd-btn { border-color: var(--accent); outline: 2px solid var(--accent-soft); }

.dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-label.is-empty { color: var(--ink-faint); }

.dd-caret {
  flex: none;
  width: 7px;
  height: 7px;
  margin-bottom: 2px;
  border-right: 1.5px solid var(--ink-faint);
  border-bottom: 1.5px solid var(--ink-faint);
  transform: rotate(45deg);
}
.dd.is-open .dd-caret { transform: rotate(225deg); margin-bottom: -2px; }

.dd-pop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  max-width: 380px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(20, 32, 48, .16);
}
.dd-tools { padding: 2px 2px 6px; }
.dd-q {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #cfd6dd;
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
}
.dd-q:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.dd-list { max-height: 280px; overflow-y: auto; }
.dd-opt {
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.dd-opt.hot { background: var(--accent-soft); }
.dd-opt.on { color: var(--accent-deep); font-weight: 600; }
.dd-opt.on::after { content: "✓"; float: right; margin-left: 14px; }
.dd-opt.is-off { color: var(--ink-faint); cursor: default; }
.dd-none { padding: 12px 10px; color: var(--ink-faint); font-size: 13px; }

/* 폼 안에서는 입력칸과 같은 폭, 조회 줄에서는 내용에 맞춘 폭 */
.field .dd { max-width: 380px; }
.grid-form .dd, .grid-form .dd-pop { max-width: none; }
.filters .dd-btn { min-width: 150px; }

/* ==================================================== 표 다이얼로그 */

/* 항목이 수백 개면 드롭다운으로는 고를 수 없다. 표로 보여 주고 좁혀서 고른다.
   라디오가 폼 안에 그대로 있어서 스크립트 없이도 제출된다. */

.pick-open { display: inline-flex; align-items: center; gap: 7px; }
.pick-open em { font-style: normal; color: var(--ink-faint); font-size: 12.5px; font-weight: 500; }
.pick-chosen {
  display: block;
  margin: 10px 0 0;
  padding: 9px 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  color: #0a5f56;
}
.pick-chosen.is-empty {
  background: #f7f9fa;
  border-color: var(--line);
  border-style: dashed;
  color: var(--ink-faint);
  font-weight: 400;
}

.js .pick-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.js .pick-modal[hidden] { display: none; }
.js .pick-back { position: absolute; inset: 0; background: rgba(16, 26, 40, .45); }
.js .pick-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  max-height: min(660px, 86vh);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(10, 18, 30, .35);
  overflow: hidden;
}
.js .pick-list { flex: 1; overflow: auto; }
body.locked { overflow: hidden; }

.pick-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.pick-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.pick-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.pick-head .pick-close { margin-left: auto; }

.pick-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfd;
}
.pick-tools .pick-q { flex: 1; max-width: 320px; }
.pick-count { color: var(--ink-soft); font-size: 12.5px; }

.pick-list table.grid th { position: sticky; top: 0; z-index: 1; }
.pick-row { cursor: pointer; }
.pick-row.hot td { background: var(--accent-soft); }
.pick-row.on td { background: var(--accent-soft); }
.pick-row td:first-child { width: 34px; }
.pick-none { padding: 40px 18px; text-align: center; color: var(--ink-faint); font-size: 13.5px; }

.pick-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-faint);
}

button[disabled], .btn[disabled] { opacity: .45; cursor: not-allowed; }
button[disabled]:hover { background: var(--accent); }

/* 스크립트가 없으면 표가 그대로 페이지에 남는다(고를 수는 있다). */
html:not(.js) .pick-open, html:not(.js) .pick-chosen, html:not(.js) .pick-close { display: none; }
html:not(.js) .pick-box { border: 1px solid var(--line); border-radius: var(--radius); }
html:not(.js) .pick-list { max-height: 320px; overflow: auto; }

/* ======================================================== 콘텐츠 관리 */

code { font: 700 12.5px/1.4 "Gmarket Sans", sans-serif; background: #f1f4f6; padding: 1px 5px; border-radius: 4px; }

.tabs.months a { padding: 7px 11px; font-size: 13px; }

table.overview td.cell-none a { color: var(--ink-faint); }
table.overview td.cell-part a { color: #8a6d1d; font-weight: 600; }
table.overview td.cell-full a { color: var(--plus); font-weight: 600; }
table.overview td.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
table.overview td a { display: block; font-variant-numeric: tabular-nums; }
table.overview td a:hover { text-decoration: none; }

table.slots td { vertical-align: top; }
table.slots input[type=file] { font-size: 13px; max-width: 260px; }
.present { display: flex; gap: 12px; align-items: flex-start; }
.present .thumb {
  display: block;
  width: 128px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  background: #0f1720;
  border: 1px solid var(--line);
}
.present .meta { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }

.sticky-actions {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding: 12px 0;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.media-preview { flex: 0 0 128px; width: 128px; }
.media-error { display: block; margin-top: 6px; color: #b42318; font-size: 13px; }
.media-error[hidden] { display: none; }
