/* ============================================================
   DOPAMINE SYSTEM — 파트너 콘솔 디자인 시스템 (dopamine.css)
   톤: 다크 + 네온 그라데이션(보라 #4e01f4 → 빨강 #fb013a)
   로고 추출색 기준. v6 목업 기준 리뉴얼 (2026-06-23)
   ============================================================ */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* 배경 계층 — 깊은 보라빛 다크 */
  --bg-0: #07060f;
  --bg-1: #0c0a18;        /* 페이지 바탕 */
  --bg-2: #14111f;        /* 카드 */
  --bg-3: #1c1830;        /* 카드 위 / 입력 */
  --bg-4: #271f42;        /* hover / 보더 강조 */

  /* 라인 */
  --line: #241d3a;
  --line-2: #342a55;

  /* 텍스트 */
  --txt-0: #f3f0fb;
  --txt-1: #c7c0de;
  --txt-2: #8d83ad;
  --txt-3: #5b5380;

  /* 브랜드 네온 (로고 추출색) */
  --neon-purple: #6a2bf5;
  --neon-magenta: #b3179e;
  --neon-red: #fb013a;
  --neon-pink: #ff2d6b;
  --grad: linear-gradient(120deg, #6a2bf5 0%, #b3179e 52%, #fb013a 100%);
  --grad-soft: linear-gradient(120deg, rgba(106,43,245,.16), rgba(251,1,58,.16));
  --glow-purple: rgba(106,43,245,.35);
  --glow-red: rgba(251,1,58,.30);

  /* 상태 */
  --ok: #2fd98a;
  --warn: #f5b53d;
  --danger: #fb3b5e;
  --info: #56b6ff;

  /* 효과 */
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --shadow: 0 16px 48px rgba(0,0,0,.5);

  --font: 'Pretendard Variable', Pretendard, -apple-system, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-1);
  color: var(--txt-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  min-height: 100vh;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 620px at 88% -12%, rgba(251,1,58,.10), transparent 58%),
    radial-gradient(760px 560px at -6% 8%, rgba(106,43,245,.12), transparent 55%),
    radial-gradient(680px 520px at 50% 120%, rgba(179,23,158,.07), transparent 55%);
}

h1,h2,h3,h4 { color: var(--txt-0); font-weight: 800; letter-spacing: -0.025em; line-height: 1.25; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }

/* ---------- 그라데이션 텍스트/유틸 ---------- */
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.text-neon { color: var(--neon-pink); }
.text-muted { color: var(--txt-2); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--grad); color: #fff; background-size: 140% 140%;
  box-shadow: 0 8px 26px var(--glow-purple);
}
.btn-primary:hover { box-shadow: 0 12px 34px var(--glow-red); transform: translateY(-1px); background-position: 100% 0; }
.btn-primary:disabled { background: var(--bg-4); color: var(--txt-3); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost { background: var(--bg-3); color: var(--txt-1); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-4); border-color: var(--neon-purple); color: var(--txt-0); }
.btn-outline { background: transparent; color: var(--txt-1); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--neon-pink); color: var(--txt-0); background: var(--bg-3); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }

/* ---------- 입력 ---------- */
.field { margin-bottom: 18px; }
.field > label {
  display: block; font-size: 13px; font-weight: 600; color: var(--txt-2);
  margin-bottom: 8px;
}
.req { color: var(--neon-pink); }
.input, .select, textarea.input {
  width: 100%; font-family: var(--font); font-size: 15px; color: var(--txt-0);
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 13px 15px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: var(--txt-3); }
.input:focus, .select:focus {
  outline: none; border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px var(--glow-purple); background: var(--bg-2);
}

/* ---------- 카드 ---------- */
.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; position: relative;
}

/* ---------- 칩/뱃지 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: var(--bg-3); color: var(--txt-2); border: 1px solid var(--line-2);
}
.chip-acc { background: var(--grad-soft); color: var(--neon-pink); border-color: transparent; }
.badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 7px; letter-spacing: .02em; display:inline-block; }
.badge-wait { background: rgba(245,181,61,.14); color: var(--warn); }
.badge-run  { background: rgba(47,217,138,.14); color: var(--ok); }
.badge-done { background: rgba(141,131,173,.16); color: var(--txt-2); }
.badge-pre  { background: rgba(86,182,255,.14); color: var(--info); }

/* ---------- 스크롤바/셀렉션 ---------- */
::selection { background: var(--neon-purple); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 6px; border: 2px solid var(--bg-1); }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

/* ============================================================
   콘솔 레이아웃 (사이드바 + 메인)
   ============================================================ */
