:root {
  --lg-blue: #0088f0;
  --lg-blue-deep: #006fd1;
  --lg-blue-soft: #e8f4ff;
  --lg-ink: #1a1f2b;
  --lg-muted: #6b7280;
  --lg-line: #e5e7eb;
  --lg-bg: #f5f7fa;
  --lg-ok: #16a34a;
  --lg-ok-bg: #e8f8ef;
  --lg-warn: #f97316;
  --lg-danger: #dc2626;
  --lg-danger-deep: #b91c1c;
  --lg-card: #ffffff;
  --lg-radius: 14px;
  --lg-font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--lg-font);
  color: var(--lg-ink);
  background: var(--lg-bg);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.lg-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  background: linear-gradient(90deg, #0090ff 0%, #0077e6 100%);
  box-shadow: 0 2px 10px rgba(0, 80, 180, 0.22);
}

.lg-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.lg-header__brand img {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(220px, 58vw);
}

.lg-header__menu {
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  cursor: pointer;
}

.lg-header__menu span {
  display: block;
  width: 1.05rem;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.lg-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.lg-steps {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: start;
  gap: 0.35rem;
  margin: 0.35rem 0 1.35rem;
}

.lg-steps--funnel {
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
}

.lg-steps__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 3.6rem;
}

.lg-steps__item i {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
  color: #9ca3af;
  background: #e5e7eb;
}

.lg-steps__item span {
  font-size: 0.68rem;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  line-height: 1.2;
}

.lg-steps__item.is-active i {
  color: #fff;
  background: var(--lg-blue-deep);
}

.lg-steps__item.is-active span {
  color: var(--lg-blue-deep);
}

.lg-steps__item.is-done i {
  color: #fff;
  background: var(--lg-ok);
  font-size: 0.75rem;
}

.lg-steps__item.is-done span {
  color: var(--lg-ok);
}

.lg-steps__line {
  height: 2px;
  margin-top: 0.9rem;
  background: #d1d5db;
  border-radius: 2px;
}

.lg-steps__line.is-done {
  background: var(--lg-ok);
}

.lg-hero {
  text-align: center;
  margin-bottom: 1.15rem;
}

.lg-hero h1 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lg-hero p {
  margin: 0 auto 0.9rem;
  max-width: 22rem;
  color: var(--lg-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.lg-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.lg-trust__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #374151;
  background: #eef1f5;
}

.lg-trust__pill--ok {
  color: #166534;
  background: var(--lg-ok-bg);
}

.lg-trust__pill svg { flex-shrink: 0; }

.lg-card {
  background: var(--lg-card);
  border-radius: var(--lg-radius);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  padding: 1.1rem 1rem 1rem;
  margin-bottom: 1.15rem;
}

.lg-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lg-card__head--sm {
  margin-bottom: 0.85rem;
}

.lg-card__head--sm strong {
  display: block;
  font-size: 1rem;
  font-weight: 750;
}

.lg-muted {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--lg-muted);
  font-weight: 500;
}

.lg-card__icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  background: var(--lg-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lg-card__head strong {
  display: block;
  font-size: 1rem;
  font-weight: 750;
}

.lg-card__head span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.8rem;
  color: var(--lg-muted);
}

.lg-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.lg-field > span {
  font-size: 0.82rem;
  font-weight: 700;
}

