/* Family Superapp v1.2.0e2 — Laporan & Insight */
.report-app { min-height: 100vh; }
.report-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: calc(var(--bottom-nav-height) + var(--space-6));
}
.report-notice { margin: 0; }
.report-filter-card,
.report-hero,
.report-card-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.report-filter-card { padding: var(--space-4); }
.report-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.report-filter-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.report-filter-head small { color: var(--color-text-secondary); font-size: var(--font-size-xs); }
.report-filter-head strong { overflow: hidden; font-size: var(--font-size-md); text-overflow: ellipsis; white-space: nowrap; }
.report-filter-head > ion-icon { flex: 0 0 auto; color: var(--color-primary); font-size: 25px; }
.report-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: var(--space-3);
  padding: 5px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-soft);
}
.report-preset {
  min-height: 38px;
  padding: 7px 9px;
  border: 0;
  border-radius: calc(var(--radius-lg) - 4px);
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}
.report-preset.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.report-hero {
  padding: var(--space-5);
  background: linear-gradient(145deg, var(--color-surface), var(--color-surface-soft));
}
.report-hero-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.report-hero-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: rgba(48, 168, 118, .12);
  color: var(--color-primary);
}
.report-hero-icon ion-icon { font-size: 24px; }
.report-hero.is-good .report-hero-icon {
  background: rgba(82,180,105,.13);
  color: var(--color-success);
}
.report-hero.is-bad .report-hero-icon {
  background: rgba(239,107,107,.13);
  color: var(--color-danger);
}
.report-status {
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: var(--color-surface-strong);
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
}
.report-status.is-good { background: rgba(82,180,105,.13); color: var(--color-success); }
.report-status.is-bad { background: rgba(239,107,107,.13); color: var(--color-danger); }
.report-hero-label { display: block; margin-top: var(--space-4); color: var(--color-text-secondary); font-size: var(--font-size-xs); }
.report-hero > strong { display: block; margin-top: 4px; font-size: clamp(28px, 7vw, 36px); letter-spacing: -.04em; }
.report-hero > p { margin: 8px 0 0; color: var(--color-text-secondary); font-size: var(--font-size-xs); line-height: 1.55; }
.report-money-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.report-money-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.report-money-card span { display: flex; align-items: center; gap: 6px; color: var(--color-text-secondary); font-size: var(--font-size-xs); }
.report-money-card span ion-icon { font-size: 17px; }
.report-money-card strong { overflow: hidden; font-size: var(--font-size-md); text-overflow: ellipsis; white-space: nowrap; }
.report-money-card.income strong { color: var(--color-success); }
.report-money-card.expense strong { color: var(--color-danger); }
.report-section { display: flex; flex-direction: column; gap: var(--space-3); }
.report-card-section { padding: var(--space-4); }
.report-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }
.report-section-head h2 { margin: 0; font-size: var(--font-size-lg); }
.report-section-head p { margin: 4px 0 0; color: var(--color-text-secondary); font-size: var(--font-size-xs); line-height: 1.45; }
.report-section-head > small { flex: 0 0 auto; color: var(--color-text-secondary); font-size: 11px; }
.report-section-head > a { flex: 0 0 auto; color: var(--color-primary); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); text-decoration: none; }
.report-insight-list { display: flex; flex-direction: column; gap: 10px; }
.report-insight {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.report-insight-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--color-surface-soft);
  color: var(--color-primary);
}
.report-insight-icon.is-warning { color: var(--color-danger); }
.report-insight-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.report-insight-copy strong { font-size: var(--font-size-sm); }
.report-insight-copy span { color: var(--color-text-secondary); font-size: var(--font-size-xs); line-height: 1.45; }
.report-category-list,
.report-budget-list,
.report-wallet-list { display: flex; flex-direction: column; gap: var(--space-3); }
.report-category-item,
.report-budget-item,
.report-wallet-item { min-width: 0; }
.report-category-head,
.report-budget-head,
.report-wallet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.report-category-name,
.report-budget-name,
.report-wallet-name { display: flex; min-width: 0; align-items: center; gap: 9px; }
.report-category-icon,
.report-budget-icon,
.report-wallet-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--color-surface-soft);
  color: var(--color-primary);
}
.report-category-name > span:last-child,
.report-budget-name > span:last-child,
.report-wallet-name > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.report-category-name strong,
.report-budget-name strong,
.report-wallet-name strong { overflow: hidden; font-size: var(--font-size-sm); text-overflow: ellipsis; white-space: nowrap; }
.report-category-name small,
.report-budget-name small,
.report-wallet-name small { color: var(--color-text-secondary); font-size: 10px; }
.report-category-head > strong,
.report-budget-head > strong { flex: 0 0 auto; font-size: var(--font-size-xs); }
.report-wallet-head > strong {
  flex: 0 0 auto;
  max-width: 52%;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  text-align: right;
  white-space: nowrap;
}
.report-track {
  overflow: hidden;
  height: 7px;
  margin-top: 8px;
  border-radius: var(--radius-full);
  background: var(--color-surface-soft);
}
.report-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--color-primary); }
.report-budget-item.is-warning .report-track > span { background: var(--color-warning, #d69b2d); }
.report-budget-item.is-over .report-track > span { background: var(--color-danger); }
.report-budget-meta { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: 7px; color: var(--color-text-secondary); font-size: 10px; }
.report-three-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: var(--space-1);
}
.report-three-values > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 11px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-soft);
}
.report-three-values span { color: var(--color-text-secondary); font-size: 10px; }
.report-three-values strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.report-three-values.bills > div:nth-child(2) strong { color: var(--color-success); }
.report-three-values.bills > div:nth-child(3) strong { color: var(--color-danger); }
.report-context-note { margin: 0; color: var(--color-text-secondary); font-size: 10px; line-height: 1.5; }
.report-inline-status {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-surface-soft);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.5;
}
.report-inline-status.is-warning { background: rgba(239,107,107,.10); color: var(--color-danger); }
.report-wallet-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-surface-soft);
}
.report-wallet-total span { color: var(--color-text-secondary); font-size: var(--font-size-xs); }
.report-wallet-total strong { font-size: var(--font-size-md); }
.report-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface-soft);
  color: var(--color-text-secondary);
  text-align: center;
  font-size: var(--font-size-xs);
}
.report-empty ion-icon { color: var(--color-primary); font-size: 25px; }
.report-loading { opacity: .58; pointer-events: none; }
.report-custom-sheet { padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); }
.report-custom-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.report-custom-fields label { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.report-custom-fields label span { color: var(--color-text-secondary); font-size: var(--font-size-xs); }
.report-custom-error { margin-bottom: var(--space-3); color: var(--color-danger); font-size: var(--font-size-xs); line-height: 1.45; }
@media (max-width: 390px) {
  .report-three-values { grid-template-columns: 1fr; }
  .report-custom-fields { grid-template-columns: 1fr; }
}

/* v1.2.0e3 — Finance Report Excel Export */
.report-export-sheet {
  padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom));
}
.report-export-sheet .sheet-subjudul strong {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}
.report-export-option {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  margin-top: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.report-export-option:disabled {
  opacity: .58;
  cursor: wait;
}
.report-export-option-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: rgba(48, 168, 118, .12);
  color: var(--color-primary);
}
.report-export-option-icon ion-icon { font-size: 23px; }
.report-export-option-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.report-export-option-copy strong { font-size: var(--font-size-sm); }
.report-export-option-copy small {
  color: var(--color-text-secondary);
  font-size: 10px;
  line-height: 1.45;
}
.report-export-option-arrow {
  color: var(--color-primary);
  font-size: 21px;
}
.report-export-note {
  margin: var(--space-3) 2px 0;
  color: var(--color-text-secondary);
  font-size: 10px;
  line-height: 1.5;
}
