/* Página Instagram 2026 — relatório de desempenho (design Organic) */

:root {
  color-scheme: light;
  --post: var(--color-accent); --reel: var(--color-accent-2);
  --panel: #ffffff; --muted: var(--color-neutral-700); --grid: #ece3d3; --line: #ddd2bd; --fg: var(--color-text);
}
html, body { background: var(--color-bg); }
.page {
  padding-left: max(clamp(16px, 3vw, 40px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 3vw, 40px), env(safe-area-inset-right, 0px));
}
.nav-link { text-decoration: none; }
.hero-lead b { color: #fff; font-weight: 700; }
.hero-note { margin: 0; max-width: 760px; font-size: 14px; color: var(--color-accent-200); text-wrap: pretty; }
.panel { background: var(--panel); border-radius: var(--radius-lg); padding: clamp(16px, 2.4vw, 28px); box-shadow: var(--shadow-sm); min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3) var(--space-6); flex-wrap: wrap; }
.sub-note { margin: 0; font-size: 15px; color: var(--muted); max-width: 70ch; text-wrap: pretty; }
.fine { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); max-width: 80ch; text-wrap: pretty; }
.ctrl { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
select, input[type=search] {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--color-text); background: #fff;
  border: 2px solid var(--color-accent-300); border-radius: 999px; padding: 9px 18px; min-height: 44px;
}
select:hover, input[type=search]:hover { border-color: var(--color-accent-400); }
input[type=search] { font-weight: 400; min-width: 0; width: min(280px, 100%); }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border-radius: 999px; box-shadow: var(--shadow-sm); }
.seg button { font: inherit; font-size: 14.5px; font-weight: 600; border: 0; border-radius: 999px; background: transparent; color: var(--color-text); padding: 0 18px; min-height: 40px; cursor: pointer; }
.seg button:hover { background: var(--color-accent-100); color: var(--color-accent); }
.seg button[aria-pressed="true"] { background: var(--color-accent); color: #fff; }
.legend { display: flex; gap: 20px; font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.dot.post { background: var(--post); } .dot.reel { background: var(--reel); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-4); }
.tiles .card { gap: 0; min-width: 0; }
.card .lbl { color: var(--muted); font-size: 14px; font-weight: 600; }
.card .val { font-family: var(--font-heading); font-size: clamp(34px, 3.4vw, 42px); line-height: 1.1; margin-top: 6px; color: var(--color-accent); font-variant-numeric: tabular-nums; }
.card .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.split { display: flex; gap: 4px 14px; font-size: 13.5px; margin-top: 12px; flex-wrap: wrap; color: var(--color-neutral-800); font-variant-numeric: tabular-nums; }

.chart { position: relative; min-height: 260px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 12px; font-family: var(--font-body); }
.tip { position: absolute; pointer-events: none; background: #fff; color: var(--color-text); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px 14px; font-size: 13.5px; line-height: 1.45; max-width: 270px; z-index: 5; }
.tip b { display: block; } .tip span { display: block; color: var(--muted); }

.tbl-wrap { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cmp th, .cmp td { padding: 12px 14px; border-bottom: 1px solid var(--grid); text-align: right; white-space: nowrap; }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp thead th { color: var(--muted); font-size: 14px; font-weight: 700; }
.cmp .win { font-weight: 700; color: var(--color-accent-2-700); }

.toplist { display: flex; flex-direction: column; gap: 14px; }
.row { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: 5px 10px; align-items: center; }
.row .rk { color: var(--color-accent-2); font-family: var(--font-heading); font-size: 18px; }
.row .ds { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.row .ds small { color: var(--muted); margin-left: 8px; font-size: 12.5px; font-weight: 400; }
.row .vl { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--color-accent); }
.row .tr { grid-column: 2 / 4; height: 10px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.row .tr i { display: block; height: 100%; border-radius: 999px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-right: 8px; vertical-align: 1px; }
.tag.Post { background: var(--color-accent-100); color: var(--color-accent); }
.tag.Reel { background: var(--color-accent-2-100); color: var(--color-accent-2-700); }

.scroll { max-height: 560px; overflow: auto; border-radius: 20px; background: #fff; }
table.all { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.all th, table.all td { padding: 10px 12px; border-bottom: 1px solid var(--grid); text-align: right; white-space: nowrap; }
table.all th:nth-child(-n+3), table.all td:nth-child(-n+3) { text-align: left; }
table.all td.desc { white-space: normal; min-width: 240px; }
table.all tbody tr:hover { background: var(--color-accent-100); }
table.all thead th { position: sticky; top: 0; background: var(--color-accent-100); color: var(--color-accent); font-size: 13px; font-weight: 700; cursor: pointer; user-select: none; }
table.all th[aria-sort="descending"]::after { content: " ↓"; } table.all th[aria-sort="ascending"]::after { content: " ↑"; }
.count { margin: 0 0 12px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
details.panel summary { cursor: pointer; font-family: var(--font-heading); font-size: 19px; color: var(--color-accent); min-height: 44px; display: flex; align-items: center; }
details.panel p { margin: 8px 0 0; color: var(--color-neutral-800); max-width: 80ch; text-wrap: pretty; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
