:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.auth-card h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.auth-card h2 {
  margin: 4px 0 16px;
  color: #334155;
  font-size: 21px;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  background: #ffffff;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: var(--primary);
}

button {
  margin-top: 16px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

button.secondary {
  background: #64748b;
}

button.secondary:hover {
  background: #475569;
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: #b91c1c;
}

button.success {
  background: var(--success);
}

button.success:hover {
  background: #15803d;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.message {
  margin-top: 12px;
  font-weight: 700;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.topbar {
  background: linear-gradient(135deg, #111827, #1e293b);
  color: #ffffff;
  padding: 24px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.topbar p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.topbar nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: 999px;
}

.topbar a:hover {
  background: rgba(255, 255, 255, 0.18);
  text-decoration: none;
}

.topbar button {
  margin-top: 0;
  background: var(--danger);
  border-radius: 999px;
}

.container {
  max-width: 1180px;
  margin: 28px auto;
  padding: 0 22px 48px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card h2 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

.metric {
  font-size: 30px;
  font-weight: 800;
  margin: 8px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 13px;
}

.result-box {
  background: #0f172a;
  color: #d1fae5;
  padding: 18px;
  border-radius: 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  margin-top: 16px;
}

.list {
  margin-top: 16px;
}

.list-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  background: var(--surface-soft);
}

.list-item h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions button {
  margin-top: 8px;
}

.hidden {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 24px;
}

@media (max-width: 800px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
  }

  .topbar nav {
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 28px;
  }
}
.history-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.history-card-header h3 {
  margin: 0;
  word-break: break-word;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.history-bug {
  margin-bottom: 12px;
}

.history-details {
  margin-top: 14px;
}

.history-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--primary);
}

.history-detail-content {
  margin-top: 14px;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 24px;
  background: var(--surface-soft);
  color: var(--muted);
}

.empty-state h3 {
  margin-top: 0;
  color: var(--text);
}

.error-state {
  border-color: rgba(220, 38, 38, 0.35);
}

.history-loading {
  color: var(--muted);
}

@media (max-width: 800px) {
  .history-card-header {
    flex-direction: column;
  }
}

.code-box {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.project-file-content {
  max-width: 100%;
  margin-top: 12px;
}

.project-file-content .code-box {
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.project-file-item {
  align-items: flex-start;
}

.project-file-main {
  width: 100%;
  min-width: 0;
}

.project-file-main span {
  display: block;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.history-card,
.project-files-box,
.solution-card {
  max-width: 100%;
  overflow: hidden;
}
.project-files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
}

.project-file-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.project-file-main > span,
.project-file-item > span {
  flex: 1;
  min-width: 180px;
  font-family: monospace;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.project-file-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.project-file-actions button {
  min-width: 105px;
  padding: 9px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.project-file-content {
  width: 100%;
  margin-top: 12px;
}

.project-file-content.hidden {
  display: none;
}

.project-file-content .code-box {
  max-width: 100%;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .project-file-main,
  .project-file-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-file-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .project-file-actions button {
    min-width: auto;
  }
}
/* ------------------------------------------------------------
   Planos
------------------------------------------------------------ */

.plans-grid {
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

button:disabled,
button:disabled:hover {
  background: #cbd5e1;
  color: #475569;
  cursor: not-allowed;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-card.current {
  outline: 2px solid #2563eb;
}

.plan-price {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 4px 0;
}

.plan-price small {
  font-size: 0.9rem;
  font-weight: 400;
  color: #64748b;
}

.plan-card .actions {
  margin-top: auto;
}

/* ------------------------------------------------------------
   Aceite de termos e links legais
   ------------------------------------------------------------ */

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 14px;
  color: #334155;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  padding: 0;
}

.auth-legal-links {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.auth-legal-links a {
  font-weight: 400;
  color: var(--muted);
}

.app-footer {
  max-width: 1180px;
  margin: 8px auto 32px;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.app-footer a {
  font-weight: 400;
  color: var(--muted);
}

.legal-seller {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------------
   Site público (página de vendas, termos, privacidade)
   ------------------------------------------------------------ */

.site {
  background: #ffffff;
}

.site-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.site-brand {
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-brand span {
  color: var(--primary);
}

.site-brand:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a:not(.site-button) {
  color: #334155;
  font-weight: 600;
  font-size: 15px;
}

.site-button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--primary);
  border: 2px solid var(--primary);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
}

.site-button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  text-decoration: none;
}

.site-button-lg {
  padding: 14px 26px;
  font-size: 17px;
}

.site-button-outline {
  background: transparent;
  color: var(--primary);
}

.site-button-outline:hover {
  background: #eff6ff;
  color: var(--primary-hover);
}

.site-button-light {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--primary);
}

.site-button-light:hover {
  background: #eff6ff;
  border-color: #eff6ff;
}

.site-link {
  font-weight: 700;
}

.hero {
  background: linear-gradient(135deg, #111827, #1e293b);
  color: #ffffff;
  padding: 72px 0 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 20px 0 0;
  font-size: 18px;
  color: #cbd5e1;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero .site-link {
  color: #93c5fd;
}

.hero-note {
  margin: 16px 0 0;
  font-size: 14px;
  color: #94a3b8;
}

.hero-sample {
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.sample-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.sample-input p {
  margin: 6px 0 0;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
}

.sample-arrow {
  text-align: center;
  font-size: 22px;
  color: var(--primary);
  margin: 8px 0;
}

.sample-output {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.sample-output li {
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  background: #eff6ff;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: #334155;
}

.sample-output strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.site-section {
  padding: 72px 0;
}

.site-section-alt {
  background: var(--bg);
}

.section-title {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-lead {
  margin: 0 auto 36px;
  max-width: 620px;
  text-align: center;
  color: var(--muted);
  font-size: 17px;
}

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

.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.steps h3 {
  margin: 14px 0 6px;
  font-size: 18px;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.price-card-featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
}

.price-card h3 {
  margin: 0;
  font-size: 20px;
}

.price {
  margin: 18px 0 4px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price span {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

.price-limit {
  margin: 0 0 24px;
  color: #334155;
  flex-grow: 1;
}

.faq {
  max-width: 760px;
}

.faq .section-title {
  margin-bottom: 28px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
}

.faq details p {
  margin: 10px 0 0;
  color: #334155;
}

.cta-band {
  background: var(--primary);
  color: #ffffff;
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 14px;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer nav a {
  color: #334155;
  font-weight: 600;
}

.legal-doc {
  max-width: 820px;
  padding-top: 48px;
  padding-bottom: 64px;
}

.legal-doc h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: -0.02em;
}

.legal-doc h2 {
  margin: 36px 0 10px;
  font-size: 21px;
}

.legal-doc p,
.legal-doc li {
  color: #1e293b;
}

.legal-doc li {
  margin-bottom: 6px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 8px 0 16px;
}

.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--border);
}

.legal-table th {
  background: var(--surface-soft);
}

@media (max-width: 860px) {
  .hero {
    padding: 48px 0 56px;
  }

  .hero-inner,
  .feature-grid,
  .steps,
  .price-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 34px;
  }

  .site-nav a[href^="#"] {
    display: none;
  }

  .site-nav {
    flex-wrap: nowrap;
    gap: 14px;
  }

  .site-header .site-button {
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .site-brand span {
    display: none;
  }

  .section-title {
    font-size: 26px;
  }

  .legal-table {
    display: block;
    overflow-x: auto;
  }
}

.forgot-link {
  margin: 12px 0 0;
  text-align: right;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* Faixa da apresentação em PDF (página inicial) */
.doc-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 44px;
  border: 1px solid var(--border);
  border-left: 6px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.doc-band-text h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.doc-band-text p {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
}

.doc-band-text .doc-band-eyebrow {
  color: var(--primary);
}

.doc-band-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .doc-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }

  .doc-band-actions {
    align-items: flex-start;
  }
}

/* Página da apresentação (apresentacao.html) */
.deck-page {
  max-width: 1120px;
  padding-top: 48px;
  padding-bottom: 72px;
}

.deck-eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.deck-page h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.deck-lead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 760px;
}

.deck-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.slide-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-top: 44px;
}

.slide-figure {
  margin: 0;
}

.slide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface-soft);
}

.slide-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.deck-end {
  margin-top: 56px;
  padding: 36px 40px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.deck-end h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.deck-end p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .deck-page {
    padding-top: 32px;
  }

  .deck-page h1 {
    font-size: 28px;
  }

  .slide-list {
    gap: 24px;
  }

  .slide-figure img {
    border-radius: 8px;
  }

  .deck-end {
    padding: 28px 24px;
  }
}

.deck-hint {
  margin: 28px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.slide-list {
  margin-top: 16px;
}

.slide-figure a {
  display: block;
}
