/* ============================================================
   Report Trend — interfaccia web dei risultati del Trend Agent
   Riusa i token di style.css (--accent, --gray-*, font Inter / Noto Serif JP)
   ============================================================ */

.report-body { background: var(--gray-100); color: var(--black); }
.hidden { display: none !important; }

/* ── TOPBAR ───────────────────────────────────────────────── */
.report-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.25rem;
  height: var(--nav-h);
  padding: 0 1.5rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.report-logo { display: flex; align-items: baseline; gap: .4rem; }
.report-logo .logo-jp { font-family: var(--font-jp); font-size: 1.1rem; color: var(--accent); }
.report-logo .logo-text { font-weight: 700; letter-spacing: .02em; }
.report-topbar-mid { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.report-topbar-title { font-size: .95rem; font-weight: 600; }
.report-topbar-sub { font-size: .72rem; color: var(--gray-400); }
.report-topbar-actions { display: flex; align-items: center; gap: .75rem; }
.report-navlink { font-size: .8rem; color: var(--gray-600); padding: .35rem .7rem; border: 1px solid var(--gray-200); border-radius: 6px; }
.report-navlink:hover { border-color: var(--accent); color: var(--accent); }
.report-refresh { width: 34px; height: 34px; border: 1px solid var(--gray-200); background: #fff; border-radius: 6px; cursor: pointer; font-size: 1rem; color: var(--gray-600); }
.report-refresh:hover { border-color: var(--accent); color: var(--accent); }
.report-refresh.spinning { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LAYOUT ───────────────────────────────────────────────── */
.report-main { max-width: 980px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.report-state { text-align: center; padding: 5rem 1rem; color: var(--gray-400); }
.report-state-sub { font-size: .82rem; margin-top: .4rem; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--gray-200); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 1rem; animation: spin .8s linear infinite; }

/* ── HERO / SUMMARY ───────────────────────────────────────── */
.r-hero { margin-bottom: 1.25rem; }
.r-hero-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gray-400); }
.r-hero-title { font-size: 1.5rem; font-weight: 600; margin-top: .15rem; }
.r-summary { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: .9rem; color: var(--gray-600); line-height: 1.7; box-shadow: var(--shadow); }
.r-method { font-size: .76rem; color: var(--gray-400); background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: .6rem .85rem; margin-top: .65rem; line-height: 1.55; }
.r-method strong { color: var(--gray-600); }

/* ── BANNER / ALERT ───────────────────────────────────────── */
.r-alert { border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1rem 0; }
.r-alert-warn { background: #fff7ed; border: 1px solid #fed7aa; }
.r-alert-strong { background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(192,57,43,.25); }
.r-alert-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .35rem; }
.r-alert-warn .r-alert-title { color: #9a3412; }
.r-alert-item { font-size: .82rem; line-height: 1.5; }
.r-alert-warn .r-alert-item { color: #7c2d12; }

/* ── SECTION HEADINGS ─────────────────────────────────────── */
.r-sec { margin-top: 2rem; }
.r-sec-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; }
.r-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-it { background: var(--accent); } .dot-en { background: #1d9e75; } .dot-jp { background: #d85a30; }
.r-sec-title { font-size: 1.05rem; font-weight: 600; }
.r-sec-sub { font-size: .76rem; color: var(--gray-400); }
.r-sublabel { font-size: .62rem; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-400); margin: 0 0 .25rem; }

/* ── DEMAND BARS ──────────────────────────────────────────── */
.r-demand-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
.r-demand-col { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.r-demand-hd { display: flex; align-items: center; gap: 6px; padding: .55rem .85rem; border-bottom: 1px solid var(--gray-100); font-size: .8rem; font-weight: 500; }
.r-row { display: flex; align-items: center; gap: 7px; padding: .3rem .85rem; border-bottom: 1px solid var(--gray-100); }
.r-row:last-child { border-bottom: none; }
.r-row-kw { font-size: .76rem; color: var(--gray-600); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-row-bar { width: 46px; height: 5px; background: var(--gray-100); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.r-row-fill { height: 100%; border-radius: 3px; }
.fill-it { background: var(--accent); } .fill-en { background: #1d9e75; } .fill-jp { background: #d85a30; }
.r-row-vol { font-size: .76rem; font-weight: 600; width: 26px; text-align: right; flex-shrink: 0; }
.r-row-delta { font-size: .76rem; width: 14px; text-align: right; flex-shrink: 0; }
.d-up { color: #1d9e75; } .d-down { color: #d85a30; } .d-flat { color: #ccc; }

/* ── CARDS ────────────────────────────────────────────────── */
.r-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: .8rem; overflow: hidden; box-shadow: var(--shadow); }
.r-card-hd { padding: .85rem 1.2rem; display: flex; align-items: flex-start; gap: 1rem; }
.r-card-titleblock { flex: 1; min-width: 0; }
.r-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: .4rem; }
.r-badge { font-size: .66rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.b-social { background: #eef; color: #3c3489; } .b-estetica { background: #e1f5ee; color: #085041; }
.b-gaming { background: #faeeda; color: #633806; } .b-horror { background: #fcebeb; color: #791f1f; }
.b-urg-alta { background: #fcebeb; color: #791f1f; } .b-urg-media { background: #faeeda; color: #633806; } .b-urg-bassa { background: #eaf3de; color: #27500a; }
.r-gap { font-size: .66rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.gap-alto { background: #fcebeb; color: #791f1f; } .gap-medio { background: #faeeda; color: #633806; } .gap-basso { background: #eaf3de; color: #27500a; }
.r-card-name { font-size: 1.02rem; font-weight: 600; line-height: 1.3; margin-bottom: .25rem; }
.r-hook { font-size: .8rem; color: var(--gray-400); font-style: italic; line-height: 1.45; }
.r-scores { display: flex; gap: 11px; flex-shrink: 0; }
.r-score { text-align: center; min-width: 40px; }
.r-score-val { font-size: 1.35rem; font-weight: 600; line-height: 1.05; }
.r-score-lbl { font-size: .58rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); margin-top: 1px; }
.r-score-delta { font-size: .68rem; margin-top: 1px; }

.r-grid2 { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--gray-100); }
.r-cell { padding: .75rem 1.1rem; border-right: 1px solid var(--gray-100); }
.r-cell:last-child { border-right: none; }
.r-celltext { font-size: .8rem; color: var(--gray-600); line-height: 1.55; }
.r-celltext.hl { color: var(--black); }
.r-link { display: block; font-size: .8rem; color: #185fa5; line-height: 1.45; margin-bottom: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-link:hover { text-decoration: underline; }

.r-context { border-top: 1px solid var(--gray-100); }
.r-ctx-row { display: flex; align-items: flex-start; gap: 7px; padding: .55rem 1.1rem; }
.r-ctx-row + .r-ctx-row { border-top: 1px solid var(--gray-100); }
.r-ctx-lbl { font-size: .62rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; flex-shrink: 0; padding-top: 2px; }
.r-ctx-text { font-size: .8rem; color: var(--gray-600); line-height: 1.45; }

.r-foot-grid { border-top: 1px solid var(--gray-100); padding: .65rem 1.2rem; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.r-foot-lbl { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); margin-bottom: .15rem; }
.r-foot-val { font-size: .82rem; line-height: 1.4; }
.r-atti { border-top: 1px solid var(--gray-100); padding: .55rem 1.2rem; }
.r-atto { font-size: .8rem; color: var(--gray-600); line-height: 1.45; margin-bottom: .15rem; }
.r-titles { border-top: 1px solid var(--gray-100); padding: .6rem 1.2rem; display: flex; gap: 2rem; flex-wrap: wrap; font-size: .82rem; }
.r-titles b { color: var(--gray-400); font-weight: 600; }

.r-card-body { padding: .8rem 1.2rem; font-size: .82rem; color: var(--gray-600); line-height: 1.6; border-top: 1px solid var(--gray-100); }
.r-card-body strong { color: var(--black); }

/* ── WATCHLIST ────────────────────────────────────────────── */
.r-watch { display: flex; flex-direction: column; gap: .45rem; }
.r-watch-item { display: flex; align-items: flex-start; gap: .55rem; font-size: .85rem; color: var(--gray-600); line-height: 1.5; }
.r-watch-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: .45rem; }

.report-foot { text-align: center; font-size: .72rem; color: var(--gray-400); padding: 2rem 1rem; border-top: 1px solid var(--gray-200); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .r-demand-grid { grid-template-columns: 1fr; }
  .r-grid2 { grid-template-columns: 1fr; }
  .r-cell { border-right: none; border-bottom: 1px solid var(--gray-100); }
  .r-cell:last-child { border-bottom: none; }
  .r-foot-grid { grid-template-columns: 1fr; }
  .r-card-hd { flex-direction: column; gap: .5rem; }
  .report-topbar-sub { display: none; }
}
