/* ════════════════════════════════════════════════════════════
 * Verdi CRM v4.19.0 — Compact Balanced Grid Dashboard
 * ════════════════════════════════════════════════════════════
 * AI 디자이너 최종 시안 (5h8gLz5r) 정밀 구현
 * 적용 원칙:
 *  · NON-DESTRUCTIVE: style.css / design-v4.18.css 뒤에 로드
 *  · 영향 범위: #page-dashboard 안에서만
 *  · 1920×1080 단일 화면 (스크롤 0회)
 *  · 4×4 균형 그리드 (12개 위젯)
 *  · 글자 ≥ 11px (가독성 보장)
 *
 * 롤백: index.html에서 이 link 한 줄 제거
 * ════════════════════════════════════════════════════════════ */

/* ─── 디자인 토큰 (v4.19) ───────────────────────────────── */
:root {
  /* 배경 그라데이션 */
  --v19-bg-start: #0b1220;
  --v19-bg-end:   #17253f;

  /* 카드 (글래스모피즘) */
  --v19-card-bg:     rgba(255, 255, 255, 0.04);
  --v19-card-border: rgba(255, 255, 255, 0.08);
  --v19-card-radius: 16px;
  --v19-card-padding: 16px;
  --v19-card-blur:   blur(20px);

  /* 텍스트 */
  --v19-text-main:   #F1F5F9;
  --v19-text-sub:    #94A3B8;
  --v19-text-muted:  #64748B;
  --v19-text-white:  #FFFFFF;

  /* 강조 색상 (KPI별) */
  --v19-acc-blue:    #3B82F6;
  --v19-acc-green:   #10B981;
  --v19-acc-gold:    #F59E0B;
  --v19-acc-red:     #EF4444;
  --v19-acc-teal:    #14B8A6;
  --v19-acc-purple:  #8B5CF6;
  --v19-acc-cyan:    #06B6D4;
  --v19-acc-orange:  #F97316;

  /* 글자 크기 */
  --v19-fs-kpi-value:  32px;
  --v19-fs-kpi-value-lg: 40px;  /* 영업이익 강조 */
  --v19-fs-kpi-label:  13px;
  --v19-fs-section:    15px;
  --v19-fs-body:       13px;
  --v19-fs-meta:       11px;

  /* 간격 */
  --v19-gap:         12px;
  --v19-page-pad:    16px;
}

/* ═══════════════════════════════════════════
 * 0) 페이지 배경 (대시보드 한정)
 * ═══════════════════════════════════════════ */
#page-dashboard {
  background: linear-gradient(135deg, var(--v19-bg-start), var(--v19-bg-end));
  min-height: calc(100vh - 56px);
  padding: var(--v19-page-pad) !important;
  color: var(--v19-text-main);
  font-family: 'Inter', 'Noto Sans KR', 'Noto Sans TC', sans-serif;
}

/* 기존 dashboard-grid 컨테이너 초기화 */
#page-dashboard .dashboard-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--v19-gap) !important;
}

/* ═══════════════════════════════════════════
 * 1) v4.19 메인 4×4 그리드 컨테이너
 *    Row 1: 4 KPI (1fr × 4)
 *    Row 2: 영업이익 + 진출국가 + 매출트렌드 + 거래파이프라인
 *    Row 3: 대만히트맵 + 활동통계 + 채널도넛 + 상태도넛
 *    Row 4: 법인P&L + TOP5(2칸) + 최근동향
 * ═══════════════════════════════════════════ */
.v19-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-auto-rows: minmax(0, 1fr);
  gap: var(--v19-gap);
  /* 4행이 한 화면(약 1016px 콘텐츠 영역)에 들어가도록 */
  height: calc(100vh - 56px - 2 * var(--v19-page-pad));
}

