:root {
  --bg: #0f0f10;
  --card: #151517;
  --surface: #202024;
  --line: #34343c;
  --muted: #a0a0a8;
  --ring: #7c3aed;
  --ring-2: #9b5df2;
  --text: #f2f2f3;
  --shadow: 0 20px 40px rgba(0, 0, 0, .35);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 1200px at 80% -10%, rgba(124, 58, 237, .15), transparent 40%),
    radial-gradient(900px 900px at 0% 110%, rgba(155, 93, 242, .14), transparent 40%), var(--bg);
  color: var(--text);
  padding: clamp(16px, 3vw, 28px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.app {
  width: 100%;
  max-width: 1100px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 40%) var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: clamp(16px, 3vw, 24px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(124, 58, 237, .06), rgba(124, 58, 237, 0) 40%),
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent);
}

.logo-wrap {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #1b1b1f;
  border: 1px solid #2a2a33;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
  overflow: hidden;
  flex: 0 0 auto;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.title h1 {
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.9rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: .2px;
}

.title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.badge {
  border: 1px solid #3a3a44;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  color: #d4cff8;
  background: rgba(124, 58, 237, .12);
  margin-left: 8px;
  white-space: nowrap;
}

.content {
  display: grid;
  gap: 16px;
  padding: 16px;
}

@media (min-width: 980px) {
  .content {
    grid-template-columns: 1.25fr .85fr;
    gap: 16px;
    padding: 20px;
  }
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(15px, 2.4vw, 18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 24px rgba(0, 0, 0, .22);
}

.section + .section { margin-top: 16px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  margin: -2px 0 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.section-title i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: .95rem;
  color: var(--ring-2);
  background: rgba(124, 58, 237, .14);
  border: 1px solid rgba(124, 58, 237, .3);
  flex: 0 0 auto;
}

textarea,
select,
input[type="text"],
input[type="password"] {
  width: 100%;
  background: #242428;
  border: 1px solid #35353c;
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--text);
  font-size: 0.98rem;
}

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

textarea:focus,
select:focus,
input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .25);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.chip {
  background: #29292f;
  border: 1px solid #3a3a44;
  color: #ddd;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: .85rem;
  cursor: pointer;
  transition: transform .1s ease, background .2s ease;
}

.chip:hover {
  background: #30303a;
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(90deg, var(--ring), var(--ring-2));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.chip.active::before { content: "✓ "; }

.counter { font-size: .83rem; color: #a5a7b2; margin: 6px 0; }
.counter.over { color: #ff8a8a; font-weight: 700; }

.linkbtn {
  background: none; border: 0; cursor: pointer; padding: 4px 6px;
  color: var(--muted); font: inherit; font-size: .82rem; display: inline-flex; align-items: center; gap: 6px;
}
.linkbtn:hover { color: #ff8a8a; }

.voice-current {
  margin-top: 8px; font-size: .9rem; color: var(--text);
  background: #242428; border: 1px solid #35353c; border-radius: 10px; padding: 8px 11px;
}
.voice-current b { color: var(--ring-2); }

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

.row > * { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #3a3a44;
  background: #2d2d33;
  color: #f1f1f5;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, filter .18s ease, background .18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-1px);
  background: #32323a;
}

.btn:active { transform: translateY(0); }

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: linear-gradient(90deg, var(--ring), var(--ring-2));
  border: none;
}

.btn.primary:hover { filter: brightness(1.05); }

.btn.ghost {
  background: transparent;
  border: 1px dashed #4b4b55;
}

.btn.accent {
  background: rgba(124, 58, 237, .16);
  border-color: rgba(124, 58, 237, .45);
  color: #e4d9ff;
}
.btn.accent:hover { background: rgba(124, 58, 237, .26); }

.btn.danger {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .5);
  color: #ff9d9d;
}
.btn.danger:hover { background: rgba(239, 68, 68, .22); color: #ffb4b4; }

.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #24242a;
  border: 1px solid #3b3b44;
  border-bottom-width: 3px;
  padding: 0 .35rem;
  border-radius: 6px;
}

.msg {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #24242a;
  border: 1px solid #3b3b44;
  color: #e9e9ee;
}

.msg.error {
  background: #4a1c1c;
  border-color: #ff6b6b;
  color: #ffecec;
}

.audio-wrap {
  display: none;
  margin-top: 10px;
}
.speed-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; font-size: .8rem; color: var(--muted);
}
.speed-btn {
  border: 1px solid #3a3a44; background: #29292f; color: #ddd;
  border-radius: 999px; padding: 4px 10px; font-size: .78rem; cursor: pointer;
}
.speed-btn.active {
  background: linear-gradient(90deg, var(--ring), var(--ring-2)); color: #fff; border-color: transparent;
}

.mode-toggle {
  display: flex; gap: 6px; margin-bottom: 10px;
  background: #242428; border: 1px solid #35353c; border-radius: 999px; padding: 4px;
}
.mode-btn {
  flex: 1; border: 0; background: none; color: #cfcfd8; cursor: pointer;
  border-radius: 999px; padding: 7px 10px; font: inherit; font-size: .85rem;
}
.mode-btn.active {
  background: linear-gradient(90deg, var(--ring), var(--ring-2)); color: #fff; font-weight: 600;
}
.spk {
  background: #242428; border: 1px solid #35353c; border-radius: 10px; padding: 10px 11px;
}
.spk + .spk { margin-top: 8px; }
.spk input { margin-bottom: 0; }

footer {
  border-top: 1px solid var(--line);
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .02));
}

