/* Estilos estruturais do editor centralizados. Escopo do documento preservado. */
/* Fundação do editor; mesmas regras, ordem de cascata preservada. */


:root{
  --bg:#ecf0f3; --card:#eef2f6; --primary:#1f6feb; --accent:#7cc4ff;
  --muted:#8b96a6; --shadow-light: rgba(255,255,255,0.95); --shadow-dark: rgba(145,155,165,0.15);
  --radius:14px; --text:#0b2545;
  --search-bg: rgba(255,255,255,0.9);
}

/* Base */
html,body{height:100%;margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;background:linear-gradient(180deg,#e9eef6 0%, #ecf5ff 100%); color:var(--text); -webkit-font-smoothing:antialiased}
.wrap{max-width:none;width:100%;margin:0;padding:20px 20px 28px 20px;box-sizing:border-box}

/* Header */
.header{display:grid;grid-template-columns:140px 1fr 520px;align-items:center;margin-bottom:18px;column-gap:16px}
.crest{width:84px;height:84px;padding:6px;border-radius:12px;background:linear-gradient(180deg,var(--card),#fff);box-shadow:8px 8px 22px var(--shadow-dark);display:flex;align-items:center;justify-content:center;overflow:hidden}
.crest{justify-self:end}
.header .title-center{text-align:center}
.header .right-actions{justify-self:end}

.crest img{width:100%;height:100%;object-fit:contain}
.title-center{text-align:center;flex:1}
.h-title{margin:0;font-size:32px;font-weight:800; background: linear-gradient(180deg, rgba(11,37,69,1), rgba(18,47,85,1)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}
.subtitle{font-weight:800;color:#000;margin-top:6px}
.header-right{display:flex;gap:12px;align-items:center}
.user-badge{display:flex;gap:8px;align-items:center;background:linear-gradient(180deg,#fff,#f3f7fb);padding:6px 10px;border-radius:18px;box-shadow:4px 6px 12px rgba(12,35,70,0.04);font-weight:700;color:#12324a;font-size:14px}
.user-badge .dot{width:10px;height:10px;border-radius:50%;background:#1f6feb;display:inline-block;box-shadow:0 2px 6px rgba(31,111,235,0.18)}

/* Buttons */
.btn{padding:10px 14px;border-radius:10px;border:none;cursor:pointer;font-weight:700;color:#fff;background:linear-gradient(180deg,var(--primary),#1556c8)}
.btn.secondary{background:linear-gradient(180deg,#8da7bf,#7b98ae);color:#04243a}
.btn.ghost{background:transparent;color:#12324a;border:1px solid rgba(11,37,69,0.06);box-shadow:none}

/* Cards & layout */
.card{background:linear-gradient(180deg,var(--card),#fff);border-radius:var(--radius);padding:16px;box-shadow: 10px 10px 24px var(--shadow-dark), -10px -10px 24px var(--shadow-light)}
.grid{display:grid;grid-template-columns:1fr 380px;gap:18px;align-items:start}

/* Form spacing: avoids overlap */
.form-row{display:flex;gap:20px;flex-wrap:wrap;margin-bottom:22px;align-items:flex-start}
.field{display:flex;flex-direction:column;gap:8px;min-width:220px;flex:1 1 220px;box-sizing:border-box}
.field.wide{flex:2 1 420px;min-width:320px}
.field.small{flex:0 1 140px;min-width:140px;max-width:220px}
label{font-size:15px;font-weight:800;color:#000;margin:0;line-height:1.2}
.input,textarea,select{width:100%;padding:12px 14px;border-radius:12px;border:1px solid rgba(11,37,69,0.06);background:#fff;font-size:15px;box-sizing:border-box}
textarea{min-height:110px;resize:vertical}
.muted{color:var(--muted);font-weight:700}
.kv{font-weight:700;color:#12324a;margin-bottom:6px}


/* Table */
.table-wrap{margin-top:12px;border-radius:12px;overflow:auto}
table{width:100%;border-collapse:collapse}
thead th{padding:12px 14px;text-align:left;font-weight:800;color:#12324a;border-bottom:1px solid rgba(11,37,69,0.04)}
tbody td{padding:12px 14px;border-top:1px solid rgba(11,37,69,0.03);vertical-align:middle}
.col-no-oficio{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
.action-btn{padding:6px 10px;border-radius:8px;border:none;font-weight:700;cursor:pointer}
.action-btn.edit{background:#e8f4ff;color:#0b61a8}
.action-btn.delete{background:#ffecec;color:#b01b2b}

/* Sidebar last & recent */
.last-oficio{padding:10px 12px;background:linear-gradient(180deg,#fff,#f7fbff);border-radius:10px;box-shadow:4px 6px 12px rgba(12,35,70,0.03);margin-bottom:12px}
.list{padding-left:12px;margin-top:8px}
.list li{margin-bottom:8px;padding:8px;border-radius:8px;background:linear-gradient(180deg,#fff,#f3f7fb);font-weight:700}

/* ===== Search bar styling (improved visual) ===== */
.search-wrap{
  margin-top:16px;
  display:flex;
  align-items:center;
  gap:10px;
}
.search-box{
  display:flex;
  align-items:center;
  position:relative;
  flex:1;
  max-width:100%;
}
.search-icon{
  position:absolute; left:12px; top:50%; transform:translateY(-50%); color:#7b98ae; font-size:16px; pointer-events:none;
}
.search-input{
  width:100%;
  padding:12px 14px 12px 40px; /* icon left space */
  border-radius:12px;
  border: 1px solid rgba(11,37,69,0.06);
  background: var(--search-bg);
  box-shadow: inset 4px 4px 8px rgba(145,155,165,0.03);
  font-size:15px;
  outline:none;
  transition: box-shadow .15s ease, transform .08s ease;
}
.search-input:focus{
  box-shadow: 0 6px 24px rgba(31,111,235,0.08);
  transform: translateY(-1px);
}

/* small button next to search if needed */
.search-cta{padding:10px 12px;border-radius:10px;border:none;background:linear-gradient(180deg,#f0f6fb,#dfeefb);font-weight:700;color:#12324a;cursor:pointer;box-shadow:4px 6px 12px rgba(12,35,70,0.04)}

/* Responsive tweaks */
@media (max-width:1020px){
  .grid{grid-template-columns:1fr}
  .crest{display:flex}
  .title-center{text-align:left;padding-left:8px}
  .search-wrap{flex-direction:column;align-items:stretch}
  .search-cta{width:100%}
}

.table{table-layout:fixed}
.table td.destino{
  max-width:none;
  white-space:normal;
  word-break:break-word;
  line-height:1.4;
}
.table td.assunto{
  max-width:none;
  white-space:normal;
  word-break:break-word;
  line-height:1.4;
}
/* larguras das colunas (menos quebra no Assunto) */
.table th:nth-child(1), .table td:nth-child(1){width:110px}
.table th:nth-child(2), .table td:nth-child(2){width:92px}
.table th:nth-child(3), .table td:nth-child(3){width:170px}
.table th:nth-child(4), .table td:nth-child(4){width:210px}
.table th:nth-child(6), .table td:nth-child(6){width:140px}
.table th:nth-child(7), .table td:nth-child(7){width:170px}



/* ===== Layout v3 (mantém IDs/campos; melhora organização) ===== */
:root{
  --line: rgba(11,37,69,0.08);
  --card2: #ffffff;
  --panel: linear-gradient(180deg, #ffffff, #f7fbff);
}

/* Topbar refinada */
.header{
  column-gap:16px;
}
.header .title-center{min-width:240px}
.top-search{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:center;
}
.top-search .search-box{max-width:640px;width:100%}
.header-right{flex-wrap:wrap;justify-content:flex-end}

/* Grid principal: form + painel */
.grid{
  align-items:start;
}

/* Seções dentro do card principal */
.section-title{
  margin:0 0 10px 0;
  font-size:14px;
  font-weight:900;
  letter-spacing:.02em;
  color:#12324a;
  text-transform:uppercase;
}
.section{
  padding:14px;
  border-radius:12px;
  background: var(--panel);
  border:1px solid rgba(11,37,69,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  margin-bottom:14px;
}
.section:last-child{margin-bottom:0}

/* Barra de ações no rodapé do formulário */
.form-actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(11,37,69,0.06);
}
.form-actions .grow{flex:1}

/* Tabela como bloco separado */
.table-block{
  margin-top:14px;
}
.table-head{
  display:flex;
  align-items:center;
  gap:14px;
  justify-content:flex-start;
  flex-wrap:wrap;
  margin-bottom:8px;
}
.table-head .muted{margin:0}
.table-wrap{
  border:1px solid rgba(11,37,69,0.05);
  background:#fff;
}
.table-wrap thead th{
  position:sticky;
  top:0;
  background:#f9fbff;
  z-index:2;
}
tbody tr:nth-child(odd){background:rgba(11,37,69,0.012)}
.action-btn{border:1px solid rgba(11,37,69,0.08)}

/* Upload do PDF com aparência de “controle” */
.file-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.file-row input[type="file"]{
  padding:10px 12px;
  border-radius:12px;
  border:1px dashed rgba(11,37,69,0.18);
  background:#fff;
  width:100%;
  max-width:420px;
}
.file-hint{
  font-weight:800;
  color:#12324a;
}

/* Responsive: header com busca em linha separada */
@media (max-width:980px){
  .top-search{justify-content:stretch}
  .top-search .search-box{max-width:100%}
}


/* ===== Form polish (mais atrativo, sem mudar campos) ===== */

/* “Chip” de seção */
.section-title{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(31,111,235,0.12), rgba(124,196,255,0.10));
  border:1px solid rgba(31,111,235,0.18);
  box-shadow:0 10px 24px rgba(31,111,235,0.06);
}
.section-title::before{
  content:"";
  width:10px;height:10px;border-radius:50%;
  background:linear-gradient(180deg, var(--primary), #1556c8);
  box-shadow:0 6px 14px rgba(31,111,235,0.28);
}

/* Cards internos com “borda viva” */
.section{
  position:relative;
  overflow:hidden;
}
.section::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:linear-gradient(135deg, rgba(31,111,235,0.18), rgba(124,196,255,0.10), rgba(255,255,255,0.0));
  pointer-events:none;
  border-radius:14px;
}
.section > *{ position:relative; }

/* Labels e hints */
label{
  letter-spacing:.01em;
}
.muted{
  font-size:12px;
}

/* Inputs: foco mais elegante */
.input, textarea, select, .search-input{
  transition: box-shadow .15s ease, transform .06s ease, border-color .15s ease;
}
.input:focus, textarea:focus, select:focus, .search-input:focus{
  border-color: rgba(31,111,235,0.38);
  box-shadow: 0 10px 28px rgba(31,111,235,0.10);
  transform: translateY(-1px);
  outline: none;
}

/* Readonly: aparência “travado” */
.usuario-fixo[readonly]{
  background:linear-gradient(180deg,#f7fbff,#ffffff);
  border-color: rgba(11,37,69,0.08);
  color:#0b2545;
  cursor:not-allowed;
}

/* File control: mais “controle” */
.file-row{
  padding:12px;
  border-radius:12px;
  background:linear-gradient(180deg,#ffffff,#f7fbff);
  border:1px solid rgba(11,37,69,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.file-hint{
  padding:6px 10px;
  border-radius:999px;
  background:rgba(31,111,235,0.08);
  border:1px solid rgba(31,111,235,0.14);
}

/* Botões: leve “lift” */
.btn{
  transition: transform .08s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 12px 28px rgba(11,37,69,0.08);
}
.btn:active{ transform: translateY(0px); }

/* Linha de ações do form: fixa no card em telas grandes */
@media (min-width: 1100px){
  .form-actions{
    position:sticky;
    bottom:16px;
    background:linear-gradient(180deg, rgba(255,255,255,0.85), rgba(247,251,255,0.92));
    backdrop-filter: blur(6px);
    border-radius:12px;
    border:1px solid rgba(11,37,69,0.06);
    padding:10px;
  }
}

/* Tabela: badges de status (apresentação) */
.badge-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  border:1px solid rgba(11,37,69,0.06);
}
.badge-status::before{
  content:"";
  width:8px;height:8px;border-radius:50%;
  background:#94a3b8;
}
.badge-status.s-finalizado{ background:#eefcf3; color:#0b7a39; border-color:rgba(11,122,57,0.18); }
.badge-status.s-finalizado::before{ background:#16a34a; }
.badge-status.s-enviado{ background:#e9f4ff; color:#0b61a8; border-color:rgba(11,97,168,0.18); }
.badge-status.s-enviado::before{ background:#2563eb; }
.badge-status.s-aguardando{ background:#fff7ed; color:#b35400; border-color:rgba(179,84,0,0.22); }
.badge-status.s-aguardando::before{ background:#f97316; }


/* ===== Layout: formulário maior + painel lateral (Último + Últimos 10) ===== */
.wrap{max-width:none; width:100%; margin:0;}
/* sidebar fixa */
.grid{grid-template-columns: 1fr 420px; gap:18px;} /* sidebar fixa */

@media (max-width:860px){
  .grid{grid-template-columns:1fr}
}

/* Sidebar refinada */
.side-card{
  background:linear-gradient(180deg,var(--card),#fff);
  border-radius:var(--radius);
  padding:16px;
  box-shadow: 10px 10px 24px var(--shadow-dark), -10px -10px 24px var(--shadow-light);
}
.side-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.side-title h3{
  margin:0;
  font-size:14px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.02em;
  color:#12324a;
}
.side-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.btn.small{
  padding:8px 10px;
  border-radius:10px;
  font-weight:800;
  font-size:13px;
}

/* Último ofício destacado */
.last-highlight{
  padding:12px 12px;
  border-radius:14px;
  background:linear-gradient(180deg,#ffffff,#f7fbff);
  border:1px solid rgba(11,37,69,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  margin-bottom:12px;
}

/* Últimos 10 colapsável */
.last10-wrap{
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(11,37,69,0.06);
  background:linear-gradient(180deg,#ffffff,#f7fbff);
}
.last10-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  cursor:pointer;
  user-select:none;
}
.last10-head .txt{
  font-weight:900;
  color:#12324a;
}
.last10-body{
  display:none;
  padding:10px 12px 12px 12px;
}
.last10-body.open{display:block}
.recent-grid{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.recent-item{
  padding:10px 10px;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(11,37,69,0.06);
  box-shadow: 0 8px 18px rgba(11,37,69,0.04);
  font-weight:800;
  color:#12324a;
  line-height:1.2;
}
.recent-item .meta{
  display:block;
  margin-top:4px;
  font-size:12px;
  font-weight:800;
  color:rgba(18,50,74,0.65);
}


/* ===== OVERRIDE FINAL: força painel na lateral direita (evita cair para baixo) ===== */
.grid{
  grid-template-columns: minmax(0,1fr) 420px !important;
  align-items: start !important;
}
.side-card{
  align-self: start !important;
}
/* Só empilha em telas realmente pequenas */
@media (max-width: 880px){
  .grid{ grid-template-columns: 1fr !important; }
}


/* ===== FIX: garantir painel no topo da coluna direita ===== */
.grid > main#mainCard{
  grid-column: 1 !important;
}
.grid > aside.side-card{
  grid-column: 2 !important;
  grid-row: 1 !important;
}
/* Evita que cards “ocupem” as 2 colunas por alguma regra antiga */
#mainCard{
  width: 100%;
  min-width: 0;
}

/* ===== CENTRALIZAÇÃO DO CADASTRO / EDIÇÃO (SEM MEXER NA CONSULTA / LISTA) ===== */
/* Centraliza o miolo do formulário dentro do card, mantendo a coluna direita intacta */
#mainCard > form#formNew{
  max-width: 980px;
  margin: 0 auto;
}

/* Consulta / Lista permanece com largura total do card */
#mainCard .table-wrap,
#mainCard .table-card,
#mainCard .table-actions{
  max-width: 100% !important;
}


/* ===== LAYOUT DEFINITIVO =====
   - Consulta / Lista fica dentro do main (centralizado pelo card)
   - Painel "Último cadastrado / Últimos 10" vira coluna direita da tela, AO LADO do Cadastro/Edição
*/
.grid{
  display:grid !important;
  grid-template-columns: minmax(0, 1fr) 420px !important;
  gap:18px !important;
  align-items:start !important;
}
.grid > #mainCard{
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}
.grid > #sidePanel{
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: start !important;
  margin-top: 0;
}

@media (max-width: 880px){
  .grid{ grid-template-columns: 1fr !important; }
  .grid > #sidePanel{ grid-column: 1 !important; }
}

/* removido: grid interno (form-side-grid). O painel agora é a coluna direita real */


/* ===== VISUAL POLISH (2026-01-22) ===== */
.grid{
  grid-template-columns: minmax(0,1fr) minmax(340px, 420px) !important;
  gap:16px !important;
}

#sidePanel.side-card{
  position: static;
  padding:14px;
}

#sidePanel .side-title{
  padding-bottom:10px;
  border-bottom:1px solid rgba(11,37,69,0.06);
  margin-bottom:12px;
}

#sidePanel .last-highlight{
  font-size:13.5px;
  line-height:1.35;
  color:#0b2545;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

#sidePanel .last10-head{
  background:rgba(255,255,255,0.55);
}

#sidePanel .recent-item{
  transition: transform .08s ease, box-shadow .08s ease;
}
#sidePanel .recent-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(11,37,69,0.06);
}

/* Só empilha em telas pequenas (celular) */
@media (max-width: 820px){
  .grid{ grid-template-columns: 1fr !important; }
  #sidePanel.side-card{ position: static; }
}



/* =========================
   FIX v7 (layout clean)
   ========================= */
html, body{width:100%; overflow-x:hidden;}
/* avoid duplicate wrap rules causing overflow */
.wrap{max-width:1400px; margin:0 auto; padding:20px 20px 28px; box-sizing:border-box;}
/* header: keep crest visible and aligned near title */
.header{display:grid; grid-template-columns:110px 1fr auto; column-gap:16px; align-items:center;}
.crest{justify-self:end;}
/* right actions: keep aligned in one row and prevent overflow */
.header-right{display:flex; gap:12px; align-items:center; justify-content:flex-end; flex-wrap:nowrap;}
.top-search{display:flex; align-items:center; justify-content:flex-end; gap:12px;}
.top-search .search-box{max-width:360px; width:360px;}
@media (max-width:1120px){
  .top-search .search-box{width:280px; max-width:280px;}
  .header-right{flex-wrap:wrap;}
}
/* main grid spacing: reduce empty area and align panel with form */
.grid{grid-template-columns:minmax(760px,1fr) 420px; gap:18px; align-items:start;}
@media (max-width:1050px){
  .grid{grid-template-columns:1fr;}
}
/* side panel should not be sticky and should sit naturally */
#sidePanel, .side-panel{position:static !important;}

/* CONSULTA/LISTA: do not change structure; only improve column sizing */
.table{table-layout:auto;}
.table th, .table td{vertical-align:top;}
.table th:nth-child(1), .table td:nth-child(1){width:110px;}
.table th:nth-child(2), .table td:nth-child(2){width:90px;}
.table th:nth-child(3), .table td:nth-child(3){width:170px;}
.table th:nth-child(4), .table td:nth-child(4){width:240px;}
.table th:nth-child(6), .table td:nth-child(6){width:130px;}
.table th:nth-child(7), .table td:nth-child(7){width:170px;}
/* Assunto column (5) gets remaining space and breaks less */
.table th:nth-child(5), .table td:nth-child(5){
  min-width:420px;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
  line-height:1.35;
}

/* ===== OVERRIDES (layout fine-tune) ===== */

/* 2mm para a direita (aprox. 8px) - painel Últimos */
.grid > #sidePanel{
  margin-left: 8px !important;
}

/* Consulta/Lista: sem barra horizontal e melhor distribuição */
.table-wrap{
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Tabela ocupa tudo e distribui colunas (sem estourar largura) */
.table-wrap table{
  table-layout: fixed !important;
}

/* Evita estouro por palavras longas */
.table-wrap th,
.table-wrap td{
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Larguras de colunas (Data, Nº, Usuário, Destino, Assunto, Status, Ações) */
.table-wrap thead th:nth-child(1),
.table-wrap tbody td:nth-child(1){ width: 9%; }

.table-wrap thead th:nth-child(2),
.table-wrap tbody td:nth-child(2){ width: 9%; }

.table-wrap thead th:nth-child(3),
.table-wrap tbody td:nth-child(3){ width: 14%; }

.table-wrap thead th:nth-child(4),
.table-wrap tbody td:nth-child(4){ width: 18%; }

.table-wrap thead th:nth-child(5),
.table-wrap tbody td:nth-child(5){ width: 38%; }

/* Assunto: permite quebrar, mas com menos linhas (mais largura) */
.table-wrap tbody td:nth-child(5){
  white-space: normal;
  word-break: break-word;
}

/* Status e Ações */
.table-wrap thead th:nth-child(6),
.table-wrap tbody td:nth-child(6){ width: 12%; }

.table-wrap thead th:nth-child(7),
.table-wrap tbody td:nth-child(7){ width: 10%; }

/* Botões de ação não estouram */
.table-wrap tbody td:nth-child(7){
  white-space: nowrap;
}

/* ===== AJUSTE: Consulta/Lista ocupa também a coluna direita (usa o espaço vazio) ===== */
.grid > #consultaBlock{
  grid-column: 1 / -1 !important; /* pega as 2 colunas */
  grid-row: 2 !important;         /* abaixo do cadastro/painel */
  width: 100%;
}

/* Consulta/Lista: sem cortes/ellipsis e sem barra horizontal */
#consultaBlock .table-wrap{
  overflow: visible !important;
}
#consultaBlock table{
  width: 100% !important;
  table-layout: auto !important;
}
#consultaBlock th, #consultaBlock td{
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal;
}

/* mantém colunas curtas mais estáveis */
#consultaBlock th:nth-child(1), #consultaBlock td:nth-child(1){ white-space:nowrap; width:110px; }
#consultaBlock th:nth-child(2), #consultaBlock td:nth-child(2){ white-space:nowrap; width:90px; }
#consultaBlock th:nth-child(3), #consultaBlock td:nth-child(3){ width:150px; }
#consultaBlock th:nth-child(4), #consultaBlock td:nth-child(4){ width:170px; }
#consultaBlock th:nth-child(5), #consultaBlock td:nth-child(5){ min-width:360px; } /* Assunto */
#consultaBlock th:nth-child(6), #consultaBlock td:nth-child(6){ white-space:nowrap; width:120px; }
#consultaBlock th:nth-child(7), #consultaBlock td:nth-child(7){ white-space:nowrap; width:140px; }

/* remove qualquer regra antiga que encurte o card de consulta */
#consultaBlock{
  max-width: none !important;
}


/* Consulta/List: busca no cabeçalho */
.table-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.table-head .consulta-search{ margin-left: 6px; max-width: 520px; width: min(520px, 100%); }
.table-head .consulta-search .search-wrap{ display:flex; gap:8px; align-items:center; }
.table-head .consulta-search .search-cta{ padding:10px 12px; border-radius:12px; border:1px solid rgba(24,40,56,.10); background:rgba(255,255,255,.85); cursor:pointer; }


/* ===== Ajuste alinhamento do bloco "Último cadastrado" (sem mexer no HTML) ===== */
.side-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.side-title h3{
  margin:0;
  white-space:nowrap;
  text-transform:uppercase;
}
.side-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.side-actions .btn{
  height:34px;
  padding:0 14px;
  border-radius:12px;
  line-height:34px;
}


/* ===== Ajuste: trazer busca para perto do título Consulta/Lista ===== */
.consulta-header{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
}
.consulta-header .search-wrap{
  margin-left:16px;      /* fica próximo ao título */
  flex:0 0 420px;        /* largura fixa agradável */
}
.consulta-header .search-wrap input{
  width:100%;
}
.consulta-header .btn-clear-search{
  margin-left:8px;
}


/* ===== Ajuste fino: busca colada no título (onde marcado) ===== */
.consulta-header{
  justify-content:flex-start !important;
}
.consulta-header .search-wrap{
  margin-left:8px !important;
  flex:0 0 360px !important;
}


/* ===== FIX: busca ao lado do título (não jogada para a direita) ===== */
#consultaBlock .table-head{
  display:flex;
  align-items:center;
  justify-content:flex-start !important;
  gap:14px;
}
#consultaBlock .consulta-search{
  flex:0 0 420px !important;
  max-width:420px !important;
  margin-left:10px !important;
}
#consultaBlock .consulta-search .search-wrap{
  width:100% !important;
}
#consultaBlock .consulta-search .search-box{
  width:100% !important;
}
#consultaBlock #clearSearch{
  margin-left:10px !important;
}


/* ===== Ajuste: busca alinhada na mesma altura do título ===== */
#consultaBlock .table-head{ align-items:center !important; }
#consultaBlock .section-title{
  display:flex;
  align-items:center;
  height:44px;
  padding-top:0 !important;
  padding-bottom:0 !important;
}
#consultaBlock .consulta-search{
  display:flex;
  align-items:center;
  height:44px;
  margin-top:0 !important;
}
#consultaBlock .consulta-search .search-box{
  height:44px;
  display:flex;
  align-items:center;
}
#consultaBlock .consulta-search input{
  height:44px;
  padding-top:0 !important;
  padding-bottom:0 !important;
}

/* ===== Folga extra na coluna DESTINO ===== */
#tbl th:nth-child(4),
#tbl td:nth-child(4){
  padding-left:18px !important;
  padding-right:18px !important;
}


/* ===== FIX FINAL: mesma altura visual (sem aumentar) ===== */
#consultaBlock .table-head{ align-items:center !important; flex-wrap:nowrap !important; }
#consultaBlock .section-title{ margin:0 !important; padding:0 !important; line-height:1 !important; display:flex !important; align-items:center !important; }
#consultaBlock .consulta-search{ margin:0 !important; display:flex !important; align-items:center !important; }
#consultaBlock .consulta-search .search-wrap,
#consultaBlock .consulta-search .search-box{ height:auto !important; }
#consultaBlock .consulta-search input{ height:auto !important; }

/* Destino com folga e comportamento parecido com Assunto */
#tbl th:nth-child(4),
#tbl td:nth-child(4){
  min-width: 220px;
  white-space: normal;
}
#tbl th:nth-child(5),
#tbl td:nth-child(5){
  min-width: 320px;
}


/* ===== Alinhamento perfeito: título + busca + limpar na mesma altura ===== */
#consultaBlock .table-head{
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
}

#consultaBlock .section-title{
  display:flex !important;
  align-items:center !important;
  height:40px !important;
  line-height:40px !important;
  padding:0 14px !important;
  border-radius:999px !important;
}

#consultaBlock .consulta-search{
  display:flex !important;
  align-items:center !important;
  height:40px !important;
}

#consultaBlock .consulta-search .search-box{
  height:40px !important;
  display:flex !important;
  align-items:center !important;
}

#consultaBlock .consulta-search input{
  height:40px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}

#consultaBlock #clearSearch{
  height:40px !important;
  display:inline-flex !important;
  align-items:center !important;
}


/* CONSULTA/LISTA + PESQUISA na mesma altura e linha */
#consultaBlock .table-head{
  display:grid !important;
  grid-template-columns: auto 1fr auto;
  align-items:center !important;
  gap:14px !important;
}

#consultaBlock .section-title{
  height:40px !important;
  line-height:40px !important;
  padding:0 14px !important;
  white-space:nowrap !important;
}

#consultaBlock .consulta-search{
  width:100% !important;
  height:40px !important;
  display:flex !important;
  align-items:center !important;
}

#consultaBlock .consulta-search .search-box{
  width:100% !important;
  height:40px !important;
  display:flex !important;
  align-items:center !important;
}

#consultaBlock .consulta-search input{
  width:100% !important;
  height:40px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}

#consultaBlock #clearSearch{
  height:40px !important;
  display:inline-flex !important;
  align-items:center !important;
}


/* ===== FORÇA: todos na mesma altura real ===== */
#consultaBlock .table-head{
  display:grid !important;
  grid-template-columns: auto 1fr auto;
  align-items:center !important;
  gap:14px !important;
}

#consultaBlock .section-title,
#consultaBlock .consulta-search .search-box,
#consultaBlock #clearSearch{
  height:40px !important;
  min-height:40px !important;
  max-height:40px !important;
  display:flex !important;
  align-items:center !important;
}