/* 공통 카드 스타일 */
.v19-card {
  background: var(--v19-card-bg);
  border: 1px solid var(--v19-card-border);
  border-radius: var(--v19-card-radius);
  padding: var(--v19-card-padding);
  backdrop-filter: var(--v19-card-blur);
  -webkit-backdrop-filter: var(--v19-card-blur);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.v19-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.v19-card.clickable { cursor: pointer; }

/* 카드 헤더 */
.v19-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.v19-card-title {
  font-size: var(--v19-fs-section);
  font-weight: 600;
  color: var(--v19-text-main);
  line-height: 1.2;
  letter-spacing: 0.1px;
}
.v19-card-sub {
  font-size: var(--v19-fs-meta);
  color: var(--v19-text-sub);
}
/* 앵커(<a>)로 쓰일 때 기본 브라우저 스타일 제거 + hover 강조 */
a.v19-card-sub {
  text-decoration: none;
  color: var(--v19-text-sub);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
a.v19-card-sub:hover {
  color: var(--v19-gold, #d4af37);
  background: rgba(212,175,55,0.10);
  border-color: rgba(212,175,55,0.45);
  transform: translateX(2px);
}
a.v19-card-sub:focus-visible {
  outline: 2px solid var(--v19-gold, #d4af37);
  outline-offset: 2px;
}
.v19-card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ═══════════════════════════════════════════
 * 2) KPI 카드 (스파크라인 + 변동률 배지)
 * ═══════════════════════════════════════════ */
.v19-kpi {
  position: relative;
}
.v19-kpi-label {
  font-size: var(--v19-fs-kpi-label);
  font-weight: 500;
  color: var(--v19-text-sub);
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}
.v19-kpi-value {
  font-size: var(--v19-fs-kpi-value);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.v19-kpi-value.lg { font-size: var(--v19-fs-kpi-value-lg); }

/* 변동률 배지 (우상단) */
.v19-trend-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.v19-trend-badge.up   { background: rgba(16,185,129,0.15); color: #34D399; }
.v19-trend-badge.down { background: rgba(239,68,68,0.15);  color: #F87171; }
.v19-trend-badge i { font-size: 9px; }

/* 스파크라인 영역 */
.v19-spark {
  height: 36px;
  margin-top: auto;
  position: relative;
}
.v19-spark canvas { width: 100% !important; height: 100% !important; }

/* KPI 색상별 값 (data-kpi 속성) */
.v19-kpi[data-kpi="customer"] .v19-kpi-value { color: var(--v19-acc-blue); }
.v19-kpi[data-kpi="active"]   .v19-kpi-value { color: var(--v19-acc-green); }
.v19-kpi[data-kpi="revenue"]  .v19-kpi-value { color: var(--v19-acc-gold); }
.v19-kpi[data-kpi="expense"]  .v19-kpi-value { color: var(--v19-acc-red); }
.v19-kpi[data-kpi="profit"]   .v19-kpi-value { color: var(--v19-acc-teal); }
.v19-kpi[data-kpi="country"]  .v19-kpi-value { color: var(--v19-text-white); }

/* 영업이익 카드 — 양수/음수 색상 */
.v19-kpi[data-kpi="profit"].negative .v19-kpi-value { color: var(--v19-acc-red); }

/* 골드 글로우 (값 변경) */
.v19-kpi.flash .v19-kpi-value {
  animation: v19-gold-flash 0.6s ease-out;
}
@keyframes v19-gold-flash {
  0% { text-shadow: 0 0 0 rgba(255,215,0,0); }
  40% { text-shadow: 0 0 14px rgba(255,215,0,0.9); }
  100% { text-shadow: 0 0 0 rgba(255,215,0,0); }
}

/* ═══════════════════════════════════════════
 * 3) 진출 국가 카드 (세계 지도 + dot)
 * ═══════════════════════════════════════════ */
.v19-country-map {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 60px;
}
.v19-country-map svg {
  width: 100%;
  max-width: 200px;
  height: auto;
  opacity: 0.35;
}
.v19-country-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--v19-acc-cyan);
  box-shadow: 0 0 10px rgba(6,182,212,0.8), 0 0 4px rgba(6,182,212,1);
  animation: v19-pulse 2s ease-in-out infinite;
}
@keyframes v19-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* ═══════════════════════════════════════════
 * 4) 매출 트렌드 차트 카드
 * ═══════════════════════════════════════════ */
.v19-trend-legend {
  display: flex;
  gap: 12px;
  font-size: var(--v19-fs-meta);
  color: var(--v19-text-sub);
}
.v19-trend-legend .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.v19-chart-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}

/* ═══════════════════════════════════════════
 * 5) 거래 파이프라인 (Funnel)
 * ═══════════════════════════════════════════ */
.v19-funnel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
  justify-content: center;
}
.v19-funnel-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--v19-fs-meta);
}
.v19-funnel-stage .label {
  width: 56px;
  color: var(--v19-text-sub);
  font-weight: 500;
  text-align: right;
  flex-shrink: 0;
}
.v19-funnel-stage .bar-wrap {
  flex: 1;
  height: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}