.console { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* 사이드바 */
.side {
  width: 248px; flex-shrink: 0; background: var(--bg-2);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 22px 16px; position: sticky; top: 0; height: 100vh;
}
.side-logo { display: flex; align-items: center; padding: 6px 8px 22px; }
.side-logo img { height: 38px; width: auto; filter: drop-shadow(0 2px 10px var(--glow-purple)); }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm); color: var(--txt-2); font-weight: 600; font-size: 14.5px;
  transition: background .15s, color .15s; cursor: pointer; border: 1px solid transparent;
}
.side-nav a svg { width: 19px; height: 19px; flex-shrink: 0; }
.side-nav a:hover { background: var(--bg-3); color: var(--txt-1); }
.side-nav a.active {
  background: var(--grad-soft); color: var(--txt-0);
  border-color: var(--line-2);
}
.side-nav a.active svg { color: var(--neon-pink); }
.side-foot { padding: 14px 10px 4px; border-top: 1px solid var(--line); margin-top: 12px; }
.side-foot .sf-brand { display:flex; align-items:center; gap:8px; font-size: 12.5px; font-weight:700; color: var(--txt-1); }
.side-foot .sf-brand .dia { width:13px; height:13px; transform: rotate(45deg); background: var(--grad); border-radius:3px; }
.side-foot small { display:block; color: var(--txt-3); font-size: 11px; margin-top: 5px; }

/* 메인 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(12,10,24,.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.crumb { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--txt-2); font-weight: 600; }
.crumb .cur { color: var(--neon-pink); }
.crumb .sep { color: var(--txt-3); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-chip { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--txt-1); }
.user-chip .ava {
  width: 30px; height: 30px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px;
}
.logout-link { color: var(--txt-2); font-size: 13.5px; font-weight: 600; cursor: pointer; display:flex; align-items:center; gap:6px; white-space: nowrap; }
.logout-link:hover { color: var(--neon-pink); }
.logout-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.topbar-right { flex-shrink: 0; }
.user-chip { white-space: nowrap; }

/* 콘솔 체크박스 (커스텀) */
.checkbox { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--txt-1); user-select: none; }
.checkbox input { display: none; }
.checkbox .box { width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--bg-3); display: inline-flex; align-items: center; justify-content: center; transition: .15s; flex-shrink: 0; }
.checkbox input:checked + .box { background: var(--grad); border-color: transparent; }
.checkbox input:checked + .box::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 800; }

.content { padding: 30px; flex: 1; }
.content-narrow { max-width: 1080px; margin: 0 auto; }

/* 페이지 헤더 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; }
.page-head .ph-sub { color: var(--txt-2); font-size: 14px; margin-top: 3px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   캠페인 목록 — 검색/필터 바 + 테이블
   ============================================================ */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 240px; max-width: 380px; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--txt-3); }
.search-box input { padding-left: 40px; }
.filter-tabs { display: flex; gap: 7px; }
.filter-tabs button {
  font-family: var(--font); font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--bg-3); color: var(--txt-2); transition: .15s;
}
.filter-tabs button:hover { color: var(--txt-0); border-color: var(--neon-purple); }
.filter-tabs button.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 5px 16px var(--glow-purple); }

.tbl-wrap { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl thead th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--txt-2);
  padding: 15px 18px; border-bottom: 1px solid var(--line); background: var(--bg-3); white-space: nowrap;
}
table.tbl tbody td { padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--txt-1); }
table.tbl tbody tr { transition: background .12s; cursor: pointer; }
table.tbl tbody tr:hover { background: var(--bg-3); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
.td-name { font-weight: 700; color: var(--txt-0); }
.row-menu { color: var(--txt-3); font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.row-menu:hover { background: var(--bg-4); color: var(--txt-0); }

.empty-state { text-align: center; padding: 72px 20px; }
.empty-state .ico {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--bg-3);
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-2);
}
.empty-state .ico svg { width: 28px; height: 28px; color: var(--txt-3); }
.empty-state h3 { font-size: 17px; margin-bottom: 7px; }
.empty-state p { color: var(--txt-2); font-size: 14px; margin-bottom: 20px; }

.tbl-foot { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--txt-2); flex-wrap: wrap; gap: 10px; }
.pager { display: flex; align-items: center; gap: 6px; }
.pager button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--txt-2); cursor: pointer; font-family: var(--mono); font-size: 13px; }
.pager button.active { background: var(--grad); color: #fff; border-color: transparent; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   스텝퍼 (새 캠페인 등록)
   ============================================================ */
.stepper { display: flex; align-items: center; list-style: none; gap: 0; margin-bottom: 26px; background: var(--bg-2); border:1px solid var(--line); border-radius: var(--radius); padding: 18px 26px; }
.stepper li { display: flex; align-items: center; gap: 11px; color: var(--txt-3); font-weight: 700; font-size: 14.5px; flex: 1; }
.stepper li .num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--txt-2); flex-shrink: 0;
}
.stepper li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--line); margin: 0 14px; border-radius: 2px; }
.stepper li.active { color: var(--txt-0); }
.stepper li.active .num { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px var(--glow-purple); }
.stepper li.done { color: var(--txt-1); }
.stepper li.done .num { background: var(--grad-soft); color: var(--neon-pink); border-color: var(--line-2); }
.stepper li.done:not(:last-child)::after { background: var(--grad); }

