/* O TESTE GRÁTIS DE 7 DIAS (28/11/2026): a pílula no topo, o painel, a janela «Escolher plano», a faixa do fim e o aviso de recusa.
 * Carregada só com o /me trazendo `testeGratis` (chave LANGRIS_TESTE_GRATIS_MODO, que nasce desligada). CSP: só classes e custom properties.
 * Os tokens são os da casa (--k-*), com a saída clara e a escura; nada de sombra pesada nem gradiente: uma frase, um botão. */
.tg-pilula, .tg-painel, .tg-janela, .tg-faixa, .tg-aviso {
  --tg-papel: var(--k-papel, #ffffff); --tg-marfim: var(--k-marfim, #fbf8f1); --tg-linha: var(--k-linha, #e6e1d6); --tg-tinta: var(--k-tinta, #131316);
  --tg-texto-2: var(--k-texto-2, #5c5a62); --tg-lima: var(--k-lima, #cdf54a); --tg-lima-borda: #b6dd2f; --tg-azul: var(--k-cobalto-texto, #1e3fc4);
  font-family: var(--k-fonte, "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif); color: var(--tg-tinta);
}
body[data-op-tema="escuro"] .tg-pilula, body[data-op-tema="escuro"] .tg-painel, body[data-op-tema="escuro"] .tg-janela, body[data-op-tema="escuro"] .tg-faixa, body[data-op-tema="escuro"] .tg-aviso {
  --tg-papel: #1a1b22; --tg-marfim: #14151b; --tg-linha: #343641; --tg-tinta: #f3f1ea; --tg-texto-2: #b4b2bd; --tg-azul: #9db4ff;
}
.tg-pilula *, .tg-painel *, .tg-janela *, .tg-faixa *, .tg-aviso * { box-sizing: border-box; }
.tg-pilula :is(h2, h3, p, ul), .tg-painel :is(h2, h3, p, ul), .tg-janela :is(h2, h3, p, ul), .tg-faixa p, .tg-aviso p { margin: 0; padding: 0; }

/* ── a pílula: no canto superior direito, ao lado do menu da conta ───────────────────────────────── */
.tg-pilula {
  position: fixed; top: 14px; right: 92px; z-index: 95; display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border: 1px solid var(--tg-linha);
  border-radius: 999px; background: var(--tg-papel); font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap;
}
.tg-pilula:hover { border-color: var(--tg-tinta); }
.tg-pilula:focus-visible, .tg-botao:focus-visible, .tg-ciclo__opcao:focus-visible { outline: 2px solid var(--tg-azul); outline-offset: 2px; }
.tg-pilula--atencao { background: var(--tg-lima); border-color: var(--tg-lima-borda); color: #131316; }

/* ── o painel que a pílula abre ───────────────────────────────────────────────────────────────────── */
.tg-painel {
  position: fixed; top: 60px; right: 92px; z-index: 96; width: min(320px, calc(100vw - 24px)); padding: 18px; border: 1px solid var(--tg-linha); border-radius: 18px;
  background: var(--tg-papel); display: grid; gap: 12px;
}
.tg-painel__titulo { font-size: 16px; font-weight: 700; }
.tg-cotas { list-style: none; display: grid; gap: 8px; }
.tg-cota { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.tg-cota__nome { color: var(--tg-texto-2); }
.tg-cota--acabou .tg-cota__valor { color: var(--tg-azul); }
.tg-painel__nota, .tg-caixa__nota, .tg-nota { font-size: 13px; line-height: 1.4; color: var(--tg-texto-2); }
.tg-nota { margin: 6px 0 0; }

/* ── botões ───────────────────────────────────────────────────────────────────────────────────────── */
.tg-botao {
  min-height: 44px; padding: 0 20px; border: 1px solid var(--tg-tinta); border-radius: 999px; background: transparent; color: var(--tg-tinta); font: inherit; font-size: 15px;
  font-weight: 600; cursor: pointer;
}
.tg-botao--limao { background: var(--tg-lima); border-color: var(--tg-lima-borda); color: #131316; }
.tg-botao--limao:hover { background: #d8fa6a; }
.tg-botao--texto { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.tg-botao:disabled { opacity: .55; cursor: progress; }

/* ── a janela «Escolher plano» e a tela do fim ────────────────────────────────────────────────────── */
.tg-janela { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(19, 19, 22, .55); overflow-y: auto; }
.tg-caixa { width: min(880px, 100%); padding: 28px; border: 1px solid var(--tg-linha); border-radius: 24px; background: var(--tg-marfim); display: grid; gap: 18px; }
.tg-caixa__titulo { font-size: clamp(24px, 4vw, 32px); font-weight: 700; line-height: 1.15; }
.tg-caixa__texto { font-size: 16px; line-height: 1.5; color: var(--tg-texto-2); max-width: 60ch; }
.tg-caixa__texto--grande { color: var(--tg-tinta); font-size: 18px; }
.tg-caixa__erro { font-size: 14px; color: var(--tg-azul); font-weight: 600; }
.tg-ciclo { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--tg-linha); border-radius: 999px; background: var(--tg-papel); justify-self: start; }
.tg-ciclo__opcao { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--tg-tinta); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tg-ciclo__opcao--ativa { background: var(--tg-tinta); color: var(--tg-papel); }
.tg-planos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tg-plano { display: grid; gap: 8px; align-content: start; padding: 18px; border: 1px solid var(--tg-linha); border-radius: 18px; background: var(--tg-papel); }
.tg-plano__nome { font-size: 18px; font-weight: 700; }
.tg-plano__preco { font-size: 22px; font-weight: 700; }
.tg-plano__artes { font-size: 14px; color: var(--tg-texto-2); margin-bottom: 8px; }
.tg-rodape { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tg-rodape--confirma { margin-top: 4px; }
html.tg-janela-aberta { overflow: hidden; }

/* ── a faixa fina do fim: fixa no topo, uma frase e um botão, sem cobrir o editor ─────────────────── */
.tg-faixa {
  position: fixed; top: 0; left: 0; right: 0; z-index: 95; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 44px; padding: 6px 16px;
  background: var(--tg-lima); color: #131316; font-size: 14px; font-weight: 600;
}
.tg-faixa .tg-botao { min-height: 32px; padding: 0 14px; font-size: 14px; border-color: #131316; background: #131316; color: var(--tg-lima); }
html.tg-com-faixa body.produto-operacional #app { padding-top: 44px; }
/* A barra do app desce junto com a faixa, por ESPECIFICIDADE (o #app#app da casca clara mais a classe da faixa), sem forçar a regra. No celular (até
 * 700px) a barra de cima fica no fluxo e a folga do #app basta: mexer no `top` dela a empurraria por cima do conteúdo. */
@media (min-width: 701px) {
  :root.tg-com-faixa body.produto-operacional[data-op-tema] #app#app > .op-shell > .op-sidebar { top: 44px; }
}
/* Onde a barra vira a lateral da altura da janela (Início e Criar desde 900px; todas as telas desde 1180px), ela também encolhe 44px. */
@media (min-width: 900px) {
  :root.tg-com-faixa body.produto-operacional[data-op-tema]:has(:is(.inicio-workspace, .central-criacao)) #app#app > .op-shell:not(.op-shell--foco) > .op-sidebar {
    height: calc(100dvh - 44px);
  }
}
@media (min-width: 1180px) {
  :root.tg-com-faixa body.produto-operacional[data-op-tema] #app#app > .op-shell:not(.op-shell--foco) > .op-sidebar { top: 44px; height: calc(100dvh - 44px); }
}

/* ── o aviso de recusa: embaixo, uma janelinha de cada vez ────────────────────────────────────────── */
.tg-aviso {
  position: fixed; left: 50%; bottom: 20px; z-index: 130; width: min(440px, calc(100vw - 24px)); transform: translateX(-50%); padding: 18px; border: 1px solid var(--tg-linha);
  border-radius: 18px; background: var(--tg-papel); display: grid; gap: 12px; box-shadow: 0 12px 36px rgba(19, 19, 22, .22);
}
.tg-aviso__texto { font-size: 15px; line-height: 1.45; }

@media (max-width: 720px) {
  .tg-pilula { top: 10px; right: 64px; min-height: 34px; padding: 0 12px; font-size: 13px; }
  .tg-painel { top: 52px; right: 12px; }
  .tg-planos { grid-template-columns: 1fr; }
  .tg-caixa { padding: 20px; border-radius: 20px; }
  .tg-faixa { flex-wrap: wrap; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .tg-pilula, .tg-botao { transition: none; } }
