/* SmartForm — admin (workspace, builder, resultados) */
:root {
  --ink: #262627;
  --ink-2: #5e5e5e;
  --ink-3: #8a8a8a;
  --line: #e3e3e3;
  --line-2: #d1d1d1;
  --bg: #ffffff;
  --bg-soft: #f7f7f6;
  --bg-hover: #f0f0ef;
  --canvas: #f2f2f1;
  --primary: #191919;
  --primary-hover: #3a3a3a;
  --accent: #0445af;
  --danger: #c4251c;
  --ok: #0a7f43;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.16);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ── Botões ─────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 500; background: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { background: #bdbdbd; cursor: default; }
.btn-secondary { background: #fff; border-color: var(--line-2); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #fbeceb; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; border: 0; background: none; color: var(--ink-2); }
.icon-btn:hover { background: var(--bg-hover); color: var(--ink); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; flex: none; }

/* ── Inputs ─────────────────────────────────────── */
.field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.input, .select, .textarea { width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 72px; padding: 9px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(4,69,175,.12); }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cfcfcf; border-radius: 20px; transition: .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(16px); }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.row-toggle + .row-toggle { border-top: 1px solid var(--line); }

/* ── Flash ──────────────────────────────────────── */
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.flash.error { background: #fbeceb; color: #8c1a13; }
.flash.success { background: #e7f5ec; color: #0a5c31; }

/* ── Toast ──────────────────────────────────────── */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); font-size: 14px; animation: toast-in .25s ease; max-width: 90vw; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── Modal ──────────────────────────────────────── */
.modal-back { position: fixed; inset: 0; background: rgba(25,25,25,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; animation: pop .2s ease; }
.modal-lg { max-width: 960px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 8px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.modal-body { padding: 8px 22px 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }

/* ── Menu suspenso ──────────────────────────────── */
.menu { position: absolute; z-index: 500; background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; min-width: 190px; }
.menu button, .menu a, .menu .menu-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 6px; text-align: left; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--bg-hover); }
.menu svg { width: 16px; height: 16px; flex: none; color: var(--ink-2); }
.menu .danger svg { color: var(--danger); }
.menu button, .menu a { white-space: nowrap; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .danger { color: var(--danger); }

/* ── Badges de tipo de pergunta ─────────────────── */
.qbadge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 7px; border-radius: 4px; color: #fff; font-size: 12px; font-weight: 600; flex: none; }
.qbadge svg { width: 14px; height: 14px; }
.qicon { width: 32px; height: 32px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.qicon svg { width: 18px; height: 18px; }

/* ═══════════════════════ LANDING / LOGIN ═══════════════════════ */
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.hero { max-width: 1120px; margin: 0 auto; padding: 72px 32px 40px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 600; }
.hero p { font-size: 20px; color: var(--ink-2); margin: 0 0 32px; max-width: 520px; }
.hero-art { aspect-ratio: 4/3.4; border-radius: 20px; background: #0445af; position: relative; overflow: hidden; color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: center; font-family: 'Karla', sans-serif; }
.hero-art .n { font-size: 15px; opacity: .8; display: flex; gap: 6px; align-items: center; }
.hero-art .t { font-size: 28px; margin: 8px 0 28px; }
.hero-art .c { border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.1); border-radius: 4px; padding: 8px 10px; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; max-width: 280px; font-size: 18px; }
.hero-art .c b { width: 22px; height: 22px; border: 1px solid #fff; border-radius: 3px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.features { max-width: 1120px; margin: 0 auto; padding: 40px 32px 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: var(--bg-soft); border-radius: 14px; padding: 28px; }
.feature h3 { margin: 0 0 8px; font-size: 18px; }
.feature p { margin: 0; color: var(--ink-2); }

.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: #0445af; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; }
.auth-art h2 { font-size: 44px; line-height: 1.05; letter-spacing: -.03em; font-weight: 600; margin: 0; max-width: 460px; }
.auth-main { display: flex; flex-direction: column; padding: 32px; }
.auth-main .switch-link { text-align: right; color: var(--ink-2); }
.auth-main .switch-link a { color: var(--ink); font-weight: 600; margin-left: 6px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 8px; }
.auth-box { width: 100%; max-width: 380px; margin: auto; }
.auth-box h1 { font-size: 30px; letter-spacing: -.02em; margin: 0 0 24px; text-align: center; font-weight: 600; }
.google-btn { width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 500; }
.google-btn:hover { background: var(--bg-hover); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); margin: 18px 0; font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* ═══════════════════════ DASHBOARD ═══════════════════════ */
.ws-layout { display: grid; grid-template-columns: 264px 1fr; height: 100vh; }
.ws-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; gap: 6px; overflow-y: auto; background: #fff; }
.ws-side .logo { padding: 4px 8px 14px; }
.ws-side-title { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 16px 8px 6px; }
.ws-link { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 6px; color: var(--ink-2); font-weight: 500; }
.ws-link:hover { background: var(--bg-hover); color: var(--ink); }
.ws-link.active { background: var(--bg-hover); color: var(--ink); }
.ws-link small { color: var(--ink-3); font-weight: 400; }
.ws-account { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line); position: relative; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #e5ddff; color: #4b2a9e; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.ws-main { overflow-y: auto; background: #fff; }
.ws-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 32px 8px; gap: 16px; }
.ws-head h1 { font-size: 24px; margin: 0; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 6px; }
.ws-tools { display: flex; align-items: center; gap: 8px; padding: 10px 32px 18px; flex-wrap: wrap; }
.ws-search { position: relative; }
.ws-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.ws-search .input { padding-left: 32px; width: 240px; height: 34px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; height: 32px; width: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); }
.seg button.on { background: var(--bg-hover); color: var(--ink); }
.seg svg { width: 16px; height: 16px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; padding: 0 32px 48px; }
.fcard { border-radius: 10px; border: 1px solid var(--line); background: #fff; overflow: hidden; transition: box-shadow .15s, transform .15s; position: relative; display: flex; flex-direction: column; }
.fcard:hover { box-shadow: var(--shadow-md); }
.fcard-cover { height: 148px; display: flex; align-items: center; justify-content: center; padding: 18px; text-align: center; font-size: 17px; line-height: 1.25; }
.fcard-body { padding: 12px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; border-top: 1px solid var(--line); }
.fcard-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.fcard-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.fcard-new { border: 1.5px dashed var(--line-2); background: var(--bg-soft); min-height: 214px; align-items: center; justify-content: center; color: var(--ink-2); font-weight: 600; gap: 10px; cursor: pointer; }
.fcard-new:hover { background: var(--bg-hover); color: var(--ink); }
.fcard-new .plus { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #bdbdbd; margin-right: 5px; }
.dot.live { background: #2db36b; }

.form-list { padding: 0 32px 48px; }
.form-list table { width: 100%; border-collapse: collapse; }
.form-list th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 500; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.form-list td { padding: 12px; border-bottom: 1px solid var(--line); }
.form-list tr:hover td { background: var(--bg-soft); }

.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tpl { border: 1px solid var(--line); border-radius: 10px; padding: 0; background: #fff; text-align: left; overflow: hidden; transition: box-shadow .15s; }
.tpl:hover { box-shadow: var(--shadow-md); }
.tpl .cover { height: 110px; display: flex; align-items: center; justify-content: center; }
.tpl .cover svg { width: 36px; height: 36px; }
.tpl b { display: block; padding: 12px 14px 2px; }
.tpl small { display: block; padding: 0 14px 14px; color: var(--ink-3); }
.empty { text-align: center; padding: 72px 20px; color: var(--ink-2); }
.empty h2 { color: var(--ink); margin: 0 0 6px; }

/* ═══════════════════════ BUILDER ═══════════════════════ */
.b-app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.b-header { height: 56px; flex: none; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px; background: #fff; gap: 12px; }
.b-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; }
.b-crumbs .sep { color: var(--ink-3); }
.b-crumbs a.ws { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.b-crumbs a.ws:hover { color: var(--ink); }
.b-title { border: 1px solid transparent; border-radius: 6px; padding: 5px 8px; font-weight: 600; min-width: 60px; max-width: 320px; background: none; outline: none; text-overflow: ellipsis; }
.b-title:hover { border-color: var(--line-2); }
.b-title:focus { border-color: var(--accent); }
.b-tabs { display: flex; height: 56px; gap: 4px; }
.b-tabs a { display: flex; align-items: center; padding: 0 14px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.b-tabs a:hover { color: var(--ink); }
.b-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.b-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.save-state { font-size: 12px; color: var(--ink-3); margin-right: 4px; white-space: nowrap; }

.b-body { flex: 1; display: grid; grid-template-columns: 272px 1fr 320px; min-height: 0; }
.b-left { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.b-left-top { padding: 12px; border-bottom: 1px solid var(--line); }
.b-list { flex: 1; overflow-y: auto; padding: 8px; }
.b-sec { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 12px 8px 6px; display: flex; align-items: center; justify-content: space-between; }
.b-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; cursor: pointer; position: relative; user-select: none; }
.b-item:hover { background: var(--bg-hover); }
.b-item.on { background: #ebebea; }
.b-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.b-item .t.ph { color: var(--ink-3); }
.b-item .more { opacity: 0; }
.b-item:hover .more, .b-item.on .more { opacity: 1; }
.b-item.dragging { opacity: .4; }
.b-item.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.b-item.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }

.b-canvas { background: var(--canvas); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.b-canvas-bar { height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; flex: none; }
.b-device { display: inline-flex; background: #fff; border-radius: 8px; padding: 3px; box-shadow: var(--shadow-sm); }
.b-device button { border: 0; background: none; width: 34px; height: 28px; border-radius: 6px; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; }
.b-device button.on { background: var(--bg-hover); color: var(--ink); }
.b-device svg { width: 16px; height: 16px; }
.b-stage-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 28px 28px; min-height: 0; }
.b-stage { width: 100%; height: 100%; max-width: 1040px; max-height: 640px; border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; position: relative; transition: max-width .3s; }
.b-stage.mobile { max-width: 375px; max-height: 700px; border-radius: 28px; border: 8px solid #1e1e1e; }

.b-right { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.b-rtabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; flex: none; }
.b-rtabs button { flex: 1; height: 44px; border: 0; background: none; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; }
.b-rtabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.b-panel { flex: 1; overflow-y: auto; padding: 16px; }
.b-panel h4 { margin: 18px 0 8px; font-size: 13px; font-weight: 600; }
.b-panel h4:first-child { margin-top: 0; }
.typesel { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; background: #fff; text-align: left; }
.typesel:hover { background: var(--bg-hover); }
.typesel > span:not(.qicon) { flex: 1; font-weight: 500; }
.bg-slot { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.bg-thumb { flex: none; border-radius: 6px; overflow: hidden; background: var(--bg-soft); border: 1px dashed var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 11px; font-weight: 600; }
.bg-desktop .bg-thumb { width: 96px; height: 54px; }
.bg-mobile .bg-thumb { width: 54px; height: 96px; margin: 0 21px; }
.bg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-info { min-width: 0; display: flex; flex-direction: column; }
.slug-row { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: #fff; }
.slug-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(4,69,175,.12); }
.slug-prefix { display: flex; align-items: center; padding: 0 4px 0 12px; background: var(--bg-soft); color: var(--ink-2); font-family: 'IBM Plex Mono', monospace; font-size: 13px; white-space: nowrap; border-right: 1px solid var(--line); }
.slug-row .input { border: 0; box-shadow: none !important; font-family: 'IBM Plex Mono', monospace; font-size: 13px; min-width: 0; }
@media (max-width: 640px) { .slug-row { flex-direction: column; } .slug-prefix { padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); white-space: normal; word-break: break-all; } }
.attach-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 2px; word-break: break-all; }
.choice-edit { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.choice-edit .k { width: 24px; height: 24px; border: 1px solid var(--line-2); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-2); flex: none; }
.choice-edit .input { height: 32px; }
.logic-rule { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; background: var(--bg-soft); }
.logic-rule .row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.logic-rule .row:last-child { margin-bottom: 0; }
.logic-rule .select, .logic-rule .input { height: 32px; font-size: 13px; }
.logic-rule small { color: var(--ink-3); width: 44px; flex: none; }
.swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.swatch { border: 2px solid var(--line); border-radius: 8px; padding: 10px; text-align: left; background: #fff; }
.swatch.on { border-color: var(--ink); }
.swatch .prev { height: 54px; border-radius: 4px; padding: 8px; font-size: 11px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.swatch .prev i { display: block; height: 10px; width: 46px; border-radius: 2px; }
.swatch b { display: block; font-size: 12px; margin-top: 6px; font-weight: 500; }
.color-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.color-row input[type=color] { width: 36px; height: 28px; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px; background: #fff; cursor: pointer; }

.add-modal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 28px; }
.add-cat h5 { margin: 14px 0 6px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.add-opt { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 6px; border-radius: 8px; text-align: left; font-weight: 500; }
.add-opt:hover { background: var(--bg-hover); }

/* Pré-visualização dentro do canvas: título editável */
.sf-edit[contenteditable] { outline: none; cursor: text; border-radius: 4px; min-width: 40px; }
.sf-edit[contenteditable]:hover { box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.sf-edit[contenteditable]:focus { box-shadow: 0 0 0 2px rgba(4,69,175,.35); }
.sf-edit:empty::before { content: attr(data-ph); opacity: .45; }

/* ═══════════════════ CONNECT / SHARE / RESULTS ═══════════════════ */
.page { flex: 1; overflow-y: auto; background: var(--bg-soft); }
.page-inner { max-width: 980px; margin: 0 auto; padding: 32px 24px 64px; }
.page h2 { font-size: 22px; margin: 0 0 4px; font-weight: 600; letter-spacing: -.01em; }
.page .sub { color: var(--ink-2); margin: 0 0 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 16px; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.card .muted { color: var(--ink-2); }
.split { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.subnav { display: flex; flex-direction: column; gap: 2px; }
.subnav a { padding: 9px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.subnav a:hover { background: var(--bg-hover); color: var(--ink); }
.subnav a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; }
.code { background: #191919; color: #f2f2f2; border-radius: 8px; padding: 14px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.conn { display: flex; align-items: flex-start; gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.conn.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.conn input[type=radio] { margin-top: 4px; accent-color: var(--ink); }
.conn .grow { flex: 1; min-width: 0; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 500; background: var(--bg-hover); color: var(--ink-2); }
.pill.ok { background: #e2f4e9; color: #0a5c31; }
.pill.warn { background: #fdf1d9; color: #7a4d00; }
.cora-logo { width: 40px; height: 40px; border-radius: 10px; background: #fe3e6d; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.stat span { color: var(--ink-2); font-size: 13px; }
.qsum-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.qsum-head h3 { font-size: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 200px) 1fr 70px; gap: 12px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 26px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 4px; min-width: 2px; }
.bar-row .n { text-align: right; color: var(--ink-2); }
.samples { margin: 0; padding: 0; list-style: none; }
.samples li { padding: 9px 12px; background: var(--bg-soft); border-radius: 6px; margin-bottom: 6px; }
.tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th, .tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; max-width: 320px; }
.tbl th { background: var(--bg-soft); font-weight: 500; color: var(--ink-2); white-space: nowrap; position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }

/* ═══════════════════════ RESPONSIVO ═══════════════════════ */
.only-mobile { display: none !important; }
@media (max-width: 1100px) {
  .b-body { grid-template-columns: 240px 1fr; }
  .b-right { position: fixed; right: 0; top: 56px; bottom: 0; width: 320px; z-index: 300; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s; }
  .b-right.open { transform: none; }
  .show-panel-btn { display: inline-flex !important; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .features { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .ws-layout { grid-template-columns: 1fr; }
  .ws-side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 400; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .ws-side.open { transform: none; }
  .only-mobile { display: inline-flex !important; }
  .ws-head, .ws-tools { padding-left: 16px; padding-right: 16px; }
  .form-grid, .form-list { padding: 0 16px 32px; }
  .ws-search .input { width: 100%; }
  .ws-search { flex: 1; }
  .b-header { grid-template-columns: 1fr auto; height: auto; padding: 8px 12px; row-gap: 0; }
  .b-tabs { grid-column: 1 / -1; grid-row: 2; height: 44px; overflow-x: auto; }
  .b-title { max-width: 160px; }
  .b-crumbs a.ws, .b-crumbs .sep, .save-state { display: none; }
  .b-body { grid-template-columns: 1fr; }
  .b-left { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 300; box-shadow: var(--shadow-lg); transform: translateX(-100%); transition: transform .25s; }
  .b-left.open { transform: none; }
  .b-right { top: 0; }
  .b-stage-wrap { padding: 0 12px 12px; }
  .add-modal-grid, .tpl-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .subnav { flex-direction: row; overflow-x: auto; }
  .page-inner { padding: 20px 16px 48px; }
  .bar-row { grid-template-columns: 90px 1fr 56px; }
  .topbar { padding: 0 16px; }
}
.show-panel-btn { display: none !important; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 250; }
