:root {
  --lime: #D6DE23;
  --green: #00A652;
  --green-dark: #006838;
  --black: #000000;
  --text: #434244;
  --white: #FFFFFF;
  --bg-alt: #DEDEDE;
  --alert: #B22234;
}

/* Faixa de assinatura da MakeLemonAd */
.make-stripe {
  height: 5px;
  background: var(--lime);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--green-dark); }

/* ---------- Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: var(--black);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-tag {
  color: var(--lime);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-sep {
  color: #999999;
  font-size: 13px;
}

.brand-client {
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Seletor de idioma */
.lang-switch {
  display: flex;
  gap: 4px;
  background: #1A1A1A;
  border-radius: 8px;
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #AAAAAA;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover { color: var(--white); }

.pdf-tip {
  background: var(--bg-alt);
  color: var(--text);
  font-size: 12.5px;
  text-align: center;
  padding: 8px 16px;
}

.lang-btn.active {
  background: var(--lime);
  color: var(--black);
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lime);
  color: var(--black);
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-pdf:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(214, 222, 35, 0.4);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--black) 0%, #1A1A1A 100%);
  color: var(--white);
  padding: 72px 24px 56px;
  text-align: center;
}

.hero-eyebrow {
  color: var(--lime);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  margin: 0 0 14px;
  font-weight: 800;
  line-height: 1.2;
}

.hero p.subtitle {
  font-size: 18px;
  color: #E4E4E4;
  margin: 0 0 20px;
}

.hero .meta {
  font-size: 13px;
  color: #9A9A9A;
}

/* ---------- Sections ---------- */
.section {
  padding: 64px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.section.alt {
  background: var(--bg-alt);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.section.alt .section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  color: var(--green-dark);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 24px;
  color: var(--black);
  font-weight: 800;
}

.section h3 {
  font-size: clamp(18px, 2.2vw, 22px);
  margin: 40px 0 16px;
  color: var(--black);
  font-weight: 800;
}

.section h3:first-of-type { margin-top: 8px; }

.section p {
  color: var(--text);
  font-size: 16px;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  margin-top: 32px;
  padding-left: 32px;
  border-left: 3px solid var(--lime);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
  break-inside: avoid;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--black);
  border: 3px solid var(--lime);
}

.timeline-item.highlight::before {
  background: var(--lime);
  border-color: var(--black);
}

.timeline-date {
  font-weight: 700;
  color: var(--black);
  font-size: 14px;
  margin-bottom: 4px;
}

.timeline-text {
  color: var(--text);
  font-size: 15px;
}

.callout {
  background: var(--white);
  border-left: 4px solid var(--green);
  padding: 18px 20px;
  border-radius: 6px;
  margin: 24px 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.callout strong { color: var(--black); }
.callout .quote { font-style: italic; }

/* ---------- Evidence images ---------- */
.evidence-figure {
  text-align: center;
  break-inside: avoid;
}

.evidence-figure img {
  max-width: 340px;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0,0,0,0.08);
}

.evidence-figure figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Grids ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.grid-item {
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  break-inside: avoid;
}

.grid-item img {
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.grid-item .caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text);
  text-align: center;
}

.grid-item .caption strong {
  display: block;
  color: var(--black);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin-top: 24px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 14px;
  min-width: 560px;
}

thead th {
  background: var(--black);
  color: var(--white);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #E2E2E2;
  color: var(--black);
}

tbody tr:nth-child(even) { background: var(--bg-alt); }

tbody tr.total-row {
  background: var(--lime);
  font-weight: 800;
  color: var(--black);
}

tbody tr.total-row td { border-bottom: none; }

/* ---------- Chart ---------- */
.chart-wrap {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  break-inside: avoid;
}

.chart-wrap canvas { max-height: 340px; }

/* ---------- Lists ---------- */
.numbered-list {
  counter-reset: item;
  list-style: none;
  padding: 0;
  margin-top: 24px;
}

.numbered-list li {
  counter-increment: item;
  position: relative;
  padding: 14px 0 14px 46px;
  border-bottom: 1px solid #E2E2E2;
  font-size: 15px;
  color: var(--black);
}

.numbered-list li:last-child { border-bottom: none; }

.numbered-list li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--black);
  color: var(--lime);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.numbered-list.pending li::before { background: var(--green-dark); color: var(--white); }

