/* ============================================================
   패파로그 공개 데모 — 고객 콘솔 v2 다크 스킨을 옮긴 것
   ============================================================
   색·카드·표·배지·KPI 값은 콘솔 v2(mf-console-api static/console/v2/styles.css)와 같다.
   콘솔은 다른 도메인이라 그 파일을 직접 불러오지 않고 표현 값만 옮겼다 — 콘솔 스킨이 바뀌면 여기 :root와 맞춘다.
   콘솔 코드와 섞이지 않게 이름은 전부 dm- 접두사를 쓴다.
   ============================================================ */

:root {
  /* 2026-11-14: 콘솔 기본 색상이 네이비(styles.css html[data-color="navy"])라 같은 값으로 맞췄다. */
  --dm-bg: #0F1420;
  --dm-bg-glow: #0F1420;
  --dm-sidebar: #0C1220;
  --dm-surface: #182232;
  --dm-surface-2: #131B29;
  --dm-surface-3: #22304A;
  --dm-border: #293548;
  --dm-border-soft: #212C3D;
  --dm-nav-active: #273B59;

  --dm-text: #F2F5FA;
  --dm-text-muted: #A9B4C4;
  --dm-text-faint: #8C99AD;

  --dm-accent: #3989F7;
  --dm-mint: #2DD4A7;

  /* 판정 색 — 차트·범례·배지가 같은 값을 쓴다(콘솔 v2와 동일). */
  --dm-normal: #3B82F6;
  --dm-suspect: #EF4444;
  --dm-blocked: #94A3B8;

  --dm-red: #F2556B;
  --dm-blue: #6BA5FA;
  --dm-orange: #FB923C;

  --dm-font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --dm-font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --dm-radius: 14px;
  --dm-radius-sm: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--dm-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--dm-text);
  background: var(--dm-bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; }
button, input, select { font-family: inherit; }
table { border-collapse: collapse; width: 100%; }
a { color: var(--dm-blue); }

/* 키보드 포커스는 어디서나 같은 테두리로 보인다. */
:focus-visible { outline: 2px solid #7FB0FF; outline-offset: 2px; border-radius: 6px; }

.dm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dm-skip { position: absolute; left: 12px; top: -48px; z-index: 80; padding: 8px 14px; border-radius: 8px; background: var(--dm-accent); color: #fff; text-decoration: none; }
.dm-skip:focus { top: 12px; }

/* ---------------- 레이아웃 ---------------- */

.dm-shell { display: flex; min-height: 100vh; }

.dm-sidebar {
  width: 236px; flex: none;
  background: var(--dm-sidebar);
  border-right: 1px solid var(--dm-border-soft);
  padding: 22px 14px 18px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.dm-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 2px 8px; text-decoration: none; }
.dm-brand img { height: 34px; width: auto; display: block; }
/* .dm-btn의 display보다 앞서야 하므로 선택자를 겹쳐 쓴다. */
.dm-btn.dm-menu-btn { display: none; }

.dm-nav { display: flex; flex-direction: column; gap: 4px; }
.dm-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--dm-radius-sm);
  color: var(--dm-text-muted); text-decoration: none; font-size: 14px;
}
.dm-nav-item:hover { background: var(--dm-surface-2); color: var(--dm-text); }
.dm-nav-item[aria-current="page"] {
  background: var(--dm-nav-active);
  color: var(--dm-text); font-weight: 600;
}
.dm-nav-item svg { width: 18px; height: 18px; flex: none; opacity: 0.9; }

.dm-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.dm-side-note {
  padding: 12px; border-radius: var(--dm-radius-sm); font-size: 12.5px; color: var(--dm-text-muted);
  background: var(--dm-surface); border: 1px solid var(--dm-border-soft);
}
.dm-side-note b { display: block; color: var(--dm-text); margin-bottom: 2px; }

/* 공통 밀도(2026-11-10): 콘솔 styles.css와 같은 기준 — 본문 여백 32px·섹션 28px·카드 24px·페이지 제목 26px·카드 제목 18px·KPI 32px·표 14px·버튼 40px */
.dm-main { flex: 1; min-width: 0; padding: 0 32px 56px; display: flex; flex-direction: column; gap: 28px; }

/* 데모 표시 띠 — 모든 화면 위에 붙어 있다. */
.dm-demobar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  margin: 0 -30px; padding: 10px 30px;
  background: rgba(7, 11, 28, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dm-border-soft);
}
.dm-demo-badge {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  color: #FFE2B8; background: rgba(251, 146, 60, 0.14); border: 1px solid rgba(251, 146, 60, 0.5);
}
.dm-demo-badge svg { width: 14px; height: 14px; }
.dm-demobar-text { font-size: 12.5px; color: var(--dm-text-muted); flex: 1 1 240px; min-width: 0; }
.dm-demobar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.dm-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dm-page-title { font-size: 26px; letter-spacing: -0.01em; }
.dm-page-sub { font-size: 15px; color: var(--dm-text-muted); margin-top: 6px; }
.dm-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

#dmView { display: flex; flex-direction: column; gap: 28px; }
#dmView:focus { outline: none; }

/* ---------------- 버튼 · 입력 ---------------- */