.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-title { font-size: 18px; margin-bottom: 6px; }
.step-desc { color: var(--txt-2); font-size: 13.5px; margin-bottom: 18px; }
.step-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; gap: 12px; }

/* STEP1 분석 */
.analyze-row { display: flex; gap: 11px; }
.analyze-row .input { flex: 1; }
.hint { font-size: 12.5px; color: var(--txt-3); margin-top: 9px; }
.place-card {
  display: flex; gap: 18px; align-items: center; margin-top: 20px; padding: 18px;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius); position: relative;
}
.place-thumb { width: 92px; height: 92px; border-radius: 12px; background: var(--bg-4); overflow: hidden; flex-shrink: 0; display:flex; align-items:center; justify-content:center; }
.place-thumb img { width: 100%; height: 100%; object-fit: cover; }
.place-thumb span { font-size: 34px; }
.place-info { flex: 1; min-width: 0; }
.place-info .pi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin-top: 10px; }
.place-info .pi-grid .k { font-size: 12px; color: var(--txt-3); margin-bottom: 2px; }
.place-info .pi-grid .v { font-size: 14px; color: var(--txt-0); font-weight: 600; }
.place-info .pn { font-size: 18px; font-weight: 800; color: var(--txt-0); }
.place-ok { position: absolute; top: 16px; right: 16px; font-size: 12px; font-weight: 700; color: var(--ok); background: rgba(47,217,138,.12); padding: 5px 11px; border-radius: 999px; }

/* STEP2 단순형 */
.kw-single-wrap { position: relative; }
.kw-note { font-size: 12.5px; color: var(--neon-pink); margin-top: 8px; font-weight: 600; }
.slider-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.slider-row input[type=range] {
  flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px;
  background: var(--bg-4); outline: none;
}
.slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad); cursor: pointer; box-shadow: 0 0 0 5px var(--glow-purple); border: 2px solid #fff2;
}
.slider-row input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--neon-purple); cursor: pointer; border: 2px solid #fff2;
}
.slider-val { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--txt-0); min-width: 86px; text-align: right; }
.slider-unit { color: var(--txt-2); font-size: 13px; }
.quick-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-btns button {
  flex: 1; min-width: 70px; font-family: var(--mono); font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 11px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-3); color: var(--txt-2); transition: .15s;
}
.quick-btns button:hover { border-color: var(--neon-purple); color: var(--txt-0); }
.quick-btns button.active { background: var(--grad); color: #fff; border-color: transparent; }
.date-row { display: flex; align-items: center; gap: 12px; }
.date-row .input { flex: 1; }
.date-sep { color: var(--txt-3); }
.date-days { font-family: var(--mono); font-weight: 700; color: var(--neon-pink); min-width: 60px; }

/* STEP3 확인 */
.step3-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.summary-tbl { width: 100%; border-collapse: collapse; }
.summary-tbl td { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-tbl td:first-child { color: var(--txt-2); width: 40%; }
.summary-tbl td:last-child { color: var(--txt-0); font-weight: 600; text-align: right; }
.summary-tbl tr:last-child td { border-bottom: 0; }
.cost-box { margin-top: 18px; padding: 18px; background: var(--grad-soft); border: 1px solid var(--line-2); border-radius: var(--radius); }
.cost-row { display: flex; align-items: center; justify-content: space-between; }
.cost-row span { color: var(--txt-1); font-size: 14px; }
.cost-row b { font-family: var(--mono); font-size: 22px; color: var(--neon-pink); }

.rank-card { display: flex; flex-direction: column; }
.rank-scan { text-align: center; padding: 40px 0; }
.scan-radar { width: 110px; height: 110px; margin: 0 auto 18px; border-radius: 50%; position: relative; border: 1px solid var(--line-2); background: radial-gradient(circle, var(--bg-3), var(--bg-2)); overflow: hidden; }
.radar-sweep { position: absolute; inset: 0; background: conic-gradient(from 0deg, transparent 0deg, var(--glow-purple) 60deg, transparent 90deg); animation: spin 1.4s linear infinite; }
.radar-dot { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; background: var(--neon-pink); border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 14px var(--neon-pink); }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-txt { color: var(--txt-2); font-size: 13.5px; }
.rank-result { text-align: center; padding: 30px 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.rank-kw { font-family: var(--mono); font-size: 15px; color: var(--txt-2); margin-bottom: 14px; }
.rank-big { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: 8px; }
.rank-num { font-size: 64px; font-weight: 800; line-height: 1; }
.rank-num.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rank-suffix { font-size: 24px; font-weight: 700; color: var(--txt-1); }
.rank-out { font-size: 44px; font-weight: 800; color: var(--neon-pink); }
.rank-desc { color: var(--txt-2); font-size: 13.5px; }
.rank-note { margin-top: 22px; padding: 14px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--txt-2); display: flex; gap: 9px; align-items: flex-start; text-align: left; }
.rank-note svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--info); margin-top: 1px; }