footer .credit { font-size: .9rem; }

footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #d6d3ff;
  background: rgba(124, 58, 237, .1);
  border: 1px solid #3a3a44;
  padding: 6px 10px;
  border-radius: 999px;
}

/* Utilitários usados no HTML (substituem o Tailwind via CDN, removido) */
.note { font-size: .8rem; color: var(--muted); margin-top: 8px; }
.field-label { display: block; font-size: .8rem; color: #c9c9d2; margin-bottom: 6px; }
.w-full { width: 100%; }
.mt-2 { margin-top: 8px; }
.flex-1 { flex: 1; }
.tip { padding: 4px 20px 10px; font-size: .85rem; color: var(--muted); }

/* ---- Painel do app no celular: mais separação e destaque ---- */
@media (max-width: 720px) {
  .content { gap: 18px; padding: 14px; }
  .section {
    border-radius: 14px;
    border-color: #3c3c45;
    border-left: 3px solid var(--ring);
  }
  .section + .section { margin-top: 18px; }
  .section-title {
    font-size: 1.06rem;
    text-transform: uppercase;
    letter-spacing: .4px;
  }
}

@media (max-width: 420px) {
  .row > * { flex-basis: 100%; }
  .row select,
  .row .btn { min-height: 46px; }
  textarea { min-height: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- Autenticação / área do assinante ---- */
.auth { max-width: 440px; }
.auth .box { padding: 24px; }
.auth h1 { font-size: 1.3rem; margin: 0 0 4px; }
.auth .sub { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.auth label { display: block; font-size: .82rem; color: #c9c9d2; margin: 12px 0 6px; }
.auth .btn { width: 100%; margin-top: 18px; }
.auth .alt { margin-top: 16px; font-size: .88rem; color: var(--muted); text-align: center; }
.auth a { color: var(--ring-2); }

/* mostrar/ocultar senha */
.pw-wrap { position: relative; }
.pw-wrap > input { padding-right: 44px; }
.pw-toggle {
  position: absolute; top: 0; right: 0; height: 100%; width: 42px;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--muted); border-radius: 0 12px 12px 0;
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }

/* divisor "ou" + botão Google */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: .8rem; margin: 18px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.gbtn-wrap { display: flex; justify-content: center; }
.gbtn-wrap > div { color-scheme: light; }

/* preview do botão Google (enquanto o Client ID não está configurado) */
.gbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px; border-radius: 999px;
  background: #fff; color: #1f1f1f; font-weight: 600; font-size: .95rem;
  border: 1px solid #dadce0; cursor: not-allowed; opacity: .85;
}
.gbtn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.gbtn-hint { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 8px; }

.userbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 12px;
  padding: 10px clamp(16px, 3vw, 24px); border-bottom: 1px solid var(--line);
  font-size: .88rem; color: var(--muted); flex-wrap: wrap;
}
.userbar strong { color: var(--text); }
.userbar .quota { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meter { width: 120px; height: 8px; border-radius: 999px; background: #2a2a2e; overflow: hidden; flex: 0 0 auto; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ring), var(--ring-2)); }
.meter.warn > span { background: #e6a23c; }
.meter.full > span { background: #ff6b6b; }
.userbar form { margin: 0; }
.userbar .btn { padding: 7px 12px; font-size: .82rem; }

@media (max-width: 560px) {
  .userbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .userbar > div:first-child {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text);
  }
  .userbar .quota { justify-content: space-between; row-gap: 10px; }
  .userbar .quota > span:first-child { flex: 1 0 100%; font-size: .9rem; color: var(--text); }
  .meter { flex: 1 0 100%; width: 100%; height: 10px; }
  .userbar .quota .btn,
  .userbar .quota form { flex: 1; }
  .userbar .quota .btn,
  .userbar .quota form .btn { width: 100%; min-height: 42px; }
}

.notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px clamp(16px, 3vw, 24px);
  font-size: .86rem; border-bottom: 1px solid var(--line);
  background: #24242a; color: #e9e9ee;
}
.notice a, .notice .btn { font-size: .82rem; }
.notice.warn { background: #3a3320; border-color: #6d5f2f; color: #f5e6c8; }
.notice.danger { background: #3f1e1e; border-color: #7a3a3a; color: #ffdede; }
.notice .grow { flex: 1; }

/* ---- Landing ---- */
.lp { max-width: 1120px; margin: 0 auto; padding: clamp(16px, 4vw, 40px); }
.lp-hero h1, .lp-hero > p { max-width: 720px; margin-left: auto; margin-right: auto; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: clamp(28px, 6vw, 56px); }
.lp-nav .logo-wrap { width: 40px; height: 40px; }
.lp-nav nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lp-hero { text-align: center; padding: clamp(8px, 3vw, 24px) 0 clamp(28px, 6vw, 48px); }
.lp-hero h1 { font-size: clamp(1.9rem, 1rem + 4vw, 3.2rem); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.5px; }
.lp-hero p { color: var(--muted); font-size: clamp(1rem, .9rem + .5vw, 1.2rem); max-width: 620px; margin: 0 auto 24px; }
.lp-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-section { margin: clamp(36px, 8vw, 72px) 0; }
.lp-section h2 { font-size: clamp(1.3rem, 1rem + 1.5vw, 1.8rem); text-align: center; margin: 0 0 8px; }
.lp-section > p.lead { text-align: center; color: var(--muted); margin: 0 auto 28px; max-width: 560px; }
.lp-steps { display: grid; gap: 14px; }
@media (min-width: 760px) { .lp-steps { grid-template-columns: repeat(3, 1fr); } }
.lp-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.lp-step .n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(124, 58, 237, .15); color: var(--ring-2); font-weight: 800; margin-bottom: 10px; }
.lp-faq { max-width: 720px; margin: 0 auto; }
.lp-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.lp-faq summary { cursor: pointer; font-weight: 600; }
.lp-faq p { color: var(--muted); margin: 10px 0 0; }
.lp-foot { text-align: center; color: var(--muted); font-size: .9rem; padding: 32px 0 8px; border-top: 1px solid var(--line); }

.cards { display: grid; gap: 14px; padding: 16px; align-items: stretch; }
@media (min-width: 620px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 20px; } }
.lp .cards { padding: 0; }

.plan {
  display: flex; flex-direction: column; position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 18px;
}
.plan .btn { text-decoration: none; }
.plan h3 { margin: 0 0 2px; font-size: 1.02rem; }
.plan .tagline { color: var(--muted); font-size: .78rem; line-height: 1.35; min-height: 2.1em; }
.plan .price { font-size: 1.7rem; font-weight: 800; margin: 8px 0 2px; letter-spacing: -.5px; }
.plan .jump { display: inline-block; margin-top: 6px; font-size: .72rem; font-weight: 700;
  color: #b6f0c4; background: rgba(60, 180, 100, .12); border: 1px solid #2f6d45;
  border-radius: 999px; padding: 2px 9px; }
.plan .price small { font-size: .78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .quota-line { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.plan ul { list-style: none; margin: 14px 0 0; padding: 0; color: #d6d6dc; font-size: .86rem; }
.plan ul li { position: relative; padding-left: 20px; margin: 7px 0; }
.plan ul li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ring-2); font-weight: 700;
}
.plan .cta { margin-top: auto; padding-top: 18px; }
.plan .cta .btn { width: 100%; }

.plan.featured { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(124, 58, 237, .2); }
.plan.current  { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(124, 58, 237, .18); }
.plan .tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--ring), var(--ring-2)); color: #fff;
  font-size: .66rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .35);
}
.cards-note { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 18px; }

/* toggle mensal / anual */
.billing-toggle { display: inline-flex; align-items: center; gap: 4px; margin: 0 auto 22px;
  padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.billing-toggle button { border: 0; background: none; color: var(--muted); cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 600; padding: 7px 16px; border-radius: 999px; }
.billing-toggle button.on { background: linear-gradient(90deg, var(--ring), var(--ring-2)); color: #fff; }
.billing-toggle .save { font-size: .7rem; color: #b6f0c4; margin-left: 2px; }
.toggle-wrap { text-align: center; }

.plan .price-year, .plan .year-note { display: none; }
.cards.annual .plan .price-month { display: none; }
.cards.annual .plan .price-year { display: block; }
.cards.annual .plan .year-note { display: block; color: var(--muted); font-size: .74rem; margin-top: 3px; }
.guarantee { display: flex; align-items: center; gap: 10px; justify-content: center;
  margin: 14px auto 0; max-width: 520px; text-align: center; color: #d6d6dc; font-size: .88rem; }
.guarantee i { color: var(--ring-2); font-size: 1.1rem; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center;
  margin: 22px auto 0; color: var(--muted); font-size: .82rem; }
.trust-strip span { display: inline-flex; align-items: center; gap: 7px; }
.trust-strip i { color: var(--ring-2); }
