/* ============================================================
   TUDO. AGÊNCIA — RELATÓRIO DE PERFORMANCE v3.0
   Fevereiro 2026 — Sem emojis, com ícones SVG profissionais
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
  --preto:       #0A0A0A;
  --neon:        #D4FF00;
  --off-white:   #F5F5F0;
  --bg:          #0A0A0A;
  --card:        #111214;
  --card-hover:  #18191C;
  --green:       #34D399;
  --orange:      #FB923C;
  --blue:        #60A5FA;
  --text:        #F5F5F0;
  --text-muted:  #6B6B6B;
  --border:      rgba(255,255,255,0.05);
  --border-hover:rgba(212,255,0,0.1);
  --font-heading:'Syne', 'Arial Black', sans-serif;
  --font-body:   'Outfit', system-ui, sans-serif;
  --font-data:   'Space Grotesk', 'SF Mono', monospace;
  --radius:      10px;
  --radius-sm:   6px;
}

/* ---- RESET ---- */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-weight: 400;
  line-height: 1.6;
}

/* ---- NOISE ---- */
.noise {
  position:fixed; inset:0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
  pointer-events:none; z-index:0;
}

/* ---- CONTAINER ---- */
.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 48px 28px 32px;
  position: relative;
  z-index: 1;
}

/* ---- INLINE SVG ICONS ---- */
.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  vertical-align: -2px;
  margin-right: 5px;
}
.icon-inline svg {
  width: 100%;
  height: 100%;
}

.icon-block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(212,255,0,0.06);
  border: 1px solid rgba(212,255,0,0.08);
  margin-bottom: 12px;
  color: var(--neon);
}
.icon-block svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   HEADER
============================================================ */
.header {
  text-align: center;
  margin-bottom: 52px;
  position: relative;
}

.header::before {
  content: '';
  position: absolute;
  top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(212,255,0,0.04) 0%, transparent 65%);
  pointer-events: none;
}

.header-logo {
  display: block;
  margin: 0 auto 18px;
  width: min(260px, 45vw);
  height: clamp(54px, 7vw, 78px);
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.45));
}

.badge {
  display: inline-block;
  background: var(--neon);
  color: var(--preto);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 2px;
  margin-bottom: 18px;
}

.header h1 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--off-white);
  letter-spacing: -0.3px;
}

.header .subtitle {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 400;
}

.header .period {
  margin-top: 12px;
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--neon);
  font-weight: 500;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.header .period svg {
  width: 14px;
  height: 14px;
  stroke: var(--neon);
}

/* ============================================================
   KPI CARDS
============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: fadeUp 0.45s ease both;
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

.kpi-card .glow {
  position: absolute;
  top: -50px; right: -50px;
  width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.18;
  pointer-events: none;
}

.kpi-card .label {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-card .label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.kpi-card .value {
  font-family: var(--font-data);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.kpi-card .desc {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 400;
}

.kpi-card:nth-child(1){animation-delay:.04s}
.kpi-card:nth-child(2){animation-delay:.07s}
.kpi-card:nth-child(3){animation-delay:.10s}
.kpi-card:nth-child(4){animation-delay:.13s}
.kpi-card:nth-child(5){animation-delay:.16s}
.kpi-card:nth-child(6){animation-delay:.19s}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ============================================================
   SECTION TITLES
============================================================ */
.section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--off-white);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title svg {
  width: 20px;
  height: 20px;
  color: var(--neon);
  flex-shrink: 0;
}

.section-desc {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* ============================================================
   TABLE
============================================================ */
.table-wrapper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
  animation: fadeUp 0.45s ease 0.2s both;
}
.table-wrapper table { width: 100%; border-collapse: collapse; }

.table-wrapper thead th {
  background: rgba(212,255,0,0.035);
  color: var(--neon);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.table-wrapper thead th .th-tip {
  display: block;
  font-weight: 400;
  font-size: 8px;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2px;
}

.table-wrapper tbody td {
  padding: 11px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--off-white);
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 12px;
}
.table-wrapper tbody tr { transition: background 0.15s ease; }
.table-wrapper tbody tr:hover { background: var(--card-hover); }
.table-wrapper tbody tr:last-child td { border-bottom: none; }
.table-wrapper tbody td:first-child {
  font-family: var(--font-body);
  font-weight: 600;
  color: #fff;
  text-align: left;
  padding-left: 20px;
  font-size: 12.5px;
}

