@charset "utf-8";
/* ==========================================================================
   디비곳간 관리 — 사이트와 같은 토큰(Pretendard, 중립 회색, 작은 모서리).
   왼쪽 메뉴 + 오른쪽 흰 카드. 팝업은 제목·한 줄 설명·구분선·큰 단추만.
   ========================================================================== */
:root {
  --bg: #fff;
  --bg-page: #f3f5f8;
  --bg-soft: #f6f7f8;
  --bg-sunken: #f1f3f4;
  --line: #ecedef;
  --line-strong: #dfe1e5;
  --ink: #16181d;
  --ink-2: #4e5560;
  --ink-3: #6b7280;
  --ink-4: #8a919b;
  --brand: #2350c8;
  --brand-ink: #1b3fa3;
  --brand-soft: #edf2ff;
  --hot: #e5484d;
  --hot-soft: #fdecec;
  --ok: #148a5b;
  --ok-soft: #e7f6ef;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 14.5px; line-height: 1.55; color: var(--ink); background: var(--bg-page); }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 틀 ---------- */
/* 왼쪽 흰 띠는 바탕에 깐다 — 메뉴(sticky)가 화면 높이에서 끝나도 아래까지 이어지게. */
.ad { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, #fff 231px, var(--line) 231px, var(--line) 232px, transparent 232px); }
.side { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 20px 14px; overflow-y: auto; }
.side__logo { display: flex; align-items: center; gap: 8px; padding: 4px 10px 22px; font-size: 17px; font-weight: 700; letter-spacing: -.03em; }
.side__logo img { width: 26px; height: 26px; }
.side__logo small { padding: 1px 6px; border-radius: 4px; background: var(--bg-sunken); color: var(--ink-3); font-size: 11.5px; font-weight: 700; }
.side__group { margin-top: 18px; padding: 0 10px 6px; font-size: 12px; font-weight: 700; color: var(--ink-4); }
.side__nav a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 6px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.side__nav a:hover { background: var(--bg-soft); color: var(--ink); }
.side__nav a.is-on { background: var(--brand-soft); color: var(--brand); }
.side__nav svg { width: 17px; height: 17px; flex: none; }
.side__foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.side__foot b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; }
.side__foot b small { margin-left: 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.side__foot nav { display: flex; gap: 12px; margin-top: 8px; }
.side__foot a, .side__foot button { padding: 0; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.side__foot a:hover, .side__foot button:hover { color: var(--ink); }

.main { min-width: 0; padding: 28px 32px 64px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.04em; }
.head p { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.head__tools { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 단추 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.btn svg { width: 15px; height: 15px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-ink); }
.btn--line { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.btn--line:hover { border-color: var(--ink-4); }
.btn--ghost { background: var(--bg-sunken); color: var(--ink); }
.btn--ghost:hover { background: #e7eaef; }
.btn--danger { background: var(--hot-soft); color: var(--hot); }
.btn--danger:hover { background: #fbdcdc; }
.btn--sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn--lg { height: 48px; padding: 0 20px; font-size: 15px; }

/* ---------- 카드·숫자 ---------- */
.card { padding: 20px 22px; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.main > .card + .card, .main > .grid + .card, .main > .card + .grid, .main > .grid + .grid { margin-top: 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.card__head h2 b { color: var(--brand); font-weight: 700; }
.card__head a { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.card__head a:hover { color: var(--ink); }
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.stat dt { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.stat dd { margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat small { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--brand); }

/* ---------- 찾기 줄·탭 ---------- */
.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bar input[type=search], .bar input[type=text] { flex: 1 1 260px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; outline: none; }
.bar input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(35,80,200,.1); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--brand); }
.tabs { display: flex; gap: 2px; padding: 3px; margin-bottom: 16px; border-radius: 8px; background: #e9ecf1; width: fit-content; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.tabs a:hover { color: var(--ink); }
.tabs a.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08); }

/* ---------- 표 — 사이트 DB 표와 같은 결(테두리·칸 선·회색 머리줄) ---------- */
.tw { overflow-x: auto; border: 1px solid #d5dae1; border-radius: 6px; }
.tb { width: 100%; border-collapse: collapse; font-size: 14px; }
.tb th, .tb td { padding: 9px 10px; border-right: 1px solid #e3e7ec; text-align: left; white-space: nowrap; vertical-align: middle; }
.tb th:last-child, .tb td:last-child { border-right: 0; }
.tb th { background: #f4f6f9; border-bottom: 1px solid #d5dae1; font-size: 13px; font-weight: 600; color: #333d4b; }
.tb td { border-top: 1px solid #e9ecf0; color: #191f28; }
.tb tbody tr:first-child td { border-top: 0; }
.tb tbody tr:hover td { background: #f5f8ff; }
.tb .num { text-align: right; font-variant-numeric: tabular-nums; }
.tb .mut { color: var(--ink-3); }
.tb .b { font-weight: 600; }
.tb .clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.tb .act { width: 1%; }
.tb .act > div { display: flex; gap: 4px; }
.tb a.lnk { color: var(--brand); font-weight: 600; }
.empty { padding: 48px 20px; border: 1px dashed var(--line-strong); border-radius: 8px; text-align: center; color: var(--ink-3); }

/* 꼬리표 */
.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 12px; font-weight: 700; background: var(--bg-sunken); color: var(--ink-3); }
.tag--brand { background: var(--brand-soft); color: var(--brand); }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--hot { background: var(--hot-soft); color: var(--hot); }

/* 쪽 번호 */
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.pager a { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pager a:hover { background: #fff; }
.pager a.is-on { background: var(--ink); color: #fff; }

/* 알림 줄 */
.flash { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 12px 16px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 14px; font-weight: 600; }
.flash--err { background: var(--hot-soft); color: var(--hot); }
.result { margin-bottom: 16px; }
.result__nums { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.result__nums b { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.result__probs { margin: 12px 0 0; padding: 12px 14px; border-radius: 6px; background: var(--bg-soft); font-size: 13px; color: var(--ink-2); list-style: none; max-height: 220px; overflow-y: auto; }
.result__probs li + li { margin-top: 3px; }

/* ---------- 팝업 — 제목, 한 줄 설명, 구분선, 칸, 큰 단추 ---------- */
.pop { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 24px 64px rgba(16,24,40,.24); }
.pop--wide { width: min(760px, calc(100vw - 32px)); }
.pop::backdrop { background: rgba(17,19,24,.45); }
.pop form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.pop__head { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.pop__head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.pop__head p { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.pop__body { padding: 20px 26px; overflow-y: auto; }
.pop__btns { display: flex; gap: 8px; padding: 16px 26px 22px; border-top: 1px solid var(--line); }
.pop__btns .btn { flex: 1; height: 48px; font-size: 15px; }
.pop__btns .btn--danger { flex: 0 0 auto; margin-right: auto; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f--full { grid-column: 1 / -1; }
.f > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.f > span i { color: var(--hot); font-style: normal; }
.f input, .f select, .f textarea { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; outline: none; font-size: 14.5px; }
.f textarea { height: 220px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.f select { appearance: none; -webkit-appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 11px center / 12px no-repeat; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(35,80,200,.1); }
.f input::placeholder, .f textarea::placeholder { color: #b0b6be; }
.f small { font-size: 12.5px; color: var(--ink-4); }
.f[hidden] { display: none; }

/* 엑셀 올리기 — 파일 고르는 칸 */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 30px 16px; border: 1.5px dashed var(--line-strong); border-radius: 8px; background: var(--bg-soft); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.drop:hover, .drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.drop b { font-size: 15px; }
.drop span { font-size: 13px; color: var(--ink-3); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: s; font-size: 14px; color: var(--ink-2); }
.steps li { position: relative; padding-left: 28px; }
.steps li + li { margin-top: 8px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.steps a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 로그인 ---------- */
.login { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.login__card { width: 100%; max-width: 400px; padding: 34px 32px 30px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px rgba(16,24,40,.06); }
.login__logo { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.login__logo img { width: 30px; height: 30px; }
.login form { display: flex; flex-direction: column; gap: 14px; }
.login .btn { height: 48px; margin-top: 6px; font-size: 15px; }

@media (max-width: 1100px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .ad { grid-template-columns: 1fr; background: none; }
  .side { position: static; height: auto; background: #fff; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side__logo { padding: 0 8px 0 4px; }
  .side__group, .side__foot { display: none; }
  .side__nav { display: contents; }
  .side__nav a { height: 34px; font-size: 13.5px; }
  .side__nav svg { display: none; }
  .main { padding: 20px 16px 48px; }
  .fields { grid-template-columns: 1fr; }
}

/* 수집 상태 꼬리표 */
.tag.is-ok { background: var(--ok-soft); color: var(--ok); }
.tag.is-failed { background: var(--hot-soft); color: var(--hot); }
.tag.is-running { background: var(--brand-soft); color: var(--brand); }