.v19-funnel-stage .bar {
  height: 100%;
  border-radius: 7px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.v19-funnel-stage .count {
  width: 22px;
  text-align: right;
  font-weight: 700;
  color: var(--v19-text-main);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.v19-funnel-stage[data-stage="estimate"]   .bar { background: var(--v19-acc-cyan); }
.v19-funnel-stage[data-stage="contracted"] .bar { background: var(--v19-acc-blue); }
.v19-funnel-stage[data-stage="invoiced"]   .bar { background: var(--v19-acc-orange); }
.v19-funnel-stage[data-stage="paid"]       .bar { background: var(--v19-acc-green); }
.v19-funnel-stage[data-stage="cancelled"]  .bar { background: var(--v19-acc-red); }
.v19-funnel-stage[data-stage="cancelled"]  .label,
.v19-funnel-stage[data-stage="cancelled"]  .count { opacity: 0.65; text-decoration: line-through; }

/* ═══════════════════════════════════════════
 * 6) 대만 히트맵
 * ═══════════════════════════════════════════ */
.v19-heatmap {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-content: center;
}
.v19-heat-region {
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--v19-fs-body);
  border-left: 3px solid transparent;
  background: rgba(255,255,255,0.03);
}
.v19-heat-region .name { color: var(--v19-text-main); font-weight: 500; }
.v19-heat-region .val  { font-weight: 700; font-variant-numeric: tabular-nums; }
.v19-heat-region[data-heat="1"] { border-color: #EF4444; background: rgba(239,68,68,0.10); }
.v19-heat-region[data-heat="1"] .val { color: #FCA5A5; }
.v19-heat-region[data-heat="2"] { border-color: #F97316; background: rgba(249,115,22,0.10); }
.v19-heat-region[data-heat="2"] .val { color: #FDBA74; }
.v19-heat-region[data-heat="3"] { border-color: #F59E0B; background: rgba(245,158,11,0.10); }
.v19-heat-region[data-heat="3"] .val { color: #FCD34D; }
.v19-heat-region[data-heat="4"] { border-color: #10B981; background: rgba(16,185,129,0.08); }
.v19-heat-region[data-heat="4"] .val { color: #6EE7B7; }
.v19-heat-region[data-heat="5"] { border-color: #3B82F6; background: rgba(59,130,246,0.08); }
.v19-heat-region[data-heat="5"] .val { color: #93C5FD; }
.v19-heat-region[data-heat="6"] { border-color: #8B5CF6; background: rgba(139,92,246,0.08); }
.v19-heat-region[data-heat="6"] .val { color: #C4B5FD; }

/* ═══════════════════════════════════════════
 * 7) 활동 통계 (2×3 mini grid)
 * ═══════════════════════════════════════════ */
.v19-stats-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  align-content: center;
}
.v19-stat-tile {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.v19-stat-tile .label {
  font-size: var(--v19-fs-meta);
  color: var(--v19-text-sub);
  margin-bottom: 2px;
}
.v19-stat-tile .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--v19-text-main);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* ═══════════════════════════════════════════
 * 8) 도넛 차트 카드 (채널/상태)
 * ═══════════════════════════════════════════ */
.v19-donut-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
}
.v19-donut-canvas {
  flex: 0 0 50%;
  height: 100%;
  position: relative;
  min-height: 0;
}
.v19-donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--v19-fs-meta);
  color: var(--v19-text-sub);
  overflow: hidden;
}
.v19-donut-legend .item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v19-donut-legend .item .swatch {
  width: 8px; height: 8px; border-radius: 2px;
  flex-shrink: 0;
}
.v19-donut-legend .item .pct {
  margin-left: auto;
  color: var(--v19-text-main);
  font-weight: 600;
}

/* ═══════════════════════════════════════════
 * 9) 법인 P&L 표
 * ═══════════════════════════════════════════ */
.v19-pnl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--v19-fs-body);
}
.v19-pnl-table th,
.v19-pnl-table td {
  padding: 6px 6px;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-variant-numeric: tabular-nums;
}
.v19-pnl-table th:first-child,
.v19-pnl-table td:first-child {
  text-align: left;
  color: var(--v19-text-main);
  font-weight: 500;
}
.v19-pnl-table th {
  color: var(--v19-text-sub);
  font-weight: 500;
  font-size: var(--v19-fs-meta);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.v19-pnl-table tr.total td {
  font-weight: 700;
  color: var(--v19-text-white);
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: none;
  padding-top: 8px;
}
.v19-pnl-table .profit-pos { color: #6EE7B7; font-weight: 600; }
.v19-pnl-table .profit-neg { color: #FCA5A5; font-weight: 600; }

/* ═══════════════════════════════════════════
 * 10) TOP 5 고객 (가로 5개 미니 프로필)
 * ═══════════════════════════════════════════ */
.v19-top5 {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  min-height: 0;
}
.v19-top5-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  overflow: hidden;
}
.v19-top5-card .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v19-acc-blue), var(--v19-acc-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.v19-top5-card .name {
  font-size: var(--v19-fs-meta);
  color: var(--v19-text-main);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.v19-top5-card .channel {
  font-size: 10px;
  color: var(--v19-text-sub);
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 8px;
}
.v19-top5-card .amount {
  font-size: var(--v19-fs-body);
  font-weight: 700;
  color: var(--v19-acc-gold);
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}
.v19-top5-card .status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  position: absolute;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
 * 11) 최근 동향 활동 피드
 * ═══════════════════════════════════════════ */
.v19-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
}
.v19-feed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
.v19-feed-item .icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
  flex-shrink: 0;
}
.v19-feed-item .body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.v19-feed-item .title {
  font-size: var(--v19-fs-body);
  color: var(--v19-text-main);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v19-feed-item .time {
  font-size: 10px;
  color: var(--v19-text-sub);
}
.v19-feed-item[data-feed="success"] .icon { background: var(--v19-acc-green); }
.v19-feed-item[data-feed="info"]    .icon { background: var(--v19-acc-blue); }
.v19-feed-item[data-feed="warn"]    .icon { background: var(--v19-acc-orange); }
.v19-feed-item[data-feed="alert"]   .icon { background: var(--v19-acc-red); }

/* ═══════════════════════════════════════════
 * 12) Grid Span 클래스 (Row 4: TOP5 wide)
 * ═══════════════════════════════════════════ */
.v19-span-2 { grid-column: span 2; }
.v19-span-3 { grid-column: span 3; }
.v19-span-4 { grid-column: span 4; }

/* ═══════════════════════════════════════════
 * 13) v4.18 기존 위젯 숨김 (v4.19 그리드로 대체)
 * ═══════════════════════════════════════════ */
#page-dashboard .kpi-section,
#page-dashboard .v18-dashboard-grid,
#page-dashboard .v18-feed-section,
#page-dashboard #entity-income-statement,
#page-dashboard #dash-report-stats,
#page-dashboard .charts-section,
#page-dashboard .dash-prj-section,
#page-dashboard .bottom-section {
  display: none !important;
}
/* v4.19 그리드만 표시 */
#page-dashboard .v19-grid { display: grid !important; }

/* ═══════════════════════════════════════════
 * 14) 반응형 (1366 / 992 / 768)
 * ═══════════════════════════════════════════ */
@media (max-width: 1366px) {
  :root {
    --v19-fs-kpi-value: 28px;
    --v19-fs-kpi-value-lg: 34px;
    --v19-fs-kpi-label: 12px;
    --v19-fs-section: 14px;
    --v19-gap: 10px;
  }
  .v19-grid { height: auto; min-height: calc(100vh - 56px - 2 * var(--v19-page-pad)); }
}
@media (max-width: 992px) {
  .v19-grid {
    grid-template-columns: 1fr 1fr;
    height: auto;
  }
  .v19-span-2, .v19-span-3, .v19-span-4 { grid-column: span 2; }
  .v19-top5 { grid-template-columns: repeat(3, 1fr); }
  :root {
    --v19-fs-kpi-value: 30px;
    --v19-fs-kpi-value-lg: 36px;
    --v19-fs-kpi-label: 13px;
  }
}
@media (max-width: 768px) {
  .v19-grid { grid-template-columns: 1fr; }
  .v19-span-2, .v19-span-3, .v19-span-4 { grid-column: span 1; }
  .v19-top5 { grid-template-columns: repeat(2, 1fr); }
  .v19-donut-wrap { flex-direction: column; }
  .v19-donut-canvas { flex: 0 0 50%; width: 100%; }
}

/* ═══════════════════════════════════════════
 * 15) 이달 보고서 랭킹 위젯 (v4.25.0)
 * ═══════════════════════════════════════════ */
#v19-report-ranking-card .v19-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 6px;
}

/* 탭 버튼 */
.v19-rank-tab {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.v19-rank-tab:hover {
  background: rgba(99,102,241,0.2);
  color: #c7d2fe;
}
.v19-rank-tab.active {
  background: rgba(99,102,241,0.35);
  border-color: #6366f1;
  color: #a5b4fc;
}

/* 랭킹 바디 */
.v19-ranking-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  min-height: 0;
}

/* 랭킹 행 */
.v19-rank-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  border-radius: 6px;
  transition: background 0.15s;
}
.v19-rank-row:hover {
  background: rgba(255,255,255,0.04);
}

/* 메달 */
.v19-rank-medal {
  font-size: 16px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  line-height: 1;
}

/* 이름 + 바 */
.v19-rank-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.v19-rank-name {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v19-rank-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.v19-rank-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* 건수 */
.v19-rank-cnt {
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
  flex-shrink: 0;
  text-align: right;
  min-width: 28px;
}
.v19-rank-cnt small {
  font-size: 10px;
  font-weight: 400;
  color: #64748b;
  margin-left: 1px;
}

/* ════════════════════════════════════════════
 * Section 16: 오늘의 최고 보고서 위젯 (v4.26.0)
 * ════════════════════════════════════════════ */

/* 위젯 바디 래퍼 */
#v19-best-report-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

/* 로딩 상태 */
.v19br-loading {
  color: #818cf8;
  font-size: 11px;
  padding: 20px 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 비어있을 때 */
.v19br-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  text-align: center;
}

/* 메인 카드 */
.v19br-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 4px;
}

/* 클릭 가능 카드 */
.v19br-clickable {
  cursor: pointer;
  position: relative;
  border-radius: 10px;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  padding: 8px 8px 4px;
}
.v19br-clickable:hover {
  background: rgba(99, 102, 241, 0.07);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}
.v19br-clickable:active {
  transform: translateY(0);
}

/* PDF 힌트 배지 (우측 상단 고정) */
.v19br-pdf-hint {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  color: #f87171;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.v19br-clickable:hover .v19br-pdf-hint {
  opacity: 1;
}

/* 헤더: 작성자 + 배지 */
.v19br-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.v19br-author {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.v19br-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.v19br-author-name {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v19br-date {
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

/* 복합점수 배지 */
.v19br-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  flex-shrink: 0;
  cursor: default;
}

/* 지표 3개 (댓글 · 글자 · 항목) */
.v19br-metrics {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.v19br-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-right: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.v19br-metric:last-child {
  border-right: none;
}
.v19br-metric:hover {
  background: rgba(255,255,255,0.04);
}
.v19br-metric i {
  font-size: 12px;
}
.v19br-metric-val {
  font-size: 16px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1;
}
.v19br-metric-lbl {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}

/* 업무 항목 태그 줄 */
.v19br-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.v19br-item-tag {
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  color: #a5b4fc;
  font-weight: 500;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v19br-item-tag.v19br-item-more {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: #64748b;
}

/* 댓글 미리보기 */
.v19br-comment-preview {
  display: flex;
  align-items: baseline;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid rgba(99,102,241,0.4);
  border-radius: 0 6px 6px 0;
  padding: 5px 8px;
  min-height: 0;
}
.v19br-cmt-text {
  font-size: 11px;
  color: #94a3b8;
  flex: 1;
  line-height: 1.4;
  word-break: break-all;
}
.v19br-cmt-author {
  font-size: 10px;
  color: #475569;
  flex-shrink: 0;
  margin-left: 4px;
  white-space: nowrap;
}
