/*
 * Proposta Comercial Automática — estilos do front-end.
 * Tudo é escopado em .pca para não conflitar com o tema.
 * Personalize as cores alterando as variáveis abaixo (ou sobrescrevendo-as no CSS do tema).
 */

.pca {
  --pca-primary: #5b4cf0;
  --pca-primary-600: #4535d6;
  --pca-primary-50: #f0eeff;
  --pca-primary-100: #e2deff;
  --pca-violet: #8b5cf6;
  --pca-pink: #ec4899;
  --pca-orange: #f97316;
  --pca-teal: #0d9488;
  --pca-sky: #0ea5e9;
  --pca-ink: #0f172a;
  --pca-text: #1e293b;
  --pca-muted: #64748b;
  --pca-line: #e5e7f0;
  --pca-bg: #f6f7fc;
  --pca-card: #ffffff;
  --pca-ok: #059669;
  --pca-ok-50: #ecfdf5;
  --pca-warn: #b45309;
  --pca-warn-50: #fffbeb;
  --pca-danger: #dc2626;
  --pca-danger-50: #fef2f2;
  --pca-grad: linear-gradient(135deg, #5b4cf0 0%, #8b5cf6 55%, #ec4899 100%);
  --pca-grad-cta: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  --pca-grad-ai: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  --pca-radius: 16px;
  --pca-radius-sm: 11px;
  --pca-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 30px rgba(30, 27, 75, .07);
  --pca-shadow-lg: 0 20px 50px rgba(30, 27, 75, .16);
  --pca-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pca-top: 0px;

  font-family: var(--pca-font);
  color: var(--pca-text);
  font-size: 16px;
  line-height: 1.5;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 0 40px;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}
.pca *, .pca *::before, .pca *::after { box-sizing: border-box; }
.pca [hidden], .pca[hidden], .pca-modal[hidden] { display: none !important; }
.pca a { color: var(--pca-primary); }
.pca h1, .pca h2, .pca h3, .pca h4, .pca p { margin-top: 0; }
.pca button { font-family: inherit; }

/* ------------------------------------------------------------------ layout em tela cheia (app shell) */
body.pca-app-body { margin: 0; background: #f3f4fb; --pca-top: 64px; }
body.pca-app-body.admin-bar { --pca-top: 96px; }
@media (max-width: 782px) { body.pca-app-body.admin-bar { --pca-top: 110px; } }
.pca-appbar {
  position: sticky; top: 0; z-index: 900; max-width: none; margin: 0; padding: 0 clamp(12px, 2vw, 24px);
  height: 64px; display: flex; align-items: center; gap: 18px;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--pca-line);
}
body.admin-bar .pca-appbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .pca-appbar { top: 46px; } }
.pca-appbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--pca-ink) !important; text-decoration: none; white-space: nowrap; }
.pca-appbar-logo { max-height: 38px; width: auto; }
.pca-appbar-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--pca-grad); color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: 0 6px 16px rgba(91, 76, 240, .35); }
.pca-appbar-nav { display: flex; gap: 4px; margin-left: 12px; }
.pca-appbar-nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--pca-muted); font-weight: 600; font-size: .92rem; }
.pca-appbar-nav a:hover { background: var(--pca-bg); color: var(--pca-ink); }
.pca-appbar-nav a.is-current { background: var(--pca-primary-50); color: var(--pca-primary); }
.pca-appbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pca-appbar-link { color: var(--pca-muted) !important; font-weight: 600; font-size: .92rem; text-decoration: none; }
.pca-appbar-link:hover { color: var(--pca-ink) !important; }
.pca-app-main { min-height: calc(100vh - 64px - 60px); padding: 24px clamp(12px, 2vw, 24px); }
.pca-app-main:has(.pca-studio) { padding: 0; min-height: 0; }
.pca-appfoot { max-width: none; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding: 18px 16px 26px; color: var(--pca-muted); font-size: .84rem; }
.pca-appfoot a { color: var(--pca-muted); }

