/* ==========================================================================
   장마트(JANG MART) 2025 경영 실적 대시보드 스타일시트
   - 디자인 시스템: Deep Navy/Slate 다크 테마 & 글래스모피즘
   - 타이포그래피: Pretendard
   - 반응형 레이아웃: CSS Grid & Flexbox
   - 실무 지원: A4 가로 인쇄 최적화 (@media print), 접근성 (prefers-reduced-motion)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (디자인 토큰 시스템)
   -------------------------------------------------------------------------- */
:root {
  /* 배경 및 서피스 컬러 */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-input: #1e293b;

  /* 테두리 및 라인 컬러 */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(56, 189, 248, 0.4);

  /* 텍스트 컬러 */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #0f172a;

  /* 브랜드 & 포인트 액센트 컬러 */
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-indigo: #6366f1;
  --trend-up: #10b981;
  --trend-down: #ef4444;

  /* RFM 등급 컬러 */
  --grade-a: #ec4899;   /* VIP 핑크 */
  --grade-b: #3b82f6;   /* 충성고객 블루 */
  --grade-c: #10b981;   /* 잠재고객 에메랄드 */
  --grade-d: #f59e0b;   /* 이탈우려 앰버 */

  /* 글래스모피즘 및 그림자 */
  --glass-blur: blur(16px);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* 라운딩 및 트랜지션 */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. Base & Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

/* 접근성 숨김 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout Structure
   -------------------------------------------------------------------------- */
.dashboard-container {
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* --------------------------------------------------------------------------
   4. Global Header
   -------------------------------------------------------------------------- */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-badge-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.title-group .main-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.title-group .sub-title {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.metadata-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 500;
}

.badge-primary {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-primary .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.badge-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.badge-outline strong {
  color: var(--text-main);
  font-weight: 600;
}

.badge-ghost {
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* 버튼 스타일 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
  font-family: inherit;
  text-decoration: none;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-main);
  border-color: var(--border-card);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   5. KPI Summary Cards Grid (6 Cards)
   -------------------------------------------------------------------------- */
.kpi-section {
  width: 100%;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-card.card-glow {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.2) 0%, rgba(17, 24, 39, 0.8) 100%);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-tag {
  font-size: 0.725rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.kpi-tag.highlight-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

.kpi-tag.highlight-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.badge-trend-up {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-trend-up .trend-icon {
  width: 14px;
  height: 14px;
}

.kpi-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
}

.kpi-number {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-subtext {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.kpi-subtext strong {
  color: var(--text-muted);
  font-weight: 600;
}

/* KPI 6: 이중 지표 레이아웃 */
.kpi-dual-values {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.dual-item {
  display: flex;
  flex-direction: column;
}

.dual-label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.dual-number {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.dual-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-card);
}

.text-accent-purple { color: #c084fc; }
.text-accent-cyan { color: #22d3ee; }

/* --------------------------------------------------------------------------
   6. Visualization Charts Section
   -------------------------------------------------------------------------- */
.charts-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.charts-row {
  display: grid;
  gap: 24px;
}

.grid-2-col {
  grid-template-columns: repeat(2, 1fr);
}

.dashboard-chart-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.card-title-group .card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.card-title-group .card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.card-legend-tags {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-indicator {
  display: inline-block;
  border-radius: 2px;
}

.bar-indicator {
  width: 10px;
  height: 10px;
  background-color: #3b82f6;
}

.line-indicator {
  width: 14px;
  height: 3px;
  background-color: #10b981;
}

.card-content {
  position: relative;
  width: 100%;
}

/* 캔버스 부모 래퍼 (Chart.js 무한 확대 버그 방지 핵심) */
.chart-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
}

.bar-h-wrapper {
  height: 380px;
}

.donut-wrapper {
  width: 48%;
  height: 280px;
  flex-shrink: 0;
}

.donut-wrapper-sm {
  width: 100%;
  height: 260px;
}

/* 차트 2: 채널 비중 Flex 레이아웃 */
.flex-row-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.channel-stats-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 50%;
}

.stat-box {
  padding: 16px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.stat-box:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: var(--border-card);
}

.stat-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.channel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.offline-dot { background-color: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.5); }
.online-dot { background-color: #06b6d4; box-shadow: 0 0 8px rgba(6, 182, 212, 0.5); }

.stat-box-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.stat-box-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.stat-highlight {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-box-footer {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* 차트 4: RFM 세그먼트 Flex + Grid 레이아웃 */
.rfm-combined-content {
  display: flex;
  gap: 20px;
  align-items: center;
}

.rfm-chart-area {
  width: 38%;
  flex-shrink: 0;
}

.rfm-cards-grid {
  width: 62%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rfm-summary-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition-fast);
}

.rfm-summary-card:hover {
  background: rgba(30, 41, 59, 0.75);
  transform: translateY(-2px);
}

.rfm-summary-card.grade-a { border-left: 4px solid var(--grade-a); }
.rfm-summary-card.grade-b { border-left: 4px solid var(--grade-b); }
.rfm-summary-card.grade-c { border-left: 4px solid var(--grade-c); }
.rfm-summary-card.grade-d { border-left: 4px solid var(--grade-d); }

.rfm-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-grade {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.grade-a-badge { background: rgba(236, 72, 153, 0.18); color: #f472b6; }
.grade-b-badge { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.grade-c-badge { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.grade-d-badge { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }

.rfm-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rfm-metric-row {
  display: flex;
  flex-direction: column;
  font-size: 0.775rem;
  color: var(--text-muted);
  gap: 2px;
}

.rfm-metric-row strong {
  color: var(--text-main);
}

.rfm-action-desc {
  font-size: 0.725rem;
  color: var(--text-dim);
  line-height: 1.35;
  margin-top: 2px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 4px;
}

/* --------------------------------------------------------------------------
   7. Global Footer
   -------------------------------------------------------------------------- */
.dashboard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.8rem;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-footer {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   8. Toast Notification System (Antigravity Rule)
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-success {
  background: rgba(6, 78, 59, 0.9);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.toast-warning {
  background: rgba(120, 53, 15, 0.9);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.toast-error {
  background: rgba(127, 29, 29, 0.9);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* --------------------------------------------------------------------------
   9. Responsive Media Queries (반응형 대응)
   -------------------------------------------------------------------------- */

/* 데스크톱 중형 / 랩톱 (1280px 이하) */
@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bar-h-wrapper {
    height: 360px;
  }
}

/* 태블릿 가로 / 소형 랩톱 (1024px 이하) */
@media (max-width: 1024px) {
  .dashboard-container {
    padding: 16px 20px 36px;
    gap: 20px;
  }

  .grid-2-col {
    grid-template-columns: 1fr;
  }

  .flex-row-content {
    flex-direction: column;
    align-items: stretch;
  }

  .donut-wrapper {
    width: 100%;
    height: 260px;
  }

  .channel-stats-container {
    width: 100%;
    flex-direction: row;
  }

  .channel-stats-container .stat-box {
    flex: 1;
  }

  .rfm-combined-content {
    flex-direction: column;
    align-items: stretch;
  }

  .rfm-chart-area {
    width: 100%;
  }

  .rfm-cards-grid {
    width: 100%;
  }
}

/* 태블릿 세로 (768px 이하) */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .actions-group {
    width: 100%;
  }

  .actions-group .btn {
    flex: 1;
    justify-content: center;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .channel-stats-container {
    flex-direction: column;
  }

  .rfm-cards-grid {
    grid-template-columns: 1fr;
  }

  .chart-wrapper {
    height: 280px;
  }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
  .dashboard-container {
    padding: 12px 14px 28px;
    gap: 16px;
  }

  .title-group .main-title {
    font-size: 1.25rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .actions-group {
    flex-direction: column;
  }

  .actions-group .btn {
    width: 100%;
  }

  .kpi-number {
    font-size: 1.45rem;
  }

  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .toast {
    min-width: unset;
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   10. Accessibility (동작 줄이기 설정)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .badge-primary .status-dot {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   11. Print Stylesheet (A4 용지 가로 인쇄 최적화)
   -------------------------------------------------------------------------- */
@page {
  size: A4 landscape;
  margin: 12mm 10mm;
}

@media print {
  /* 배경을 순수 화이트로 전환 및 글래스모피즘 해제 */
  body {
    background: #ffffff !important;
    color: #111827 !important;
    background-image: none !important;
  }

  .dashboard-container {
    max-width: 100% !important;
    padding: 0 !important;
    gap: 16px !important;
  }

  /* 비인쇄 불필요 요소 숨김 (버튼 및 토스트 알림) */
  .actions-group,
  .toast-container {
    display: none !important;
  }

  /* 글로벌 헤더 인쇄 스타일 */
  .dashboard-header {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
  }

  .title-group .main-title {
    color: #0f172a !important;
    font-size: 1.25rem !important;
  }

  .title-group .sub-title {
    color: #475569 !important;
  }

  .badge-outline {
    border-color: #cbd5e1 !important;
    color: #334155 !important;
  }

  .badge-outline strong {
    color: #0f172a !important;
  }

  /* KPI 카드 인쇄 스타일 (그림자 제거, 선명한 외곽선) */
  .kpi-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 8px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .kpi-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    padding: 12px !important;
    border-radius: 6px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .kpi-card::before {
    display: none !important;
  }

  .kpi-label {
    color: #475569 !important;
  }

  .kpi-number {
    color: #0f172a !important;
    font-size: 1.25rem !important;
  }

  .kpi-subtext {
    color: #64748b !important;
  }

  .dual-number {
    color: #0f172a !important;
  }

  .dual-divider {
    background-color: #cbd5e1 !important;
  }

  /* 차트 카드 및 컨테이너 */
  .charts-section {
    gap: 16px !important;
  }

  .charts-row {
    gap: 14px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .grid-2-col {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .dashboard-chart-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    padding: 16px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .card-title-group .card-title {
    color: #0f172a !important;
    font-size: 1rem !important;
  }

  .card-title-group .card-desc {
    color: #64748b !important;
  }

  .card-badge {
    background: #f1f5f9 !important;
    color: #0369a1 !important;
    border-color: #bae6fd !important;
  }

  .chart-wrapper {
    height: 240px !important;
  }

  .bar-h-wrapper {
    height: 260px !important;
  }

  .donut-wrapper {
    height: 220px !important;
  }

  .donut-wrapper-sm {
    height: 200px !important;
  }

  .stat-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
  }

  .stat-highlight {
    color: #0f172a !important;
  }

  .rfm-summary-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .rfm-summary-card.grade-a { border-left-color: #db2777 !important; }
  .rfm-summary-card.grade-b { border-left-color: #2563eb !important; }
  .rfm-summary-card.grade-c { border-left-color: #059669 !important; }
  .rfm-summary-card.grade-d { border-left-color: #d97706 !important; }

  .rfm-metric-row strong {
    color: #0f172a !important;
  }

  .dashboard-footer {
    border-top: 1px solid #cbd5e1 !important;
    color: #64748b !important;
  }
}
