:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #edf5f2;
  --ink: #14211f;
  --muted: #65736f;
  --line: #d9e3df;
  --brand: #0f766e;
  --brand-dark: #084d49;
  --blue: #1677b8;
  --gold: #c8912e;
  --coral: #c85b4a;
  --danger: #b42318;
  --ok: #16835e;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.site-header,
.app-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-lockup {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 24px;
  font-weight: 850;
  gap: 12px;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-lockup img {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 60px;
  object-fit: contain;
  padding: 4px;
  width: 60px;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-actions,
.app-header-actions,
.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

a.primary-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.demo-cta {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.hero-phone {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 6px;
  margin: 14px 0 0;
}

.hero-phone strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.whatsapp-fab {
  align-items: center;
  background: #25d366;
  border-radius: 999px;
  bottom: 22px;
  box-shadow: 0 12px 28px rgba(17, 26, 24, 0.28);
  color: #ffffff;
  display: flex;
  height: 64px;
  justify-content: center;
  right: 22px;
  position: fixed;
  text-decoration: none;
  transition: transform 0.15s ease;
  width: 64px;
  z-index: 60;
}

.whatsapp-fab:hover {
  transform: scale(1.08);
}

.whatsapp-fab[hidden] {
  display: none;
}

.page {
  display: none;
}

.page.is-active {
  display: block;
}

.hero-section {
  align-items: center;
  background:
    linear-gradient(
      90deg,
      rgba(244, 247, 246, 0.99),
      rgba(244, 247, 246, 0.95) 40%,
      rgba(244, 247, 246, 0.42) 62%,
      rgba(244, 247, 246, 0.04) 86%
    ),
    url("/assets/logo-meu-bolso-ai.png") right 8vw center / min(42vw, 520px) no-repeat;
  /* multiply funde o fundo branco do PNG com a cor da pagina */
  background-color: var(--bg);
  background-blend-mode: normal, multiply;
  display: flex;
  min-height: calc(100vh - 72px);
  padding: 56px 28px;
}

.hero-content {
  margin: 0 auto;
  max-width: 1180px;
  width: 100%;
}

.hero-content h1,
.auth-copy h1 {
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0;
  max-width: 820px;
}

.hero-copy,
.auth-copy p,
.section-heading p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.58;
  max-width: 720px;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 0;
}

h3 {
  font-size: 16px;
  margin: 0;
}

.primary-button,
.secondary-button,
.text-button,
.ghost-button,
.tab-button,
.app-nav-button,
.sim-nav-button,
.icon-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
}

.primary-button {
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  padding: 11px 16px;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button.compact,
.secondary-button.compact {
  min-height: 38px;
  padding: 9px 13px;
}

.secondary-button {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--brand-dark);
  font-weight: 800;
  padding: 11px 16px;
}

.text-button {
  background: transparent;
  color: var(--brand-dark);
  font-weight: 800;
  padding: 9px 10px;
}

.ghost-button {
  background: var(--surface-soft);
  color: var(--brand-dark);
  font-weight: 750;
  padding: 9px 11px;
}

.content-band,
.feature-band,
.report-preview {
  margin: 0 auto;
  max-width: 1180px;
  padding: 78px 28px;
}

.section-heading {
  margin-bottom: 28px;
}

.steps-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.steps-grid article,
.metric-panel,
.tool-panel,
.auth-panel,
.report-window,
.panel,
.verification-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.steps-grid article {
  padding: 22px;
}

.steps-grid span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.steps-grid p,
.feature-list span,
.report-window span {
  color: var(--muted);
  line-height: 1.5;
}

.feature-band {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
}

section[id] {
  scroll-margin-top: 110px;
}

.landing-chat {
  background: #ece5dd;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  margin: 0 auto;
  max-width: 560px;
  padding: 24px 18px;
}

.profile-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 4px;
}

