/* ==========================================================================
   Garbify · relatório (link do cliente, prévia e impressão)
   Cores vêm do tema e da marca do cliente via variáveis --r-*.
   ========================================================================== */
@font-face { font-family: "Clash Display"; src: url(../fonts/clash-display-var.woff2) format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: Satoshi; src: url(../fonts/satoshi-var.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(../fonts/instrument-serif.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(../fonts/instrument-serif-italic.woff2) format("woff2"); font-style: italic; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.rp { margin: 0; background: var(--r-bg); color: var(--r-fg); font: 400 15px/1.55 Satoshi, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp img { max-width: 100%; display: block; }
.rp svg { display: block; }
.rp h1, .rp h2, .rp h3 { margin: 0; font-family: var(--r-heading); font-weight: 600; letter-spacing: -.015em; word-spacing: .08em; line-height: 1.08; }
.rp p { margin: 0; }
.rp--atelier h1, .rp--atelier h2, .rp--editorial h1, .rp--editorial h2 { font-weight: 400; letter-spacing: -.01em; }
.rp-muted { color: var(--r-muted); }

.rp-doc { width: 100%; max-width: 1040px; margin: 0 auto; padding: 28px 22px 40px; display: grid; gap: 52px; }
@media (min-width: 760px) { .rp-doc { padding: 44px 40px 56px; gap: 64px; } }
.rp-mode--preview .rp-doc { padding-top: 32px; }
.rp-block { min-width: 0; scroll-margin-top: 80px; }
.rp-block.is-highlight { outline: 2px dashed var(--r-accent); outline-offset: 12px; border-radius: 8px; }
.rp-h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 20px !important; }
.rp-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.rp-head-row .rp-h2 { margin-bottom: 0 !important; }
.rp-head-row--sub { margin: 18px 0 10px; }
.rp-card { background: var(--r-surface); border: 1px solid var(--r-line); border-radius: 18px; padding: 20px; min-width: 0; }
.rp--flat .rp-card { border-radius: 4px; }
.rp--editorial .rp-card { background: transparent; border-width: 1px 0 0; border-radius: 0; padding-left: 0; padding-right: 0; }
.rp-text { font-size: 16px; line-height: 1.65; margin-bottom: 18px; max-width: 760px; }

.rp-demo { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--r-accent) 12%, transparent); color: var(--r-fg); font-size: 13px; font-weight: 600; text-align: center; }

/* Barra do link compartilhado ----------------------------------------------- */
.rp-toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: color-mix(in srgb, var(--r-bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--r-line); flex-wrap: wrap; }
.rp-toolbar__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-right: auto; }
.rp-toolbar__brand img { height: 26px; width: auto; max-width: 120px; object-fit: contain; }
.rp-toolbar__period { font-size: 13px; color: var(--r-muted); }
.rp-toolbar__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: var(--r-accent); color: var(--r-on-accent); font: 700 13px Satoshi, sans-serif; text-decoration: none; cursor: pointer; }
.rp-toolbar__btn--ghost { background: transparent; border-color: var(--r-line); color: var(--r-fg); }