.dm-select, .dm-btn, .dm-input {
  height: 40px; padding: 0 14px;
  border-radius: var(--dm-radius-sm);
  background: var(--dm-surface); border: 1px solid var(--dm-border);
  color: var(--dm-text); font-size: 14px;
}
.dm-btn { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.dm-select { cursor: pointer; min-width: 150px; appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA3C7' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.dm-input { background: var(--dm-surface-2); min-width: 0; }
.dm-input::placeholder { color: var(--dm-text-faint); }
.dm-select:hover, .dm-btn:hover, .dm-input:hover { border-color: #31407A; }
.dm-btn.is-primary { background: var(--dm-accent); border-color: var(--dm-accent); color: #fff; font-weight: 600; }
.dm-btn.is-primary:hover { background: #2559DB; }
.dm-btn.is-mint { background: rgba(45, 212, 167, 0.14); border-color: rgba(45, 212, 167, 0.5); color: #8FF0D2; font-weight: 600; }
.dm-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
/* 데모에서 실행되지 않는 기능 버튼 — 눌러도 안내만 나온다는 것을 자물쇠와 점선으로 미리 알린다. */
.dm-btn.is-locked { border-style: dashed; color: var(--dm-text-muted); }
.dm-btn.is-locked svg { width: 13px; height: 13px; }

.dm-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--dm-radius-sm); background: var(--dm-surface-2); border: 1px solid var(--dm-border-soft); }
.dm-seg button {
  padding: 8px 16px; min-height: 32px; border-radius: 8px; border: none; background: none;
  color: var(--dm-text-muted); font-size: 14px; cursor: pointer;
}
.dm-seg button:hover { color: var(--dm-text); }
.dm-seg button[aria-pressed="true"] { background: var(--dm-accent); color: #fff; font-weight: 600; }
/* 한 메뉴 안의 탭 줄(광고비 점검 · 조치·환급) — 링크지만 세그먼트 버튼과 같은 모양 */
.dm-tabs { display: flex; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 16px; }
.dm-tabs a { padding: 8px 16px; border-radius: 8px; font-size: 14px; color: var(--dm-text-muted); text-decoration: none; white-space: nowrap; }
.dm-tabs a:hover { color: var(--dm-text); } .dm-tabs a[aria-current="page"] { background: var(--dm-accent); color: #fff; font-weight: 600; }
.dm-refund-line { margin: -6px 0 14px; font-size: 13px; color: var(--dm-text-muted); } .dm-refund-line b { color: #6EE7B7; }
.dm-kpi3-value.is-todo { color: #FCA5A5; }
.dm-ads-hero { margin-bottom: 16px; } .dm-ads-big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 6px; }
.dm-ads-amounts th, .dm-ads-amounts td { font-size: 13px; }

/* ---------------- 상태 띠 · 안내 ---------------- */

.dm-status {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: var(--dm-radius);
  background: var(--dm-surface); border: 1px solid var(--dm-border-soft);
}
.dm-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--dm-orange); box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.14); }
.dm-status-text { color: var(--dm-text-muted); }
.dm-status-as-of { margin-left: auto; font-size: 12px; color: var(--dm-text-faint); }

.dm-info {
  padding: 11px 14px; border-radius: var(--dm-radius-sm); font-size: 13px;
  background: rgba(77, 141, 255, 0.1); border: 1px solid rgba(77, 141, 255, 0.28); color: #BFD5FF;
}
.dm-info.is-sim { background: rgba(251, 146, 60, 0.1); border-color: rgba(251, 146, 60, 0.35); color: #FED7AA; }
.dm-note { font-size: 13px; color: var(--dm-text-faint); margin-top: 10px; line-height: 1.6; }
.dm-muted { color: var(--dm-text-faint); }
.dm-empty { padding: 26px 0; text-align: center; color: var(--dm-text-faint); font-size: 13px; }

/* ---------------- KPI 카드 ---------------- */

.dm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dm-kpi {
  padding: 20px 22px; border-radius: var(--dm-radius); border: 1px solid var(--dm-border);
  min-height: 132px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.dm-kpi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dm-kpi-label { font-size: 13.5px; color: rgba(255, 255, 255, 0.82); font-weight: 500; }
.dm-kpi-value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dm-kpi-value small { font-size: 15px; font-weight: 600; margin-left: 2px; }
.dm-kpi-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.7); margin-top: auto; }
.dm-kpi svg { width: 30px; height: 30px; flex: none; opacity: 0.92; }
.dm-kpi.is-red    { background: linear-gradient(135deg, #4A1020 0%, #8C1B33 100%); border-color: rgba(242, 85, 107, 0.35); }
.dm-kpi.is-blue   { background: linear-gradient(135deg, #0D1F4E 0%, #1B4FA8 100%); border-color: rgba(77, 141, 255, 0.35); }
.dm-kpi.is-purple { background: linear-gradient(135deg, #2A1050 0%, #5B2BB0 100%); border-color: rgba(167, 139, 250, 0.35); }
.dm-kpi.is-green  { background: linear-gradient(135deg, #07332C 0%, #0F6B52 100%); border-color: rgba(45, 212, 167, 0.32); }
.dm-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, 0.16); color: #fff; vertical-align: middle; }

/* ---------------- 카드 ---------------- */

.dm-card { background: var(--dm-surface); border: 1px solid var(--dm-border-soft); border-radius: var(--dm-radius); padding: 24px; min-width: 0; }
.dm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dm-card-title { font-size: 18px; }
.dm-card-title small { font-size: 13px; font-weight: 500; color: var(--dm-text-faint); margin-left: 6px; }
.dm-grid-2 { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dm-grid-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dm-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dm-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.dm-legend { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--dm-text-muted); flex-wrap: wrap; }
.dm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dm-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------------- 차트 ---------------- */

.dm-chart { width: 100%; }
.dm-chart svg { display: block; width: 100%; height: auto; }
.dm-chart text { fill: var(--dm-text-faint); font-size: 11px; font-family: var(--dm-font); }
.dm-chart .grid { stroke: var(--dm-border-soft); stroke-width: 1; }
.dm-chart .hit { fill: transparent; }
.dm-chart .hit:hover { fill: rgba(255, 255, 255, 0.06); }
.dm-chart-sum { font-size: 12.5px; color: var(--dm-text-muted); margin-top: 10px; }
.dm-details { margin-top: 10px; font-size: 12.5px; color: var(--dm-text-muted); }
.dm-details summary { cursor: pointer; width: fit-content; padding: 4px 0; }
.dm-details .dm-table-scroll { max-height: 260px; overflow: auto; margin-top: 8px; }

.dm-tip {
  position: fixed; z-index: 70; pointer-events: none; max-width: 240px;
  padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
  background: var(--dm-surface-3); border: 1px solid var(--dm-border); color: var(--dm-text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); white-space: pre-line;
}

.dm-hbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13px; }
.dm-hbar-k { width: 132px; flex: none; font-weight: 600; }
.dm-hbar-track { flex: 1; height: 10px; border-radius: 6px; background: var(--dm-surface-3); overflow: hidden; }
.dm-hbar-track i { display: block; height: 100%; background: var(--dm-normal); border-radius: 6px; }
.dm-hbar-track i.is-suspect { background: var(--dm-suspect); }
.dm-hbar-v { width: 96px; flex: none; text-align: right; color: var(--dm-text-muted); font-variant-numeric: tabular-nums; }

/* ---------------- 표 ---------------- */

.dm-table-scroll { overflow-x: auto; }
.dm-table { font-size: 14px; min-width: 720px; }
.dm-table.is-fit { min-width: 0; }
/* 케이스 표는 열이 13개라 좁은 폭에서는 가로로 넘기며 본다(콘솔도 같다). */
.dm-table.is-cases { min-width: 1240px; }
.dm-table.is-cases td { white-space: nowrap; }
.dm-table caption { text-align: left; }
.dm-table thead th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--dm-text-faint);
  padding: 0 12px 10px; border-bottom: 1px solid var(--dm-border-soft); white-space: nowrap;
}
.dm-table tbody td, .dm-table tbody th { padding: 13px 12px; border-bottom: 1px solid var(--dm-border-soft); vertical-align: middle; text-align: left; font-weight: 400; }
.dm-table tbody tr:last-child td, .dm-table tbody tr:last-child th { border-bottom: none; }
.dm-table tbody tr:hover td, .dm-table tbody tr:hover th { background: rgba(47, 107, 255, 0.06); }
.dm-table .num, .dm-table thead th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dm-table tfoot td, .dm-table tfoot th { padding: 12px; border-top: 1px solid var(--dm-border); font-weight: 700; text-align: left; }
.dm-table tfoot .num { text-align: right; }
.dm-mono { font-family: var(--dm-font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.dm-sort { background: none; border: none; padding: 2px 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.dm-sort:hover { color: var(--dm-text); }
.dm-sort[aria-pressed="true"] { color: var(--dm-text); }

.dm-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.dm-badge svg { width: 12px; height: 12px; flex: none; }
/* 위험도·처리상태 배지 — 콘솔 v2 styles.css의 .sev-* · .st-*와 같은 값(2026-10-23, 예전 데모 '주의'가 콘솔 '위험' 색이었다). */
.sev-CRITICAL { background: rgba(242, 85, 107, 0.16); color: #FCA5A5; border-color: rgba(242, 85, 107, 0.35); }
.sev-HIGH     { background: rgba(251, 146, 60, 0.14); color: #FDBA74; border-color: rgba(251, 146, 60, 0.32); }
.sev-MEDIUM   { background: rgba(250, 204, 21, 0.12); color: #FDE047; border-color: rgba(250, 204, 21, 0.28); }
.st-SUSPECTED { background: rgba(148, 163, 184, 0.14); color: #CBD5E1; border-color: rgba(148, 163, 184, 0.28); }
.st-REVIEWING { background: rgba(77, 141, 255, 0.16); color: #93C5FD; border-color: rgba(77, 141, 255, 0.34); }
.st-CONFIRMED { background: rgba(242, 85, 107, 0.16); color: #FCA5A5; border-color: rgba(242, 85, 107, 0.34); }
.st-FALSE_POSITIVE { background: rgba(45, 212, 167, 0.14); color: #6EE7B7; border-color: rgba(45, 212, 167, 0.3); }
.st-RESOLVED  { background: rgba(167, 139, 250, 0.14); color: #C4B5FD; border-color: rgba(167, 139, 250, 0.3); }
.dm-badge.is-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.is-virtual { background: rgba(167, 139, 250, 0.14); color: #C4B5FD; border-color: rgba(167, 139, 250, 0.3); }
.is-soon    { background: rgba(148, 163, 184, 0.14); color: #CBD5E1; border-color: rgba(148, 163, 184, 0.3); }
.is-up      { background: rgba(45, 212, 167, 0.14); color: #6EE7B7; border-color: rgba(45, 212, 167, 0.3); }
.is-down    { background: rgba(242, 85, 107, 0.16); color: #FCA5A5; border-color: rgba(242, 85, 107, 0.35); }
.dm-ok { color: var(--dm-mint); }
.dm-danger { color: var(--dm-red); }

/* ---------------- 목록 · 요약 칸 ---------------- */

.dm-sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dm-sum-grid.is-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dm-sum-cell { padding: 12px 14px; border-radius: var(--dm-radius-sm); background: var(--dm-surface-2); border: 1px solid var(--dm-border-soft); min-width: 0; }
.dm-sum-cell .k { font-size: 12px; color: var(--dm-text-faint); }
.dm-sum-cell .v { font-size: 20px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.dm-list { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.dm-list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 11px 13px; border-radius: var(--dm-radius-sm);
  background: var(--dm-surface-2); border: 1px solid var(--dm-border-soft); font-size: 13px;
}
.dm-list-row .k { color: var(--dm-text-muted); min-width: 0; flex: 1 1 200px; }
.dm-list-row .k b { display: block; color: var(--dm-text); }
.dm-list-row .v { font-weight: 600; white-space: nowrap; }
.dm-row-new { animation: dm-flash 2.4s ease-out; }
@keyframes dm-flash { from { background: rgba(47, 107, 255, 0.32); } }

/* 유입 판정 비율 도넛(콘솔 대시보드와 같은 세 칸: 정상·의심·차단) */
.dm-donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dm-donut { width: 150px; height: 150px; flex: none; }
.dm-donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 0; }
.dm-donut-legend span { display: flex; align-items: center; gap: 8px; }
.dm-donut-legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dm-donut-legend b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }

/* 위험 점수 게이지 — 콘솔 탐지 상세(.v2-risk)와 같은 모양: 등급 배지 + 0~100 막대 + 40·55·70 눈금 */
.dm-risk { display: flex; align-items: flex-start; gap: 12px; }
.dm-risk > .dm-badge { flex: none; }
.dm-risk-gauge { flex: 1 1 auto; min-width: 0; padding-top: 7px; }
.dm-risk-track { position: relative; height: 8px; border-radius: 999px; background: var(--dm-surface-3); }
.dm-risk-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--dm-blocked); }
.dm-risk-fill.fill-MEDIUM { background: #FACC15; }
.dm-risk-fill.fill-HIGH { background: var(--dm-orange); }
.dm-risk-fill.fill-CRITICAL { background: var(--dm-red); }
.dm-risk-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--dm-text-faint); border-radius: 1px; }
.dm-risk-scale { position: relative; height: 16px; margin-top: 4px; font-family: var(--dm-font-mono); font-size: 11px; color: var(--dm-text-faint); }
.dm-risk-scale > span { position: absolute; transform: translateX(-50%); }
.dm-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dm-reasons li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dm-reason-pts { font-family: var(--dm-font-mono); font-size: 12px; color: var(--dm-blue); }

.dm-platform { display: flex; flex-direction: column; gap: 10px; }
.dm-platform-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dm-platform-head h3 { font-size: 15.5px; }
.dm-platform.is-soon-card { opacity: 0.82; }
.dm-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.dm-dl dt { color: var(--dm-text-muted); }
.dm-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; overflow-wrap: anywhere; }

.dm-faq { border: 1px solid var(--dm-border-soft); border-radius: var(--dm-radius-sm); background: var(--dm-surface-2); margin-top: 10px; }
.dm-faq summary { padding: 11px 14px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.dm-faq p { padding: 0 14px 14px; font-size: 13px; color: var(--dm-text-muted); }

/* 전환 CTA — 모든 화면 아래에 같은 블록이 붙는다. */
.dm-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 22px; border-radius: var(--dm-radius);
  background: linear-gradient(135deg, #0D1F4E 0%, #123A6B 60%, #0F5A55 100%); border: 1px solid rgba(77, 141, 255, 0.35);
}
.dm-cta h2 { font-size: 17px; }
.dm-cta p { font-size: 13px; color: #C9D6F5; margin-top: 4px; }
.dm-cta-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 상세 패널 · 안내 창 ---------------- */

.dm-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.55); display: flex; justify-content: flex-end; }
.dm-backdrop.is-center { align-items: center; justify-content: center; padding: 16px; }
.dm-drawer {
  width: min(460px, 100%); height: 100%; overflow-y: auto; padding: 22px 24px;
  background: var(--dm-surface); border-left: 1px solid var(--dm-border);
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 16px;
}
.dm-backdrop.is-center .dm-drawer { height: auto; max-height: calc(100vh - 32px); width: min(480px, 100%); border: 1px solid var(--dm-border); border-radius: var(--dm-radius); }
.dm-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dm-drawer-head h2 { font-size: 18px; }
.dm-drawer p { font-size: 13.5px; color: var(--dm-text-muted); }

/* ---------------- 콘솔 v3 — 홈 3단 · 케이스 · 키워드 수익성 · ROI 장부 · 고객 여정 ---------------- */
/* 콘솔 v2 styles.css의 .v3-* 블록을 옮긴 것. 이름만 dm-로 바꿨다. */

.dm-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dm-panel .dm-list { gap: 8px; }
.dm-count { font-size: 12px; font-weight: 600; color: var(--dm-text-muted); margin-left: 6px; }
.dm-badge.is-rule { background: rgba(0, 196, 254, 0.14); color: #7DE3FF; border-color: rgba(0, 196, 254, 0.3); font-size: 11px; vertical-align: middle; margin-left: 6px; }
.dm-badge.is-gray { background: var(--dm-surface-3); color: var(--dm-text-muted); border-color: var(--dm-border-soft); }
.dm-task, .dm-rec { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border-radius: var(--dm-radius-sm); background: var(--dm-surface-2); border: 1px solid var(--dm-border-soft); color: inherit; text-decoration: none; }
.dm-task:hover, .dm-rec:hover { border-color: #31407A; }
.dm-dot-sev { width: 8px; height: 8px; border-radius: 50%; flex: none; background: currentColor; }
.dm-task-text { flex: 1; min-width: 0; font-size: 15px; }
.dm-task-text b { display: block; color: var(--dm-text); }
.dm-task-text span { color: var(--dm-text-muted); font-size: 13px; }
.dm-task-arrow { color: var(--dm-text-faint); flex: none; }
.dm-rec { flex-direction: column; align-items: stretch; gap: 6px; }
.dm-rec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.dm-rec-impact { font-size: 12.5px; color: var(--dm-text-muted); }
.dm-evidence { display: flex; flex-wrap: wrap; gap: 6px; }
.dm-evidence span { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--dm-surface-3); color: var(--dm-text-muted); }
.dm-act { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 9px 12px; border-radius: var(--dm-radius-sm); background: var(--dm-surface-2); border: 1px solid var(--dm-border-soft); font-size: 13px; }
.dm-act time { color: var(--dm-text-faint); }
.dm-act-who { grid-column: 2; font-size: 12px; color: var(--dm-text-faint); }

/* 기한 칩 · 단계 · 담당자 아바타(콘솔 .v3-due · .v3-stage · .v3-av) */
.dm-due { display: inline-block; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.dm-due.is-over { background: var(--dm-red); color: #fff; }
.dm-due.is-soon { background: rgba(251, 146, 60, 0.2); color: var(--dm-orange); }
.dm-due.is-ok { background: var(--dm-surface-3); color: var(--dm-text-muted); }
.dm-stage { font-size: 12.5px; white-space: nowrap; }
.dm-stage-APPLY_HELD, .dm-stage-APPLY_FAILED, .dm-stage-NOT_APPLIED { color: var(--dm-orange); }
.dm-stage-APPLIED { color: var(--dm-mint); }
.dm-stage-CLOSED { color: var(--dm-text-faint); }
.dm-status-cell { display: inline-flex; align-items: center; gap: 6px; }
.dm-av { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; vertical-align: middle; }
.dm-av.c1 { background: #4D8DFF; } .dm-av.c2 { background: #A78BFA; } .dm-av.c3 { background: #2DD4A7; color: #052e24; }
.dm-av.is-ghost { background: var(--dm-surface-3); color: var(--dm-text-faint); }
.dm-assignee { white-space: nowrap; }
.dm-unassigned { color: var(--dm-text-faint); }
.dm-link { background: none; border: none; padding: 0; color: var(--dm-blue); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline dotted; }

/* 키워드 수익성 — 추천·근거 칩(콘솔 .v3-kwrec · .v3-reasons) */
.dm-kw-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dm-kwrec { white-space: nowrap; }
.dm-kwrec-INCREASE { color: var(--dm-mint); }
.dm-kwrec-REDUCE { color: var(--dm-orange); }
.dm-kwrec-KEEP { color: var(--dm-text-muted); }
.dm-kwrec-NOT_ENOUGH_DATA { color: var(--dm-text-faint); }
.dm-kwrec-REVIEW_DETECTIONS { color: var(--dm-red); }
.dm-kwrec-sub { font-size: 11px; color: var(--dm-text-faint); }
.dm-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; }
.dm-chips span { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--dm-surface-3); color: var(--dm-text-muted); white-space: normal; }
.dm-chips span.is-warn { background: rgba(245, 185, 66, 0.16); color: #F5B942; }
.dm-chips span.is-bad { background: rgba(242, 85, 107, 0.16); color: #FF9DAA; }
.dm-chips span.is-good { background: rgba(45, 212, 167, 0.16); color: var(--dm-mint); }
.dm-warn { color: var(--dm-orange); }

/* ROI 장부(콘솔 .v3-ledger · .v3-badge-* · .v3-excl-noop · .v3-bars · .v3-formula) */
.dm-ledgers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dm-ledger { display: flex; flex-direction: column; gap: 6px; }
.dm-ledger-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dm-ledger-head b { font-size: 14px; }
.dm-ledger-val { font-size: 26px; font-weight: 800; margin: 6px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dm-ledger.is-empty .dm-ledger-val { font-size: 18px; }
.dm-ledger-def { color: var(--dm-text-muted); font-size: 12.5px; flex: 1; min-height: 36px; }
.dm-badge.is-est { background: rgba(245, 185, 66, 0.16); color: #F5B942; }
.dm-badge.is-user { background: rgba(251, 146, 60, 0.18); color: var(--dm-orange); }
.dm-badge.is-conf { background: rgba(45, 212, 167, 0.18); color: var(--dm-mint); }
.dm-badge.is-model { background: rgba(167, 139, 250, 0.18); color: #C4B5FD; }
.dm-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--dm-border-soft); font-size: 13px; }
.dm-kv span { color: var(--dm-text-muted); }
.dm-kv b { font-variant-numeric: tabular-nums; text-align: right; }
.dm-excl-noop { padding: 11px 14px; border-radius: var(--dm-radius-sm); background: rgba(242, 85, 107, 0.12); border: 1px solid rgba(242, 85, 107, 0.35); color: #FECACA; font-size: 13px; margin-bottom: 10px; }
.dm-bars { display: flex; align-items: flex-end; gap: 18px; height: 160px; padding: 0 8px; margin-bottom: 10px; }
.dm-bar-col { position: relative; width: 56px; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.dm-bar-col i { position: absolute; bottom: 18px; display: block; border-radius: 4px 4px 0 0; }
.dm-bar-base { width: 40px; background: var(--dm-surface-3); border: 1px solid var(--dm-border); }
.dm-bar-ref { width: 24px; background: var(--dm-mint); }
.dm-bar-col small { position: absolute; bottom: 0; font-size: 11px; color: var(--dm-text-faint); }
.dm-formula { font-family: var(--dm-font-mono); font-size: 12.5px; padding: 10px 12px; border-radius: var(--dm-radius-sm); background: var(--dm-surface-2); border: 1px solid var(--dm-border-soft); color: var(--dm-text); }

/* 고객 여정 — 산키(콘솔 .v3-sankey · .v3-snode) */
.dm-journey-head { display: flex; flex-direction: column; gap: 10px; }
.dm-journey { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dm-journey-side { display: flex; flex-direction: column; gap: 16px; }
.dm-sankey-cols { display: flex; justify-content: space-between; font-size: 11.5px; letter-spacing: 0.04em; color: var(--dm-text-faint); margin-bottom: 8px; }
.dm-sankey { position: relative; width: 100%; }
.dm-sankey-svg { position: absolute; left: 0; top: 0; }
.dm-sankey-svg path:hover { opacity: 0.9; }
.dm-snode { position: absolute; padding: 10px 12px; border-radius: var(--dm-radius-sm); background: var(--dm-surface-2); border: 1px solid var(--dm-border); overflow: hidden; }
.dm-snode b { display: block; font-size: 14px; }
.dm-snode small { display: block; color: var(--dm-text-muted); font-size: 12px; }
.dm-snode-pb { height: 4px; border-radius: 2px; background: var(--dm-surface); margin: 8px 0 6px; }
.dm-snode-pb i { display: block; height: 100%; border-radius: 2px; }
.dm-snode-tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; display: inline-block; }
.dm-path { padding: 8px 0; border-bottom: 1px solid var(--dm-border-soft); font-size: 13px; }
.dm-path:last-child { border-bottom: none; }
.dm-path-head { display: flex; justify-content: space-between; gap: 8px; }
.dm-path-to { color: var(--dm-text-muted); }
.dm-insights { margin: 0; padding-left: 18px; font-size: 13px; color: var(--dm-text-muted); display: flex; flex-direction: column; gap: 8px; }
.dm-limits { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--dm-text-muted); display: flex; flex-direction: column; gap: 10px; }
.dm-limits b { color: var(--dm-text); }

/* ---------------- 반응형 ---------------- */

@media (max-width: 1439px) {
  .dm-sidebar { width: 208px; }
  .dm-kpi-value { font-size: 28px; }
}
@media (max-width: 1100px) {
  .dm-kpis, .dm-ledgers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-panels, .dm-journey { grid-template-columns: minmax(0, 1fr); }
  .dm-grid-2, .dm-grid-even { grid-template-columns: minmax(0, 1fr); }
  .dm-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .dm-sum-grid, .dm-sum-grid.is-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 모바일(≤767px): 사이드바를 상단 바로 바꾸고 메뉴는 접어 둔다 — 메뉴 버튼으로 연다. */
@media (max-width: 767px) {
  .dm-shell { flex-direction: column; }
  .dm-sidebar {
    width: auto; height: auto; position: sticky; top: 0; z-index: 30; overflow: visible;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    padding: 10px 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  }
  .dm-brand { padding: 0; }
  .dm-brand img { height: 28px; }
  .dm-btn.dm-menu-btn { display: inline-flex; margin-left: auto; }
  .dm-nav, .dm-side-foot { display: none; flex: 1 1 100%; }
  .dm-sidebar.is-open .dm-nav, .dm-sidebar.is-open .dm-side-foot { display: flex; }
  .dm-nav-item { min-height: 44px; }

  .dm-main { padding: 0 16px 40px; gap: 20px; }
  #dmView { gap: 20px; }
  .dm-card { padding: 20px 18px; }
  .dm-kpi3 { padding: 20px; }
  .dm-kpi3-value { font-size: 28px; }
  /* 상단 바가 화면 위에 붙어 있으므로 데모 띠는 흐름에 둔다(두 겹으로 붙으면 본문이 좁아진다). */
  .dm-demobar { position: static; margin: 0 -14px; padding: 10px 14px; }
  .dm-demobar-actions { width: 100%; }
  .dm-demobar-actions .dm-btn { flex: 1 1 0; padding: 0 8px; }
  #dmView { gap: 16px; }
  .dm-page-title { font-size: 22px; }
  .dm-controls { width: 100%; gap: 8px; }
  .dm-controls .dm-seg { flex: 1 1 100%; }
  .dm-controls .dm-seg button { flex: 1 1 0; min-height: 36px; }
  .dm-controls .dm-select, .dm-controls .dm-input { flex: 1 1 130px; }

  .dm-kpis { gap: 10px; }
  .dm-ledgers { grid-template-columns: minmax(0, 1fr); }
  /* 산키는 폭이 좁으면 읽을 수 없어 숨기고 "표로 보기"와 상위 경로만 보인다. */
  .dm-sankey, .dm-sankey-cols { display: none; }
  .dm-kpi { padding: 14px; min-height: 112px; }
  .dm-kpi-value { font-size: 21px; }
  .dm-kpi-label { font-size: 12.5px; }
  .dm-kpi svg { display: none; }
  .dm-card { padding: 16px 14px; }
  .dm-status { padding: 12px 14px; }
  .dm-status-as-of { margin-left: 0; flex: 1 1 100%; }
  .dm-hbar-k { width: 104px; }
  .dm-hbar-v { width: 72px; }
  .dm-btn-sm { height: 36px; }
  .dm-drawer { padding: 18px 16px; }
  .dm-cta-actions { width: 100%; }
  .dm-cta-actions .dm-btn { flex: 1 1 140px; }
}

@media (prefers-reduced-motion: reduce) { .dm-row-new { animation: none; } }

/* ============================================================
   콘솔 v4 화면 상단(2026-10-27) — 콘솔 v2 styles.css의 ov-·dt-·rf-·kw- 규칙을 dm- 이름으로 옮긴 것.
   숫자 카드는 중립색. 빨강은 확인 필요·경고에만, 초록은 확정 환급에만, 파랑은 누르는 것에만 쓴다.
   ============================================================ */
.dm-kpis3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dm-kpi3 { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--dm-radius); background: var(--dm-surface); border: 1px solid var(--dm-border-soft); color: var(--dm-text); text-decoration: none; min-width: 0; }
.dm-kpi3.is-link:hover, .dm-kpi3.is-link:focus-visible { border-color: var(--dm-border); }
.dm-kpi3-label { font-size: 14px; color: var(--dm-text-muted); }
.dm-kpi3-value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dm-kpi3-value small { font-size: 15px; font-weight: 600; margin-left: 2px; }
.dm-kpi3-value.is-conf { color: #6EE7B7; } .dm-kpi3-value.is-todo { color: #FCA5A5; }
.dm-kpi3-sub { font-size: 13.5px; color: var(--dm-text-muted); }
.dm-kpi3-meta { font-size: 12.5px; color: var(--dm-text-faint); border-top: 1px dashed var(--dm-border-soft); padding-top: 7px; margin-top: auto; line-height: 1.45; }
.dm-q { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--dm-text-faint); font-size: 10px; cursor: help; }
.dm-tag3 { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(245, 185, 66, 0.16); color: #FDE68A; vertical-align: 1px; }
.dm-tag3.is-conf { background: rgba(45, 212, 167, 0.18); color: #6EE7B7; }
.dm-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.08); margin-top: 6px; }
.dm-bar i { display: block; height: 100%; }
.dm-bar i.is-normal { background: var(--dm-blue); } .dm-bar i.is-review { background: var(--dm-red); } .dm-bar i.is-est { background: #F5B942; }
.dm-bar i.is-conf { background: var(--dm-mint); } .dm-bar i.is-pending { background: #F5B942; } .dm-bar i.is-rest { background: rgba(255, 255, 255, 0.22); }
.dm-bar-lbl { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--dm-text-faint); }
.dm-bar-lbl b { font-weight: 600; color: var(--dm-text-muted); }
.dm-related { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-more { border: 1px solid var(--dm-border-soft); border-radius: var(--dm-radius); padding: 0 16px; }
.dm-more > summary { cursor: pointer; padding: 14px 4px; color: var(--dm-text-muted); font-weight: 600; }
.dm-more[open] { padding-bottom: 16px; }
.dm-more-body { display: flex; flex-direction: column; gap: 16px; }
.dm-chart.is-link { display: block; }
.dm-dash-row { align-items: stretch; }

/* 이상 유입 — 상태 배지와 히트맵. 칸 색은 단계(data-level)로만 칠한다. */
.dm-st3 { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid transparent; }
.dm-st3.is-todo { background: rgba(242, 85, 107, 0.16); color: #FCA5A5; border-color: rgba(242, 85, 107, 0.34); }
.dm-st3.is-doing { background: rgba(250, 204, 21, 0.12); color: #FDE047; border-color: rgba(250, 204, 21, 0.28); }
.dm-st3.is-done { background: rgba(45, 212, 167, 0.14); color: #6EE7B7; border-color: rgba(45, 212, 167, 0.3); }
.dm-heat-scroll { overflow-x: auto; }
.dm-heat { display: grid; grid-template-columns: 52px repeat(7, minmax(64px, 1fr)); gap: 6px; align-items: center; min-width: 560px; }
.dm-heat-day { font-size: 12px; color: var(--dm-text-muted); text-align: center; }
.dm-heat-slot { font-size: 12px; color: var(--dm-text-faint); font-family: var(--dm-font-mono); }
.dm-heat-cell { height: 38px; border-radius: 8px; border: 1px solid transparent; color: #fff; font: 600 12.5px var(--dm-font); cursor: pointer; font-variant-numeric: tabular-nums; }
[data-level="0"] { background: #141B3C; } [data-level="1"] { background: #3A1C33; } [data-level="2"] { background: #5A2339; }
[data-level="3"] { background: #8A2C45; } [data-level="4"] { background: #C8435C; }
.dm-heat-cell.is-on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3); }
.dm-heat-cell:focus-visible { outline: 2px solid var(--dm-accent); outline-offset: 2px; }
.dm-heat-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--dm-text-muted); }
.dm-heat-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dm-heat-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dm-win { font-size: 12.5px; font-weight: 500; color: var(--dm-text-muted); margin-left: 8px; }

/* 환급 진행 막대 */
.dm-rf-bars { display: flex; flex-direction: column; gap: 12px; }
.dm-rf-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12.5px; color: var(--dm-text-muted); }
.dm-rf-row b { color: var(--dm-text); font-variant-numeric: tabular-nums; }
.dm-rf-row[data-rf-bar="conf"] b { color: #6EE7B7; }
.dm-rf-track { height: 22px; border-radius: 6px; background: var(--dm-surface-2); overflow: hidden; }
.dm-rf-track i { display: block; height: 100%; border-radius: 6px; }
.dm-rf-track .is-est { background: #1A2248; border: 1px solid var(--dm-border); } .dm-rf-track .is-claimed { background: #2B3A78; }
.dm-rf-track .is-conf { background: var(--dm-mint); } .dm-rf-track .is-pending { background: #F5B942; opacity: 0.8; }

/* 키워드 CPA 막대 */
.dm-kwbars { display: flex; flex-direction: column; gap: 10px; }
.dm-kwbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 12.5px; }
.dm-kwbar b { text-align: right; color: var(--dm-text-muted); font-variant-numeric: tabular-nums; }
.dm-kwbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-kwbar-track { position: relative; height: 18px; }
.dm-kwbar-track i { display: block; height: 100%; border-radius: 5px; }
.dm-kwbar-track em { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed #F5B942; }
.g-INCREASE { background: var(--dm-mint) !important; } .g-KEEP { background: var(--dm-blue) !important; } .g-REDUCE { background: var(--dm-red) !important; }
.g-WATCH { background: #56608A !important; } .g-REVIEW { background: #F5B942 !important; }
.dm-ref-key { width: 14px !important; height: 0 !important; border-top: 2px dashed #F5B942; background: none !important; border-radius: 0 !important; }
.dm-kw-chips { flex-wrap: wrap; width: fit-content; }
.dm-kw-chips button:disabled { opacity: 0.45; cursor: default; }
.dm-sum-row th, .dm-sum-row td { border-top: 1px solid var(--dm-border); }

@media (max-width: 1100px) {
  .dm-kpis3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .dm-kpi3 { padding: 14px; }
  .dm-kpi3-value { font-size: 24px; }
  .dm-kwbar { grid-template-columns: 96px minmax(0, 1fr) 72px; }
  .dm-rf-row { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .dm-kw-chips { width: 100%; }
}

/* 콘솔 동기화(2026-11-08) — 단계 띠(광고 차단 요청 단계 · 환급 진행 현황), 사건 상세의 분류 버튼·요약·근거, 경고 이력 카드 넷 */
.dm-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.dm-steps li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dm-steps li + li::before { content: "→"; font-size: 12px; color: var(--dm-text-faint); }
.dm-steps span { font-size: 12.5px; font-weight: 600; color: var(--dm-text-muted); background: var(--dm-surface-3); border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.dm-steps .is-done span { color: var(--dm-text); }
.dm-steps .is-on span { color: #fff; background: var(--dm-accent); }
.dm-case-lead { margin: 0 0 10px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.dm-case-why { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dm-case-why li { position: relative; padding-left: 14px; font-size: 13.5px; line-height: 1.5; color: var(--dm-text-muted); }
.dm-case-why li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--dm-blue); }
.dm-case-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dm-kpis3.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dm-task-action { color: var(--dm-blue); font-weight: 700; }
@media (max-width: 760px) { .dm-kpis3.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 대시보드 KPI 셋의 기간·조회 시각 줄은 바로 위 "샘플 기간" 줄과 중복이라 숨긴다(콘솔 #ovKpis .ov-meta와 같은 처리). 다른 화면의 .dm-kpi3-meta는 그대로. */
.dm-kpis3[aria-label="주요 지표(샘플)"] .dm-kpi3-meta { display: none; }