.soon-tag {
  background: var(--gold, #c8912e);
  border-radius: 999px;
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  justify-self: start;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  text-transform: uppercase;
}

.feature-list strong .soon-tag {
  margin-left: 6px;
  vertical-align: middle;
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-list div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 12px 0;
}

.report-preview {
  align-items: center;
  display: grid;
  gap: 30px;
  grid-template-columns: 0.86fr 1fr;
  padding-bottom: 96px;
}

.report-window {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.report-window > div:not(.bar-row) {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
}

.report-window strong {
  color: var(--brand-dark);
  font-size: 22px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-row b {
  background: linear-gradient(90deg, var(--blue), var(--brand));
  border-radius: 999px;
  display: block;
  height: 12px;
}

.auth-page {
  align-items: center;
  display: none;
  gap: 36px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 460px);
  margin: 0 auto;
  max-width: 1180px;
  min-height: calc(100vh - 72px);
  padding: 52px 28px;
}

.auth-page.is-active {
  display: grid;
}

.auth-panel {
  padding: 20px;
}

.auth-tabs {
  background: var(--surface-soft);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
  padding: 4px;
}

.tab-button {
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab-button.is-active {
  background: #ffffff;
  color: var(--brand-dark);
}

.auth-form,
.app-section,
.sim-view {
  display: none;
}

.auth-form.is-active,
.app-section.is-active,
.sim-view.is-active {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 6px;
}

input,
select,
textarea {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 11px;
  width: 100%;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 18px,
    calc(100% - 11px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px;
  padding-right: 32px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(15, 118, 110, 0.16);
}

.phone-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1.1fr);
}

.login-identifier-grid.is-email {
  grid-template-columns: 1fr;
}

.login-identifier-grid.is-email #loginCountryLabel {
  display: none;
}

.link-button {
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  min-height: auto;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: fit-content;
}

.link-button:hover {
  color: var(--brand-dark);
}

.align-left {
  justify-self: start;
}

.reset-code-section {
  display: grid;
  gap: 14px;
}

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

.checkbox-row input {
  min-height: auto;
  width: auto;
}

.assistant-reply {
  background: var(--surface-soft);
  border-radius: 8px;
  color: var(--brand-dark);
  font-size: 14px;
  min-height: 42px;
  overflow-wrap: anywhere;
  padding: 12px;
}

.compact-reply {
  font-size: 13px;
  min-height: 38px;
  padding: 10px 12px;
}

.app-shell {
  min-height: 100vh;
}

.app-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1320px;
  padding: 18px 24px 40px;
}

.app-sidebar {
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 6px 14px 0 0;
  position: sticky;
  top: 90px;
}

.app-nav-button,
.sim-nav-button {
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  padding: 12px 13px;
  text-align: left;
}

.app-nav-button.is-active,
.sim-nav-button.is-active,
.simulator-link {
  background: #e3f1ed;
  color: var(--brand-dark);
}

.app-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.app-section {
  min-width: 0;
}

.section-title-row,
.panel-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title-row h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.verification-panel {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 16px;
}

.verification-panel div:first-child {
  display: grid;
  gap: 4px;
}

.verification-panel span {
  color: var(--muted);
}

.verify-inline {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 180px) auto;
}

.kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}

.metric-panel {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.metric-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-panel strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.tool-panel,
.panel {
  padding: 18px;
}

.history-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 16px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-list div {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 10px;
}

.history-list.expanded div {
  grid-template-columns: minmax(130px, 0.5fr) minmax(180px, 1fr) minmax(200px, 1.5fr);
}

.history-list strong {
  color: var(--ink);
  font-size: 14px;
}

.history-list span {
  color: var(--muted);
  font-size: 13px;
}

.simulator-workspace {
  display: grid;
  gap: 16px;
  grid-template-columns: 170px minmax(320px, 640px);
}

.simulator-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.sim-phone-frame {
  background: #edf6f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto minmax(280px, 48vh) auto auto auto;
  overflow: hidden;
}

.sim-chat-header {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.sim-chat-header div {
  display: grid;
  gap: 2px;
}

.sim-chat-header span:not(.step-code) {
  color: var(--muted);
  font-size: 12px;
}

.sim-chat-messages {
  align-content: start;
  background:
    linear-gradient(rgba(237, 246, 242, 0.92), rgba(237, 246, 242, 0.92)),
    radial-gradient(circle at 15% 20%, rgba(15, 118, 110, 0.08), transparent 24%),
    radial-gradient(circle at 82% 80%, rgba(22, 131, 94, 0.08), transparent 22%);
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding: 14px;
}

.chat-bubble {
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(17, 26, 24, 0.08);
  display: grid;
  gap: 4px;
  max-width: min(76%, 520px);
  padding: 10px 12px 7px;
}

.chat-bubble p {
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
}

.chat-bubble span {
  color: var(--muted);
  font-size: 11px;
  justify-self: end;
}

.chat-bubble.is-user {
  background: #d9fdd3;
  justify-self: end;
}

.chat-bubble.is-assistant {
  background: #ffffff;
  justify-self: start;
}

.chat-bubble.is-system {
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  justify-self: center;
  max-width: 92%;
}

.sim-composer {
  align-items: end;
  background: #ffffff;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 42px 42px minmax(0, 1fr) auto;
  padding: 10px;
}

.icon-button.is-recording {
  background: #fdd9d7;
  color: #b42318;
  animation: recording-pulse 1.2s ease-in-out infinite;
}

@keyframes recording-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(180, 35, 24, 0); }
}