.lg-field input,
.lg-field textarea {
  width: 100%;
  border: 2px solid var(--lg-line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--lg-ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

.lg-field textarea {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  word-break: break-all;
}

.lg-field input:focus,
.lg-field textarea:focus {
  border-color: var(--lg-blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 240, 0.15);
}

.lg-field input.is-valid {
  border-color: var(--lg-ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.lg-field input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.lg-field__hint {
  margin: 0 0 0.75rem;
  min-height: 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lg-field__hint.is-ok { color: var(--lg-ok); }
.lg-field__hint.is-err { color: #dc2626; }

.lg-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #1a9bff 0%, #0077e0 100%);
  box-shadow: 0 8px 18px rgba(0, 119, 224, 0.28);
  cursor: pointer;
}

.lg-btn:hover:not(:disabled) { filter: brightness(1.04); }
.lg-btn:disabled { opacity: 0.7; cursor: wait; }

.lg-btn--danger {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.28);
}

.lg-btn--outline {
  background: #fff;
  color: var(--lg-blue-deep);
  border: 2px solid var(--lg-blue);
  box-shadow: none;
}

.lg-card__foot {
  margin: 0.9rem 0 0;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  color: var(--lg-ok);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
}

.lg-card__foot svg {
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.lg-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.lg-feature {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 0.85rem;
  border-radius: 12px;
  background: #eef1f5;
}

.lg-feature__icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lg-feature__icon--blue { color: var(--lg-blue); background: #dcebff; }
.lg-feature__icon--green { color: var(--lg-ok); background: #ddf5e6; }
.lg-feature__icon--orange { color: var(--lg-warn); background: #ffe8d6; }

.lg-feature strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
  margin-bottom: 0.2rem;
}

.lg-feature p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--lg-muted);
}

.lg-faq { margin-bottom: 1.5rem; }

.lg-faq h2 {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
}

.lg-faq__item {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--lg-line);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.lg-faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lg-faq__item summary::-webkit-details-marker { display: none; }

.lg-faq__item summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(45deg);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.lg-faq__item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.25rem;
}

.lg-faq__item p {
  margin: 0;
  padding: 0 1rem 0.95rem;
  color: var(--lg-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

/* Alerts */
.lg-alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.lg-alert svg { flex-shrink: 0; margin-top: 0.1rem; }

.lg-alert strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.lg-alert span {
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.92;
}

.lg-alert--ok {
  color: #14532d;
  background: var(--lg-ok-bg);
  border: 1px solid #bbf7d0;
}

.lg-alert--ok svg { color: var(--lg-ok); }

.lg-alert--warn {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.lg-alert--warn svg { color: var(--lg-warn); }

/* Caixa / molde — só revela a foto quando a etiqueta gerada estiver pronta */
.lg-box-wrap {
  margin-bottom: 1.15rem;
}

.lg-mold {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  min-height: 180px;
}

.lg-mold__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #2a2a2a 8%, #3a3a3a 18%, #2a2a2a 33%);
  background-size: 200% 100%;
  animation: lg-shimmer 1.2s linear infinite;
}

.lg-mold__photo {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lg-mold__photo.is-ready {
  opacity: 1;
}

@keyframes lg-shimmer {
  to { background-position: -200% 0; }
}

/* Loading após CPF */
.lg-loading {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0 3rem;
}

.lg-loading__card {
  width: min(420px, 100%);
  text-align: center;
  padding: 2rem 1.4rem 1.6rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.lg-loading__spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: #00b2ff;
  animation: lg-spin 0.85s linear infinite;
}

@keyframes lg-spin {
  to { transform: rotate(360deg); }
}

.lg-loading__title {
  display: block;
  font-size: 1.05rem;
  color: #111827;
  margin-bottom: 0.35rem;
}

.lg-loading__sub {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #6b7280;
}

.lg-loading__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.lg-loading__steps li {
  position: relative;
  padding: 0.45rem 0.7rem 0.45rem 2rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #9ca3af;
  background: #f9fafb;
}

.lg-loading__steps li::before {
  content: '';
  position: absolute;
  left: 0.7rem;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #d1d5db;
}

.lg-loading__steps li.is-on {
  color: #111827;
  background: #eff9ff;
}

.lg-loading__steps li.is-on::before {
  background: #00b2ff;
  box-shadow: 0 0 0 3px rgba(0, 178, 255, 0.22);
}

.lg-loading__steps li.is-done {
  color: #059669;
}

.lg-loading__steps li.is-done::before {
  background: #10b981;
}

/* Info cards */
.lg-info-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lg-info {
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f3f4f6;
}

.lg-info__k {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lg-muted);
  margin-bottom: 0.2rem;
}

.lg-info strong {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

/* Timeline */
.lg-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.35rem;
}

.lg-timeline li {
  position: relative;
  display: flex;
  gap: 0.75rem;
  padding: 0 0 1rem 0.15rem;
}

.lg-timeline li:last-child { padding-bottom: 0; }

.lg-timeline li::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 1.15rem;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

.lg-timeline li:last-child::before { display: none; }

.lg-timeline i {
  position: relative;
  z-index: 1;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #e5e7eb;
  border: 2px solid #d1d5db;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.lg-timeline li.is-done i {
  background: var(--lg-ok);
  border-color: var(--lg-ok);
}

.lg-timeline li.is-done::before { background: #86efac; }

.lg-timeline li.is-current i {
  background: var(--lg-warn);
  border-color: var(--lg-warn);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
}

.lg-timeline strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
  margin-bottom: 0.1rem;
}

.lg-timeline span {
  font-size: 0.78rem;
  color: var(--lg-muted);
  line-height: 1.35;
}

.lg-timeline li.is-current strong { color: #9a3412; }

/* Tax CTA */
.lg-tax {
  background: linear-gradient(180deg, #fef2f2 0%, #fff 55%);
  border: 1px solid #fecaca;
  border-radius: var(--lg-radius);
  padding: 1.15rem 1rem 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.lg-tax__badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--lg-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lg-tax h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lg-danger-deep);
}

.lg-tax p {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #7f1d1d;
}

.lg-tax__list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  text-align: left;
}

.lg-tax__list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #991b1b;
}

.lg-tax__list li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #fecaca;
  color: var(--lg-danger);
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Countdown + GRU */
.lg-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: #111827;
  color: #fff;
}

.lg-countdown__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.lg-countdown__time {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
}

.lg-gru {
  margin: 0;
}

.lg-gru > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--lg-line);
  font-size: 0.86rem;
}

.lg-gru dt {
  color: var(--lg-muted);
  font-weight: 500;
}

.lg-gru dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lg-gru__discount dt,
.lg-gru__discount dd {
  color: var(--lg-ok);
}

.lg-gru__total {
  border-bottom: 0;
  padding-top: 0.75rem;
  margin-top: 0.15rem;
}

.lg-gru__total dt,
.lg-gru__total dd {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lg-ink);
}

/* PIX */
.lg-pix-timer {
  text-align: center;
  font-size: 0.84rem;
  color: var(--lg-muted);
  margin-bottom: 0.75rem;
}

.lg-pix-timer strong {
  color: var(--lg-warn);
  font-variant-numeric: tabular-nums;
}

.lg-pix-qr {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.lg-pix-qr img {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  border: 1px solid var(--lg-line);
  background: #fff;
}

.lg-pix-amount {
  text-align: center;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.lg-pix-amount strong {
  color: var(--lg-ok);
  font-size: 1.15rem;
}

/* Success */
.lg-success {
  text-align: center;
  padding: 0.5rem 0 1rem;
}

.lg-success__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: var(--lg-ok-bg);
  color: var(--lg-ok);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lg-pop 0.45s ease-out;
}

@keyframes lg-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lg-success h1 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #14532d;
}

.lg-success > p {
  margin: 0 auto 1.15rem;
  max-width: 22rem;
  color: var(--lg-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.lg-success__card {
  text-align: left;
}

.lg-ok-status { color: var(--lg-ok) !important; }

.lg-success__note {
  margin: 0.25rem auto 0;
  font-size: 0.8rem;
  color: var(--lg-muted);
}

.lg-footer {
  background: #151a24;
  color: #e5e7eb;
  text-align: center;
  padding: 2rem 1.25rem 2.4rem;
}

.lg-footer img {
  height: 32px;
  width: auto;
  margin-bottom: 0.85rem;
}

.lg-footer > p {
  margin: 0 auto 1.25rem;
  max-width: 22rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.lg-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
}

.lg-footer__links strong {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.2rem;
}

.lg-footer__links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.84rem;
}

.lg-footer__links a:hover { color: #fff; }

@media (min-width: 520px) {
  .lg-main { padding-top: 1.5rem; }
  .lg-hero h1 { font-size: 1.65rem; }
  .lg-card { padding: 1.25rem; }
}