.submit-bar { text-align: center; margin-top: 26px; }
.submit-bar .btn { min-width: 280px; }

/* ============================================================
   캠페인 상세 대시보드
   ============================================================ */
.detail-head { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 22px; }
.dh-meta { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.dh-meta .k { font-size: 12px; color: var(--txt-3); margin-bottom: 5px; }
.dh-meta .v { font-size: 15px; color: var(--txt-0); font-weight: 700; }
.dh-meta .v.sub { font-size: 12.5px; color: var(--txt-2); font-weight: 500; margin-top: 2px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  position: relative; overflow: hidden;
}
.kpi::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background: var(--grad); opacity:.6; }
.kpi-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--grad-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.kpi-ico svg { width: 21px; height: 21px; color: var(--neon-pink); }
.kpi-label { font-size: 12.5px; color: var(--txt-2); margin-bottom: 6px; }
.kpi-val { font-size: 30px; font-weight: 800; color: var(--txt-0); line-height: 1; font-family: var(--mono); }
.kpi-val small { font-size: 15px; color: var(--txt-2); font-weight: 600; }
.kpi-delta { font-size: 12.5px; font-weight: 700; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--danger); }
.kpi-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; }
.kpi-bar { height: 7px; border-radius: 999px; background: var(--bg-4); overflow: hidden; margin-top: 12px; }
.kpi-bar > span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }

.detail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; }
.chart-card, .log-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { font-size: 16px; }
.chart-wrap { position: relative; height: 260px; }
.chart-foot { font-size: 11.5px; color: var(--txt-3); margin-top: 12px; text-align: center; }
.log-tbl { width: 100%; border-collapse: collapse; }
.log-tbl td { padding: 11px 6px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--txt-1); vertical-align: middle; }
.log-tbl tr:last-child td { border-bottom: 0; }
.log-tbl .lt-date { color: var(--txt-2); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.log-up { display:inline-block; font-size: 11.5px; font-weight: 700; color: var(--ok); background: rgba(47,217,138,.12); padding: 2px 7px; border-radius: 6px; margin-left: 6px; }

/* ============================================================
   모달
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(7,6,15,.78); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 32px; max-width: 420px; width: 100%; text-align: center; animation: fadeUp .25s ease; }
.modal-ico { font-size: 34px; margin-bottom: 12px; }
.modal h3 { font-size: 19px; margin-bottom: 12px; }
.modal p { color: var(--txt-1); font-size: 14px; line-height: 1.7; margin-bottom: 22px; }
.modal .text-danger { color: var(--neon-pink); font-weight: 700; }
.modal-btns { display: flex; gap: 11px; }
.modal-btns .btn { flex: 1; }
.done-ring { width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 50%; background: var(--grad-soft); display: flex; align-items: center; justify-content: center; }
.done-ring svg { width: 32px; height: 32px; color: var(--ok); }

/* 토스트 */
.hint-toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px);
  background: var(--bg-3); color: var(--txt-0); border: 1px solid var(--line-2);
  padding: 13px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s; z-index: 200;
}
.hint-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 로딩 스피너 */
.spin-load { display: flex; align-items: center; justify-content: center; padding: 60px; }
.spin-load::after { content: ''; width: 34px; height: 34px; border: 3px solid var(--line-2); border-top-color: var(--neon-pink); border-radius: 50%; animation: spin .7s linear infinite; }

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 1100px) {
  .step3-grid, .detail-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dh-meta { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .side { position: fixed; left: -260px; z-index: 50; transition: left .25s; box-shadow: var(--shadow); }
  .side.open { left: 0; }
  .menu-toggle { display: inline-flex !important; }
  .content { padding: 18px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .dh-meta { grid-template-columns: 1fr 1fr; }
  .place-info .pi-grid { grid-template-columns: 1fr; }
}
.menu-toggle { display: none; background: none; border: 0; color: var(--txt-1); cursor: pointer; }
.menu-toggle svg { width: 24px; height: 24px; }