/* ---------- Closing statement ---------- */
.thesis {
  background: linear-gradient(135deg, var(--black) 0%, #1A1A1A 100%);
  color: var(--white);
  border-radius: 16px;
  padding: 40px;
  margin-top: 16px;
}

.thesis-label {
  color: var(--lime);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.thesis p {
  color: var(--white);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.65;
  margin: 0;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.footer {
  padding: 32px 24px;
  text-align: center;
  color: #AAAAAA;
  font-size: 13px;
  background: var(--black);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-brand strong { color: var(--lime); }

.footer-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

/* ---------- Login page ---------- */
.login-page {
  min-height: calc(100vh - 5px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--black) 0%, #1A1A1A 100%);
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 44px 36px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align: center;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.login-card .brand-tag { display: block; margin-bottom: 8px; color: var(--green-dark); }
.login-card .brand-client { display: block; margin-bottom: 24px; font-size: 12px; color: var(--text); }

.login-card h1 {
  font-size: 20px;
  color: var(--black);
  margin: 0 0 8px;
}

.login-card p.hint {
  color: var(--text);
  font-size: 13px;
  margin: 0 0 24px;
}

.login-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.login-card input[type="password"]:focus {
  border-color: var(--lime);
}

.login-card button[type="submit"] {
  width: 100%;
  background: var(--lime);
  color: var(--black);
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.login-card button[type="submit"]:hover { transform: translateY(-1px); }

.login-error {
  color: var(--alert);
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

.login-error.show { display: block; }

/* ---------- Print styles ---------- */
@page {
  margin: 14mm 12mm;
}

@media print {
  html, body { width: 100%; }

  .topbar, .btn-pdf, .lang-switch, .make-stripe, .no-print { display: none !important; }

  body {
    background: var(--white);
    color: #000;
    font-size: 12.5px;
    line-height: 1.5;
  }

  * { box-shadow: none !important; }

  .hero {
    background: var(--black) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 28px 16px 24px;
  }

  .section.alt {
    background: var(--bg-alt) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  thead th {
    background: var(--black) !important;
    color: var(--white) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  tbody tr:nth-child(even) {
    background: var(--bg-alt) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  tbody tr.total-row,
  tbody tr.total-row:nth-child(even) {
    background: var(--lime) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .numbered-list li::before,
  .timeline-item::before {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .thesis {
    background: var(--black) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Evita cortes no meio de blocos visuais e linhas de tabela */
  .timeline-item, .evidence-figure, .grid-item, .chart-wrap,
  .callout, table, tr, .numbered-list li, figure, .thesis, .grid-2, .grid-3, .grid-4 {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Cabeçalho de tabela repete em toda página nova */
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }

  /* Título nunca fica sozinho no fim da página, separado do conteúdo */
  h1, h2, h3, .section-label {
    break-after: avoid;
    page-break-after: avoid;
  }

  .section { padding: 22px 4px; max-width: 100%; }
  .section.alt .section-inner { padding: 0 4px; }

  .section h2 { font-size: 19px; margin-bottom: 14px; }
  .section h3 { font-size: 15px; margin: 22px 0 10px; }
  .section p { font-size: 12.5px; }

  /* Mantém várias colunas no PDF. A limitação de altura abaixo é o que
     evita páginas quase vazias, não reduzir colunas (imagens são retrato) */
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .grid-item { padding: 8px; }

  /* object-fit:contain (não cover): a imagem inteira precisa aparecer,
     principalmente nas telas do Instagram, onde o texto importante fica
     na parte de baixo. Cortar por cima corta a evidência. */
  .grid-item img {
    max-height: 300px;
    width: 100%;
    object-fit: contain;
  }

  .grid-item .caption { font-size: 10.5px; }
  .grid-item .caption strong { font-size: 9.5px; }

  .evidence-figure img { max-width: 220px; }

  table { font-size: 11px; min-width: 0; }
  thead th { padding: 8px 10px; }
  tbody td { padding: 7px 10px; }

  .chart-wrap { padding: 14px; margin-top: 16px; }
  .chart-wrap canvas {
    max-width: 100% !important;
    width: 100% !important;
    height: 260px !important;
    max-height: 260px !important;
  }

  .thesis { padding: 22px; }
  .thesis p { font-size: 15px; }

  .footer { background: var(--black) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  a { color: var(--black); text-decoration: none; }
}