/* Capa ---------------------------------------------------------------------- */
.rp-cover { position: relative; display: grid; gap: 22px; padding: 30px; border-radius: 24px; background: var(--r-surface); border: 1px solid var(--r-line); overflow: hidden; }
@media (min-width: 760px) { .rp-cover { padding: 44px; gap: 26px; } }
.rp-cover::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--r-accent) 45%, transparent), transparent 70%); pointer-events: none; }
.rp-cover__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; z-index: 1; }
.rp-cover__logo img { height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.rp-cover__logo span { font: 700 18px var(--r-heading); }
.rp-chip { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: var(--r-accent); color: var(--r-on-accent); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.rp-cover__title { font-size: clamp(40px, 7vw, 76px) !important; max-width: 780px; position: relative; z-index: 1; }
.rp-cover__sub { font-size: 18px; color: var(--r-muted); max-width: 600px; }
.rp-cover__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; padding-top: 22px; border-top: 1px solid var(--r-line); }
.rp-cover__meta span { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--r-muted); margin-bottom: 4px; }
.rp-cover__meta strong { font-size: 15px; }
.rp--noir .rp-cover { background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--r-accent) 22%, transparent), transparent 55%), var(--r-surface); }
.rp--executivo .rp-cover { background: var(--r-band); color: #fff; border: 0; }
.rp--executivo .rp-cover__sub, .rp--executivo .rp-cover__meta span { color: rgba(255, 255, 255, .65); }
.rp--executivo .rp-cover__meta { border-color: rgba(255, 255, 255, .16); }
.rp--executivo .rp-cover__logo img { background: #fff; padding: 6px 10px; border-radius: 8px; }
.rp--gradient .rp-cover { background: linear-gradient(125deg, var(--r-accent), var(--r-accent-2)); color: #fff; border: 0; }
.rp--gradient .rp-cover__sub, .rp--gradient .rp-cover__meta span { color: rgba(255, 255, 255, .78); }
.rp--gradient .rp-cover__meta { border-color: rgba(255, 255, 255, .25); }
.rp--gradient .rp-chip { background: #fff; color: #15121f; }
.rp--gradient .rp-cover__logo img { background: #fff; padding: 6px 10px; border-radius: 10px; }
.rp--editorial .rp-cover { background: transparent; border-width: 0 0 2px; border-color: var(--r-fg); border-radius: 0; padding: 10px 0 34px; }
.rp--editorial .rp-cover::after, .rp--mono .rp-cover::after, .rp--executivo .rp-cover::after, .rp--gradient .rp-cover::after { display: none; }
.rp--editorial .rp-cover__title { font-size: clamp(52px, 9vw, 104px) !important; font-style: italic; }
.rp--mono .rp-cover { border-radius: 4px; border-width: 2px; border-color: var(--r-fg); }
.rp--atelier .rp-cover__title { font-style: italic; }

/* Insights ------------------------------------------------------------------- */
.rp-insights { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.rp-insight { display: flex; gap: 14px; padding: 18px; border-radius: 16px; background: var(--r-surface); border: 1px solid var(--r-line); }
.rp--flat .rp-insight { border-radius: 4px; }
.rp-insight h3 { font: 700 15px Satoshi, sans-serif; letter-spacing: 0; margin-bottom: 4px; }
.rp-insight p { font-size: 14px; color: var(--r-muted); line-height: 1.5; }
.rp-insight__icon { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--r-accent) 14%, transparent); color: var(--r-accent); }
.rp-insight--good .rp-insight__icon { background: rgba(31, 168, 106, .14); color: #1fa86a; }
.rp--dark .rp-insight--good .rp-insight__icon { background: rgba(200, 255, 58, .12); color: #c8ff3a; }
.rp-insight--bad .rp-insight__icon { background: rgba(230, 72, 50, .13); color: #e64832; }

/* KPIs ----------------------------------------------------------------------- */
.rp-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.rp-kpi { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px 18px 54px; border-radius: 18px; background: var(--r-surface); border: 1px solid var(--r-line); overflow: hidden; min-height: 150px; }
.rp--flat .rp-kpi { border-radius: 4px; }
.rp-kpi--lead { background: var(--r-accent); color: var(--r-on-accent); border-color: transparent; }
.rp-kpi--lead .rp-kpi__label, .rp-kpi--lead .rp-delta small { color: inherit; opacity: .78; }
.rp-kpi--lead .rp-delta { color: inherit !important; }
.rp-kpi--lead .ch-line { stroke: currentColor !important; opacity: .7; }
.rp-kpi__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--r-muted); }
.rp-kpi__value { font: 600 clamp(26px, 3vw, 36px)/1.05 "Clash Display", "Arial Narrow", sans-serif; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rp--atelier .rp-kpi__value, .rp--editorial .rp-kpi__value { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: clamp(32px, 3.6vw, 44px); letter-spacing: -.01em; }
.rp--mono .rp-kpi__value, .rp--mono .rp-table td.r { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: -.02em; }
.rp--executivo .rp-kpi__value { font-family: Satoshi, sans-serif; font-weight: 800; letter-spacing: -.02em; }
.rp-kpi__spark { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; opacity: .85; }
.rp-kpi__spark svg { width: 100%; height: 100%; }
.rp-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; }
.rp-delta small { font-weight: 500; color: var(--r-muted); }
.rp-delta svg { flex: none; }
.rp-delta--good { color: #1a9c5f; }
.rp--dark .rp-delta--good { color: #c8ff3a; }
.rp-delta--bad { color: #e64832; }
.rp--dark .rp-delta--bad { color: #ff6b5a; }
.rp-delta--neutral { color: var(--r-muted); }
.rp-table .rp-delta { display: block; font-size: 11px; margin-top: 2px; }

/* Gráficos ------------------------------------------------------------------- */
.rp-chart { padding: 16px 14px 8px; }
.rp-chart svg { width: 100%; height: auto; overflow: visible; }
.ch-grid { stroke: var(--r-line); stroke-width: 1; }
.ch-axis { fill: var(--r-muted); font: 500 12px Satoshi, sans-serif; }
.ch-line { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ch-line--a { stroke: var(--r-accent); }
.ch-line--b { stroke: var(--r-accent-2); }
.rp--dark .ch-line--b { stroke: var(--r-accent-2); }
.ch-stop-a { stop-color: var(--r-accent); }
.ch-stop-b { stop-color: var(--r-accent-2); }
.ch-prev { fill: none; stroke: var(--r-muted); stroke-width: 1.6; stroke-dasharray: 5 6; opacity: .65; }
.ch-dot { opacity: 0; transition: opacity .15s; stroke: var(--r-surface); stroke-width: 2; }
.ch-dot--a { fill: var(--r-accent); }
.ch-dot--b { fill: var(--r-accent-2); }
.ch-hit:hover .ch-dot { opacity: 1; }
.ch-hit { cursor: crosshair; }
.ch-bar { fill: color-mix(in srgb, var(--r-accent) 55%, var(--r-surface)); transition: fill .2s; cursor: crosshair; }
.ch-bar:hover, .ch-bar--best { fill: var(--r-accent); }
.ch-track { stroke: var(--r-line); }
.ch-seg { transition: opacity .2s; cursor: crosshair; }
.ch-seg:hover { opacity: .8; }
.ch-seg--meta { stroke: var(--r-accent); }
.ch-seg--google { stroke: var(--r-accent-2); }
.ch-center { fill: var(--r-fg); font: 600 22px "Clash Display", sans-serif; }
.ch-center-sub { fill: var(--r-muted); font: 500 11px Satoshi, sans-serif; text-transform: uppercase; letter-spacing: .1em; }
.ring--good { stroke: #c8ff3a; }
.ring--mid { stroke: #ffc53d; }
.ring--low { stroke: #ff6b5a; }
.rp-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--r-muted); flex-wrap: wrap; }
.rp-legend span { display: inline-flex; align-items: center; gap: 7px; }
.rp-legend span::before { content: ""; width: 16px; height: 3px; border-radius: 3px; background: var(--r-accent); }
.rp-legend__b::before { background: var(--r-accent-2) !important; }
.rp-legend__prev::before { background: repeating-linear-gradient(90deg, var(--r-muted) 0 4px, transparent 4px 7px) !important; }
.rp-legend__best::before { width: 10px !important; height: 10px !important; border-radius: 3px !important; }

/* Funil ------------------------------------------------------------------------ */
.rp-funnel { display: grid; gap: 10px; }
.rp-funnel__row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 16px; align-items: center; }
.rp-funnel__bar { height: 52px; border-radius: 12px; background: var(--r-accent); color: var(--r-on-accent); display: flex; align-items: center; padding: 0 16px; font: 600 18px "Clash Display", sans-serif; min-width: 90px; }
.rp-funnel__row:nth-child(2) .rp-funnel__bar { opacity: .82; }
.rp-funnel__row:nth-child(3) .rp-funnel__bar { opacity: .66; }
.rp-funnel__row:nth-child(4) .rp-funnel__bar { background: var(--r-accent-2); color: var(--r-bg); opacity: 1; }
.rp--flat .rp-funnel__bar { border-radius: 2px; }
.rp-funnel__label strong { display: block; font-size: 14px; }
.rp-funnel__label small { color: var(--r-muted); font-size: 12.5px; }
@media (max-width: 600px) { .rp-funnel__row { grid-template-columns: 1fr; gap: 6px; } }

/* Plataformas -------------------------------------------------------------------- */
.rp-split { display: grid; gap: 14px; }
@media (min-width: 760px) { .rp-split { grid-template-columns: 280px minmax(0, 1fr); } }
.rp-donut { display: grid; place-items: center; }
.rp-donut svg { width: 100%; max-width: 230px; }
.rp-platforms { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.rp-platform__head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.rp-platform__head .rp-muted { margin-left: auto; font-size: 12.5px; }
.rp-platform dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rp-platform dt { font-size: 11.5px; color: var(--r-muted); text-transform: uppercase; letter-spacing: .08em; }
.rp-platform dd { margin: 2px 0 0; font: 600 19px "Clash Display", sans-serif; letter-spacing: -.02em; }
.rp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--r-accent); flex: none; vertical-align: middle; }
.rp-dot--google { background: var(--r-accent-2); }

/* Tabelas -------------------------------------------------------------------------- */
.rp-table-wrap { padding: 0; overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rp-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--r-muted); padding: 14px 16px; border-bottom: 1px solid var(--r-line); white-space: nowrap; }
.rp-table td { padding: 13px 16px; border-bottom: 1px solid var(--r-line); vertical-align: top; }
.rp-table tr:last-child td { border-bottom: 0; }
.rp-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-camp { display: flex; gap: 10px; align-items: flex-start; min-width: 200px; }
.rp-camp .rp-dot { margin-top: 6px; }
.rp-camp strong { display: block; font-weight: 700; }
.rp-camp small { color: var(--r-muted); font-size: 12px; }
.rp--mono .rp-table td, .rp--mono .rp-table th { padding: 9px 12px; }

/* Instagram ------------------------------------------------------------------------- */
.rp-ig-head { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; font-size: 13.5px; color: var(--r-muted); }
.rp-ig-head strong { color: var(--r-fg); font-size: 16px; }
.rp-ig { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-bottom: 18px; }
.rp-ig__post { padding: 0; overflow: hidden; display: grid; }
.rp-ig__media { aspect-ratio: 1; background: linear-gradient(140deg, color-mix(in srgb, var(--r-accent) 60%, #000), #0b0b0b); display: grid; place-items: center; overflow: hidden; }
.rp-ig__media img { width: 100%; height: 100%; object-fit: cover; }
.rp-ig__media span { font: italic 400 22px/1.15 "Instrument Serif", Georgia, serif; color: #f2eee6; padding: 22px; text-align: center; }
.rp-ig__body { padding: 16px; display: grid; gap: 10px; }
.rp-ig__verdict { display: flex; align-items: center; gap: 10px; }
.rp-ig__verdict strong { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 600 16px "Clash Display", sans-serif; background: #e9e9e9; color: #111; }
.rp-ig__verdict--boost strong { background: #c8ff3a; color: #0b0b0b; }
.rp-ig__verdict--test strong { background: #ffc53d; color: #0b0b0b; }
.rp-ig__verdict span { font-weight: 700; font-size: 14px; }
.rp-ig__caption { font-size: 13.5px; color: var(--r-muted); }
.rp-ig__reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12.5px; }
.rp-ig__reasons li::before { content: "+ "; font-weight: 700; color: #1a9c5f; }
.rp-ig__reasons li.is-neg::before { content: "− "; color: #e64832; }
.rp-ig__stats { font-size: 12px; color: var(--r-muted); }

/* Notas e seções ---------------------------------------------------------------------- */
.rp-notes { font-size: 15.5px; line-height: 1.65; display: grid; gap: 10px; }
.rp-notes ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.rp-notes li::marker { color: var(--r-accent); }
.rp-section { display: flex; align-items: center; gap: 16px; }
.rp-section span { width: 40px; height: 3px; background: var(--r-accent); border-radius: 3px; }
.rp-section h2 { font-size: clamp(30px, 4.5vw, 52px); }
.rp-empty { text-align: center; color: var(--r-muted); padding: 60px 0; }

/* Rodapé (sempre Garbify) ------------------------------------------------------------------ */
.rp-foot { max-width: 1040px; margin: 0 auto; padding: 22px 22px 36px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--r-line); font-size: 12.5px; color: var(--r-muted); }
@media (min-width: 760px) { .rp-foot { padding: 24px 40px 40px; } }
.rp-foot__left { display: grid; gap: 2px; }
.rp-foot__left strong { color: var(--r-fg); }
.rp-foot__brand { display: inline-flex; align-items: flex-end; gap: 8px; text-decoration: none; color: var(--r-muted); }
.rp-foot__brand img { height: 18px; width: auto; }

/* Tela de senha do link ------------------------------------------------------------------- */
.rp-lock { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.rp-lock form { width: min(380px, 100%); display: grid; gap: 14px; padding: 28px; border-radius: 20px; background: var(--r-surface); border: 1px solid var(--r-line); }
.rp-lock h1 { font-size: 30px; }
.rp-lock input { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--r-line); background: var(--r-bg); color: var(--r-fg); font: inherit; font-size: 16px; }
.rp-lock button { min-height: 48px; border: 0; border-radius: 999px; background: var(--r-accent); color: var(--r-on-accent); font: 700 15px Satoshi, sans-serif; cursor: pointer; }
.rp-lock .err { color: #e64832; font-size: 14px; }

.chart-tip { position: fixed; z-index: 300; pointer-events: none; padding: 9px 12px; border-radius: 10px; background: #0b0b0b; color: #f2eee6; font: 600 12.5px Satoshi, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.chart-tip.is-on { opacity: 1; }
.chart-tip span { color: #8a8a8a; font-weight: 500; display: block; margin-bottom: 2px; }

/* Impressão / PDF (A4) --------------------------------------------------------------------- */
@page { size: A4; margin: 12mm 10mm; }
@media print {
	body.rp { font-size: 12px; }
	.rp-toolbar, .rp-demo { display: none !important; }
	.rp-doc { max-width: none; padding: 0; gap: 26px; }
	.rp-block { break-inside: avoid; page-break-inside: avoid; }
	.rp-block--campaigns, .rp-block--instagram { break-inside: auto; }
	.rp-block--cover { break-after: page; }
	.rp-cover { min-height: 250mm; align-content: space-between; }
	.rp-table tr { break-inside: avoid; }
	.rp-foot { padding: 14px 0 0; }
	.ch-dot { display: none; }
}
