/* ========== ETF Dividend Analyzer — CSS v0.8.3 (light only) ========== */
.etfda-btn { padding:.55rem .9rem; border-radius:10px; border:1px solid #e5e7eb; background:#111; color:#fff; font-weight:700; cursor:pointer; }
.etfda-btn:hover { filter: brightness(1.05); }
.etfda-btn:disabled { opacity:.6; cursor:not-allowed; }

/* Base */
.etfda-wrap{
  font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:#0f172a;
}
/* Donut chart tweaks */
.etfda-donut text { dominant-baseline: middle; }
.etfda-h3{ margin:1rem 0 .5rem; font-size:1.1rem; font-weight:700; color:#0f172a; }
.etfda-subtle{ color:#64748b; }
.etfda-file { display:inline-block; margin-top:.5rem; }

/* Tabs */
.etfda-tabs{ display:flex; gap:8px; margin:.25rem 0 1rem; flex-wrap:wrap; }
.etfda-tab{
  border:1px solid #e5e7eb; background:#fff; color:#111827;
  padding:.4rem .75rem; border-radius:8px; cursor:pointer; user-select:none;
}
.etfda-tab.is-active{ background:#111827; color:#fff; }

/* Upload / drop */
.etfda-drop{
  border:2px dashed #cbd5e1; border-radius:14px; background:#f8fafc;
  padding:1rem; text-align:center; margin-bottom:.5rem; transition:border-color .15s ease;
}
.etfda-drop.is-over{ border-color:#111827; background:#f1f5f9; }
.etfda-drop-title{ font-weight:700; margin-bottom:.15rem; }
.etfda-file{ display:inline-block; margin-top:.5rem; }

/* Buttons */
.etfda-actions{ display:flex; align-items:center; gap:8px; margin:.25rem 0 .75rem; }
.etfda-btn{
  border:1px solid #e5e7eb; background:#fff; color:#111827;
  padding:.5rem .9rem; border-radius:10px; cursor:pointer; font-weight:600;
}
.etfda-btn:hover{ background:#f8fafc; }
.etfda-primary{ background:#111827; color:#fff; border-color:#111827; }
.etfda-primary:hover{ filter:brightness(1.05); }

/* Messages */
.etfda-error{
  background:#fef2f2; color:#991b1b; border:1px solid #fecaca;
  border-radius:10px; padding:.65rem .75rem; margin:.5rem 0;
}

/* Cards / sections */
.card{ border:1px solid #e5e7eb; border-radius:12px; background:#fff; padding:.75rem .9rem; margin:.75rem 0; }

/* Report header (above KPIs) */
.etfda-reporthdr{ margin:.25rem 0 1rem; }
.etfda-rh-title{ font-size:1.05rem; font-weight:800; letter-spacing:.02em; }
.etfda-rh-sub{ color:#64748b; margin:.1rem 0; }
.etfda-rh-file{ color:#0f172a; }
.etfda-rh-range{ color:#0f172a; margin-top:.2rem; }

/* KPIs */
.etfda-kpis{
  display:grid; gap:10px; grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  margin:.5rem 0 1rem;
}
.kpi{ border:1px solid #e5e7eb; border-radius:12px; background:#fff; padding:.75rem .9rem; }
.kpi-label{ font-size:.8rem; color:#64748b; }
.kpi-value{ font-size:1.25rem; font-weight:800; }

/* Tables */
.etfda-tbl{ width:100%; border-collapse:collapse; font-size:.93rem; }
.etfda-tbl thead th{
  text-align:left; background:#f8fafc; color:#0f172a;
  padding:.55rem .55rem; border-bottom:1px solid #e5e7eb;
}
.etfda-tbl td{ padding:.5rem .55rem; border-bottom:1px solid #f1f5f9; }
.etfda-tbl tr:hover td{ background:#f9fafb; }
.etfda-downloads{ margin:.5rem 0 0; }
.etfda-link{ color:#111827; text-decoration:underline; }

/* Dividend Distribution (horizontal bars) */
.bar-row{
  display:grid; grid-template-columns:160px 1fr auto; align-items:center;
  gap:10px; padding:.25rem 0;
}
.bar-label{ color:#0f172a; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-box{ background:#f1f5f9; border-radius:999px; height:18px; display:flex; align-items:center; overflow:hidden; }
.bar{ height:18px; background:#0f3a8a; border-radius:999px; }
.bar-amt{ font-variant-numeric:tabular-nums; color:#0f172a; min-width:72px; text-align:right; }

/* Payout Trend (inline SVG) */
.etfda-linewrap{ margin:.5rem 0 .25rem; }
.etfda-linewrap svg{ display:block; width:100%; height:auto; }

/* Prices table helpers */
.etfda-prices .chg-pos{ color:#065f46; font-weight:700; }
.etfda-prices .chg-neg{ color:#b91c1c; font-weight:700; }

/* Debug */
.etfda-diag code{ background:#f1f5f9; padding:.05rem .3rem; border-radius:6px; }

/* Responsive tweaks */
@media (max-width:640px){
  .bar-row{ grid-template-columns:110px 1fr auto; gap:8px; }
  .etfda-kpis{ grid-template-columns:repeat(2,minmax(120px,1fr)); }
}