#consultaBlock .consulta-search input{
  height:40px !important;
  line-height:40px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}


/* ===== FIX: Título + Busca + Limpar exatamente na mesma altura ===== */
#consultaBlock .table-head{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  flex-wrap:nowrap !important;
}

/* não deixar mensagem vazia ocupar espaço e bagunçar alinhamento */
#consultaBlock #statusMsgTop{ display:none !important; }

#consultaBlock .section-title{
  box-sizing:border-box !important;
  height:40px !important;
  padding:0 14px !important;
  display:flex !important;
  align-items:center !important;
  line-height:1 !important;
}

#consultaBlock .consulta-search{
  display:flex !important;
  align-items:center !important;
}

#consultaBlock .search-wrap{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  width:auto !important;      /* sobrescreve width:100% inline */
}

#consultaBlock .search-box{
  box-sizing:border-box !important;
  height:40px !important;
  display:flex !important;
  align-items:center !important;
  padding:0 12px !important;
}

#consultaBlock .search-input{
  box-sizing:border-box !important;
  height:40px !important;
  line-height:40px !important;
  padding:0 10px !important;
}

#consultaBlock .search-cta{
  box-sizing:border-box !important;
  height:40px !important;
  padding:0 16px !important;
  display:inline-flex !important;
  align-items:center !important;
}


/* ===== OVERRIDE FINAL (corrige alinhamento sem distorcer estilos) ===== */
#consultaBlock .table-head{
  display:grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items:center !important;
  gap:14px !important;
}

/* não deixar msg vazia interferir */
#consultaBlock #statusMsgTop{ display:none !important; }

/* título como “chip” na mesma altura do input */
#consultaBlock .section-title{
  height:40px !important;
  display:flex !important;
  align-items:center !important;
  padding:0 14px !important;
  line-height:1 !important;
  margin:0 !important;
}

/* busca ocupa a 2ª coluna inteira */
#consultaBlock .consulta-search{ width:100% !important; }
#consultaBlock .search-wrap{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;     /* sobrescreve inline */
}

/* caixa da busca mantém ícone e padding original do input */
#consultaBlock .search-box{
  flex:1 !important;
  height:40px !important;
  display:flex !important;
  align-items:center !important;
}

/* input com altura fixa sem “esticar” */
#consultaBlock .search-input{
  height:40px !important;
  padding:0 14px 0 40px !important;  /* mantém espaço do ícone */
  line-height:40px !important;
  box-sizing:border-box !important;
}

/* botão Limpar na mesma altura */
#consultaBlock .search-cta{
  height:40px !important;
  display:inline-flex !important;
  align-items:center !important;
  padding:0 16px !important;
  box-sizing:border-box !important;
}


/* ===== FINAL FIX (limpo): alinhar barra de pesquisa com o título ===== */
#consultaBlock .table-head{
  display:grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items:center !important;
  gap:12px !important;
  flex-wrap:unset !important;
}

#consultaBlock #statusMsgTop{ display:none !important; }

/* título e busca com mesma altura visual */
#consultaBlock .section-title{
  height:40px !important;
  line-height:40px !important;
  padding:0 14px !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  white-space:nowrap !important;
}

/* busca ocupa a coluna e fica alinhada */
#consultaBlock .consulta-search{
  width:100% !important;
  display:flex !important;
  align-items:center !important;
}

#consultaBlock .consulta-search .search-wrap{
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 !important;
}

#consultaBlock .consulta-search .search-box{
  position:relative !important;
  flex:1 !important;
  height:40px !important;
  display:flex !important;
  align-items:center !important;
}

#consultaBlock .consulta-search .search-input{
  height:40px !important;
  line-height:40px !important;
  padding:0 14px 0 40px !important; /* mantém ícone */
}

#consultaBlock .consulta-search .search-cta{
  height:40px !important;
  display:inline-flex !important;
  align-items:center !important;
  padding:0 16px !important;
}



/* =========================================================
   INTERFACE 2026 — implementação visual baseada no mockup
   Mantém IDs e lógica; remodela apresentação da tela principal.
   ========================================================= */