.sim-composer textarea {
  max-height: 120px;
  min-height: 42px;
  resize: none;
}

.icon-button {
  background: var(--surface-soft);
  color: var(--brand-dark);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.icon-button:hover {
  background: #dcece7;
}

.sim-attachment-name {
  background: #ffffff;
  color: var(--muted);
  display: none;
  font-size: 12px;
  padding: 0 12px 10px;
}

.sim-attachment-name.has-file {
  display: block;
}

.status-pill,
.step-code {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  padding: 7px 10px;
}

.status-pill.is-ok {
  border-color: rgba(22, 131, 94, 0.35);
  color: var(--ok);
}

.status-pill.is-error {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--danger);
}

.state-grid,
.details-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.state-grid {
  margin-bottom: 14px;
}

.state-grid div,
.details-grid dt,
.details-grid dd {
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding-bottom: 8px;
}

.state-grid span,
.details-grid dt {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.state-grid strong,
.details-grid dd {
  color: var(--ink);
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

pre {
  background: #111a18;
  border-radius: 8px;
  color: #e8f2ef;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  min-height: 280px;
  overflow: auto;
  padding: 14px;
}

@media (max-width: 1080px) {
  .site-nav {
    display: none;
  }

  .steps-grid,
  .feature-band,
  .report-preview,
  .auth-page,
  .kpi-grid,
  .simulator-workspace {
    grid-template-columns: 1fr;
  }

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

  .app-sidebar {
    display: flex;
    overflow-x: auto;
    padding: 0 0 12px;
    position: static;
  }

  .app-nav-button {
    min-width: 128px;
    text-align: center;
  }

  .simulator-sidebar {
    flex-direction: row;
    overflow-x: auto;
  }

  .sim-nav-button {
    min-width: 110px;
    text-align: center;
  }
}

@media (max-width: 680px) {
  .site-header,
  .app-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 12px 16px;
  }

  .site-actions,
  .app-header-actions {
    width: 100%;
  }

  .site-actions button,
  .app-header-actions button {
    flex: 1;
  }

  .hero-section {
    background:
      linear-gradient(
        180deg,
        rgba(244, 247, 246, 0.08),
        rgba(244, 247, 246, 0.5) 200px,
        rgba(244, 247, 246, 0.96) 256px
      ),
      url("/assets/logo-meu-bolso-ai.png") center 24px / 220px no-repeat;
    background-color: var(--bg);
    background-blend-mode: normal, multiply;
    min-height: auto;
    padding: 260px 18px 54px;
  }

  .hero-actions,
  .verify-inline,
  .phone-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    display: grid;
  }

  .content-band,
  .feature-band,
  .report-preview,
  .auth-page {
    padding: 52px 18px;
  }

  .app-workspace {
    padding: 14px;
  }

  .verification-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .history-list.expanded div {
    grid-template-columns: 1fr;
  }

  .brand-lockup {
    font-size: 20px;
  }

  .brand-lockup img {
    height: 48px;
    width: 48px;
  }
}

/* ----- Páginas legais (termos / privacidade) + rodapé ----- */
.legal-page {
  margin: 0 auto;
  max-width: 760px;
  padding: 48px 28px 72px;
}

.legal-back {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
  margin-bottom: 24px;
  text-decoration: none;
}

.legal-back:hover {
  color: var(--brand);
}

.legal-page h1 {
  color: var(--ink);
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.legal-updated {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 28px;
}

.legal-page h2 {
  border-top: 1px solid var(--line);
  color: var(--brand-dark);
  font-size: 20px;
  font-weight: 800;
  margin: 40px 0 14px;
  padding-top: 26px;
}

.legal-page h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  margin: 22px 0 8px;
}

.legal-page p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 14px;
}

.legal-page ul,
.legal-page ol {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-page li {
  margin: 0 0 6px;
}

.legal-page a {
  color: var(--brand);
  font-weight: 700;
}

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

.legal-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 4px 0 16px;
  padding: 16px 20px;
}

.legal-card p {
  margin: 0 0 4px;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  margin-top: 48px;
  padding: 26px 28px;
}

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

.site-footer a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand);
}

.site-footer small {
  font-size: 13px;
}

@media (max-width: 640px) {
  .legal-page {
    padding: 32px 20px 56px;
  }

  .legal-page h1 {
    font-size: 27px;
  }
}
