/* =========================================================
   Pulso — Formulários (.fm-)
   ========================================================= */

/* ---------- Lista ---------- */
.fm-search { flex: 1 1 220px; max-width: 340px; }
.fm-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.fm-card { overflow: hidden; display: flex; flex-direction: column; }
.fm-card .card-pad { flex: 1; display: flex; flex-direction: column; }
.fm-card-thumb { height: 148px; padding: 14px 14px 0; background: radial-gradient(120% 100% at 0% 0%, rgba(34, 211, 238, 0.12), transparent 60%), rgba(255, 255, 255, 0.02); border-bottom: 1px solid var(--line); overflow: hidden; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.fm-card-thumb .fm-illus { height: 150px; border-radius: 12px 12px 0 0; transition: transform 0.4s var(--ease); }
.fm-card:hover .fm-card-thumb .fm-illus { transform: translateY(-4px); }
.fm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fm-card-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 340px; padding: 24px; text-align: center;
  border: 1.5px dashed rgba(255, 255, 255, 0.14); border-radius: var(--r-xl); color: var(--text-2); transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease);
}
.fm-card-new:hover { border-color: var(--cyan-2); background: rgba(34, 211, 238, 0.05); transform: translateY(-2px); }
.fm-card-new .ic { color: var(--cyan-2); }

