/* Moart 신규 1차 메뉴: 방문자통계 · 모아트 호스팅 (라이트 & 다크 모드) */
.mvs-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 28px;
}
.mvs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mvs-head-badges {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.mvs-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}
.mvs-pill.is-emerald { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.mvs-pill.is-indigo { background: #eef2ff; border: 1px solid #c7d2fe; color: #4338ca; }
.mvs-title { margin: 0; font-size: 22px; font-weight: 900; color: #0f172a; }
.mvs-sub { margin: 4px 0 0; font-size: 13px; color: #64748b; }
.mvs-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mvs-days-seg {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.mvs-seg-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.mvs-seg-btn.is-active { background: #ffffff; color: #4f46e5; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08); }

.mvs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}
.mvs-btn--indigo { background: linear-gradient(135deg, #4f46e5, #6366f1); color: #ffffff; }
.mvs-btn--outline { background: #ffffff; border-color: #cbd5e1; color: #0f172a; }

.mvs-alert { padding: 11px 15px; border-radius: 12px; font-size: 12.5px; font-weight: 700; }
.mvs-alert.is-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.mvs-alert.is-err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.mvs-alert.is-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.mvs-lock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffbeb 0%, #eef2ff 100%);
  border: 1.5px solid #c7d2fe;
}
.mvs-lock-banner__left { display: flex; align-items: flex-start; gap: 12px; color: #312e81; }
.mvs-lock-banner__left strong { display: block; font-size: 14px; font-weight: 800; }
.mvs-lock-banner__left p { margin: 4px 0 0; font-size: 12.5px; color: #475569; }

.mvs-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mvs-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mvs-kpi-label { font-size: 12px; font-weight: 700; color: #64748b; }
.mvs-kpi-val { font-size: 24px; font-weight: 900; color: #0f172a; font-variant-numeric: tabular-nums; }
.mvs-kpi-sub { font-size: 11.5px; font-weight: 700; color: #64748b; }
.mvs-kpi-sub.is-emerald { color: #059669; }

.mvs-split-grid { display: grid; grid-template-columns: minmax(0, 62%) minmax(0, 38%); gap: 16px; }
.mvs-split-grid.is-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.mvs-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mvs-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mvs-card-head h2 { margin: 0; font-size: 15px; font-weight: 800; color: #0f172a; }
.mvs-card-sub { font-size: 11.5px; font-weight: 700; color: #64748b; }
.mvs-card-desc { margin: 4px 0 0; font-size: 12px; color: #64748b; }

.mvs-chart-svg { width: 100%; height: auto; display: block; }
.mvs-chart-grid { stroke: #e2e8f0; stroke-width: 1; stroke-dasharray: 3 3; }
.mvs-chart-axis { fill: #64748b; font-size: 10.5px; font-weight: 600; }

.mvs-bar-list, .mvs-funnel-list { display: flex; flex-direction: column; gap: 10px; }
.mvs-bar-row { display: flex; flex-direction: column; gap: 4px; }
.mvs-bar-top { display: flex; justify-content: space-between; font-size: 12px; color: #334155; font-weight: 700; }
.mvs-bar-track { height: 9px; border-radius: 999px; background: #f1f5f9; overflow: hidden; flex: 1; }
.mvs-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4f46e5, #6366f1); }
.mvs-bar-fill.is-emerald { background: linear-gradient(90deg, #059669, #10b981); }
.mvs-device-pills { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; border-top: 1px dashed #e2e8f0; }
.mvs-dev-pill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f8fafc; border: 1px solid #e2e8f0; color: #334155; }

.mvs-hourly-grid { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; align-items: end; height: 132px; padding-top: 8px; }
.mvs-hour-col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.mvs-hour-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.mvs-hour-bar { width: 100%; border-radius: 4px 4px 0 0; background: #6366f1; min-height: 4px; }
.mvs-hour-lbl { font-size: 9.5px; color: #64748b; height: 12px; }

.mvs-funnel-row { display: grid; grid-template-columns: 126px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 12px; }
.mvs-funnel-lbl { font-weight: 700; color: #334155; }
.mvs-funnel-val { text-align: right; font-weight: 800; color: #059669; }

.mvs-filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mvs-filter-tab {
  padding: 5px 11px; border-radius: 999px; border: 1px solid #cbd5e1;
  background: #ffffff; color: #475569; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.mvs-filter-tab.is-active { background: #0f172a; border-color: #0f172a; color: #ffffff; }

.mvs-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 12px; }
.mvs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mvs-table th { background: #f8fafc; color: #475569; font-weight: 800; padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.mvs-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #1e293b; }
.mvs-table tr.is-locked td { background: rgba(248, 250, 252, 0.72); }
.mvs-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid #e2e8f0; display: block; background: #0f172a; }
.mvs-name-cell { display: flex; flex-direction: column; gap: 3px; max-width: 240px; }
.mvs-name-cell strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0f172a; }
.mvs-src-badge { align-self: flex-start; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.mvs-url-code {
  display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 4px 8px; border-radius: 7px; background: #f8fafc; border: 1px solid #e2e8f0; color: #334155; font-size: 11.5px;
}
.mvs-url-masked {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 7px;
  background: #f1f5f9; border: 1px dashed #94a3b8; color: #64748b; font-size: 11.5px; font-weight: 700; user-select: none;
}
.mvs-row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.mvs-mini-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 8px;
  border: 1px solid #cbd5e1; background: #ffffff; color: #334155; font-size: 11.5px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.mvs-mini-btn.is-primary { background: #4f46e5; border-color: #4f46e5; color: #ffffff; }
.mvs-mini-btn.is-locked { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.mvs-empty-cell { text-align: center; color: #64748b; padding: 28px !important; }

.mvs-policy-foot {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; font-size: 12px; font-weight: 700; color: #475569;
}

/* 모달 */
.mvs-modal-backdrop {
  position: fixed; inset: 0; z-index: 9999; background: rgba(15, 23, 42, 0.58); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.mvs-modal {
  width: 100%; max-width: 540px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 18px;
  padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}
.mvs-modal__head { display: flex; justify-content: space-between; gap: 10px; }
.mvs-eyebrow { display: inline-block; font-size: 10.5px; font-weight: 800; color: #4f46e5; background: #eef2ff; padding: 3px 9px; border-radius: 999px; margin-bottom: 5px; }
.mvs-modal__title { margin: 0; font-size: 17px; font-weight: 800; color: #0f172a; }
.mvs-modal__close { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mvs-guide-body { display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: #334155; }
.mvs-guide-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 11px 13px; }
.mvs-guide-box.is-note { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.mvs-guide-box strong { display: block; margin-bottom: 5px; color: #0f172a; }
.mvs-guide-box p, .mvs-guide-box ul { margin: 0; line-height: 1.55; }
.mvs-guide-box ul { padding-left: 18px; }
.mvs-sub-summary { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.mvs-sub-row { display: flex; justify-content: space-between; font-size: 12.5px; color: #475569; }
.mvs-sub-row strong { color: #0f172a; font-weight: 800; }
.mvs-policy-warn { background: #fffbeb; border: 1px solid #fde68a; border-radius: 11px; padding: 11px 13px; font-size: 12px; color: #92400e; }
.mvs-policy-warn strong { display: block; margin-bottom: 4px; }
.mvs-policy-warn p { margin: 0; line-height: 1.5; }
.mvs-modal__foot { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 980px) {
  .mvs-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mvs-split-grid, .mvs-split-grid.is-even { grid-template-columns: 1fr; }
}

/* 다크 모드 */
html[data-theme="dark"] .mvs-title,
html[data-theme="dark"] .mvs-kpi-val,
html[data-theme="dark"] .mvs-card-head h2,
html[data-theme="dark"] .mvs-name-cell strong,
html[data-theme="dark"] .mvs-modal__title,
html[data-theme="dark"] .mvs-sub-row strong { color: #f8fafc; }
html[data-theme="dark"] .mvs-kpi-card,
html[data-theme="dark"] .mvs-card,
html[data-theme="dark"] .mvs-modal { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .mvs-days-seg,
html[data-theme="dark"] .mvs-bar-track,
html[data-theme="dark"] .mvs-table th,
html[data-theme="dark"] .mvs-url-code,
html[data-theme="dark"] .mvs-url-masked,
html[data-theme="dark"] .mvs-policy-foot,
html[data-theme="dark"] .mvs-guide-box,
html[data-theme="dark"] .mvs-sub-summary { background: #0f172a; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .mvs-seg-btn.is-active { background: #4f46e5; color: #ffffff; }
html[data-theme="dark"] .mvs-table td { color: #e2e8f0; border-bottom-color: #1e293b; }
html[data-theme="dark"] .mvs-table tr.is-locked td { background: rgba(15, 23, 42, 0.55); }
html[data-theme="dark"] .mvs-btn--outline,
html[data-theme="dark"] .mvs-mini-btn,
html[data-theme="dark"] .mvs-filter-tab { background: #0f172a; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .mvs-filter-tab.is-active { background: #4f46e5; border-color: #6366f1; }
html[data-theme="dark"] .mvs-lock-banner { background: linear-gradient(135deg, rgba(49, 46, 129, 0.35), rgba(30, 41, 59, 0.9)); border-color: #4338ca; }
html[data-theme="dark"] .mvs-lock-banner__left { color: #e0e7ff; }
html[data-theme="dark"] .mvs-lock-banner__left p { color: #cbd5e1; }

/* 리스트 클릭 상세보기 슬라이드 드로어 */
.mvs-clickable-row { cursor: pointer; transition: background-color 0.14s ease; }
.mvs-clickable-row:hover td { background: #f8fafc; }
.mvs-drawer-backdrop {
  position: fixed; inset: 0; z-index: 9998; background: rgba(15, 23, 42, 0.52); backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end;
}
.mvs-drawer {
  width: 100%; max-width: 520px; height: 100%; background: #ffffff; border-left: 1px solid #e2e8f0;
  display: flex; flex-direction: column; box-shadow: -16px 0 48px rgba(15, 23, 42, 0.22);
}
.mvs-drawer__head {
  padding: 18px 20px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.mvs-drawer__title { margin: 0; font-size: 16px; font-weight: 800; color: #0f172a; word-break: break-all; }
.mvs-drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.mvs-drawer-preview-wrap {
  flex-shrink: 0;
  border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; background: #f8fafc;
  display: flex; flex-direction: column;
}
.mvs-drawer-preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 11px; border-bottom: 1px solid #e2e8f0; background: #ffffff;
}
.mvs-preview-meta { font-size: 11.5px; font-weight: 700; color: #475569; }
.mvs-drawer-preview {
  width: 100%; max-height: 440px; overflow-y: auto; overflow-x: hidden;
  background: #f1f5f9; padding: 10px; box-sizing: border-box;
}
.mvs-drawer-preview img {
  width: 100%; height: auto; display: block; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}
.mvs-market-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.mvs-market-pill {
  padding: 5px 10px; border-radius: 999px; border: 1px solid #cbd5e1; background: #ffffff;
  color: #475569; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.mvs-market-pill.is-active { background: #eef2ff; border-color: #4f46e5; color: #4338ca; }
.mvs-drawer-primary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.mvs-list-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mvs-page-size-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mvs-page-count { font-size: 12px; font-weight: 700; color: #64748b; }
.mvs-page-size-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #475569; }
.mvs-page-size-select {
  padding: 5px 10px; border-radius: 8px; border: 1px solid #cbd5e1; background: #ffffff;
  color: #0f172a; font-size: 12px; font-weight: 700; cursor: pointer;
}
.mvs-pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 8px; flex-wrap: wrap;
}
.mvs-page-btn {
  min-width: 34px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #cbd5e1;
  background: #ffffff; color: #334155; font-size: 12px; font-weight: 700; cursor: pointer;
}
.mvs-page-btn.is-active { background: #4f46e5; border-color: #4f46e5; color: #ffffff; }
.mvs-page-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.mvs-lightbox-backdrop {
  position: fixed; inset: 0; z-index: 10010; background: rgba(15, 23, 42, 0.78); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.mvs-lightbox {
  width: 100%; max-width: 960px; max-height: 92vh; background: #ffffff; border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.mvs-lightbox__head {
  padding: 13px 18px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between;
}
.mvs-lightbox__head strong { font-size: 14px; font-weight: 800; color: #0f172a; }
.mvs-lightbox__body { flex: 1; overflow-y: auto; padding: 16px; background: #0f172a; text-align: center; }
.mvs-lightbox__body img { max-width: 100%; height: auto; display: inline-block; border-radius: 8px; }
.mvs-drawer-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mvs-drawer-box {
  flex-shrink: 0;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 13px 14px;
  display: flex; flex-direction: column; gap: 9px;
}
.mvs-drawer-box strong { font-size: 13px; color: #0f172a; }
.mvs-drawer-url {
  display: block; padding: 7px 10px; border-radius: 8px; background: #ffffff; border: 1px solid #cbd5e1;
  font-size: 11.5px; color: #334155; word-break: break-all;
}
.mvs-drawer-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mvs-drawer-kpis > div { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.mvs-drawer-kpis span { font-size: 11px; color: #64748b; font-weight: 700; }
.mvs-drawer-kpis strong { font-size: 17px; font-weight: 900; color: #4f46e5; }

html[data-theme="dark"] .mvs-clickable-row:hover td { background: rgba(51, 65, 85, 0.35); }
html[data-theme="dark"] .mvs-drawer { background: #1e293b; border-left-color: #334155; }
html[data-theme="dark"] .mvs-drawer__head { border-bottom-color: #334155; }
html[data-theme="dark"] .mvs-drawer__title,
html[data-theme="dark"] .mvs-drawer-box strong { color: #f8fafc; }
html[data-theme="dark"] .mvs-drawer-box,
html[data-theme="dark"] .mvs-drawer-url,
html[data-theme="dark"] .mvs-drawer-kpis > div { background: #0f172a; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .mvs-drawer-kpis strong { color: #a5b4fc; }
html[data-theme="dark"] .mvs-drawer-preview-wrap,
html[data-theme="dark"] .mvs-drawer-preview-bar,
html[data-theme="dark"] .mvs-lightbox,
html[data-theme="dark"] .mvs-lightbox__head { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .mvs-drawer-preview { background: #0f172a; }
html[data-theme="dark"] .mvs-preview-meta,
html[data-theme="dark"] .mvs-page-count,
html[data-theme="dark"] .mvs-page-size-label { color: #94a3b8; }
html[data-theme="dark"] .mvs-lightbox__head strong { color: #f8fafc; }
html[data-theme="dark"] .mvs-page-size-select,
html[data-theme="dark"] .mvs-page-btn,
html[data-theme="dark"] .mvs-market-pill { background: #0f172a; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .mvs-market-pill.is-active,
html[data-theme="dark"] .mvs-page-btn.is-active { background: #4f46e5; border-color: #6366f1; color: #ffffff; }