:root{
  --ui-blue:#1468dc;
  --ui-blue-2:#0f55bd;
  --ui-navy:#0b2f60;
  --ui-soft:#edf6ff;
  --ui-line:#d8e8f7;
  --ui-muted:#6983a5;
  --ui-white:#ffffff;
}
body{
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,.96) 0, rgba(246,251,255,.82) 34%, transparent 58%),
    linear-gradient(180deg,#edf6ff 0%,#f8fbff 52%,#edf6ff 100%) !important;
  min-height:100vh;
}
body::before, body::after{
  content:"";
  position:fixed;
  z-index:-1;
  pointer-events:none;
  border-radius:50%;
  filter:blur(.1px);
}
body::before{
  width:760px;height:260px;right:-160px;bottom:-105px;
  background:rgba(198,225,255,.34);
  transform:rotate(-8deg);
}
body::after{
  width:860px;height:230px;right:140px;bottom:-155px;
  background:rgba(220,237,255,.52);
  transform:rotate(8deg);
}
.wrap{
  width:min(1760px, calc(100% - 48px)) !important;
  max-width:1760px !important;
  padding:22px 0 34px !important;
  margin:0 auto !important;
}
.header{
  grid-template-columns:120px minmax(0,1fr) auto !important;
  min-height:108px;
  margin-bottom:18px !important;
  column-gap:24px !important;
}
.crest{
  width:92px !important;height:92px !important;
  padding:8px !important;
  justify-self:start !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 16px 38px rgba(44,93,145,.10) !important;
}
.h-title{
  font-size:38px !important;
  line-height:1 !important;
  font-weight:900 !important;
  letter-spacing:.01em;
  color:var(--ui-navy) !important;
  background:none !important;
  -webkit-text-fill-color:initial !important;
}
.subtitle{
  margin-top:8px !important;
  font-size:17px !important;
  font-weight:800 !important;
  color:#111 !important;
}
.header-right{gap:12px !important;flex-wrap:nowrap !important;}
.user-badge{
  min-height:40px;
  padding:0 14px !important;
  border:1px solid rgba(40,91,140,.08);
  background:rgba(255,255,255,.86) !important;
  box-shadow:0 10px 26px rgba(44,93,145,.08) !important;
  border-radius:22px !important;
  font-size:14px !important;
  color:var(--ui-navy) !important;
}
.user-badge .dot.user-person-icon{
  width:26px !important;height:26px !important;
  display:grid !important;place-items:center !important;
  background:#e3f1ff !important;
  box-shadow:none !important;
}
.user-person-icon svg{width:16px;height:16px;fill:none;stroke:var(--ui-blue);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
#btnLogout{
  min-height:44px;padding:0 22px !important;border-radius:12px !important;
  box-shadow:0 10px 24px rgba(20,104,220,.20) !important;
}
#btnOpenLogin,#btnAdmin{min-height:42px !important;}
.grid{
  grid-template-columns:minmax(0, 1fr) 520px !important;
  gap:24px !important;
  align-items:start !important;
}
#mainCard.card{
  padding:18px !important;
  border:1px solid rgba(108,160,212,.18) !important;
  border-radius:22px !important;
  background:rgba(255,255,255,.72) !important;
  box-shadow:0 18px 42px rgba(44,93,145,.08) !important;
  backdrop-filter:blur(4px);
}
#mainCard > form#formNew{max-width:none !important;margin:0 !important;}
#formNew .section{
  margin:0 !important;
  padding:0 !important;
  overflow:visible !important;
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}
#formNew .section::before{display:none !important;}
.modern-form-title{
  min-height:64px !important;
  padding:12px 16px !important;
  margin:0 0 18px !important;
  border-radius:14px !important;
  border:1px solid #cfe2f7 !important;
  background:linear-gradient(90deg,#e7f2ff,#f4f9ff) !important;
  box-shadow:none !important;
  text-transform:none !important;
  display:flex !important;align-items:center !important;gap:14px !important;
}
.modern-form-title::before{display:none !important;}
.modern-title-icon{
  width:42px;height:42px;border-radius:50%;display:grid;place-items:center;
  background:#d9ecff;color:var(--ui-blue);flex:0 0 auto;
}
.modern-title-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.modern-title-copy{display:flex;flex-direction:column;gap:2px;}
.modern-title-copy strong{font-size:17px;color:var(--ui-navy);font-weight:900;}
.modern-title-copy small{font-size:12px;color:var(--ui-muted);font-weight:600;letter-spacing:0;}
.form-row{gap:18px !important;margin-bottom:18px !important;}
.field{gap:7px !important;}
.modern-label{
  display:flex;align-items:center;gap:7px;
  color:#0a2c59 !important;font-size:14px !important;font-weight:850 !important;
}
.label-icon{width:17px;height:17px;display:inline-grid;place-items:center;color:var(--ui-blue);flex:0 0 auto;}
.label-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.input, textarea, select{
  min-height:50px;
  padding:12px 16px !important;
  border:1px solid #dbe7f2 !important;
  border-radius:11px !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:0 5px 16px rgba(55,104,151,.035) !important;
  color:#15365d;
}
.input::placeholder,textarea::placeholder{color:#7489a4;opacity:.95;}
textarea{min-height:114px !important;}
.usuario-fixo[readonly]{background:linear-gradient(180deg,#eff5fb,#f7fbff) !important;color:#173b67 !important;}
#formNew .muted{font-size:12px;color:#8296ad;}
.file-row{
  min-height:58px;
  padding:8px 10px !important;
  border:1px solid #dce8f3 !important;
  border-radius:11px !important;
  background:#fff !important;
  box-shadow:none !important;
}
.file-row input[type="file"]{
  padding:7px !important;
  max-width:570px !important;
  border:1px dashed #cfdfed !important;
  border-radius:9px !important;
  background:#fff !important;
}
.file-hint{
  padding:6px 14px !important;border-radius:999px !important;
  background:#e6f2ff !important;border:1px solid #c5def8 !important;color:#154f91 !important;
}
.form-actions{
  position:static !important;
  margin-top:16px !important;
  padding:10px !important;
  border:1px solid #dce7f2 !important;
  border-radius:11px !important;
  background:rgba(255,255,255,.82) !important;
  backdrop-filter:none !important;
}
.form-actions .btn{
  min-height:46px !important;padding:0 18px !important;border-radius:9px !important;
}
.form-actions .generate-format-btn{box-shadow:0 10px 24px rgba(20,104,220,.20);}

/* painel lateral */
#sidePanel.side-card{
  margin-left:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  border-radius:0 !important;
}
.modern-side-header{
  min-height:86px;
  padding:16px 18px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  background:rgba(255,255,255,.90);
  border:1px solid rgba(164,197,228,.32);
  border-left:5px solid #2990f3;
  border-radius:18px 18px 0 0;
  box-shadow:0 14px 34px rgba(44,93,145,.07);
}
.modern-side-heading{display:flex;align-items:center;gap:14px;min-width:0;}
.modern-side-icon{
  width:48px;height:48px;display:grid;place-items:center;flex:0 0 auto;border-radius:50%;
  background:#e0f0ff;color:#1783e8;
}
.modern-side-icon svg,.modern-refresh-btn svg,.last-row-icon svg,.modern-last10-icon svg{
  width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;
}
.modern-side-heading h3{margin:0 !important;font-size:17px !important;font-weight:900 !important;color:var(--ui-navy) !important;text-transform:uppercase;white-space:nowrap;}
.modern-side-heading p{margin:4px 0 0;font-size:12px;line-height:1.25;color:#5f7897;font-weight:600;max-width:245px;}
.modern-refresh-btn{
  min-height:44px;padding:0 16px;border-radius:10px;border:1px solid #d6e7f7;
  background:#f3f8fe;color:#164d87;display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:800;
  transition:.15s ease;
}
.modern-refresh-btn:hover{background:#eaf4ff;transform:translateY(-1px);}
.modern-refresh-btn svg{width:17px;height:17px;}
.modern-last-card{
  margin:0 !important;
  padding:12px 18px !important;
  border-radius:0 0 18px 18px !important;
  border:1px solid rgba(164,197,228,.32) !important;
  border-top:0 !important;
  background:rgba(255,255,255,.90) !important;
  box-shadow:0 18px 38px rgba(44,93,145,.07) !important;
  display:block !important;
  overflow:visible !important;
  -webkit-line-clamp:unset !important;
}
.last-data-row{
  display:grid;
  grid-template-columns:30px 112px minmax(0,1fr);
  align-items:center;
  gap:8px;
  min-height:54px;
  border-bottom:1px solid #dfeaf4;
}
.last-data-row:last-child{border-bottom:0;}
.last-row-icon{display:grid;place-items:center;color:#2186e7;font-size:24px;font-weight:900;}
.last-row-icon svg{width:20px;height:20px;}
.hash-icon{color:#83a3c4;font-size:25px;line-height:1;}
.last-row-label{color:#506c8d;font-size:14px;font-weight:700;}
.last-row-value{color:#15385f;font-size:14px;line-height:1.35;font-weight:700;overflow-wrap:anywhere;}
.last-number{font-size:15px;color:#123e78;}
.last-subject-row{align-items:start;padding:13px 0;}
.last-subject-row .last-row-icon,.last-subject-row .last-row-label{padding-top:1px;}
.modern-empty-last{padding:24px 6px;color:#7188a1;text-align:center;font-weight:700;}
.modern-last10{
  margin-top:18px;
  border:1px solid rgba(164,197,228,.32) !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.92) !important;
  box-shadow:0 16px 36px rgba(44,93,145,.07) !important;
  overflow:hidden !important;
}
.modern-last10 .last10-head{
  min-height:72px;
  padding:14px 18px !important;
  background:transparent !important;
}
.modern-last10-left{display:flex;align-items:center;gap:14px;min-width:0;}
.modern-last10-icon{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#e2f1ff;color:#1783e8;flex:0 0 auto;}
.modern-last10-icon svg{width:24px;height:24px;}
.modern-last10 .txt{font-size:16px !important;color:var(--ui-navy) !important;font-weight:900 !important;}
.modern-last10 small{display:block;margin-top:3px;color:#607b9a;font-size:12px;font-weight:600;}
.modern-last10-chevron{font-size:38px;line-height:1;color:#1474d7;font-weight:300;transition:transform .15s ease;}
.last10-body.open + .modern-last10-chevron{transform:rotate(90deg);}
.last10-body{padding:0 14px 14px !important;border-top:1px solid #e5eef7;}
.modern-recent-item{padding:11px 12px !important;border:1px solid #e1ebf5 !important;box-shadow:none !important;}
.modern-recent-top{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.modern-recent-top strong{color:#104d90;font-size:14px;}
.modern-recent-top span{color:#7b91a9;font-size:11px;font-weight:700;}
.modern-recent-destino{margin-top:5px;color:#315576;font-size:12px;font-weight:800;}
.modern-recent-assunto{margin-top:3px;color:#67819a;font-size:11.5px;font-weight:600;line-height:1.35;}

/* mantém a consulta abaixo ocupando a largura total */
.grid > #consultaBlock{margin-top:0 !important;border-radius:18px !important;background:rgba(255,255,255,.88) !important;box-shadow:0 16px 38px rgba(44,93,145,.06) !important;}

@media (max-width:1400px){
  .grid{grid-template-columns:minmax(0,1fr) 460px !important;}
  .h-title{font-size:34px !important;}
}
@media (max-width:1080px){
  .wrap{width:min(100% - 28px, 1060px) !important;}
  .header{grid-template-columns:90px 1fr !important;}
  .header-right{grid-column:1 / -1;justify-content:flex-end;margin-top:6px;}
  .grid{grid-template-columns:1fr !important;}
  .grid > #sidePanel{grid-column:1 !important;grid-row:2 !important;}
  .grid > #consultaBlock{grid-row:3 !important;}
}
@media (max-width:720px){
  .wrap{width:calc(100% - 18px) !important;padding-top:10px !important;}
  .header{grid-template-columns:68px 1fr !important;min-height:auto;gap:10px !important;}
  .crest{width:58px !important;height:58px !important;padding:5px !important;border-radius:12px !important;}
  .h-title{font-size:23px !important;text-align:left;}
  .subtitle{font-size:12px !important;text-align:left;margin-top:4px !important;}
  .header-right{justify-content:stretch !important;flex-wrap:wrap !important;}
  .user-badge{flex:1;min-width:0;overflow:hidden;}
  #userNameDisplay{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  #mainCard.card{padding:12px !important;border-radius:16px !important;}
  .modern-form-title{min-height:58px !important;}
  .form-row{gap:12px !important;margin-bottom:12px !important;}
  .field,.field.wide,.field.small{min-width:100% !important;max-width:none !important;flex-basis:100% !important;}
  .modern-side-header{align-items:flex-start;flex-direction:column;border-radius:16px 16px 0 0;}
  .modern-refresh-btn{width:100%;justify-content:center;}
  .last-data-row{grid-template-columns:26px 86px minmax(0,1fr);gap:7px;}
  .last-row-label,.last-row-value{font-size:12.5px;}
  .modern-last10-left{gap:10px;}
  .modern-last10 small{font-size:11px;}
}

.btn-icon{width:18px;height:18px;display:inline-grid;place-items:center;flex:0 0 auto;}
.btn-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.modern-action-btn,#btnLogout{display:inline-flex;align-items:center;justify-content:center;gap:8px;}


/* Ajuste fino pós-teste: mesma largura compacta, sem invasão e com grade estável */
html,body{overflow-x:hidden !important;}
.wrap{
  width:min(100% - 32px, 1296px) !important;
  max-width:1296px !important;
  margin:0 auto !important;
  padding:18px 16px 24px !important;
  box-sizing:border-box !important;
}
.grid{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 382px !important;
  gap:20px !important;
  align-items:start !important;
}
#mainCard,#sidePanel,#consultaBlock,.section,.form-row,.field,.field.small,.field.wide,
.input,select,textarea,.file-row{box-sizing:border-box !important;min-width:0 !important;}
#mainCard.card{padding:14px !important;border-radius:16px !important;}
.section{padding:14px !important;border-radius:14px !important;}
.modern-form-title{margin-bottom:14px !important;padding:14px 16px !important;border-radius:14px !important;}

/* Linhas do formulário: tamanhos controlados para não empurrar os cards */
#formNew .form-row-primary,
#formNew .form-row-secondary{
  display:grid !important;
  gap:14px !important;
  align-items:start !important;
  margin-bottom:14px !important;
}
#formNew .form-row-primary{
  grid-template-columns:minmax(190px, 32%) minmax(0,1fr) !important;
}
#formNew .form-row-secondary{
  grid-template-columns:150px minmax(190px,1.18fr) minmax(190px,1fr) 155px !important;
}
.field,.field.small,.field.wide{width:100% !important;max-width:none !important;flex:none !important;}
.input,select{width:100% !important;min-height:40px !important;}
textarea{width:100% !important;min-height:130px !important;}
#historico_acoes,.file-row{width:100% !important;}
.file-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:12px !important;
  align-items:center !important;
}
.file-row input[type="file"]{width:100% !important;max-width:none !important;}
.form-actions{margin-top:12px !important;}

/* Painel lateral */
#sidePanel.side-card{width:100% !important;padding:0 !important;margin:0 !important;min-width:0 !important;}
.modern-side-header{
  padding:14px 16px !important;
  min-height:auto !important;
  border-radius:16px 16px 0 0 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px 12px !important;
  align-items:start !important;
}
.modern-side-heading{min-width:0 !important;align-items:flex-start !important;}
.modern-side-heading > div{min-width:0 !important;}
.modern-side-heading h3{
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  line-height:1.15 !important;
  font-size:15.5px !important;
}
.modern-side-heading p{
  max-width:none !important;
  margin-top:5px !important;
  line-height:1.28 !important;
}
.modern-refresh-btn{
  flex:0 0 auto !important;
  min-width:116px !important;
  padding:0 13px !important;
  white-space:nowrap !important;
}
.modern-last-card{padding:8px 14px !important;}
.last-data-row{
  grid-template-columns:24px 86px minmax(0,1fr) !important;
  gap:8px !important;
  min-height:48px !important;
}
.last-row-label,.last-row-value{font-size:13px !important;}
.last-row-value{min-width:0 !important;overflow-wrap:anywhere !important;word-break:normal !important;}
.modern-last10{margin-top:14px !important;}
.modern-last10 .txt{white-space:normal !important;}
.grid > #consultaBlock{grid-column:1 / -1 !important;margin-top:0 !important;}

@media (max-width:1260px){
  .wrap{width:min(100% - 24px, 1180px) !important;}
  .grid{grid-template-columns:minmax(0,1fr) 350px !important;gap:16px !important;}
  #formNew .form-row-secondary{
    grid-template-columns:142px minmax(175px,1.15fr) minmax(170px,1fr) 148px !important;
    gap:11px !important;
  }
  .modern-side-header{
    grid-template-columns:1fr !important;
  }
  .modern-refresh-btn{
    justify-self:end !important;
    min-width:112px !important;
  }
}
@media (max-width:1080px){
  .wrap{width:min(100% - 20px, 980px) !important;padding:14px 10px 20px !important;}
  .grid{grid-template-columns:1fr !important;}
  #mainCard{grid-column:1 !important;grid-row:1 !important;}
  #sidePanel{grid-column:1 !important;grid-row:2 !important;}
  #consultaBlock{grid-column:1 !important;grid-row:3 !important;}
  #formNew .form-row-secondary{
    grid-template-columns:150px minmax(190px,1fr) minmax(190px,1fr) 150px !important;
  }
  .modern-side-header{grid-template-columns:minmax(0,1fr) auto !important;align-items:center !important;}
}
@media (max-width:820px){
  #formNew .form-row-primary,
  #formNew .form-row-secondary,
  .file-row{grid-template-columns:1fr !important;}
  .modern-side-header{grid-template-columns:1fr !important;}
  .modern-refresh-btn{justify-self:stretch !important;justify-content:center !important;}
}
@media (max-width:720px){
  .wrap{width:calc(100% - 14px) !important;padding:10px 0 16px !important;}
  #mainCard.card,#consultaBlock,#sidePanel.side-card{border-radius:14px !important;}
  .section{padding:12px !important;}
  .modern-form-title{padding:12px 14px !important;}
  .last-data-row{grid-template-columns:22px 78px minmax(0,1fr) !important;}
}


/* Botão PDF e visualizador integrado */
.row-actions{display:flex;align-items:center;gap:6px;white-space:nowrap;}
.acoes-cell{white-space:nowrap !important;}
.pdf-view-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;
  min-width:58px;
  background:#eef6ff !important;
  color:#0b5fae !important;
  border-color:#c7def4 !important;
  text-decoration:none !important;
  font-weight:800 !important;
}
.pdf-view-btn:hover{background:#dfefff !important;border-color:#a9ceef !important;transform:translateY(-1px);}
.pdf-btn-icon{width:15px;height:15px;display:inline-grid;place-items:center;}
.pdf-btn-icon svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
#consultaBlock th:nth-child(7),#consultaBlock td:nth-child(7){width:205px !important;min-width:205px !important;}

.pdf-viewer-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:12000;
  padding:22px;
  align-items:center;
  justify-content:center;
  background:rgba(8,28,50,.55);
  backdrop-filter:blur(5px);
}
.pdf-viewer-modal.open{display:flex;}
.pdf-viewer-dialog{
  width:min(1180px,96vw);
  height:min(820px,92vh);
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(177,205,232,.72);
  border-radius:18px;
  background:#fff;
  box-shadow:0 28px 90px rgba(3,22,43,.28);
}
.pdf-viewer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-bottom:1px solid #dfeaf4;
  background:linear-gradient(180deg,#fbfdff 0%,#f3f8fe 100%);
}
.pdf-viewer-heading{display:flex;align-items:center;gap:12px;min-width:0;}
.pdf-viewer-icon{
  width:42px;height:42px;flex:0 0 auto;display:grid;place-items:center;
  border-radius:12px;background:#e4f2ff;color:#1479dc;
}
.pdf-viewer-icon svg,.pdf-header-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.pdf-viewer-copy{min-width:0;}
.pdf-viewer-copy h3{margin:0;color:#0b315e;font-size:17px;font-weight:900;}
#pdfViewerMeta{margin-top:3px;color:#67809d;font-size:12.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:620px;}
.pdf-viewer-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto;}
.pdf-header-btn{
  min-height:40px;padding:0 13px;display:inline-flex;align-items:center;gap:7px;
  border:1px solid #cfe0f1;border-radius:10px;background:#fff;color:#174c83;font-weight:800;cursor:pointer;
}
.pdf-header-btn:hover{background:#edf6ff;}
.pdf-header-btn svg{width:17px;height:17px;}
.pdf-close-btn{
  width:40px;height:40px;border:1px solid #d5e2ee;border-radius:10px;background:#fff;color:#365a79;
  display:grid;place-items:center;font-size:27px;line-height:1;cursor:pointer;
}
.pdf-close-btn:hover{background:#f3f7fb;color:#0b315e;}
.pdf-viewer-body{position:relative;min-height:0;background:#e9eef4;}
#pdfViewerFrame{display:block;width:100%;height:100%;border:0;background:#f5f7fa;}
.pdf-viewer-loading{
  position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  background:#f3f7fb;color:#516d89;font-size:13px;
}
.pdf-viewer-loading.hidden{display:none;}
.pdf-loading-spinner{width:30px;height:30px;border:3px solid #cfe0ef;border-top-color:#1479dc;border-radius:50%;animation:pdfSpin .8s linear infinite;}
@keyframes pdfSpin{to{transform:rotate(360deg)}}
.pdf-viewer-footer{
  min-height:50px;padding:9px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  border-top:1px solid #dfeaf4;background:#fbfdff;color:#71869b;font-size:11.5px;
}
.pdf-viewer-footer .btn{min-height:34px;padding:6px 13px !important;}
@media(max-width:720px){
  .pdf-viewer-modal{padding:7px;}
  .pdf-viewer-dialog{width:100%;height:96vh;border-radius:14px;}
  .pdf-viewer-header{padding:10px;align-items:flex-start;}
  .pdf-viewer-icon{width:36px;height:36px;border-radius:10px;}
  .pdf-viewer-copy h3{font-size:15px;}
  #pdfViewerMeta{max-width:42vw;font-size:11px;}
  .pdf-header-btn span{display:none;}
  .pdf-header-btn{width:40px;padding:0;justify-content:center;}
  .pdf-viewer-footer span{display:none;}
  .pdf-viewer-footer{justify-content:flex-end;}
}


/* Ajuste final da coluna Ações: Editar + Excluir + PDF sempre visíveis */
#consultaBlock table{
  width:100% !important;
  table-layout:fixed !important;
}
#consultaBlock th:nth-child(1),#consultaBlock td:nth-child(1){width:9% !important;}
#consultaBlock th:nth-child(2),#consultaBlock td:nth-child(2){width:8.5% !important;}
#consultaBlock th:nth-child(3),#consultaBlock td:nth-child(3){width:12.5% !important;}
#consultaBlock th:nth-child(4),#consultaBlock td:nth-child(4){width:20% !important;min-width:0 !important;}
#consultaBlock th:nth-child(5),#consultaBlock td:nth-child(5){width:30% !important;min-width:0 !important;}
#consultaBlock th:nth-child(6),#consultaBlock td:nth-child(6){width:10% !important;}
#consultaBlock th:nth-child(7),#consultaBlock td:nth-child(7){
  width:220px !important;
  min-width:220px !important;
  max-width:220px !important;
  overflow:visible !important;
  padding-left:8px !important;
  padding-right:8px !important;
}
#consultaBlock td:nth-child(4),
#consultaBlock td:nth-child(5){
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
}
#consultaBlock .acoes-cell{
  overflow:visible !important;
  white-space:nowrap !important;
}
#consultaBlock .row-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:5px !important;
  flex-wrap:nowrap !important;
  width:100% !important;
}
#consultaBlock .row-actions .action-btn{
  min-width:0 !important;
  padding:6px 8px !important;
  font-size:12px !important;
  line-height:1.1 !important;
  border-radius:8px !important;
  flex:0 0 auto !important;
}
#consultaBlock .row-actions .pdf-view-btn{
  min-width:50px !important;
  padding-left:7px !important;
  padding-right:7px !important;
  gap:4px !important;
}
#consultaBlock .pdf-btn-icon,
#consultaBlock .pdf-btn-icon svg{
  width:14px !important;
  height:14px !important;
}
@media(max-width:1050px){
  #consultaBlock table{min-width:980px !important;}
}


/* Ajuste fino: ações mais compactas e histórico com menor altura */
#historico_acoes{
  min-height:88px !important;
  height:88px;
  resize:vertical;
}
#formNew .form-actions{
  gap:8px !important;
  padding-top:9px !important;
  margin-top:9px !important;
}
#formNew .form-actions .btn{
  min-height:38px !important;
  height:38px !important;
  padding:0 14px !important;
  border-radius:9px !important;
  font-size:12.5px !important;
  gap:7px !important;
}
#formNew .form-actions .generate-format-btn{
  min-width:142px !important;
  box-shadow:0 7px 18px rgba(20,104,220,.17) !important;
}
#formNew .form-actions #btnClear{
  min-width:96px !important;
}
@media (max-width:720px){
  #historico_acoes{min-height:84px !important;height:84px;}
  #formNew .form-actions .btn{min-height:38px !important;height:38px !important;flex:0 1 auto !important;}
}


/* Correção pontual: lupa centralizada e selo Opcional contido na linha do arquivo */
#consultaBlock .search-box{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  min-width:0 !important;
  height:40px !important;
}
#consultaBlock .search-icon{
  position:absolute !important;
  left:13px !important;
  top:50% !important;
  width:16px !important;
  height:16px !important;
  margin:0 !important;
  padding:0 !important;
  display:block !important;
  transform:translateY(-50%) !important;
  transform-origin:center !important;
  pointer-events:none !important;
  z-index:2 !important;
}
#consultaBlock .search-input{
  height:40px !important;
  min-height:40px !important;
  padding:0 14px 0 40px !important;
  line-height:40px !important;
}

#formNew .file-row{
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:10px !important;
  width:100% !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}
