:root {
  --brand: #00a93f;
  --brand-strong: #008a34;
  --brand-soft: #e8f8ee;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f6f8fb;
  color: #0f172a;
}
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: #64748b; font-size: 0.875rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }

.hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  width: 100%;
  padding: 3rem 1rem 5.5rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #00a93f 0%, #00c853 55%, #00e676 100%);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
}
.hero::before {
  width: 20rem;
  height: 20rem;
  top: -5rem;
  left: -5rem;
  background: rgba(255, 255, 255, 0.18);
}
.hero::after {
  width: 18rem;
  height: 18rem;
  right: -4rem;
  bottom: -6rem;
  background: rgba(255, 255, 255, 0.12);
}
.hero > * { position: relative; z-index: 1; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.15);
  font-weight: 700;
}
.mini-badge { width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; object-fit: cover; display: block; }
.brand-name { font-size: 1.25rem; font-weight: 700; }
.hero-icon { width: 46px; height: 46px; margin: 1.5rem auto 0; opacity: 0.95; display: block; }
.hero h1 { margin: 0.75rem 0 0; font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.hero-sub { margin: 0.35rem 0 0; font-size: 0.9375rem; color: rgba(255,255,255,0.88); }

.content {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  margin: -3.5rem auto 0;
  padding: 0 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Os cards de resultado/histórico ficam dentro do #result; sem isso o gap
   do .content não se aplica entre eles e os blocos ficam colados. */
#result {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: #fff;
  border: 1px solid #e5eaf1;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.code-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #334155;
}
.code-box svg { color: #94a3b8; flex-shrink: 0; }
.code-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 0.9375rem;
  color: #334155;
  outline: none;
  text-transform: uppercase;
}
.code-box input::placeholder { color: #94a3b8; text-transform: none; }
.code-box .btn { padding: 0.55rem 1.1rem; flex-shrink: 0; }

.code-head {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.code-head .label { margin: 0; }
.copy-code {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}
.copy-code:hover { background: var(--brand-soft); }
.code-value {
  margin: 0.15rem 0 0;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.captcha-wrap {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.fake-captcha {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  max-width: 20rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
  text-align: left;
}
.fake-captcha:hover { border-color: #cbd5e1; }
.fake-captcha-check {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 2px solid #cbd5e1;
  background: #fff;
}
.fake-captcha-check.checked {
  border-color: #10b981;
  background: #10b981;
}

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mini-brand { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; font-weight: 700; color: var(--brand); }
.status-pill { border-radius: 9999px; padding: 0.3rem 0.75rem; font-size: 0.75rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-strong); white-space: nowrap; }

.label { margin: 1.25rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.value { margin: 0.125rem 0 0; font-size: 0.9375rem; font-weight: 600; color: #1e293b; }
.strong { font-size: 1.125rem; font-weight: 700; }

.info-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: #f8fafc;
  border-radius: 0.875rem;
  padding: 1rem;
}
.info-grid .label { margin-top: 0; }
.info-item { display: flex; align-items: flex-start; gap: 0.75rem; min-width: 0; }
.info-icon { color: var(--brand); flex-shrink: 0; margin-top: 0.1rem; }

.produto-line {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #e5eaf1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #64748b;
}
.produto-line strong { color: #0f172a; font-weight: 600; }

.taxation { border: 1px solid var(--brand); background: var(--brand-soft); }
.taxation-title { font-size: 0.875rem; font-weight: 600; color: var(--brand-strong); margin: 0; }
.taxation-value { font-size: 1.125rem; font-weight: 600; color: #0f172a; margin: 0.5rem 0 0; }

.section-title { font-size: 1.35rem; font-weight: 700; color: #0f172a; margin: 0 0 1.25rem; letter-spacing: -0.01em; }

.tl-item { display: flex; gap: 1rem; }
.tl-marker { display: flex; flex-direction: column; align-items: center; }
.tl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.tl-line { width: 2px; flex: 1; min-height: 1.5rem; margin-top: 0.25rem; }
.tl-body { flex: 1; min-width: 0; padding-bottom: 1.75rem; }
.tl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.tl-title { font-size: 0.9375rem; font-weight: 600; color: #1e293b; margin: 0; }
.tl-sub { font-size: 0.875rem; color: #64748b; margin: 0.25rem 0 0; }
.tl-local {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand);
  margin: 0.5rem 0 0;
}
.tl-local svg { flex-shrink: 0; }
.tl-date { font-size: 0.8125rem; color: #94a3b8; white-space: nowrap; }

.help .section-title { font-size: 1rem; margin-bottom: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  padding: 0.6rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
}
.btn:hover { filter: brightness(0.95); }
.btn-secondary { background: transparent; border: 1px solid #e2e8f0; color: #334155; margin-top: 0.75rem; }