/* ---------- Ilustração dos formatos ---------- */
.fm-illus { position: relative; height: 100%; min-height: 120px; background: #f4f4f5; border-radius: 12px; overflow: hidden; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6); }
.fm-illus-bar { height: 16px; background: #e4e4e7; display: flex; align-items: center; gap: 4px; padding: 0 8px; }
.fm-illus-bar i { width: 5px; height: 5px; border-radius: 50%; background: #a1a1aa; }
.fm-illus-bar span { margin-left: 8px; height: 6px; flex: 0 1 46%; border-radius: 3px; background: #fff; }
.fm-illus-body { position: absolute; inset: 16px 0 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.fm-il-nav { display: flex; align-items: center; gap: 5px; }
.fm-il-nav b { width: 26px; height: 5px; border-radius: 3px; background: #27272a; margin-right: auto; }
.fm-il-nav span { width: 14px; height: 4px; border-radius: 2px; background: #d4d4d8; }
.fm-il-hero { height: 34%; min-height: 30px; border-radius: 6px; background: linear-gradient(120deg, #d6c3a5, #b08d6a 60%, #8b6b4e); }
.fm-il-lines { display: flex; flex-direction: column; gap: 4px; }
.fm-il-lines span { height: 4px; border-radius: 2px; background: #d4d4d8; }
.fm-il-lines span:nth-child(2) { width: 82%; } .fm-il-lines span:nth-child(3) { width: 60%; }
.fm-il-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; flex: 1; min-height: 18px; }
.fm-il-cards span { border-radius: 4px; background: #e4e4e7; }
.fm-il-form { background: var(--fbg); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 6px; padding: 6px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.fm-il-form b, .fm-il-modal b, .fm-il-pform b { width: 60%; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--acc) 30%, #27272a); }
.fm-il-form span, .fm-il-modal span, .fm-il-pform span { width: 80%; height: 7px; border-radius: 3px; background: #fff; border: 1px solid #d4d4d8; }
.fm-il-form em, .fm-il-modal em, .fm-il-pform em { width: 80%; height: 8px; border-radius: 3px; background: var(--acc); }
.fm-il-overlay { position: absolute; inset: 0; background: rgba(9, 9, 11, 0.5); display: grid; place-items: center; animation: fade-in 0.4s ease both; }
.fm-il-modal { width: 58%; background: var(--fbg); border-radius: 8px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 5px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.fm-il-topbar { margin: -8px -10px 0; padding: 5px 10px; background: var(--fbg); display: flex; align-items: center; gap: 6px; justify-content: center; }
.fm-il-topbar span { width: 30%; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--acc) 40%, #a1a1aa); }
.fm-il-topbar b { width: 22%; height: 7px; border-radius: 3px; background: #fff; }
.fm-il-topbar em { width: 12%; height: 7px; border-radius: 3px; background: var(--acc); }
.fm-il-page { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--fbg); }
.fm-il-img { background: linear-gradient(140deg, #fde68a, #f59e0b 40%, #b45309); opacity: 0.9; }
.fm-il-pform { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px; }

/* ---------- Novo formulário ---------- */
.fm-new-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.fm-new-list { flex: 0 1 280px; min-width: 220px; }
.fm-types { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fm-type { display: flex; flex-direction: column; text-align: left; overflow: hidden; color: var(--text); }
.fm-type-art { height: 190px; padding: 18px 18px 0; display: flex; align-items: flex-end; border-radius: var(--r-xl) var(--r-xl) 0 0; overflow: hidden; }
.fm-type-art .fm-illus { height: 172px; border-radius: 12px 12px 0 0; transition: transform 0.45s var(--ease); width: 100%; }
.fm-type:hover .fm-type-art .fm-illus { transform: translateY(-6px) scale(1.02); }
.fm-art-cyan { background: linear-gradient(160deg, rgba(6, 182, 212, 0.35), rgba(6, 182, 212, 0.04)); }
.fm-art-purple { background: linear-gradient(160deg, rgba(168, 85, 247, 0.35), rgba(168, 85, 247, 0.04)); }
.fm-art-yellow { background: linear-gradient(160deg, rgba(250, 204, 21, 0.3), rgba(250, 204, 21, 0.03)); }
.fm-art-emerald { background: linear-gradient(160deg, rgba(16, 185, 129, 0.35), rgba(16, 185, 129, 0.04)); }
.fm-type-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.fm-best { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.fm-best li { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-2); }
.fm-best li .iconify { color: var(--emerald-2); font-size: 13px; }
.fm-type-cta { align-self: flex-start; margin-top: auto; }
.fm-type-body .fm-type-cta { margin-top: 18px; }
.fm-type.is-busy { pointer-events: none; opacity: 0.6; }
.fm-type.is-busy .fm-type-cta { color: transparent; position: relative; }
.fm-type.is-busy .fm-type-cta::after { content: ""; position: absolute; left: calc(50% - 8px); top: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.2); border-top-color: #000; animation: spin 0.7s linear infinite; }
@media (max-width: 1180px) { .fm-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .fm-types { grid-template-columns: minmax(0, 1fr); } .fm-type-art { height: 160px; } .fm-type-art .fm-illus { height: 142px; } }

/* ---------- Construtor: topo ---------- */
.fm-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.fm-head-title { min-width: 180px; }
.fm-name { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 3px 8px; margin-left: -8px; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; outline: none; transition: border-color 0.2s, background 0.2s; }
.fm-name:hover { border-color: var(--line); }
.fm-name:focus { border-color: var(--cyan-2); background: rgba(255, 255, 255, 0.04); }
.fm-dirty { display: inline-flex; align-items: center; gap: 6px; color: var(--yellow-2); }
.fm-head-actions { margin-left: auto; }

/* ---------- Construtor: grade ---------- */
.fm-builder { display: grid; grid-template-columns: 340px minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.fm-panel { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); display: flex; flex-direction: column; overflow: hidden; }
.fm-tabs { padding: 0 10px; flex-shrink: 0; }
.fm-tabs .tab { flex: 1; justify-content: center; padding: 0 6px; font-size: 12px; }
.fm-panel-body { padding: 16px; overflow-y: auto; flex: 1; }
.fm-side { min-width: 0; }
@media (max-width: 1320px) {
  .fm-builder { grid-template-columns: 320px minmax(0, 1fr); }
  .fm-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .fm-side > * { margin-top: 0 !important; }
}
@media (max-width: 960px) {
  .fm-builder { grid-template-columns: minmax(0, 1fr); }
  .fm-panel { position: static; max-height: none; }
  .fm-center { order: -1; }
  .fm-side { grid-template-columns: minmax(0, 1fr); }
}

/* Linhas de campo */
.fm-fields { display: flex; flex-direction: column; gap: 8px; }
.fm-frow { border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; position: relative; }
.fm-frow:hover { border-color: var(--line-2); }
.fm-frow.is-open { border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.04); }
.fm-frow.is-dragging { opacity: 0.4; }
.fm-frow.drop-before { box-shadow: 0 -2px 0 0 var(--cyan-2); }
.fm-frow.drop-after { box-shadow: 0 2px 0 0 var(--cyan-2); }
.fm-frow-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 8px; cursor: pointer; user-select: none; }
.fm-frow-head .drag-handle { font-size: 15px; }
.fm-frow-edit { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; animation: rise 0.3s var(--ease) both; }

/* Estilo */
.fm-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fm-theme { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); transition: border-color 0.2s, transform 0.2s; }
.fm-theme:hover { border-color: var(--line-2); transform: translateY(-1px); }
.fm-theme span { width: 100%; height: 30px; border-radius: 8px; background: linear-gradient(90deg, var(--b) 0 60%, var(--a) 60% 100%); border: 1px solid rgba(255, 255, 255, 0.15); position: relative; }
.fm-theme span::after { content: ""; position: absolute; left: 8px; top: 8px; width: 30%; height: 4px; border-radius: 2px; background: var(--c); box-shadow: 0 7px 0 -1px var(--c); opacity: 0.7; }
.fm-theme em { font-style: normal; font-size: 11px; color: var(--muted); }
.fm-colors { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.fm-colors .input { flex: 1; text-transform: lowercase; }

/* Configurações */
.fm-set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.fm-set-box { padding: 14px; border-radius: 14px; border: 1px solid rgba(192, 132, 252, 0.25); background: rgba(168, 85, 247, 0.06); }

/* Lateral */
.fm-side-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fm-side-empty { margin-top: 14px; padding: 18px 12px; border-radius: 14px; border: 1px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.fm-side-empty > .iconify { font-size: 26px; color: var(--subtle); }
.fm-tips { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.fm-tips li { display: flex; gap: 8px; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, 0.92); }
.fm-tips li .iconify { margin-top: 2px; font-size: 13px; }

/* ---------- Prévia: navegador ---------- */
.fm-stage {
  border-radius: var(--r-xl); padding: 22px; min-height: 560px; display: flex; justify-content: center; align-items: flex-start;
  background: radial-gradient(80% 60% at 50% 0%, rgba(34, 211, 238, 0.12), transparent 70%), repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0 10px, transparent 10px 20px), #0d0d0f;
  border: 1px solid var(--line);
}
.fm-browser { width: 100%; max-width: 980px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08); transition: max-width 0.45s var(--ease), border-radius 0.45s var(--ease); }
.fm-browser.is-mobile { max-width: 380px; border-radius: 34px; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85), 0 0 0 9px #1c1c1f, 0 0 0 10px rgba(255, 255, 255, 0.12); }
.fm-browser-bar { height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: #f4f4f5; border-bottom: 1px solid #e4e4e7; color: #52525b; }
.fm-dots { display: flex; gap: 6px; }
.fm-dots i { width: 11px; height: 11px; border-radius: 50%; background: #fca5a5; }
.fm-dots i:nth-child(2) { background: #fde68a; } .fm-dots i:nth-child(3) { background: #86efac; }
.fm-url { flex: 1; max-width: 460px; margin: 0 auto; height: 26px; border-radius: 8px; background: #fff; border: 1px solid #e4e4e7; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: #52525b; min-width: 0; }
.fm-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-url .iconify { color: #16a34a; font-size: 12px; }
.fm-bar-spacer { width: 45px; }
.fm-browser.is-mobile .fm-dots, .fm-browser.is-mobile .fm-bar-spacer { display: none; }
.fm-browser.is-mobile .fm-browser-bar { height: 46px; padding-top: 8px; }
.fm-viewport { position: relative; height: 620px; overflow: hidden; display: flex; flex-direction: column; container-type: inline-size; background: #fff; color: #0f172a; font-family: var(--font); }
.fm-browser.is-mobile .fm-viewport { height: 680px; }
.fm-scroll { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.fm-scroll::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.15); }
.fm-reopen { position: absolute; right: 14px; bottom: 14px; z-index: 6; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }

/* Site falso */
.fm-site { font-size: 14px; color: #0f172a; }
.fm-site-nav { display: flex; align-items: center; gap: 18px; padding: 16px 28px; border-bottom: 1px solid #f1f5f9; }
.fm-site-nav b { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; margin-right: auto; }
.fm-site-nav nav { display: flex; gap: 18px; font-size: 13px; color: #475569; }
.fm-site-bag { position: relative; font-size: 20px; color: #0f172a; display: inline-flex; }
.fm-site-bag i { position: absolute; top: -4px; right: -6px; width: 15px; height: 15px; border-radius: 50%; background: #0f172a; color: #fff; font-size: 9px; font-style: normal; display: grid; place-items: center; }
.fm-site-hero { position: relative; margin: 18px 28px 0; border-radius: 18px; overflow: hidden; height: 260px; }
.fm-site-hero img { width: 100%; height: 100%; object-fit: cover; }
.fm-site-hero > div { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 26px; background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.72)); color: #fff; }
.fm-site-hero small { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.85; }
.fm-site-hero h2 { font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; max-width: 380px; margin-top: 6px; }
.fm-site-btn { align-self: flex-start; margin-top: 14px; padding: 9px 16px; border-radius: 99px; background: #fff; color: #0f172a; font-weight: 600; font-size: 13px; }
.fm-site-text { padding: 30px 28px 6px; max-width: 620px; }
.fm-site-text h3, .fm-site-products h3 { font-size: 18px; letter-spacing: -0.02em; }
.fm-site-text p { color: #475569; line-height: 1.65; margin-top: 8px; }
.fm-site-inline { margin: 28px 28px 0; padding: 30px 20px; border-radius: 20px; background: #f8fafc; }
.fm-site-products { padding: 28px; }
.fm-site-products > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.fm-site-products figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid #e2e8f0; }
.fm-site-products img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.fm-site-products figcaption { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #475569; }
.fm-site-products figcaption b { color: #0f172a; font-size: 13px; }
.fm-site-foot { padding: 22px 28px 26px; border-top: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #64748b; }
.fm-site-foot b { color: #0f172a; }

/* Barra */
.fm-site-bar { position: relative; z-index: 4; flex-shrink: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08); animation: fm-slide-down 0.45s var(--ease) both; }
.fm-site-bar.fm-bar-rodape { border-bottom: 0; border-top: 1px solid rgba(0, 0, 0, 0.08); animation-name: fm-slide-up; }
.fm-site-bar .fm-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: inherit; opacity: 0.6; }

/* Pop-up */
.fm-pop { position: absolute; inset: 0; z-index: 5; background: rgba(9, 9, 11, 0.58); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 20px; animation: fade-in 0.35s ease both; }
.fm-pop-box { position: relative; width: 100%; max-width: 440px; animation: pop-in 0.45s var(--ease) both; animation-delay: 0.08s; }
.fm-pop-box .fm-f { box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6); }
.fm-x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1; color: #0f172a; background: rgba(255, 255, 255, 0.85); z-index: 2; transition: transform 0.2s; }
.fm-x:hover { transform: rotate(90deg); }
.fm-pop-box .fm-x { position: absolute; right: -10px; top: -10px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }

/* Página dedicada */
.fm-page { min-height: 100%; display: grid; grid-template-columns: 1fr 1fr; background: color-mix(in srgb, var(--acc) 8%, #fff); }
.fm-page-art { position: relative; min-height: 100%; }
.fm-page-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fm-page-brand { position: absolute; left: 22px; bottom: 22px; right: 22px; color: #fff; display: flex; flex-direction: column; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.fm-page-brand b { font-size: 22px; letter-spacing: -0.03em; }
.fm-page-brand span { font-size: 12px; opacity: 0.9; }
.fm-page-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.55)); }
.fm-page-brand { z-index: 1; }
.fm-page-form { display: flex; align-items: center; justify-content: center; padding: 30px 24px; }

/* ---------- Formulário renderizado ---------- */
.fm-f {
  --acc: #0891b2; --bg: #fff; --tx: #0f172a; --rad: 16px; --acc-tx: #fff;
  width: 100%; max-width: 440px; margin: 0 auto; padding: 28px; text-align: left;
  background: var(--bg); color: var(--tx); border-radius: var(--rad); font-family: var(--font);
  border: 1px solid rgba(15, 23, 42, 0.08); box-shadow: 0 24px 50px -24px rgba(15, 23, 42, 0.35);
}
.fm-f.is-row { max-width: 680px; }
.fm-f-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.fm-f-desc { font-size: 14px; line-height: 1.55; opacity: 0.72; margin-top: 6px; }
.fm-f-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.fm-f-field { position: relative; min-width: 0; }
.fm-f-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; opacity: 0.85; }
.fm-f-label i, .fm-f-check i { color: #e11d48; font-style: normal; }
.fm-f-input {
  width: 100%; height: 44px; padding: 0 14px; font-size: 14px; color: var(--tx); outline: none;
  border-radius: calc(var(--rad) * 0.6); border: 1px solid rgba(15, 23, 42, 0.18); border: 1px solid color-mix(in srgb, var(--tx) 20%, transparent);
  background: rgba(255, 255, 255, 0.7); background: color-mix(in srgb, var(--bg) 94%, var(--tx)); transition: border-color 0.2s, box-shadow 0.2s;
}
.fm-f-input::placeholder { color: var(--tx); opacity: 0.45; }
textarea.fm-f-input { height: auto; padding: 11px 14px; resize: vertical; line-height: 1.5; }
select.fm-f-input { cursor: pointer; }
.fm-f-input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 22%, transparent); }
.fm-f-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; cursor: pointer; }
.fm-f-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--acc); flex-shrink: 0; }
.fm-f-btn {
  height: 46px; padding: 0 22px; border: 0; border-radius: calc(var(--rad) * 0.6); cursor: pointer;
  background: var(--acc); color: var(--acc-tx); font-weight: 700; font-size: 15px; font-family: var(--font); letter-spacing: -0.01em;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s; box-shadow: 0 10px 24px -10px var(--acc);
}
.fm-f-btn:hover { filter: brightness(1.08); }
.fm-f-btn:active { transform: scale(0.98); }
.fm-f-btn.is-sending { color: transparent; position: relative; pointer-events: none; }
.fm-f-btn.is-sending::after { content: ""; position: absolute; left: calc(50% - 9px); top: calc(50% - 9px); width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--acc-tx) 35%, transparent); border-top-color: var(--acc-tx); animation: spin 0.7s linear infinite; }
.fm-f-legal { margin-top: 12px; font-size: 11px; opacity: 0.55; line-height: 1.4; }
.fm-f-err { display: none; margin-top: 5px; font-size: 12px; color: #e11d48; font-weight: 500; }
.fm-f-field.has-err .fm-f-err { display: block; animation: rise 0.25s ease both; }
.fm-f-field.has-err .fm-f-input { border-color: #e11d48; box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14); }
.fm-f.fm-shake { animation: fm-shake 0.4s ease; }

.fm-f.is-row .fm-f-fields { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
.fm-f.is-row .fm-f-field { flex: 1 1 170px; }
.fm-f.is-row .fm-f-t-checkbox, .fm-f.is-row .fm-f-t-textarea { flex-basis: 100%; }
.fm-f.is-row .fm-f-btn { flex: 0 0 auto; align-self: flex-end; }
.fm-f.is-row .fm-f-field:has(.fm-f-label) ~ .fm-f-btn { margin-top: 0; }

/* Barra compacta */
.fm-f.is-bar {
  max-width: none; border: 0; border-radius: 0; box-shadow: none; padding: 10px 52px 10px 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px 16px; flex-wrap: wrap;
}
.fm-f.is-bar .fm-f-head { display: flex; flex-direction: column; min-width: 0; }
.fm-f.is-bar .fm-f-title { font-size: 14px; }
.fm-f.is-bar .fm-f-desc { font-size: 12px; margin-top: 1px; }
.fm-f.is-bar .fm-f-fields { margin-top: 0; flex-wrap: nowrap; gap: 8px; align-items: center; }
.fm-f.is-bar .fm-f-field { flex: 0 1 220px; }
.fm-f.is-bar .fm-f-input { height: 36px; font-size: 13px; }
.fm-f.is-bar .fm-f-btn { height: 36px; padding: 0 16px; font-size: 13px; box-shadow: none; align-self: auto; }
.fm-f.is-bar .fm-f-err { position: absolute; left: 0; top: 100%; white-space: nowrap; font-size: 11px; }
.fm-f.is-bar .fm-f-t-checkbox, .fm-f.is-bar .fm-f-t-textarea { display: none; }

/* Sucesso */
.fm-f.is-done { display: block; }
.fm-f-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 10px 0; animation: pop-in 0.4s var(--ease) both; }
.fm-f.is-bar .fm-f-success { flex-direction: row; padding: 0; }
.fm-f.is-bar .fm-f-success .fm-f-title { font-size: 14px; }
.fm-f-okic { width: 52px; height: 52px; border-radius: 50%; background: var(--acc); color: var(--acc-tx); display: grid; place-items: center; box-shadow: 0 12px 28px -10px var(--acc); }
.fm-f.is-bar .fm-f-okic { width: 28px; height: 28px; }
.fm-f-okic svg { width: 26px; height: 26px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: fm-draw 0.5s 0.15s ease forwards; }
.fm-f.is-bar .fm-f-okic svg { width: 15px; height: 15px; }
.fm-f-success .fm-f-title { font-size: 18px; max-width: 340px; }
.fm-f-again { font-size: 12px; text-decoration: underline; opacity: 0.65; color: var(--tx); }
.fm-f-again:hover { opacity: 1; }

/* Prévia responsiva (container queries) */
@container (max-width: 640px) {
  .fm-site-nav { padding: 14px 18px; }
  .fm-site-nav nav { display: none; }
  .fm-site-hero { margin: 12px 16px 0; height: 210px; }
  .fm-site-hero h2 { font-size: 21px; }
  .fm-site-text, .fm-site-products { padding-left: 18px; padding-right: 18px; }
  .fm-site-inline { margin: 20px 14px 0; padding: 18px 10px; }
  .fm-site-products > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-site-products figure:nth-child(3) { display: none; }
  .fm-f { padding: 22px 18px; }
  .fm-f-title { font-size: 19px; }
  .fm-f.is-row .fm-f-fields { flex-direction: column; align-items: stretch; }
  .fm-f.is-row .fm-f-field { flex-basis: auto; }
  .fm-f.is-row .fm-f-btn { align-self: stretch; }
  .fm-f.is-bar { padding: 10px 44px 12px 14px; justify-content: flex-start; }
  .fm-f.is-bar .fm-f-fields { width: 100%; }
  .fm-f.is-bar .fm-f-field { flex: 1 1 auto; }
  .fm-f.is-bar .fm-f-desc { display: none; }
  .fm-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: 200px auto; }
  .fm-page-form { padding: 20px 14px 30px; }
  .fm-pop { padding: 14px; align-items: end; }
  .fm-pop-box .fm-x { right: 6px; top: 6px; }
}

/* ---------- Modal de incorporação ---------- */
.fm-code { max-height: 340px; padding-right: 150px; }
.fm-code-copy { position: absolute; top: 10px; right: 10px; }
.fm-link-row { display: flex; gap: 20px; align-items: flex-start; }
.fm-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.fm-qr { width: 132px; height: 132px; padding: 10px; border-radius: 14px; background: #fff; display: grid; grid-template-columns: repeat(21, 1fr); grid-template-rows: repeat(21, 1fr); }
.fm-qr i { display: block; }
.fm-qr i.on { background: #0a0a0a; border-radius: 1px; }
/* QR Code real (gerado no navegador) */
.fm-qr.fm-qr-real { display: grid; place-items: center; grid-template-columns: none; grid-template-rows: none; padding: 6px; text-align: center; }
.fm-qr-svg { width: 100%; height: 100%; display: block; }
@media (max-width: 640px) {
  .fm-link-row { flex-direction: column; align-items: stretch; }
  .fm-qr-wrap { align-self: center; }
  .fm-code { padding-right: 16px; padding-top: 52px; }
  .fm-head-actions { margin-left: 0; width: 100%; }
  .fm-head-actions .btn { flex: 1; }
  .fm-stage { padding: 12px; min-height: 0; }
  .fm-viewport { height: 560px; }
  .fm-browser.is-mobile { box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.85), 0 0 0 6px #1c1c1f; border-radius: 26px; }
}

@keyframes fm-slide-down { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes fm-slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fm-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes fm-draw { to { stroke-dashoffset: 0; } }