#formNew .file-row input[type="file"]{
  flex:1 1 auto !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  box-sizing:border-box !important;
}
#formNew .file-hint{
  flex:0 0 auto !important;
  margin:0 !important;
  white-space:nowrap !important;
  align-self:center !important;
  position:static !important;
  transform:none !important;
}
@media(max-width:620px){
  #formNew .file-row{
    flex-wrap:wrap !important;
    overflow:visible !important;
  }
  #formNew .file-row input[type="file"]{
    flex:1 1 100% !important;
    width:100% !important;
  }
}


/* Geometria do editor e do documento institucional. */

.delete-modal{display:none;position:fixed;inset:0;background:rgba(10,34,60,.52);backdrop-filter:blur(4px);align-items:center;justify-content:center;z-index:10050;padding:18px}
.delete-modal-box{width:min(440px,100%);background:#fff;border-radius:17px;border:1px solid #dbe7f1;box-shadow:0 24px 70px rgba(10,34,60,.24);padding:20px}
.delete-modal-box h3{margin:0 0 6px;color:#173a63;font-size:19px}.delete-modal-sub{margin:0 0 8px;color:#647d98;font-size:13px}
.delete-summary-oficio{margin:10px 0 12px;padding:10px 11px;border:1px solid #e0e9f2;border-radius:10px;background:#f8fbfe;color:#345a7c;font-size:12.5px;line-height:1.4}
.delete-modal-box textarea{width:100%;box-sizing:border-box;min-height:95px;border:1px solid #cad9e7;border-radius:10px;padding:10px;resize:vertical}
.delete-progress-oficio{display:none;align-items:center;gap:8px;margin-top:10px;padding:9px 10px;border-radius:9px;background:#f5f9fd;color:#496987;font-size:12.5px;font-weight:750}.delete-progress-oficio.show{display:flex}.delete-progress-oficio.error{background:#fff3f3;color:#a82830}
.delete-spinner{width:15px;height:15px;border:2px solid rgba(31,111,235,.2);border-top-color:#1f6feb;border-radius:50%;animation:deleteSpin .7s linear infinite;flex:0 0 auto}@keyframes deleteSpin{to{transform:rotate(360deg)}}
.delete-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.delete-modal-actions .btn{min-height:38px;padding:0 14px}.delete-modal .btn.danger{background:#d94b58 !important;color:#fff !important;border-color:#d94b58 !important}.delete-modal .btn.danger:hover{background:#c83e4b !important}


.form-row-documento{margin-top:-2px!important}
.document-composer-block{margin-top:12px;padding:16px;border:1px solid #dbe7f2;border-radius:15px;background:#f8fbff}
.document-composer-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px}
.document-composer-head strong{display:block;color:#173b60;font-size:14px}.document-composer-head small{display:block;color:#738aa1;font-size:11.5px;margin-top:3px}
.document-body-editor{width:100%;min-height:190px;resize:vertical;border:1px solid #cbd9e6;border-radius:12px;padding:13px 14px;font:14px/1.55 Arial,sans-serif;background:#fff;box-sizing:border-box;outline:none}.document-body-editor:focus{border-color:#7eb3ea;box-shadow:0 0 0 3px rgba(31,111,235,.08)}
.document-fixed-note{font-size:11.5px;color:#617a92;margin-top:8px}.doc-preview-btn{white-space:nowrap;min-height:36px!important;height:36px!important;padding:0 14px!important}
.generated-doc-note{margin-top:12px;display:flex;align-items:center;gap:10px;padding:11px 13px;border-radius:12px;background:#eef7ff;border:1px solid #d3e9fb;color:#21496b}.generated-doc-note .generated-doc-icon{font-size:10px;font-weight:900;background:#0b5cab;color:#fff;border-radius:8px;padding:6px 7px;letter-spacing:.3px}.generated-doc-note strong{display:block;font-size:12.5px}.generated-doc-note small{display:block;font-size:11px;color:#678198;margin-top:2px}
.doc-model-modal{position:fixed;inset:0;background:rgba(11,28,45,.72);z-index:10050;display:none;align-items:flex-start;justify-content:center;padding:26px;overflow:auto}.doc-model-modal.open{display:flex}.doc-model-shell{width:min(980px,96vw);background:#f4f7fa;border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.3);overflow:hidden}.doc-model-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#fff;border-bottom:1px solid #dbe4ec}.doc-model-toolbar strong{color:#183d62}.doc-model-close{border:0;background:#edf3f8;border-radius:9px;width:34px;height:34px;cursor:pointer;font-size:20px;color:#365b7a}.doc-a4-wrap{padding:22px;overflow:auto;text-align:center}.doc-a4{position:relative;margin:0 auto;width:794px;height:1123px;background:#fff url('./modelo-oficio-fundo.png') center/100% 100% no-repeat;box-shadow:0 4px 20px rgba(0,0,0,.18);text-align:left;font-family:'Times New Roman',serif;color:#111;transform-origin:top center}.doc-overlay{position:absolute;left:72px;right:72px;top:121px;font-size:16px;line-height:1.18}.doc-preview-number{font-weight:700;margin:0 0 13px}.doc-preview-date{text-align:right;margin:0 0 12px}.doc-preview-recipient{margin:0 0 18px;line-height:1.08}.doc-preview-recipient b{display:block}.doc-preview-subject{margin:0 0 18px;font-weight:700}.doc-preview-subject span{text-decoration:underline}.doc-preview-body{margin-left:48px;text-align:justify}.doc-preview-body p{margin:0;text-indent:48px;line-height:1.12}.doc-preview-closing{margin:16px 0 0 48px}.doc-preview-signoff{margin:18px 0 0 48px}.doc-preview-signature{text-align:center;font-weight:700;margin-top:22px;line-height:1.08}.word-action-btn{background:#edf7ff!important;border-color:#b8d7f0!important;color:#175f98!important}
@media(max-width:900px){.doc-a4{transform:scale(.72);margin-bottom:-315px}.document-composer-head{align-items:flex-start;flex-direction:column}.doc-preview-btn{width:100%}}@media(max-width:650px){.doc-a4{transform:scale(.52);margin-bottom:-535px}.doc-a4-wrap{padding:10px}}


.criar-page .grid{grid-template-columns:minmax(0,1fr) minmax(360px,470px)!important;gap:18px!important;align-items:start!important}
.criar-page #consultaBlock{display:none!important}
.header-nav-v47{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.signature-editor-v47{margin:14px 0;padding:14px;border:1px solid #dbe7f1;border-radius:14px;background:#f8fbfe}
.signature-editor-title{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:10px}.signature-editor-title strong{color:#173a63}.signature-editor-title small{color:#6d8298}
.signature-grid-v47{display:grid;grid-template-columns:1fr 1fr;gap:10px}.signature-grid-v47 .wide{grid-column:1/-1}
.live-preview-badge-v47{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#eef6ff;color:#245b88;font-size:12px;font-weight:800;border:1px solid #d4e6f5}
.live-preview-panel-v47{position:sticky;top:14px;padding:14px!important;min-width:0;overflow:hidden}
.live-preview-head-v47{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}.live-preview-head-v47 h3{margin:0;color:#183d62;font-size:17px}.live-preview-head-v47 p{margin:3px 0 0;color:#70859a;font-size:12px;line-height:1.35}
.preview-toggle-v47{display:none!important;min-height:34px!important;padding:0 10px!important}
.live-preview-stage-v47{background:#eaf0f5;border:1px solid #d7e1e9;border-radius:12px;padding:10px;overflow:hidden}
.live-doc-paper-v47{position:relative;width:100%;aspect-ratio:794/1123;background:#fff url('./modelo-oficio-fundo.png') center/100% 100% no-repeat;box-shadow:0 3px 15px rgba(14,41,68,.16);font-family:'Times New Roman',serif;color:#111;overflow:hidden}
.live-doc-overlay-v47{position:absolute;left:9.1%;right:9.1%;top:10.7%;font-size:clamp(8px,1vw,11px);line-height:1.12}
.live-doc-overlay-v47 .doc-preview-number{font-weight:700;margin:0 0 1.3em}.live-doc-overlay-v47 .doc-preview-date{text-align:right;margin:0 0 1.25em}.live-doc-overlay-v47 .doc-preview-recipient{margin:0 0 1.45em;line-height:1.08}.live-doc-overlay-v47 .doc-preview-recipient b{display:block}.live-doc-overlay-v47 .doc-preview-subject{margin:0 0 1.5em;font-weight:700}.live-doc-overlay-v47 .doc-preview-subject span{text-decoration:underline}.live-doc-overlay-v47 .doc-preview-body{margin-left:7%;text-align:justify}.live-doc-overlay-v47 .doc-preview-body p{margin:0;text-indent:7%;line-height:1.12}.live-doc-overlay-v47 .doc-preview-closing{margin:1.4em 0 0 7%}.live-doc-overlay-v47 .doc-preview-signoff{margin:1.6em 0 0 7%}.live-doc-overlay-v47 .doc-preview-signature{text-align:center;font-weight:700;margin-top:2em;line-height:1.08}
.preview-note-v47{font-size:11px;color:#71869a;margin-top:8px;text-align:center}
@media(max-width:1120px){.criar-page .grid{grid-template-columns:1fr!important}.live-preview-panel-v47{position:relative;top:auto}.preview-toggle-v47{display:inline-flex!important}.live-preview-panel-v47.preview-collapsed .live-preview-stage-v47,.live-preview-panel-v47.preview-collapsed .preview-note-v47{display:none}.signature-grid-v47{grid-template-columns:1fr}}


.format-actions-v48{align-items:center;gap:9px;flex-wrap:wrap}
.word-format-btn-v48{background:#1769aa!important;border-color:#1769aa!important}
.pdf-format-btn-v48{background:#a93645!important;border-color:#a93645!important}
.format-actions-v48 .generate-format-btn{min-width:138px}
@media(max-width:720px){.format-actions-v48 .generate-format-btn{flex:1 1 140px}.format-actions-v48 #btnClear{flex:1 1 100%}}


.rich-editor-card-v50{padding-bottom:0!important;overflow:visible!important}
.rich-toolbar-v50{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:9px;border:1px solid #cbddeb;border-bottom:0;border-radius:11px 11px 0 0;background:#f7fafc;position:sticky;top:0;z-index:8}
.editor-tool-v50{min-height:34px;border:1px solid transparent;background:#fff;color:#173c60;border-radius:7px;padding:0 9px;font:700 12px/1 Arial,sans-serif;cursor:pointer;box-shadow:0 1px 2px rgba(31,69,101,.05)}
.editor-tool-v50:hover,.editor-tool-v50:focus-visible{border-color:#9ec4e3;background:#eef6fd;outline:0}.editor-tool-v50.active{background:#dceeff;border-color:#83b7df}
.editor-select-v50{height:34px;border:1px solid #cbddeb;border-radius:7px;background:#fff;color:#193f62;padding:0 28px 0 8px;font-size:12px;max-width:160px}.editor-size-v50{max-width:72px}
.editor-separator-v50{width:1px;height:25px;background:#d4e1eb;margin:0 2px}.editor-color-tool-v50{position:relative;display:inline-flex;align-items:center;justify-content:center;height:34px;min-width:38px;border:1px solid transparent;background:#fff;border-radius:7px;cursor:pointer;font:800 14px Arial;color:#173c60}.editor-color-tool-v50 input{position:absolute;inset:auto 4px 3px;width:30px;height:5px;border:0;padding:0;background:transparent;cursor:pointer}.editor-highlight-v50 span{font-size:15px}
.danger-soft-v50{color:#9a3a3a}.table-context-v50{display:none}.rich-editor-v50:focus-within~* .table-context-v50{display:inline-flex}
.rich-editor-v50{min-height:360px;max-height:700px;overflow:auto;border:1px solid #cbddeb;border-radius:0 0 11px 11px;background:#fff;padding:28px 34px;font-family:'Times New Roman',serif;font-size:12pt;line-height:1.35;color:#111;outline:none;white-space:normal;overflow-wrap:anywhere;word-break:normal;box-shadow:inset 0 1px 0 rgba(0,0,0,.02)}
.rich-editor-v50:focus{border-color:#79aeda;box-shadow:0 0 0 3px rgba(65,141,199,.12)}.rich-editor-v50:empty:before{content:attr(data-placeholder);color:#8a9bad;pointer-events:none}.rich-editor-v50 div,.rich-editor-v50 p{margin:0 0 9px;text-align:justify;overflow-wrap:anywhere;word-break:break-word}.rich-editor-v50 ul,.rich-editor-v50 ol{margin:0 0 10px 30px;padding-left:18px}.rich-editor-v50 li{margin:3px 0;overflow-wrap:anywhere}.rich-editor-v50 table{width:100%;border-collapse:collapse;table-layout:fixed;margin:10px 0}.rich-editor-v50 td,.rich-editor-v50 th{border:1px solid #333;padding:5px 7px;min-width:40px;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}.rich-editor-v50 td:focus,.rich-editor-v50 th:focus{outline:2px solid #75a9d2;outline-offset:-2px}
.editor-footer-v50{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#71869a;font-size:11px;padding:7px 3px 0}.editor-footer-v50 span:first-child{font-weight:800;color:#496986}
.table-dialog-v50{position:fixed;inset:0;background:rgba(11,28,45,.55);z-index:12000;align-items:center;justify-content:center;padding:20px}.table-dialog-v50:not([hidden]){display:flex}.table-dialog-card-v50{width:min(380px,94vw);background:#fff;border-radius:14px;padding:18px;box-shadow:0 20px 70px rgba(0,0,0,.28)}.table-dialog-card-v50 strong{display:block;color:#173c60;font-size:18px;margin-bottom:13px}.table-dialog-grid-v50{display:grid;grid-template-columns:1fr 1fr;gap:12px}.table-dialog-grid-v50 label{font-weight:800;color:#294c6c;font-size:12px}.table-dialog-grid-v50 input{width:100%;height:40px;margin-top:5px;border:1px solid #cadce9;border-radius:8px;padding:0 10px;font-size:15px}.table-dialog-actions-v50{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.rich-preview-body-v50{overflow-wrap:anywhere!important;word-break:break-word!important}.rich-preview-body-v50 p,.rich-preview-body-v50 div{overflow-wrap:anywhere!important;word-break:break-word!important}.rich-preview-body-v50 table{width:100%;border-collapse:collapse;table-layout:fixed;margin:.55em 0;text-indent:0!important}.rich-preview-body-v50 td,.rich-preview-body-v50 th{border:1px solid #222;padding:.22em .32em;vertical-align:top;overflow-wrap:anywhere;word-break:break-word;text-indent:0!important}.rich-preview-body-v50 ul,.rich-preview-body-v50 ol{margin:.35em 0 .45em 2em;padding:0;text-indent:0}.rich-preview-body-v50 li{margin:.1em 0;text-indent:0;overflow-wrap:anywhere}.live-doc-overlay-v47{bottom:11.2%!important;overflow:hidden!important}.live-doc-overlay-v47 .doc-preview-body{max-height:none!important}.preview-note-v47:before{content:'Prévia visual da primeira página. ';font-weight:800}
@media(max-width:760px){.rich-toolbar-v50{position:relative}.editor-select-v50{max-width:130px}.editor-separator-v50{display:none}.rich-editor-v50{padding:20px 18px;min-height:310px}.table-dialog-grid-v50{grid-template-columns:1fr}}


/* v51 — o próprio modelo Word passa a ser a área de edição. */
.criar-page .grid{display:block!important;max-width:1380px!important;margin:0 auto!important}
.criar-page #mainCard{width:100%!important;max-width:none!important;overflow:visible!important;padding:14px!important}
.criar-page #sidePanel{display:none!important}
.criar-page #formNew>.section{display:none!important}
.word-editor-v51{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.word-editor-topbar-v51{display:grid;grid-template-columns:180px minmax(260px,1fr) auto;gap:12px;align-items:end;padding:12px 14px;border:1px solid #d8e5ef;border-radius:14px;background:#f8fbfe}
.word-editor-topbar-v51 label{display:flex;flex-direction:column;gap:6px;font:800 12px/1.2 Arial,sans-serif;color:#234b70}.word-editor-topbar-v51 .input,.word-editor-topbar-v51 textarea{width:100%;box-sizing:border-box}.word-editor-topbar-v51 textarea{min-height:42px;max-height:88px;resize:vertical}
.word-actions-host-v51{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.word-actions-host-v51 .grow{display:none}.word-actions-host-v51 #statusMsg{width:100%;text-align:right;min-height:16px}
.word-ribbon-v51{position:sticky;top:8px;z-index:25;border:1px solid #cbddeb;border-radius:11px;background:#f7fafc;box-shadow:0 8px 22px rgba(31,69,101,.08)}
.word-ribbon-v51 .rich-toolbar-v50{position:static!important;border:0!important;border-radius:11px!important}
.word-editor-canvas-v51{overflow:auto;padding:16px;border:1px solid #d8e3ec;border-radius:14px;background:#e9eef3}
.word-page-v51{position:relative;width:794px;height:1123px;margin:0 auto;background:#fff url('./modelo-oficio-fundo.png') center/100% 100% no-repeat;box-shadow:0 5px 22px rgba(26,48,69,.18);font-family:'Times New Roman',serif;color:#111;overflow:hidden}
.word-document-v51{position:absolute;left:72px;right:72px;top:116px;bottom:148px;display:flex;flex-direction:column;font-size:16px;line-height:1.16}
.word-line-number-v51{font-weight:700;display:flex;align-items:baseline;white-space:nowrap;margin-bottom:13px}.word-line-number-v51 .word-field-v51{font-weight:700}
.word-line-date-v51{display:flex;justify-content:flex-end;align-items:center;gap:4px;margin-bottom:14px;white-space:nowrap}
.word-date-display-v52{position:relative;display:inline-flex;align-items:center;gap:3px;min-height:24px;padding:1px 4px;border-radius:5px;cursor:pointer}
.word-date-display-v52:hover{background:rgba(12,77,145,.06)}
.word-date-display-v52:focus-within{outline:2px solid rgba(30,111,214,.28);outline-offset:2px}
#wordDataTextV52{font:inherit;color:inherit;white-space:nowrap}
#wordDataHostV51{position:absolute;inset:0;display:block!important}
#wordDataHostV51 #data_registo{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;opacity:0!important;cursor:pointer!important;border:0!important;padding:0!important;margin:0!important}
.word-date-hint-v52{font-family:Arial,sans-serif;font-size:9px;color:#6b7d8f;margin-left:3px;opacity:.72}

.word-recipient-v51{margin-bottom:16px;line-height:1.06}.word-recipient-v51 #destinatario{font-weight:700;text-transform:uppercase}.word-recipient-v51 #destinatario_cargo{display:block;margin-top:1px}
.word-subject-v51{display:flex;gap:6px;align-items:flex-start;margin-bottom:17px;font-weight:700}.word-subject-v51 #assunto{font-weight:700;text-decoration:underline;flex:1;min-width:0}
.word-field-v51{border:1px solid transparent!important;background:transparent!important;box-shadow:none!important;border-radius:3px!important;padding:1px 3px!important;height:auto!important;min-height:22px!important;font:inherit!important;color:#111!important;outline:none!important}.word-field-v51:hover{background:rgba(223,239,255,.35)!important}.word-field-v51:focus{border-color:#79aeda!important;background:rgba(237,247,255,.9)!important;box-shadow:0 0 0 2px rgba(65,141,199,.10)!important}.word-field-v51::placeholder{color:#8a96a1!important;font-style:italic}.word-field-v51:disabled{opacity:.65!important}
#wordNumeroHostV51{display:inline-flex;align-items:baseline}.word-editor-v51 #numero_oficio{width:100px!important;text-align:left}.word-editor-v51 #data_registo{width:142px!important}.word-editor-v51 #destinatario{width:100%!important}.word-editor-v51 #destinatario_cargo{width:100%!important}.word-editor-v51 #assunto{width:100%!important}
.word-body-region-v51{flex:1;min-height:0;display:flex;flex-direction:column}.word-body-host-v51{flex:1;min-height:0}.word-editor-v51 #corpoEditor{width:100%!important;box-sizing:border-box!important;min-height:390px!important;max-height:485px!important;overflow-y:auto!important;border:1px solid transparent!important;border-radius:4px!important;background:transparent!important;padding:0 0 4px!important;box-shadow:none!important;font-family:'Times New Roman',serif!important;font-size:12pt!important;line-height:1.16!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;color:#111!important}.word-editor-v51 #corpoEditor:focus{border-color:#91b9d8!important;background:rgba(255,255,255,.80)!important;box-shadow:0 0 0 2px rgba(65,141,199,.08)!important}.word-editor-v51 #corpoEditor div,.word-editor-v51 #corpoEditor p{margin:0 0 8px!important;text-align:justify;overflow-wrap:anywhere!important;word-break:break-word!important}.word-editor-v51 #corpoEditor table{width:100%!important;table-layout:fixed!important;border-collapse:collapse!important}.word-editor-v51 #corpoEditor td,.word-editor-v51 #corpoEditor th{overflow-wrap:anywhere!important;word-break:break-word!important}
.word-overflow-v51{display:none;margin-top:5px;padding:5px 8px;border-radius:7px;background:#fff5d9;color:#755400;font:700 10px/1.3 Arial,sans-serif}.word-overflow-v51.show{display:block}
.word-signoff-v51{margin:12px 0 0 48px}.word-signature-v51{margin-top:16px;text-align:center;line-height:1.05;font-weight:700}.word-signature-v51 .word-field-v51{text-align:center;display:block;width:72%!important;margin:0 auto;font-weight:700}.word-signature-v51 #assinatura_cargo,.word-signature-v51 #assinatura_unidade{font-weight:700}
.word-model-caption-v51{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#627a8e;font:12px/1.35 Arial,sans-serif;padding:0 4px}.word-model-caption-v51 strong{color:#204b70}.word-model-caption-v51 code{background:#edf3f7;border-radius:5px;padding:2px 5px}
.word-hidden-origin-v51{display:none!important}
@media(max-width:980px){.word-editor-topbar-v51{grid-template-columns:1fr}.word-actions-host-v51{justify-content:flex-start}.word-actions-host-v51 #statusMsg{text-align:left}.word-editor-canvas-v51{padding:10px}.word-ribbon-v51{position:relative;top:auto}}


/* v55 — ribbon Word funcional + protocolo/assinatura + paginação estabilizada */
.word-toolbar-v53{display:flex!important;align-items:stretch!important;gap:0!important;flex-wrap:wrap!important;padding:4px 6px 0!important;background:#fbfcfe!important;border:1px solid #c9d6e2!important;border-radius:6px!important;box-shadow:0 2px 7px rgba(20,53,82,.08)!important;overflow:visible}
.word-toolbar-v53 .ribbon-group-v53{position:relative;display:flex;flex-direction:column;justify-content:flex-start;gap:3px;padding:4px 7px 18px;border-right:1px solid #d6dfe7;min-height:78px}
.word-toolbar-v53 .ribbon-group-v53:last-child{border-right:0}.ribbon-controls-v53{display:flex;align-items:center;gap:3px;flex-wrap:wrap;min-height:31px}.ribbon-label-v53{position:absolute;left:0;right:0;bottom:2px;text-align:center;font:10px/1.1 Arial,sans-serif;color:#5e6974;pointer-events:none}
.word-toolbar-v53 .editor-tool-v50{height:27px;min-height:27px;min-width:27px;padding:0 6px;border-radius:3px;background:transparent;font:600 12px/1 Arial,sans-serif;box-shadow:none}.word-toolbar-v53 .editor-tool-v50:hover,.word-toolbar-v53 .editor-tool-v50:focus-visible{background:#e9f2fb;border-color:#9dbfe0}.word-toolbar-v53 .editor-tool-v50 span{font-size:10px;margin-left:3px}.word-toolbar-v53 .editor-select-v50{height:27px;border-radius:3px;font-size:11px;padding-left:5px;padding-right:22px}.editor-style-v53{width:108px}.editor-font-v53{width:145px}.editor-line-v53{width:58px}.editor-border-v53{width:102px}.word-toolbar-v53 .editor-color-tool-v50{height:27px;min-width:30px;border-radius:3px;background:transparent}.word-toolbar-v53 .editor-color-tool-v50:hover{background:#e9f2fb;border-color:#9dbfe0}.word-toolbar-v53 .editor-color-tool-v50 input{bottom:2px;height:4px;width:22px}.ribbon-insert-controls-v53 .editor-tool-v50{height:57px;min-width:48px;display:flex;flex-direction:column;justify-content:center;gap:3px;font-size:18px}.ribbon-insert-controls-v53 .editor-tool-v50 span{margin:0;font-size:9px}.ribbon-table-v53{min-width:160px}.word-toolbar-v53 .table-context-v50{display:none}
.word-pages-v53{display:flex;flex-direction:column;align-items:center;gap:26px;min-width:820px}.word-page-v51{margin:0!important;flex:none}.word-page-cont-v53{position:relative}.word-cont-document-v53{position:absolute;left:72px;right:72px;top:124px;bottom:148px;display:flex;flex-direction:column;font-family:'Times New Roman',serif;font-size:16px;line-height:1.16}.word-cont-body-v53{height:710px!important;min-height:710px!important;max-height:710px!important;overflow:hidden!important;border:1px solid transparent;border-radius:4px;background:transparent;padding:0!important;box-sizing:border-box;outline:none;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.word-cont-body-v53:focus{border-color:#91b9d8;background:rgba(255,255,255,.78);box-shadow:0 0 0 2px rgba(65,141,199,.08)}
.word-page-first-v53 .word-body-host-v51{height:500px!important;min-height:500px!important;max-height:500px!important;flex:none!important}.word-editor-v51 #corpoEditor{height:500px!important;min-height:500px!important;max-height:500px!important;overflow:hidden!important}.word-body-editable-v53>div,.word-body-editable-v53>p,.word-body-editable-v53>blockquote,.word-body-editable-v53>ul,.word-body-editable-v53>ol,.word-body-editable-v53>table{overflow-wrap:anywhere;word-break:break-word}.word-body-editable-v53>div,.word-body-editable-v53>p,.word-body-editable-v53>blockquote{margin:0 0 8px;text-align:justify}.word-body-editable-v53>div:not([data-no-indent="1"]):not(.manual-page-break-v53),.word-body-editable-v53>p:not([data-no-indent="1"]){text-indent:48px}.word-body-editable-v53 ul,.word-body-editable-v53 ol{margin:0 0 8px 30px;padding-left:18px}.word-body-editable-v53 li{margin:2px 0}.word-body-editable-v53 table{width:100%;border-collapse:collapse;table-layout:fixed;margin:8px 0}.word-body-editable-v53 td,.word-body-editable-v53 th{border:1px solid #222;padding:4px 6px;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}.word-body-editable-v53 table div,.word-body-editable-v53 table p,.word-body-editable-v53 li{text-indent:0!important}
.word-closing-host-v53{min-height:102px;display:flex;flex-direction:column;justify-content:flex-start}.word-cont-document-v53 .word-closing-host-v53{margin-top:6px}.word-closing-block-v53{width:100%}.word-closing-block-v53 .word-signoff-v51{margin-top:5px}.word-closing-block-v53 .word-signature-v51{margin-top:12px}
.word-page-badge-v53{position:absolute;right:-3px;top:-22px;font:700 11px/1 Arial,sans-serif;color:#50677b;background:#fff;border:1px solid #d0dae3;border-radius:12px;padding:4px 8px;box-shadow:0 2px 7px rgba(0,0,0,.08)}
.word-overflow-v51{display:none!important}.manual-page-break-v53{position:relative;height:20px!important;min-height:20px!important;margin:8px 0!important;border-top:1px dashed #7a8d9f!important;text-indent:0!important;user-select:none;color:#6d7f8e;font:10px/18px Arial,sans-serif;text-align:center}.manual-page-break-v53:after{content:'Quebra de página';position:relative;top:-10px;background:rgba(255,255,255,.96);padding:0 8px}.horizontal-rule-v53{border:0;border-top:1px solid #111;margin:7px 0;height:0;min-height:0!important;text-indent:0!important}
.word-show-marks-v53 .word-body-editable-v53>div:not(.manual-page-break-v53):after,.word-show-marks-v53 .word-body-editable-v53>p:after{content:' ¶';color:#7a8b9a;font:400 9px Arial,sans-serif}.word-show-marks-v53 .word-body-editable-v53 li:after{content:' ¶';color:#7a8b9a;font:400 9px Arial,sans-serif}
.word-pagination-status-v53{position:absolute;left:10px;top:-22px;font:600 10px Arial,sans-serif;color:#6a7c8d}.word-pagination-status-v53.busy{color:#1b6097}
@media(max-width:1050px){.word-editor-canvas-v51{overflow:auto}.word-toolbar-v53{position:relative!important;top:auto!important}.word-pages-v53{align-items:flex-start}.ribbon-group-v53{flex:1 1 260px}}


/* v54 — correções funcionais da Ribbon e seleção */
.word-toolbar-v53 .editor-tool-v50:active{background:#dceafb!important;border-color:#7fa9cf!important}
.word-body-editable-v53{caret-color:#0b5cab!important}
.word-body-editable-v53:focus{outline:none!important}
.word-body-editable-v53 ::selection{background:#b9daf7;color:#111}
.word-page-v51:focus-within{box-shadow:0 5px 22px rgba(26,48,69,.18),0 0 0 2px rgba(51,127,191,.18)}


/* v55 — tratamento protocolar editável, assinatura sempre acessível e paginação estabilizada */
.word-recipient-v51 .word-treatment-host-v55{display:block;margin-bottom:1px;font-weight:700}
.word-editor-v51 #tratamento_destinatario{width:auto!important;min-width:150px!important;max-width:100%!important;font-weight:700!important;padding-right:22px!important}
.word-signature-tools-v55{grid-column:1/-1;border-top:1px solid #dbe7f0;padding-top:9px;margin-top:1px}
.word-signature-tools-v55>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;font:800 12px/1.2 Arial,sans-serif;color:#234b70;user-select:none}
.word-signature-tools-v55>summary::-webkit-details-marker{display:none}.word-signature-tools-v55>summary:before{content:'✍';font-size:14px}.word-signature-tools-v55[open]>summary{margin-bottom:9px}
.word-signature-grid-v55{display:grid;grid-template-columns:1fr 1fr 1.35fr;gap:8px}.word-signature-grid-v55 .input{font:600 12px Arial,sans-serif!important;background:#fff!important;border:1px solid #ccdce8!important;border-radius:8px!important;padding:8px 10px!important;height:36px!important}
.word-signature-edit-v55{display:block;width:76%;max-width:520px;margin:0 auto;min-height:18px;padding:1px 3px;border:1px solid transparent;border-radius:3px;outline:none;text-align:center;font-weight:700;overflow-wrap:anywhere;word-break:break-word}
.word-signature-edit-v55:hover{background:rgba(223,239,255,.35);border-color:rgba(121,174,218,.25)}.word-signature-edit-v55:focus{background:rgba(237,247,255,.92);border-color:#79aeda;box-shadow:0 0 0 2px rgba(65,141,199,.10)}
.word-signature-edit-v55[data-placeholder]:empty:before{content:attr(data-placeholder);color:#8998a5;font-style:italic;font-weight:400}
.word-page-v51.word-first-no-closing-v55 .word-body-host-v51{flex:1!important;height:auto!important;min-height:0!important;max-height:none!important}
.word-page-v51.word-first-no-closing-v55 #corpoEditor{height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
.word-body-editable-v53>div,.word-body-editable-v53>p,.word-body-editable-v53>blockquote,.word-body-editable-v53>ul,.word-body-editable-v53>ol,.word-body-editable-v53>table{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;float:none!important;position:relative!important;left:auto!important;right:auto!important;white-space:normal!important}
.word-body-editable-v53 span,.word-body-editable-v53 font{max-width:100%;white-space:normal!important}
@media(max-width:900px){.word-signature-grid-v55{grid-template-columns:1fr}}


/* v56 — arquitetura estável: edição contínua + visualização paginada separada.
   O editor NÃO move nem divide o DOM durante a digitação. */
.word-editor-canvas-v51{padding:18px!important;background:#e9eef3!important;overflow:auto!important}
.word-pages-v53{display:block!important;min-width:820px!important}
.word-page-cont-v53{display:none!important}
#wordPageV51{height:auto!important;min-height:1123px!important;overflow:visible!important;background:#fff!important;display:block!important;position:relative!important}
#wordPageV51::before{content:"";display:block;height:145px;background:#fff url('./modelo-oficio-header-v56.png') center top/100% auto no-repeat;pointer-events:none}
#wordPageV51::after{content:"";display:block;height:155px;background:#fff url('./modelo-oficio-footer-v56.png') center bottom/100% auto no-repeat;pointer-events:none;margin-top:24px}
#wordPageV51 .word-document-v51{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;display:block!important;margin:0 72px!important;min-height:760px!important;font-size:16px!important;line-height:1!important;z-index:1}
#wordPageV51 .word-document-v51::before{content:"";position:absolute;z-index:-1;pointer-events:none;left:50%;top:250px;width:54%;height:620px;transform:translateX(-50%);background:url('./modelo-oficio-watermark-v56.png') center/contain no-repeat;opacity:.68}
.word-page-first-v53 .word-body-host-v51,.word-page-v51.word-first-no-closing-v55 .word-body-host-v51{height:auto!important;min-height:0!important;max-height:none!important;display:block!important;flex:none!important}
.word-body-region-v51{display:block!important;min-height:0!important;flex:none!important}
.word-editor-v51 #corpoEditor{height:auto!important;min-height:430px!important;max-height:none!important;overflow:visible!important;line-height:1!important;padding:0!important;border:1px solid transparent!important}
.word-editor-v51 #corpoEditor>div,.word-editor-v51 #corpoEditor>p,.word-editor-v51 #corpoEditor>blockquote{margin:0!important;line-height:1;min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important}
.word-editor-v51 #corpoEditor>div:not([data-no-indent="1"]):not(.manual-page-break-v53),.word-editor-v51 #corpoEditor>p:not([data-no-indent="1"]){text-indent:47px!important}
.word-closing-host-v53{display:block!important;min-height:0!important;margin-top:18px!important}
.word-closing-block-v53{display:block!important;break-inside:avoid;page-break-inside:avoid}
.word-closing-block-v53 .word-signoff-v51{margin:0 0 20px 47px!important}
.word-signature-v51{margin-top:0!important;margin-bottom:6px!important}
.word-pagination-status-v53,.word-page-badge-v53{display:none!important}
.manual-page-break-v53{margin:20px 0!important;height:22px!important;min-height:22px!important;border-top:2px dashed #7390aa!important;background:transparent!important}
.manual-page-break-v53:after{content:'Quebra de página manual';font:700 10px Arial,sans-serif;color:#587086;background:#fff;padding:0 8px;position:relative;top:-10px}
.v56-modebar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 10px;padding:8px 10px;border:1px solid #d4e0ea;border-radius:10px;background:#f8fbfd}
.v56-mode-buttons{display:flex;gap:6px}.v56-mode-btn{border:1px solid #b9cad8;background:#fff;color:#234b70;border-radius:7px;padding:7px 12px;font:700 12px Arial,sans-serif;cursor:pointer}.v56-mode-btn.active{background:#e4f0fb;border-color:#74a8d4;color:#0d4f84}.v56-mode-note{font:600 11px Arial,sans-serif;color:#60778a}
#v56PagedPreview{display:none;min-width:820px;padding:2px 0 16px}.v56-preview-pages{display:flex;flex-direction:column;align-items:center;gap:26px}.v56-preview-page{position:relative;width:794px;height:1123px;background:#fff url('./modelo-oficio-fundo.png') center/100% 100% no-repeat;box-shadow:0 5px 22px rgba(26,48,69,.18);font-family:'Times New Roman',serif;color:#111;overflow:hidden}.v56-preview-content{position:absolute;left:72px;right:72px;top:116px;bottom:145px;font-size:16px;line-height:1;overflow:hidden}.v56-preview-number{font-weight:700;margin-bottom:13px}.v56-preview-date{text-align:right;margin-bottom:14px}.v56-preview-recipient{margin-bottom:16px;line-height:1}.v56-preview-recipient strong{display:block}.v56-preview-subject{font-weight:700;margin-bottom:17px}.v56-preview-subject .subject-value{text-decoration:underline}.v56-preview-body>div,.v56-preview-body>p,.v56-preview-body>blockquote{margin:0!important;line-height:1;text-align:justify;overflow-wrap:anywhere;word-break:break-word}.v56-preview-body>div:not([data-no-indent="1"]):not(.manual-page-break-v53),.v56-preview-body>p:not([data-no-indent="1"]){text-indent:47px}.v56-preview-body table{width:100%;table-layout:fixed;border-collapse:collapse}.v56-preview-body td,.v56-preview-body th{border:1px solid #222;padding:3px 5px;overflow-wrap:anywhere}.v56-preview-closing{break-inside:avoid;page-break-inside:avoid;margin-top:18px}.v56-preview-signoff{margin-left:47px;margin-bottom:20px}.v56-preview-signature{text-align:center;font-weight:700;line-height:1}.v56-preview-page-label{position:absolute;right:8px;top:7px;font:700 10px Arial,sans-serif;color:#6c8295;background:rgba(255,255,255,.88);padding:3px 6px;border-radius:10px;border:1px solid #d7e1e9}
.v56-flow-help{display:inline-flex;align-items:center;gap:6px;font:600 11px Arial,sans-serif;color:#5f7588}.v56-flow-help b{color:#244b6c}
@media(max-width:900px){.word-pages-v53,#v56PagedPreview{min-width:820px}.v56-modebar{align-items:flex-start}.v56-mode-note{width:100%}}


/* v59 — espaçamentos espelhados do modelo Word revisado pelo usuário. */
#wordPageV51 .word-document-v51{line-height:1!important;}
.word-line-number-v51{line-height:1.5!important;margin-bottom:24px!important;}
.word-line-date-v51{line-height:1.5!important;margin-bottom:24px!important;}
.word-recipient-v51{line-height:1!important;margin-bottom:32px!important;}
.word-recipient-v51 .word-treatment-host-v55{margin-bottom:0!important;}
.word-recipient-v51 #destinatario_cargo{margin-top:0!important;}
.word-subject-v51{line-height:1!important;margin-bottom:32px!important;}
.word-editor-v51 #corpoEditor{line-height:1!important;}
.word-editor-v51 #corpoEditor>div,.word-editor-v51 #corpoEditor>p,.word-editor-v51 #corpoEditor>blockquote{margin:0!important;line-height:1;}
.word-body-editable-v53>div,.word-body-editable-v53>p,.word-body-editable-v53>blockquote{margin:0!important;line-height:1;}
.word-closing-host-v53{margin-top:32px!important;}
.word-closing-block-v53 .word-signoff-v51{margin:0 0 32px 47px!important;line-height:1!important;}
.word-signature-v51{line-height:1!important;margin-top:0!important;}
.v56-preview-number{line-height:1.5!important;margin-bottom:24px!important;}
.v56-preview-date{line-height:1.5!important;margin-bottom:24px!important;}
.v56-preview-recipient{line-height:1!important;margin-bottom:32px!important;}
.v56-preview-subject{line-height:1!important;margin-bottom:32px!important;}
.v56-preview-body>div,.v56-preview-body>p,.v56-preview-body>blockquote{line-height:1;margin:0!important;}
.v56-preview-closing{margin-top:32px!important;}
.v56-preview-signoff{margin:0 0 32px 47px!important;}
.v56-preview-signature{line-height:1!important;}


/* v63 — assunto mais elegante e com linha horizontal maior nos modelos */
/* v64: campo legado fica somente para armazenar o valor; o editor visível é único.
   Especificidade superior à regra .word-editor-v51 #assunto.assunto-editor-v60. */
.word-editor-v51 #wordAssuntoHostV51 textarea#assunto.assunto-editor-v60,
.word-editor-v51 #wordAssuntoHostV51 #assunto.word-field-v51{display:none!important;visibility:hidden!important;position:absolute!important;pointer-events:none!important;width:0!important;height:0!important;min-height:0!important;max-height:0!important;padding:0!important;margin:0!important;border:0!important;opacity:0!important;}

.word-subject-v51{display:grid!important;grid-template-columns:86px minmax(0,1fr)!important;column-gap:10px!important;align-items:end!important;width:100%!important;margin-bottom:28px!important;line-height:1.12!important;}
.word-subject-label-v63{display:block!important;font-weight:700!important;white-space:nowrap!important;padding-top:2px!important;}
#wordAssuntoHostV51{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;}
.word-subject-edit-v61{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:24px!important;padding:2px 4px 3px!important;box-sizing:border-box!important;border:1px solid transparent!important;border-bottom:2px solid #1b1b1b!important;border-radius:0!important;outline:none!important;background:transparent!important;color:#111!important;font:700 16px/1.15 'Times New Roman',serif!important;text-decoration:none!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important;cursor:text!important;}
.word-subject-edit-v61:hover{background:rgba(223,239,255,.35)!important;}
.word-subject-edit-v61:focus{border-color:transparent!important;border-bottom-color:#4a84b3!important;background:rgba(237,247,255,.92)!important;box-shadow:none!important;}
.word-subject-edit-v61[data-placeholder]:empty:before{content:attr(data-placeholder);color:#8a96a1;font-style:italic;font-weight:400;text-decoration:none;}
.doc-preview-subject,.v56-preview-subject{display:grid!important;grid-template-columns:86px minmax(0,1fr)!important;column-gap:10px!important;align-items:end!important;margin-bottom:28px!important;font-weight:700!important;line-height:1.12!important;}
.doc-preview-subject .subject-label,.v56-preview-subject>:first-child{display:block!important;white-space:nowrap!important;padding-top:2px!important;}
.doc-preview-subject .subject-value,.v56-preview-subject .subject-value{display:block!important;min-width:0!important;padding:0 0 2px!important;border-bottom:2px solid #1b1b1b!important;text-decoration:none!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important;}
.live-doc-overlay-v47 .doc-preview-subject,.live-doc-overlay-v46 .doc-preview-subject{display:grid!important;grid-template-columns:86px minmax(0,1fr)!important;column-gap:10px!important;align-items:end!important;}
.live-doc-overlay-v47 .doc-preview-subject .subject-value,.live-doc-overlay-v46 .doc-preview-subject .subject-value{border-bottom:2px solid #1b1b1b!important;text-decoration:none!important;}


/* v66: harmonia visual com a folha final, sem ocultar campos funcionais */
.word-editor-v51{background:#edf1f5;border:1px solid #d8e0e8;border-radius:16px;padding:12px;box-shadow:0 8px 24px rgba(20,46,70,.07)}
.word-editor-topbar-v51{background:#fff!important;border:1px solid #d8e0e8!important;border-radius:10px!important;box-shadow:0 1px 6px rgba(20,46,70,.05)!important;padding:12px 14px!important;}
.word-editor-topbar-v51>label{color:#283b4f!important;font-weight:700!important}
.word-editor-topbar-v51 .input,.word-editor-topbar-v51 textarea,.word-editor-topbar-v51 select{background:#fff!important;border:1px solid #d7e0e7!important;border-radius:6px!important;box-shadow:none!important;}
.word-editor-topbar-v51 .input:focus,.word-editor-topbar-v51 textarea:focus,.word-editor-topbar-v51 select:focus{border-color:#759cbf!important;outline:2px solid rgba(55,117,172,.13)!important;}
.word-ribbon-v51{margin-top:10px!important;background:#fff!important;border-color:#d7e0e7!important;border-radius:9px!important}
.word-editor-canvas-v51{margin-top:10px!important;background:#e7edf3!important;border:1px solid #d5dce4!important;border-radius:12px!important;padding:18px!important;}
.word-page-v51{box-shadow:0 6px 22px rgba(14,35,56,.15)!important;}
.word-model-caption-v51{margin-top:9px;color:#52677b!important;}
/* campos diretamente na folha: tipografia do documento final, foco apenas quando editando */
.word-document-v51 .word-field-v51{font-family:'Times New Roman',serif!important;color:#111!important}
.word-document-v51 .word-field-v51:hover{background:rgba(222,235,247,.35)!important}
.word-document-v51 .word-field-v51:focus{background:rgba(237,246,255,.76)!important;}
.word-subject-v51{grid-template-columns:86px minmax(0,1fr)!important;align-items:end!important;column-gap:10px!important;}
#wordAssuntoHostV51 #assunto{display:none!important;visibility:hidden!important;position:absolute!important;pointer-events:none!important;}
.word-subject-edit-v61{border-bottom:2px solid #1b1b1b!important;text-decoration:none!important;width:100%!important;min-height:24px!important;}
/* configurações secundárias ficam acessíveis, sem desaparecer com dados de edição */
@media(max-width:980px){.word-editor-v51{padding:8px}.word-editor-canvas-v51{padding:10px!important}}


/* v67 — assunto com linha mais elegante e menos extensa */
.word-subject-v51{grid-template-columns:86px minmax(0,1fr)!important;column-gap:10px!important;align-items:end!important;}
#wordAssuntoHostV51{display:flex!important;justify-content:flex-start!important;align-items:flex-end!important;}
.word-subject-edit-v61{width:min(78%, 560px)!important;max-width:min(78%, 560px)!important;min-width:280px!important;padding:1px 2px 2px!important;border:none!important;border-bottom:1.5px solid #2e2e2e!important;border-radius:0!important;background:transparent!important;text-decoration:none!important;box-shadow:none!important;}
.word-subject-edit-v61:hover{background:rgba(223,239,255,.22)!important;}
.word-subject-edit-v61:focus{border:none!important;border-bottom:2px solid #4a84b3!important;background:rgba(237,247,255,.55)!important;box-shadow:none!important;}
.doc-preview-subject,.v56-preview-subject{grid-template-columns:86px minmax(0,1fr)!important;column-gap:10px!important;align-items:end!important;}
.doc-preview-subject .subject-value,.v56-preview-subject .subject-value{display:block!important;width:min(78%, 560px)!important;max-width:min(78%, 560px)!important;min-width:280px!important;padding:0 0 2px!important;border-bottom:1.5px solid #2e2e2e!important;text-decoration:none!important;}
.live-doc-overlay-v47 .doc-preview-subject .subject-value,.live-doc-overlay-v46 .doc-preview-subject .subject-value{width:min(78%, 560px)!important;max-width:min(78%, 560px)!important;min-width:280px!important;border-bottom:1.5px solid #2e2e2e!important;}
@media (max-width:900px){
  .word-subject-edit-v61,.doc-preview-subject .subject-value,.v56-preview-subject .subject-value,.live-doc-overlay-v47 .doc-preview-subject .subject-value,.live-doc-overlay-v46 .doc-preview-subject .subject-value{width:min(100%, 520px)!important;max-width:min(100%, 520px)!important;min-width:0!important;}
}


/* Paginação: proteção de linhas e tabelas, sem alterar layout do ofício oficial. */
.v56-preview-body table tr{break-inside:avoid;page-break-inside:avoid;}
.v56-preview-body table thead{display:table-header-group;}
.v56-preview-body p,.v56-preview-body>div{orphans:2;widows:2;}
.v56-preview-body li{break-inside:avoid;page-break-inside:avoid;}
.word-editor-v51 #corpoEditor li{margin-bottom:3px!important;}


/* V69: formatacao individual dos tres campos de destinatario */
.word-recipient-v51{position:relative!important;padding-right:145px!important;min-height:58px!important;}
.v69-recipient-tools{position:absolute;right:0;top:0;width:137px;box-sizing:border-box;padding:5px 6px;border:1px solid #d5e0ea;border-radius:7px;background:rgba(255,255,255,.96);box-shadow:0 2px 7px rgba(0,0,0,.05);font-family:Arial,sans-serif;z-index:3;}
.v69-recipient-tools .v69-tool-title{display:block;font-size:9px;color:#54708c;font-weight:700;margin-bottom:3px;}
.v69-recipient-tools .v69-tool{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:21px;font-size:9px;color:#455565;}
.v69-recipient-tools button{font:700 12px 'Times New Roman',serif;min-width:23px;height:20px;border-radius:4px;border:1px solid #c7d4df;color:#304a61;background:white;cursor:pointer;}
.v69-recipient-tools button[aria-pressed="true"]{color:#fff;background:#245e91;border-color:#245e91;}
.word-recipient-v51 #destinatario.v69-normal,.word-recipient-v51 #destinatario_cargo.v69-normal,.word-recipient-v51 #tratamento_destinatario.v69-normal{font-weight:400!important;}
.word-recipient-v51 #destinatario.v69-bold,.word-recipient-v51 #destinatario_cargo.v69-bold,.word-recipient-v51 #tratamento_destinatario.v69-bold{font-weight:700!important;}
.v69-preview-bold{font-weight:700!important}.v69-preview-normal{font-weight:400!important}
/* Controles apenas no editor, nunca nos documentos gerados */
@media print{.v69-recipient-tools{display:none!important}.word-recipient-v51{padding-right:0!important}}


/* O editor preserva recuos e tab stops como propriedades semânticas. */
.word-body-editable-v53>div,.word-body-editable-v53>p,.word-body-editable-v53>blockquote{line-height:1;min-height:1em!important;white-space:pre-wrap!important;}
.word-body-editable-v53 [data-word-tab]{display:inline!important;white-space:pre!important;tab-size:48px!important;}
.word-body-editable-v53,.v56-preview-body,.v56-preview-body span,.rich-preview-body-v50 span{tab-size:48px!important;}
.v56-preview-body span,.rich-preview-body-v50 span{white-space:pre-wrap!important;}
.word-body-editable-v53:focus{outline:2px solid rgba(23,94,151,.22)!important;outline-offset:2px!important;}
.word-page-v51 .word-body-editable-v53 p,.word-page-v51 .word-body-editable-v53 div{overflow-wrap:break-word!important;}


/* Assunto: apenas as letras do assunto ficam sublinhadas, sem linha atravessando a página. */
.word-subject-v51,.doc-preview-subject,.v56-preview-subject{display:grid!important;grid-template-columns:max-content minmax(0,1fr)!important;align-items:start!important;column-gap:7px!important;}
#wordAssuntoHostV51{display:block!important;width:auto!important;max-width:100%!important;}
.word-subject-edit-v61{display:inline!important;width:auto!important;max-width:100%!important;min-width:0!important;min-height:0!important;padding:0 1px!important;margin:0!important;border:0!important;border-bottom:0!important;border-radius:2px!important;text-decoration:underline!important;text-underline-offset:2px!important;box-shadow:none!important;font:700 16px/1.16 'Times New Roman',serif!important;overflow-wrap:break-word!important;white-space:normal!important;}
.word-subject-edit-v61:focus{border:0!important;outline:1px solid #83b2d6!important;background:#f0f8ff!important;box-shadow:none!important;}
.doc-preview-subject .subject-value,.v56-preview-subject .subject-value,.live-doc-overlay-v47 .doc-preview-subject .subject-value,.live-doc-overlay-v46 .doc-preview-subject .subject-value{display:inline!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:0!important;border:0!important;border-bottom:0!important;text-decoration:underline!important;text-underline-offset:2px!important;overflow-wrap:break-word!important;}
.v56-preview-body [data-word-tab],.rich-preview-body-v50 [data-word-tab]{white-space:pre!important;}
/* O Word não estica palavras em linhas que terminam em Shift+Enter. */
.v56-preview-body>p,.v56-preview-body>div,.word-editor-v51 #corpoEditor>p,.word-editor-v51 #corpoEditor>div,.rich-preview-body-v50>p,.rich-preview-body-v50>div{text-align-last:left!important;}
.v77-preview-holder{width:794px;max-width:100%;margin:0 auto 20px;background:#fff;border:1px solid #d6e0e7;border-radius:6px;box-shadow:0 6px 24px rgba(22,46,70,.13);overflow:hidden;font-family:Arial,sans-serif;}
.v77-preview-status{padding:14px 17px;color:#23405a;font-size:13px;background:#f5f9fc;border-bottom:1px solid #e0e9f0;line-height:1.4;}
.v77-preview-pdf{display:block;width:100%;height:1120px;border:0;background:#fff;}
.v77-preview-open{margin:0 16px 12px;font-size:12px;display:inline-block;}
.v77-preview-unavailable{padding:10px 14px;background:#fff7e8;color:#705114;border-radius:5px;font:12px/1.4 Arial,sans-serif;margin:10px auto;max-width:794px;}


/* Equivalent to generated Word: 12pt before signoff; 20pt to signature. */
.word-closing-host-v53{padding-top:16px!important;margin-top:0!important;min-height:0!important;}
.word-cont-document-v53 .word-closing-host-v53{padding-top:16px!important;margin-top:0!important;}
.word-closing-block-v53 .word-signoff-v51{margin:0 0 26px 47px!important;line-height:1.15!important;}
.word-signature-v51{margin-top:0!important;line-height:1.05!important;}
.v56-preview-closing{margin-top:16px!important;}
.v56-preview-signoff{margin:0 0 26px 47px!important;}
.v56-preview-signature{margin-top:0!important;}
/* An empty trailing paragraph should not force extra space above closing. */
.word-body-editable-v53>div:last-child:empty,.word-body-editable-v53>p:last-child:empty{margin-bottom:0!important;}


/* Modelos 856, 1042, 1038 e 1017: corpo 12pt, entrelinha simples e 1,25 cm de primeira linha. */
#wordPageV51 .word-document-v51 .word-body-editable-v53,
#v56PagedPreview .v56-preview-body{font-family:'Times New Roman',serif;font-size:12pt;line-height:1;}
#wordPageV51 .word-body-editable-v53>div,
#wordPageV51 .word-body-editable-v53>p,
#wordPageV51 .word-body-editable-v53>blockquote,
#v56PagedPreview .v56-preview-body>div,
#v56PagedPreview .v56-preview-body>p {line-height:1; margin-block:0; overflow-wrap:normal;word-break:normal;hyphens:none;}
#wordPageV51 .word-body-editable-v53 li {line-height:1; margin:0;}
#wordPageV51 .word-body-editable-v53 ul,
#wordPageV51 .word-body-editable-v53 ol{margin-block:0;padding-left:1.25cm;}
#wordPageV51 .word-body-editable-v53 table{margin-block:8px;border-collapse:collapse;}
#wordPageV51 .word-body-editable-v53 td,
#wordPageV51 .word-body-editable-v53 th{line-height:1;vertical-align:middle;}


/* V87 – mudança somente no ESPAÇO DE TRABALHO; o documento oficial continua A4 retrato. */
:root{--workspace-line-v87:#d8e3ec;--workspace-ink-v87:#243d56}
.wrap{width:min(calc(100% - 28px),1840px)!important;max-width:1840px!important;margin-inline:auto!important}
.criar-page .grid{max-width:1740px!important}
.criar-page #mainCard{border-radius:18px!important;box-shadow:0 16px 42px rgba(19,53,83,.075)!important}
.word-editor-v51{grid-template-columns:minmax(0,1fr)!important;gap:11px!important;padding:15px!important;background:#f2f6fa!important;border-color:#d8e3ed!important;border-radius:18px!important}
.word-editor-topbar-v51,.word-ribbon-v51,.word-model-caption-v51,.workspace-controls-v87{grid-column:1/-1}
.word-editor-topbar-v51{border-radius:12px!important}
.workspace-controls-v87{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:9px 12px;background:#fff;border:1px solid var(--workspace-line-v87);border-radius:12px}
.workspace-controls-intro-v87{display:flex;gap:10px;align-items:center;color:var(--workspace-ink-v87);font:600 13px/1.3 system-ui,sans-serif}
.workspace-controls-intro-v87 span:last-child{display:flex;flex-direction:column;gap:3px}
.workspace-controls-intro-v87 small{font-size:11px;font-weight:500;color:#607589}
.workspace-workmark-v87{background:#ecf4fb;color:#276291;font-size:22px;display:grid;place-items:center;border-radius:9px;width:36px;height:36px}
.workspace-buttons-v87{display:flex;gap:4px;padding:4px;background:#edf3f8;border-radius:11px}
.workspace-toggle-v87{border:1px solid transparent;border-radius:8px;padding:8px 13px;font:700 12px system-ui,sans-serif;background:transparent;color:#557086;cursor:pointer}
.workspace-toggle-v87:hover{background:#fff;color:#174c79}
.workspace-toggle-v87:focus-visible{outline:3px solid #76b7eb;outline-offset:2px}
.workspace-toggle-v87.is-selected{background:#fff;color:#17486f;border-color:#d7e4ef;box-shadow:0 2px 5px rgba(24,60,90,.07)}
.word-editor-canvas-v51{min-width:0;align-self:start;border-radius:13px!important;background:#e8eff5!important;padding:22px!important;overflow-x:auto!important}
.word-pages-v53{margin-inline:auto!important;width:fit-content;max-width:none}
.workspace-guide-v87{display:none;align-self:start;position:sticky;top:16px;flex-direction:column;gap:12px;color:var(--workspace-ink-v87);font-family:system-ui,-apple-system,sans-serif}
.workspace-guide-card-v87{background:#fff;border:1px solid var(--workspace-line-v87);border-radius:13px;padding:16px;box-shadow:0 2px 8px rgba(19,53,83,.035)}
.workspace-guide-kicker-v87{color:#557d9d;font-size:10px;letter-spacing:.09em;font-weight:800;margin-bottom:7px}
.workspace-guide-head-v87{font-size:16px;font-weight:750;line-height:1.25}
.workspace-guide-card-v87 p{color:#64788c;font-size:12px;line-height:1.6;margin:8px 0 0}
.workspace-guide-indicator-v87{margin-top:13px;padding:9px;border-radius:9px;background:#eff6fc;display:flex;align-items:center;gap:9px;color:#32638a;font-size:11px;font-weight:700}
.workspace-guide-indicator-v87 span:first-child{font-size:22px}
.workspace-shortcuts-v87{margin:0}.workspace-shortcuts-v87>div{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:9px 0;border-bottom:1px solid #eff3f7}.workspace-shortcuts-v87>div:last-child{border-bottom:0;padding-bottom:0}.workspace-shortcuts-v87 dt{white-space:nowrap;font-size:11px}.workspace-shortcuts-v87 dd{margin:0;color:#65798c;font-size:11px;text-align:right}
.workspace-guide-v87 kbd{border:1px solid #d8e3ed;border-bottom-width:2px;border-radius:5px;padding:3px 5px;background:#f8fbfd;color:#295271;font:700 10px system-ui,sans-serif}
@media(min-width:1490px){
  .word-editor-v51:not(.workspace-focus-v87){grid-template-columns:minmax(0,1fr) 264px!important;column-gap:15px!important}
  .word-editor-v51:not(.workspace-focus-v87) .word-editor-canvas-v51{grid-column:1;grid-row:auto}
  .word-editor-v51:not(.workspace-focus-v87) .workspace-guide-v87{display:flex;grid-column:2;grid-row:4}
}
@media(min-width:1490px){.word-editor-v51.workspace-focus-v87 .word-editor-canvas-v51{max-width:1050px;width:100%;margin-inline:auto;box-sizing:border-box}}
@media(max-width:900px){.wrap{width:100%!important;padding:10px!important}.word-editor-v51{padding:9px!important}.workspace-controls-intro-v87 small{display:none}.workspace-controls-v87{padding:8px}.word-editor-canvas-v51{padding:9px!important}}
@media print{.workspace-guide-v87,.workspace-controls-v87{display:none!important}}


/* V88: editor à esquerda e pré-visualização oficial à direita, em uma única área de trabalho. */
:root {--v88-canvas:#e8eff6;--v88-border:#d5e1ec;--v88-navy:#153b61}
body.criar-page .wrap{width:min(calc(100% - 24px),1920px)!important;max-width:1920px!important;padding:10px 12px 22px!important}
body.criar-page .header{grid-template-columns:75px minmax(290px,1fr) auto!important;gap:10px!important;margin-bottom:8px!important;min-height:58px!important}
body.criar-page .crest{width:52px!important;height:52px!important;padding:4px!important;justify-self:center!important}
body.criar-page .h-title{font-size:25px!important;line-height:1.08!important}
body.criar-page .subtitle{font-size:11.5px!important;margin-top:3px!important}
body.criar-page .header-right{gap:6px!important;flex-wrap:wrap;justify-content:flex-end}
body.criar-page .header-right .btn{padding:8px 11px!important;font-size:11px!important;white-space:nowrap}
body.criar-page .user-badge{font-size:11px!important;padding:6px 8px!important}
body.criar-page .grid{max-width:none!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
body.criar-page #mainCard{padding:10px!important;border-radius:14px!important}
body.criar-page .word-editor-v51{padding:10px!important;gap:8px!important;grid-template-columns:minmax(0,1fr)!important}
body.criar-page .word-editor-topbar-v51{grid-template-columns:148px minmax(220px,1fr) auto!important;gap:8px!important;padding:8px 10px!important;align-items:center!important}
body.criar-page .word-editor-topbar-v51 label{font-size:11px!important;gap:3px!important}
body.criar-page .word-editor-topbar-v51 textarea,body.criar-page #wordHistoryHostV51 textarea{min-height:34px!important;height:34px!important;max-height:65px!important;padding:7px 9px!important;font-size:11px!important}
body.criar-page .word-editor-topbar-v51 select{padding:7px 9px!important;font-size:12px!important}
body.criar-page .word-editor-topbar-v51 .word-actions-host-v51{gap:5px!important}
body.criar-page .word-actions-host-v51 .btn{padding:8px 10px!important;font-size:11px!important}
body.criar-page .word-signature-tools-v55{margin-top:0!important;padding-top:7px!important;grid-column:1/-1!important}
body.criar-page .word-signature-tools-v55:not([open]){border-top:0!important;padding-top:0!important}
body.criar-page .word-signature-tools-v55[open] .word-signature-grid-v55{gap:8px!important}
body.criar-page .workspace-controls-v87{padding:5px 9px!important;min-height:32px!important}
body.criar-page .workspace-workmark-v87{width:28px!important;height:28px!important;font-size:17px!important}
body.criar-page .workspace-controls-intro-v87{font-size:11px!important;gap:7px!important}
body.criar-page .workspace-controls-intro-v87 small{font-size:10px!important}
body.criar-page .workspace-toggle-v87{padding:6px 10px!important;font-size:11px!important}
body.criar-page .word-ribbon-v51{margin:0!important;position:relative!important;top:auto!important;z-index:12!important}
body.criar-page .word-toolbar-v53{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;max-width:100%;scrollbar-width:thin;padding:3px!important}
body.criar-page .word-toolbar-v53 .ribbon-group-v53{flex:0 0 auto!important;min-height:68px!important;padding-top:1px!important;padding-bottom:14px!important}
body.criar-page .word-toolbar-v53 .ribbon-style-v53{min-width:635px!important}
body.criar-page .word-toolbar-v53 .ribbon-style-v53 .ribbon-controls-v53{flex-wrap:nowrap!important}
body.criar-page .word-toolbar-v53 .ribbon-paragraph-v53{min-width:490px!important}
body.criar-page .word-toolbar-v53 .ribbon-paragraph-v53 .ribbon-controls-v53{flex-wrap:nowrap!important}
body.criar-page .word-toolbar-v53 .ribbon-insert-controls-v53 .editor-tool-v50{height:49px!important}
body.criar-page .workspace-split-v88{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:12px;min-width:0;align-items:start}
body.criar-page .workspace-editor-panel-v88,body.criar-page .workspace-preview-panel-v88{min-width:0;border:1px solid var(--v88-border);border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 2px 10px rgba(23,58,90,.04)}
body.criar-page .workspace-panel-head-v88{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:42px;padding:8px 12px;box-sizing:border-box;background:#fff;border-bottom:1px solid var(--v88-border);font-family:system-ui,-apple-system,sans-serif}
body.criar-page .workspace-panel-head-v88>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}
body.criar-page .workspace-panel-head-v88 strong{font-size:12.5px;color:var(--v88-navy);line-height:1.2}
body.criar-page .workspace-panel-head-v88 span{font-size:10.5px;color:#60778e}
body.criar-page .workspace-panel-chip-v88{white-space:nowrap;background:#eef7ff;border:1px solid #d9eafa;border-radius:8px;padding:5px 8px;font-weight:700!important;color:#367197!important}
body.criar-page .workspace-split-v88 .word-editor-canvas-v51{margin:0!important;padding:10px!important;border:0!important;border-radius:0!important;background:var(--v88-canvas)!important;height:var(--v88-body-height,480px)!important;max-height:var(--v88-body-height,480px)!important;min-height:390px;overflow:auto!important;overscroll-behavior:contain}
body.criar-page .workspace-split-v88 .word-pages-v53{margin-inline:auto!important}
body.criar-page .workspace-split-v88 .word-page-v51{flex-shrink:0!important}
body.criar-page .workspace-split-v88 #v56Modebar{display:none!important}
body.criar-page .workspace-preview-panel-v88{display:flex;flex-direction:column}
body.criar-page .workspace-preview-header-v88{position:relative;z-index:1}
body.criar-page .workspace-preview-actions-v88{display:flex;align-items:center;gap:6px;flex-shrink:0}
body.criar-page .workspace-preview-badge-v88{display:inline-flex;padding:5px 8px;border:1px solid #e0e9f2;background:#f2f6fa;color:#58728a!important;border-radius:8px;font-size:10px!important;font-weight:750;white-space:nowrap}
body.criar-page .workspace-preview-badge-v88.is-stale{color:#925d19!important;background:#fff7e8;border-color:#f4dfb9}
body.criar-page .workspace-preview-badge-v88.is-ready{color:#236e52!important;background:#e9f8f0;border-color:#ccead9}
body.criar-page .workspace-preview-badge-v88.is-busy{color:#215b89!important;background:#e8f3ff;border-color:#cee3f5}
body.criar-page .workspace-preview-refresh-v88{border:1px solid #b7d2e6;background:#eaf5ff;color:#145584;font:750 11px system-ui,sans-serif;border-radius:8px;padding:7px 9px;white-space:nowrap;cursor:pointer}
body.criar-page .workspace-preview-refresh-v88:hover{background:#dceeff}
body.criar-page .workspace-preview-refresh-v88:disabled{opacity:.55;cursor:wait}
body.criar-page .workspace-preview-body-v88{position:relative;background:var(--v88-canvas);min-height:390px;height:var(--v88-body-height,480px)!important;max-height:var(--v88-body-height,480px)!important;overflow:auto;padding:10px;box-sizing:border-box;overscroll-behavior:contain}
body.criar-page .workspace-preview-body-v88 .v77-preview-holder{margin:0 auto!important;max-width:100%!important;width:100%!important;border-radius:9px!important}
body.criar-page .workspace-preview-body-v88 .v77-preview-status{font:11px/1.4 system-ui,sans-serif!important;padding:7px 10px!important}
body.criar-page .workspace-preview-body-v88 .v77-preview-pdf{width:100%!important;height:max(400px,calc(100vh - 375px))!important;min-height:410px!important}
body.criar-page .workspace-preview-body-v88 .v77-preview-open{font-size:11px!important;margin:8px 10px 10px!important}
body.criar-page .workspace-preview-empty-v88{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;max-width:370px;margin:0 auto;padding:10px 0 22px;font:12px/1.5 system-ui,sans-serif;color:#5c7082}
body.criar-page .workspace-preview-empty-v88>strong{color:#264b6a;font-size:14px}
body.criar-page .workspace-preview-empty-v88 p{margin:0;max-width:320px}
body.criar-page .workspace-preview-paper-v88{position:relative;width:220px;height:280px;max-width:65%;background:white;border:1px solid #d6e2ec;box-shadow:0 8px 22px rgba(22,49,75,.1);padding:42px 25px;box-sizing:border-box;display:flex;flex-direction:column;gap:12px}
body.criar-page .workspace-preview-paper-mark-v88{font:850 14px system-ui,sans-serif;color:#23629e;border-bottom:1px solid #b9d2e6;padding-bottom:12px;margin-bottom:5px}
body.criar-page .workspace-preview-paper-line-v88{height:5px;border-radius:4px;background:#dfe9f2;width:100%}
body.criar-page .workspace-preview-paper-line-v88.short{width:60%}
body.criar-page .workspace-preview-foot-v88{border-top:1px solid var(--v88-border);background:#fff;display:flex;align-items:center;justify-content:space-between;gap:7px;padding:8px 11px;font:10.5px/1.3 system-ui,sans-serif;color:#667e92;min-height:38px;box-sizing:border-box}
body.criar-page .workspace-preview-foot-v88 button{border:none;background:transparent;color:#17609b;font:750 11px system-ui,sans-serif;cursor:pointer;white-space:nowrap}
body.criar-page .workspace-guide-v87{display:none!important}
body.criar-page .word-editor-v51.workspace-focus-v87 .workspace-split-v88{grid-template-columns:minmax(0,1fr)!important}
body.criar-page .word-editor-v51.workspace-focus-v87 .workspace-preview-panel-v88{display:none!important}
body.criar-page .word-editor-v51.workspace-focus-v87 .workspace-editor-panel-v88{max-width:1100px;width:100%;margin-inline:auto}
body.criar-page .word-editor-v51.workspace-focus-v87 .word-editor-canvas-v51{max-width:none!important;width:100%!important}
body.criar-page .word-model-caption-v51{padding:6px 10px!important;font-size:10px!important}
@media(max-width:1300px){body.criar-page .workspace-split-v88{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}body.criar-page .workspace-preview-badge-v88{display:none}}
@media(max-width:1120px){body.criar-page .workspace-split-v88{grid-template-columns:minmax(0,1fr)}body.criar-page .workspace-preview-panel-v88{display:flex}body.criar-page .workspace-split-v88 .word-editor-canvas-v51{max-height:660px!important}body.criar-page .workspace-preview-body-v88{height:540px!important;max-height:540px!important}body.criar-page .header{grid-template-columns:65px minmax(0,1fr)!important}body.criar-page .header-right{grid-column:1/-1;justify-content:flex-end}}
@media(max-width:700px){body.criar-page .word-editor-topbar-v51{grid-template-columns:1fr!important}body.criar-page .workspace-controls-intro-v87 small{display:none}body.criar-page .workspace-preview-actions-v88{flex-wrap:wrap}body.criar-page .workspace-panel-chip-v88{display:none}body.criar-page .workspace-preview-body-v88{height:490px}body.criar-page .workspace-split-v88 .word-editor-canvas-v51{min-height:400px}}
@media print{body.criar-page .workspace-preview-panel-v88,body.criar-page .workspace-panel-head-v88{display:none!important}}


/* V90: rearranjo HTML permanente, sem script de movimentação de elementos. */
body.criar-page .wrap{width:min(100% - 22px,1980px)!important;max-width:1980px!important;padding:9px 0 10px!important;}
body.criar-page .header{grid-template-columns:58px minmax(250px,1fr) auto!important;min-height:61px!important;margin-bottom:7px!important;gap:8px!important;align-items:center!important;}
body.criar-page .crest{width:54px!important;height:54px!important;padding:4px!important;}
body.criar-page .h-title{font-size:26px!important;}
body.criar-page .subtitle{font-size:12px!important;margin-top:2px!important;}
body.criar-page #mainCard.card{padding:8px!important;border-radius:12px!important;}
body.criar-page .word-editor-v51{display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(380px,.82fr)!important;grid-template-areas:"toolbar sidebar" "editor sidebar" "caption sidebar"!important;align-items:start!important;gap:7px 11px!important;border:0!important;box-shadow:none!important;padding:0!important;background:transparent!important;}
body.criar-page .word-editor-v51>.word-ribbon-v51{grid-area:toolbar!important;grid-column:auto!important;position:relative!important;top:auto!important;margin:0!important;min-width:0!important;}
body.criar-page .word-editor-v51>.workspace-split-v88{grid-area:editor!important;grid-column:auto!important;display:block!important;min-width:0!important;}
body.criar-page .word-editor-v51>.workspace-split-v88>.workspace-editor-panel-v88{width:100%!important;max-width:100%!important;margin:0!important;}
body.criar-page .word-editor-v51>.word-model-caption-v51{grid-area:caption!important;grid-column:auto!important;min-width:0!important;}
body.criar-page .word-editor-v51>.workspace-guide-v87{display:none!important;}
body.criar-page .word-editor-v51 .workspace-split-v88 .word-editor-canvas-v51{height:calc(100dvh - 335px)!important;max-height:calc(100dvh - 335px)!important;min-height:460px!important;overflow-y:auto!important;overflow-x:auto!important;padding:10px!important;overscroll-behavior:contain!important;}
body.criar-page .word-editor-v51>.v90-sidebar{grid-area:sidebar!important;grid-column:auto!important;min-width:0!important;min-height:0!important;height:calc(100dvh - 100px);max-height:calc(100dvh - 100px);position:sticky;top:8px;display:flex;flex-direction:column;gap:8px;box-sizing:border-box;}
body.criar-page .v90-commands{flex:0 0 auto;max-height:min(42vh,365px);min-height:0;overflow:auto;overscroll-behavior:contain;background:#fff;border:1px solid #d6e3ee;border-radius:12px;padding:10px;box-shadow:0 1px 6px rgba(26,65,97,.04);}
body.criar-page .v90-commands-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px;padding-bottom:7px;border-bottom:1px solid #e6edf4;font-family:system-ui,Arial,sans-serif;}
body.criar-page .v90-commands-heading strong{font-size:13px;color:#173f69;}
body.criar-page .v90-commands-heading span{font-size:10px;color:#6b859b;}
body.criar-page .v90-sidebar>.v90-commands>.workspace-controls-v87{display:flex!important;grid-column:auto!important;min-height:0!important;padding:0!important;margin:0 0 8px!important;border:0!important;background:transparent!important;justify-content:flex-end!important;}
body.criar-page .v90-commands .workspace-controls-intro-v87{display:none!important;}
body.criar-page .v90-commands .workspace-buttons-v87{width:100%!important;display:flex!important;}
body.criar-page .v90-commands .workspace-buttons-v87 button{flex:1 1 50%;font-size:11px!important;}
body.criar-page .v90-commands .word-editor-topbar-v51{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;grid-column:auto!important;gap:8px!important;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;align-items:stretch!important;}
body.criar-page .v90-commands .word-editor-topbar-v51>label{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0!important;font:750 11px/1.25 system-ui,Arial,sans-serif!important;color:#23496e!important;}
body.criar-page .v90-commands .word-editor-topbar-v51 select,body.criar-page .v90-commands .word-editor-topbar-v51 textarea,body.criar-page .v90-commands .word-editor-topbar-v51 input{width:100%!important;box-sizing:border-box!important;min-height:34px!important;height:auto!important;font-size:12px!important;padding:6px 9px!important;}
body.criar-page .v90-commands .word-actions-host-v51{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;gap:6px!important;justify-content:space-between!important;}
body.criar-page .v90-commands .word-actions-host-v51 button{flex:1 1 100px!important;min-height:34px!important;white-space:nowrap!important;justify-content:center!important;}
body.criar-page .v90-commands #statusMsg{flex:1 1 100%!important;margin:2px 0!important;text-align:left!important;font-size:11px!important;}
body.criar-page .v90-observation-drawer,body.criar-page .v90-commands .word-signature-tools-v55{border:1px solid #e0eaf2!important;border-radius:9px!important;margin:0!important;padding:0!important;background:#fbfdff!important;grid-column:auto!important;}
body.criar-page .v90-observation-drawer summary,body.criar-page .v90-commands .word-signature-tools-v55 summary{cursor:pointer;list-style:revert;font:750 11px/1.3 system-ui,Arial,sans-serif!important;color:#2c5475!important;padding:8px 10px!important;}
body.criar-page .v90-observation-drawer .v90-notes-label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#476a86;padding:0 9px 8px;}
body.criar-page .v90-observation-drawer textarea{height:65px!important;resize:vertical!important;}
body.criar-page .v90-commands .word-signature-grid-v55{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;padding:0 9px 9px!important;}
body.criar-page .v90-commands .word-signature-grid-v55 label{font-size:10.5px!important;}
body.criar-page .v90-preview-wrap{flex:1 1 auto;min-height:220px;display:flex;flex-direction:column;overflow:hidden;border:1px solid #d6e3ee;border-radius:12px;background:#fff;box-shadow:0 1px 6px rgba(26,65,97,.04);}
body.criar-page .v90-preview-wrap>.workspace-preview-panel-v88{display:flex!important;flex-direction:column!important;flex:1 1 auto;min-height:0;max-height:none!important;width:100%!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:hidden!important;}
body.criar-page .v90-preview-wrap .workspace-preview-body-v88{display:flex;flex:1 1 auto!important;min-height:190px!important;height:auto!important;max-height:none!important;overflow:auto!important;}
body.criar-page .v90-preview-wrap .workspace-preview-empty-v88{width:100%;box-sizing:border-box;}
body.criar-page .v90-preview-wrap iframe.v77-preview-pdf{width:100%!important;height:100%!important;min-height:280px!important;border:0!important;}
body.criar-page .v90-preview-wrap .workspace-panel-head-v88{min-height:42px!important;padding:7px 10px!important;}
body.criar-page .v90-preview-wrap .workspace-preview-foot-v88{flex-shrink:0;padding:7px 10px!important;}
body.criar-page .word-editor-v51.workspace-focus-v87{grid-template-columns:minmax(0,1fr) 270px!important;}
body.criar-page .word-editor-v51.workspace-focus-v87 .v90-preview-wrap{display:none!important;}
body.criar-page .word-editor-v51.workspace-focus-v87>.workspace-split-v88>.workspace-editor-panel-v88{max-width:none!important;width:100%!important;}
body.criar-page .word-editor-v51.workspace-focus-v87>.v90-sidebar{height:auto;max-height:calc(100dvh - 100px);}
@media(max-width:1480px){body.criar-page .word-editor-v51{grid-template-columns:minmax(0,1fr) 360px!important;}body.criar-page .v90-commands{max-height:min(43vh,355px);}body.criar-page .v90-preview-wrap .workspace-preview-badge-v88{display:none!important;}}
@media(max-width:1250px){body.criar-page .word-editor-v51{grid-template-columns:minmax(0,1fr) 340px!important;}}
@media(max-width:1170px){body.criar-page .word-editor-v51,body.criar-page .word-editor-v51.workspace-focus-v87{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"toolbar" "editor" "sidebar" "caption"!important;}body.criar-page .word-editor-v51>.v90-sidebar{position:static;height:auto;max-height:none;}body.criar-page .v90-commands{max-height:none!important;}body.criar-page .v90-preview-wrap{min-height:540px;}body.criar-page .word-editor-v51 .workspace-split-v88 .word-editor-canvas-v51{min-height:520px!important;height:540px!important;max-height:540px!important;}body.criar-page .header{grid-template-columns:58px 1fr!important;}.header-right{grid-column:1/-1!important;}}


/* Espaços consecutivos e tabulações não podem ser colapsados no editor A4. */
.word-body-editable-v53, .word-body-editable-v53 div, .word-body-editable-v53 p,
.word-body-editable-v53 blockquote, .word-body-editable-v53 span,
.word-body-editable-v53 font {white-space:pre-wrap!important;tab-size:48px!important;}
.word-body-editable-v53 [data-word-tab="1"] {display:inline!important;white-space:pre!important;tab-size:48px!important;}

/* Intervalo de linha de parágrafos importados do Word (não altera os demais). */
.word-body-editable-v53>div[data-word-line-spacing],.word-body-editable-v53>p[data-word-line-spacing],.word-body-editable-v53>blockquote[data-word-line-spacing]{line-height:var(--word-pasted-line-spacing,1)!important;}

/* Colagem Word: preservar espaçamento exato, acima das regras legadas que forçam margin:0. */
.word-body-editable-v53>div[data-word-space-before],
.word-body-editable-v53>p[data-word-space-before],
.word-body-editable-v53>blockquote[data-word-space-before]{margin-top:var(--word-pasted-space-before,0px)!important;}
.word-body-editable-v53>div[data-word-space-after],
.word-body-editable-v53>p[data-word-space-after],
.word-body-editable-v53>blockquote[data-word-space-after]{margin-bottom:var(--word-pasted-space-after,0px)!important;}

/* v107: a colagem Word não deve quebrar palavras no meio por regras antigas. */
.word-body-editable-v53 > div, .word-body-editable-v53 > p, .word-body-editable-v53 > blockquote {word-break:normal!important;overflow-wrap:break-word!important;}

/* v122: o usuário pode digitar junto à margem esquerda quando escolher Sem recuo. */
.word-editor-v51 #corpoEditor > :is(div,p,blockquote)[data-no-indent="1"],
.word-body-editable-v53 > :is(div,p,blockquote)[data-no-indent="1"],
.v56-preview-body > :is(div,p,blockquote)[data-no-indent="1"] {text-indent:0!important;}

/* Botão Início da linha: elimina recuo da primeira linha E recuo esquerdo. */
.word-body-editable-v53 > :is(div,p,blockquote)[data-no-indent="1"][data-word-indent-px="0"] {text-indent:0!important;padding-left:0!important;margin-left:0!important;margin-inline-start:0!important;}
