/* AlcureSys — CSS customizado (mínimo). Tailwind cuida de 95%. */

/* Reset mínimo pra páginas standalone (fullscreen) que não herdam do base.html */
html, body { margin: 0; padding: 0; width: 100%; }

/* Crossfade nativo nas navegações de página inteira que restarem. */
@view-transition { navigation: auto; }

/* PWA standalone e popup ?janela=1: some o chrome do sistema. */
html.modo-janela #chrome-sidebar,
html.modo-janela #chrome-topbar,
html.modo-janela #chrome-rodape,
html.modo-janela #trilha,
html.modo-janela .so-navegador { display: none !important; }
html.modo-janela main { padding: 0.75rem; }

/* Painel direito da conversa (recorte, cliente, relatório). */
#conversa-shell.painel-fechado #painel-conversa-coluna { display: none !important; }



/* Truncamento em uma linha */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =================================================================
   Editor rico (Tiptap) — partial _editor_rico.html
   Movido do `<style type="text/tailwindcss">` inline porque o Play
   CDN do Tailwind não processa @apply de forma confiável. CSS
   regular sempre funciona.
   ================================================================= */
/* .editor-topbar = abas + toolbars. No modo contraído NÃO é sticky: o
   .ProseMirror tem scroll próprio (max-height: 70vh), então a toolbar já
   fica sempre visível sem brigar com a topbar do app. No fullscreen o
   topbar inteiro vira um bloco sticky único (ver regra body.tela-cheia). */
.editor-topbar { margin-bottom: 0; }

