/* ══════════════════════════════════════════════
   report.css — 주간·월간 리포트 카드 스타일
   ══════════════════════════════════════════════ */

/* ── 페이지 레이아웃 ── */
.rpt-content {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.rpt-page-header {
  margin-bottom: var(--space-5);
}

.rpt-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-1) 0;
}

.rpt-page-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ── 컨트롤 바 ── */
.rpt-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.rpt-mode-toggle {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 0;                /* 직선 처리 */
  padding: 2px;
}

.rpt-mode-btn {
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 0;                /* 직선 처리 */
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.rpt-mode-btn.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.rpt-period-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.rpt-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 0;                /* 직선 처리 */
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.rpt-nav-btn:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}

.rpt-period-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 160px;
  text-align: center;
}

.rpt-download-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: 0;                /* 직선 처리 */
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
}

.rpt-download-btn:hover {
  border-color: #D55E00;
  color: #D55E00;
}

/* ── 리포트 카드 ── */
.rpt-card-wrap {
  display: flex;
  justify-content: center;
}

.rpt-card {
  width: 7000px;
  max-width: 100%;
  background: #fff;
  border-radius: 0;                /* 직선 처리 */
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* 카드 헤더 */
.rpt-card-header {
  background: linear-gradient(135deg, #D55E00, #e8713a);
  color: #fff;
  padding: 24px 28px 20px;
}

.rpt-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.rpt-card-period {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ── 한줄 평가 ── */
.rpt-verdict {
  padding: 12px 28px;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
  background: #fef7f3;
  border-bottom: 1px solid #f0f0f0;
}

/* 카드 섹션 공통 */
.rpt-section {
  padding: 16px 28px;
  border-bottom: 1px solid #f0f0f0;
}

.rpt-section:last-of-type {
  border-bottom: none;
}

.rpt-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  margin-bottom: 10px;
}

/* ── KPI 그리드 ── */
.rpt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.rpt-kpi-item {
  text-align: center;
}

.rpt-kpi-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1f;
  line-height: 1.2;
}

.rpt-kpi-label {
  font-size: 0.7rem;
  color: #999;
  margin-top: 2px;
}

/* ── 스포츠별 소모 바 ── */
.rpt-sport-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.rpt-sport-row:last-child {
  margin-bottom: 0;
}

.rpt-sport-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  width: 48px;
  flex-shrink: 0;
}

.rpt-sport-bar-wrap {
  flex: 1;
  height: 18px;
  background: #f5f5f5;
  border-radius: 0;                /* 직선 처리 */
  overflow: hidden;
}

.rpt-sport-bar-fill {
  height: 100%;
  border-radius: 0;                /* 직선 처리 */
  transition: width 0.3s ease;
}

.rpt-sport-stat {
  font-size: 0.72rem;
  color: #777;
  white-space: nowrap;
  min-width: 140px;
  text-align: right;
}

/* ── 목표 달성률 ── */
.rpt-goal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: #555;
}

.rpt-goal-row:last-child {
  margin-bottom: 0;
}

.rpt-goal-bar-wrap {
  flex: 1;
  height: 8px;
  background: #f0f0f0;
  border-radius: 0;                /* 직선 처리 */
  margin: 0 12px;
  overflow: hidden;
}

.rpt-goal-bar-fill {
  height: 100%;
  border-radius: 0;                /* 직선 처리 */
  background: #D55E00;
  transition: width 0.3s ease;
}

.rpt-goal-bar-fill.over {
  background: var(--color-green, #22A352);
}

.rpt-goal-pct {
  font-weight: 700;
  min-width: 42px;
  text-align: right;
}

.rpt-goal-qualifier {
  font-size: 0.72rem;
  color: #999;
  min-width: 70px;
  text-align: right;
}

/* ── vs 이전 기간 비교 ── */
.rpt-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.rpt-compare-item {
  font-size: 0.8rem;
  color: #555;
}

.rpt-compare-delta {
  font-weight: 700;
}

.rpt-compare-delta.positive {
  color: var(--color-green, #22A352);
}

.rpt-compare-delta.negative {
  color: #d32f2f;
}

.rpt-compare-delta.neutral {
  color: #999;
}

/* ── 체중 변화 ── */
.rpt-weight-content {
  font-size: 0.85rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rpt-weight-arrow {
  font-size: 1rem;
}

.rpt-weight-delta {
  font-weight: 700;
}

.rpt-weight-delta.loss {
  color: var(--color-green, #22A352);
}

.rpt-weight-delta.gain {
  color: #d32f2f;
}

/* ── 하이라이트 ── */
.rpt-highlight-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: #555;
}

.rpt-highlight-row:last-child {
  margin-bottom: 0;
}

.rpt-highlight-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: #999;
  font-size: 0.75rem;
  font-weight: 700;
}

.rpt-highlight-text b {
  color: #1a1a1f;
}

/* ── 카드 푸터 ── */
.rpt-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: #fafafa;
  font-size: 0.7rem;
  color: #bbb;
}

.rpt-footer-logo {
  height: 16px;
  opacity: 0.5;
}

/* ── 로딩 / 빈 상태 ── */
.rpt-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  z-index: 100;
}

.rpt-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #eee;
  border-top-color: #D55E00;
  border-radius: 50%;              /* 원형 유지 — 스피너 */
  animation: rpt-spin 0.7s linear infinite;
}

@keyframes rpt-spin {
  to { transform: rotate(360deg); }
}

.rpt-loading-text {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.rpt-empty {
  text-align: center;
  padding: 80px var(--space-4);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.rpt-empty-sub {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ── 반응형 ── */
@media (max-width: 540px) {
  .rpt-content {
    padding: var(--space-4) var(--space-3);
  }

  .rpt-controls {
    gap: var(--space-2);
  }

  .rpt-download-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .rpt-period-label {
    min-width: 120px;
    font-size: 0.78rem;
  }

  .rpt-card-header {
    padding: 20px 20px 16px;
  }

  .rpt-section {
    padding: 14px 20px;
  }

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

  .rpt-sport-stat {
    min-width: 100px;
    font-size: 0.68rem;
  }

  .rpt-compare {
    grid-template-columns: 1fr;
  }
}

/* hidden 유틸 */
.hidden {
  display: none !important;
}