/* ------------------------------------------------------------------ tipografia */
.pca-title { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 800; color: var(--pca-ink); margin: 0 0 6px; letter-spacing: -.02em; }
.pca-section-title { font-size: 1.05rem; font-weight: 700; color: var(--pca-ink); margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.pca-muted { color: var(--pca-muted); margin: 0; }
.pca-hint { color: var(--pca-muted); font-size: .84rem; margin: 6px 0 0; display: block; }
.pca-label { display: block; font-size: .88rem; font-weight: 700; color: var(--pca-ink); margin: 0 0 8px; }
.pca-label-inline { font-size: .85rem; font-weight: 700; color: var(--pca-ink); }
.pca-legal { font-size: .8rem; color: var(--pca-muted); margin: 12px 0 0; text-align: center; }
.pca-link { color: var(--pca-primary); font-weight: 600; text-decoration: none; }
.pca-link:hover { text-decoration: underline; }
.pca-center { text-align: center; }
.pca-right { text-align: right; }
.pca-req { color: var(--pca-danger); }
.pca-opt { font-size: .72rem; font-weight: 600; color: var(--pca-muted); background: var(--pca-bg); border: 1px solid var(--pca-line); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; }
.pca-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pca-spacer { flex: 1; }

/* ------------------------------------------------------------------ cartões e layout */
.pca-card {
  background: var(--pca-card); border: 1px solid var(--pca-line); border-radius: var(--pca-radius);
  box-shadow: var(--pca-shadow); padding: clamp(18px, 3vw, 30px); margin-bottom: 20px;
}
.pca-topbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.pca-topbar.pca-center { justify-content: center; }
.pca-topbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pca-grid-1 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.pca-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.pca-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.pca-col-full { grid-column: 1 / -1; }
.pca-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

/* ------------------------------------------------------------------ botões */
.pca-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .2s, transform .12s, filter .15s;
}
.pca-btn:hover { transform: translateY(-1px); }
.pca-btn:active { transform: translateY(1px); }
.pca-btn:focus-visible, .pca input:focus-visible, .pca textarea:focus-visible, .pca select:focus-visible, .pca-tab:focus-visible { outline: 3px solid rgba(91, 76, 240, .35); outline-offset: 2px; }
.pca-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.pca-btn[aria-disabled="true"] { filter: grayscale(.5); opacity: .75; }
.pca-btn-primary { background: var(--pca-grad); color: #fff !important; box-shadow: 0 8px 20px rgba(91, 76, 240, .3); }
.pca-btn-primary:hover { filter: brightness(1.07); box-shadow: 0 12px 26px rgba(91, 76, 240, .36); }
.pca-btn-cta { background: var(--pca-grad-cta); color: #fff !important; box-shadow: 0 10px 24px rgba(236, 72, 153, .32); }
.pca-btn-cta:hover { filter: brightness(1.06); }
.pca-btn-ai { background: var(--pca-grad-ai); color: #fff !important; box-shadow: 0 10px 24px rgba(124, 58, 237, .32); }
.pca-btn-ai:hover { filter: brightness(1.08); }
.pca-btn-outline { background: #fff; color: var(--pca-primary) !important; border-color: var(--pca-primary-100); }
.pca-btn-outline:hover { background: var(--pca-primary-50); border-color: var(--pca-primary); }
.pca-btn-soft { background: var(--pca-primary-50); color: var(--pca-primary) !important; border-color: var(--pca-primary-100); }
.pca-btn-soft:hover { background: var(--pca-primary-100); }
.pca-btn-ghost { background: transparent; color: var(--pca-text) !important; border-color: var(--pca-line); }
.pca-btn-ghost:hover { background: #fff; }
.pca-btn-sm { padding: 7px 14px; font-size: .85rem; }
.pca-btn-lg { padding: 15px 26px; font-size: 1.04rem; }
.pca-btn-block { width: 100%; }
.pca-danger { color: var(--pca-danger) !important; }
.pca-danger:hover { background: var(--pca-danger-50); border-color: #fecaca; }
.pca-btn.is-busy { position: relative; cursor: progress; }
.pca-btn.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pca-spin .7s linear infinite; }
.pca-linkbtn { background: none; border: 0; padding: 2px 4px; color: var(--pca-primary); font-weight: 600; font-size: .84rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ formulários */
.pca-field { display: flex; flex-direction: column; margin-bottom: 14px; min-width: 0; }
.pca-field > label, .pca-field > span:not(.pca-suffix) { font-size: .88rem; font-weight: 700; color: var(--pca-ink); margin-bottom: 6px; }
.pca input[type="text"], .pca input[type="email"], .pca input[type="password"], .pca input[type="tel"],
.pca input[type="number"], .pca input[type="date"], .pca input[type="search"], .pca input[type="url"],
.pca textarea, .pca select {
  width: 100%; font: inherit; font-size: .95rem; color: var(--pca-text);
  background: #fff; border: 1.5px solid #d9dcea; border-radius: var(--pca-radius-sm);
  padding: 10px 13px; min-height: 46px; box-shadow: none; margin: 0;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pca textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.pca input::placeholder, .pca textarea::placeholder { color: #9aa3b5; }
.pca input:hover, .pca textarea:hover { border-color: #c3c7dc; }
.pca input:focus, .pca textarea:focus, .pca select:focus { border-color: var(--pca-primary); box-shadow: 0 0 0 4px rgba(91, 76, 240, .14); outline: none; }
.pca .is-invalid { border-color: var(--pca-danger) !important; background: var(--pca-danger-50) !important; }
.pca .is-invalid:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .14) !important; }
.pca input.is-valid { border-color: #34d399; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23059669'%3E%3Cpath d='M7.6 13.2 4.4 10l-1.4 1.4 4.6 4.6 9.4-9.4L15.6 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.pca-field-error, .pca-err { color: var(--pca-danger); font-size: .82rem; font-weight: 600; margin-top: 5px; display: flex; gap: 5px; align-items: center; }
.pca-err::before { content: "⚠"; font-size: .8rem; }
.pca-field-error:empty, .pca-err:empty { display: none; }
.pca-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pca-pass { position: relative; }
.pca-pass input { padding-right: 44px; }
.pca-pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 1rem; padding: 6px; opacity: .6; }
.pca-pass-toggle:hover { opacity: 1; }

.pca-alert { border-radius: var(--pca-radius-sm); padding: 12px 14px; font-size: .92rem; margin: 12px 0; border: 1px solid; }
.pca-alert-error { background: var(--pca-danger-50); border-color: #fecaca; color: #991b1b; }
.pca-alert-success { background: var(--pca-ok-50); border-color: #a7f3d0; color: #065f46; }

.pca-banner { background: var(--pca-primary-50); border: 1px solid var(--pca-primary-100); color: #3b2fb8; border-radius: var(--pca-radius-sm); padding: 12px 16px; margin-bottom: 18px; font-size: .93rem; }
.pca-banner-warn { background: var(--pca-warn-50); border-color: #fde68a; color: var(--pca-warn); }

.pca-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: .84rem; font-weight: 700; border: 1px solid var(--pca-line); background: #fff; text-decoration: none !important; white-space: nowrap; }
.pca-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pca-muted); }
.pca-chip.is-ok { color: #065f46 !important; border-color: #a7f3d0; background: var(--pca-ok-50); }
.pca-chip.is-ok::before { background: var(--pca-ok); }
.pca-chip.is-empty { color: var(--pca-warn) !important; border-color: #fde68a; background: var(--pca-warn-50); }
.pca-chip.is-empty::before { background: #f59e0b; }

/* ------------------------------------------------------------------ autenticação */
.pca-auth { max-width: 480px; }
.pca-auth-card { padding: clamp(22px, 4vw, 34px); }
.pca-auth-head { text-align: center; margin-bottom: 20px; }
.pca-google { display: flex; justify-content: center; min-height: 44px; }
.pca-google-btn.is-busy { opacity: .5; pointer-events: none; }
.pca-divider { display: flex; align-items: center; gap: 12px; color: var(--pca-muted); font-size: .82rem; margin: 18px 0; }
.pca-divider::before, .pca-divider::after { content: ""; flex: 1; height: 1px; background: var(--pca-line); }
.pca-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--pca-bg); border: 1px solid var(--pca-line); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.pca-tab { font: inherit; font-weight: 700; font-size: .92rem; border: 0; background: transparent; padding: 9px; border-radius: 999px; cursor: pointer; color: var(--pca-muted); }
.pca-tab.is-active { background: #fff; color: var(--pca-primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.pca-form .pca-btn-block { margin-top: 8px; }
.pca-checkout-auth { margin-top: 28px; }
.pca-modal-auth { max-width: 520px; padding-top: 22px; }
.pca-modal-auth .pca-auth { padding: 0; max-width: none; }
.pca-modal-auth .pca-auth-card { border: 0; box-shadow: none; padding: 0; margin: 0; }
.pca-modal-kicker { margin: 0 40px 12px 0; display: inline-block; font-size: .82rem; font-weight: 700; color: #065f46; background: var(--pca-ok-50); border: 1px solid #a7f3d0; border-radius: 999px; padding: 4px 12px; }

/* ================================================================== ESTÚDIO (gerador) */
.pca.pca-studio {
  max-width: none; margin: 0; padding: 0 clamp(10px, 1.4vw, 20px) 12px;
  /* No desktop o estúdio ocupa exatamente a tela visível: só o formulário rola. */
  display: flex; flex-direction: column; height: calc(100vh - var(--pca-top)); min-height: 620px;
}

/* ---------- hero com diferenciais ---------- */
.pca-hero {
  flex: none; position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin: 14px 0; padding: 18px clamp(18px, 2.4vw, 30px); border-radius: 20px; color: #fff;
  background: radial-gradient(circle at 85% -40%, rgba(255, 255, 255, .28), transparent 45%), var(--pca-grad);
  box-shadow: 0 16px 40px rgba(91, 76, 240, .25);
}
.pca-hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.pca-hero-text { flex: 1 1 420px; min-width: 0; position: relative; z-index: 1; }
.pca-hero-title { color: #fff; font-size: clamp(1.25rem, 2.1vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 6px; }
.pca-hero-title span { background: linear-gradient(90deg, #fde68a, #fbcfe8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pca-hero-sub { margin: 0; font-size: .95rem; color: rgba(255, 255, 255, .92); max-width: 760px; }
.pca-hero-sub strong { color: #fff; }
.pca-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; max-width: 620px; position: relative; z-index: 1; }
.pca-badges li { margin: 0; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: rgba(255, 255, 255, .95); box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
.pca-b1 { color: #7c3aed; } .pca-b2 { color: #0d9488; } .pca-b3 { color: #db2777; }
.pca-b4 { color: #ea580c; } .pca-b5 { color: #059669; } .pca-b6 { color: #2563eb; }

/* ---------- grade principal ---------- */
.pca-studio-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 236px minmax(0, 1fr) minmax(360px, 44%); grid-template-rows: minmax(0, 1fr); gap: 14px;
}
.pca-studio-grid > * { min-height: 0; }
.pca-studio-grid.is-ai-busy .pca-panel { pointer-events: none; }
.pca-studio-grid.is-ai-busy .pca-panel::after {
  content: "✨ A IA está escrevendo sua proposta…"; position: absolute; inset: 0; z-index: 5; display: grid; place-items: center;
  font-weight: 800; color: #6d28d9; font-size: 1.05rem; background: rgba(255, 255, 255, .78); backdrop-filter: blur(2px);
  animation: pca-fade .2s ease-out;
}

/* ---------- trilha de etapas ---------- */
.pca-rail { background: #fff; border: 1px solid var(--pca-line); border-radius: 18px; padding: 14px 10px; overflow: auto; box-shadow: var(--pca-shadow); display: flex; flex-direction: column; }
.pca-rail ol { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pca-rail li { margin: 0; }
.pca-rail-progress { height: 6px; border-radius: 999px; background: var(--pca-bg); overflow: hidden; margin: 0 6px; }
.pca-rail-progress span { display: block; height: 100%; background: var(--pca-grad); border-radius: 999px; transition: width .35s ease; }
.pca-rail-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border-radius: 12px;
  border: 1.5px solid transparent; background: transparent; cursor: pointer; color: var(--pca-text); transition: background .15s, border-color .15s;
}
.pca-rail-btn:hover { background: var(--pca-bg); }
.pca-rail-ico { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 1.05rem; background: var(--pca-bg); border: 1px solid var(--pca-line); }
.pca-rail-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pca-rail-txt b { font-size: .9rem; color: var(--pca-ink); }
.pca-rail-txt small { font-size: .74rem; color: var(--pca-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pca-rail-check { flex: none; width: 20px; height: 20px; border-radius: 50%; font-size: .7rem; font-weight: 800; display: grid; place-items: center; color: transparent; }
.pca-rail-btn.is-active { background: var(--pca-primary-50); border-color: var(--pca-primary-100); }
.pca-rail-btn.is-active .pca-rail-ico { background: var(--pca-grad); border-color: transparent; box-shadow: 0 6px 14px rgba(91, 76, 240, .3); }
.pca-rail-btn.is-active .pca-rail-txt b { color: var(--pca-primary); }
.pca-rail-btn.is-done .pca-rail-check { background: var(--pca-ok); color: #fff; }
.pca-rail li:last-child .pca-rail-btn:not(.is-active) .pca-rail-ico { background: #fff1f2; border-color: #fecdd3; }
.pca-rail-note { margin-top: auto; padding: 12px; border-radius: 12px; font-size: .8rem; line-height: 1.45; color: #3b2fb8; background: linear-gradient(135deg, #f0eeff, #fdf2f8); border: 1px dashed #c4b5fd; }

/* ---------- painel do formulário ---------- */
.pca-panel { position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--pca-line); border-radius: 18px; box-shadow: var(--pca-shadow); overflow: hidden; }
.pca-panel-scroll { flex: 1; overflow-y: auto; padding: clamp(16px, 2vw, 26px); scroll-behavior: smooth; overscroll-behavior: contain; }
.pca-panel-nav { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px clamp(14px, 2vw, 24px); border-top: 1px solid var(--pca-line); background: linear-gradient(#fff, #fafaff); }
.pca-saved { font-size: .8rem; color: var(--pca-ok); font-weight: 600; opacity: 0; transition: opacity .3s; }
.pca-saved.is-on, .pca-saved:not(:empty) { opacity: 1; }
.pca-step-head { margin-bottom: 18px; }
.pca-step-kicker { display: inline-block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--pca-primary); background: var(--pca-primary-50); border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }
.pca-step-head h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 800; color: var(--pca-ink); letter-spacing: -.02em; margin: 0 0 2px; }
.pca-step-head p { color: var(--pca-muted); margin: 0; }

.pca-block { border: 1px solid var(--pca-line); border-radius: 16px; padding: 16px clamp(14px, 1.6vw, 20px) 6px; margin-bottom: 16px; background: #fff; }
.pca-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.pca-block-head h3 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 800; color: var(--pca-ink); margin: 0; }
.pca-block-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .9rem; font-weight: 800; color: #fff; background: var(--pca-grad); flex: none; }
.pca-block-hint { margin: -6px 0 12px; }
.pca-block-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pca-count-pill { font-size: .74rem; font-weight: 700; color: var(--pca-primary); background: var(--pca-primary-50); border-radius: 999px; padding: 2px 9px; }
.pca-block-ai { background: linear-gradient(135deg, #faf5ff 0%, #fdf2f8 100%); border-color: #e9d5ff; }
.pca-block-ai .pca-block-ico { background: var(--pca-grad-ai); }

/* ---------- segmentos ---------- */
.pca-segs { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-bottom: 10px; border-radius: 14px; }
.pca-segs.is-invalid { outline: 2px solid var(--pca-danger); outline-offset: 4px; background: transparent !important; }
.pca-seg {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 14px 8px; border-radius: 14px; border: 1.5px solid var(--pca-line); background: #fff; min-height: 96px;
  transition: transform .15s, border-color .15s, box-shadow .15s, background .15s;
}
.pca-seg:hover { transform: translateY(-2px); border-color: #c4b5fd; box-shadow: 0 8px 20px rgba(91, 76, 240, .1); }
.pca-seg-ico { font-size: 1.7rem; line-height: 1; }
.pca-seg-name { font-size: .84rem; font-weight: 700; color: var(--pca-ink); }
.pca-seg.is-on { border-color: var(--pca-primary); background: linear-gradient(160deg, #f0eeff, #fdf2f8); box-shadow: 0 0 0 3px rgba(91, 76, 240, .15), 0 10px 24px rgba(91, 76, 240, .15); }
.pca-seg.is-on .pca-seg-name { color: var(--pca-primary); }
.pca-seg:focus-within { outline: 3px solid rgba(91, 76, 240, .35); outline-offset: 2px; }

/* ---------- pílulas (rádio/checkbox) ---------- */
.pca-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pca-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px; border: 1.5px solid var(--pca-line); background: #fff; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--pca-text); transition: all .15s; user-select: none; }
.pca-pill:hover { border-color: #c4b5fd; }
.pca-pill.is-on { background: var(--pca-primary); border-color: var(--pca-primary); color: #fff; box-shadow: 0 6px 14px rgba(91, 76, 240, .25); }
.pca-pill:focus-within { outline: 3px solid rgba(91, 76, 240, .35); outline-offset: 2px; }
.pca-pill-ico { font-size: 1rem; }

/* ---------- chips de sugestão ---------- */
.pca-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.pca-chipbtn { border: 1px dashed #c4b5fd; background: #faf8ff; color: #5b21b6; border-radius: 999px; padding: 4px 11px; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.pca-chipbtn:hover { background: var(--pca-primary-50); border-style: solid; }

/* ---------- listas de checkbox ---------- */
.pca-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pca-check {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--pca-line); background: #fff; transition: border-color .15s, background .15s; user-select: none;
}
.pca-check:hover { border-color: #c4b5fd; }
.pca-check input { position: absolute; opacity: 0; pointer-events: none; }
.pca-check-box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 2px solid #c3c7dc; background: #fff; display: grid; place-items: center; transition: all .15s; }
.pca-check-box::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.pca-check.is-on { border-color: var(--pca-primary); background: var(--pca-primary-50); }
.pca-check.is-on .pca-check-box { background: var(--pca-primary); border-color: var(--pca-primary); }
.pca-check.is-on .pca-check-box::after { opacity: 1; }
.pca-check:focus-within { outline: 3px solid rgba(91, 76, 240, .35); outline-offset: 2px; }
.pca-check-txt { min-width: 0; display: flex; flex-direction: column; font-size: .9rem; line-height: 1.35; }
.pca-check-txt b { font-weight: 600; color: var(--pca-ink); }
.pca-check-txt small { color: var(--pca-muted); font-size: .8rem; margin-top: 2px; }
.pca-check-add { display: flex; gap: 8px; margin-bottom: 12px; }
.pca-check-add input { min-height: 40px !important; padding: 8px 12px !important; font-size: .88rem !important; }
.pca-check-add .pca-btn { flex: none; }

/* ---------- cartões de opção (pagamento, garantia) ---------- */
.pca-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pca-card-opt { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 13px; border: 1.5px solid var(--pca-line); background: #fff; cursor: pointer; transition: all .15s; }
.pca-card-opt:hover { border-color: #c4b5fd; }
.pca-card-opt b { font-size: .92rem; color: var(--pca-ink); }
.pca-card-opt small { font-size: .8rem; color: var(--pca-muted); line-height: 1.4; }
.pca-card-opt.is-on { border-color: var(--pca-primary); background: linear-gradient(160deg, #f0eeff, #fff); box-shadow: 0 0 0 3px rgba(91, 76, 240, .12); }
.pca-card-opt.is-on b::before { content: "● "; color: var(--pca-primary); }
.pca-card-opt:focus-within { outline: 3px solid rgba(91, 76, 240, .35); outline-offset: 2px; }
.pca-composed { background: var(--pca-bg); border: 1px dashed #c3c7dc; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.pca-composed span { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pca-muted); }
.pca-composed p { margin: 4px 0 0; font-size: .9rem; }

/* ---------- IA ---------- */
.pca-ai-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pca-ai-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 0; cursor: pointer; border-radius: 999px; padding: 6px 13px;
  font-size: .8rem; font-weight: 700; color: #fff; background: var(--pca-grad-ai); box-shadow: 0 4px 12px rgba(124, 58, 237, .25); transition: filter .15s, transform .12s;
}
.pca-ai-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.pca-ai-btn.is-light { background: #f5f3ff; color: #6d28d9; box-shadow: none; border: 1px solid #ddd6fe; }
.pca-ai-btn:disabled { opacity: .7; cursor: progress; }
.pca-ai-box textarea { background: #fff; }
.pca-ai-lead { margin: 0 0 10px; font-size: .92rem; color: #4c1d95; }
.pca-ai-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 10px; }
.pca-ai-row .pca-hint { margin: 0; }
.pca-quickfill { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border-radius: 14px; background: linear-gradient(135deg, #ecfeff, #f0fdf4); border: 1px dashed #5eead4; }
.pca-quickfill strong { display: block; color: #115e59; }
.pca-quickfill span { font-size: .85rem; color: #0f766e; }
.pca-flash { animation: pca-flash .9s ease-out; }

/* ---------- logotipo ---------- */
.pca-logo-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; margin-bottom: 12px; border: 2px dashed #d9dcea; border-radius: 14px; background: var(--pca-bg); }
.pca-logo-drop.has-logo { border-style: solid; border-color: #a7f3d0; background: var(--pca-ok-50); }
.pca-logo-drop img { max-height: 56px; max-width: 180px; border-radius: 8px; background: #fff; padding: 4px; border: 1px solid var(--pca-line); }
.pca-logo-drop > div { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.pca-logo-drop small { color: var(--pca-muted); font-size: .8rem; }
.pca-logo-ph { font-size: 1.8rem; }
.pca-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pca-logo img { max-height: 56px; max-width: 200px; border: 1px solid var(--pca-line); border-radius: 8px; padding: 4px; background: #fff; }

/* ---------- linhas (cronograma) ---------- */
.pca-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pca-row { display: grid; grid-template-columns: 28px minmax(0, 1.1fr) minmax(0, 2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: var(--pca-bg); border: 1px solid var(--pca-line); }
.pca-row input { min-height: 40px !important; padding: 8px 11px !important; font-size: .9rem !important; }
.pca-row-n { width: 26px; height: 26px; border-radius: 50%; background: var(--pca-grad); color: #fff; font-size: .78rem; font-weight: 800; display: grid; place-items: center; }
.pca-row-tools { display: flex; gap: 4px; }
.pca-row-tools button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--pca-line); background: #fff; cursor: pointer; color: var(--pca-muted); font-size: .85rem; }
.pca-row-tools button:hover { color: var(--pca-ink); border-color: #c3c7dc; }
.pca-row-tools .is-del:hover { color: var(--pca-danger); border-color: #fecaca; background: var(--pca-danger-50); }

/* ---------- itens de investimento ---------- */
.pca-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.pca-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: start; padding: 12px; border-radius: 14px; background: var(--pca-bg); border: 1px solid var(--pca-line); }
.pca-item-num { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; }
.pca-item .pca-row-tools { grid-column: 2; grid-row: 1; }
.pca-item-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pca-item-main input:first-child { font-weight: 600; }
.pca-item-num { display: flex; align-items: flex-end; gap: 10px; }
.pca-item-num label { display: flex; flex-direction: column; gap: 4px; font-size: .74rem; font-weight: 700; color: var(--pca-muted); text-transform: uppercase; letter-spacing: .04em; }
.pca-item-num label:first-child input { width: 64px; text-align: center; }
.pca-money { position: relative; display: block; }
.pca-money i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; color: var(--pca-muted); font-size: .88rem; text-transform: none; letter-spacing: 0; }
.pca-money input { width: 140px; padding-left: 36px !important; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pca-item-sub { display: flex; flex-direction: column; align-items: flex-end; min-width: 100px; margin-left: auto; }
.pca-item-sub span { font-size: .74rem; font-weight: 700; color: var(--pca-muted); text-transform: uppercase; letter-spacing: .04em; }
.pca-item-sub strong { min-height: 46px; display: flex; align-items: center; font-variant-numeric: tabular-nums; color: var(--pca-ink); }
.pca-item .pca-err { grid-column: 1 / -1; margin-top: -4px; }
.pca-totals-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 16px 0 14px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #f0eeff, #fdf2f8); border: 1px solid #e9d5ff; }
.pca-field-inline { margin: 0; max-width: 150px; }
.pca-suffix { position: relative; display: block; }
.pca-suffix i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--pca-muted); font-weight: 700; }
.pca-suffix input { padding-right: 30px !important; text-align: right; }
.pca-totals-list { margin: 0; display: flex; flex-direction: column; gap: 3px; min-width: 220px; font-variant-numeric: tabular-nums; }
.pca-totals-list > div { display: flex; justify-content: space-between; gap: 18px; }
.pca-totals-list dt { color: var(--pca-muted); font-size: .9rem; }
.pca-totals-list dd { margin: 0; font-weight: 600; }
.pca-totals-list .is-total { border-top: 1px solid #ddd6fe; padding-top: 6px; margin-top: 3px; }
.pca-totals-list .is-total dt { color: var(--pca-ink); font-weight: 800; }
.pca-totals-list .is-total dd { font-size: 1.45rem; font-weight: 800; background: var(--pca-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- visual ---------- */
.pca-tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.pca-tpl { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1.5px solid var(--pca-line); border-radius: 14px; background: #fff; cursor: pointer; text-align: center; transition: all .15s; }
.pca-tpl b { font-size: .9rem; color: var(--pca-ink); }
.pca-tpl small { font-size: .76rem; color: var(--pca-muted); }
.pca-tpl.is-on { border-color: var(--pca-primary); box-shadow: 0 0 0 3px rgba(91, 76, 240, .14); background: var(--pca-primary-50); }
.pca-tpl:focus-within { outline: 3px solid rgba(91, 76, 240, .35); outline-offset: 2px; }
.pca-tpl-thumb { --c: #0f4c81; display: block; width: 100%; aspect-ratio: 3 / 3.4; max-height: 120px; border-radius: 8px; border: 1px solid var(--pca-line); background: #fff; margin-bottom: 4px; }
.pca-thumb-executivo { background: linear-gradient(var(--c) 0 42%, #fff 42%), #fff; }
.pca-thumb-moderno { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000) 0 12%, transparent 12%), linear-gradient(var(--c) 0 42%, #fff 42%); }
.pca-thumb-classico { background: #fff; box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 8px var(--c); }
.pca-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pca-swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--pca-line); cursor: pointer; transition: transform .12s; }
.pca-swatch:hover { transform: scale(1.1); }
.pca-swatch.is-on { box-shadow: 0 0 0 3px var(--pca-ink); }
.pca-swatch-custom { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #0ea5e9, #8b5cf6, #f43f5e); cursor: pointer; }
.pca-swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pca-swatch-custom span { font-size: .9rem; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }

/* ---------- etapa final ---------- */
.pca-finish-hero { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 18px; margin-bottom: 16px; background: linear-gradient(135deg, #f0eeff, #fdf2f8); border: 1px solid #e9d5ff; }
.pca-finish-hero h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; color: var(--pca-ink); }
.pca-finish-hero p { margin: 0; color: var(--pca-muted); }
.pca-finish-score { --p: 0; flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#8b5cf6 calc(var(--p) * 1%), #e9e6f8 0); }
.pca-finish-score span { width: 60px; height: 60px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; color: var(--pca-primary); }
.pca-missing { padding: 12px 16px; border-radius: 14px; background: var(--pca-warn-50); border: 1px solid #fde68a; margin-bottom: 16px; color: #92400e; }
.pca-missing ul { margin: 6px 0 0; padding-left: 18px; }
.pca-missing .pca-linkbtn { color: #92400e; text-align: left; }
.pca-tips { padding: 10px 14px; border-radius: 12px; background: #f0fdfa; border: 1px solid #99f6e4; margin-bottom: 16px; font-size: .9rem; color: #115e59; }
.pca-tips .pca-linkbtn { color: #0f766e; }
.pca-finish-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pca-finish-steps > li { display: flex; gap: 14px; margin: 0; padding: 16px; border-radius: 16px; border: 1.5px solid var(--pca-line); background: #fff; }
.pca-fs-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--pca-bg); border: 1.5px solid var(--pca-line); color: var(--pca-muted); }
.pca-fs-body { flex: 1; min-width: 0; }
.pca-fs-body h4 { margin: 4px 0 4px; font-size: 1rem; font-weight: 800; color: var(--pca-ink); }
.pca-fs-body p { margin: 0 0 10px; color: var(--pca-muted); font-size: .92rem; }
.pca-finish-steps .is-todo { border-color: #c4b5fd; box-shadow: 0 8px 22px rgba(91, 76, 240, .08); }
.pca-finish-steps .is-todo .pca-fs-n { background: var(--pca-grad); color: #fff; border-color: transparent; }
.pca-finish-steps .is-done { background: var(--pca-ok-50); border-color: #a7f3d0; }
.pca-finish-steps .is-done .pca-fs-n { background: var(--pca-ok); border-color: var(--pca-ok); color: #fff; }
.pca-finish-steps .is-done p { margin: 0; color: #065f46; }
.pca-finish-steps .is-ready { border-color: #fbcfe8; background: linear-gradient(135deg, #fff7ed, #fdf2f8); box-shadow: 0 10px 26px rgba(236, 72, 153, .14); }
.pca-finish-steps .is-ready .pca-fs-n { background: var(--pca-grad-cta); color: #fff; border-color: transparent; }
.pca-mini-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-radius: 14px; }
.pca-mini-plan { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px 12px; border-radius: 14px; border: 1.5px solid var(--pca-line); background: #fff; }
.pca-mini-plan.is-featured { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--pca-grad) border-box; border: 2px solid transparent; box-shadow: 0 10px 24px rgba(91, 76, 240, .15); }
.pca-mini-plan b { font-size: .95rem; color: var(--pca-ink); }
.pca-mini-price { font-size: 1.25rem; font-weight: 800; color: var(--pca-ink); letter-spacing: -.02em; }
.pca-mini-price small { display: block; font-size: .76rem; font-weight: 600; color: var(--pca-muted); letter-spacing: 0; }
.pca-mini-tag { font-size: .78rem; color: var(--pca-muted); }
.pca-mini-plan ul { list-style: none; margin: 4px 0 10px; padding: 0; font-size: .8rem; flex: 1; }
.pca-mini-plan li { padding-left: 18px; position: relative; margin: 2px 0; }
.pca-mini-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--pca-ok); font-weight: 800; }
.pca-trust { margin: 14px 0 4px; text-align: center; font-size: .84rem; color: var(--pca-muted); }
.pca-pulse { animation: pca-pulse 1.4s ease-out; }

.pca-success { text-align: center; padding: 30px 12px; }
.pca-success h3 { font-size: 1.4rem; font-weight: 800; color: var(--pca-ink); margin: 0 0 6px; }
.pca-success-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-size: 2.1rem; color: #fff; background: linear-gradient(135deg, #10b981, #0d9488); box-shadow: 0 12px 30px rgba(5, 150, 105, .35); animation: pca-pop .35s ease-out; }

/* ---------- prévia ---------- */
.pca-preview { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, #1e1b4b, #312e81 60%, #4c1d95); box-shadow: var(--pca-shadow-lg); }
.pca-preview-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: #fff; }
.pca-preview-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: .92rem; }
.pca-preview-status { color: #c7d2fe; font-size: .8rem; }
.pca-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pca-live 2s infinite; }
.pca-preview-close { display: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.3rem; cursor: pointer; }
.pca-score { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; cursor: help; }
.pca-score svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.pca-score circle { fill: none; stroke-width: 3.5; }
.pca-score-bg { stroke: rgba(255, 255, 255, .18); }
.pca-score-fg { stroke: #f472b6; stroke-linecap: round; transition: stroke-dashoffset .5s ease, stroke .3s; }
.pca-score.is-mid .pca-score-fg { stroke: #fbbf24; }
.pca-score.is-high .pca-score-fg { stroke: #34d399; }
.pca-score span { position: relative; font-size: .72rem; font-weight: 800; color: #fff; }
.pca-preview-stage { position: relative; flex: 1; overflow: hidden auto; background: #e8eaf3; border-radius: 14px 14px 0 0; margin: 0 8px; }
.pca-preview-frame { display: block; border: 0; transform-origin: 0 0; background: #e8eaf3; width: 100%; height: 100%; }
.pca-preview-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--pca-muted); background: #eef0f7; }
.pca-preview-empty p { margin: 0; }
.pca-preview-empty-art { font-size: 3rem; margin-bottom: 8px; animation: pca-float 3s ease-in-out infinite; }
.pca-fab { display: none; }

.pca-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 99998; max-width: min(92vw, 560px); padding: 12px 18px; border-radius: 14px; font-size: .92rem; font-weight: 600; color: #fff; background: #1e1b4b; box-shadow: var(--pca-shadow-lg); animation: pca-pop .2s ease-out; }
.pca-toast.is-ok { background: linear-gradient(135deg, #059669, #0d9488); }
.pca-toast.is-err { background: linear-gradient(135deg, #dc2626, #db2777); }

/* ------------------------------------------------------------------ planos */
.pca-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.pca-plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 2px solid var(--pca-line); border-radius: var(--pca-radius); padding: 24px 20px; cursor: default; transition: border-color .15s, box-shadow .15s, transform .15s; }
label.pca-plan { cursor: pointer; }
label.pca-plan:hover { border-color: #c4b5fd; transform: translateY(-2px); }
.pca-plan.is-featured { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--pca-grad) border-box; box-shadow: 0 16px 36px rgba(91, 76, 240, .16); }
.pca-plan.is-selected { border-color: var(--pca-primary); box-shadow: 0 0 0 4px rgba(91, 76, 240, .15); }
.pca-plan.is-featured.is-selected { border-color: transparent; }
.pca-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--pca-grad-cta); color: #fff; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 11px; border-radius: 999px; white-space: nowrap; box-shadow: 0 6px 14px rgba(236, 72, 153, .3); }
.pca-plan-name { font-size: 1.15rem; font-weight: 800; margin: 4px 0 2px; color: var(--pca-ink); }
.pca-plan-tagline { color: var(--pca-muted); font-size: .88rem; margin: 0 0 12px; }
.pca-plan-price { margin: 0 0 14px; }
.pca-plan-price strong { font-size: 1.9rem; color: var(--pca-ink); letter-spacing: -.03em; }
.pca-plan-price span { color: var(--pca-muted); font-size: .9rem; }
.pca-plan-features { list-style: none; padding: 0; margin: 0 0 18px; flex: 1; }
.pca-plan-features li { position: relative; padding: 4px 0 4px 24px; font-size: .92rem; }
.pca-plan-features li::before { content: "✓"; position: absolute; left: 0; top: 4px; color: var(--pca-ok); font-weight: 800; }
.pca-plan-check { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--pca-line); display: grid; place-items: center; color: transparent; font-weight: 700; }
.pca-plan.is-selected .pca-plan-check { background: var(--pca-primary); border-color: var(--pca-primary); color: #fff; }
.pca-pay-methods { text-align: center; color: var(--pca-muted); font-size: .88rem; margin: 8px 0 0; }

/* ------------------------------------------------------------------ checkout */
.pca-pay-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.pca-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.pca-method { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--pca-line); border-radius: var(--pca-radius-sm); cursor: pointer; background: #fff; }
.pca-method.is-selected { border-color: var(--pca-primary); background: var(--pca-primary-50); }
.pca-method strong { display: block; color: var(--pca-ink); }
.pca-method small { color: var(--pca-muted); font-size: .8rem; }
.pca-method-icon { font-size: 1.4rem; }
.pca-qty { display: flex; align-items: center; gap: 8px; max-width: 200px; }
.pca-qty input { text-align: center; }
.pca-pay-summary { background: linear-gradient(135deg, #f0eeff, #fdf2f8); border: 1px solid #e9d5ff; border-radius: var(--pca-radius-sm); padding: 18px; align-self: start; }
.pca-pay-line { display: flex; justify-content: space-between; gap: 12px; font-size: 1.05rem; margin: 0 0 6px; }
.pca-pay-line strong { font-size: 1.3rem; color: var(--pca-ink); }
.pca-secure { font-size: .8rem; color: var(--pca-muted); margin: 12px 0 0; text-align: center; }
.pca-pix-amount { font-size: 1.6rem; font-weight: 800; color: var(--pca-ink); margin: 10px 0; text-align: center; }
.pca-pix-qr { display: block; margin: 8px auto 16px; width: 240px; max-width: 100%; height: auto; image-rendering: pixelated; border: 1px solid var(--pca-line); border-radius: 12px; padding: 8px; background: #fff; }
.pca-copy { display: flex; gap: 8px; }
.pca-copy input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem !important; }
.pca-pix-wait { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--pca-muted); font-size: .92rem; margin: 6px 0 0; }
.pca-return { text-align: center; }

/* ------------------------------------------------------------------ painel */
.pca-balance { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.pca-balance .pca-card { margin-bottom: 20px; }
.pca-balance-main.is-ok { border-color: #a7f3d0; }
.pca-balance-main.is-empty { border-color: #fde68a; }
.pca-balance-big { font-size: 2.6rem; font-weight: 800; color: var(--pca-ink); line-height: 1; margin: 4px 0 8px; letter-spacing: -.03em; }
.pca-balance-big span { font-size: 1.2rem; color: var(--pca-muted); font-weight: 600; }
.pca-progress { height: 8px; background: var(--pca-bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--pca-line); margin-top: 8px; }
.pca-progress span { display: block; height: 100%; background: var(--pca-grad); border-radius: 999px; }
.pca-table-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pca-table-head .pca-section-title { margin: 0; }
.pca-count { background: var(--pca-bg); border: 1px solid var(--pca-line); border-radius: 999px; padding: 1px 9px; font-size: .78rem; color: var(--pca-muted); }
.pca-search { display: flex; gap: 8px; }
.pca-search input { min-width: 220px; }
.pca-table-wrap { overflow-x: auto; }
.pca-table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 0; }
.pca-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pca-muted); padding: 10px 12px; border-bottom: 1px solid var(--pca-line); background: transparent; }
.pca-table td { padding: 14px 12px; border-bottom: 1px solid var(--pca-line); vertical-align: middle; }
.pca-table tr:last-child td { border-bottom: 0; }
.pca-table tr.is-removing { opacity: 0; transition: opacity .25s; }
.pca-row-actions { white-space: nowrap; }
.pca-row-actions .pca-btn { margin: 2px; }
.pca-table-sm td { padding: 10px 12px; }
.pca-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--pca-bg); color: var(--pca-muted); border: 1px solid var(--pca-line); }
.pca-status-approved, .pca-status-active { background: var(--pca-ok-50); color: #065f46; border-color: #a7f3d0; }
.pca-status-pending { background: var(--pca-warn-50); color: var(--pca-warn); border-color: #fde68a; }
.pca-status-rejected, .pca-status-refunded, .pca-status-error { background: var(--pca-danger-50); color: #991b1b; border-color: #fecaca; }
.pca-empty { text-align: center; padding: 30px 10px; color: var(--pca-muted); }
.pca-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.pca-pagination a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--pca-line); text-decoration: none; color: var(--pca-text); }
.pca-pagination a.is-active { background: var(--pca-primary); border-color: var(--pca-primary); color: #fff; }

/* ------------------------------------------------------------------ modais */
html.pca-lock { overflow: hidden; }
.pca-modal, .pca.pca-modal { position: fixed; inset: 0; z-index: 99999; max-width: none; margin: 0; background: rgba(15, 12, 45, .58); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: pca-fade .15s ease-out; }
.pca-modal-box { position: relative; background: #fff; border-radius: 20px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; padding: clamp(20px, 4vw, 32px); box-shadow: 0 30px 80px rgba(15, 23, 42, .35); animation: pca-pop .18s ease-out; }
.pca-modal-lg { max-width: 980px; }
.pca-modal-xl { max-width: 920px; height: calc(100vh - 32px); padding: 44px 8px 8px; display: flex; }
.pca-modal-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--pca-bg); cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--pca-muted); z-index: 2; }
.pca-modal-close:hover { color: var(--pca-ink); }
.pca-modal .pca-title { padding-right: 30px; }

/* ------------------------------------------------------------------ spinner e animações */
.pca-spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--pca-primary-50); border-top-color: var(--pca-primary); animation: pca-spin .8s linear infinite; margin: 0 auto 14px; }
.pca-spinner-sm { width: 16px; height: 16px; border-width: 2px; margin: 0; display: inline-block; }

@keyframes pca-spin { to { transform: rotate(360deg); } }
@keyframes pca-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pca-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pca-live { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@keyframes pca-float { 50% { transform: translateY(-6px); } }
@keyframes pca-flash { 0% { box-shadow: 0 0 0 4px rgba(139, 92, 246, .45); background: #faf5ff; } 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); } }
@keyframes pca-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); } 30% { box-shadow: 0 0 0 6px rgba(236, 72, 153, .3); } }

@media (prefers-reduced-motion: reduce) {
  .pca *, .pca-modal, .pca-modal-box { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ responsivo */
@media (max-height: 760px) and (min-width: 1081px) {
  .pca-hero { padding: 12px 20px; margin: 10px 0; }
  .pca-hero-sub { font-size: .86rem; }
  .pca-badges { display: none; }
}

@media (max-width: 1360px) {
  .pca-studio-grid { grid-template-columns: 76px minmax(0, 1fr) minmax(340px, 42%); }
  .pca-rail { padding: 12px 8px; }
  .pca-rail-txt, .pca-rail-note { display: none; }
  .pca-rail-btn { justify-content: center; padding: 8px 4px; position: relative; }
  .pca-rail-check { position: absolute; top: 2px; right: 4px; width: 16px; height: 16px; font-size: .6rem; }
}

@media (max-width: 1080px) {
  .pca.pca-studio { display: block; height: auto; min-height: 0; }
  .pca-studio-grid { height: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .pca-rail { flex-direction: row; padding: 8px; overflow-x: auto; position: sticky; top: calc(var(--pca-top) + 4px); z-index: 20; }
  .pca-rail-progress { display: none; }
  .pca-rail ol { flex-direction: row; margin: 0; gap: 4px; }
  .pca-rail-btn { width: auto; flex-direction: column; gap: 2px; padding: 6px 8px; }
  .pca-rail-txt { display: flex; }
  .pca-rail-txt small { display: none; }
  .pca-rail-txt b { font-size: .72rem; white-space: nowrap; }
  .pca-rail-ico { width: 32px; height: 32px; }
  .pca-panel { overflow: visible; }
  .pca-panel-scroll { overflow: visible; }
  .pca-panel-nav { position: sticky; bottom: 0; z-index: 15; border-radius: 0 0 18px 18px; box-shadow: 0 -8px 20px rgba(15, 23, 42, .06); }
  .pca-preview { display: none; }
  .pca-studio.is-preview-open .pca-preview { display: flex; position: fixed; inset: 0; z-index: 99990; border-radius: 0; }
  .pca-studio.is-preview-open .pca-preview-close { display: grid; place-items: center; }
  .pca-fab {
    display: inline-flex; align-items: center; gap: 6px; position: fixed; right: 16px; bottom: 84px; z-index: 950;
    padding: 12px 16px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 800; color: #fff; background: var(--pca-grad);
    box-shadow: 0 12px 28px rgba(91, 76, 240, .4);
  }
  .pca-fab span { background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 1px 7px; font-size: .78rem; }
}

@media (max-width: 900px) {
  .pca-appbar-nav { display: none; }
  .pca-plans { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .pca-plan.is-featured { order: -1; }
  .pca-pay-grid, .pca-balance { grid-template-columns: 1fr; }
  .pca-mini-plans { grid-template-columns: 1fr; }
  .pca-mini-plan.is-featured { order: -1; }
}

@media (max-width: 640px) {
  .pca { font-size: 15px; padding: 0 0 24px; }
  .pca-appbar { gap: 10px; }
  .pca-appbar-brand span:not(.pca-appbar-mark) { display: none; }
  .pca-appbar-user .pca-btn { padding: 7px 12px; }
  .pca-hero { border-radius: 16px; padding: 16px; margin: 10px 0; }
  .pca-badges li { font-size: .74rem; padding: 4px 9px; }
  .pca-grid-2, .pca-grid-3, .pca-checks, .pca-tpls { grid-template-columns: 1fr; }
  .pca-segs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pca-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .pca-row input[data-f="desc"], .pca-row input[data-f="duration"] { grid-column: 2 / -1; }
  .pca-check-add { flex-wrap: wrap; }
  .pca-money input { width: 120px; }
  .pca-item { grid-template-columns: minmax(0, 1fr); }
  .pca-item .pca-row-tools { grid-column: 1; grid-row: 3; justify-content: flex-end; }
  .pca-totals-list { min-width: 0; width: 100%; }
  .pca-finish-hero { flex-direction: column; text-align: center; }
  .pca-finish-steps > li { flex-direction: column; gap: 8px; }
  .pca-btn-lg { width: 100%; }
  .pca-templates, .pca-methods { grid-template-columns: 1fr; }
  .pca-topbar { align-items: flex-start; }
  .pca-topbar-actions, .pca-topbar-actions .pca-btn { width: 100%; }
  .pca-search, .pca-search input { width: 100%; min-width: 0; }
  .pca-modal { padding: 0; align-items: flex-end; }
  .pca-modal-box { border-radius: 20px 20px 0 0; max-height: 94vh; }
  .pca-modal-xl { height: 94vh; }

  /* Tabela vira cartões no celular */
  .pca-table thead { display: none; }
  .pca-table, .pca-table tbody, .pca-table tr, .pca-table td { display: block; width: 100%; }
  .pca-table tr { border: 1px solid var(--pca-line); border-radius: var(--pca-radius-sm); padding: 10px 12px; margin-bottom: 10px; }
  .pca-table td { border: 0; padding: 4px 0; text-align: left; }
  .pca-table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pca-muted); }
  .pca-row-actions { white-space: normal; padding-top: 8px !important; }
}