.editor-tabs {
  display: flex; gap: 4px;
  padding: 0 0 0 4px;
}
.editor-tabs > .editor-tab {
  padding: 6px 12px; border-top-left-radius: 8px; border-top-right-radius: 8px;
  font-size: 12px; font-weight: 600; color: #6b7280;
  border: 1px solid #d1d5db; border-bottom: 0;
  background: #eef1f5; cursor: pointer;
  transition: color 120ms, background-color 120ms;
}
.editor-tabs > .editor-tab:hover { color: #1f2937; }
/* Aba ativa "merges" com o container da toolbar (mesma cor + cobre a borda) */
.editor-tabs > .editor-tab.ativo {
  background: #f9fafb; color: #1f3c66;
  position: relative; top: 1px;
  padding-bottom: 7px;
}
.editor-tabs > .editor-tab:focus { outline: none; }

.editor-toolbars {
  display: flex; flex-direction: column;
  border: 1px solid #d1d5db; border-radius: 0 8px 8px 8px;
  background: #f9fafb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.editor-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px;
  padding: 5px 8px;
}
.editor-toolbar + .editor-toolbar { border-top: 1px solid #e5e7eb; }

.editor-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 30px; padding: 0 10px;
  border-radius: 6px;
  font-size: 13px; font-weight: 500; color: #4b5563;
  background: transparent; border: 0; cursor: pointer;
  white-space: nowrap;
  transition: background-color 120ms, color 120ms;
}
.editor-highlight {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid transparent; border-radius: 6px;
}
.editor-highlight .editor-btn { border-radius: 6px 0 0 6px; }
.editor-highlight .editor-btn + .editor-btn,
.editor-highlight label.editor-btn { border-radius: 0; min-width: 22px; padding: 0 6px; }
.editor-highlight .editor-btn:last-child { border-radius: 0 6px 6px 0; }
.editor-btn:hover { background: #e5e7eb; }
.editor-btn.ativo { background: #d9e6f5; color: #1f3c66; }
.editor-btn:focus { outline: none; box-shadow: 0 0 0 2px rgba(53, 109, 180, 0.3); }

.editor-select {
  height: 30px; border-radius: 6px; border: 1px solid #d1d5db;
  font-size: 12px; color: #374151; padding: 0 8px; background: #fff;
  cursor: pointer;
}
.editor-select:focus { outline: none; border-color: #356db4; box-shadow: 0 0 0 2px rgba(53, 109, 180, 0.3); }

.editor-color {
  height: 30px; width: 34px; border-radius: 6px;
  border: 1px solid #d1d5db; background: #fff;
  padding: 2px; cursor: pointer;
}

.editor-sep { width: 1px; height: 22px; background: #d1d5db; margin: 0 4px; flex-shrink: 0; }

/* Ícones SVG dos botões da toolbar */
.editor-ico { width: 15px; height: 15px; display: block; }
.editor-btn-ico { min-width: 30px; padding: 0 7px; }

.editor-area { min-height: 380px; display: flex; flex-direction: column; }
.editor-canvas {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(380px, auto);
  min-height: 380px;
}
.editor-canvas > .editor-area,
.editor-canvas > textarea {
  grid-area: 1 / 1;
}
/* O textarea cru (aba "Código HTML" / fallback sem JS) some via [hidden] —
   o !important vence classes de form (.input) com display: block. */
[data-editor-config-url] textarea[hidden] { display: none !important; }
[data-editor-config-url] .editor-canvas > textarea {
  min-height: 380px;
  max-height: 70vh;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-top: 0;
  border-radius: 0;
  background: #fff;
  padding: 16px 20px;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #111827;
  resize: vertical;
  box-shadow: none;
  z-index: 1;
}
[data-editor-config-url][data-modo="codigo"] .editor-toolbars {
  display: none !important;
}
[data-editor-config-url][data-modo="codigo"] .editor-area .ProseMirror {
  display: none !important;
}
.editor-area .ProseMirror {
  min-height: 380px; max-height: 70vh; overflow-y: auto;
  border: 1px solid #d1d5db; border-top: 0;
  background: #fff; padding: 24px 32px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px; line-height: 1.15; color: #111827;
  outline: none; flex: 1 1 auto;
}
.editor-area .ProseMirror p,
.editor-area .ProseMirror h1,
.editor-area .ProseMirror h2,
.editor-area .ProseMirror h3,
.editor-area .ProseMirror h4,
.editor-area .ProseMirror h5 {
  margin-top: 0;
  margin-bottom: 0;
  display: flow-root;
}
.editor-area .ProseMirror ul { list-style: disc; padding-left: 24px; margin: 0; }
.editor-area .ProseMirror ol { list-style: decimal; padding-left: 24px; margin: 0; }
.editor-area .ProseMirror blockquote { border-left: 4px solid #d1d5db; padding-left: 16px; font-style: italic; margin: 0; }
.editor-area .ProseMirror h2 { font-size: 1.125rem; font-weight: 700; }
.editor-area .ProseMirror h3 { font-size: 1rem; font-weight: 700; }
.editor-area .ProseMirror hr { margin: 16px 0; border-color: #d1d5db; }
.editor-area .ProseMirror table { border-collapse: collapse; width: 100%; margin-bottom: 12px; }
.editor-area .ProseMirror td, .editor-area .ProseMirror th {
  border: 1px solid #9ca3af; padding: 4px 8px; vertical-align: top; min-width: 32px;
}
.editor-area .ProseMirror th { background: #f3f4f6; font-weight: 600; }
.editor-area .ProseMirror .selectedCell { background: #eef4fb; }

/* Menu "⋯" (details nativo) — dropdown com opções menos usadas */
.editor-menu { position: relative; }
.editor-menu[open] > summary { background: #e5e7eb; }
.editor-menu-body {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 50;
  min-width: 190px; border-radius: 8px;
  border: 1px solid #e5e7eb; background: #fff;
  box-shadow: 0 8px 24px -6px rgba(16, 24, 40, 0.16);
  padding: 4px; display: flex; flex-direction: column;
}
.editor-menu-body .editor-btn { justify-content: flex-start; width: 100%; height: 30px; padding: 0 8px; font-weight: 400; font-size: 12.5px; }
.editor-menu-sep { height: 1px; background: #e5e7eb; margin: 4px 6px; }

/* Diálogo de parágrafo — popover fixed ancorado no ícone (como o picker de tabela) */
.editor-paragrafo-dialog {
  position: fixed; z-index: 400;
  width: 268px; max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px); overflow: auto;
  padding: 12px 14px 10px;
  border-radius: 8px; border: 1px solid #e5e7eb; background: #fff;
  box-shadow: 0 12px 32px -8px rgba(16, 24, 40, 0.22);
  display: none; flex-direction: column; gap: 8px;
}
.editor-paragrafo-dialog:not(.aberto) { display: none !important; }
.editor-paragrafo-dialog.aberto { display: flex; }
.editor-paragrafo-titulo {
  font-size: 12px; font-weight: 700; color: #1f3c66;
  letter-spacing: .02em; text-transform: uppercase;
}
.editor-paragrafo-linha {
  display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 8px;
  font-size: 12px; color: #374151;
}
.editor-paragrafo-linha .editor-select { width: 100%; }
.editor-paragrafo-hint {
  margin: 2px 0 0; font-size: 11px; color: #6b7280; line-height: 1.35;
}

/* details > summary nativo (sem markers do Chrome) */
.editor-toolbar details { position: relative; }
.editor-toolbar details > summary { list-style: none; cursor: pointer; }
.editor-toolbar details > summary::-webkit-details-marker { display: none; }
.editor-toolbar details > summary::marker { display: none; content: ''; }
.editor-toolbar details > summary > * { display: inline-block; vertical-align: middle; }

/* Grupo de botões contextuais de tabela (visível só quando o cursor está numa tabela).
   Usa display: inline-flex em vez de attribute hidden (que tem prioridade
   menor que style="display:..." inline). O JS toggle via .hidden = true/false. */
.editor-table-tools {
  display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap;
}
.editor-table-tools[hidden] { display: none; }

/* Imagens inseridas no editor */
.editor-area .ProseMirror .editor-img {
  max-width: 100%; height: auto;
  border-radius: 6px; border: 1px solid #e5e7eb;
}
.editor-area .ProseMirror img.ProseMirror-selected,
.editor-area .ProseMirror .editor-img.ProseMirror-selected {
  outline: 2px solid #356db4; outline-offset: 2px;
}

/* Links no editor */
.editor-area .ProseMirror a { color: #265697; text-decoration: underline; }
.editor-area .ProseMirror a:hover { color: #1f3c66; }

/* Placeholders do catálogo: só visual (decoration). O HTML continua texto. */
.editor-area .ProseMirror .editor-token {
  background: #e8f0fa;
  color: #1f3c66;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #c5d7ee;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  cursor: pointer;
}
.editor-area .ProseMirror .editor-token-ativo {
  background: #c5daf3;
  box-shadow: inset 0 0 0 1.5px #356db4;
}

/* Code inline e code block */
.editor-area .ProseMirror code {
  background: #f3f4f6; padding: 1px 5px; border-radius: 3px;
  font-family: 'Courier New', ui-monospace, monospace; font-size: 0.92em;
}
.editor-area .ProseMirror pre {
  background: #0f172a; color: #f1f5f9;
  padding: 14px 18px; border-radius: 8px;
  font-family: 'Courier New', ui-monospace, monospace; font-size: 13px;
  line-height: 1.5; overflow-x: auto;
}
.editor-area .ProseMirror pre code { background: transparent; padding: 0; color: inherit; }

/* Task list (lista de tarefas com checkbox) */
.editor-area .ProseMirror ul[data-type="taskList"] {
  list-style: none; padding-left: 0; margin-bottom: 12px;
}
.editor-area .ProseMirror ul[data-type="taskList"] li {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px;
}
.editor-area .ProseMirror ul[data-type="taskList"] li > label {
  margin-top: 3px; flex-shrink: 0;
}
.editor-area .ProseMirror ul[data-type="taskList"] li > div { flex: 1; min-width: 0; }
.editor-area .ProseMirror ul[data-type="taskList"] input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: #265697;
}
.editor-area .ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div {
  text-decoration: line-through; color: #6b7280;
}

/* Headings 1, 4, 5 (só 2 e 3 estavam antes) */
.editor-area .ProseMirror h1 {
  font-size: 1.5rem; font-weight: 700; margin: 16px 0 12px 0;
  border-bottom: 2px solid #1f3c66; padding-bottom: 6px;
}
.editor-area .ProseMirror h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; color: #1f3c66; }
.editor-area .ProseMirror h5 { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: #4b5563; text-transform: uppercase; letter-spacing: 0.05em; }

/* Sup/Sub */
.editor-area .ProseMirror sup, .editor-area .ProseMirror sub { font-size: 0.75em; line-height: 0; }

/* Zoom: usa a propriedade CSS `zoom` (definida inline pelo JS), que reflui
   o layout — sem transform: scale (que quebrava overflow, sticky e a
   seleção de texto). */
.editor-area .ProseMirror { min-height: 380px; }

/* =================================================================
   Configurador de página (modelo_form_fullscreen.html)
   ================================================================= */
.fs-page-panel {
  border-left: 1px solid #e5e7eb;
  background: #fff;
  display: flex; flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}
.fs-page-panel-header {
  padding: 12px 16px; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.fs-page-panel-header h2 { font-size: 13px; font-weight: 600; color: #111827; }
.fs-page-panel-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.fs-page-panel-body section { margin-bottom: 18px; }
.fs-page-panel-body section > h3 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: #6b7280; margin: 0 0 8px 0;
}
.fs-page-panel-body label {
  display: block; font-size: 12px; color: #374151; margin-bottom: 4px;
}
.fs-page-panel-body select,
.fs-page-panel-body input[type="text"],
.fs-page-panel-body input[type="number"] {
  width: 100%; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 13px; background: #fff;
}
.fs-page-panel-body input[type="color"] {
  width: 100%; height: 32px; border: 1px solid #d1d5db; border-radius: 6px;
  padding: 2px; cursor: pointer; background: #fff;
}
.fs-page-panel-body .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fs-page-panel-body .row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
.fs-page-panel-body .help { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.fs-page-panel-body input[type="range"] { width: 100%; }

/* Painéis laterais do fullscreen (Variáveis / Página / Identificação)
   compartilham .fs-aside mas cada um tem largura diferente via grid-template. */
.fs-aside-variaveis { /* largura padrão 360px, controlada por .no-variaveis */ }
.fs-aside-page { /* 280px quando .com-pagina */ }
.fs-aside-id { /* 240px quando .com-id */ }
.fs-aside-oficio { border-left: 0; border-right: 1px solid #e5e7eb; min-width: 0; }
.oficio-form-layout { display: flex; gap: 16px; align-items: flex-start; }
.oficio-form-layout .oficio-dados-panel {
  width: 260px;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  min-height: 16rem;
  max-height: calc(100vh - 8rem);
  position: sticky;
  top: 1rem;
}
@media (max-width: 767px) {
  .oficio-form-layout { flex-direction: column; }
  .oficio-form-layout .oficio-dados-panel {
    position: static;
    width: 100%;
    max-height: none;
  }
}
.oficio-dados-panel[hidden] { display: none !important; }
.fs-aside-body {
  flex: 1; overflow-y: auto; padding: 12px 16px;
}
.fs-aside-body section { margin-bottom: 18px; }
.fs-aside-body section > h3 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: #6b7280; margin: 0 0 8px 0;
}
.fs-aside-body label {
  display: block; font-size: 12px; color: #374151; margin-bottom: 4px;
}
.fs-aside-body select,
.fs-aside-body input[type="text"],
.fs-aside-body input[type="number"] {
  width: 100%; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 13px; background: #fff;
}
.fs-aside-body input[type="color"] {
  width: 100%; height: 32px; border: 1px solid #d1d5db; border-radius: 6px;
  padding: 2px; cursor: pointer; background: #fff;
}
.fs-aside-body .row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
.fs-aside-body .help { font-size: 11px; color: #9ca3af; margin-top: 4px; }

/* A4, A5, Carta, Ofício — tamanhos em mm. Ajustados ao aspect ratio do
   container, mantendo proporção real. */
.fs-page-preview {
  position: relative;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  background-size: 8px 8px;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  transition: width 200ms, height 200ms, padding 200ms, background-color 200ms;
}

/* =================================================================
   Página dentro do editor fullscreen (papel real visualizado)
   ================================================================= */
.fs-paper {
  background: #fff;
  margin: 24px auto;
  box-shadow: inset 0 0 0 1px #d1d5db, 0 4px 16px rgba(0,0,0,0.08);
  border: 0;
  position: relative;
  overflow: hidden;
  transition: width 200ms ease, min-height 200ms ease, padding 200ms ease, background-color 200ms ease;
}
.fs-paper .ProseMirror {
  border: 0; padding: 0; min-height: 0; max-height: none;
  background: transparent;
}
.fs-paper-watermark {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; user-select: none;
  font-size: 96px; font-weight: 800; letter-spacing: 0.05em;
  color: #000;
  transform: rotate(-30deg);
  z-index: 0;
}
.fs-paper-watermark img {
  width: 50%; max-width: 400px; opacity: 0.15;
  transform: rotate(-30deg);
}
.fs-paper .ProseMirror { position: relative; z-index: 1; }
.fs-paper-watermark-text { z-index: 0; }

/* Quando o formulário fullscreen NÃO usa a "página" (modo contínuo), o
   .fs-paper pode ser escondido — basta remover a classe do .fs-form. */
.fs-form.papel-continuo .fs-paper { display: none; }

/* =================================================================
   Editor fullscreen — modelo_form_fullscreen.html
   Grid com 4 colunas: form | variáveis | página | identificação.
   Cada painel é toggable. O JS (setPanel) aplica grid-template-columns
   via inline style pra evitar conflito de especificidade com o Tailwind
   via Play CDN. Aqui só definimos o fallback inicial.
   IMPORTANTE: cada <aside> tem grid-column: N explícito no HTML,
   senão um display:none num painel intermediário faz o próximo
   "escorregar" pra coluna errada.
   ================================================================= */
.fs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px 0px 0px;  /* form | variaveis | page | id */
  height: 100dvh;
  width: 100%;
  background: #f8fafc;
}
.fs-grid-doc {
  grid-template-columns: 0px minmax(0, 1fr) 360px 0px;  /* dados | editor | ferramentas | página */
}
.workspace-layout { display: grid; align-items: start; gap: 1.5rem; }
.workspace-panel-bar { display: none; }
.workspace-scrim {
  position: fixed; inset: 0; z-index: 190;
  border: 0; padding: 0; background: rgb(20 35 57 / 0.45);
}
.workspace-scrim[hidden] { display: none; }
[data-workspace-mode="mobile"] [data-workspace-panel] {
  position: fixed; inset: 0 0 0 auto; z-index: 200;
  width: min(24rem, 100vw); max-width: 100%; height: 100dvh;
  background: #fff; border-left: 1px solid #dce3ec;
  box-shadow: -12px 0 32px rgb(20 35 57 / 0.15);
  display: flex; flex-direction: column; overflow: auto;
}
[data-workspace-mode="mobile"] [data-workspace-panel][hidden] { display: none !important; }
[data-workspace-mode="mobile"] .workspace-panel-bar {
  position: sticky; top: 0; z-index: 2; display: flex; flex-shrink: 0;
  align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem; background: #fff; border-bottom: 1px solid #dce3ec;
  font-size: 0.875rem; color: #172b45;
}
.fs-toggle-sidebar[aria-expanded="true"] { background: #eef4fb; border-color: #b7cfec; color: #21457b; }
@media (max-width: 1023px) {
  .fs-grid, .fs-grid-doc { grid-template-columns: minmax(0, 1fr) !important; }
  .fs-main { grid-column: 1 !important; }
  .fs-grid > .fs-aside:not([data-workspace-panel]) { display: none; }
  body.tela-cheia .fs-header { flex-wrap: wrap; gap: 0.375rem; padding: 0.625rem 0.75rem; }
  body.tela-cheia .fs-header h1.fs-titulo { flex: 1 0 100%; order: -1; flex-wrap: wrap; gap: .125rem; }
  body.tela-cheia .fs-header h1.fs-titulo > .fs-titulo-texto { flex: 1 1 calc(100% - 2rem); max-width: calc(100% - 2rem); }
  body.tela-cheia .fs-header h1.fs-titulo > .fs-titulo-meta { flex: 1 0 100%; max-width: 100%; white-space: normal; line-height: 1.4; }
  body.tela-cheia .fs-toggle-sidebar { min-height: 2.25rem; padding: 0.375rem 0.5rem; font-size: 0.75rem; }
  body.tela-cheia .fs-grid .fs-form { padding: 0 0.75rem 1rem; }
  .fs-paper { max-width: 100%; }
  .fs-form-footer { flex-wrap: wrap; gap: 0.75rem; }
}
.fs-aside[hidden],
#dados-doc-panel[hidden] {
  display: none !important;
}
.confirm-popover {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
  overflow: auto;
  z-index: 100;
}
.confirm-popover:not(:popover-open) {
  display: none !important;
}
.confirm-popover:popover-open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-popover[data-fallback-open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-popover::backdrop { background: rgb(0 0 0 / 0.4); }
.confirm-popover-card { position: relative; z-index: 1; }


.fs-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: var(--ui-text); background: var(--ui-surface);
  border-bottom: 1px solid var(--ui-border);
  flex-shrink: 0; min-width: 0;
  position: sticky; top: 0; z-index: 50;
}
.fs-header h1 { font-size: 15px; font-weight: 600; color: var(--ui-text); }
.fs-header h1.fs-titulo {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px;
  overflow: hidden; white-space: nowrap;
}
.fs-header h1.fs-titulo > .fs-titulo-texto {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.fs-header h1.fs-titulo > .fs-titulo-meta {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  font-weight: 400; color: var(--ui-muted); white-space: nowrap;
}
.fs-header-doc { flex-wrap: nowrap; min-height: 62px; }
.fs-header-ident { flex: 1 1 auto; min-width: 0; }
.fs-header-doc .fs-header-ident h1.fs-titulo { margin: 0; width: 100%; flex-wrap: nowrap; }
.fs-header-doc .fs-titulo-meta { margin: 2px 0 0; font-size: 11px; line-height: 1.4; color: var(--ui-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-header-menu { display: flex; align-items: center; flex: 0 0 auto; gap: 6px; }
.fs-header-menu-btn { display: none; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-control); color: var(--ui-text); background: var(--ui-surface); cursor: pointer; }
.fs-header-menu-btn:hover { background: var(--ui-surface-muted); }
.fs-header-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fs-header.fs-header-doc .fs-toggle-sidebar { min-height: 36px; border-color: var(--ui-border); color: var(--ui-text); background: var(--ui-surface); }
.fs-header.fs-header-doc .fs-toggle-sidebar:hover { color: var(--ui-action); background: var(--ui-surface-muted); }
.fs-header.fs-header-doc .fs-toggle-sidebar[aria-expanded="true"] { color: var(--ui-action); background: var(--ui-tint); border-color: var(--ui-border); }
.fs-header-doc .titulo-edit-btn { flex: 0 0 28px; width: 28px; height: 28px; color: var(--ui-muted); }
.fs-header-doc .titulo-edit-input { flex: 1 1 auto; min-width: 0; width: 100%; max-width: none; color: var(--ui-text); background: var(--ui-surface); }
.fs-header-doc :is(a, button, input):focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.fs-header-normal { position: relative; top: auto; z-index: 42; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-card); padding: 10px 12px; }
.fs-header-normal .fs-header-menu-btn { display: inline-flex; }
.fs-header-normal .fs-header-menu { display: none; position: absolute; top: calc(100% + 6px); right: 0; width: min(20rem, calc(100vw - 24px)); padding: 8px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-card); background: var(--ui-surface); box-shadow: var(--ui-shadow-card); }
.fs-header-normal .fs-header-menu.is-open { display: flex; flex-direction: column; align-items: stretch; }
.fs-header-normal .fs-header-menu :is(a, button) { justify-content: flex-start; min-height: 40px; }
@media (max-width: 640px) {
  .fs-header-doc, body.tela-cheia .fs-header.fs-header-doc { flex-wrap: nowrap; gap: 6px; padding: 8px 12px; min-height: 56px; }
  body.tela-cheia .fs-header-doc h1.fs-titulo { flex: 1 1 auto; order: 0; flex-wrap: nowrap; }
  body.tela-cheia .fs-header-doc h1.fs-titulo > .fs-titulo-texto { flex: 1 1 auto; max-width: none; }
  .fs-header-doc .fs-titulo-meta { display: none; }
  .fs-header-doc > .btn-voltar-protocolo { width: 40px; min-width: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .fs-header-doc > .btn-voltar-protocolo .fs-header-texto { display: none; }
  .fs-header-doc .titulo-edit-btn { flex-basis: 40px; width: 40px; height: 40px; opacity: 1; }
  .fs-header-doc .fs-header-menu-btn { display: inline-flex; }
  .fs-header-doc .fs-header-menu { display: none; position: absolute; top: calc(100% + 4px); right: 8px; width: min(20rem, calc(100vw - 16px)); max-height: calc(100dvh - 80px); overflow-y: auto; padding: 8px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-card); background: var(--ui-surface); box-shadow: var(--ui-shadow-card); }
  .fs-header-doc .fs-header-menu.is-open { display: flex; flex-direction: column; align-items: stretch; }
  .fs-header.fs-header-doc .fs-header-menu :is(a, button) { min-height: 40px; justify-content: flex-start; }
}

/* Coluna principal do fullscreen (editor + rodapé do form). */
.fs-main { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* Rodapé do form fullscreen: Cancelar à esquerda, Salvar à direita. */
.fs-form-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid #e5e7eb; padding-top: 16px;
}

/* Botão "×" que fecha um painel lateral do fullscreen. */
.fs-panel-close {
  background: transparent; border: 0; cursor: pointer;
  color: #6b7280; font-size: 18px; line-height: 1; padding: 4px 8px;
}
.fs-panel-close:hover { color: #111827; }

/* Falha ao carregar o editor rico — o JS monta este bloco no .editor-area. */
.editor-falha {
  color: #991b1b; padding: 16px; font-size: 12px; font-family: monospace;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px;
  white-space: pre-wrap; margin: 16px;
}
.fs-header .btn-back {
  font-size: 13px; color: #6b7280; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.fs-header .btn-back:hover { color: #265697; }

/* Navegação do editor é neutra; nenhum destes links é destrutivo. */
.fs-header :is(.btn-sair-tela-cheia, .btn-voltar-protocolo) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 6px 10px; border-radius: var(--ui-radius-control);
  font-size: 12px; font-weight: 500; color: var(--ui-text);
  background: var(--ui-surface); border: 1px solid var(--ui-border);
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.fs-header :is(.btn-sair-tela-cheia, .btn-voltar-protocolo):hover {
  background: var(--ui-surface-muted); color: var(--ui-action);
}
.fs-header.fs-header-doc > .btn-voltar-protocolo { min-height: 40px; }

/* Edição inline do título do documento (lápis + input) — usado no editor
   fullscreen e no editor normal. Afordância discreta. */
.titulo-edit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px; border: 0; background: transparent;
  color: var(--ui-muted); cursor: pointer; border-radius: 4px;
  flex-shrink: 0; opacity: 0; transition: opacity 120ms, color 120ms, background-color 120ms;
}
h1:hover > .titulo-edit-btn,
.card:hover .titulo-edit-btn,
.titulo-edit-btn:focus-visible { opacity: 1; }
.titulo-edit-btn:hover { color: var(--ui-action); background: var(--ui-tint); }
.titulo-edit-input {
  font: inherit; color: var(--ui-text); background: var(--ui-surface);
  padding: 2px 6px; border: 1px solid var(--ui-focus); border-radius: var(--ui-radius-control);
  box-shadow: 0 0 0 2px var(--ui-tint);
  outline: none; min-width: 0; max-width: 100%; width: 22ch;
}

.fs-toggle-sidebar {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 6px;
  font-size: 13px; color: #4b5563; font-weight: 500;
  background: transparent; border: 1px solid transparent;
  cursor: pointer; transition: background-color 120ms, border-color 120ms;
  white-space: nowrap; flex-shrink: 0;
}
.fs-toggle-sidebar:hover { background: #f3f4f6; border-color: #e5e7eb; color: #265697; }

.fs-form {
  flex: 1; overflow-y: auto;
  /* Sem padding-top em fullscreen: as toolbars são sticky no topo do scroll
     e ocupam esse espaço. Adiciona padding-top só quando NÃO tem toolbar
     sticky (modo normal). */
  padding: 24px 32px;
  background: #f8fafc;
  min-width: 0;
}
body.tela-cheia .fs-form {
  padding: 0 32px 24px 32px;  /* sem top — ocupado pelas toolbars sticky */
}
/* Fullscreen: o topbar (abas + toolbar) é movido pelo JS pra dentro do form,
   como irmão do .fs-paper, e vira UM bloco sticky único no topo do scroll —
   sem offsets mágicos por fileira. */
body.tela-cheia .fs-form > .editor-topbar {
  position: sticky; top: 0; z-index: 41;
  background: #f8fafc;
  padding-top: 10px; padding-bottom: 6px;
}

.fs-aside {
  border-left: 1px solid #e5e7eb;
  background: #fff;
  display: flex; flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.fs-aside [data-ferramenta-panel] {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fs-aside [data-ferramenta-panel][hidden] { display: none; }
.fs-aside [data-ferramenta-tab][aria-selected="true"] {
  background-color: var(--ui-action);
  border-color: var(--ui-action);
  color: var(--ui-on-action);
}
.fs-aside-header {
  padding: 16px; border-bottom: 1px solid #e5e7eb;
}
.fs-aside-header h2 { font-size: 14px; font-weight: 600; color: #111827; }
.fs-aside-header .hint { font-size: 12px; color: #6b7280; margin-top: 2px; }
.fs-aside-search { margin-top: 12px; position: relative; }
.fs-aside-search input {
  width: 100%; padding: 8px 12px 8px 32px;
  border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 13px; background: #fff;
}
.fs-aside-search input:focus { outline: none; border-color: #356db4; box-shadow: 0 0 0 2px rgba(53, 109, 180, 0.3); }
.fs-aside-search svg {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: #9ca3af; pointer-events: none;
}
.fs-aside-list { flex: 1; overflow-y: auto; padding: 12px; }
.fs-aside-list > section { margin-bottom: 16px; }
.fs-aside-list > section > h3 {
  padding: 4px 8px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280;
  margin: 0 0 6px 0;
}
.fs-aside-list .var-group { display: flex; flex-direction: column; gap: 6px; }

/* Card de variável (drag & drop) */
.var-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 10px; cursor: grab;
  transition: background-color 120ms, box-shadow 120ms, border-color 120ms;
}
.var-card:hover { border-color: #b7cfec; box-shadow: 0 2px 8px -2px rgba(16, 24, 40, 0.08); }
.var-card.dragging { opacity: 0.5; cursor: grabbing; }
.var-card.drag-over { background-color: #eef4fb; border-color: #356db4; }

/* Botão "×" de remover parte/imóvel no card — discreto, aparece no hover */
.var-card { position: relative; }
.card-remove-form { position: absolute; top: 4px; right: 4px; margin: 0; line-height: 0; }
.card-remove {
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px;
  background: transparent; color: #9ca3af; cursor: pointer;
  font-size: 16px; line-height: 18px; text-align: center;
  opacity: 0; transition: opacity 120ms, background-color 120ms, color 120ms;
}
.var-card:hover .card-remove, .card-remove:focus-visible { opacity: 1; }
.card-remove:hover { background: #fee2e2; color: #b91c1c; }

/* Formulários "Adicionar parte / Vincular imóvel" dentro do painel (360px) */
.painel-add { margin-top: 8px; }
.painel-add > summary {
  list-style: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: #265697;
  padding: 6px 8px; border-radius: 6px; border: 1px dashed #cbd5e1;
  text-align: center; transition: background-color 120ms, border-color 120ms;
}
.painel-add > summary::-webkit-details-marker { display: none; }
.painel-add > summary:hover { background: #eef4fb; border-color: #93b4dd; }
.painel-add[open] > summary { border-style: solid; margin-bottom: 8px; }
.painel-add-form { display: flex; flex-direction: column; gap: 6px; }
.painel-busca { position: relative; }
.painel-add-form .painel-input {
  width: 100%; padding: 6px 8px; font-size: 12px;
  border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #1f2937;
}
.painel-add-form .painel-input:focus { outline: none; border-color: #356db4; box-shadow: 0 0 0 2px rgba(53, 109, 180, 0.25); }
.painel-resultados { position: absolute; left: 0; right: 0; z-index: 30; }
.painel-selecionado { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.painel-selecionado button { font-size: 11px; color: #b91c1c; background: none; border: 0; cursor: pointer; }
.painel-selecionado button:hover { text-decoration: underline; }
.painel-add-btn {
  padding: 6px 10px; border-radius: 6px; border: 0; cursor: pointer;
  font-size: 12px; font-weight: 600; color: #fff; background: #265697;
  transition: background-color 120ms;
}
.painel-add-btn:hover { background: #1f3c66; }
.painel-add-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.painel-linha { display: flex; gap: 6px; }
.painel-linha .painel-input { flex: 1; min-width: 0; }
.painel-uf { flex: 0 0 78px !important; }
.var-card .var-label { font-size: 12px; font-weight: 600; color: #1f2937; line-height: 1.3; }
.var-card .var-token { font-size: 10.5px; color: #265697; font-family: ui-monospace, SFMono-Regular, monospace; word-break: break-all; display: block; margin-top: 2px; }
.var-card .var-desc { font-size: 11px; color: #6b7280; line-height: 1.4; margin-top: 4px; }
.var-card .var-exemplo { font-size: 10.5px; color: #9ca3af; font-style: italic; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.var-card .var-inserir {
  font-size: 10.5px; font-weight: 600; color: #265697;
  padding: 2px 8px; border-radius: 4px; cursor: pointer;
  transition: background-color 120ms, color 120ms;
  background: transparent; border: 0;
}
.var-card .var-inserir:hover { background: #eef4fb; color: #1f3c66; }
.var-card .var-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.var-card .var-preview {
  display: none;
  position: absolute;
  left: 8px; right: 8px; top: calc(100% - 4px);
  z-index: 20;
  max-height: 9rem;
  overflow: auto;
  padding: 8px 10px;
  background: #111827;
  color: #f9fafb;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.55);
  white-space: pre-wrap;
  word-break: break-word;
}
.var-card:hover .var-preview,
.var-card:focus-within .var-preview { display: block; }
.var-card .var-preview-vazio { color: #9ca3af; font-style: italic; }
.var-card .var-row > div { min-width: 0; flex: 1; }

/* Indicador de auto-salvamento (editor) */
.autosave-status { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 28px; box-sizing: border-box; padding: 4px 8px; border: 1px solid var(--ui-border); border-radius: 999px; font-size: 11px; font-weight: 500; color: var(--ui-muted); background: var(--ui-surface-muted); white-space: nowrap; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; }
.autosave-status:empty { visibility: hidden; }
.autosave-status[data-state="saved"] { color: var(--ui-success-text); background: var(--ui-success-surface); }
.autosave-status:is([data-state="saving"], [data-state="pending"]) { color: var(--ui-warning-text); background: var(--ui-warning-surface); }
.autosave-status:is([data-state="error"], [data-state="offline"], [data-state="conflict"]) { color: var(--ui-error-text); background: var(--ui-error-surface); }
.autosave-status[data-state="paused"] { color: var(--ui-action); background: var(--ui-tint); }
@media (max-width: 640px) { .fs-header-doc .autosave-status { max-width: 96px; } }

/* =================================================================
   Multi-colunas de texto (CSS columns) — botão "Colunas" na toolbar
   ================================================================= */
.editor-area .ProseMirror .multi-col {
  column-count: 2; column-gap: 24px; column-rule: 1px solid #e5e7eb;
  padding: 8px 12px; border: 1px dashed #d1d5db; border-radius: 4px;
  background: #fafbfc; margin: 8px 0;
}
.editor-area .ProseMirror .multi-col[data-cols="3"] { column-count: 3; }
.editor-area .ProseMirror .multi-col[data-cols="4"] { column-count: 4; }

/* =================================================================
   Picker de tamanho de tabela (grid 8x8) — aparece ao clicar no botão
   Tabela. position: fixed (coordenadas de viewport via JS) pra funcionar
   dentro de qualquer container rolável (form fullscreen, cards, etc).
   ================================================================= */
.editor-table-picker {
  position: fixed; z-index: 60;
  background: #fff; border: 1px solid #d1d5db; border-radius: 8px;
  box-shadow: 0 12px 32px -8px rgba(16, 24, 40, 0.22);
  padding: 14px;
  display: none;
}
.editor-table-picker.aberto { display: block; }
.editor-table-picker .picker-grid {
  display: grid; grid-template-columns: repeat(8, 22px); grid-template-rows: repeat(8, 22px);
  gap: 3px;
  padding: 3px;
  background: #f3f4f6; border-radius: 4px;
}
.editor-table-picker .picker-cell {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 2px;
  cursor: pointer; transition: background-color 80ms, border-color 80ms;
}
.editor-table-picker .picker-cell.ativo {
  background: #265697; border-color: #1f3c66;
  box-shadow: inset 0 0 0 1px #1f3c66;
}
.editor-table-picker .picker-cell:hover { border-color: #356db4; }
.editor-table-picker .picker-cell.ativo:hover { border-color: #1f3c66; }
.editor-table-picker .picker-info {
  margin-top: 10px; font-size: 12px; color: #4b5563; text-align: center; min-height: 18px; font-weight: 500;
}
.editor-table-picker .picker-hint {
  font-size: 10.5px; color: #9ca3af; text-align: center; margin-top: 2px;
}


/* Estado do card expansível sem depender de variantes geradas pelo Tailwind. */
.modelos-details > summary::-webkit-details-marker { display: none; }
.modelos-details .modelos-recolher { display: none; }
.modelos-details[open] .modelos-expandir { display: none; }
.modelos-details[open] .modelos-recolher { display: inline; }
.modelos-details[open] .modelos-chevron { transform: rotate(180deg); }

/* Cards compactos de modelo e prévia em formato de documento. */
.modelo-page-icon {
  width: 34px;
  height: 46px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 7px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
  cursor: zoom-in;
}
.modelo-page-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #dbe3ee;
}
.modelo-page-icon span:nth-child(2) { width: 78%; }
.modelo-page-icon span:nth-child(4) { width: 62%; }
.modelo-card:hover .modelo-page-icon,
.modelo-card:focus-within .modelo-page-icon {
  border-color: #356db4;
  box-shadow: 0 3px 8px rgba(38, 86, 151, 0.16);
}
.modelo-preview-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 50%;
  width: min(360px, calc(100vw - 2rem));
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 50px -16px rgba(15, 23, 42, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -5px);
  transition: opacity 120ms ease, transform 120ms ease;
}
.modelo-card:hover .modelo-preview-popover,
.modelo-card:focus-within .modelo-preview-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.modelo-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
}
.modelo-preview-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 999px;
  background: #265697;
  box-shadow: 14px 0 #d5a94e, 28px 0 #94a3b8;
  margin-right: 28px;
}
.modelo-preview-canvas {
  display: flex;
  justify-content: center;
  max-height: 470px;
  overflow: hidden;
  padding: 16px;
  background: #e9edf3;
}
.modelo-thumb {
  position: relative;
  width: 286px;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
}
.modelo-thumb-inner {
  width: 794px;
  padding: 48px 40px;
  color: #111827;
  font-size: 12pt;
  line-height: 1.5;
  pointer-events: none;
  user-select: none;
  transform: scale(0.36);
  transform-origin: top left;
}
.modelo-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 83%, rgba(255, 255, 255, 0.96));
  pointer-events: none;
}

/* =========================================================================
   Anexos do protocolo — estados de arrastar-e-soltar
   =========================================================================
   CSS de verdade (e não classe utilitária no template) porque quem liga e
   desliga estas classes é o JS de `_anexos_js.html`, a cada dragover: o
   estado é de interação, não de renderização.
   ------------------------------------------------------------------------ */
#anexos-raiz.solta-aqui {
  outline: 2px dashed #7c3aed;
  outline-offset: 4px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.03);
}
.anexo-item {
  cursor: grab;
}
.anexo-item.arrastando {
  opacity: 0.45;
}
.anexo-pasta.solta-aqui {
  border-color: #7c3aed;
  box-shadow: inset 0 0 0 1px #7c3aed;
  background: rgba(124, 58, 237, 0.06);
}
[data-anexos-lixeira].solta-aqui {
  border-color: #b91c1c;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
}
[data-anexos-lixeira].solta-aqui svg,
[data-anexos-lixeira].solta-aqui p {
  color: #b91c1c;
}

#compositor.solta-aqui {
  outline: 2px dashed #356db4;
  outline-offset: 2px;
}

[data-lead-card] {
  cursor: grab;
  transition: box-shadow 160ms ease, opacity 160ms ease;
}
[data-lead-card] a,
[data-lead-card] button {
  cursor: pointer;
}
[data-lead-card]:hover {
  box-shadow: 0 10px 24px -12px rgb(16 24 40 / 0.28);
}
[data-lead-card]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(38 86 151 / 0.08), transparent 46%);
  opacity: 0;
  transition: opacity 160ms ease;
}
[data-lead-card]:hover::after,
[data-lead-card]:focus-within::after {
  opacity: 1;
}
[data-lead-card].is-arrastando {
  opacity: 0.4;
  cursor: grabbing;
}
[data-lead-card].is-arrastando::after {
  opacity: 0;
}
[data-lead-placeholder] {
  height: 0.4rem;
  border-radius: 999px;
  background: var(--ui-action, #356db4);
  opacity: 0.45;
}
[data-lead-card] .lead-seta {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--ui-border, #d1d5db);
  border-radius: 999px;
  background: var(--ui-surface, #fff);
  color: var(--ui-action, #265697);
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: 0 1px 4px rgb(16 24 40 / 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 120ms ease;
}
[data-lead-card]:hover .lead-seta,
[data-lead-card]:focus-within .lead-seta {
  opacity: 1;
  pointer-events: auto;
}
[data-lead-card] .lead-seta[hidden] {
  display: none !important;
}
[data-lead-card] .lead-seta-esq { left: 0.35rem; }
[data-lead-card] .lead-seta-dir { right: 0.35rem; }
[data-lead-card] .lead-seta:hover {
  background: var(--ui-tint, #eef4fb);
  border-color: var(--ui-action, #265697);
}

/* O indicador nasce oculto no HTML; só o arraste de arquivos o revela. */
#conversa-chatbox { position: relative; }
#conversa-solta[hidden] { display: none !important; }
#conversa-solta {
  position: absolute;
  inset: 6px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 1px dashed var(--ui-action, #356db4);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ui-surface, #fff) 88%, transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}
#conversa-solta.is-on {
  opacity: 1;
}
.conversa-solta-simbolo {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 10px 14px;
  border: 1px solid var(--ui-border, #d9e2ef);
  border-radius: 10px;
  background: var(--ui-surface, #fff);
  color: var(--ui-action, #356db4);
  box-shadow: 0 2px 8px rgb(16 24 40 / 0.06);
}
.conversa-solta-simbolo svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  opacity: 0.65;
}
.conversa-solta-simbolo span {
  font-size: 12px;
  font-weight: 500;
}
@media (prefers-reduced-motion: reduce) {
  #conversa-solta { transition: none; }
}

#anexo-previa:not([hidden]) {
  margin-bottom: 0.5rem;
}
#anexo-previa[hidden] {
  display: none !important;
}
#anexo-previa .anexo-previa-card {
  position: relative;
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
}
#anexo-previa .anexo-previa-card--midia {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 10px;
  background: #111827;
}
#anexo-previa .anexo-previa-thumb {
  display: block;
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
  object-fit: cover;
}
#anexo-previa .anexo-previa-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 12rem;
  max-width: min(100%, 22rem);
  padding: 8px 36px 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}
#anexo-previa .anexo-previa-ext {
  flex-shrink: 0;
  min-width: 2.6rem;
  padding: 6px 5px;
  border-radius: 6px;
  background: #265697;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.15;
}
#anexo-previa .anexo-previa-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#anexo-previa .anexo-previa-meta [data-anexo-nome] {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#anexo-previa .anexo-previa-tam {
  font-size: 11px;
  color: #6b7280;
}
#anexo-previa .anexo-previa-x {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
}
#anexo-previa .anexo-previa-x:hover {
  background: rgba(17, 24, 39, 0.95);
}
#anexo-previa .anexo-previa-x:focus-visible {
  outline: 2px solid #356db4;
  outline-offset: 1px;
}

#opcao-voz[hidden] {
  display: none !important;
}
#opcao-voz:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--ui-action);
  border-radius: var(--ui-radius-control);
  background: var(--ui-tint);
  color: var(--ui-action);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}
#opcao-voz:not([hidden]) input {
  accent-color: var(--ui-action);
  width: 0.95rem;
  height: 0.95rem;
}
#opcao-voz:not([hidden]):focus-within {
  outline: 2px solid var(--ui-focus);
  outline-offset: 1px;
}


/* Cortina do assistente do protocolo: fora do main (overflow-x-auto). */
.assistente-aba {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-action);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 8px 24px -6px rgb(16 24 40 / 0.16);
}
.assistente-aba:hover { background: var(--ui-tint); }
@media (max-width: 639px) {
  .assistente-global .assistente-aba {
    width: 40px;
    height: 40px;
    padding: 0;
    gap: 0;
    justify-content: center;
  }
  .assistente-global .assistente-aba-rotulo { display: none; }
}
.assistente-cortina { display: none; }
.assistente-dock.is-open .assistente-aba { display: none; }
.assistente-dock.is-open .assistente-cortina {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 24rem;
  max-width: 100vw;
  background: var(--ui-surface);
  border-left: 1px solid var(--ui-border);
  box-shadow: -12px 0 32px -16px rgb(16 24 40 / 0.28);
}
.assistente-dock.is-open.is-largo .assistente-cortina { width: min(42rem, 100vw); }
.assistente-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-surface-muted);
}
.assistente-janela { display: flex; align-items: center; gap: 0.2rem; }
.assistente-btn {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.3rem;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-text);
  font-size: 0.85rem;
  line-height: 1;
  text-decoration: none;
}
.assistente-btn:hover { background: var(--ui-tint); border-color: var(--ui-action); color: var(--ui-action); }
.assistente-corpo { min-height: 0; flex: 1; overflow: hidden; }

/* Assistente global: no desktop o painel empurra o conteúdo (não cobre a tela). */
@media (min-width: 1024px) {
  html.assistente-global-aberto .app-shell > .flex-1 {
    padding-right: 24rem;
  }
  html.assistente-global-aberto .assistente-global.is-largo ~ * ,
  html.assistente-global-aberto:has(.assistente-global.is-largo) .app-shell > .flex-1 {
    padding-right: min(42rem, 100vw);
  }
}


/* Fila unificada (/tarefas/): todas as datas compartilham as mesmas trilhas.
   Há um único cabeçalho de ordenação; os cards diários contêm apenas linhas. */
#tarefas-tabela {
  --tarefas-cols:
    minmax(12rem, 1fr)
    6.5rem
    6.25rem
    7.5rem
    6.5rem
    6.75rem;

}
.tarefas-scroll {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.tarefas-quadro {
  min-width: 44rem;
}
.tarefas-grade-cab,
.tarefas-grade-linha {
  display: grid;
  grid-template-columns: var(--tarefas-cols);
  width: 100%;
  align-items: start;
}
.tarefas-grade-cab > *,
.tarefas-grade-linha > * {
  min-width: 0;
}
.tarefas-ordenacao {
  overflow: hidden;
  background: var(--ui-surface-muted);
}
.tarefas-grade-cab .th {
  padding: 0.55rem 0.75rem;
}
.tarefas-grade-linha .td {
  padding: 0.6rem 0.75rem;
}
.tarefas-ordem-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--ui-muted);
}
.tarefas-ordem-link:hover {
  color: var(--ui-text);
}
.tarefas-ordem-ativa {
  color: var(--ui-action);
}
.tarefas-dia-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-surface-muted);
}
.tarefas-grade-linha {
  border-bottom: 1px solid var(--ui-border);
}
.tarefas-grade-linha:hover {
  background: var(--ui-tint);
}
.tarefas-grade-linha:last-child {
  border-bottom: 0;
}

/* Protocolos: cortina de consulta, barra de lote e pílulas de andamento. */
.proto-filtros-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: min(22rem, 100%);
  padding: 1rem;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 0.875rem;
  box-shadow: 0 8px 24px -6px rgb(16 24 40 / 0.16);
}
.proto-st {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.proto-st::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background: currentColor;
}
.proto-st-rascunho { color: var(--ui-muted); background: var(--ui-surface-muted); }
.proto-st-pronta { color: var(--ui-action); background: var(--ui-tint); }
.proto-st-lavratura { color: var(--ui-warning-text); background: var(--ui-warning-surface); }
.proto-st-lavrada { color: var(--ui-success-text); background: var(--ui-success-surface); }
.proto-st-arquivada { color: var(--ui-muted); background: var(--ui-surface-muted); }

.proto-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(16 24 40 / 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.proto-scrim.show {
  opacity: 1;
  pointer-events: auto;
}
.proto-cortina {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: min(28rem, 94vw);
  background: var(--ui-surface);
  border-left: 1px solid var(--ui-border);
  box-shadow: -12px 0 32px -16px rgb(16 24 40 / 0.28);
  transform: translateX(102%);
  transition: transform 0.24s ease;
}
.proto-cortina.open { transform: none; }
.proto-cortina-head {
  padding: 1.1rem 1.35rem 0.9rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.proto-cortina-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.1rem 1.35rem;
}
.proto-cortina-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1.35rem;
  border-top: 1px solid #e5e7eb;
}
.proto-cortina-secao {
  margin: 1.25rem 0 0.6rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9ca3af;
}

.proto-bulkbar {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  max-width: calc(100vw - 2rem);
  padding: 0.45rem 0.55rem 0.45rem 1rem;
  color: #f8fafc;
  background: #1d3455;
  border-radius: 0.75rem;
  box-shadow: 0 14px 34px rgb(16 24 40 / 0.28);
  transform: translateX(-50%) translateY(5rem);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.proto-bulkbar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.proto-bulkbar-btn {
  border: 0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.7rem;
  background: rgb(255 255 255 / 0.12);
  color: #f8fafc;
  font-size: 0.8125rem;
}
.proto-bulkbar-btn:hover { background: rgb(255 255 255 / 0.22); }
.proto-bulkbar-btn-danger { color: #fecaca; }
.proto-bulkbar-select,
.proto-bulkbar-input {
  max-width: 10rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  padding: 0 0.5rem;
  background: rgb(255 255 255 / 0.12);
  color: #f8fafc;
  font-size: 0.75rem;
}
.proto-bulkbar-select option { color: #111827; }

.proto-row-new { animation: protoRowIn 1.6s ease; }
@keyframes protoRowIn {
  from { background: #eef4fb; }
  to { background: transparent; }
}


/* Physical ruler: gray page margins, blue paragraph indents; no CSS zoom here. */
.fs-ruler {
  position: sticky;
  top: var(--fs-topbar-h, 0px);
  z-index: 40;
  height: 66px;
  margin: 8px auto 0;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #cbd5e1;
  border-radius: 4px 4px 0 0;
  box-sizing: border-box;
  user-select: none;
}
.fs-ruler-surface { position: absolute; inset: 20px 0 18px; overflow: hidden; background: #fff; }
.fs-ruler-surface [data-ruler-shade] { position: absolute; top: 0; bottom: 0; background: #dfe5ec; }
.fs-ruler-surface [data-ruler-shade="left"] { left: 0; }
.fs-ruler-surface [data-ruler-shade="right"] { right: 0; }
.fs-ruler-tick { position: absolute; top: 22px; width: 1px; height: 5px; background: #64748b; }
.fs-ruler-tick.half { top: 18px; height: 9px; }
.fs-ruler-tick.major { top: 3px; height: 24px; padding-left: 3px; font: 10px/12px system-ui; color: #334155; }
.fs-ruler-unit { position: absolute; right: 5px; top: 2px; color: #64748b; font: 10px/16px system-ui; }
.fs-ruler-help { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.fs-ruler-handle {
  position: absolute; width: 22px; height: 20px; padding: 0;
  border: 0; background: transparent; cursor: ew-resize; z-index: 2;
  transform: translateX(-50%); touch-action: none;
}
.fs-ruler-handle::before {
  content: ""; display: block; width: 0; height: 0; margin: 0 auto;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
}
.fs-ruler-marginLeft, .fs-ruler-marginRight { top: 0; }
.fs-ruler-marginLeft::before, .fs-ruler-marginRight::before {
  width: 7px; height: 15px; border: 1px solid #64748b; border-radius: 2px; background: #94a3b8;
}
.fs-ruler-textIndent { top: 19px; }
.fs-ruler-textIndent::before { border-top: 10px solid #1d4e89; }
.fs-ruler-indent, .fs-ruler-indentRight { top: 45px; }
.fs-ruler-indent::before { width: 12px; height: 8px; border: 1px solid #123965; background: #265697; }
.fs-ruler-indentRight::before { border-bottom: 10px solid #265697; }
.fs-ruler-handle:hover::before { filter: brightness(1.15); }
.fs-ruler-handle:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; border-radius: 3px; }
.fs-ruler-handle:disabled { cursor: default; opacity: 0.45; }
.fs-ruler-guide { position: absolute; top: 28px; width: 1px; border-left: 1px dashed #2563eb; pointer-events: none; z-index: 1; }
.fs-ruler-feedback { position: absolute; top: 67px; left: 4px; background: #172c47; color: white; font: 11px/1.4 system-ui; border-radius: 4px; padding: 3px 6px; z-index: 3; pointer-events: none; }
.fs-ruler-feedback:empty { display: none; }
.fs-ruler:not([data-dragging]):not(:focus-within) .fs-ruler-feedback { clip-path: inset(50%); width: 1px; height: 1px; padding: 0; overflow: hidden; }
.editor-tab-char, .editor-area span[data-tab] {
  display: inline-block; width: 1.25cm; padding: 0; margin: 0;
  border: 0; border-radius: 0; background: transparent; color: inherit;
  font: inherit; cursor: text; vertical-align: baseline;
}
.editor-area .ProseMirror { tab-size: 1.25cm; }



/* Cards da relação estatística no editor de ofícios. */
.editor-area .card-ato {
  font-family: "Segoe UI", system-ui, sans-serif;
  border: 1px solid #c3cdd8;
  border-radius: 7px;
  overflow: hidden;
  margin: 10px 0;
  background: #fff;
}
.editor-area .card-ato-topo { display: flex; background: #e8eef5; border-bottom: 1px solid #cfd8e3; }
.editor-area .badge-especie {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 7.2rem; background: #1d4e89; color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .7px;
  text-transform: uppercase; padding: 6px 8px; text-align: center;
}
.editor-area .card-ato.obito .badge-especie { background: #3d4a5c; }
.editor-area .card-ato.natimorto .badge-especie { background: #6b5344; }
.editor-area .card-ato-meta { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(4.4rem, 1fr)); margin: 0; }
.editor-area .card-ato-meta > div { padding: 2px 8px; border-right: 1px solid #d5dee8; }
.editor-area .card-ato dt { margin: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; color: #5b6c7d; }
.editor-area .card-ato dd { margin: 1px 0 0; font-size: 13px; font-weight: 650; color: #15202b; }
.editor-area .card-ato-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0; }
.editor-area .card-ato-grid.nascimento,
.editor-area .card-ato-grid.natimorto {
  grid-template-columns: minmax(0, max-content) minmax(0, max-content) minmax(0, max-content) minmax(0, max-content) minmax(0, 1fr) minmax(0, 1fr) minmax(0, max-content);
}

.editor-area .card-ato-grid .campo { padding: 5px 7px; border-right: 1px solid #e6ecf2; border-bottom: 1px solid #e6ecf2; }
.editor-area .card-ato-grid .campo.nome-registrado { padding-right: 4px; }
.editor-area .card-ato-grid .campo.sexo { padding-left: 4px; padding-right: 5px; }
.editor-area .card-ato-grid .campo.hora { padding-left: 3px; padding-right: 3px; }
.editor-area .card-ato-grid .campo.span-2 { grid-column: span 2; }
.editor-area .card-ato-grid .campo.span-all { grid-column: 1 / -1; }
.editor-area .card-ato-grid .campo.sexo dd { white-space: nowrap; }
.editor-area .card-ato-grid .campo.nome-registrado dd {
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}




.editor-area .card-ato-filiacao.so-nomes { display: grid; grid-template-columns: 1fr 1fr; }
.editor-area .filiacao h3 { margin: 0; padding: 3px 8px; font-size: 11px; color: #fff; text-transform: uppercase; }
.editor-area .filiacao.mae h3 { background: #215a96; }
.editor-area .filiacao.pai h3 { background: #1f6b5a; }


/* Ofício no editor fullscreen: versões, popover de liberação e modo leitura.
   Escopo em body.tela-cheia para não alterar o resto do sistema. */
body.tela-cheia .oficio-versoes {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  flex-shrink: 0; max-width: 28rem;
}
body.tela-cheia .oficio-versao {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border: 1px solid #e5e7eb; border-radius: 999px;
  font-size: 11px; line-height: 1.3; color: #4b5563; text-decoration: none;
  white-space: nowrap;
}
body.tela-cheia .oficio-versao:hover { border-color: #93b4dd; color: #1f3c66; }
body.tela-cheia .oficio-versao:focus-visible {
  outline: 2px solid #356db4; outline-offset: 2px;
}
body.tela-cheia .oficio-versao.is-atual {
  background: #eef4fb; border-color: #93b4dd; color: #1f3c66; font-weight: 600;
}
body.tela-cheia .oficio-versao.is-historica {
  color: #6b7280;
}
body.tela-cheia .oficio-versao[aria-current="page"] {
  box-shadow: inset 0 0 0 1px #356db4;
}
body.tela-cheia .oficio-leitura-badge { color: #92400e; font-weight: 600; }
body.tela-cheia .oficio-acao,
body.tela-cheia .oficio-expedir { position: relative; flex-shrink: 0; margin: 0; }
body.tela-cheia .oficio-liberar-popover {
  width: min(92vw, 22rem); padding: 1rem 1.1rem;
  border: 1px solid #e5e7eb; border-radius: 12px;
  background: #fff; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.35);
}
body.tela-cheia .oficio-liberar-popover h2 {
  margin: 0; font-size: 15px; font-weight: 650; color: #111827;
}
body.tela-cheia .oficio-liberar-popover p {
  margin: 0.45rem 0 0; font-size: 13px; line-height: 1.45; color: #4b5563;
}
body.tela-cheia .oficio-liberar-acoes {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 1rem;
}
body.tela-cheia .oficio-liberar-acoes form { margin: 0; }
body.tela-cheia.oficio-somente-leitura .ProseMirror { caret-color: transparent; }
body.tela-cheia.oficio-somente-leitura .editor-toolbars { opacity: 0.55; }
body.tela-cheia.oficio-somente-leitura .editor-toolbars [data-cmd="zoomIn"],
body.tela-cheia.oficio-somente-leitura .editor-toolbars [data-cmd="zoomOut"],
body.tela-cheia.oficio-somente-leitura .editor-toolbars [data-zoom-display] {
  opacity: 1;
}
body.tela-cheia.oficio-somente-leitura #page-panel input,
body.tela-cheia.oficio-somente-leitura #page-panel select,
body.tela-cheia.oficio-somente-leitura #page-panel textarea {
  pointer-events: none; opacity: 0.65;
}


.identidade-shell {
  display: block;
}
.identidade-shell-erro { margin-bottom: 1rem; }
.identidade-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--ui-border);
  padding-bottom: 0.5rem;
  margin: 0.75rem 0;
  flex-shrink: 0;
}
.identidade-nav button {
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ui-muted);
  min-height: 2.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.4rem;
  cursor: pointer;
}
.identidade-nav button[aria-selected="true"] {
  background: var(--ui-action);
  color: var(--ui-on-action);
}
.socio-card {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  border: 1px solid var(--ui-border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: var(--ui-surface);
}
.socio-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--ui-action);
  color: var(--ui-on-action);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.identidade-preview {
  border-radius: 0.75rem;
  background: var(--ui-surface-muted);
  padding: 0.75rem;
  font-size: 0.75rem;
  color: var(--ui-muted);
}