.total-row td {
  background: rgba(212,255,0,0.025) !important;
  font-weight: 700 !important;
  color: #fff !important;
  font-size: 12.5px;
}
.highlight-cell {
  color: var(--neon) !important;
  font-weight: 700 !important;
}

/* ============================================================
   CHARTS
============================================================ */
.chart-section {
  margin-bottom: 48px;
  animation: fadeUp 0.45s ease 0.25s both;
}
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.chart-card h3 {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--off-white);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-card h3 svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.chart-card .chart-subtitle {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---- BAR CHART ---- */
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label {
  width: 48px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  height: 26px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  overflow: visible;
  position: relative;
}
.bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-family: var(--font-data);
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  transition: width 1.2s cubic-bezier(0.22,1,0.36,1);
  white-space: nowrap;
  justify-content: flex-end;
  position: relative;
}
.bar-fill[data-outside] { overflow: visible; }
.bar-fill[data-outside]::after {
  content: attr(data-outside);
  position: absolute;
  left: calc(100% + 8px);
  font-family: var(--font-data);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--off-white);
  white-space: nowrap;
}
.bar-fill.neon   { background: var(--neon); color: var(--preto); }
.bar-fill.green  { background: linear-gradient(90deg, #2DD4A0, #10B981); }
.bar-fill.blue   { background: linear-gradient(90deg, #60A5FA, #3B82F6); }
.bar-fill.orange { background: linear-gradient(90deg, #FB923C, #EF4444); }
.bar-fill.muted  { background: rgba(255,255,255,0.10); color: var(--off-white); }

/* ---- DONUT ---- */
.donut-container { display: flex; align-items: center; gap: 24px; }
.donut-svg { flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; }
.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 11px;
}
.donut-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-item span { color: var(--text-muted); }
.donut-legend-item strong { color: #fff; font-weight: 600; }

/* ============================================================
   INSIGHTS
============================================================ */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}
.insight-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  animation: fadeUp 0.45s ease 0.35s both;
  transition: border-color 0.2s ease;
}
.insight-card:hover { border-color: var(--border-hover); }
.insight-card h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--off-white);
}
.insight-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.insight-card p strong {
  color: var(--neon);
  font-weight: 600;
}

/* ============================================================
   GLOSSARY
============================================================ */
.glossary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 48px;
  animation: fadeUp 0.45s ease 0.4s both;
}
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.glossary-item {
  padding: 11px 13px;
  background: rgba(255,255,255,0.012);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.glossary-item .term {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--neon);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.glossary-item .term svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.glossary-item .definition {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
  text-align: center;
  padding: 32px 0 16px;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.45s ease 0.45s both;
}
.footer-logo {
  display: block;
  margin: 0 auto 12px;
  height: 44px;
  width: auto;
  object-fit: contain;
  opacity: 0.65;
}
.footer p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer .brand {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--neon);
  letter-spacing: 0.5px;
}
.footer .footer-slogan {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}
.footer-contact {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-contact a {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.footer-contact a:hover { color: var(--neon); }
.footer-contact a svg {
  width: 13px;
  height: 13px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width:900px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width:768px) {
  .container { padding:24px 16px; }
  .chart-grid { grid-template-columns:1fr; }
  .kpi-card .value { font-size:24px; }
  .header h1 { font-size:28px; }
  .header-logo { width: min(230px, 46vw); height: 61px; }
  .donut-container { flex-direction:column; align-items:flex-start; }
  .table-wrapper { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .table-wrapper table { min-width:680px; }
  .insights-grid { grid-template-columns:1fr; }
}
@media (max-width:480px) {
  .kpi-grid { grid-template-columns:1fr; }
  .header-logo { width: min(180px, 47vw); height: 48px; }
  .footer-contact { flex-direction:column; gap:6px; align-items:center; }
}

/* ---- PRINT ---- */
@media print {
  body { background:#fff; color:#111; }
  .noise { display:none; }
  .kpi-card,.chart-card,.insight-card,.glossary,.table-wrapper {
    border:1px solid #ddd; break-inside:avoid;
  }
  .kpi-card:hover { transform:none; }
  * { animation:none !important; }
}
