/* Prontim! Spaces — lista e editor de canvas. Exceções ao design system documentadas em docs/DESIGN-SYSTEM.md. */

/* ---------- Lista ---------- */
#spaces-view .spaces-page-head .btn { display: inline-flex; align-items: center; gap: 6px; }
#spaces-view .spaces-page-head .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sp-list-search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; width: min(320px, 100%);
  border: 1px solid var(--search-border, #dcdce0); border-radius: 999px; background: var(--surface, #fff);
}
.sp-list-search svg { width: 15px; height: 15px; fill: none; stroke: #71717a; stroke-width: 2; flex: none; }
.sp-list-search input { border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; font-size: 13px; width: 100%; padding: 0; min-height: 0; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.sp-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line, #e8e8eb); border-radius: 12px; background: var(--surface, #fff); overflow: hidden;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.sp-card:hover { border-color: #d4d4d8; box-shadow: 0 6px 18px rgb(0 0 0 / 8%); }
.sp-card-thumb { display: block; aspect-ratio: 16 / 9; width: 100%; padding: 0; border: 0; background: #141415; cursor: pointer; }
.sp-card-thumb svg { display: block; width: 100%; height: 100%; }
.sp-card-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 44px 12px 12px; min-width: 0; }
.sp-card-name { all: unset; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--foreground, #1d1d1f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-card-meta span { font-size: 12px; color: #6b6b73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-card-delete {
  position: absolute; right: 8px; bottom: 12px; width: 28px; height: 28px; border-radius: 6px; border: 0; background: transparent;
  color: #8a8a93; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s ease, background .15s ease;
}
.sp-card:hover .sp-card-delete, .sp-card-delete:focus-visible { opacity: 1; }
.sp-card-delete:hover { background: var(--tone-critical-bg, #fdeaea); color: var(--tone-critical-fg, #a33434); }
.sp-card-delete svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (hover: none) { .sp-card-delete { opacity: 1; } }
.sp-list-empty { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 56px 16px; color: #6b6b73; font-size: 13px; text-align: center; border: 1px dashed #d9d9de; border-radius: 12px; }
.sp-list-empty strong { color: var(--foreground, #1d1d1f); font-size: 14px; }
.sp-dialog { border: 0; border-radius: 16px; padding: 0; width: min(380px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgb(0 0 0 / 22%); }
.sp-dialog::backdrop { background: rgb(24 24 27 / 36%); }
.sp-dialog-form { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.sp-dialog-form strong { font-size: 16px; font-weight: 600; }
.sp-dialog-form input { height: 38px; border-radius: 11px; border: 1px solid #d4d4d8; padding: 0 12px; font: inherit; font-size: 14px; }
.sp-dialog-form input:focus { outline: 0; border-color: var(--brand, #5d5cfc); box-shadow: var(--focus-ring); }
.sp-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sp-loading-page { display: grid; place-items: center; height: var(--sp-available-height, 70vh); color: #8a8a93; font-size: 13px; }

/* ---------- Página do Space ocupa toda a altura ---------- */
body.space-editor-open #app-view .content { padding: 0 !important; }
body.space-editor-open #app-view .workspace { overflow: hidden !important; scrollbar-gutter: auto !important; }
/* v1.54.2: com um Space aberto, o canvas ocupa o lugar da barra de busca (no celular ela fica, porque tem o botão do menu) */
@media (min-width: 901px) { body.space-editor-open #app-view .topbar { display: none !important; } }
.sp-editor-host { height: var(--sp-available-height, calc(100dvh - 60px)); min-height: 360px; }

.sp-editor {
  --sp-bg: #141415; --sp-node: #1f1f21; --sp-border: #2f2f33; --sp-text: #e7e7ea; --sp-muted: #9a9aa2; --sp-wire: #5d5d66;
  --sp-dot: #3a3a40; --sp-chrome: rgb(31 31 33 / 82%); --sp-chrome-border: rgb(255 255 255 / 8%); --sp-hover: rgb(255 255 255 / 7%);
  --sp-note: #2c2a4a; --sp-note-border: #4a47a8; --sp-field: #18181a; --sp-mention: rgb(93 92 252 / 28%); --sp-mini-node: #4a4a52;
  --sp-head: #1a1a1b; --sp-danger: #ff6b6b;
  position: relative; display: flex; flex-direction: column; height: 100%; color: var(--sp-text); background: var(--sp-bg);
  font-family: var(--font-sans); overflow: hidden;
}
.sp-editor[data-theme="light"] {
  --sp-bg: #f7f7f8; --sp-node: #ffffff; --sp-border: #e3e3e7; --sp-text: #1d1d1f; --sp-muted: #6b6b73; --sp-wire: #a1a1aa;
  --sp-dot: #d4d4d8; --sp-chrome: rgb(255 255 255 / 86%); --sp-chrome-border: rgb(0 0 0 / 8%); --sp-hover: rgb(0 0 0 / 5%);
  --sp-note: #f0f0ff; --sp-note-border: #c9c8ff; --sp-field: #f6f6f7; --sp-mention: rgb(93 92 252 / 16%); --sp-mini-node: #c4c4cc;
  --sp-head: #ffffff; --sp-danger: #c43d3d;
}
.sp-editor svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sp-head {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; flex: none;
  background: var(--sp-head); border-bottom: 1px solid var(--sp-border); min-width: 0;
}
.sp-head-btn, .sp-tool, .sp-icon {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 999px;
  background: transparent; color: var(--sp-text); cursor: pointer; padding: 0;
}
.sp-head-btn:hover, .sp-tool:hover, .sp-icon:hover { background: var(--sp-hover); }
.sp-head-btn svg, .sp-tool svg, .sp-icon svg { width: 16px; height: 16px; }
.sp-tool:disabled { opacity: .35; cursor: default; background: transparent; }
.sp-tool.is-active { color: var(--brand, #5d5cfc); }
.sp-head-name { min-width: 0; flex: 0 1 auto; }
.sp-name, .sp-name-input {
  font: 600 14px/1 var(--font-sans); color: var(--sp-text); background: transparent; border: 1px solid transparent;
  border-radius: 8px; padding: 7px 8px; max-width: min(46vw, 520px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.sp-name { cursor: text; }
.sp-name:hover:not(:disabled) { border-color: var(--sp-border); }
.sp-name:disabled { cursor: default; }
.sp-name-input { outline: 0; border-color: var(--brand, #5d5cfc); width: min(46vw, 420px); background: var(--sp-field); }
.sp-badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--sp-hover); color: var(--sp-muted); white-space: nowrap; }
.sp-head-end { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.sp-presence { display: flex; align-items: center; }
.sp-presence-dot {
  width: 26px; height: 26px; border-radius: 999px; margin-left: -6px; display: grid; place-items: center; overflow: hidden;
  font-size: 11px; font-weight: 600; color: #fff; background: var(--sp-person, #5d5cfc); box-shadow: 0 0 0 2px var(--sp-head), 0 0 0 3.5px var(--sp-person, #5d5cfc);
}
.sp-presence-dot img { width: 100%; height: 100%; object-fit: cover; }
.sp-presence-dot.is-more { background: var(--sp-hover); color: var(--sp-text); box-shadow: 0 0 0 2px var(--sp-head); }
.sp-save { font-size: 12px; color: var(--sp-muted); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.sp-save.is-saved::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #20865b; }
.sp-save.is-error { color: var(--sp-danger); }
.sp-save.is-conflict { color: #e0a43a; }
.sp-save button { font: 600 12px var(--font-sans); border: 0; border-radius: 999px; height: 26px; padding: 0 10px; background: var(--brand, #5d5cfc); color: #fff; cursor: pointer; }

/* ---------- Canvas ---------- */
.sp-stage {
  position: relative; flex: 1; min-height: 0; overflow: hidden; outline: 0; touch-action: none; user-select: none;
  background-color: var(--sp-bg);
  background-image: radial-gradient(circle at 1px 1px, var(--sp-dot) 1px, transparent 1.2px);
  cursor: default;
}
.sp-stage.is-panning { cursor: grabbing; }
.sp-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.sp-edges, .sp-guides { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.sp-edges { z-index: 1; }
.sp-guides { z-index: 100000; }
.sp-guides line { stroke: var(--brand, #5d5cfc); stroke-width: calc(1px / var(--sp-zoom, 1)); stroke-dasharray: calc(4px / var(--sp-zoom, 1)) calc(3px / var(--sp-zoom, 1)); }
.sp-edge-line { fill: none; stroke: var(--sp-wire); stroke-width: calc(1.6px / max(var(--sp-zoom, 1), .6)); }
.sp-edge-hit { fill: none; stroke: transparent; stroke-width: calc(16px / var(--sp-zoom, 1)); pointer-events: stroke; cursor: pointer; }
.sp-editor.is-readonly .sp-edge-hit { pointer-events: none; }
.sp-edge:hover .sp-edge-line { stroke: var(--sp-danger); stroke-dasharray: 6 4; }
.sp-edge.is-selected .sp-edge-line { stroke: var(--brand, #5d5cfc); }
.sp-edge-draft { fill: none; stroke: var(--brand, #5d5cfc); stroke-width: 2; stroke-dasharray: 6 4; }

.sp-node { position: absolute; display: flex; flex-direction: column; color: var(--sp-text); }
.sp-node-label {
  position: absolute; left: 2px; right: 0; bottom: 100%; height: 24px; display: flex; align-items: center; gap: 5px;
  font: 600 12px/1 var(--font-sans); color: var(--sp-muted); white-space: nowrap; min-width: 0;
  transform-origin: 0 100%; transform: scale(min(1.6, max(1, calc(0.75 / var(--sp-zoom, 1)))));
}
.sp-stage.is-far .sp-node-label { opacity: 0; }
.sp-node-icon { width: 13px; height: 13px; flex: none; display: grid; }
.sp-node-icon svg { width: 13px; height: 13px; }
.sp-node-name { overflow: hidden; text-overflow: ellipsis; cursor: default; }
.sp-rename { width: 20px; height: 20px; flex: none; border: 0; border-radius: 6px; background: transparent; color: var(--sp-muted); display: grid; place-items: center; cursor: pointer; opacity: 0; padding: 0; }
.sp-rename svg { width: 12px; height: 12px; }
.sp-node:hover .sp-rename, .sp-node.is-selected .sp-rename { opacity: 1; }
.sp-rename:hover { background: var(--sp-hover); color: var(--sp-text); }
.sp-rename-input { font: 600 12px var(--font-sans); color: var(--sp-text); background: var(--sp-field); border: 1px solid var(--brand, #5d5cfc); border-radius: 6px; padding: 3px 6px; outline: 0; width: 100%; max-width: 260px; }
.sp-node-box {
  position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 10px; background: var(--sp-node);
  border: 1px solid var(--sp-border); box-shadow: 0 1px 2px rgb(0 0 0 / 12%); cursor: grab;
}
.sp-node.is-dragging .sp-node-box { cursor: grabbing; box-shadow: 0 12px 30px rgb(0 0 0 / 28%); }
.sp-node.is-selected .sp-node-box { border-color: var(--brand, #5d5cfc); box-shadow: 0 0 0 1px var(--brand, #5d5cfc); }
.sp-editor.is-readonly .sp-node-box { cursor: default; }
.sp-node.is-note .sp-node-box { background: var(--sp-note); border-color: var(--sp-note-border); }
.sp-node.is-group .sp-node-box { background: rgb(127 127 140 / 5%); border: 1.5px dashed var(--sp-wire); box-shadow: none; }
.sp-node.is-group.is-selected .sp-node-box { border-color: var(--brand, #5d5cfc); box-shadow: none; }

.sp-handle {
  position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 999px; z-index: 3;
  background: var(--sp-bg); border: 2px solid var(--sp-wire); opacity: .55; cursor: crosshair; transition: opacity .12s, transform .12s, border-color .12s;
}
.sp-handle.is-in { left: -7px; }
.sp-handle.is-out { right: -7px; }
.sp-node:hover .sp-handle, .sp-node.is-selected .sp-handle, .sp-stage.is-connecting .sp-handle { opacity: 1; }
.sp-handle:hover { border-color: var(--brand, #5d5cfc); transform: scale(1.3); }
.sp-resize { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; cursor: nwse-resize; z-index: 3; opacity: 0; }
.sp-resize::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 7px; height: 7px; border-right: 2px solid var(--brand, #5d5cfc); border-bottom: 2px solid var(--brand, #5d5cfc); border-radius: 0 0 2px 0; }
.sp-node.is-selected .sp-resize, .sp-node:hover .sp-resize { opacity: 1; }

/* Conteúdo */
.sp-node.is-image .sp-node-box img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sp-loading { position: absolute; inset: auto 8px 8px auto; font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgb(0 0 0 / 55%); color: #fff; }
.sp-node-box > .sp-loading:only-child { inset: 50% auto auto 50%; transform: translate(-50%, -50%); }
.sp-placeholder { all: unset; box-sizing: border-box; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--sp-muted); font-size: 12px; text-align: center; padding: 12px; }
.sp-placeholder.is-action { cursor: pointer; }
.sp-placeholder.is-action:hover { color: var(--sp-text); background: var(--sp-hover); }
.sp-placeholder svg { width: 20px; height: 20px; }
.sp-placeholder small { font-size: 11px; opacity: .8; }
.sp-text, .sp-textedit textarea, .sp-mirror {
  box-sizing: border-box; width: 100%; height: 100%; margin: 0; padding: 12px 14px; font: 400 13px/1.5 var(--font-sans);
  white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; letter-spacing: 0;
}
.sp-text.is-placeholder { color: var(--sp-muted); font-size: 12px; }
.sp-mention { background: var(--sp-mention); color: inherit; border-radius: 4px; box-shadow: 0 0 0 1.5px var(--sp-mention); font-weight: 500; }
.sp-text .sp-mention { color: var(--brand, #5d5cfc); }
.sp-editor[data-theme="dark"] .sp-text .sp-mention { color: #b4b3ff; }
.sp-mention.is-project { background: rgb(31 157 116 / 22%); box-shadow: 0 0 0 1.5px rgb(31 157 116 / 22%); }
.sp-text .sp-mention.is-project { color: #2fb487; }
.sp-textedit { position: relative; width: 100%; height: 100%; }
.sp-mirror { position: absolute; inset: 0; color: transparent; pointer-events: none; overflow: hidden; }
.sp-mirror .sp-mention { font-weight: 400; }
.sp-textedit textarea { position: relative; resize: none; border: 0; outline: 0; background: transparent; color: var(--sp-text); caret-color: var(--brand, #5d5cfc); user-select: text; }
.sp-node.is-editing .sp-node-box { cursor: text; }

.sp-link { position: relative; display: flex; flex-direction: column; height: 100%; }
.sp-link-image { flex: 0 0 48%; min-height: 0; overflow: hidden; background: var(--sp-field); }
.sp-link-image img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sp-link-copy { padding: 10px 40px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: hidden; }
.sp-link-site { font-size: 11px; color: var(--sp-muted); }
.sp-link-copy strong { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-link-copy p { margin: 0; font-size: 12px; line-height: 1.4; color: var(--sp-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sp-link .sp-open { position: absolute; right: 8px; bottom: 10px; }
.sp-link-form { padding: 14px; height: 100%; display: flex; align-items: center; box-sizing: border-box; }
.sp-link-form input, .sp-draft textarea, .sp-draft select:not(.custom-select-native), .sp-draft input, .sp-modal input, .sp-modal select:not(.custom-select-native) {
  width: 100%; box-sizing: border-box; font: 400 13px var(--font-sans); color: var(--sp-text); background: var(--sp-field);
  border: 1px solid var(--sp-border); border-radius: 8px; padding: 7px 9px; outline: 0; min-height: 0; box-shadow: none;
}
.sp-link-form input:focus, .sp-draft textarea:focus, .sp-draft select:not(.custom-select-native):focus, .sp-draft input:focus, .sp-modal input:focus, .sp-modal select:not(.custom-select-native):focus { border-color: var(--brand, #5d5cfc); }
.sp-editor[data-theme="dark"] input[type="date"] { color-scheme: dark; }

/* Cartões do sistema */
.sp-card-body { box-sizing: border-box; height: 100%; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow: hidden; }
.sp-card-row { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.sp-card-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-task.is-done .sp-card-title { text-decoration: line-through; color: var(--sp-muted); }
.sp-open { width: 26px; height: 26px; flex: none; border-radius: 999px; border: 1px solid var(--sp-border); background: var(--sp-node); color: var(--sp-text); display: grid; place-items: center; cursor: pointer; padding: 0; }
.sp-open:hover { border-color: var(--brand, #5d5cfc); color: var(--brand, #5d5cfc); }
.sp-open svg { width: 13px; height: 13px; }
.sp-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.sp-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sp-pill.is-status { color: color-mix(in srgb, var(--sp-status) 70%, var(--sp-text)); background: color-mix(in srgb, var(--sp-status) 18%, transparent); }
.sp-pill.is-critical { color: var(--tone-critical-fg, #a33434); background: var(--tone-critical-bg, #fdeaea); }
.sp-pill.is-attention { color: var(--tone-attention-fg, #a1461a); background: var(--tone-attention-bg, #ffede3); }
.sp-pill.is-info { color: var(--tone-info-fg, #245fa3); background: var(--tone-info-bg, #e8f1fd); }
.sp-pill.is-neutral { color: var(--tone-neutral-fg, #5f5f68); background: var(--tone-neutral-bg, #ededf0); }
.sp-editor[data-theme="dark"] .sp-pill.is-critical { color: #ff9b9b; background: rgb(255 107 107 / 14%); }
.sp-editor[data-theme="dark"] .sp-pill.is-attention { color: #ffb38a; background: rgb(255 140 80 / 14%); }
.sp-editor[data-theme="dark"] .sp-pill.is-info { color: #8fbcff; background: rgb(80 150 255 / 14%); }
.sp-editor[data-theme="dark"] .sp-pill.is-neutral { color: #b8b8c0; background: rgb(255 255 255 / 8%); }
.sp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 12px; }
.sp-card-context { font-size: 11px; color: var(--sp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-muted { color: var(--sp-muted); font-size: 12px; }
.sp-due { font-size: 12px; font-weight: 500; white-space: nowrap; }
.sp-due.is-late { color: var(--sp-danger); }
.sp-avatars { display: flex; }
.sp-avatar { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; overflow: hidden; margin-right: -5px; font-size: 10px; font-weight: 600; background: var(--brand, #5d5cfc); color: #fff; box-shadow: 0 0 0 2px var(--sp-node); flex: none; }
.sp-avatar img, .sp-person-avatar img, .sp-chip img { width: 100%; height: 100%; object-fit: cover; }
.sp-avatar.is-more { background: var(--sp-hover); color: var(--sp-text); }
.sp-progress { height: 6px; border-radius: 999px; background: var(--sp-hover); overflow: hidden; }
.sp-progress i { display: block; height: 100%; background: var(--brand, #5d5cfc); border-radius: inherit; }
.sp-person { flex-direction: row; align-items: center; gap: 10px; }
.sp-person-avatar { width: 40px; height: 40px; border-radius: 999px; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--brand, #5d5cfc); color: #fff; font-weight: 600; }
.sp-person-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-person-copy strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-person-copy small { font-size: 12px; color: var(--sp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-missing { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 12px; box-sizing: border-box; font-size: 12px; color: var(--sp-muted); }
.sp-missing strong { color: var(--sp-text); font-size: 13px; }

/* Nova tarefa no Space */
.sp-draft { gap: 8px; overflow: auto; cursor: default; user-select: text; }
.sp-draft textarea { resize: none; font-weight: 600; }
.sp-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-field > span { font-size: 11px; font-weight: 600; color: var(--sp-muted); }
.sp-draft-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--sp-border); border-radius: 8px; background: var(--sp-field); min-height: 34px; box-sizing: border-box; }
.sp-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px 0 2px; border-radius: 999px; border: 0; background: var(--sp-hover); color: var(--sp-text); font: 500 12px var(--font-sans); cursor: pointer; }
.sp-chip > img, .sp-chip > :first-child:not(b) { width: 20px; height: 20px; border-radius: 999px; overflow: hidden; }
.sp-chip:hover { background: rgb(255 107 107 / 16%); }
.sp-chips .sp-chip-input { flex: 1; min-width: 70px; border: 0 !important; background: transparent !important; padding: 3px 4px !important; }
.sp-btn { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--sp-border); background: var(--sp-node); color: var(--sp-text); font: 600 12px var(--font-sans); cursor: pointer; flex: none; }
.sp-btn:hover { background: var(--sp-hover); }
.sp-btn.is-primary { background: var(--brand, #5d5cfc); border-color: var(--brand, #5d5cfc); color: #fff; }
.sp-btn.is-primary:hover { background: var(--brand-dark, #4b4ae6); }
.sp-btn:disabled { opacity: .6; cursor: default; }

/* ---------- Barras flutuantes ---------- */
.sp-toolbar, .sp-zoombar {
  position: absolute; z-index: 10; display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--sp-chrome); border: 1px solid var(--sp-chrome-border); box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.sp-toolbar { left: 12px; top: 50%; transform: translateY(-50%); flex-direction: column; }
.sp-tool-sep { height: 1px; margin: 4px 6px; background: var(--sp-chrome-border); }
.sp-zoombar { left: 12px; bottom: 12px; align-items: center; }
.sp-zoom-label { min-width: 48px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--sp-text); font: 600 12px var(--font-sans); cursor: pointer; font-variant-numeric: tabular-nums; }
.sp-zoom-label:hover { background: var(--sp-hover); }
.sp-minimap { position: absolute; left: 12px; bottom: 60px; z-index: 10; width: 200px; height: 130px; border-radius: 12px; background: var(--sp-chrome); border: 1px solid var(--sp-chrome-border); box-shadow: 0 8px 24px rgb(0 0 0 / 18%); cursor: pointer; }
.sp-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none; text-align: center; padding: 24px; }
.sp-empty strong { font-size: 14px; font-weight: 600; }
.sp-empty span { font-size: 12px; color: var(--sp-muted); }
.sp-selection { position: absolute; z-index: 9; border: 1px solid var(--brand, #5d5cfc); background: rgb(93 92 252 / 10%); border-radius: 4px; pointer-events: none; }

/* Menus, seletor e sugestões */
.sp-menu, .sp-picker, .sp-suggest, .sp-modal {
  position: absolute; z-index: 20; background: var(--sp-node); color: var(--sp-text); border: 1px solid var(--sp-border);
  border-radius: 12px; box-shadow: 0 14px 40px rgb(0 0 0 / 30%);
}
.sp-menu { width: 190px; padding: 4px; }
.sp-menu-item, .sp-suggest-item, .sp-picker-item {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 32px; padding: 0 9px; border: 0; border-radius: 8px;
  background: transparent; color: var(--sp-text); font: 500 13px var(--font-sans); text-align: left; cursor: pointer;
}
.sp-menu-item svg { width: 15px; height: 15px; flex: none; color: var(--sp-muted); }
.sp-menu-item:hover, .sp-menu-item:focus-visible, .sp-suggest-item.is-active, .sp-suggest-item:hover, .sp-picker-item.is-active, .sp-picker-item:hover { background: var(--sp-hover); outline: 0; }
.sp-menu-item.is-danger, .sp-menu-item.is-danger svg { color: var(--sp-danger); }
.sp-menu-section { padding: 8px 9px 4px; font-size: 11px; font-weight: 600; color: var(--sp-muted); border-top: 1px solid var(--sp-border); margin-top: 4px; }
.sp-picker { left: 50%; top: 72px; transform: translateX(-50%); width: min(380px, calc(100% - 24px)); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.sp-picker-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.sp-picker-input { height: 34px; border-radius: 999px; border: 1px solid var(--sp-border); background: var(--sp-field); color: var(--sp-text); padding: 0 12px; font: 13px var(--font-sans); outline: 0; }
.sp-picker-input:focus { border-color: var(--brand, #5d5cfc); }
.sp-picker-list { display: flex; flex-direction: column; gap: 1px; max-height: 340px; overflow: auto; }
.sp-picker-item { min-height: 42px; }
.sp-picker-copy { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.sp-picker-copy strong { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-picker-copy small { font-size: 11px; color: var(--sp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-picker-empty { padding: 16px; text-align: center; font-size: 12px; color: var(--sp-muted); }
.sp-picker-item .sp-avatar { margin-right: 0; width: 26px; height: 26px; }
.sp-suggest { width: 230px; padding: 4px; max-height: 240px; overflow: auto; }
.sp-suggest-icon { width: 22px; height: 22px; border-radius: 999px; overflow: hidden; display: grid; place-items: center; background: var(--brand, #5d5cfc); color: #fff; font-size: 10px; font-weight: 600; flex: none; }
.sp-suggest-icon img { width: 100%; height: 100%; object-fit: cover; }
.sp-suggest-icon svg { width: 13px; height: 13px; }
.sp-modal-layer { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgb(0 0 0 / 36%); padding: 16px; }
.sp-modal { position: relative; width: min(520px, 100%); max-height: 100%; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: auto; box-sizing: border-box; }
.sp-modal-head, .sp-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-modal-head strong { font-size: 15px; }
.sp-modal-foot { justify-content: flex-end; }
.sp-bulk-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.sp-bulk-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--sp-border); border-radius: 10px; }
.sp-bulk-row > input { width: 16px; height: 16px; margin-top: 8px; accent-color: var(--brand, #5d5cfc); flex: none; }
.sp-bulk-copy { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sp-bulk-copy small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--sp-muted); }
.sp-bulk-copy small input { width: auto; padding: 3px 6px; font-size: 12px; }

/* v1.52.0 — autor das notas, arquivos, visualizador e setor */
.sp-node.is-text .sp-node-box, .sp-node.is-note .sp-node-box { display: flex; flex-direction: column; }
.sp-node.is-text .sp-text, .sp-node.is-note .sp-text, .sp-node.is-text .sp-textedit, .sp-node.is-note .sp-textedit { flex: 1; min-height: 0; height: auto; }
.sp-author {
  flex: none; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px; min-width: 0;
  font: 500 11px/1 var(--font-sans); color: var(--sp-muted); border-top: 1px solid var(--sp-border);
}
.sp-node.is-note .sp-author { border-top-color: var(--sp-note-border); }
.sp-author-avatar { width: 18px; height: 18px; flex: none; border-radius: 999px; overflow: hidden; display: grid; place-items: center; background: var(--brand, #5d5cfc); color: #fff; font-size: 9px; font-weight: 600; }
.sp-author-avatar:empty { background: var(--sp-hover); }
.sp-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sp-author-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sp-file { box-sizing: border-box; height: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0; }
.sp-file.is-pending { opacity: .7; }
.sp-file-badge {
  width: 40px; height: 48px; flex: none; border-radius: 8px; display: grid; place-items: end center; padding-bottom: 7px; box-sizing: border-box;
  font: 700 10px/1 var(--font-sans); letter-spacing: .02em; color: #fff; background: #6b6b78;
  clip-path: polygon(0 0, 70% 0, 100% 24%, 100% 100%, 0 100%);
}
.sp-file-badge[data-ext="pdf"] { background: #d64545; }
.sp-file-badge:is([data-ext="doc"], [data-ext="docx"], [data-ext="odt"], [data-ext="rtf"]) { background: #2f6fd8; }
.sp-file-badge:is([data-ext="xls"], [data-ext="xlsx"], [data-ext="ods"], [data-ext="csv"]) { background: #1f8a5b; }
.sp-file-badge:is([data-ext="ppt"], [data-ext="pptx"], [data-ext="odp"]) { background: #d0632c; }
.sp-file-badge[data-ext="zip"] { background: #8a6d1f; }
.sp-file-badge.is-large { width: 64px; height: 78px; font-size: 13px; padding-bottom: 12px; }
.sp-file-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sp-file-copy strong { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.sp-file-copy small { font-size: 11px; color: var(--sp-muted); }
.sp-file .sp-file-actions { position: static; opacity: 1; flex-direction: column; }
.sp-file-actions { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; opacity: 0; transition: opacity .12s; }
.sp-node:hover .sp-file-actions, .sp-node.is-selected .sp-file-actions, .sp-file-actions:focus-within { opacity: 1; }
@media (hover: none) { .sp-file-actions { opacity: 1; } }
.sp-node.is-image .sp-file-actions .sp-open { background: rgb(20 20 21 / 72%); border-color: rgb(255 255 255 / 18%); color: #fff; }
.sp-editor.is-readonly .sp-node.is-image .sp-node-box, .sp-editor.is-readonly .sp-node.is-file .sp-node-box { cursor: zoom-in; }

.sp-editor .sp-sector select:not(.custom-select-native) {
  height: 28px !important; width: auto; max-width: 220px; border-radius: 999px !important; border: 1px solid var(--sp-border) !important;
  background-color: var(--sp-field) !important; color: var(--sp-text) !important; font: 500 12px var(--font-sans); padding: 0 26px 0 10px !important;
  outline: 0; min-height: 0 !important; box-shadow: none !important; text-overflow: ellipsis;
}
.sp-editor .sp-sector select:not(.custom-select-native):focus { border-color: var(--brand, #5d5cfc); }
.sp-editor[data-theme="dark"] .sp-sector select { color-scheme: dark; }
.sp-sector-badge { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

body.sp-viewer-open { overflow: hidden; }
.sp-viewer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgb(12 12 13 / 96%); color: #f2f2f4; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sp-viewer[hidden] { display: none; }
.sp-viewer svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-viewer-head { flex: none; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 18px; border-bottom: 1px solid rgb(255 255 255 / 8%); min-width: 0; }
.sp-viewer-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-viewer-title strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-viewer-title small { font-size: 12px; color: #a1a1aa; }
.sp-viewer-btn {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 16%); background: transparent; color: #f2f2f4;
  display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--font-sans); cursor: pointer; text-decoration: none; flex: none;
}
.sp-viewer-btn[hidden] { display: none; }
.sp-viewer-btn:hover { background: rgb(255 255 255 / 8%); }
.sp-viewer-btn.is-primary { background: var(--brand, #5d5cfc); border-color: var(--brand, #5d5cfc); color: #fff; }
.sp-viewer-btn.is-primary:hover { filter: brightness(1.08); }
.sp-viewer-btn svg { width: 14px; height: 14px; }
.sp-viewer-close { width: 36px; height: 36px; flex: none; border: 0; border-radius: 999px; background: transparent; color: #f2f2f4; display: grid; place-items: center; cursor: pointer; }
.sp-viewer-close:hover { background: rgb(255 255 255 / 10%); }
.sp-viewer-close svg { width: 18px; height: 18px; }
.sp-viewer-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 72px; box-sizing: border-box; }
.sp-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgb(0 0 0 / 40%); }
.sp-viewer-body iframe { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 8px; background: #fff; }
.sp-viewer-text { width: min(1000px, 100%); max-height: 100%; overflow: auto; margin: 0; padding: 18px 20px; box-sizing: border-box; border-radius: 8px; background: #1c1c1f; color: #e7e7ea; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.sp-viewer-note { font-size: 13px; color: #a1a1aa; }
.sp-viewer-note.is-foot { margin-top: 10px; font-size: 12px; }
.sp-viewer-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 360px; }
.sp-viewer-empty strong { font-size: 15px; overflow-wrap: anywhere; }
.sp-viewer-empty > span:not(.sp-file-badge) { font-size: 13px; color: #a1a1aa; line-height: 1.45; }
.sp-viewer-empty .sp-viewer-btn { margin-top: 6px; height: 36px; padding: 0 16px; }
.sp-viewer-nav {
  position: absolute; top: 50%; width: 44px; height: 44px; margin-top: 4px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgb(255 255 255 / 10%); color: #fff; display: grid; place-items: center;
}
.sp-viewer-nav:hover { background: rgb(255 255 255 / 18%); }
.sp-viewer-nav svg { width: 20px; height: 20px; }
.sp-viewer-nav.is-prev { left: 14px; }
.sp-viewer-nav.is-next { right: 14px; }
.sp-viewer-nav.is-next svg { transform: scaleX(-1); }

/* v1.52.1: pill de setor ao lado do nome do Space */
.sp-card-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-card-title .sp-card-name { flex: 0 1 auto; min-width: 0; }
.sp-card-meta .sp-card-sector {
  position: relative; flex: 0 1 auto; min-width: 0; max-width: 55%; display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 999px; font-size: 11px; font-weight: 500; line-height: 1; color: var(--brand, #5d5cfc); background: rgb(93 92 252 / 10%);
}
.sp-card-meta .sp-card-sector > span { font-size: inherit; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-card-meta label.sp-card-sector { cursor: pointer; transition: background .15s ease, color .15s ease; }
.sp-card-meta label.sp-card-sector:hover { background: rgb(93 92 252 / 18%); }
.sp-card-meta label.sp-card-sector:focus-within { outline: 2px solid rgb(93 92 252 / 45%); outline-offset: 1px; }
.sp-card-meta .sp-card-sector.is-empty { color: #8a8a93; background: transparent; box-shadow: inset 0 0 0 1px #dcdce0; }
.sp-card-meta .sp-card-sector.is-empty:hover { color: var(--brand, #5d5cfc); background: rgb(93 92 252 / 6%); box-shadow: inset 0 0 0 1px rgb(93 92 252 / 35%); }
.sp-card-meta .sp-card-sector select:not(.custom-select-native) {
  position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; cursor: pointer; font-size: 13px;
}
#spaces-view .page-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-list-sector:not(.custom-select-native) { height: 34px; border-radius: 999px; border: 1px solid var(--search-border, #dcdce0); background: var(--surface, #fff); font: 500 13px var(--font-sans); padding: 0 28px 0 12px; max-width: 240px; }
.sp-list-sector[hidden] { display: none; }
.sp-dialog-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: #52525b; }
.sp-dialog-field[hidden] { display: none; }
.sp-dialog-field select:not(.custom-select-native) { height: 38px; border-radius: 11px; border: 1px solid #d4d4d8; padding: 0 10px; font: inherit; font-size: 14px; font-weight: 400; color: var(--foreground, #1d1d1f); background: #fff; }

/* Cursores das outras pessoas */
.sp-cursors { position: absolute; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.sp-cursor { position: absolute; left: 0; top: 0; transition: transform .08s linear; }
.sp-cursor svg { width: 16px; height: 16px; fill: var(--sp-person); stroke: #fff; stroke-width: 1.2; display: block; }
.sp-cursor span { position: absolute; left: 14px; top: 14px; padding: 2px 7px; border-radius: 999px; background: var(--sp-person); color: #fff; font: 600 11px var(--font-sans); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .sp-cursor, .sp-handle, .sp-card, .sp-card-delete { transition: none; }
}

@media (max-width: 760px) {
  .sp-head { padding: 0 6px; gap: 4px; }
  .sp-name, .sp-name-input { max-width: 42vw; }
  .sp-save { font-size: 11px; }
  .sp-presence { display: none; }
  .sp-editor .sp-sector select:not(.custom-select-native) { max-width: 120px; }
  .sp-sector-badge { display: none; }
  .sp-viewer-head { padding: 0 6px 0 12px; gap: 4px; }
  .sp-viewer-btn span { display: none; }
  .sp-viewer-btn { width: 34px; padding: 0; justify-content: center; }
  .sp-viewer-body { padding: 12px 8px 72px; }
  .sp-viewer-nav { top: auto; bottom: 14px; margin: 0; }
  .sp-viewer-empty .sp-viewer-btn { width: auto; padding: 0 16px; }
  .sp-viewer-empty .sp-viewer-btn span { display: inline; }
  .sp-toolbar { top: auto; bottom: 60px; left: 50%; transform: translateX(-50%); flex-direction: row; max-width: calc(100% - 24px); overflow-x: auto; }
  .sp-tool-sep { width: 1px; height: auto; margin: 6px 4px; }
  .sp-minimap { display: none; }
  .sp-grid { grid-template-columns: 1fr; }
}

/* v1.53.0 — bloco Checklist: Enter cria o próximo item */
.sp-node.is-checklist .sp-node-box { display: flex; flex-direction: column; }
.sp-check { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; padding: 10px 10px 8px; box-sizing: border-box; }
.sp-check-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 8px; flex: none; }
.sp-check-bar { flex: 1; height: 4px; border-radius: 999px; background: var(--sp-hover); overflow: hidden; }
.sp-check-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--brand, #5d5cfc); transition: width .2s ease; }
.sp-check-count { font: 600 11px/1 var(--font-sans); color: var(--sp-muted); font-variant-numeric: tabular-nums; }
.sp-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sp-check-item { display: flex; align-items: flex-start; gap: 8px; padding: 3px 4px; border-radius: 6px; }
.sp-check-item:hover { background: var(--sp-hover); }
.sp-check-item.is-new:hover { background: transparent; }
.sp-editor .sp-check-box {
  appearance: none; -webkit-appearance: none; flex: none; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; box-sizing: border-box;
  border: 1.5px solid var(--sp-wire); border-radius: 4px; background: transparent; cursor: pointer; display: grid; place-items: center;
  transition: background .12s ease, border-color .12s ease;
}
.sp-editor .sp-check-box:hover { border-color: var(--brand, #5d5cfc); }
.sp-editor .sp-check-box:focus-visible { outline: 2px solid rgb(93 92 252 / 45%); outline-offset: 1px; }
.sp-editor .sp-check-box:checked { background: var(--brand, #5d5cfc); border-color: var(--brand, #5d5cfc); }
.sp-editor .sp-check-box:checked::after { content: ""; width: 4px; height: 8px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sp-editor .sp-check-box:disabled { cursor: default; }
.sp-check-item.is-new .sp-check-box { border-style: dashed; opacity: .6; cursor: default; }
.sp-editor .sp-check-text {
  flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; resize: none; overflow: hidden;
  font: 400 13px/20px var(--font-sans); color: var(--sp-text); white-space: pre-wrap; overflow-wrap: anywhere; field-sizing: content; min-height: 20px; box-shadow: none;
}
#app-view .sp-editor .sp-check-text, #app-view .sp-editor .sp-check-text:focus, #app-view .sp-editor .sp-check-text:hover { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; border-radius: 0 !important; min-height: 20px !important; }
#app-view .sp-editor .sp-check-box:focus { box-shadow: none !important; }
.sp-editor .sp-check-text::placeholder { color: var(--sp-muted); opacity: .8; }
.sp-check-item.is-done .sp-check-text { color: var(--sp-muted); text-decoration: line-through; text-decoration-color: var(--sp-muted); }
.sp-node.is-checklist .sp-author { margin-top: auto; }

/* v1.54.0 — grupo desenhado com o botão direito e nome sempre à mão */
.sp-selection.is-group { border: 1.5px dashed var(--brand, #5d5cfc); background: rgb(93 92 252 / 6%); border-radius: 10px; }
.sp-node.is-group > .sp-node-label { color: var(--sp-text); font-size: 13px; }
.sp-node.is-group .sp-rename { opacity: .6; }

/* v1.55.0 — páginas do Space */
.sp-pages { position: relative; flex: none; }
.sp-page-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; max-width: 220px; padding: 0 8px 0 10px; border-radius: 999px;
  border: 1px solid var(--sp-border); background: transparent; color: var(--sp-text); font: 650 11px var(--font-sans); letter-spacing: .01em; cursor: pointer;
}
.sp-page-btn:hover, .sp-page-btn[aria-expanded="true"] { background: var(--sp-hover); }
.sp-page-btn svg { width: 13px; height: 13px; flex: none; color: var(--sp-muted); }
.sp-page-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-page-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 200px; padding: 4px; box-sizing: border-box;
  background: var(--sp-node); color: var(--sp-text); border: 1px solid var(--sp-border); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / 30%);
}
.sp-page-pop[hidden] { display: none; }
.sp-page-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 4px 8px; }
.sp-page-pop-head strong { font-size: 11px; font-weight: 600; color: var(--sp-muted); }
.sp-page-new { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--sp-muted); font: 600 11px var(--font-sans); cursor: pointer; }
.sp-page-new:hover { background: var(--sp-hover); color: var(--sp-text); }
.sp-page-new svg { width: 12px; height: 12px; }
.sp-page-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow: auto; }
.sp-page-row { display: flex; align-items: center; gap: 0; border-radius: 7px; padding-right: 2px; }
.sp-page-row:hover { background: var(--sp-hover); }
.sp-page-row.is-current { background: var(--sp-hover); }
.sp-page-row.is-current .sp-page-label { font-weight: 600; }
.sp-page-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border: 0; background: transparent; color: inherit; font: 500 12px var(--font-sans); text-align: left; cursor: pointer; }
.sp-page-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-page-act { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--sp-muted); cursor: pointer; padding: 0; opacity: 0; }
.sp-page-act svg { width: 12px; height: 12px; }
.sp-page-row:hover .sp-page-act, .sp-page-act:focus-visible { opacity: 1; }
.sp-page-act:hover { background: var(--sp-hover); color: var(--sp-text); }
.sp-page-act.is-danger:hover { color: var(--sp-danger); }
#app-view .sp-editor .sp-page-input { flex: 1; min-width: 0; height: 24px; margin: 0 2px 0 4px; padding: 0 6px !important; border: 1px solid var(--brand, #5d5cfc) !important; border-radius: 6px; background: var(--sp-field) !important; color: var(--sp-text); font: 500 12px var(--font-sans); box-shadow: none !important; outline: 0; }
@media (hover: none) { .sp-page-act { opacity: 1; } }
@media (max-width: 720px) { .sp-page-btn { max-width: 120px; } .sp-page-pop { width: min(200px, calc(100vw - 24px)); } }

/* v1.56.0: selects dos Spaces com o custom select do app (sem menu nativo do navegador).
   O menu abre "flutuante" (.sp-select-menu, no <body>) para não ser cortado nem escalado pelo canvas. */
#spaces-view .sp-editor :is(.sp-draft, .sp-modal) .custom-select-trigger {
  min-height: 0 !important; height: auto; padding: 7px 9px !important; gap: 6px; font: 400 13px var(--font-sans) !important;
  color: var(--sp-text) !important; background: var(--sp-field) !important; border: 1px solid var(--sp-border) !important;
  border-radius: 8px !important; box-shadow: none !important;
}
#spaces-view .sp-editor :is(.sp-draft, .sp-modal) .custom-select-trigger:hover { border-color: color-mix(in srgb, var(--sp-border) 60%, var(--sp-text)) !important; }
#spaces-view .sp-editor :is(.sp-draft, .sp-modal) .custom-select.open .custom-select-trigger,
#spaces-view .sp-editor :is(.sp-draft, .sp-modal) .custom-select-trigger:focus-visible { border-color: var(--brand, #5d5cfc) !important; box-shadow: none !important; }
#spaces-view .sp-editor .custom-select-chevron { width: 14px; height: 14px; color: var(--sp-muted); }

#spaces-view .sp-editor .sp-sector .custom-select { width: auto; max-width: 220px; }
#spaces-view .sp-editor .sp-sector .custom-select-trigger {
  height: 28px; min-height: 0 !important; padding: 0 8px 0 10px !important; gap: 4px; border-radius: 999px !important;
  border: 1px solid var(--sp-border) !important; background: var(--sp-field) !important; color: var(--sp-text) !important;
  font: 500 12px var(--font-sans) !important; box-shadow: none !important;
}
#spaces-view .sp-editor .sp-sector .custom-select.open .custom-select-trigger,
#spaces-view .sp-editor .sp-sector .custom-select-trigger:focus-visible { border-color: var(--brand, #5d5cfc) !important; box-shadow: none !important; }

/* Pill de setor do card: o gatilho fica invisível por cima da pill. */
#spaces-view .sp-card-meta .sp-card-sector > .custom-select { position: absolute; inset: 0; width: auto; }
#spaces-view .sp-card-meta .sp-card-sector .custom-select-trigger {
  width: 100%; height: 100%; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; cursor: pointer; box-shadow: none !important;
}

#spaces-view .page-toolbar > .custom-select.is-compact { width: auto; min-width: 170px; max-width: 240px; }
#spaces-view .sp-dialog-field .custom-select-trigger { font-weight: 400; }

.custom-select-menu.sp-select-menu { font-family: var(--font-sans); }
.custom-select-menu.sp-select-menu[data-theme="dark"] {
  background: #1f1f21 !important; border-color: #2f2f33 !important; box-shadow: 0 14px 36px rgb(0 0 0 / 45%) !important; color-scheme: dark;
}
.sp-select-menu[data-theme="dark"] .custom-select-option { color: #e7e7ea; }
.sp-select-menu[data-theme="dark"] .custom-select-option:hover,
.sp-select-menu[data-theme="dark"] .custom-select-option.is-focused { background: rgb(255 255 255 / 7%); }
.sp-select-menu[data-theme="dark"] .custom-select-option[aria-selected="true"] { background: rgb(93 92 252 / 26%) !important; color: #fff !important; }
.sp-select-menu[data-theme="dark"] .custom-select-group-label { color: #9a9aa2; }
.sp-select-menu[data-theme="dark"] :is(.custom-select-group + .custom-select-group, .custom-select-option + .custom-select-group) { border-top-color: #2f2f33; }

@media (max-width: 760px) {
  #spaces-view .sp-editor .sp-sector .custom-select { max-width: 120px; }
}

/* v1.58.0 — participantes no card da lista */
.sp-card-sub { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 22px; }
.sp-card-people { display: flex; flex: none; padding-left: 2px; }
.sp-card-meta .sp-card-people .sp-avatar {
  width: 22px; height: 22px; margin-right: -6px; font-size: 9px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: clip;
  background: var(--brand, #5d5cfc); box-shadow: 0 0 0 2px var(--surface, #fff);
}
.sp-card-meta .sp-card-people .sp-avatar:last-child { margin-right: 0; }
.sp-card-meta .sp-card-people .sp-avatar.is-more { background: #ececef; color: #52525b; }
.sp-card-people + span { min-width: 0; }

/* v1.63.0 — desenho livre e stickers do mascote */
.sp-ink { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; z-index: 100001; }
.sp-stage.is-drawing, .sp-stage.is-drawing .sp-node, .sp-stage.is-drawing .sp-node * { cursor: crosshair !important; }
.sp-node.is-draw { pointer-events: none; }
.sp-node.is-draw .sp-node-box, .sp-node.is-sticker .sp-node-box { overflow: visible; background: transparent; border: 1px solid transparent; border-radius: 6px; box-shadow: none; }
.sp-node.is-draw.is-selected .sp-node-box, .sp-node.is-sticker.is-selected .sp-node-box { border: 1px dashed var(--brand, #5d5cfc); box-shadow: none; }
.sp-node.is-draw.is-selected .sp-node-box, .sp-node.is-draw .sp-resize { pointer-events: auto; }
.sp-node.is-draw.is-dragging .sp-node-box, .sp-node.is-sticker.is-dragging .sp-node-box { box-shadow: none; }
.sp-draw { display: block; width: 100%; height: 100%; overflow: visible; }
.sp-draw path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sp-draw .sp-draw-hit { stroke: transparent; pointer-events: stroke; cursor: grab; }
.sp-draw .sp-draw-line { pointer-events: none; }
.sp-sticker { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 18%)); }

.sp-drawbar {
  position: absolute; z-index: 11; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px;
  max-width: calc(100% - 24px); padding: 4px 4px 4px 6px; overflow-x: auto; border-radius: 999px; color: var(--sp-text);
  background: var(--sp-chrome); border: 1px solid var(--sp-chrome-border); box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); scrollbar-width: none;
}
.sp-drawbar[hidden] { display: none; }
.sp-draw-opt { width: 30px; height: 30px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--sp-muted); cursor: pointer; }
.sp-draw-opt svg { width: 17px; height: 17px; }
.sp-draw-opt:hover { background: var(--sp-hover); color: var(--sp-text); }
.sp-draw-opt.is-active { background: rgb(93 92 252 / 16%); color: var(--brand, #5d5cfc); }
.sp-size-dot { width: var(--d); height: var(--d); border-radius: 999px; background: currentColor; }
.sp-draw-sep { width: 1px; height: 18px; margin: 0 5px; flex: none; background: var(--sp-chrome-border); }
.sp-swatch { position: relative; width: 20px; height: 20px; margin: 0 3px; flex: none; padding: 0; border: 0; border-radius: 999px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(127 127 140 / 40%); cursor: pointer; }
.sp-swatch:hover { transform: scale(1.12); }
.sp-swatch.is-active { outline: 2px solid var(--brand, #5d5cfc); outline-offset: 2px; }
.sp-swatch.is-custom { overflow: hidden; background: conic-gradient(#e5484d, #f5a524, #ffd60a, #30a46c, #0091ff, #5d5cfc, #e5484d); }
.sp-swatch.is-custom.is-active { background: var(--c); }
#app-view .sp-editor .sp-swatch.is-custom input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.sp-draw-done { height: 28px; margin-left: 2px; padding: 0 12px; flex: none; border: 0; border-radius: 999px; background: var(--brand, #5d5cfc); color: #fff; font: 600 12px var(--font-sans); cursor: pointer; }
.sp-draw-done:hover { filter: brightness(1.08); }

.sp-sticker-pop {
  position: absolute; z-index: 12; width: 220px; padding: 10px; box-sizing: border-box; border-radius: 14px; color: var(--sp-text);
  background: var(--sp-node); border: 1px solid var(--sp-border); box-shadow: 0 14px 40px rgb(0 0 0 / 30%);
}
.sp-sticker-pop[hidden] { display: none; }
.sp-sticker-head { padding: 0 2px 8px; font-size: 11px; font-weight: 600; color: var(--sp-muted); }
.sp-sticker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
#app-view .sp-editor .sp-sticker-opt {
  width: 100%; height: 92px; min-width: 0; min-height: 0; box-sizing: border-box; display: grid; place-items: center; padding: 8px;
  border: 0; border-radius: 10px; background: var(--sp-hover); cursor: grab; transition: transform .12s ease, background .12s ease;
}
#app-view .sp-editor .sp-sticker-opt:hover { background: rgb(93 92 252 / 14%); transform: scale(1.04); }
.sp-sticker-opt img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .sp-sticker-opt, .sp-swatch { transition: none; transform: none !important; } }

/* v1.64.0 — borracha, contorno de adesivo e giro dos stickers */
.sp-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.sp-stage.is-drawing.is-erasing, .sp-stage.is-drawing.is-erasing .sp-node, .sp-stage.is-drawing.is-erasing .sp-node * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='9' fill='rgba(255,255,255,.25)' stroke='%235d5cfc' stroke-width='2'/%3E%3C/svg%3E") 11 11, cell !important; }
.sp-node.is-sticker .sp-sticker { filter: url(#sp-sticker-cut) drop-shadow(0 5px 9px rgb(0 0 0 / 28%)); }
.sp-node.is-sticker .sp-node-box { border-radius: 14px; }
.sp-rotate {
  position: absolute; left: 50%; top: -30px; z-index: 3; width: 14px; height: 14px; margin-left: -7px; box-sizing: border-box;
  border-radius: 999px; background: var(--sp-node); border: 2px solid var(--brand, #5d5cfc); cursor: grab; opacity: 0; transition: opacity .12s ease;
}
.sp-rotate::after { content: ""; position: absolute; left: 50%; top: 12px; width: 2px; height: 16px; margin-left: -1px; background: var(--brand, #5d5cfc); }
.sp-node:hover .sp-rotate, .sp-node.is-selected .sp-rotate { opacity: 1; }
.sp-stage.is-rotating, .sp-stage.is-rotating * { cursor: grabbing !important; }

/* v1.66.0 — adesivos do fundo do login como stickers */
.sp-sticker-grid + .sp-sticker-head { padding-top: 10px; }
.sp-sticker-grid.is-small { grid-template-columns: repeat(4, 1fr); gap: 5px; }
#app-view .sp-editor .sp-sticker-grid.is-small .sp-sticker-opt { height: 44px; padding: 7px; }
.sp-sticker-grid.is-small .sp-sticker-opt img { width: 30px; height: 30px; }

/* v1.67.0 — formas de diagrama, rótulos e setas nas ligações, organograma */
.sp-handle.is-top, .sp-handle.is-bottom { left: 50%; margin: 0 0 0 -6px; }
.sp-handle.is-top { top: -7px; }
.sp-handle.is-bottom { top: auto; bottom: -7px; }
.sp-edge:hover .sp-edge-line { stroke: var(--brand, #5d5cfc); stroke-dasharray: none; }
.sp-edge-line { stroke-linejoin: round; }
.sp-edge-arrow { fill: var(--sp-wire); stroke: none; }
.sp-edge:hover .sp-edge-arrow, .sp-edge.is-selected .sp-edge-arrow { fill: var(--brand, #5d5cfc); }
.sp-edge-tag rect.sp-edge-hit { fill: var(--sp-node); stroke: var(--sp-wire); stroke-width: 1.2px; pointer-events: all; }
.sp-edge-tag text { fill: var(--sp-text); stroke: none; font: 600 12px var(--font-sans); pointer-events: none; }
.sp-edge-tag.is-yes rect.sp-edge-hit { fill: #30a46c; stroke: #30a46c; }
.sp-edge-tag.is-no rect.sp-edge-hit { fill: #e5484d; stroke: #e5484d; }
.sp-edge-tag.is-yes text, .sp-edge-tag.is-no text { fill: #fff; }
.sp-edge.is-selected .sp-edge-tag rect.sp-edge-hit, .sp-edge:hover .sp-edge-tag rect.sp-edge-hit { stroke: var(--brand, #5d5cfc); stroke-width: 2px; }
.sp-editor.is-readonly .sp-edge-tag rect.sp-edge-hit { pointer-events: none; }
#app-view .sp-editor .sp-edge-input {
  position: absolute; z-index: 20; width: 150px; height: 30px; min-height: 0; margin: 0; padding: 0 10px; transform: translate(-50%, -50%); box-sizing: border-box;
  border: 1.5px solid var(--brand, #5d5cfc); border-radius: 999px; outline: 0; background: var(--sp-node); color: var(--sp-text); font: 600 12px var(--font-sans); text-align: center;
  box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
}

.sp-node.is-shape .sp-node-box { overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.sp-node.is-shape.is-selected .sp-node-box, .sp-node.is-shape.is-dragging .sp-node-box { box-shadow: none; }
.sp-shape {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px 14px; box-sizing: border-box;
  border: 2px solid var(--shape); border-radius: 10px; background: color-mix(in srgb, var(--shape) 14%, var(--sp-node));
  color: var(--sp-text); text-align: center; box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
}
.sp-node.is-dragging .sp-shape { box-shadow: 0 12px 30px rgb(0 0 0 / 28%); }
.sp-shape.is-pill { border-radius: 999px; padding: 6px 18px; }
.sp-shape.is-circle, .sp-shape.is-and, .sp-shape.is-or { border-radius: 50%; padding: 8px; }
.sp-shape.is-and, .sp-shape.is-or { background: var(--shape); color: #fff; }
.sp-shape.is-and strong, .sp-shape.is-or strong { font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.sp-shape.is-diamond { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 10px 24%; }
.sp-shape-bg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp-editor .sp-shape-bg polygon { fill: color-mix(in srgb, var(--shape) 14%, var(--sp-node)); stroke: var(--shape); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.sp-node.is-shape.is-selected .sp-shape:not(.is-diamond) { box-shadow: 0 0 0 3px rgb(93 92 252 / 38%); }
.sp-node.is-shape.is-selected .sp-shape-bg polygon { stroke-width: 3.5px; }
.sp-shape-text { position: relative; width: 100%; max-height: 100%; overflow: hidden; font: 500 13px/1.3 var(--font-sans); overflow-wrap: anywhere; }
.sp-shape-text strong { display: block; font-weight: 650; }
.sp-shape-text span { display: block; margin-top: 2px; font-size: 12px; color: var(--sp-muted); }
#app-view .sp-editor .sp-shape-text textarea {
  display: block; width: 100%; min-height: 0; margin: 0; padding: 0; border: 0; outline: 0; resize: none; overflow: hidden;
  background: transparent; box-shadow: none; color: inherit; font: inherit; font-weight: 600; text-align: center;
}

.sp-menu:has(.sp-menu-row) { width: 226px; }
.sp-menu-section:first-child { border-top: 0; margin-top: 0; padding-top: 5px; }
.sp-menu-sep { height: 1px; margin: 4px 0; background: var(--sp-border); }
.sp-menu-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 5px 5px; }
#app-view .sp-editor .sp-menu-chip {
  min-width: 26px; height: 28px; min-height: 0; margin: 0; padding: 0 6px; display: inline-grid; place-items: center; box-sizing: border-box;
  border: 1px solid var(--sp-border); border-radius: 8px; background: transparent; color: var(--sp-text); font: 600 12px var(--font-sans); cursor: pointer;
}
.sp-menu-chip svg { width: 15px; height: 15px; }
#app-view .sp-editor .sp-menu-chip:hover, #app-view .sp-editor .sp-menu-chip:focus-visible { background: var(--sp-hover); outline: 0; }
#app-view .sp-editor .sp-menu-chip.is-active { border-color: var(--brand, #5d5cfc); background: rgb(93 92 252 / 16%); color: var(--brand, #5d5cfc); }
#app-view .sp-editor .sp-menu-chip.is-swatch { width: 22px; min-width: 22px; height: 22px; margin: 3px 2px; padding: 0; border: 0; border-radius: 999px; background: var(--c); }
#app-view .sp-editor .sp-menu-chip.is-swatch.is-active { box-shadow: 0 0 0 2px var(--sp-node), 0 0 0 4px var(--c); }

/* v1.72.0 — bloco Planilha: linhas e colunas variáveis, letras nas colunas e números nas linhas */
.sp-node.is-table .sp-node-box { display: flex; flex-direction: column; }
.sp-table { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--sp-wire) transparent; }
.sp-sheet { border-collapse: separate; border-spacing: 0; table-layout: fixed; font: 400 12.5px/1 var(--font-sans); color: var(--sp-text); }
.sp-sheet th, .sp-sheet td { height: 30px; padding: 0; border: 0; border-right: 1px solid var(--sp-border); border-bottom: 1px solid var(--sp-border); box-sizing: border-box; background: var(--sp-node); }
.sp-sheet thead th {
  position: sticky; top: 0; z-index: 2; height: 24px; background: var(--sp-head); color: var(--sp-muted);
  font: 600 10.5px/1 var(--font-sans); letter-spacing: .04em; text-align: center; user-select: none;
}
.sp-sheet .sp-tc-row {
  position: sticky; left: 0; z-index: 1; background: var(--sp-head); color: var(--sp-muted);
  font: 600 10.5px/1 var(--font-sans); text-align: center; font-variant-numeric: tabular-nums; user-select: none;
}
.sp-sheet thead .sp-tc-corner { left: 0; z-index: 3; }
.sp-sheet tr.is-head td:not(.sp-tc-filler) { background: color-mix(in srgb, var(--brand, #5d5cfc) 10%, var(--sp-node)); border-bottom-color: color-mix(in srgb, var(--brand, #5d5cfc) 35%, var(--sp-border)); }
.sp-sheet tbody tr:hover > td:not(.sp-tc-filler) { background: color-mix(in srgb, var(--sp-text) 4%, var(--sp-node)); }
.sp-sheet tr.is-head:hover > td:not(.sp-tc-filler) { background: color-mix(in srgb, var(--brand, #5d5cfc) 14%, var(--sp-node)); }
.sp-sheet tr:has(.sp-cell:focus) > .sp-tc-row { color: var(--brand, #5d5cfc); }
.sp-sheet .sp-tc-filler, .sp-sheet thead .sp-tc-plus { border-right: 0; border-bottom: 0; background: transparent; }
.sp-sheet thead .sp-tc-plus { background: var(--sp-head); border-bottom: 1px solid var(--sp-border); }
.sp-editor .sp-cell {
  display: block; width: 100%; height: 100%; margin: 0; padding: 0 8px; box-sizing: border-box; border: 0; outline: 0; border-radius: 0;
  background: transparent; color: var(--sp-text); font: inherit; line-height: 29px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: none;
}
#app-view .sp-editor .sp-cell, #app-view .sp-editor .sp-cell:hover { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 8px !important; border-radius: 0 !important; min-height: 0 !important; height: 100% !important; font-size: 12.5px !important; }
#app-view .sp-editor .sp-cell:focus { box-shadow: inset 0 0 0 2px var(--brand, #5d5cfc) !important; background: var(--sp-field) !important; text-overflow: clip; }
.sp-sheet tr.is-head .sp-cell { font-weight: 650; }
.sp-editor.is-readonly .sp-cell { cursor: default; }
.sp-tc-resize { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 1; }
.sp-tc-resize::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 3px; width: 2px; border-radius: 2px; background: var(--brand, #5d5cfc); opacity: 0; transition: opacity .12s ease; }
.sp-tc-resize:hover::after, .sp-node.is-col-resizing .sp-tc-resize::after { opacity: 1; }
.sp-node.is-col-resizing, .sp-node.is-col-resizing * { cursor: col-resize !important; user-select: none; }
.sp-editor .sp-tc-add, .sp-editor .sp-tc-addrow {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; margin: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--sp-muted); font: 600 11px/1 var(--font-sans); cursor: pointer; box-shadow: none;
  transition: background .12s ease, color .12s ease;
}
.sp-editor .sp-tc-add { width: 20px; height: 20px; padding: 0; }
.sp-editor .sp-tc-addrow { position: sticky; left: 4px; height: 24px; margin: 5px 4px 6px; padding: 0 10px 0 6px; }
.sp-editor .sp-tc-add svg, .sp-editor .sp-tc-addrow svg { width: 13px; height: 13px; stroke-width: 2; }
.sp-editor .sp-tc-add:hover, .sp-editor .sp-tc-addrow:hover { background: var(--sp-hover); color: var(--brand, #5d5cfc); }
.sp-editor .sp-tc-add:focus-visible, .sp-editor .sp-tc-addrow:focus-visible { outline: 2px solid rgb(93 92 252 / 45%); outline-offset: 1px; }

/* v1.73.1 — menu do botão direito rola por dentro quando não cabe na tela */
.sp-menu { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--sp-wire) transparent; }

/* v1.74.0 — envio de imagem: prévia local desfocada, brilho correndo, etapa (Otimizando → Enviando) e barra fina. */
.sp-node.is-image .sp-upload { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: var(--sp-field); isolation: isolate; }
.sp-node.is-image .sp-upload img { filter: blur(12px) saturate(.85) brightness(.82); transform: scale(1.08); transition: filter .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }
.sp-node.is-image .sp-upload[data-stage="uploading"] img { filter: blur(5px) saturate(.95) brightness(.9); transform: scale(1.03); }
.sp-upload-sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / 55%) 50%, transparent 70%) 0 0 / 260% 100% no-repeat;
  animation: sp-upload-sheen 1.8s cubic-bezier(.45, 0, .25, 1) infinite;
}
.sp-upload-pill {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 9px; border-radius: 999px;
  background: rgb(18 18 20 / 52%); border: 1px solid rgb(255 255 255 / 14%); color: #fff;
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  font: 600 11.5px/1 var(--font-sans); letter-spacing: .01em; white-space: nowrap; box-shadow: 0 6px 20px rgb(0 0 0 / 18%);
}
.sp-upload-ring { width: 12px; height: 12px; border-radius: 50%; border: 1.75px solid rgb(255 255 255 / 26%); border-top-color: #fff; animation: sp-upload-spin .8s linear infinite; }
.sp-upload-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgb(255 255 255 / 14%); overflow: hidden; }
.sp-upload-bar i { position: absolute; inset: 0 auto 0 0; width: 38%; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--brand, #5d5cfc) 30%, #b9b8ff); animation: sp-upload-bar 1.25s cubic-bezier(.65, 0, .35, 1) infinite; }
.sp-upload[data-stage="uploading"] .sp-upload-bar i { animation-duration: .9s; }
.sp-node.is-image .sp-node-box img.is-reveal { animation: sp-upload-reveal .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes sp-upload-sheen { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes sp-upload-spin { to { transform: rotate(360deg); } }
@keyframes sp-upload-bar { from { transform: translateX(-100%); } to { transform: translateX(270%); } }
@keyframes sp-upload-reveal { from { filter: blur(5px) brightness(.9); transform: scale(1.03); } to { filter: none; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .sp-upload-sheen { animation: none; opacity: 0; }
  .sp-upload-ring { animation: none; border-color: #fff; }
  .sp-upload-bar i { animation: none; width: 100%; opacity: .6; }
  .sp-node.is-image .sp-upload img { transition: none; }
  .sp-node.is-image .sp-node-box img.is-reveal { animation: none; }
}
