:root {
  --color-bg: #f4f6f8;
  --color-surface: #ffffff;
  --color-border: #e2e5e9;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-primary: #004189;       /* azul-marinho (out/2026) */
  --color-primary-dark: #00336d;
  --color-primary-soft: #e8eff8;  /* fundo claro de itens ativos/hover */
  --color-primary-soft-2: #d3e1f2;
  --color-dark: #1f2937;
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar */
.topbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .logo img { display: block; height: 36px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-actions .admin-name { color: var(--color-text-muted); font-size: 13px; }

/* Busca do topo: campo arredondado, fundo suave, lupa a esquerda (Enter pesquisa) */
.search-form { display: flex; align-items: center; flex: 1; max-width: 480px; margin: 0 16px; position: relative; }
.search-form input[type="search"] {
  flex: 1; width: 100%; padding: 10px 16px 10px 42px; border: 1px solid #e3e9f4; background: #f1f5fb;
  border-radius: 999px; font-size: 14px; color: var(--color-text); outline: none; transition: background .15s, border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.search-form input[type="search"]::placeholder { color: #7b8aa3; }
.search-form input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.search-form input[type="search"]:hover { border-color: #d3dcec; }
.search-form input[type="search"]:focus { background: #fff; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0, 65, 137, .12); }
.search-form .search-ico {
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center; border: none; background: none;
  color: #5b6b85; cursor: pointer; border-radius: 50%; padding: 0;
}
.search-form .search-ico:hover { color: var(--color-primary); }
.search-form .search-ico svg { width: 17px; height: 17px; }

.btn {
  display: inline-block; padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-text); cursor: pointer; font-size: 14px;
}
.btn:hover { text-decoration: none; border-color: var(--color-primary); }
.btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-danger { background: #fff; border-color: var(--color-danger); color: var(--color-danger); }
.btn-danger:hover { background: var(--color-danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* App shell */
.app-shell { display: flex; min-height: calc(100vh - 58px); align-items: flex-start; }

.sidebar {
  width: 260px; flex-shrink: 0; background: var(--color-surface);
  border-right: 1px solid var(--color-border); padding: 20px 0; min-height: calc(100vh - 58px);
}
.sidebar h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); padding: 0 20px; margin: 0 0 10px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar > ul > li { margin-bottom: 2px; }
.sidebar .cat-link {
  display: flex; align-items: center; padding: 9px 20px; color: var(--color-text);
  font-weight: 600; font-size: 14px; cursor: pointer; user-select: none;
}
.sidebar a.cat-link { justify-content: space-between; }
.sidebar .cat-link:hover, .sidebar .cat-link.active { background: var(--color-primary-soft); text-decoration: none; color: var(--color-primary); }
.sidebar .cat-link-row { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.sidebar ul ul { padding-left: 12px; }
.sidebar ul ul a { font-weight: 400; padding: 7px 20px 7px 28px; font-size: 13.5px; }
.sidebar .count { color: var(--color-text-muted); font-weight: 400; font-size: 12px; }

/* Categorias com subcategorias (profundidade ilimitada) usando <details>/<summary>.
   Clicar em qualquer parte do nome (todo o "summary") expande/recolhe -
   nao ha link de navegacao aqui, so nas categorias de ultimo nivel. */
.sidebar details.cat-branch { margin-bottom: 2px; }
.sidebar details.cat-branch > summary { list-style: none; }
.sidebar details.cat-branch > summary::-webkit-details-marker { display: none; }
.sidebar details.cat-branch > summary.cat-link::before {
  /* Seta desenhada em SVG (nao e mais um caractere de texto), pra nao
     depender de como cada sistema/fonte renderiza o simbolo - assim fica
     sempre nitida, do mesmo tamanho, em qualquer navegador. */
  content: ''; display: inline-block; width: 18px; height: 10px; flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 1 L7 5 L2 9' stroke='%236b7280' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 10px 10px;
  transition: transform .15s ease;
}
.sidebar details.cat-branch[open] > summary.cat-link::before {
  transform: rotate(90deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 1 L7 5 L2 9' stroke='%23004189' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.sidebar details.cat-branch ul { padding-left: 16px; }
.sidebar details.cat-branch ul .cat-link { font-weight: 400; font-size: 13.5px; }
.sidebar details.cat-branch ul details.cat-branch > summary.cat-link { font-weight: 500; }

.main { flex: 1; padding: 28px 32px; min-width: 0; }

.page-title { margin: 0 0 6px; font-size: 22px; }
.page-subtitle { color: var(--color-text-muted); margin: 0 0 22px; font-size: 14px; }

/* Post cards */
.post-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.post-card h2 { margin: 0 0 6px; font-size: 17px; }
.post-card .meta { color: var(--color-text-muted); font-size: 12.5px; margin-bottom: 8px; }
.post-card p { margin: 0; color: #374151; }

/* Caminho do post dentro do menu (ex: Sistema > Aco > Estoque), mostrado
   so nos resultados de busca - ajuda a saber onde o post fica sem precisar
   abrir ele (ver routes/public.js -> /busca e lib/menu.js -> getCategoryPath). */
.post-card .breadcrumb {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  color: var(--color-text-muted); font-size: 12px; margin-bottom: 6px;
}
.post-card .breadcrumb .sep { color: #c6cbd2; font-size: 11px; }

.post-full {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 28px 32px; box-shadow: var(--shadow);
}
.post-full .meta { color: var(--color-text-muted); font-size: 13px; margin-bottom: 20px; border-bottom: 1px solid var(--color-border); padding-bottom: 16px; }
.post-content img { max-width: 100%; height: auto; cursor: zoom-in; }

/* Clique pra ampliar (lightbox) - usado principalmente pra prints de tela
   do sistema, que tem texto miudo e ficam ilegiveis espremidos na largura
   da coluna do post. So um efeito visual na hora de visualizar, nao mexe
   no arquivo nem no HTML salvo do post (public/js/image-lightbox.js). */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(17, 24, 39, 0.85);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 32px;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 100%; max-height: 100%; border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4); cursor: zoom-out;
}
.lightbox-close {
  position: absolute; top: 18px; right: 24px; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(255,255,255,0.12); border: none;
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.lightbox-hint {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.75); font-size: 12.5px; white-space: nowrap;
}
.post-content table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.post-content table, .post-content th, .post-content td { border: 1px solid var(--color-border); }
.post-content th, .post-content td { padding: 8px 10px; text-align: left; }
.post-content pre { background: #f3f4f6; padding: 12px; border-radius: 6px; overflow-x: auto; }
.post-content blockquote { border-left: 4px solid var(--color-primary); margin: 12px 0; padding: 4px 16px; color: var(--color-text-muted); }

/* Linha de acoes do post (rodape): exportar para Word (qualquer pessoa
   logada) e editar post (so ADM) lado a lado */
.post-actions-row {
  margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--color-border);
  display: flex; gap: 10px; flex-wrap: wrap;
}

/* Aviso de pre-visualizacao (post ainda nao salvo) */
.preview-banner {
  background: #fef3c7; color: #92400e; border: 1px solid #fcd34d;
  padding: 10px 16px; border-radius: 6px; margin-bottom: 18px; font-weight: 600;
}

/* Feedback widget */
.feedback-box {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--color-border);
}
.feedback-box .question { font-weight: 600; margin-bottom: 10px; }
.feedback-actions { display: flex; gap: 10px; }
.feedback-reason { display: none; margin-top: 14px; }
.feedback-reason textarea {
  width: 100%; min-height: 80px; padding: 10px; border: 1px solid var(--color-border);
  border-radius: var(--radius); font-family: inherit; font-size: 14px; resize: vertical;
}
.feedback-thanks { color: var(--color-success); font-weight: 600; }

/* Tables (admin) */
table.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--color-border); text-align: left; font-size: 13.5px; }
table.data-table th { background: #f9fafb; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; font-size: 11.5px; letter-spacing: .03em; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: #fafbfc; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge-published { background: #dcfce7; color: #15803d; }
.badge-draft { background: #fef3c7; color: #b45309; }
.badge-useful { background: #dcfce7; color: #15803d; }
.badge-not-useful { background: #fee2e2; color: #b91c1c; }
.badge-role { background: #e5e7eb; color: #374151; }
.badge-admin { background: var(--color-primary-soft-2); color: var(--color-primary); }

/* Stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-tile { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-tile .value { font-size: 26px; font-weight: 700; color: var(--color-dark); }
.stat-tile .label { color: var(--color-text-muted); font-size: 13px; margin-top: 2px; }

.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h3 { margin-top: 0; font-size: 15px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13.5px; }
.form-group input[type="text"], .form-group input[type="password"], .form-group select, .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 14px; font-family: inherit;
}
.form-group .hint { color: var(--color-text-muted); font-size: 12.5px; margin-top: 4px; }
.hint { color: var(--color-text-muted); font-size: 12.5px; }

/* Textarea de "Codigo HTML" no formulario de post (ver views/admin/post-form.ejs).
   E um textarea normal (onde a pessoa digita/cola), com uma copia colorida
   (destacando tags/atributos) exibida atras dele, alinhada pixel a pixel -
   por isso as duas caixas precisam ter exatamente a mesma fonte, tamanho,
   espacamento e borda. */
.html-code-wrap { position: relative; margin-top: 8px; }
.html-code-wrap .content-html-editor,
.html-code-wrap .content-html-highlight {
  min-height: 480px; font-family: Consolas, 'Courier New', monospace; font-size: 13.5px;
  line-height: 1.55; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius);
  white-space: pre-wrap; word-break: break-word; margin: 0; box-sizing: border-box;
}
.content-html-highlight {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  overflow: auto; background: #fff; color: var(--color-text); pointer-events: none;
}
.content-html-highlight code { font-family: inherit; white-space: inherit; word-break: inherit; }
.content-html-editor {
  position: relative; width: 100%; background: transparent; color: transparent; caret-color: #111827;
}
.content-html-editor::selection { background: #bfdbfe; color: transparent; }
.hl-tag { color: var(--color-primary); font-weight: 600; }
.hl-attr { color: #b45309; }
.hl-string { color: #15803d; }
.hl-comment { color: #6b7280; font-style: italic; }

/* Arrastar-e-soltar para reordenar categorias (tela "Gerenciar menu") */
.drag-handle { cursor: grab; color: var(--color-text-muted); margin-right: 6px; }
tbody.cat-block { cursor: grab; }
tbody.cat-block.dragging { opacity: .4; }
tbody.cat-block.drop-before tr.cat-row td { box-shadow: inset 0 2px 0 0 var(--color-primary); }
tbody.cat-block.drop-after tr.cat-row td { box-shadow: inset 0 -2px 0 0 var(--color-primary); }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.admin-shell { display: flex; align-items: flex-start; }
.admin-nav { width: 220px; flex-shrink: 0; background: var(--color-dark); min-height: calc(100vh - 58px); padding: 18px 0; }
.admin-nav a { display: block; padding: 10px 22px; color: #cbd5e1; font-size: 14px; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.admin-main { flex: 1; padding: 28px 32px; min-width: 0; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }

.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tag-row a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--color-border); font-size: 13px; color: var(--color-text); }
.tag-row a.active, .tag-row a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); text-decoration: none; }

footer.site-footer { text-align: center; padding: 20px; color: var(--color-text-muted); font-size: 12.5px; }

/* Tela inicial: quadro de recados (esquerda) + links rapidos (direita) */
/* max-width 874.4px = quadro de recados 10% maior (544px -> 598.4px); a
   coluna do Acesso rapido ao lado fica igual (ja estava no teto de 260px),
   entao todo esse espaco extra vai só para o quadro. */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px); gap: 16px; margin-bottom: 26px; align-items: start; max-width: 874.4px; }
.announcement-board, .quick-links-board { margin-bottom: 0; display: flex; flex-direction: column; }
/* O quadro de recados ocupa toda a largura da sua coluna (sem sobra de
   espaco entre ele e o Acesso rapido). Quem controla o tamanho do quadro
   agora e a largura da coluna do Acesso rapido ao lado, que fica entre
   180px e 260px - estreita o bastante pra poucos links, mas cresce um
   pouco sozinha se links com nomes maiores forem cadastrados. */
.announcement-board h3, .quick-links-board h3 { margin: 0 0 12px; font-size: 14px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.announcement-empty { color: var(--color-text-muted); font-size: 14px; padding: 30px 0; text-align: center; }

/* Formato fixo tipo banner (16:9) - nao estica mais para acompanhar a altura
   do quadro de acesso rapido ao lado. Tamanho de imagem recomendado: 1200x675px
   (ou qualquer imagem na proporcao 16:9); imagens fora dessa proporcao sao
   cortadas nas bordas (object-fit: cover) para preencher o retangulo sem
   distorcer. */
.announcement-slideshow { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #f3f4f6; }
.announcement-slide {
  position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s ease;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; /* evita que um slide invisivel (empilhado por baixo) "roube"
                            o clique do link do slide ativo, que fica por cima dele */
}
.announcement-slide.active { opacity: 1; pointer-events: auto; }
.announcement-slide img { width: 100%; height: 100%; object-fit: cover; background: #111827; }
/* Quando a imagem do quadro de recados tem um link (opcional) associado */
.announcement-slide-link { position: absolute; inset: 0; display: block; cursor: pointer; }
.announcement-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 14px; font-size: 13px;
  background: rgba(17,24,39,0.65); color: #fff;
}
.announcement-dots { position: absolute; bottom: 8px; right: 10px; display: flex; gap: 5px; z-index: 2; }
.announcement-dots .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.55); cursor: pointer; }
.announcement-dots .dot.active { background: #fff; }

.announcement-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(17,24,39,0.45); color: #fff; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.announcement-nav:hover { background: rgba(17,24,39,0.7); }
.announcement-nav.prev { left: 10px; }
.announcement-nav.next { right: 10px; }

/* Lista de Acesso rapido: cada link com um "avatar" circular (inicial do
   nome) e uma linha fina separando um item do seguinte - igual ao card que
   a Keila aprovou (imagem de referencia), sem depender de icones cadastrados
   um a um (usa so a inicial do nome de cada link). */
.quick-links-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; flex: 1; }
.quick-links-list li { border-top: 1px solid var(--color-border); }
.quick-links-list li:first-child { border-top: none; }
.quick-links-list li a {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-radius: 6px; color: var(--color-text); font-size: 13.5px; font-weight: 600;
}
.quick-links-list li a:hover { background: var(--color-primary-soft); color: var(--color-primary); text-decoration: none; }
.quick-links-list .qlink-icon {
  width: 26px; height: 26px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}

@media (max-width: 860px) {
  .app-shell, .admin-shell { flex-direction: column; }
  .sidebar, .admin-nav { width: 100%; min-height: auto; border-right: none; border-bottom: 1px solid var(--color-border); }
  .main, .admin-main { padding: 20px; }
  .search-form { max-width: none; margin: 10px 0 0; width: 100%; }
  .home-top { grid-template-columns: 1fr; }
}

/* Modal simples (aviso central com botao OK) - usado, por exemplo, para
   mostrar erros de formulario sem depender do alert() nativo do navegador. */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17,24,39,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
}
.modal-box {
  background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 360px; padding: 22px; text-align: center;
}
.modal-box p { margin: 0 0 18px; color: var(--color-text); font-size: 14.5px; line-height: 1.5; }
.modal-box .btn { min-width: 96px; }

/* Posts restritos (visiveis so para o perfil Administrador) */
.badge-restricted { background: #fee2e2; color: #b91c1c; vertical-align: middle; display: inline-flex; align-items: center; gap: 4px; }
.post-card h2 .badge-restricted { font-size: 11px; margin-left: 6px; }
.ico-lock { flex: 0 0 auto; }
.restricted-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-left: 4px solid #dc2626;
  padding: 10px 14px; border-radius: 6px; margin-bottom: 18px; font-size: 14px;
}
.restricted-banner .ico-lock { width: 18px; height: 18px; margin-top: 1px; }
.restricted-toggle { margin: -4px 0 14px; font-size: 13px; color: var(--color-text-muted); }
.restricted-toggle label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; font-weight: 400; }
.restricted-toggle input { width: 14px; height: 14px; margin: 0; accent-color: #dc2626; }
.restricted-toggle strong { color: var(--color-text); font-weight: 600; }

/* ---- Menu lateral: "Inicio" no topo + icones nas categorias (out/2026) ---- */
.sidebar { padding-top: 14px; }
.sidebar .side-top { margin-bottom: 14px; }
.sidebar h3 { margin-bottom: 6px; }
.sidebar .cat-link { gap: 10px; padding: 9px 16px 9px 20px; font-weight: 500; color: #374151; border-radius: 0 8px 8px 0; margin-right: 10px; }
.sidebar .cat-link .cat-name { flex: 1; min-width: 0; line-height: 1.3; }
.sidebar .cat-ico { display: inline-flex; width: 20px; justify-content: center; color: #6b7280; flex-shrink: 0; }
.sidebar .cat-link:hover .cat-ico, .sidebar .cat-link.active .cat-ico { color: var(--color-primary); }
.sidebar .cat-link.active { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.sidebar .side-home { font-weight: 600; color: var(--color-text); }
.sidebar .count {
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: #f3f4f6;
  color: #6b7280; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.sidebar .cat-link.active .count { background: var(--color-primary-soft-2); color: var(--color-primary); }
.sidebar details.cat-branch > summary.cat-link::before { content: none; display: none; }
.sidebar .cat-chevron { display: inline-flex; color: #9ca3af; transition: transform .15s ease; }
.sidebar .cat-chevron .ico-chevron { width: 16px; height: 16px; }
.sidebar details.cat-branch[open] > summary .cat-chevron { transform: rotate(90deg); color: var(--color-primary); }
.sidebar details.cat-branch ul { padding-left: 0; margin: 2px 0 4px 30px; border-left: 1px solid var(--color-border); }
.sidebar details.cat-branch ul .cat-link { font-weight: 400; font-size: 13.5px; padding: 7px 14px 7px 14px; }
.sidebar details.cat-branch ul details.cat-branch > summary.cat-link { font-weight: 500; }
.sidebar details.cat-branch ul details.cat-branch ul { margin-left: 14px; }

/* ---- Acesso rapido no modelo aprovado (out/2026): faixa azul no titulo,
   circulo colorido com a inicial (cores alternadas) e seta a direita ---- */
.quick-links-board { padding: 0; overflow: hidden; }
.quick-links-board h3 {
  margin: 0; padding: 12px 16px; background: var(--color-primary); color: #fff;
  text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 700;
}
.quick-links-board .announcement-empty { padding: 30px 16px; }
.quick-links-list { padding: 4px 8px 6px; }
.quick-links-list li { border-top: 1px solid #eef0f3; }
.quick-links-list li a { padding: 10px 6px; gap: 12px; font-weight: 500; color: var(--color-text); }
.quick-links-list li a .qlink-label { flex: 1; min-width: 0; }
.quick-links-list .qlink-icon { width: 30px; height: 30px; font-size: 13px; color: #fff; background: var(--qcolor, var(--color-primary)); }
.quick-links-list li:nth-child(4n+1) .qlink-icon { --qcolor: #0062d4; }
.quick-links-list li:nth-child(4n+2) .qlink-icon { --qcolor: #2a9d69; }
.quick-links-list li:nth-child(4n+3) .qlink-icon { --qcolor: #7036d8; }
.quick-links-list li:nth-child(4n+4) .qlink-icon { --qcolor: #f7801a; }
.quick-links-list .qlink-chevron { display: inline-flex; color: #9ca3af; }
.quick-links-list .qlink-chevron svg { width: 16px; height: 16px; }
.quick-links-list li a:hover .qlink-chevron { color: var(--color-primary); }

/* ---- Cards de posts no modelo aprovado (out/2026): faixa colorida a
   esquerda (cores alternadas), seta a direita e o card inteiro clicavel ---- */
.post-card {
  position: relative; border-left: 4px solid var(--pcolor, var(--color-primary));
  padding: 16px 48px 16px 20px; border-radius: 10px; transition: box-shadow .15s ease, transform .15s ease;
}
.post-card:nth-of-type(3n+1) { --pcolor: #0062d4; }
.post-card:nth-of-type(3n+2) { --pcolor: #7036d8; }
.post-card:nth-of-type(3n+3) { --pcolor: #1f8a5b; }
.post-card h2 { font-size: 16px; }
.post-card h2 a { color: var(--color-primary); }
.post-card h2 a::after { content: ''; position: absolute; inset: 0; } /* card inteiro clicavel */
.post-card p { font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-chevron { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #9ca3af; display: inline-flex; }
.post-card-chevron svg { width: 18px; height: 18px; }
.post-card:hover { box-shadow: 0 4px 14px rgba(0, 65, 137, .12); }
.post-card:hover .post-card-chevron { color: var(--color-primary); }
.post-card:hover h2 a { text-decoration: underline; }

/* ---- Usuario no topo (out/2026): avatar com iniciais, saudacao e botao
   "Painel ADM" (so perfil Administrador) logo abaixo do nome ---- */
.user-box { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--color-primary-soft-2); color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1.2; }
.user-name { font-size: 13.5px; font-weight: 600; color: var(--color-text); }
.btn-admin {
  display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--color-primary); color: #fff;
  font-size: 12px; font-weight: 600; line-height: 1.4;
}
.btn-admin:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }
.btn-logout { margin-left: 4px; }

/* ---- Area do usuario (out/2026): menu Perfil/Sair no nome e tela de perfil ---- */
img.user-avatar { object-fit: cover; border: 1px solid var(--color-border); }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; user-select: none; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu .ico-caret { width: 15px; height: 15px; color: #6b7280; transition: transform .15s ease; }
.user-menu[open] .ico-caret { transform: rotate(180deg); color: var(--color-primary); }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; z-index: 50;
  background: #fff; border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(17, 24, 39, .12); padding: 6px;
}
.user-menu-panel a, .user-menu-panel button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 7px;
  font-size: 13.5px; color: var(--color-text); background: none; border: none; cursor: pointer; font-family: inherit; text-align: left;
}
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--color-primary-soft); color: var(--color-primary); text-decoration: none; }
.user-menu-panel form { margin: 0; }
.user-menu-panel .ico-menu { width: 16px; height: 16px; color: #6b7280; }
.user-menu-panel a:hover .ico-menu, .user-menu-panel button:hover .ico-menu { color: var(--color-primary); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; max-width: 900px; align-items: start; }
.profile-card h3 { margin-bottom: 16px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.profile-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--color-border); }
.profile-photo-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--color-primary-soft-2); color: var(--color-primary); font-size: 30px; font-weight: 700; border: none; }
.profile-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.profile-meta { font-size: 13px; color: var(--color-text-muted); margin-top: 3px; }
.profile-actions { display: inline-block; margin: 0 6px 0 0; }
.profile-actions label.btn { cursor: pointer; }
.ico-btn { width: 15px; height: 15px; vertical-align: -3px; }
.profile-hint { color: var(--color-text-muted); font-size: 12.5px; margin: 10px 0 12px; }

/* ---- Dashboard (out/2026) ---- */
.dash .top-actions { margin-bottom: 18px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico label" "value value" "sub sub";
  column-gap: 10px; row-gap: 4px; align-items: center; padding: 16px 18px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow); color: var(--color-text);
}
a.kpi:hover { text-decoration: none; border-color: var(--color-primary-soft-2); box-shadow: 0 4px 14px rgba(0, 65, 137, .10); }
.kpi-ico { grid-area: ico; width: 32px; height: 32px; border-radius: 9px; background: var(--color-primary-soft); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; }
.kpi-ico svg { width: 17px; height: 17px; }
.kpi-label { grid-area: label; font-size: 13px; color: var(--color-text-muted); font-weight: 600; }
.kpi-value { grid-area: value; font-size: 28px; font-weight: 700; color: var(--color-text); line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-sub { grid-area: sub; font-size: 12px; color: var(--color-text-muted); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { margin-bottom: 0; border-radius: 12px; }
.dash-card h3 { margin: 0 0 2px; font-size: 15px; }
.dash-note { margin: 0 0 14px; color: var(--color-text-muted); font-size: 12.5px; }
.dash-empty { color: var(--color-text-muted); font-size: 13.5px; padding: 18px 0; margin: 0; }
.dash-sub { margin: 18px 0 8px; font-size: 13px; color: var(--color-text-muted); font-weight: 600; }
.chart-box { position: relative; width: 100%; }
.dash-more { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; }
.fb-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: #fff; margin-top: 12px; }
.fb-ok { background: var(--color-success); border-radius: 7px 0 0 7px; }
.fb-no { background: var(--color-danger); border-radius: 0 7px 7px 0; }
.fb-legend { display: flex; gap: 18px; margin-top: 8px; font-size: 13px; color: var(--color-text); }
.fb-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.dot-ok { background: var(--color-success); } .dot-no { background: var(--color-danger); }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { padding: 10px 0; border-top: 1px solid #eef0f3; }
.dash-list li:first-child { border-top: none; }
.dash-list.compact li { padding: 8px 0; }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-main { font-size: 13.5px; font-weight: 600; color: var(--color-text); min-width: 0; }
.dl-quote { font-size: 13px; color: #374151; margin-top: 3px; }
.dl-meta { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.rank-list { list-style: none; margin: 8px 0 0; padding: 0; }
.rank-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.rank-n { width: 24px; height: 24px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-body { flex: 1; min-width: 0; }
.rank-top { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.rank-top a { color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-v { margin-left: auto; color: var(--color-text-muted); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.rank-track { height: 6px; background: #f1f3f6; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.rank-track span { display: block; height: 100%; background: var(--color-primary); border-radius: 3px; }

/* ---- Lista de posts: busca e paginacao (out/2026) ---- */
.list-search { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; max-width: 640px; position: relative; }
.list-search input { flex: 1; padding: 9px 12px 9px 36px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 14px; font-family: inherit; background: #fff; }
.list-search input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.list-search-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9ca3af; display: inline-flex; }
.list-search-ico svg { width: 16px; height: 16px; }
.list-info { font-size: 13px; color: var(--color-text-muted); margin: -4px 0 12px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pager-info { font-size: 13px; color: var(--color-text-muted); }
.pager-links { display: flex; gap: 4px; flex-wrap: wrap; }
.pager-links a, .pager-links span { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; border: 1px solid var(--color-border); background: #fff; color: var(--color-text); }
.pager-links a:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.pager-links .current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 600; }
.pager-links .disabled { color: #c3c8cf; }
.pager-links .gap { border: none; background: none; min-width: 20px; padding: 0; }

/* ---- Seletor de categoria do post no padrao do menu lateral (out/2026) ---- */
.cat-picker { position: relative; }
.cp-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px;
  border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; font: inherit; font-size: 14px; cursor: pointer; text-align: left; color: var(--color-text);
}
.cp-toggle:focus, .cp-toggle[aria-expanded="true"] { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.cp-current.empty { color: var(--color-text-muted); }
.cp-toggle .ico-caret { width: 16px; height: 16px; color: #6b7280; flex-shrink: 0; }
.cp-panel {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--color-border);
  border-radius: 10px; box-shadow: 0 12px 28px rgba(17, 24, 39, .14); padding: 8px; max-height: 380px; overflow: auto;
}
.cp-search { position: sticky; top: -8px; background: #fff; padding: 0 0 8px; display: flex; align-items: center; }
.cp-search svg { position: absolute; left: 10px; width: 15px; height: 15px; color: #9ca3af; }
.cp-search input { width: 100%; padding: 8px 10px 8px 32px; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: 13.5px; }
.cp-search input:focus { outline: none; border-color: var(--color-primary); }
.cp-tree, .cp-tree ul { list-style: none; margin: 0; padding: 0; }
.cp-tree ul { display: none; margin: 2px 0 4px 21px; padding-left: 8px; border-left: 1px solid var(--color-border); }
.cp-branch.open > ul, .cp-adding > ul { display: block; }
.cp-row { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; font-size: 13.5px; cursor: pointer; color: #374151; user-select: none; }
.cp-row:hover, .cp-row:focus { background: var(--color-primary-soft); outline: none; }
.cp-parent { font-weight: 500; }
.cp-tree > li > .cp-row { font-weight: 500; }
.cp-tree ul .cp-option { font-weight: 400; }
.cp-ico { display: inline-flex; width: 18px; justify-content: center; color: #6b7280; flex-shrink: 0; }
.cp-ico svg { width: 17px; height: 17px; }
.cp-name { flex: 1; min-width: 0; }
.cp-chevron { display: inline-flex; color: #9ca3af; transition: transform .15s ease; }
.cp-chevron svg { width: 15px; height: 15px; }
.cp-branch.open > .cp-row .cp-chevron { transform: rotate(90deg); color: var(--color-primary); }
.cp-check { visibility: hidden; color: var(--color-primary); font-weight: 700; }
.cp-row.selected { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.cp-row.selected .cp-check { visibility: visible; }
.cp-row.selected .cp-ico { color: var(--color-primary); }
.cp-legacy { color: #b45309; font-style: normal; font-size: 12px; font-weight: 400; }
.cp-none { border-bottom: 1px solid #eef0f3; margin-bottom: 4px; padding-bottom: 4px; }
.cp-empty { color: var(--color-text-muted); font-size: 13px; padding: 10px; margin: 0; }

.kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpi-grid { grid-template-columns: 1fr; } }

/* ---- Chat "Pergunte a intranet" (prototipo, out/2026) ---- */
.chat-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border: none; border-radius: 999px; background: var(--color-primary); color: #fff; font: inherit; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 65, 137, .35); cursor: pointer;
}
.chat-fab:hover { background: var(--color-primary-dark); }
.chat-fab .ico-fab { width: 18px; height: 18px; }
.chat-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 61; width: 400px; height: min(620px, calc(100vh - 48px));
  background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(17, 24, 39, .25); display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--color-border);
}
.chat-panel[hidden] { display: none; }
.chat-head { background: var(--color-primary); color: #fff; padding: 12px 12px 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.chat-head-title { display: flex; align-items: center; gap: 10px; }
.chat-head-title strong { display: block; font-size: 15px; }
.chat-head-title small { display: block; font-size: 12px; opacity: .8; }
.chat-bot-ico { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.15); display: inline-flex; align-items: center; justify-content: center; }
.chat-bot-ico svg { width: 18px; height: 18px; }
.chat-head-actions { display: flex; gap: 4px; }
.chat-icon-btn { width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.chat-icon-btn:hover { background: rgba(255,255,255,.15); }
.chat-icon-btn svg { width: 17px; height: 17px; }
.chat-demo-banner { background: #fef3c7; color: #92400e; font-size: 12px; padding: 7px 14px; border-bottom: 1px solid #fde68a; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 14px; background: #f7f8fa; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-bubble { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; background: #fff; border: 1px solid #e8eaee; color: var(--color-text); }
.chat-msg.user .chat-bubble { background: var(--color-primary); border-color: var(--color-primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.bot .chat-bubble { border-bottom-left-radius: 4px; }
.chat-suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 4px; }
.chat-suggest span { font-size: 12px; color: var(--color-text-muted); }
.chat-chip { border: 1px solid var(--color-primary-soft-2); background: #fff; color: var(--color-primary); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.chat-chip:hover { background: var(--color-primary-soft); }
.chat-sources { margin-top: 10px; padding-top: 8px; border-top: 1px solid #eef0f3; display: flex; flex-direction: column; gap: 5px; }
.chat-sources span { font-size: 11.5px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.chat-sources a { font-size: 12.5px; font-weight: 600; padding: 6px 9px; background: var(--color-primary-soft); border-radius: 8px; }
.chat-act { margin-top: 10px; border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 11px; background: #fff; display: flex; flex-direction: column; gap: 5px; }
.chat-act-title { font-weight: 700; font-size: 13px; }
.chat-act-row { display: grid; grid-template-columns: 92px 1fr; gap: 6px; font-size: 12.5px; }
.chat-act-row span { color: var(--color-text-muted); }
.chat-act-row b { font-weight: 600; word-break: break-word; }
.chat-act-note { font-size: 11.5px; color: var(--color-text-muted); }
.chat-act-btns { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.chat-act-btns button, .chat-act-prev { border: 1px solid var(--color-border); background: #fff; color: var(--color-text); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chat-act-prev { margin-right: auto; }
.chat-act-btns .chat-act-ok { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.chat-act-btns button:disabled { opacity: .55; cursor: default; }
.chat-act-res { font-size: 12.5px; font-weight: 600; padding: 6px 8px; border-radius: 8px; background: var(--color-primary-soft); }
.chat-act-res.err { background: #fdecec; color: #b42318; }
.chat-act-res.off { background: #f2f4f7; color: var(--color-text-muted); }
.chat-rate { margin-top: 8px; display: flex; gap: 6px; }
.chat-rate button { border: 1px solid var(--color-border); background: #fff; border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: 13px; }
.chat-rate button.on { border-color: var(--color-primary); background: var(--color-primary-soft); }
.chat-bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.chat-bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; animation: chatdot 1s infinite ease-in-out; }
.chat-bubble.typing span:nth-child(2) { animation-delay: .15s; } .chat-bubble.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-input { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--color-border); background: #fff; }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--color-border); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; max-height: 110px; }
.chat-input textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.chat-send { width: 40px; height: 40px; border-radius: 10px; border: none; background: var(--color-primary); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-send svg { width: 18px; height: 18px; }
.chat-foot { margin: 0; padding: 0 12px 10px; font-size: 11.5px; color: var(--color-text-muted); text-align: center; background: #fff; }
@media (max-width: 600px) {
  .chat-panel { right: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; }
  .chat-fab span { display: none; } .chat-fab { padding: 14px; }
}

/* ---- Painel: Assistente de IA (out/2026) ---- */
.ai-admin form { max-width: 880px; }
.ai-admin #ai-test { max-width: 880px; }
.ai-card { border-radius: 12px; }
.ai-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 16px; }
.ai-card h3 small { font-weight: 400; color: var(--color-text-muted); font-size: 12.5px; }
.ai-step { width: 26px; height: 26px; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-step svg { width: 14px; height: 14px; }
.ai-step.ai-lock { background: #6b7280; }
.ai-help { color: var(--color-text-muted); font-size: 13px; margin: 0 0 14px; }
.ai-field { margin-bottom: 14px; }
.ai-label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.ai-label small { font-weight: 400; color: var(--color-text-muted); }
.ai-field input[type=text], .ai-field input[type=password], .ai-field select, .ai-field textarea, .ai-test-form input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit; font-size: 14px; background: #fff;
}
.ai-field textarea { resize: vertical; }
.ai-field input:focus, .ai-field select:focus, .ai-field textarea:focus, .ai-test-form input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.ai-inline { display: flex; align-items: center; gap: 12px; margin-bottom: 0; }
.ai-inline .ai-label { margin: 0; }
.ai-input-sm { width: 90px; padding: 7px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit; }
.ai-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 760px) { .ai-grid-2 { grid-template-columns: 1fr; } }
.ai-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-options.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .ai-options, .ai-options.three { grid-template-columns: 1fr; } }
.ai-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 10px; cursor: pointer; background: #fff; }
.ai-option input { margin-top: 3px; accent-color: var(--color-primary); }
.ai-option strong { display: block; font-size: 14px; }
.ai-option small { display: block; color: var(--color-text-muted); font-size: 12.5px; margin-top: 2px; }
.ai-option:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }
.ai-seg { display: inline-flex; border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.ai-seg label { cursor: pointer; }
.ai-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ai-seg span { display: inline-block; padding: 8px 14px; font-size: 13.5px; border-right: 1px solid var(--color-border); }
.ai-seg label:last-child span { border-right: none; }
.ai-seg input:checked + span { background: var(--color-primary); color: #fff; font-weight: 600; }
.ai-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 0 0 10px; cursor: pointer; }
.ai-check input { accent-color: var(--color-primary); width: 16px; height: 16px; }
.ai-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin-bottom: 8px; }
@media (max-width: 760px) { .ai-checks { grid-template-columns: 1fr; } }
.ai-check-inline { font-size: 12.5px; color: var(--color-danger); margin-left: 10px; cursor: pointer; }
.ai-keystate { font-size: 13px; margin: 0 0 6px; }
.ai-card-warn { border-left: 4px solid #f59e0b; }
.ai-card-locked { background: #f9fafb; }
.ai-rules { margin: 8px 0 12px; padding-left: 20px; font-size: 13.5px; color: #374151; }
.ai-rules li { margin-bottom: 4px; }
.ai-preview summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--color-primary); }
.ai-preview pre { white-space: pre-wrap; background: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 12px; font-size: 12px; max-height: 340px; overflow: auto; margin-top: 10px; }
.ai-status .ai-status-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ai-status.on { border-color: #bbf7d0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch-track { width: 46px; height: 26px; border-radius: 999px; background: #d1d5db; position: relative; transition: background .15s; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.switch input:checked + .switch-track { background: var(--color-success); }
.switch input:checked + .switch-track .switch-thumb { left: 23px; }
.switch-label::after { content: attr(data-off); font-weight: 600; font-size: 14px; color: var(--color-text-muted); }
.switch input:checked ~ .switch-label::after { content: attr(data-on); color: #15803d; }
.ai-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; margin: 0 0 20px; background: rgba(255,255,255,.95); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 -4px 16px rgba(17,24,39,.06); }
.ai-savebar .ai-help { margin: 0; }
.ai-test-form { display: flex; gap: 8px; }
.ai-test-out { margin-top: 14px; padding: 14px; background: #f7f8fa; border-radius: 10px; font-size: 14px; }
.ai-demo-tag { display: inline-block; font-size: 12px; background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 6px; margin: 0 0 8px; }

/* ---- Assistente de IA: refinamento visual (out/2026) ---- */
.ai-title { display: flex; align-items: center; gap: 14px; }
.ai-title-ico { color: var(--color-primary); display: inline-flex; }
.ai-title-ico svg { width: 34px; height: 34px; }
.ai-admin .page-title { font-size: 26px; color: var(--color-primary); margin-bottom: 2px; }
.ai-admin .page-subtitle { margin-bottom: 0; }
.ai-admin .top-actions { margin-bottom: 18px; }
.ai-flash { display: flex; align-items: center; gap: 10px; font-weight: 600; max-width: 880px; }
.ai-flash-ico { display: inline-flex; color: #fff; background: var(--color-success); border-radius: 50%; padding: 2px; }
.ai-flash-ico svg { width: 16px; height: 16px; }
.ai-flash > span:nth-child(2) { flex: 1; }
.ai-flash-close { border: none; background: none; color: #166534; cursor: pointer; display: inline-flex; padding: 2px; opacity: .7; }
.ai-flash-close:hover { opacity: 1; }
.ai-flash-close svg { width: 16px; height: 16px; }
.ai-card { padding: 20px 24px; }
.ai-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.ai-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--color-text); display: block; }
.ai-head .ai-help { margin: 3px 0 0; }
.ai-card .ai-head .ai-step { width: 34px; height: 34px; font-size: 16px; font-weight: 700; margin-top: 0; }
.ai-card .ai-head .ai-step svg { width: 17px; height: 17px; }
.ai-head-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-head-ico svg { width: 18px; height: 18px; }
.ai-status .ai-status-row { align-items: center; margin-bottom: 4px; }
.ai-status .ai-status-row .ai-head { margin-bottom: 0; }
.ai-option { align-items: center; padding: 14px 16px; }
.ai-option input { margin-top: 0; }
.ai-opt-ico { display: inline-flex; color: #4b5563; }
.ai-opt-ico svg { width: 18px; height: 18px; }
.ai-option:has(input:checked) .ai-opt-ico { color: var(--color-primary); }
.ai-info { display: inline-flex; vertical-align: -3px; color: #9ca3af; cursor: help; margin-left: 4px; }
.ai-info svg { width: 15px; height: 15px; }
.ai-inline .ai-input-sm { width: 100px; padding: 8px 10px; }
.ai-field select { appearance: none; -webkit-appearance: none; padding-right: 36px; max-width: 420px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; }
.ai-savebar-note { display: inline-flex; align-items: center; gap: 8px; }
.ai-savebar-note svg { width: 16px; height: 16px; color: #6b7280; }
.ai-save-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; font-weight: 600; }
.ai-save-btn svg { width: 16px; height: 16px; }
.ai-status .ai-status-row { margin-bottom: 16px; }

/* ---- Pagina institucional "Sobre Nos" (out/2026) ---- */
.sidebar .side-top li + li { margin-top: 2px; }
.sidebar .side-home .cat-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.institutional-page .page-title { margin-bottom: 16px; }

/* ---- Excluir post com confirmacao Sim / Nao (out/2026) ---- */
.modal-overlay[hidden] { display: none; }
.link-danger { border: none; background: none; padding: 0; color: var(--color-danger); font: inherit; font-size: inherit; cursor: pointer; }
.link-danger:hover { text-decoration: underline; }
.btn-danger-outline { background: #fff; color: var(--color-danger); border-color: #fecaca; }
.btn-danger-outline:hover { background: #fef2f2; border-color: var(--color-danger); color: var(--color-danger); }
.btn-danger-solid { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
.btn-danger-solid:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.confirm-box { max-width: 400px; padding: 26px 24px 22px; border-radius: 14px; box-shadow: 0 20px 50px rgba(17, 24, 39, .3); }
.confirm-ico { width: 48px; height: 48px; border-radius: 50%; background: #fee2e2; color: var(--color-danger); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.confirm-ico svg { width: 22px; height: 22px; }
.confirm-box h3 { margin: 0 0 8px; font-size: 18px; }
.confirm-box form { margin: 0; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { min-width: 120px; }

.form-actions-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.form-actions-row .btn-delete-post{margin-left:auto}

/* Identidade (logo + nome) na tela Sobre Nos */
.brand-card { padding: 16px 20px; }
.brand-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand-logo-box { width: 64px; height: 64px; border: 1px dashed var(--color-border); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #f8fafc; flex-shrink: 0; }
.brand-logo-box img { max-width: 48px; max-height: 48px; }
.brand-logo-actions { display: flex; flex-direction: column; gap: 4px; min-width: 170px; }
.brand-logo-actions .ai-help { margin: 0; font-size: 12px; }
.brand-btns { display: flex; align-items: center; gap: 10px; }
.brand-btns .btn { cursor: pointer; }
.link-muted { border: none; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--color-text-muted); cursor: pointer; text-decoration: underline; }
.brand-names { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 280px; }
.brand-names .ai-field { margin: 0; }
.brand-preview { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-border); display: flex; align-items: center; gap: 14px; }
.brand-preview-tag { font-size: 12px; color: var(--color-text-muted); }
.brand-preview-box { display: inline-flex; background: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 6px 12px; }
.brand-err { color: var(--color-danger) !important; }
.brand-file-btn { align-self: flex-start; cursor: pointer; }
.vis-warn { color: #b45309; margin: -10px 0 16px; font-size: 12.5px; }
/* Logo + nome no canto superior esquerdo (todas as telas) */
.brand-mark-top { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.topbar .logo .brand-mark-top img, .brand-mark-top img { height: 34px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.brand-mark-names { display: flex; flex-direction: column; line-height: 1.08; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.brand-mark-names b { color: #1f2937; }
.brand-mark-names i { font-style: normal; color: #2563eb; }
.brand-mark-names small { font-size: 9px; font-weight: 400; color: #6b7280; }
.topbar a.logo { text-decoration: none; }
.brand-login { display: inline-flex; }
.brand-login .brand-mark-top img { height: 40px; }
.brand-login .brand-mark-names { font-size: 15px; text-align: left; }
.vis-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 18px; border: 1px solid var(--color-border); border-radius: 10px; background: #fff; font-size: 13.5px; }
.vis-bar.on { border-color: #bbf7d0; }
.vis-ico { color: var(--color-text-muted); display: inline-flex; }
.vis-ico svg { width: 16px; height: 16px; }
.vis-text { flex: 1; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.vis-text span { color: var(--color-text-muted); font-size: 12.5px; }
.switch-sm .switch-track { width: 36px; height: 20px; }
.switch-sm .switch-thumb { width: 14px; height: 14px; }
.switch-sm input:checked + .switch-track .switch-thumb { left: 19px; }
.switch-sm .switch-label::after { font-size: 13px; }

/* Menu do usuario: Modo Admin, Modo escuro e separador */
.user-menu-panel { min-width: 210px; }
.user-menu-sep { height: 1px; background: var(--color-border); margin: 5px 4px; }
.theme-toggle .mini-switch { margin-left: auto; width: 30px; height: 17px; border-radius: 999px; background: #cbd2dc; position: relative; flex-shrink: 0; transition: background .15s; }
.theme-toggle .mini-switch span { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.theme-toggle[aria-checked="true"] .mini-switch { background: var(--color-primary); }
.theme-toggle[aria-checked="true"] .mini-switch span { left: 15px; }

/* ===== Modo escuro (intranet, Painel ADM e login) ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0e1522;
  --color-surface: #162032;
  --color-border: #263349;
  --color-text: #e4e9f1;
  --color-text-muted: #9aa7bb;
  --color-primary: #2f6fd6;
  --color-primary-dark: #2559ad;
  --color-primary-soft: #1b2a44;
  --color-primary-soft-2: #22375a;
  --color-dark: #e4e9f1;
  --shadow: 0 1px 3px rgba(0,0,0,.45);
  --link: #7fb2ff;
}
html[data-theme="dark"] a { color: var(--link); }
html[data-theme="dark"] .btn, html[data-theme="dark"] .btn:hover { color: var(--color-text); }
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-primary:hover { color: #fff; }
html[data-theme="dark"] .user-menu-panel { background: var(--color-surface); box-shadow: 0 10px 28px rgba(0,0,0,.5); }
html[data-theme="dark"] .user-menu-panel a, html[data-theme="dark"] .user-menu-panel button { color: var(--color-text); }
html[data-theme="dark"] .user-menu-panel a:hover, html[data-theme="dark"] .user-menu-panel button:hover { color: var(--link); }
html[data-theme="dark"] .user-menu-panel .ico-menu, html[data-theme="dark"] .user-menu .ico-caret { color: var(--color-text-muted); }
html[data-theme="dark"] .user-avatar { color: #cfe0ff; }
html[data-theme="dark"] .theme-toggle .mini-switch { background: #3a4760; }
html[data-theme="dark"] .search-form input[type="search"] { background: #1c2840; border-color: #2a3852; color: var(--color-text); }
html[data-theme="dark"] .search-form input[type="search"]::placeholder { color: #8796ae; }
html[data-theme="dark"] .search-form input[type="search"]:focus { background: #111a2b; border-color: var(--link); box-shadow: 0 0 0 3px rgba(127,178,255,.18); }
html[data-theme="dark"] .search-form .search-ico { color: #9aa7bb; }
html[data-theme="dark"] .brand-mark-names b { color: #f1f5fb; }
html[data-theme="dark"] .brand-mark-names i { color: #7fb2ff; }
html[data-theme="dark"] .brand-mark-names small { color: #8b97ab; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #111a2b; color: var(--color-text); border-color: var(--color-border); }
html[data-theme="dark"] .flash-ok { background: #0f2e1d; color: #86efac; border-color: #1d5a37; }
html[data-theme="dark"] .flash-error { background: #3a1416; color: #fca5a5; border-color: #6b2226; }
/* Conteudo dos posts: cores fixas do editor viram a cor do tema para continuar legivel */
html[data-theme="dark"] .post-content, html[data-theme="dark"] .post-content * { color: var(--color-text) !important; }
html[data-theme="dark"] .post-content a, html[data-theme="dark"] .post-content a * { color: var(--link) !important; }
html[data-theme="dark"] .post-content [style*="background"] { background-color: transparent !important; }
html[data-theme="dark"] .post-content table, html[data-theme="dark"] .post-content td, html[data-theme="dark"] .post-content th { border-color: var(--color-border) !important; }
html[data-theme="dark"] .post-content th { background: #1c2840 !important; }
html[data-theme="dark"] .post-content img { background: transparent; }
html[data-theme="dark"] .post-content pre, html[data-theme="dark"] .post-content code { background: #0b111c !important; }
html[data-theme="dark"] .post-content blockquote { border-left-color: var(--color-border); }
html[data-theme="dark"] .post-card p { color: #c3cbd8; }
html[data-theme="dark"] .post-content pre { background: #0b111c; }
html[data-theme="dark"] .sidebar .cat-link { color: #d3d9e3; }
html[data-theme="dark"] .sidebar .cat-ico { color: #8e9bb0; }
html[data-theme="dark"] .sidebar .count { background: #1f2b40; color: #9aa7bb; }
html[data-theme="dark"] .sidebar .cat-link:hover, html[data-theme="dark"] .sidebar .cat-link.active { color: var(--link); }
html[data-theme="dark"] .quick-links-list li { border-top-color: var(--color-border); }

html[data-theme="dark"] .quick-links-list a:hover { color: var(--link); }
html[data-theme="dark"] .quick-links-board h3 { background: #1d4f9e; }
html[data-theme="dark"] .quick-links-list li a { color: var(--color-text); }
html[data-theme="dark"] .announcement-slideshow { background: #0b111c; }
html[data-theme="dark"] .post-card-title, html[data-theme="dark"] .post-card h3 a { color: var(--link); }
html[data-theme="dark"] .chat-panel { background: var(--color-surface); box-shadow: 0 18px 50px rgba(0,0,0,.6); }
html[data-theme="dark"] .chat-body { background: #0f1828; }
html[data-theme="dark"] .chat-bubble { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); }
html[data-theme="dark"] .chat-chip { background: transparent; color: var(--link); border-color: #2f4468; }
html[data-theme="dark"] .chat-sources { border-top-color: var(--color-border); }
html[data-theme="dark"] .chat-rate button { background: transparent; color: var(--color-text); }
html[data-theme="dark"] .chat-act, html[data-theme="dark"] .chat-act-btns button:not(.chat-act-ok), html[data-theme="dark"] .chat-act-prev { background: transparent; color: var(--color-text); }
html[data-theme="dark"] .chat-input, html[data-theme="dark"] .chat-foot { background: var(--color-surface); }
html[data-theme="dark"] .chat-head, html[data-theme="dark"] .chat-fab { background: #1d4f9e; }
html[data-theme="dark"] .tag-row a { color: var(--color-text); }
html[data-theme="dark"] table.data-table th { background: #1c2840; }
html[data-theme="dark"] table.data-table tr:hover td { background: #1a2539; }
html[data-theme="dark"] .badge-role { background: #26324a; color: #d3d9e3; }
html[data-theme="dark"] .pager-links a { color: var(--color-text); }
html[data-theme="dark"] .sidebar .cat-link.active .cat-ico, html[data-theme="dark"] .sidebar .cat-link:hover .cat-ico { color: var(--link); }
html[data-theme="dark"] .sidebar .cat-link.active .count { color: var(--link); }

/* ---- Acesso rapido em blocos (nov/2026): grade 2 colunas, icone em
   quadrado colorido escolhido pelo nome do link, seta no canto ---- */
.home-top { grid-template-columns: minmax(0, 1fr) minmax(320px, 410px); max-width: 1070px; }
.quick-links-board { padding: 18px 18px 16px; }
.quick-links-board h3 { background: none; color: var(--color-text); padding: 0 2px 14px; font-size: 18px; font-weight: 700; }
.quick-links-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-links-grid li a {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 10px 12px 10px 10px;
  border-radius: 12px; background: #f6f8fc; border: 1px solid #edf1f7; color: var(--color-text);
  font-size: 13px; font-weight: 600; line-height: 1.25; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.quick-links-grid li a:hover { background: #fff; border-color: var(--color-primary-soft-2); box-shadow: 0 6px 16px rgba(0, 40, 100, .10); transform: translateY(-1px); text-decoration: none; color: var(--color-text); }
.qtile-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(145deg, var(--qa), var(--qb)); box-shadow: 0 4px 10px -3px var(--qb);
}
.qtile-icon svg { width: 20px; height: 20px; }
.qtile-label { min-width: 0; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qtile-chevron { position: absolute; right: 9px; bottom: 7px; color: #9aa6b8; display: inline-flex; }
.qtile-chevron svg { width: 14px; height: 14px; }
.quick-links-grid li a:hover .qtile-chevron { color: var(--color-primary); }
.quick-links-grid li:nth-child(4n+1) .qtile-icon { --qa: #3b8bff; --qb: #1561e0; }
.quick-links-grid li:nth-child(4n+2) .qtile-icon { --qa: #3fca6b; --qb: #1f9d4b; }
.quick-links-grid li:nth-child(4n+3) .qtile-icon { --qa: #b46cff; --qb: #7c3aed; }
.quick-links-grid li:nth-child(4n+4) .qtile-icon { --qa: #ffab3d; --qb: #f07c0c; }
html[data-theme="dark"] .quick-links-board h3 { background: none; color: var(--color-text); }
html[data-theme="dark"] .quick-links-grid li a { background: #1a2539; border-color: #24324a; color: var(--color-text); }
html[data-theme="dark"] .quick-links-grid li a:hover { background: #1f2c44; border-color: #2f4468; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.ql-count { font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin-left: 4px; }
.ql-count.full { color: #b45309; }
.ql-full { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ---- Sino de notificacoes (nov/2026) ---- */
.notif { position: relative; margin-right: 4px; }
.notif-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; border: none; background: transparent; color: #4b5b74; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.notif-btn:hover, .notif-btn[aria-expanded="true"] { background: var(--color-primary-soft); color: var(--color-primary); }
.notif-btn svg { width: 21px; height: 21px; }
.notif-badge { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e11d2e; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--color-surface); }
.notif-panel { position: absolute; right: -6px; top: calc(100% + 8px); width: 320px; max-width: calc(100vw - 24px); z-index: 60; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 10px 28px rgba(17, 24, 39, .14); overflow: hidden; }
.notif-head { padding: 12px 14px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notif-head-count { font-size: 12px; font-weight: 600; color: #e11d2e; }
.notif-list { list-style: none; margin: 0; padding: 4px; max-height: 360px; overflow-y: auto; }
.notif-list a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; color: var(--color-text); text-decoration: none; }
.notif-list a:hover { background: var(--color-primary-soft); text-decoration: none; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); margin-top: 6px; flex-shrink: 0; }
.notif-txt { display: flex; flex-direction: column; min-width: 0; }
.notif-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.notif-list a:hover .notif-title { color: var(--color-primary); }
.notif-meta { font-size: 11.5px; color: var(--color-text-muted); margin-top: 2px; }
.notif-more { margin: 0; padding: 4px 14px 10px; font-size: 12px; color: var(--color-text-muted); }
.notif-empty { margin: 0; padding: 22px 14px; text-align: center; font-size: 13px; color: var(--color-text-muted); }
html[data-theme="dark"] .notif-btn { color: #aab6c9; }
html[data-theme="dark"] .notif-btn:hover, html[data-theme="dark"] .notif-btn[aria-expanded="true"] { color: var(--link); }
html[data-theme="dark"] .notif-panel { box-shadow: 0 10px 28px rgba(0,0,0,.5); }
html[data-theme="dark"] .notif-list a, html[data-theme="dark"] .notif-list a:hover .notif-title { color: var(--color-text); }
html[data-theme="dark"] .notif-list a:hover .notif-title { color: var(--link); }
html[data-theme="dark"] .notif-dot { background: var(--link); }

/* ---- Impressao / Exportar para PDF (nov/2026): so o post, igual a tela ---- */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm 13mm 16mm; }
  html, body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .topbar, .sidebar, .site-footer, .chat-fab, .chat-panel, .post-actions-row, .feedback-box, .preview-banner,
  .lightbox-overlay, #notif, .user-box { display: none !important; }
  .app-shell { display: block !important; min-height: 0 !important; }
  .main { padding: 0 !important; }
  .post-full { border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; max-width: none !important; background: #fff !important; }
  .print-only { display: block; }
  .print-header { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--color-primary); }
  .print-header .brand-mark-top img { height: 30px; }
  .post-full .page-title { margin-top: 0; }
  .post-content img { cursor: default; max-width: 100% !important; height: auto !important; break-inside: avoid; page-break-inside: avoid; }
  .post-content figure, .post-content pre, .post-content blockquote, .post-content tr { break-inside: avoid; page-break-inside: avoid; }
  .post-content h1, .post-content h2, .post-content h3, .post-content h4 { break-after: avoid; page-break-after: avoid; }
  .post-content table { width: 100% !important; }
  .post-content thead { display: table-header-group; }
  .post-content a { color: inherit; }
  .post-content p, .post-content li { orphans: 3; widows: 3; }
}

/* Botao de modo escuro no topo do Painel ADM */
.admin-theme-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-surface); color: #4b5b74; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.admin-theme-btn:hover { color: var(--color-primary); border-color: var(--color-primary-soft-2); }
.admin-theme-btn svg { width: 17px; height: 17px; }
.admin-theme-btn[aria-checked="true"] { background: var(--color-primary-soft); color: #ffd36b; border-color: #2f4468; }

/* ===== Modo escuro no Painel ADM e no login (nov/2026) ===== */
html[data-theme="dark"] .admin-nav { background: #0a101b; border-right: 1px solid var(--color-border); }
html[data-theme="dark"] .admin-nav a { color: #b7c2d3; }
html[data-theme="dark"] .stat-tile .value, html[data-theme="dark"] .kpi .value { color: var(--color-text); }
html[data-theme="dark"] .btn-danger, html[data-theme="dark"] .btn-danger-outline { background: transparent; color: #fca5a5; border-color: #7f2a2f; }
html[data-theme="dark"] .btn-danger:hover { background: #7f1d1d; color: #fff; }
html[data-theme="dark"] .btn-danger-outline:hover { background: #3a1416; color: #fecaca; }
html[data-theme="dark"] .btn-danger-solid, html[data-theme="dark"] .btn-danger-solid:hover { color: #fff; }
html[data-theme="dark"] input[readonly], html[data-theme="dark"] #post-link { background: #0b111c !important; color: var(--color-text-muted); }
html[data-theme="dark"] small[style*="#6b7280"] { color: var(--color-text-muted) !important; }
html[data-theme="dark"] input[type="file"] { color: var(--color-text-muted); }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6f7d93; }
/* seletor de categoria */
html[data-theme="dark"] .cp-toggle, html[data-theme="dark"] .cp-panel, html[data-theme="dark"] .cp-search { background: #111a2b; color: var(--color-text); }
html[data-theme="dark"] .cp-panel { box-shadow: 0 12px 30px rgba(0,0,0,.55); }
html[data-theme="dark"] .cp-row { color: #d3d9e3; }
html[data-theme="dark"] .cp-row.selected, html[data-theme="dark"] .cp-row.selected .cp-ico { color: var(--link); }
html[data-theme="dark"] .cp-none { border-bottom-color: var(--color-border); }
/* editor de codigo HTML */
html[data-theme="dark"] .content-html-highlight { background: #0b111c; color: var(--color-text); }
html[data-theme="dark"] .content-html-editor { caret-color: #e4e9f1; }
html[data-theme="dark"] .hl-tag { color: #7fb2ff; } html[data-theme="dark"] .hl-attr { color: #fbbf24; } html[data-theme="dark"] .hl-string { color: #86efac; } html[data-theme="dark"] .hl-comment { color: #8b97ab; }
/* telas em blocos (Assistente de IA, Sobre Nos) */
html[data-theme="dark"] .ai-field input[type=text], html[data-theme="dark"] .ai-field input[type=password], html[data-theme="dark"] .ai-field select, html[data-theme="dark"] .ai-field textarea, html[data-theme="dark"] .ai-test-form input { background: #111a2b; color: var(--color-text); border-color: var(--color-border); }
html[data-theme="dark"] .ai-option, html[data-theme="dark"] .ai-seg { background: #111a2b; }
html[data-theme="dark"] .ai-option:has(input:checked) { background: var(--color-primary-soft); border-color: #3b6fc4; }
html[data-theme="dark"] .ai-seg span { border-right-color: var(--color-border); color: var(--color-text); }
html[data-theme="dark"] .ai-card-locked { background: #131c2c; }
html[data-theme="dark"] .ai-rules { color: #c3cbd8; }
html[data-theme="dark"] .ai-preview pre, html[data-theme="dark"] .ai-test-out { background: #0b111c; color: var(--color-text); }
html[data-theme="dark"] .ai-savebar { background: rgba(22, 32, 50, .94) !important; border-color: var(--color-border); }
html[data-theme="dark"] .ai-status.on { border-color: #1d5a37; }
html[data-theme="dark"] .vis-bar { background: var(--color-surface); }
html[data-theme="dark"] .vis-bar.on { border-color: #1d5a37; }
html[data-theme="dark"] .brand-logo-box { background: #111a2b; border-color: var(--color-border); }
html[data-theme="dark"] .brand-preview-box { background: #fff; }
html[data-theme="dark"] .brand-preview-box .brand-mark-names b { color: #1f2937; }
html[data-theme="dark"] .brand-preview-box .brand-mark-names i { color: #2563eb; }
/* dashboard e listas */
html[data-theme="dark"] .dash-list li { border-top-color: var(--color-border); }
html[data-theme="dark"] .dl-quote { color: #c3cbd8; }
html[data-theme="dark"] .rank-track { background: #1f2b40; }
html[data-theme="dark"] .fb-bar { background: #0b111c; }
html[data-theme="dark"] .list-search input { background: #111a2b; }
html[data-theme="dark"] .ql-full { background: #3a2a0c; color: #fcd34d; border-color: #6b4e12; }
html[data-theme="dark"] .preview-banner { background: #3a2a0c; color: #fcd34d; border-color: #6b4e12; }
html[data-theme="dark"] .restricted-banner { background: #3a1416; color: #fecaca; border-color: #6b2226; }
html[data-theme="dark"] .modal-box { background: var(--color-surface); color: var(--color-text); }
html[data-theme="dark"] .content-html-editor { background: transparent !important; color: transparent !important; caret-color: #e4e9f1; }

/* Inicial da empresa no lugar do logo (empresas sem logo enviado) */
.brand-initial { width: 34px; height: 34px; border-radius: 9px; background: var(--color-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex-shrink: 0; }
.brand-login .brand-initial { width: 40px; height: 40px; font-size: 20px; }
.brand-initial-lg { width: 46px; height: 46px; font-size: 22px; border-radius: 11px; }

/* ===== Painel da plataforma (varias empresas) ===== */
.painel-main { max-width: 1240px; margin: 0 auto; padding: 28px 32px 40px; }
.painel-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); text-decoration: none !important; }
.painel-brand b { display: block; font-size: 15px; } .painel-brand small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.painel-logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, #1e6fe0, #0a3f8f); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.painel-logo svg { width: 20px; height: 20px; }
.painel-login-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.painel-login-head b { display: block; font-size: 16px; } .painel-login-head small { color: var(--color-text-muted); font-size: 12.5px; }
.aviso-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--color-bg); }
.aviso-card { max-width: 460px; text-align: center; padding: 34px 30px; }
.aviso-card h1 { font-size: 20px; margin: 10px 0 8px; } .aviso-card p { color: var(--color-text-muted); margin: 0; }
.aviso-ico { display: inline-flex; width: 46px; height: 46px; border-radius: 50%; align-items: center; justify-content: center; background: var(--color-primary-soft); color: var(--color-primary); }
.painel-search { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.painel-search span { color: var(--color-text-muted); display: inline-flex; } .painel-search svg { width: 17px; height: 17px; }
.painel-search input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; color: var(--color-text); padding: 4px 0; }
.painel-empty { padding: 30px 16px; text-align: center; color: var(--color-text-muted); margin: 0; }
.table-scroll { overflow-x: auto; }
.painel-table td { vertical-align: middle; }
.painel-co { display: block; color: var(--color-text); } .painel-url { font-size: 12px; color: var(--color-text-muted); }
.painel-roles { display: block; color: var(--color-text-muted); font-size: 11.5px; white-space: nowrap; }
.painel-online { display: flex; flex-direction: column; gap: 5px; min-width: 110px; }
.painel-bar { height: 6px; background: #e8edf4; border-radius: 3px; overflow: hidden; }
.painel-bar i { display: block; height: 100%; background: var(--color-success); border-radius: 3px; }
.painel-bar.warn i { background: #f59e0b; } .painel-bar.full i { background: var(--color-danger); }
.painel-back { font-size: 13px; }
.painel-slug { display: flex; align-items: stretch; }
.painel-slug input { flex: 1; min-width: 0; border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.painel-slug span { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--color-border); border-left: none; border-radius: 0 var(--radius) var(--radius) 0; background: var(--color-bg); color: var(--color-text-muted); font-size: 13.5px; white-space: nowrap; }
.painel-slug.is-fixed input { background: var(--color-bg); color: var(--color-text-muted); }
.painel-h3 { margin: 0 0 4px; font-size: 16px; } .painel-h3 small { color: var(--color-text-muted); font-weight: 500; }
.painel-danger { border-color: #fecaca; margin-top: 18px; }
.painel-del { display: flex; gap: 10px; flex-wrap: wrap; } .painel-del input { max-width: 260px; }
.painel-access { max-width: 640px; margin: 10px auto; text-align: center; padding: 30px; }
.painel-ok { display: inline-flex; width: 50px; height: 50px; border-radius: 50%; background: #dcfce7; color: #15803d; align-items: center; justify-content: center; } .painel-ok svg { width: 26px; height: 26px; }
.painel-cred { text-align: left; border: 1px solid var(--color-border); border-radius: 12px; margin: 18px 0 12px; overflow: hidden; }
.painel-cred div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--color-border); }
.painel-cred div:first-child { border-top: none; }
.painel-cred span { color: var(--color-text-muted); font-size: 13.5px; }
.painel-pwd { font-family: Consolas, 'Courier New', monospace; font-size: 16px; letter-spacing: .5px; color: var(--color-primary); }
.painel-warn { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: #92400e; background: #fef3c7; border-radius: 8px; padding: 9px 12px; }
.painel-warn svg { width: 16px; height: 16px; }
.painel-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.painel-actions .btn svg { width: 15px; height: 15px; vertical-align: -2px; }
.painel-msg { max-width: 560px; margin: 20px auto; }
html[data-theme="dark"] .painel-bar { background: #1f2b40; }
html[data-theme="dark"] .painel-danger { border-color: #6b2226; }
html[data-theme="dark"] .painel-warn { background: #3a2a0c; color: #fcd34d; }
html[data-theme="dark"] .painel-ok { background: #0f2e1d; color: #86efac; }
@media (max-width: 760px) { .painel-main { padding: 20px 16px; } }
.ai-field input[type=number] { width: 100%; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit; font-size: 14px; background: #fff; color: var(--color-text); }
html[data-theme="dark"] .ai-field input[type=number] { background: #111a2b; }
.painel-main .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.painel-del input { padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit; font-size: 14px; background: var(--color-surface); color: var(--color-text); }
.painel-mod { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 10px; cursor: pointer; }
.painel-mod input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--color-primary); }
.painel-mod small { display: block; color: var(--color-text-muted); font-size: 12.5px; margin-top: 3px; }
.painel-mod .badge { margin-left: 6px; vertical-align: 1px; }
.painel-modtag { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--color-primary-soft); color: var(--color-primary); }
.painel-nav { display: flex; gap: 4px; margin-right: auto; margin-left: 28px; }
.painel-nav a { padding: 7px 12px; border-radius: 8px; color: var(--color-text-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.painel-nav a:hover { color: var(--color-text); background: var(--color-primary-soft); }
.painel-nav a.active { color: var(--color-primary); background: var(--color-primary-soft); }
html[data-theme="dark"] .painel-nav a.active, html[data-theme="dark"] .painel-nav a:hover { color: var(--link); }
.painel-me { text-decoration: none; } .painel-me:hover { text-decoration: underline; }
.painel-help { font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; }
.painel-help svg { width: 13px; height: 13px; vertical-align: -2px; }
.painel-help:hover { color: var(--color-primary); }
.painel-next { display: block; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: var(--color-primary-soft); color: var(--color-primary); font-size: 13.5px; text-decoration: none; }
.painel-next:hover { text-decoration: underline; }
.painel-row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.painel-row-actions form { margin: 0; }
.painel-guide { max-width: 820px; }
.painel-steps { list-style: none; counter-reset: st; padding: 0; margin: 22px 0; }
.painel-steps > li { counter-increment: st; position: relative; padding: 2px 0 20px 46px; border-left: 2px solid var(--color-border); margin-left: 15px; }
.painel-steps > li:last-child { border-left-color: transparent; }
.painel-steps > li::before { content: counter(st); position: absolute; left: -16px; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--color-primary); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.painel-steps > li > b { display: block; font-size: 15px; margin: 4px 0 4px; }
.painel-steps > li > span { display: block; color: var(--color-text-muted); font-size: 14px; }
.painel-fields { border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); margin: 8px 0; }
.painel-fields > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 14px; border-top: 1px solid var(--color-border); }
.painel-fields > div:first-child { border-top: none; }
.painel-fields span { width: 190px; color: var(--color-text-muted); font-size: 13px; }
.painel-fields code { background: var(--color-primary-soft); color: var(--color-primary); padding: 3px 8px; border-radius: 6px; font-size: 13px; }
.painel-fields small { color: var(--color-text-muted); font-size: 12px; }
html[data-theme="dark"] .painel-fields code { color: var(--link); }
.painel-tips ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; } .painel-tips li { margin-bottom: 6px; }
@media (max-width: 760px) { .painel-nav { margin-left: 8px; } .painel-help { white-space: normal; } }

/* ===== Painel da plataforma — layout nov/2026 ===== */
.pv-bg { min-height: 100vh; background: radial-gradient(1200px 500px at 85% -10%, #e3edfc 0%, rgba(227,237,252,0) 60%), linear-gradient(180deg, #f3f6fb 0%, #eef3fa 100%); }
html[data-theme="dark"] .pv-bg { background: radial-gradient(1200px 500px at 85% -10%, #15233d 0%, rgba(21,35,61,0) 60%), var(--color-bg); }
.pv-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px 28px; background: rgba(255,255,255,.82); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(15,40,90,.06); }
html[data-theme="dark"] .pv-top { background: rgba(22,32,50,.85); border-bottom-color: var(--color-border); }
.pv-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); text-decoration: none !important; }
.pv-brand b { display: block; font-size: 14.5px; } .pv-brand small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.pv-nav { display: flex; gap: 4px; margin-left: 14px; }
.pv-nav a { padding: 7px 12px; border-radius: 9px; color: var(--color-text-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.pv-nav a:hover { color: var(--color-text); background: rgba(30,111,224,.07); }
.pv-nav a.active { color: #1d5fd3; background: #e7effd; }
html[data-theme="dark"] .pv-nav a.active { color: var(--link); background: var(--color-primary-soft); }
.pv-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pv-icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #e3e8f0; background: #fff; color: #44516a; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; }
.pv-icon-btn::-webkit-details-marker { display: none; }
.pv-icon-btn svg { width: 18px; height: 18px; }
.pv-icon-btn:hover { border-color: #c9d6ea; color: #1d5fd3; }
.pv-icon-btn[aria-checked="true"] { color: #f5b301; }
html[data-theme="dark"] .pv-icon-btn { background: #1a2539; border-color: var(--color-border); color: #b7c2d3; }
.pv-sep { width: 1px; height: 28px; background: #e3e8f0; } html[data-theme="dark"] .pv-sep { background: var(--color-border); }
.pv-user summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.pv-user summary::-webkit-details-marker { display: none; }
.pv-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(145deg, #9aa9c2, #6f7f9c); color: #fff; font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; }
.pv-user-txt b { display: block; font-size: 13.5px; color: var(--color-text); line-height: 1.2; } .pv-user-txt small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.pv-caret { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #e3e8f0; display: inline-flex; align-items: center; justify-content: center; color: #6b7280; }
html[data-theme="dark"] .pv-caret { border-color: var(--color-border); }
.pv-user[open] .pv-caret svg { transform: rotate(180deg); }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 6px 0 22px; }
.pv-head h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.5px; color: var(--color-text); }
.pv-btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px; background: linear-gradient(180deg, #2b6fe3, #1a56c7); color: #fff !important; font-weight: 700; font-size: 15px; text-decoration: none !important; box-shadow: 0 8px 18px -8px rgba(26,86,199,.6); transition: transform .15s, box-shadow .15s; }
.pv-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(26,86,199,.7); }
.pv-btn-primary svg { width: 18px; height: 18px; }
.pv-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1150px) { .pv-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .pv-kpis { grid-template-columns: 1fr 1fr; } .pv-head h1 { font-size: 28px; } }
.pv-kpi { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px 16px 18px 18px; border-radius: 16px; background: rgba(255,255,255,.92); border: 1px solid rgba(15,40,90,.06); box-shadow: 0 6px 20px -12px rgba(20,50,110,.25); color: var(--color-text); text-decoration: none !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pv-kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(20,50,110,.35); }
.pv-kpi.is-sorted { border-color: #b9cff5; }
html[data-theme="dark"] .pv-kpi { background: var(--color-surface); border-color: var(--color-border); box-shadow: none; }
.pv-kpi-ico { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pv-kpi-ico svg { width: 22px; height: 22px; }
.c-blue { background: #e7effd; color: #1d5fd3; } .c-green { background: #e3f6ea; color: #16a34a; } .c-purple { background: #efe8fd; color: #7c3aed; } .c-orange { background: #fdeee2; color: #ea6c0a; } .c-cyan { background: #e0f6fb; color: #0891b2; }
html[data-theme="dark"] .c-blue { background: #1b2c4b; } html[data-theme="dark"] .c-green { background: #12301f; } html[data-theme="dark"] .c-purple { background: #271d45; } html[data-theme="dark"] .c-orange { background: #3a2412; } html[data-theme="dark"] .c-cyan { background: #0f2f38; }
.pv-kpi-body { display: flex; flex-direction: column; min-width: 0; }
.pv-kpi-label { font-size: 13px; font-weight: 600; color: var(--color-text); }
.pv-kpi-value { font-size: 26px; font-weight: 800; line-height: 1.25; margin: 4px 0 2px; }
.pv-kpi-sub { font-size: 12px; color: var(--color-text-muted); }
.pv-kpi-go { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #8b97ab; display: inline-flex; } .pv-kpi-go svg { width: 18px; height: 18px; }
.pv-toolbar { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 16px; border-radius: 16px; background: rgba(255,255,255,.92); border: 1px solid rgba(15,40,90,.06); box-shadow: 0 6px 20px -14px rgba(20,50,110,.25); }
html[data-theme="dark"] .pv-toolbar { background: var(--color-surface); border-color: var(--color-border); }
.pv-search { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px; border-radius: 12px; border: 1px solid #edf1f7; background: #fff; color: #6b7a92; cursor: text; }
.pv-search svg { width: 18px; height: 18px; flex-shrink: 0; }
.pv-search input { flex: 1; border: none !important; outline: none; background: transparent !important; font-size: 14px; color: var(--color-text); padding: 0; box-shadow: none !important; }
html[data-theme="dark"] .pv-search { background: #111a2b; border-color: var(--color-border); }
.pv-sort { position: relative; } .pv-sort summary { list-style: none; }
.pv-sort-panel { right: 0; left: auto; min-width: 220px; }
.pv-sort-title { display: block; padding: 6px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--color-text-muted); }
.pv-sort-panel a.active { color: var(--color-primary); font-weight: 700; background: var(--color-primary-soft); }
.pv-select { height: 44px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid #e3e8f0; background: #fff; font: inherit; font-size: 14px; color: var(--color-text); cursor: pointer; min-width: 190px; }
html[data-theme="dark"] .pv-select { background: #111a2b; border-color: var(--color-border); }
.pv-card { border-radius: 18px; background: rgba(255,255,255,.92); border: 1px solid rgba(15,40,90,.06); box-shadow: 0 10px 30px -18px rgba(20,50,110,.3); overflow: hidden; }
html[data-theme="dark"] .pv-card { background: var(--color-surface); border-color: var(--color-border); }
.pv-card .data-table th:first-child, .pv-card .data-table td:first-child { padding-left: 20px; }
.pv-empty { text-align: center; padding: 34px 20px 44px; }
.pv-empty h2 { margin: 8px 0 8px; font-size: 20px; font-weight: 800; }
.pv-empty p { max-width: 470px; margin: 0 auto 22px; color: var(--color-text-muted); font-size: 14.5px; line-height: 1.6; }
.pv-illu { width: 240px; height: 150px; }
.pv-illu .win { fill: #f4f7fc; stroke: #c9d6ea; stroke-width: 1.5; } .pv-illu .winline { stroke: #c9d6ea; stroke-width: 1.5; }
.pv-illu .dot { fill: #c9d6ea; } .pv-illu .d1 { fill: #b9cbe8; } .pv-illu .d2 { fill: none; stroke: #b9cbe8; stroke-width: 1.5; }
.pv-illu .bld { fill: none; stroke: #8193b2; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-illu .plus-bg { fill: #2563eb; } .pv-illu .plus { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
html[data-theme="dark"] .pv-illu .win { fill: #1a2539; stroke: #33445f; } html[data-theme="dark"] .pv-illu .winline, html[data-theme="dark"] .pv-illu .dot { stroke: #33445f; fill: #33445f; }
.pv-foot-note { margin: 0; padding: 12px 20px; font-size: 12.5px; color: var(--color-text-muted); border-top: 1px solid var(--color-border); }
.pv-help-line { text-align: center; margin: 18px 0 0; }
.pv-bg .painel-main { padding-top: 26px; }
@media (max-width: 760px) { .pv-top { padding: 10px 14px; flex-wrap: wrap; } .pv-user-txt { display: none; } .pv-toolbar { flex-wrap: wrap; } .pv-select { flex: 1; } }
.pv-bg .painel-main { max-width: 1360px; padding-left: 24px; padding-right: 24px; }
.pv-kpi { gap: 12px; padding: 18px 30px 18px 16px; }
.pv-kpi-ico { width: 42px; height: 42px; }
.pv-kpi-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-kpi-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
@media (max-width: 700px) { .pv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pv-kpi { padding-right: 26px; } .pv-kpi-value { font-size: 22px; } }
html[data-theme="dark"] .pv-brand, html[data-theme="dark"] .pv-card .painel-co { color: var(--color-text); }
html[data-theme="dark"] .pv-nav a { color: var(--color-text-muted); }
html[data-theme="dark"] .pv-nav a.active, html[data-theme="dark"] .pv-nav a:hover { color: var(--link); }
html[data-theme="dark"] .pv-card .painel-url { color: var(--color-text-muted); }
@media (max-width: 700px) { .pv-kpi-label, .pv-kpi-sub { white-space: normal; } }

/* Endereco na internet (publicacao automatica no Proxy Manager) */
.painel-addr { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 20px; }
.painel-addr-main { display: flex; align-items: center; gap: 12px; }
.painel-addr-main b { display: block; font-size: 14.5px; } .painel-addr-main span { font-size: 13.5px; color: var(--color-text-muted); }
.painel-addr-ico { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--color-primary-soft); color: var(--color-primary); flex-shrink: 0; }
.painel-addr-ico.ok { background: #dcfce7; color: #15803d; } .painel-addr-ico.warn { background: #fef3c7; color: #b45309; }
.painel-pub { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 10px; margin: 0 0 12px; font-size: 13.5px; }
.painel-pub svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.painel-pub.ok { background: #dcfce7; color: #14532d; } .painel-pub.err { background: #fef3c7; color: #78350f; }
.painel-pub .btn { margin: 0 6px; }
html[data-theme="dark"] .painel-pub.ok, html[data-theme="dark"] .painel-addr-ico.ok { background: #0f2e1d; color: #86efac; }
html[data-theme="dark"] .painel-pub.err, html[data-theme="dark"] .painel-addr-ico.warn { background: #3a2a0c; color: #fcd34d; }

/* ---- Logo com o nome da empresa (sem nomes ao lado), ex.: Cardeal (nov/2026) ---- */
.brand-mark-logo-only img, .topbar .logo .brand-mark-logo-only img { height: 54px; max-width: 180px; }
.brand-login .brand-mark-logo-only img { height: 90px; max-width: 240px; }
.brand-preview-box .brand-mark-logo-only img { height: 40px; }
.print-header .brand-mark-logo-only img { height: 44px; }
.brand-mark-logo-only .brand-mark-names { display: none; }

/* ===== Gestao de tarefas (nov/2026) - classes tk-* ===== */
.tk-main { max-width: 1180px; }
.tk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-head .page-title { margin: 0; flex: 1; min-width: 0; }
.tk-new, .tk-head .btn { display: inline-flex; align-items: center; gap: 6px; }
.tk-new .ico, .tk-head .btn .ico { width: 16px; height: 16px; }
.tk-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-title .ico { color: var(--color-primary); }
.tk-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--color-text-muted); margin-bottom: 10px; }
.tk-back .ico { width: 15px; height: 15px; }
.tk-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tk-kpi { border: 1px solid; border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.tk-kpi span { font-size: 13px; }
.tk-kpi strong { font-size: 28px; line-height: 1.15; }
.tk-kpi-blue { background: #e8eff8; border-color: #b9cde6; color: #00336d; }
.tk-kpi-amber { background: #fef3c7; border-color: #f3d27a; color: #92400e; }
.tk-kpi-green { background: #dcfce7; border-color: #a7e3bb; color: #166534; }
a.tk-kpi { text-decoration: none; cursor: pointer; transition: box-shadow .15s, transform .15s; }
a.tk-kpi:hover { text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,.10); transform: translateY(-1px); }
a.tk-kpi.active { box-shadow: 0 0 0 2px currentColor; }
.tk-kpi-note { font-size: 11.5px; opacity: .85; margin-top: 2px; }
.tk-locked { display: flex; gap: 8px; align-items: center; background: #dcfce7; color: #166534; border: 1px solid #a7e3bb; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; max-width: 900px; }
.tk-locked .ico { flex-shrink: 0; }
.tk-readonly { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tk-readonly dt { font-size: 12px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 2px; }
.tk-readonly dd { margin: 0; font-size: 14px; }
html[data-theme="dark"] .tk-locked { background: #10301e; border-color: #1f5a37; color: #8fe0ad; }
@media (max-width: 700px) { .tk-readonly { grid-template-columns: 1fr; } }
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
@media (max-width: 1200px) { .tk-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; } .tk-list-head, .tk-row { grid-template-columns: minmax(0, 1fr) 118px 112px 80px 28px; gap: 8px; } }
.tk-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin-bottom: 16px; }
.tk-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--color-text-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tk-tabs a .ico { width: 16px; height: 16px; }
.tk-tabs a:hover { text-decoration: none; color: var(--color-primary); }
.tk-tabs a.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tk-layout-full { display: block; }
.tk-filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.tk-filterbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.tk-filterbar input, .tk-filterbar select { padding: 7px 9px; border: 1px solid var(--color-border); border-radius: 6px; font: inherit; font-size: 13px; font-weight: 400; background: var(--color-surface); color: var(--color-text); min-width: 0; }
.tk-filterbar input[name="id"] { width: 90px; }
.tk-filterbar input[type="date"] { width: 140px; }
.tk-filterbar select { max-width: 190px; }
.tk-filterbar-actions { display: flex; gap: 6px; margin-left: auto; }
.tk-filterbar-actions .btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; font-size: 13px; }
.tk-filterbar-actions .ico { width: 15px; height: 15px; }
.tk-count { font-size: 12.5px; color: var(--color-text-muted); margin: 0 0 8px 2px; }
.tk-code { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--color-text-muted); letter-spacing: .3px; }
.tk-side .tk-code { display: inline; margin-right: 4px; }
.tk-list-head.tk-team, .tk-row.tk-team { grid-template-columns: 64px minmax(0, 1fr) 124px 140px 112px 84px 90px 28px; }
.tk-id { font-weight: 700; font-size: 13px; color: var(--color-primary); }
.tk-resp, .tk-opened { font-size: 13px; overflow-wrap: anywhere; }
.tk-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 13px; }
.tk-filters a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text-muted); background: var(--color-surface); }
.tk-filters a:hover { text-decoration: none; border-color: var(--color-primary); }
.tk-filters a.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.tk-filters-sep { width: 1px; height: 18px; background: var(--color-border); margin: 0 4px; }
.tk-list-head, .tk-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px 120px 96px 30px; gap: 10px; align-items: center; }
.tk-list-head { padding: 0 12px 6px 16px; font-size: 12px; color: var(--color-text-muted); }
.tk-list { list-style: none; margin: 0; padding: 0; }
.tk-row { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.tk-row.tk-late, .tk-row.tk-today { border-left-color: var(--color-danger); background: #fef2f2; }
.tk-row.tk-soon { border-left-color: var(--color-warning); }
.tk-row.tk-ok { border-left-color: var(--color-success); }
.tk-row.tk-closed { border-left-color: #9ca3af; }
.tk-subject { display: flex; gap: 8px; align-items: flex-start; color: var(--color-text); font-weight: 600; font-size: 14px; min-width: 0; }
.tk-subject:hover { text-decoration: none; color: var(--color-primary); }
.tk-subject .ico { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; color: var(--color-text-muted); }
.tk-late .tk-subject, .tk-today .tk-subject { color: #b91c1c; }
.tk-subject small { display: block; font-weight: 400; font-size: 12px; color: var(--color-text-muted); }
.tk-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.tk-st-aberta { background: #f1f3f5; color: #4b5563; border: 1px solid #e2e5e9; }
.tk-st-andamento { background: #e0ecfa; color: #1d4f91; }
.tk-st-aguardando { background: var(--color-primary); color: #fff; }
.tk-st-concluida { background: #dcfce7; color: #15803d; }
.tk-st-cancelada { background: #f1f3f5; color: #6b7280; text-decoration: line-through; }
.tk-due { display: flex; flex-direction: column; line-height: 1.2; }
.tk-due strong { font-size: 15px; }
.tk-due small { font-size: 11.5px; color: var(--color-text-muted); }
.tk-late .tk-due strong, .tk-today .tk-due strong, .tk-due-late, .tk-due-today { color: var(--color-danger); }
.tk-soon .tk-due strong, .tk-due-soon { color: var(--color-warning); }
.tk-ok .tk-due strong, .tk-due-ok { color: var(--color-success); }
.tk-menu { position: relative; }
.tk-menu summary { list-style: none; cursor: pointer; color: var(--color-text-muted); display: flex; justify-content: center; padding: 4px; border-radius: 6px; }
.tk-menu summary::-webkit-details-marker { display: none; }
.tk-menu summary:hover { background: var(--color-primary-soft); }
.tk-menu > div { position: absolute; right: 0; top: 30px; z-index: 20; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); min-width: 130px; padding: 4px; }
.tk-menu > div a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--color-text); font-size: 13px; }
.tk-menu > div a:hover { background: var(--color-primary-soft); text-decoration: none; }
.tk-legend { font-size: 12px; color: var(--color-text-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-left: 6px; }
.tk-dot-red { background: var(--color-danger); } .tk-dot-amber { background: var(--color-warning); } .tk-dot-green { background: var(--color-success); }
.tk-empty { text-align: center; padding: 40px 16px; color: var(--color-text-muted); background: var(--color-surface); border: 1px dashed var(--color-border); border-radius: 10px; }
.tk-empty .ico { width: 34px; height: 34px; color: var(--color-success); }
.tk-empty p { margin: 6px 0; }
.tk-side { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 14px; box-shadow: var(--shadow); position: sticky; top: 16px; }
.tk-side h3 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.tk-side h3 .ico { width: 17px; height: 17px; color: var(--color-primary); }
.tk-side ul { list-style: none; margin: 0; padding: 0; }
.tk-side li { padding: 7px 0 7px 10px; border-left: 3px solid var(--color-success); margin-bottom: 6px; }
.tk-side li.tk-today, .tk-side li.tk-late { border-left-color: var(--color-danger); }
.tk-side li.tk-soon { border-left-color: var(--color-warning); }
.tk-side-date { display: block; font-size: 12px; font-weight: 700; color: var(--color-success); }
.tk-side li.tk-today .tk-side-date { color: var(--color-danger); }
.tk-side li.tk-soon .tk-side-date { color: var(--color-warning); }
.tk-side li a { font-size: 13px; color: var(--color-text); }
.tk-card { max-width: 900px; }
.tk-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tk-fields input[type="date"], .tk-card input[type="date"] { width: 100%; padding: 9px 11px; border: 1px solid var(--color-border); border-radius: 6px; font: inherit; background: var(--color-surface); color: var(--color-text); }
.tk-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tk-meta strong { font-weight: 700; }
.tk-h2 { font-size: 16px; margin: 6px 0 10px; }
.tk-entries { list-style: none; margin: 0 0 16px; padding: 0; max-width: 900px; }
.tk-entry { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-primary); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.tk-entry-prazo { border-left-color: var(--color-warning); background: #fffbeb; }
.tk-entry-encerramento { border-left-color: var(--color-success); }
.tk-entry-meta { font-size: 12px; color: var(--color-text-muted); margin-bottom: 4px; }
.tk-entry-prazo .tk-entry-meta { color: #92400e; }
.tk-entry-body { white-space: pre-wrap; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.tk-log-head, .tk-log li { display: grid; grid-template-columns: 150px 170px minmax(0, 1fr); gap: 12px; }
.tk-log-head { padding: 0 14px 6px; font-size: 12px; color: var(--color-text-muted); max-width: 980px; }
.tk-log { list-style: none; margin: 0; padding: 0; max-width: 980px; }
.tk-log li { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 14px; margin-bottom: 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.tk-modal { max-width: 440px; text-align: left; }
.tk-modal h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; font-size: 16px; }
.tk-modal p { font-size: 14px; margin: 0 0 12px; }
.tk-modal label { display: block; font-weight: 600; font-size: 13px; margin: 8px 0 4px; }
.tk-modal textarea, .tk-modal input[type="date"] { width: 100%; padding: 9px 11px; border: 1px solid var(--color-border); border-radius: 6px; font: inherit; background: var(--color-surface); color: var(--color-text); box-sizing: border-box; }
.tk-modal .tk-actions { margin-top: 14px; }
.tk-modal-late { border-top: 4px solid var(--color-danger); }
.tk-modal-late h3 { color: var(--color-danger); }
.tk-overdue { z-index: 200; }
.tk-err { color: var(--color-danger); font-size: 13px; margin: 6px 0 0; }
.tk-choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--color-border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; max-width: 640px; }
.tk-choice:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }
.tk-choice input { margin-top: 3px; }
.tk-choice small { display: block; color: var(--color-text-muted); font-size: 12.5px; margin-top: 2px; }
html[data-theme="dark"] .tk-kpi-blue { background: #1b2a44; border-color: #2c4670; color: #a9c8f5; }
html[data-theme="dark"] .tk-kpi-amber { background: #3a2a0c; border-color: #6b4c12; color: #f6cf7a; }
html[data-theme="dark"] .tk-kpi-green { background: #10301e; border-color: #1f5a37; color: #8fe0ad; }
html[data-theme="dark"] .tk-row.tk-late, html[data-theme="dark"] .tk-row.tk-today { background: #3a1517; }
html[data-theme="dark"] .tk-subject, html[data-theme="dark"] .tk-side li a, html[data-theme="dark"] .tk-menu > div a { color: var(--color-text); }
html[data-theme="dark"] .tk-late .tk-subject, html[data-theme="dark"] .tk-today .tk-subject { color: #fca5a5; }
html[data-theme="dark"] .tk-st-aberta, html[data-theme="dark"] .tk-st-cancelada { background: #263349; color: #c4cede; border-color: #33425c; }
html[data-theme="dark"] .tk-st-andamento { background: #1b2a44; color: #a9c8f5; }
html[data-theme="dark"] .tk-st-concluida { background: #10301e; color: #8fe0ad; }
html[data-theme="dark"] .tk-entry-prazo { background: #2e230c; }
html[data-theme="dark"] .tk-entry-prazo .tk-entry-meta { color: #f6cf7a; }
@media (max-width: 1200px) { .tk-layout { grid-template-columns: 1fr; } .tk-side { position: static; order: -1; } }
@media (max-width: 700px) {
  .tk-kpis { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .tk-kpi strong { font-size: 22px; } .tk-kpi span { font-size: 11.5px; }
  .tk-fields { grid-template-columns: 1fr; }
  .tk-list-head { display: none; }
  .tk-row { grid-template-columns: minmax(0, 1fr) auto 30px; }
  .tk-row .tk-stcell { grid-column: 1; grid-row: 2; } .tk-row .tk-postcell { grid-column: 1; grid-row: 3; } .tk-postp-none { display: none; }
  .tk-row .tk-due { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .tk-row .tk-menu { grid-column: 3; grid-row: 1 / span 2; }
  .tk-log-head { display: none; } .tk-log li { grid-template-columns: 1fr; gap: 2px; }
  .tk-filterbar label { flex: 1 1 40%; } .tk-filterbar input, .tk-filterbar select, .tk-filterbar input[type="date"], .tk-filterbar input[name="id"] { width: 100%; max-width: none; }
  .tk-filterbar-actions { width: 100%; margin-left: 0; } .tk-filterbar-actions .btn { flex: 1; justify-content: center; }
  .tk-row.tk-team { grid-template-columns: minmax(0, 1fr) auto 30px; }
  .tk-row.tk-team .tk-id { grid-column: 1; grid-row: 1; }
  .tk-row.tk-team .tk-subject { grid-column: 1; grid-row: 2; }
  .tk-row.tk-team .tk-resp { grid-column: 1; grid-row: 3; color: var(--color-text-muted); }
  .tk-row.tk-team .tk-stcell { grid-column: 1; grid-row: 4; } .tk-row.tk-team .tk-postcell { grid-column: 1; grid-row: 5; }
  .tk-row.tk-team .tk-opened { display: none; }
  .tk-row.tk-team .tk-due { grid-column: 2; grid-row: 1 / span 4; }
  .tk-row.tk-team .tk-menu { grid-column: 3; grid-row: 1 / span 4; }
}
@media (min-width: 701px) and (max-width: 1100px) { .tk-list-head.tk-team, .tk-row.tk-team { grid-template-columns: 58px minmax(0, 1fr) 112px 110px 108px 0 84px 28px; } .tk-team .tk-opened, .tk-list-head.tk-team span:nth-child(6) { visibility: hidden; font-size: 0; } }
/* Busca por assunto e selo de adiamentos (nov/2026) */
.tk-filterbar .tk-f-q { flex: 1 1 220px; }
.tk-filterbar .tk-f-q input { width: 100%; }
.tk-postp { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tk-postp .ico { width: 13px; height: 13px; }
.tk-postp-lo { background: #fef3c7; color: #92400e; border: 1px solid #f3d27a; }
.tk-postp-hi { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.tk-postp-none { color: var(--color-text-muted); font-size: 13px; padding-left: 10px; }
html[data-theme="dark"] .tk-postp-lo { background: #3a2a0c; color: #f6cf7a; border-color: #6b4c12; }
html[data-theme="dark"] .tk-postp-hi { background: #3a1517; color: #fca5a5; border-color: #7f1d1d; }

/* ===== Gestao de tarefas - visual v2 (nov/2026): cards com icone, filtros
   com icones, status com icone, linha do tempo. Sobrescreve as regras tk-*
   acima; so as telas de tarefas usam essas classes. ===== */
.tk-kpis { gap: 14px; }
.tk-kpi { position: relative; overflow: hidden; flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; min-height: 86px; }
.tk-kpi-txt { display: flex; flex-direction: column; position: relative; z-index: 1; min-width: 0; }
.tk-kpi .tk-kpi-label { font-size: 13.5px; font-weight: 700; }
.tk-kpi strong { font-size: 30px; line-height: 1.1; }
.tk-kpi-ic { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; position: relative; z-index: 1; }
.tk-kpi-ic .ico { width: 24px; height: 24px; }
.tk-kpi-deco { position: absolute; right: 12px; bottom: 6px; opacity: .55; }
.tk-kpi-deco .ico { width: 54px; height: 54px; stroke-width: 1.4; }
.tk-kpi::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 160px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.45); }
.tk-kpi-blue { background: linear-gradient(135deg, #eef3fe 0%, #dde7fb 100%); border-color: #c9d8f5; color: #0b2f6b; }
.tk-kpi-blue .tk-kpi-ic { background: #2f6fe0; box-shadow: 0 0 0 7px #d5e2fb; }
.tk-kpi-amber { background: linear-gradient(135deg, #fff7e8 0%, #feeacb 100%); border-color: #f6d99a; color: #7a3d06; }
.tk-kpi-amber .tk-kpi-ic { background: #f39c12; box-shadow: 0 0 0 7px #fde6bd; }
.tk-kpi-amber .tk-kpi-note { color: #c2410c; font-weight: 600; opacity: 1; }
.tk-kpi-green { background: linear-gradient(135deg, #ecfbf2 0%, #d5f2e2 100%); border-color: #b5e6c9; color: #0f5132; }
.tk-kpi-green .tk-kpi-ic { background: #16a34a; box-shadow: 0 0 0 7px #c8eed7; }
.tk-kpi-green .tk-kpi-deco { color: #16a34a; }
a.tk-kpi.active { box-shadow: 0 0 0 2px currentColor, 0 6px 16px rgba(0,0,0,.08); }
.tk-filterbar { border-radius: 12px; padding: 12px 14px; gap: 10px; }
.tk-filterbar label { font-size: 12px; color: var(--color-text); }
.tk-filterbar input, .tk-filterbar select { border-radius: 8px; height: 34px; box-sizing: border-box; }
.tk-inwrap { position: relative; display: block; }
.tk-inwrap .ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--color-text-muted); pointer-events: none; }
.tk-inwrap input { padding-left: 30px; width: 100%; }
.tk-filterbar-actions .btn { height: 34px; padding: 0 14px; border-radius: 8px; font-weight: 600; }
.tk-btn-clear { background: var(--color-surface); }
.tk-listbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
.tk-listbar .tk-count { margin: 0; flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--color-text); }
.tk-listbar .tk-count .ico { width: 17px; height: 17px; color: var(--color-text-muted); }
.tk-order { margin: 0; }
.tk-order label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--color-text-muted); }
.tk-order select { padding: 5px 8px; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 600; background: var(--color-surface); color: var(--color-text); }
.tk-row { border-radius: 12px; padding: 10px 12px; }
.tk-subject { font-size: 13.5px; }
.tk-subject .ico { color: #64748b; }
.tk-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; font-size: 11px; }
.tk-pill .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.tk-st-aberta { background: #e3f6ea; color: #15803d; border: none; }
.tk-st-andamento { background: #e3edfc; color: #1d4f91; }
.tk-st-aguardando { background: #fde4e4; color: #b91c1c; }
.tk-st-concluida { background: #dff3f1; color: #0f766e; }
.tk-st-cancelada { background: #eef0f3; color: #6b7280; text-decoration: none; }
.tk-due { flex-direction: row; align-items: flex-start; gap: 5px; }
.tk-due > .ico { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; color: var(--color-text-muted); }
.tk-due > span { display: flex; flex-direction: column; line-height: 1.2; }
.tk-due strong { font-size: 14px; }
.tk-late .tk-due > .ico, .tk-today .tk-due > .ico { color: var(--color-danger); }
.tk-soon .tk-due > .ico { color: var(--color-warning); }
.tk-ok .tk-due > .ico { color: var(--color-success); }
.tk-late .tk-due small, .tk-today .tk-due small { color: #dc2626; }
.tk-postp { padding: 3px 8px; }
.tk-side { border-radius: 12px; padding: 14px 16px; }
.tk-side-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tk-side-head h3 { margin: 0; flex: 1; }
.tk-side-all { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tk-side-all .ico { width: 14px; height: 14px; }
.tk-timeline { position: relative; padding-left: 4px !important; }
.tk-timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: #d6efe0; }
.tk-side .tk-timeline li { position: relative; border-left: none; padding: 0 0 12px 20px; margin: 0; }
.tk-side .tk-timeline li::before { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 3px var(--color-surface); }
.tk-side .tk-timeline li.tk-today::before, .tk-side .tk-timeline li.tk-late::before { background: var(--color-danger); }
.tk-side .tk-timeline li.tk-soon::before { background: var(--color-warning); }
.tk-side .tk-timeline li:last-child { padding-bottom: 0; }
.tk-side .tk-code { color: var(--color-text-muted); }
.tk-entry { border-radius: 12px; }
.tk-log li { border-radius: 12px; border-left: 4px solid var(--color-primary); }
.tk-log li:first-child { border-left-color: var(--color-warning); }
.tk-card, .tk-modal { border-radius: 14px; }
.tk-actions .btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; font-weight: 600; }
.tk-actions .btn .ico, .tk-head .btn .ico { width: 16px; height: 16px; }
html[data-theme="dark"] .tk-kpi::after { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .tk-kpi-blue { background: linear-gradient(135deg, #1b2a44, #16233a); border-color: #2c4670; color: #a9c8f5; }
html[data-theme="dark"] .tk-kpi-blue .tk-kpi-ic { box-shadow: 0 0 0 7px #22375a; }
html[data-theme="dark"] .tk-kpi-amber { background: linear-gradient(135deg, #3a2a0c, #2e2109); border-color: #6b4c12; color: #f6cf7a; }
html[data-theme="dark"] .tk-kpi-amber .tk-kpi-ic { box-shadow: 0 0 0 7px #4a3510; }
html[data-theme="dark"] .tk-kpi-amber .tk-kpi-note { color: #fdba74; }
html[data-theme="dark"] .tk-kpi-green { background: linear-gradient(135deg, #10301e, #0d2718); border-color: #1f5a37; color: #8fe0ad; }
html[data-theme="dark"] .tk-kpi-green .tk-kpi-ic { box-shadow: 0 0 0 7px #164029; }
html[data-theme="dark"] .tk-st-aberta, html[data-theme="dark"] .tk-st-concluida { background: #10301e; color: #8fe0ad; }
html[data-theme="dark"] .tk-st-andamento { background: #1b2a44; color: #a9c8f5; }
html[data-theme="dark"] .tk-st-aguardando { background: #3a1517; color: #fca5a5; }
html[data-theme="dark"] .tk-timeline::before { background: #1f3a2b; }
@media (max-width: 1200px) { .tk-kpi strong { font-size: 26px; } .tk-kpi-ic { width: 40px; height: 40px; } .tk-kpi-ic .ico { width: 20px; height: 20px; } .tk-kpi-deco { display: none; } }
@media (max-width: 700px) { .tk-kpi { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; min-height: 0; } .tk-kpi-ic { width: 32px; height: 32px; box-shadow: none !important; } .tk-kpi-ic .ico { width: 17px; height: 17px; } .tk-kpi .tk-kpi-label { font-size: 11.5px; } .tk-kpi strong { font-size: 22px; } .tk-listbar { flex-direction: column; align-items: flex-start; } }
/* v2 - encaixe dos filtros e do quadro lateral em telas medias */
.tk-filterbar { flex-wrap: wrap; }
.tk-filterbar .tk-f-q { flex: 1 1 170px; min-width: 150px; }
.tk-filterbar input[name="id"] { width: 74px; }
.tk-filterbar input[type="date"] { width: 128px; font-size: 12.5px; }
.tk-filterbar select { max-width: 150px; font-size: 12.5px; }
.tk-side-head { flex-wrap: wrap; row-gap: 2px; }
.tk-side-head h3 { white-space: nowrap; font-size: 13.5px; }
.tk-side-all { margin-left: auto; }

/* Aba Minhas (coluna estreita): filtro em duas linhas fixas */
.tk-layout .tk-filterbar { display: grid; grid-template-columns: 84px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "q q q q q" "id st de ate act"; align-items: end; }
.tk-layout .tk-filterbar .tk-f-q { grid-area: q; min-width: 0; }
.tk-layout .tk-filterbar .tk-f-id { grid-area: id; }
.tk-layout .tk-filterbar .tk-f-st { grid-area: st; }
.tk-layout .tk-filterbar .tk-f-de { grid-area: de; }
.tk-layout .tk-filterbar .tk-f-ate { grid-area: ate; }
.tk-layout .tk-filterbar-actions { grid-area: act; margin-left: 0; justify-content: flex-end; }
.tk-layout .tk-filterbar input, .tk-layout .tk-filterbar select { width: 100%; max-width: none; }
@media (max-width: 700px) { .tk-layout .tk-filterbar { grid-template-columns: 1fr 1fr; grid-template-areas: "q q" "id st" "de ate" "act act"; } .tk-layout .tk-filterbar-actions .btn { flex: 1; justify-content: center; } }

/* Formularios de tarefa (nov/2026): posicionamento obrigatorio e barra Sair/Salvar no final */
.tk-req-mark { font-weight: 400; color: var(--color-text-muted); font-size: 12px; }
.tk-field-error textarea, .tk-field-error input { border: 2px solid var(--color-danger) !important; background: #fff7f7; }
.tk-field-error label { color: var(--color-danger); }
.tk-field-error .tk-req-mark { color: var(--color-danger); font-weight: 600; }
.tk-err .ico { width: 15px; height: 15px; vertical-align: -3px; }
.tk-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; background: #fef3c7; color: #92400e; }
.tk-note .ico { width: 15px; height: 15px; }
#tk-close-note { background: #dff3f1; color: #0f766e; }
.tk-formbar { display: flex; justify-content: flex-end; gap: 10px; max-width: 900px; margin: 4px 0 24px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.tk-formbar .btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 18px; border-radius: 8px; font-weight: 600; }
.tk-formbar .btn .ico { width: 16px; height: 16px; }
html[data-theme="dark"] .tk-field-error textarea, html[data-theme="dark"] .tk-field-error input { background: #2a1416; }
html[data-theme="dark"] .tk-note { background: #3a2a0c; color: #f6cf7a; }
html[data-theme="dark"] #tk-close-note { background: #10301e; color: #8fe0ad; }
@media (max-width: 700px) { .tk-formbar .btn { flex: 1; justify-content: center; } }
.tk-note[hidden], .tk-err[hidden] { display: none; }
/* Tela de bloqueio por atividade vencida (nov/2026) */
.tk-lock-page { min-height: 100vh; background: var(--color-bg); }
.tk-overdue { background: rgba(15, 23, 42, .55); }
.tk-modal-late { max-width: 470px; max-height: calc(100vh - 32px); overflow-y: auto; }
.tk-modal-late h3 { display: flex; align-items: center; gap: 8px; }
.tk-ov-count { margin-left: auto; font-size: 12px; font-weight: 700; color: #b91c1c; background: #fde4e4; border-radius: 999px; padding: 3px 10px; }
.tk-ov-desc { font-size: 13.5px; color: var(--color-text); margin: 0 0 12px; }
.tk-ov-task { border-left: 4px solid var(--color-danger); background: #fdf1f1; border-radius: 0 8px 8px 0; padding: 8px 12px; margin-bottom: 6px; }
.tk-ov-task strong { display: block; font-size: 14px; }
.tk-ov-task small { color: var(--color-text-muted); font-size: 12px; }
.tk-modal-late .tk-req { margin-top: 4px; }
.tk-modal-late .tk-err { margin: 4px 0 0; }
.tk-ov-logout { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--color-border); text-align: center; }
.tk-linkbtn { background: none; border: 0; padding: 4px 8px; font: inherit; font-size: 13px; color: var(--color-text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tk-linkbtn:hover { color: var(--color-danger); text-decoration: underline; }
.tk-linkbtn .ico { width: 15px; height: 15px; }
html[data-theme="dark"] .tk-ov-task { background: #3a1517; }
html[data-theme="dark"] .tk-ov-count { background: #3a1517; color: #fca5a5; }
.modal-box.tk-modal p.tk-err { color: var(--color-danger); font-size: 12.5px; }
/* ===== Indicadores da Gestao de tarefas (nov/2026) ===== */
.tk-ind-view { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--color-primary); background: var(--color-primary-soft); padding: 6px 12px; border-radius: 999px; }
.tk-ind-view .ico { width: 15px; height: 15px; }
.tk-ind-filter { margin-bottom: 10px; }
.tk-ind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 10px 0 12px; }
.tk-ind-card { min-height: 104px; padding-bottom: 26px; }
.tk-ind-card .tk-kpi-note { font-weight: 500; opacity: .9; }
.tk-ind-go { position: absolute; right: 14px; bottom: 9px; z-index: 1; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; }
.tk-ind-go .ico { width: 14px; height: 14px; }
.tk-ind-hint { margin: 0 0 20px; }
.tk-kpi-teal { background: linear-gradient(135deg, #eaf8f8 0%, #d3efee 100%); border-color: #b3e0de; color: #0f4f4c; }
.tk-kpi-teal .tk-kpi-ic { background: #0f9b94; box-shadow: 0 0 0 7px #c6ecea; }
.tk-kpi-red { background: linear-gradient(135deg, #fef1f1 0%, #fbdddd 100%); border-color: #f5c2c2; color: #7f1d1d; }
.tk-kpi-red .tk-kpi-ic { background: #dc2626; box-shadow: 0 0 0 7px #fbd6d6; }
.tk-kpi-purple { background: linear-gradient(135deg, #f4f0fe 0%, #e6ddfb 100%); border-color: #d6c8f5; color: #3c2a78; }
.tk-kpi-purple .tk-kpi-ic { background: #7c4ddf; box-shadow: 0 0 0 7px #e2d8fb; }
.tk-kpi-green .tk-kpi-note, .tk-kpi-blue .tk-kpi-note, .tk-kpi-teal .tk-kpi-note, .tk-kpi-red .tk-kpi-note, .tk-kpi-purple .tk-kpi-note { color: inherit; }
.tk-ind-ic { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; }
.tk-ind-ic .ico { width: 18px; height: 18px; }
.tk-ind-blue { background: #2f6fe0; } .tk-ind-teal { background: #0f9b94; } .tk-ind-green { background: #16a34a; } .tk-ind-amber { background: #f39c12; } .tk-ind-red { background: #dc2626; } .tk-ind-purple { background: #7c4ddf; }
.tk-btn-excel { background: #107c41; border-color: #107c41; color: #fff; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; border-radius: 8px; }
.tk-btn-excel:hover { background: #0b5e31; border-color: #0b5e31; color: #fff; }
.tk-btn-excel .ico { width: 17px; height: 17px; }
.tk-list-head.tk-ind-row, .tk-row.tk-ind-row { grid-template-columns: 64px minmax(0, 1fr) 118px 86px 86px 84px 70px 74px; }
.tk-row.tk-ind-row .tk-num { font-size: 13px; font-weight: 600; text-align: center; }
.tk-list-head.tk-ind-row span:nth-child(n+6) { text-align: center; }
.tk-row.tk-ind-row .tk-postcell { text-align: center; }
html[data-theme="dark"] .tk-kpi-teal { background: linear-gradient(135deg, #0f2e2d, #0c2524); border-color: #1f5552; color: #8ee0da; }
html[data-theme="dark"] .tk-kpi-teal .tk-kpi-ic { box-shadow: 0 0 0 7px #16403e; }
html[data-theme="dark"] .tk-kpi-red { background: linear-gradient(135deg, #3a1517, #2e1113); border-color: #7f1d1d; color: #fca5a5; }
html[data-theme="dark"] .tk-kpi-red .tk-kpi-ic { box-shadow: 0 0 0 7px #4a1a1d; }
html[data-theme="dark"] .tk-kpi-purple { background: linear-gradient(135deg, #251c45, #1e1738); border-color: #43357a; color: #c9b8ff; }
html[data-theme="dark"] .tk-kpi-purple .tk-kpi-ic { box-shadow: 0 0 0 7px #31275c; }
@media (max-width: 1100px) { .tk-ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tk-list-head.tk-ind-row, .tk-row.tk-ind-row { grid-template-columns: 58px minmax(0, 1fr) 110px 0 82px 70px 64px 66px; } .tk-ind-row > :nth-child(4) { visibility: hidden; font-size: 0; } }
@media (max-width: 700px) {
  .tk-ind-grid { grid-template-columns: 1fr; }
  .tk-list-head.tk-ind-row { display: none; }
  .tk-row.tk-ind-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .tk-row.tk-ind-row > * { grid-column: 1 / -1; text-align: left !important; }
  .tk-row.tk-ind-row > :nth-child(4) { visibility: visible; font-size: 12px; }
  .tk-row.tk-ind-row [data-l]::before { content: attr(data-l) ": "; color: var(--color-text-muted); font-weight: 400; }
}
/* Paginacao das listas de tarefas e lista dos Indicadores (nov/2026) */
.tk-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; font-size: 13px; }
.tk-pager-info { color: var(--color-text-muted); }
.tk-pager-nav { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tk-pg { display: inline-flex; align-items: center; gap: 4px; min-width: 34px; height: 34px; padding: 0 10px; justify-content: center; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font-weight: 600; text-decoration: none; }
.tk-pg .ico { width: 14px; height: 14px; }
a.tk-pg:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.tk-pg-on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.tk-pg-off { opacity: .45; }
.tk-pg-gap { border: 0; background: none; min-width: 16px; padding: 0 2px; }
.tk-ind-all { margin-top: 6px; }
.tk-ind-all .tk-listbar .tk-btn-excel { height: 34px; padding: 0 14px; }
.tk-count-sub { color: var(--color-text-muted); font-weight: 600; }
@media (max-width: 700px) { .tk-pager { flex-direction: column; align-items: flex-start; } .tk-pg { min-width: 32px; height: 32px; padding: 0 8px; } }

/* ===== Painel ADM novo (nov/2026) - so onde o modulo de tarefas esta
   ligado (body.adm2, classes adm2-*). As demais intranets nao usam. ===== */
body.adm2 { background: #f3f6fb; }
.adm2-top { background: #fff; }
.adm2-user { display: inline-flex; align-items: center; gap: 9px; }
.adm2-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--color-primary-soft-2); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.adm2-avatar img { width: 100%; height: 100%; object-fit: cover; }
.adm2-user-txt { display: flex; flex-direction: column; line-height: 1.2; }
.adm2-user-txt b { font-size: 13.5px; color: var(--color-text); }
.adm2-user-txt small { font-size: 12px; color: var(--color-text-muted); }
.adm2-nav { width: 232px; background: #0f2147; padding: 16px 12px; }
.adm2-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 14px; margin-bottom: 4px; border-radius: 10px; color: #c6d0e3; font-size: 14px; font-weight: 500; }
.adm2-nav a .ico { width: 18px; height: 18px; flex-shrink: 0; }
.adm2-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.adm2-nav a, .adm2-nav a.active, .adm2-nav a:hover { box-shadow: none; text-shadow: none; }
.adm2-nav a.active { background: #22427a; color: #eef3ff; }
.adm2-nav .adm2-site { margin-top: 18px; }
.adm2-out { padding: 8px 6px 0; margin: 0; }
.adm2-out .btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 10px; background: #fff; color: #0f2147; border-color: #fff; font-weight: 700; }
.adm2-out .btn .ico { width: 16px; height: 16px; }
body.adm2 .admin-main { padding: 26px 30px; }
body.adm2 .admin-main .page-title { font-size: 24px; }
body.adm2 .card { border-radius: 14px; border-color: #e3e8f1; box-shadow: 0 1px 3px rgba(15,33,71,.06); }
body.adm2 .btn { border-radius: 9px; }
body.adm2 .btn-primary { background: #0b3a7e; border-color: #0b3a7e; }
body.adm2 .btn-primary:hover { background: #082c61; }
body.adm2 .data-table { border-collapse: separate; border-spacing: 0 6px; }
body.adm2 .data-table th { border: 0; font-size: 12px; color: var(--color-text-muted); font-weight: 600; background: none; }
body.adm2 .data-table td { background: var(--color-surface); border-top: 1px solid #e6e9f0; border-bottom: 1px solid #e6e9f0; }
body.adm2 .data-table td:first-child { border-left: 1px solid #e6e9f0; border-radius: 10px 0 0 10px; }
body.adm2 .data-table td:last-child { border-right: 1px solid #e6e9f0; border-radius: 0 10px 10px 0; }
body.adm2 .badge { border-radius: 999px; padding: 3px 10px; }
body.adm2 .kpi { border-radius: 14px; border: 1px solid; box-shadow: none; }
body.adm2 .kpi-ico { width: 40px; height: 40px; border-radius: 50%; color: #fff; }
body.adm2 .kpi-ico svg { width: 20px; height: 20px; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+1) { background: linear-gradient(135deg, #eef3fe, #dfe8fb); border-color: #c9d8f5; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+1) .kpi-ico { background: #2f6fe0; box-shadow: 0 0 0 6px #d3e1fb; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+2) { background: linear-gradient(135deg, #fff6e6, #feeacb); border-color: #f6d99a; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+2) .kpi-ico { background: #f39c12; box-shadow: 0 0 0 6px #fde7bf; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+3) { background: linear-gradient(135deg, #f3effe, #e7defb); border-color: #d6c8f5; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+3) .kpi-ico { background: #7c4ddf; box-shadow: 0 0 0 6px #e2d8fb; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+4) { background: linear-gradient(135deg, #eafaf1, #d6f3e3); border-color: #b5e6c9; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+4) .kpi-ico { background: #16a34a; box-shadow: 0 0 0 6px #c9efd8; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+5) { background: linear-gradient(135deg, #eaf8f8, #d4f0ef); border-color: #b3e0de; }
body.adm2 .kpi-grid > .kpi:nth-child(5n+5) .kpi-ico { background: #0f9b94; box-shadow: 0 0 0 6px #c5ecea; }
.adm2-hero { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #eef3fe 0%, #e2eafb 100%); border: 1px solid #d2def6; border-radius: 16px; padding: 20px 22px; margin-bottom: 20px; position: relative; overflow: hidden; }
.adm2-hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 220px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.5); }
.adm2-hero-ic { width: 56px; height: 56px; border-radius: 50%; background: #2f6fe0; color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px #d5e2fb; flex-shrink: 0; position: relative; z-index: 1; }
.adm2-hero-ic .ico { width: 28px; height: 28px; }
.adm2-hero > div { position: relative; z-index: 1; }
.adm2-hero .page-title { margin: 0 0 4px; }
.adm2-hero p { margin: 0; color: #374151; font-size: 14px; }
.adm2-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 980px; }
.adm2-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid #e3e8f1; background: var(--color-surface); color: var(--color-text); text-align: left; font: inherit; cursor: pointer; box-shadow: 0 1px 3px rgba(15,33,71,.06); transition: box-shadow .15s, transform .15s, border-color .15s; }
.adm2-card:hover { text-decoration: none; border-color: #c9d8f5; box-shadow: 0 6px 18px rgba(15,33,71,.10); transform: translateY(-1px); }
.adm2-card-ic { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.adm2-card-ic .ico { width: 22px; height: 22px; }
.adm2-c-blue { background: #e3edfc; color: #2f6fe0; } .adm2-c-green { background: #e3f6ea; color: #16a34a; } .adm2-c-orange { background: #ffeede; color: #ea7a12; } .adm2-c-purple { background: #ece6fd; color: #7c4ddf; } .adm2-c-teal { background: #e0f2f1; color: #0f9b94; }
.adm2-card-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.adm2-card-txt b { font-size: 15px; }
.adm2-card-txt small { font-size: 12.5px; color: var(--color-text-muted); }
.adm2-card > .ico-chevron { width: 18px; height: 18px; color: #64748b; flex-shrink: 0; }
.adm2-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--color-text-muted); margin-bottom: 14px; }
.adm2-crumb a { display: inline-flex; align-items: center; gap: 5px; color: var(--color-primary); font-weight: 600; }
.adm2-crumb .ico { width: 15px; height: 15px; }
.adm2-crumb .ico-chevron { width: 14px; height: 14px; color: #9ca3af; }
.adm2-crumb span { color: var(--color-text); font-weight: 600; }
.adm2-form { max-width: 760px; }
.adm2-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.adm2-actions .btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; font-weight: 600; }
.adm2-actions .btn .ico { width: 16px; height: 16px; }
html[data-theme="dark"] body.adm2 { background: var(--color-bg); }
html[data-theme="dark"] .adm2-top { background: var(--color-surface); }
html[data-theme="dark"] .adm2-nav { background: #0a1426; }
html[data-theme="dark"] .adm2-hero { background: linear-gradient(135deg, #1b2a44, #16233a); border-color: #2c4670; }
html[data-theme="dark"] .adm2-hero::after { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .adm2-hero p { color: var(--color-text-muted); }
html[data-theme="dark"] .adm2-hero-ic { box-shadow: 0 0 0 8px #22375a; }
html[data-theme="dark"] .adm2-card { border-color: var(--color-border); }
html[data-theme="dark"] .adm2-c-blue { background: #1b2a44; } html[data-theme="dark"] .adm2-c-green { background: #10301e; } html[data-theme="dark"] .adm2-c-orange { background: #3a2a0c; } html[data-theme="dark"] .adm2-c-purple { background: #251c45; } html[data-theme="dark"] .adm2-c-teal { background: #0f2e2d; }
html[data-theme="dark"] body.adm2 .kpi-grid > .kpi { background: var(--color-surface); border-color: var(--color-border); }
html[data-theme="dark"] body.adm2 .data-table td { border-color: var(--color-border); }
@media (max-width: 860px) { .adm2-cards { grid-template-columns: 1fr; } .adm2-user-txt { display: none; } }

/* Seletor de categoria no painel novo: "+" e lapis, "Gerenciar categorias" */
.cp-searchbar { position: sticky; top: -8px; background: #fff; display: flex; gap: 8px; align-items: flex-start; z-index: 2; }
.cp-searchbar .cp-search { flex: 1; position: relative; top: 0; }
.cp-addroot { width: 36px; height: 36px; border-radius: 8px; border: 0; background: #0b3a7e; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.cp-addroot .ico { width: 18px; height: 18px; }
.cp-managelink { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--color-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 4px 8px; }
.cp-managelink .ico { width: 15px; height: 15px; }
.cp-managelink:hover { text-decoration: underline; }
.cp-acts { display: inline-flex; gap: 4px; flex-shrink: 0; }
.cp-act { width: 26px; height: 26px; border-radius: 7px; border: 0; background: #f1f3f6; color: #64748b; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.cp-act .ico { width: 14px; height: 14px; }
.cp-act:hover { background: #e2e8f0; color: var(--color-text); }
.cp-act-add { background: #eef3fe; color: #2f6fe0; }
.cp-act-add:hover { background: #dbe6fb; color: #1d4f91; }
.cp-inline { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.cp-new > .cp-inline { padding: 4px 6px; background: #fffbeb; border: 1px dashed #f3c46b; border-radius: 8px; margin: 3px 0; }
.cp-inline input { flex: 1; min-width: 0; height: 30px; padding: 0 9px; border: 1px solid #f3c46b; border-radius: 7px; font: inherit; font-size: 13.5px; background: #fff; color: var(--color-text); }
.cp-inline input.cp-bad { border-color: var(--color-danger); }
.cp-inl-ok, .cp-inl-no { width: 28px; height: 28px; border-radius: 7px; border: 0; cursor: pointer; font-weight: 700; }
.cp-inl-ok { background: #16a34a; color: #fff; } .cp-inl-no { background: #eef0f3; color: #4b5563; }
.cp-row.cp-editing .cp-acts, .cp-row.cp-editing .cp-check { display: none; }
.cp-msg { margin: 6px 4px 0; font-size: 12.5px; color: var(--color-danger); }
html[data-theme="dark"] .cp-searchbar { background: var(--color-surface); }
html[data-theme="dark"] .cp-act { background: #263349; color: #c4cede; }
html[data-theme="dark"] .cp-new > .cp-inline { background: #2e230c; }

/* Janela "Gerenciar categorias" */
.cm-overlay { z-index: 150; }
.cm-box { max-width: 720px; width: 100%; text-align: left; max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 16px; padding: 18px 20px; }
.cm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cm-head h3 { margin: 0; flex: 1; font-size: 17px; }
.cm-ic { width: 38px; height: 38px; border-radius: 50%; background: #ece6fd; color: #7c4ddf; display: inline-flex; align-items: center; justify-content: center; }
.cm-ic .ico { width: 19px; height: 19px; }
.cm-new { display: inline-flex; align-items: center; gap: 6px; }
.cm-new .ico { width: 16px; height: 16px; }
.cm-x { border: 0; background: none; cursor: pointer; color: var(--color-text-muted); padding: 4px; }
.cm-x .ico { width: 20px; height: 20px; }
.cm-tree { overflow-y: auto; flex: 1; min-height: 120px; padding-right: 4px; }
.cm-list { list-style: none; margin: 0; padding: 0; }
.cm-list .cm-list { margin-left: 22px; padding-left: 10px; border-left: 2px solid var(--color-border); }
.cm-row { display: flex; align-items: center; gap: 8px; background: var(--color-surface); border: 1px solid #e6e9f0; border-radius: 9px; padding: 6px 8px; margin-bottom: 5px; }
.cm-row.cm-dragging { opacity: .45; }
.cm-row.cm-over { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-soft); }
.cm-grip { color: #9ca3af; cursor: grab; display: inline-flex; }
.cm-grip .ico { width: 16px; height: 16px; }
.cm-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; }
.cm-count { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }
.cm-acts { display: inline-flex; gap: 4px; }
.cm-act { width: 28px; height: 28px; border-radius: 7px; border: 0; background: #f1f3f6; color: #64748b; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.cm-act .ico { width: 15px; height: 15px; }
.cm-act:hover { background: #e2e8f0; color: var(--color-text); }
.cm-add { background: #eef3fe; color: #2f6fe0; }
.cm-del { background: #fdecec; color: #dc2626; }
.cm-del:hover { background: #fbd5d5; color: #b91c1c; }
.cm-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 2px 0 8px; padding: 6px 8px; background: #fffbeb; border: 1px dashed #f3c46b; border-radius: 9px; }
.cm-inline input, .cm-inline select { flex: 1; min-width: 160px; height: 32px; padding: 0 9px; border: 1px solid #f3c46b; border-radius: 7px; font: inherit; font-size: 13.5px; background: #fff; color: var(--color-text); }
.cm-inline input.cp-bad { border-color: var(--color-danger); }
.cm-msg { margin: 0 0 8px; padding: 7px 10px; border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: 13px; }
.cm-msg.ok { background: #dcfce7; color: #166534; }
.cm-hint { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.cm-hint .ico { width: 15px; height: 15px; flex-shrink: 0; }
.cm-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
html[data-theme="dark"] .cm-row { border-color: var(--color-border); }
html[data-theme="dark"] .cm-act { background: #263349; color: #c4cede; }
html[data-theme="dark"] .cm-inline { background: #2e230c; }
html[data-theme="dark"] .cm-inline input, html[data-theme="dark"] .cm-inline select, html[data-theme="dark"] .cp-inline input { background: var(--color-surface); }
@media (max-width: 600px) { .cm-count { display: none; } .cm-box { padding: 14px; } }
/* Painel ADM novo no celular: menu vira faixa rolavel no topo; tabelas rolam dentro do cartao */
@media (max-width: 860px) {
  body.adm2 .admin-shell { flex-direction: column; align-items: stretch; }
  .adm2-nav { width: auto; min-height: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 8px 10px; }
  .adm2-nav a { white-space: nowrap; margin: 0; padding: 8px 12px; flex-shrink: 0; }
  .adm2-nav .adm2-site { margin-top: 0; }
  .adm2-out { padding: 0; flex-shrink: 0; }
  .adm2-out .btn { width: auto; height: 36px; padding: 0 12px; }
  body.adm2 .admin-main { padding: 16px; min-width: 0; max-width: 100vw; box-sizing: border-box; }
  body.adm2 .admin-main .page-title { font-size: 20px; overflow-wrap: anywhere; }
  body.adm2 .admin-main .page-subtitle, body.adm2 .admin-main p, body.adm2 .admin-main strong { overflow-wrap: anywhere; }
  body.adm2 .data-table { display: block; overflow-x: auto; max-width: 100%; }
  body.adm2 .card { overflow-x: auto; }
  body.adm2 .kpi-grid { grid-template-columns: 1fr; }
  body.adm2 .form-row { flex-direction: column; gap: 0; }
  .adm2-hero { padding: 14px; } .adm2-hero-ic { width: 44px; height: 44px; } .adm2-hero-ic .ico { width: 22px; height: 22px; }
}
/* ---------- Usuarios e equipes (painel novo, perfis/equipes/hierarquia) ---------- */
.ue-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ue-top .page-title { margin-bottom: 4px; }
.ue-top .page-subtitle { margin: 0; }
.ue-new { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ue-new .ico { width: 16px; height: 16px; }
.ue-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.ue-tree { padding: 14px; }
.ue-tree-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ue-tree-head b { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; }
.ue-tree-head b .ico { width: 17px; height: 17px; color: var(--color-primary); }
.ue-search { display: flex; align-items: center; gap: 7px; border: 1px solid var(--color-border); border-radius: 9px; padding: 0 9px; height: 36px; background: var(--color-surface); margin-bottom: 10px; }
.ue-search .ico { width: 16px; height: 16px; color: var(--color-text-muted); flex-shrink: 0; }
.ue-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; flex: 1; min-width: 0; color: var(--color-text); }
.ue-company { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; padding: 6px 4px; }
.ue-nodes, .ue-nodes ul { list-style: none; margin: 0; padding: 0; }
.ue-nodes ul { margin-left: 14px; border-left: 2px solid var(--color-border); padding-left: 6px; }
.ue-nodes .ue-hide { display: none; }
.ue-node { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--color-text); text-decoration: none; font-size: 13.5px; }
.ue-node:hover { background: #f1f5fb; text-decoration: none; }
.ue-node.active { background: #e7effd; color: #1d4fb8; font-weight: 600; }
.ue-node-ic { width: 26px; height: 26px; border-radius: 50%; background: #eef3fe; color: #2f6fe0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ue-node-ic .ico { width: 14px; height: 14px; }
.ue-co-ic { background: #ece6fd; color: #7c4ddf; }
.ue-node-none .ue-node-ic { background: #f1f3f6; color: #64748b; }
.ue-node-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ue-node-n { font-size: 11.5px; background: #f1f3f6; color: #475569; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.ue-people { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--color-border); }
.ue-people a { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 8px; color: var(--color-text); text-decoration: none; }
.ue-people a:hover { background: #f1f5fb; }
.ue-people b { font-size: 13.5px; }
.ue-people small, .ue-muted { color: var(--color-text-muted); font-size: 12.5px; font-weight: 400; }
.ue-tree-empty { margin: 8px 4px 0; }
.ue-link { border: 0; background: none; padding: 0; color: var(--color-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; }
.ue-link .ico { width: 14px; height: 14px; }
.ue-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ue-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ue-kpi { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px 16px; margin: 0; }
.ue-kpi-ic { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.ue-kpi-ic .ico { width: 21px; height: 21px; }
.ue-k-blue { background: #e7effd; color: #2f6fe0; }
.ue-k-green { background: #e3f6ea; color: #16a34a; }
.ue-k-purple { background: #ece6fd; color: #7c4ddf; }
.ue-kpi-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ue-kpi-txt b { font-size: 24px; }
.ue-kpi-txt small { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }
.ue-detail { margin: 0; padding: 16px 18px; }
.ue-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ue-detail-head h2 { margin: 0; flex: 1; font-size: 18px; min-width: 0; }
.ue-detail-ic { width: 40px; height: 40px; border-radius: 50%; background: #e7effd; color: #2f6fe0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ue-detail-ic .ico { width: 20px; height: 20px; }
.ue-edit-team { display: inline-flex; align-items: center; gap: 5px; }
.ue-edit-team .ico { width: 14px; height: 14px; }
.ue-mgr { display: flex; align-items: center; gap: 10px; background: #f6f8fc; border: 1px solid #e3e8f1; border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }
.ue-mgr-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #1d4fb8; background: #e7effd; border-radius: 6px; padding: 2px 8px; }
.ue-mgr b { font-size: 14px; }
.ue-members-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.ue-members { list-style: none; margin: 0; padding: 0; }
.ue-member { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--color-border); }
.ue-member.ue-off { opacity: .55; }
.ue-member-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ue-member-txt b { font-size: 14px; }
.ue-member-txt small { font-size: 12px; color: var(--color-text-muted); }
.ue-av { width: 36px; height: 36px; border-radius: 50%; background: #dbe6fb; color: #1d4fb8; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.ue-av img { width: 100%; height: 100%; object-fit: cover; }
.ue-av-sm { width: 28px; height: 28px; font-size: 11px; }
.ue-role { font-size: 12px; background: #f1f3f6; color: #334155; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.ue-tag-mgr { font-size: 11.5px; background: #e7effd; color: #1d4fb8; border-radius: 999px; padding: 2px 8px; font-weight: 600; }
.ue-menu { position: relative; }
.ue-dots { border: 0; background: none; padding: 4px; border-radius: 7px; cursor: pointer; color: #64748b; display: inline-flex; }
.ue-dots:hover { background: #f1f3f6; }
.ue-dots .ico { width: 18px; height: 18px; }
.ue-menu-box { position: absolute; right: 0; top: 100%; z-index: 20; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 22px rgba(15,33,71,.14); min-width: 150px; padding: 5px; }
.ue-menu-box[hidden] { display: none; }
.ue-menu-box a, .ue-menu-box button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; border: 0; background: none; border-radius: 7px; font: inherit; font-size: 13.5px; color: var(--color-text); text-decoration: none; cursor: pointer; }
.ue-menu-box a:hover, .ue-menu-box button:hover { background: #f1f5fb; }
.ue-menu-box .ico { width: 15px; height: 15px; }
.ue-menu-box form { margin: 0; }
.ue-menu-box .ue-del { color: var(--color-danger); }
.ue-empty { margin: 8px 0 0; }
.ue-form { max-width: 860px; padding: 18px 20px; }
.ue-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.ue-form .hint { margin: 4px 0 0; }
.ue-lbl { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ue-pick { display: flex; gap: 8px; align-items: center; }
.ue-pick select { flex: 1; min-width: 0; }
.ue-plus { width: 38px; height: 38px; flex-shrink: 0; }
.ue-status { display: flex; gap: 18px; padding-top: 6px; }
.ue-status label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.ue-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ue-dot-on { background: #16a34a; }
.ue-dot-off { background: #9ca3af; }
.acc-box { max-width: 760px; }
.acc-ic-roles { background: #e7effd; color: #2f6fe0; }
.acc-ic-teams { background: #e3f6ea; color: #16a34a; }
.acc-body { overflow-y: auto; flex: 1; min-height: 120px; padding-right: 4px; }
.acc-list { display: flex; flex-direction: column; gap: 6px; }
.acc-row { display: flex; align-items: center; gap: 10px; border: 1px solid #e6e9f0; border-radius: 10px; padding: 9px 10px; background: var(--color-surface); }
.acc-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-row-txt b { font-size: 14px; }
.acc-row-txt small { font-size: 12.5px; color: var(--color-text-muted); }
.acc-chip { font-size: 11px; font-weight: 600; background: #f1f3f6; color: #475569; border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
.acc-count { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; }
.acc-count .ico { width: 14px; height: 14px; }
.acc-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.acc-group { border: 1px solid #e6e9f0; border-radius: 10px; padding: 8px 12px 10px; margin: 0 0 10px; }
.acc-group legend { font-weight: 700; font-size: 13.5px; padding: 0 6px; }
.acc-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; padding: 4px 0; cursor: pointer; font-weight: 400; }
.acc-check input { margin-top: 3px; }
.acc-check small { color: var(--color-text-muted); }
.acc-scope { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--color-border); }
.acc-foot { gap: 8px; }
.acc-foot .ico { width: 15px; height: 15px; }
.cm-msg.ok { background: #ecfdf3; color: #166534; }
@media (max-width: 1100px) { .ue-grid { grid-template-columns: 260px minmax(0, 1fr); } .ue-kpi { padding: 12px; gap: 10px; grid-template-columns: 38px minmax(0, 1fr); } .ue-kpi-ic { width: 38px; height: 38px; } }
@media (max-width: 860px) {
  .ue-grid { grid-template-columns: 1fr; }
  .ue-form-grid, .acc-two { grid-template-columns: 1fr; }
  .ue-role { display: none; }
}
html[data-theme="dark"] .ue-node:hover, html[data-theme="dark"] .ue-people a:hover, html[data-theme="dark"] .ue-menu-box a:hover, html[data-theme="dark"] .ue-menu-box button:hover, html[data-theme="dark"] .ue-dots:hover { background: rgba(255,255,255,.06); }
html[data-theme="dark"] .ue-node.active { background: rgba(47,111,224,.22); color: #cfe0ff; }
html[data-theme="dark"] .ue-mgr { background: rgba(255,255,255,.04); border-color: var(--color-border); }
html[data-theme="dark"] .ue-node-n, html[data-theme="dark"] .ue-role, html[data-theme="dark"] .acc-chip { background: rgba(255,255,255,.08); color: var(--color-text); }
html[data-theme="dark"] .acc-row, html[data-theme="dark"] .acc-group { border-color: var(--color-border); }
.acc-box .cm-new[hidden] { display: none; }
.acc-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .acc-form select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: 14px; background: var(--color-surface); color: var(--color-text); box-sizing: border-box; }
.acc-form input.cp-bad { border-color: var(--color-danger); }
.acc-form .form-group { margin-bottom: 12px; }
.acc-form .form-group label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
@media (max-width: 600px) {
  .ue-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ue-kpi { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 10px 6px; gap: 6px; }
  .ue-kpi-txt { align-items: center; }
  .ue-kpi-txt b { font-size: 20px; }
  .ue-kpi-txt small { font-size: 11.5px; }
}
.cm-page { max-width: 900px; padding: 18px 20px; }
.cm-page .cm-tree { min-height: 160px; overflow: visible; }

/* ---------- Visibilidade do post (painel novo) ---------- */
.pv { max-width: 460px; }
.pv > label { display: inline-flex; align-items: center; gap: 6px; }
.pv > label .ico { width: 16px; height: 16px; color: var(--color-primary); }
.pv-box { margin-top: 8px; }
.pv-box[hidden], .pv-list[hidden], .pv-err[hidden] { display: none; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pv-chips:empty { display: none; }
.pv-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; background: #e7effd; color: #1d4fb8; border-radius: 999px; padding: 3px 4px 3px 11px; font-weight: 500; }
.pv-x { border: 0; background: none; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; padding: 0; }
.pv-x:hover { background: rgba(29,79,184,.12); }
.pv-search { position: relative; display: flex; align-items: center; gap: 7px; border: 1px solid var(--color-border); border-radius: 8px; padding: 0 10px; height: 38px; background: var(--color-surface); }
.pv-search > .ico { width: 16px; height: 16px; color: var(--color-text-muted); flex-shrink: 0; }
.pv-search input { border: 0 !important; outline: 0; background: transparent; flex: 1; min-width: 0; height: 36px; padding: 0 !important; font: inherit; font-size: 14px; color: var(--color-text); box-shadow: none !important; }
.pv-list { position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 4px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 9px; box-shadow: 0 8px 22px rgba(15,33,71,.14); max-height: 240px; overflow-y: auto; }
.pv-list button { width: 100%; text-align: left; border: 0; background: none; padding: 7px 9px; border-radius: 7px; font: inherit; font-size: 13.5px; color: var(--color-text); cursor: pointer; }
.pv-list button:hover { background: #f1f5fb; }
.pv-none { padding: 7px 9px; font-size: 13px; color: var(--color-text-muted); }
.pv-hint { display: block; color: var(--color-text-muted); margin-top: 6px; }
.pv-note { display: block; color: var(--color-text-muted); margin-top: 6px; }
.pv-err { display: block; color: var(--color-danger); margin-top: 4px; font-weight: 600; }
html[data-theme="dark"] .pv-chip { background: rgba(47,111,224,.22); color: #cfe0ff; }
html[data-theme="dark"] .pv-list button:hover { background: rgba(255,255,255,.06); }

/* ---------- Criticidade das atividades (Baixa / Media / Alta) ---------- */
.tk-crit { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1.2; border-radius: 999px; padding: 3px 10px 3px 8px; white-space: nowrap; vertical-align: middle; }
.tk-crit svg { width: 14px; height: 12px; fill: currentColor; flex-shrink: 0; }
.tk-crit svg .off { opacity: .22; }
.tk-crit-alta { background: #fee2e2; color: #b91c1c; }
.tk-crit-media { background: #fef3c7; color: #92400e; }
.tk-crit-baixa { background: #dbeafe; color: #1d4ed8; }
.tk-crit-nd { background: #f1f3f6; color: #64748b; font-weight: 500; }
.tk-title .tk-crit { font-size: 12.5px; }
.tk-fields.tk-fields-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tk-list-head, .tk-row { grid-template-columns: minmax(0, 1fr) 108px 112px 120px 96px 30px; }
.tk-list-head.tk-team, .tk-row.tk-team { grid-template-columns: 64px minmax(0, 1fr) 108px 112px 140px 112px 84px 90px 28px; }
@media (max-width: 1200px) { .tk-list-head, .tk-row { grid-template-columns: minmax(0, 1fr) 100px 104px 112px 80px 28px; gap: 8px; } }
@media (min-width: 701px) and (max-width: 1100px) {
  .tk-list-head.tk-team, .tk-row.tk-team { grid-template-columns: 58px minmax(0, 1fr) 100px 100px 110px 108px 0 84px 28px; }
  .tk-list-head.tk-team span:nth-child(6) { visibility: visible; font-size: 12px; }
  .tk-list-head.tk-team span:nth-child(7) { visibility: hidden; font-size: 0; }
}
@media (max-width: 900px) { .tk-fields.tk-fields-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .tk-fields.tk-fields-4 { grid-template-columns: 1fr; }
  .tk-row .tk-critcell { grid-column: 1; grid-row: 4; }
  .tk-row.tk-team .tk-critcell { grid-column: 1; grid-row: 6; }
  .tk-row.tk-team .tk-due { grid-row: 1 / span 5; }
}
html[data-theme="dark"] .tk-crit-alta { background: #4a1517; color: #fecaca; }
html[data-theme="dark"] .tk-crit-media { background: #422c0a; color: #fde68a; }
html[data-theme="dark"] .tk-crit-baixa { background: #17284d; color: #bfdbfe; }
html[data-theme="dark"] .tk-crit-nd { background: rgba(255,255,255,.08); color: var(--color-text-muted); }

/* ---------- Tarefas: campos de texto, contador, balao do ticket, janela de aviso ---------- */
.tk-main textarea, .tk-modal textarea { resize: vertical; max-width: 100%; width: 100%; box-sizing: border-box; min-height: 110px; }
.tk-count-chars { margin: 4px 0 0; font-size: 12px; color: var(--color-text-muted); text-align: right; }
.tk-count-chars.tk-count-near { color: var(--color-danger); font-weight: 600; }
.tk-field-error select { border: 2px solid var(--color-danger) !important; background: #fff7f7; }
html[data-theme="dark"] .tk-field-error select { background: #2a1416; }
.tk-side-sub { margin: 2px 0 0; font-size: 12px; color: var(--color-text-muted); font-weight: 400; }
.tk-tip { position: relative; cursor: help; outline: none; }
.tk-tip[data-tip=""] { cursor: inherit; }
.tk-tip:not([data-tip=""])::after {
  content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 60;
  width: max-content; max-width: 300px; white-space: pre-line; text-align: left;
  background: #0f2147; color: #fff; font-size: 12.5px; font-weight: 400; font-style: normal; line-height: 1.45;
  padding: 9px 11px; border-radius: 9px; box-shadow: 0 8px 22px rgba(15,33,71,.25);
  opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity .12s, transform .12s; pointer-events: none;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical;
}
.tk-tip:not([data-tip=""])::before {
  content: ''; position: absolute; left: 14px; top: calc(100% + 2px); z-index: 61;
  border: 6px solid transparent; border-bottom-color: #0f2147; border-top: 0;
  opacity: 0; visibility: hidden; transition: opacity .12s;
}
.tk-tip:hover::after, .tk-tip:focus::after, .tk-tip:hover::before, .tk-tip:focus::before { opacity: 1; visibility: visible; transform: none; }
.tk-row { overflow: visible; }
.tk-dlg-overlay { z-index: 400; display: flex; }
.tk-dlg { max-width: 420px; border-top: 4px solid var(--color-warning); }
.tk-dlg.tk-dlg-ok { border-top-color: var(--color-primary); }
.tk-dlg h3 { display: flex; align-items: center; gap: 8px; }
.tk-dlg-ic { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fef3c7; color: #b45309; flex-shrink: 0; }
.tk-dlg-ok .tk-dlg-ic { background: #e7effd; color: #1d4fb8; }
.tk-dlg-ic .ico { width: 17px; height: 17px; }
.tk-dlg p { color: var(--color-text-muted); }
.tk-dlg .tk-actions { display: flex; justify-content: flex-end; gap: 8px; }
html[data-theme="dark"] .tk-tip:not([data-tip=""])::after { background: #1f2d4d; }
html[data-theme="dark"] .tk-tip:not([data-tip=""])::before { border-bottom-color: #1f2d4d; }

/* ---------- Estrutura da equipe (arvore por gestor imediato) ---------- */
.ht-tree, .ht-tree ul { list-style: none; margin: 0; padding: 0; }
.ht-tree .ue-hide { display: none; }
.ht-kids { display: none; margin: 4px 0 6px 18px !important; padding-left: 12px !important; border-left: 2px solid #dbe3f0; }
.ht-node.open > .ht-kids { display: block; }
.ht-person { display: flex; align-items: center; gap: 9px; padding: 8px 10px 8px 6px; border: 1px solid #e3e8f1; border-radius: 12px; background: var(--color-surface); margin-bottom: 6px; cursor: pointer; }
.ht-person:hover { border-color: #c9d6ee; }
.ht-node.open > .ht-person { background: #f3f7fe; border-color: #cfdcf6; }
.ht-person.current { background: #e7effd !important; border-color: #b9ccf3 !important; }
.ht-toggle { border: 0; background: none; padding: 2px; width: 22px; height: 22px; border-radius: 6px; color: #64748b; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ht-toggle .ico { width: 16px; height: 16px; transform: rotate(-90deg); transition: transform .15s; }
.ht-node.open > .ht-person .ht-toggle .ico { transform: none; }
.ht-toggle-sp { width: 22px; flex-shrink: 0; }
.ue-av.ht-av { width: 38px; height: 38px; font-size: 13px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #dbe3f0; }
.ht-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ht-txt b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-txt small { font-size: 12px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-count { font-size: 12px; color: #475569; white-space: nowrap; }
.ht-team { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e3e8f1; border-radius: 10px; background: var(--color-surface); margin-bottom: 6px; color: var(--color-text); text-decoration: none; }
.ht-team:hover { border-color: #c9d6ee; text-decoration: none; }
.ht-team.active { background: #e7effd; border-color: #b9ccf3; }
.ht-team.active .ht-txt b { color: #1d4fb8; }
.ht-team-ic { width: 32px; height: 32px; border-radius: 50%; background: #e7effd; color: #2f6fe0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ht-team-ic .ico { width: 16px; height: 16px; }
.ht-loose .ht-team-ic { background: #f1f3f6; color: #64748b; }
.ht-loose { margin-top: 8px; }
.ht-go { width: 16px; height: 16px; color: #94a3b8; flex-shrink: 0; }
.ue-av-lg { width: 44px; height: 44px; font-size: 15px; margin-right: 10px; vertical-align: middle; }
.ue-form-title { display: flex; align-items: center; }
html[data-theme="dark"] .ht-person, html[data-theme="dark"] .ht-team { border-color: var(--color-border); }
html[data-theme="dark"] .ht-node.open > .ht-person { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .ht-person.current, html[data-theme="dark"] .ht-team.active { background: rgba(47,111,224,.22) !important; }
html[data-theme="dark"] .ht-kids { border-left-color: var(--color-border); }
html[data-theme="dark"] .ue-av.ht-av { box-shadow: none; }

/* ---------- Usuarios e equipes: cards clicaveis e listas ---------- */
a.ue-kpi { color: var(--color-text); text-decoration: none; cursor: pointer; transition: border-color .15s, box-shadow .15s; border: 1px solid transparent; }
a.ue-kpi:hover { text-decoration: none; border-color: #c9d6ee; box-shadow: 0 2px 8px rgba(15,33,71,.08); }
a.ue-kpi.active { border-color: #2f6fe0; background: #f3f7fe; }
.ue-lista .ue-detail-head { flex-wrap: wrap; }
.ue-lista .ue-detail-head .btn { display: inline-flex; align-items: center; gap: 5px; }
.ue-lista .ue-detail-head .btn .ico { width: 14px; height: 14px; }
.ue-lista-q { max-width: 360px; }
.ue-avstack { display: inline-flex; }
.ue-av.ue-av-xs { width: 26px; height: 26px; font-size: 10px; box-shadow: 0 0 0 2px var(--color-surface); margin-left: -6px; }
.ue-av.ue-av-more { background: #f1f3f6; color: #475569; }
.ue-members li[hidden] { display: none; }
html[data-theme="dark"] a.ue-kpi.active { background: rgba(47,111,224,.15); }
.ue-edit { width: 32px; height: 32px; border-radius: 8px; border: 0; background: #f1f3f6; color: #475569; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; text-decoration: none; }
.ue-edit:hover { background: #e7effd; color: #1d4fb8; text-decoration: none; }
.ue-edit .ico { width: 16px; height: 16px; }
html[data-theme="dark"] .ue-edit { background: rgba(255,255,255,.08); color: var(--color-text); }

/* ---------- Organograma (de cima para baixo) ---------- */
.og-card { padding: 18px 20px; position: relative; overflow: hidden; }
.og-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.og-head .page-title { margin: 0; flex: 1; }
.og-head-ic { width: 48px; height: 48px; border-radius: 50%; background: #e7effd; color: #2f6fe0; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 7px #f1f6fe; }
.og-head-ic .ico { width: 24px; height: 24px; }
.og-tools { display: inline-flex; align-items: center; gap: 10px; }
.og-zoom { display: inline-flex; border: 1px solid #d5deec; border-radius: 999px; overflow: hidden; background: var(--color-surface); }
.og-zoom button { border: 0; background: none; padding: 6px 12px; cursor: pointer; color: #334155; display: inline-flex; align-items: center; gap: 2px; font: inherit; font-weight: 700; }
.og-zoom button + button { border-left: 1px solid #d5deec; }
.og-zoom button:hover { background: #f1f5fb; }
.og-zoom .ico { width: 16px; height: 16px; }
.og-zoom-sign { font-size: 14px; line-height: 1; }
.og-back { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px !important; color: #1d4fb8 !important; border-color: #b9ccf3 !important; }
.og-back .ico { width: 14px; height: 14px; }
.og-scroll { overflow: auto; padding: 6px 4px 18px; }
.og-chart { display: flex; justify-content: center; align-items: flex-start; gap: 40px; min-width: max-content; margin: 0 auto; }
.og-chart ul { list-style: none; margin: 0; padding: 22px 0 0; display: flex; justify-content: center; position: relative; }
.og-chart li { list-style: none; position: relative; padding: 22px 10px 0; display: flex; flex-direction: column; align-items: center; }
.og-chart ul.og-root { padding-top: 0; }
.og-chart ul.og-root > li { padding-top: 0; }
.og-chart ul.og-root > li::before, .og-chart ul.og-root > li::after { display: none; }
.og-chart li::before, .og-chart li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid #c8d3e4; }
.og-chart li::after { right: auto; left: 50%; border-left: 2px solid #c8d3e4; }
.og-chart li:only-child::before { display: none; }
.og-chart li:only-child::after { border-top: 0; }
.og-chart li:first-child::before, .og-chart li:last-child::after { border-top: 0; }
.og-chart li:first-child:not(:only-child)::after { border-radius: 8px 0 0 0; }
.og-chart li:last-child:not(:only-child)::before { border-right: 2px solid #c8d3e4; border-radius: 0 8px 0 0; }
.og-chart ul ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid #c8d3e4; }
.og-person { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 210px; padding: 12px 12px 12px; background: var(--color-surface); border: 1px solid #dfe6f1; border-top: 3px solid #0b3a7e; border-radius: 12px; box-shadow: 0 2px 8px rgba(15,33,71,.07); color: var(--color-text); text-decoration: none; text-align: center; }
.og-person:hover { text-decoration: none; border-color: #b9ccf3; border-top-color: #0b3a7e; box-shadow: 0 4px 14px rgba(15,33,71,.12); }
.og-person b { font-size: 14.5px; }
.ue-av.og-av { width: 42px; height: 42px; font-size: 14px; }
.og-pill { font-size: 12px; color: #334155; background: #eef3fb; border-radius: 999px; padding: 3px 12px; }
.og-team { width: 210px; background: var(--color-surface); border: 1px solid #dfe6f1; border-radius: 12px; box-shadow: 0 2px 8px rgba(15,33,71,.06); overflow: hidden; }
.og-team-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--color-text); text-decoration: none; border-bottom: 1px solid #edf1f7; }
a.og-team-head:hover { background: #f6f9fe; text-decoration: none; }
.og-team-head b { display: block; font-size: 14px; }
.og-team-head small { font-size: 12px; color: var(--color-text-muted); }
.og-team-ic { width: 38px; height: 38px; border-radius: 10px; background: #e7effd; color: #2f6fe0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.og-team-ic .ico { width: 19px; height: 19px; }
.og-team-loose .og-team-ic { background: #f1f3f6; color: #64748b; }
.og-chart .og-people { list-style: none; margin: 0; padding: 6px; display: block; }
.og-chart .og-people::before { display: none !important; }
.og-chart .og-people li { padding: 0; display: block; }
.og-chart .og-people li::before, .og-chart .og-people li::after { display: none; }
.og-people a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; font-size: 13px; color: var(--color-text); text-decoration: none; }
.og-people a:hover { background: #f1f5fb; text-decoration: none; }
.og-people a.og-off { opacity: .55; }
.ue-av.og-av-xs { width: 24px; height: 24px; font-size: 10px; }
.og-loose { align-self: flex-start; }
.ue-org-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--color-primary); margin: -4px 0 10px 1px; text-decoration: none; }
.ue-org-link:hover { text-decoration: underline; }
.ue-org-link .ico { width: 14px; height: 14px; }
html[data-theme="dark"] .og-person, html[data-theme="dark"] .og-team { border-color: var(--color-border); }
html[data-theme="dark"] .og-person { border-top-color: #5b8def; }
html[data-theme="dark"] .og-pill { background: rgba(255,255,255,.08); color: var(--color-text); }
html[data-theme="dark"] .og-team-head { border-bottom-color: var(--color-border); }
html[data-theme="dark"] .og-chart li::before, html[data-theme="dark"] .og-chart li::after, html[data-theme="dark"] .og-chart ul ul::before { border-color: #3a4a66; }
html[data-theme="dark"] .og-head-ic { box-shadow: none; }

/* ---------- Colaboradores: colunas informativas, importar/exportar ---------- */
.ue-lista-tools { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.ue-ordem { height: 28px; font-size: 12px; padding: 0 8px; border: 1px solid var(--color-border); border-radius: 7px; background: var(--color-surface); color: var(--color-text); }
.ue-mini-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1px solid var(--color-border); border-radius: 7px; background: var(--color-surface); color: var(--color-text-muted); font: inherit; font-size: 12px; cursor: pointer; text-decoration: none; }
.ue-mini-btn:hover { color: var(--color-primary); border-color: #b9ccf3; text-decoration: none; }
.ue-mini-btn .ico { width: 14px; height: 14px; }
.ue-icon-btn { width: 28px; padding: 0; justify-content: center; }
.ue-colab-head, .ue-colab .ue-member { display: grid; grid-template-columns: minmax(0, 1fr) 78px 112px 56px 128px 70px; gap: 8px; align-items: center; }
.ue-colab-head { font-size: 11px; color: var(--color-text-muted); padding: 4px 4px 6px; border-bottom: 1px solid var(--color-border); margin-top: 6px; }
.ue-colab-head span:nth-child(4) { text-align: center; }
.ue-colab-head span:nth-child(5) { text-align: right; }
.ue-colab-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ue-colab-who .ue-member-txt b, .ue-colab-who .ue-member-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ue-info { font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; }
.ue-info.ue-num { text-align: center; font-weight: 600; color: var(--color-text); font-size: 12px; }
.ue-info.ue-never { color: #b45309; font-weight: 600; }
.ue-colab .ue-role { justify-self: end; font-size: 11px; }
@media (max-width: 900px) {
  .ue-colab-head { display: none; }
  .ue-colab .ue-member { grid-template-columns: minmax(0, 1fr) auto 32px; row-gap: 2px; }
  .ue-colab .ue-colab-who { grid-column: 1 / -1; }
  .ue-colab .ue-info { grid-row: 2; display: inline; }
  .ue-colab .ue-info::before { content: attr(data-l) ': '; }
  .ue-colab .ue-member { grid-template-columns: auto auto auto 1fr auto; }
  .ue-colab .ue-role { grid-row: 2; }
}
.imp-box { max-width: 760px; }
.imp-body { overflow-y: auto; flex: 1; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed #c8d3e4; border-radius: 12px; padding: 22px; margin: 12px 0 4px; cursor: pointer; color: var(--color-text-muted); font-size: 13px; text-align: center; }
.imp-drop .ico { width: 26px; height: 26px; color: #2f6fe0; }
.imp-drop:hover, .imp-drop.over { border-color: #2f6fe0; background: #f6f9fe; }
.imp-sum { font-size: 13.5px; font-weight: 600; margin: 0 0 8px; }
.imp-ok { color: #166534; }
.imp-table-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--color-border); border-radius: 9px; }
.imp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.imp-table th { position: sticky; top: 0; background: #f6f8fc; text-align: left; font-weight: 600; padding: 6px 8px; font-size: 11.5px; color: var(--color-text-muted); }
.imp-table td { padding: 6px 8px; border-top: 1px solid var(--color-border); }
.imp-table tr.imp-bad td { background: #fef2f2; color: #991b1b; }
.imp-table small { color: var(--color-text-muted); }
.imp-table code { font-size: 12.5px; background: #f1f3f6; padding: 1px 6px; border-radius: 5px; }
html[data-theme="dark"] .imp-table th { background: rgba(255,255,255,.05); }
html[data-theme="dark"] .imp-table tr.imp-bad td { background: #3a1517; color: #fecaca; }
html[data-theme="dark"] .imp-drop:hover, html[data-theme="dark"] .imp-drop.over { background: rgba(47,111,224,.12); }
html[data-theme="dark"] .imp-table code { background: rgba(255,255,255,.08); }
.imp-box .cm-foot [hidden], .imp-step[hidden] { display: none !important; }

/* ---------- Arquivos e videos nos posts ---------- */
.post-content a.post-file { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border: 1px solid #d5deec; border-radius: 12px; background: var(--color-surface); color: var(--color-text); text-decoration: none; font-weight: 600; font-size: 14px; max-width: 100%; box-shadow: 0 1px 3px rgba(15,33,71,.06); }
.post-content a.post-file:hover { border-color: #9fb7e8; background: #f6f9fe; text-decoration: none; }
.post-content a.post-file::before { content: ''; width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; background: #e7effd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6fe0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z'/%3E%3C/svg%3E") center / 20px no-repeat; }
.post-content a.post-file.post-file-pdf::before { background-color: #fdecec; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z'/%3E%3C/svg%3E"); }
.post-content a.post-file.post-file-xls::before, .post-content a.post-file.post-file-xlsx::before, .post-content a.post-file.post-file-csv::before, .post-content a.post-file.post-file-ods::before { background-color: #e3f6ea; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpath d='M8 11h8v7H8zM8 15h8M11 11v7'/%3E%3C/svg%3E"); }
.post-content a.post-file small { font-weight: 400; color: var(--color-text-muted); font-size: 12.5px; }
.post-content video.post-video { display: block; width: 100%; max-width: 820px; border-radius: 12px; background: #000; margin: 6px 0; }
.pf-view { display: flex; flex-direction: column; gap: 10px; }
.pf-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-bar .btn { display: inline-flex; align-items: center; gap: 5px; }
.pf-bar .btn .ico { width: 15px; height: 15px; }
.pf-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-name .ico { width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0; }
.pf-frame { width: 100%; height: calc(100vh - 190px); min-height: 480px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; }
.pf-img { text-align: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px; }
.pf-img img { max-width: 100%; max-height: calc(100vh - 220px); }
.pf-hint { margin: 0; }
html[data-theme="dark"] .post-content a.post-file { border-color: var(--color-border); }
html[data-theme="dark"] .post-content a.post-file:hover { background: rgba(255,255,255,.04); }

/* ---------- Telas de limite (armazenamento, acessos, usuarios) ---------- */
.limite-card { border-top: 4px solid #f59e0b; }
.limite-card.limite-danger { border-top-color: #dc2626; }
.limite-ico { background: #fef3c7 !important; color: #b45309 !important; }
.limite-danger .limite-ico { background: #fdecec !important; color: #dc2626 !important; }
.limite-det { font-size: 13px; color: var(--color-text-muted); }
.limite-acts { margin-top: 14px; display: flex; justify-content: center; gap: 8px; }
.limite-modal { max-width: 420px; text-align: center; border-top: 4px solid #f59e0b; }
.limite-modal h3 { margin: 8px 0 6px; }
.limite-modal p { color: var(--color-text-muted); font-size: 14px; }
.limite-ico-sm { width: 46px; height: 46px; border-radius: 50%; background: #fef3c7; color: #b45309; display: inline-flex; align-items: center; justify-content: center; }
.limite-ico-sm .ico { width: 22px; height: 22px; }

/* ---------- Painel da plataforma: licenca e espaco ---------- */
.painel-lic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.painel-lic-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--color-border); border-radius: 12px; padding: 12px; cursor: pointer; font-weight: 400; }
.painel-lic-opt:has(input:checked) { border: 2px solid var(--color-primary); padding: 11px; background: #f6f9fe; }
.painel-lic-opt input { margin-top: 3px; }
.painel-lic-opt b { display: block; font-size: 14px; }
.painel-lic-opt small { display: block; font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; line-height: 1.4; }
.painel-stor { margin-top: 8px; }
.painel-stor-bar { display: block; height: 8px; border-radius: 99px; background: #e8edf5; overflow: hidden; }
.painel-stor-bar > span { display: block; height: 100%; background: #2f6fe0; }
.painel-stor-bar.warn > span { background: #f59e0b; }
.painel-stor-bar.full > span { background: #dc2626; }
[data-lic][hidden] { display: none; }
@media (max-width: 700px) { .painel-lic { grid-template-columns: 1fr; } }
html[data-theme="dark"] .painel-lic-opt:has(input:checked) { background: rgba(47,111,224,.12); }

/* ---------- Listas sem o menu de tres pontos; busca unica (assunto ou ID) ---------- */
.tk-list-head, .tk-row { grid-template-columns: minmax(0, 1fr) 108px 112px 120px 96px; }
.tk-list-head.tk-team, .tk-row.tk-team { grid-template-columns: 64px minmax(0, 1fr) 108px 112px 140px 112px 84px 90px; }
@media (max-width: 1200px) { .tk-list-head, .tk-row { grid-template-columns: minmax(0, 1fr) 100px 104px 112px 80px; } }
@media (min-width: 701px) and (max-width: 1100px) { .tk-list-head.tk-team, .tk-row.tk-team { grid-template-columns: 58px minmax(0, 1fr) 100px 100px 110px 108px 0 84px; } }
@media (max-width: 700px) { .tk-row, .tk-row.tk-team { grid-template-columns: minmax(0, 1fr) auto; } }
.tk-layout .tk-filterbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "q q q q" "st de ate act"; }
@media (max-width: 700px) { .tk-layout .tk-filterbar { grid-template-columns: 1fr 1fr; grid-template-areas: "q q" "st st" "de ate" "act act"; } }

/* ---------- Feedbacks aos colaboradores ---------- */
.fb-menu-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fb-menu-link { display: flex !important; align-items: center; }
.fb-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-left: 4px; }
.fb-alert { display: flex; align-items: center; gap: 8px; background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.fb-alert .ico { width: 18px; height: 18px; flex-shrink: 0; }
.fb-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fb-filter { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 12.5px; color: var(--color-text); background: var(--color-surface); text-decoration: none; }
.fb-filter span { font-size: 11px; background: #f1f3f6; color: #475569; border-radius: 999px; padding: 0 7px; font-weight: 600; }
.fb-filter:hover { border-color: #b9ccf3; text-decoration: none; }
.fb-filter.active { border-color: #2f6fe0; background: #eef3fe; color: #1d4fb8; font-weight: 600; }
.fb-row-g.tk-list-head, .tk-row.fb-row-g { grid-template-columns: minmax(0, 1fr) 140px 96px 190px; }
.tk-row.fb-tone-warn { border-left-color: #f59e0b; }
.tk-row.fb-tone-danger { border-left-color: #dc2626; }
.tk-row.fb-tone-ok { border-left-color: #16a34a; }
.tk-row.fb-tone-neutral { border-left-color: #9ca3af; }
.fb-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--color-text); text-decoration: none; }
.fb-who:hover b { color: var(--color-primary); }
.fb-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.fb-who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-who small { font-size: 12px; color: var(--color-text-muted); display: inline-flex; align-items: center; gap: 3px; }
.fb-who small .ico { width: 12px; height: 12px; }
.ue-av.fb-av { width: 34px; height: 34px; font-size: 12px; }
.fb-date { font-size: 12.5px; color: var(--color-text-muted); }
.fb-st { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; vertical-align: middle; }
.fb-st-warn { background: #fef3c7; color: #92400e; }
.fb-st-ok { background: #dcfce7; color: #166534; }
.fb-st-danger { background: #fee2e2; color: #b91c1c; }
.fb-st-neutral { background: #f1f3f6; color: #475569; }
.fb-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px 3px 8px; white-space: nowrap; vertical-align: middle; }
.fb-kind .ico { width: 13px; height: 13px; }
.fb-kind-reconhecimento { background: #dbeafe; color: #1d4ed8; }
.fb-kind-orientacao { background: #ede9fe; color: #6d28d9; }
.fb-fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.fb-lbl { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.fb-kinds, .fb-choices { display: flex; gap: 10px; flex-wrap: wrap; }
.fb-kind-opt, .fb-choice { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--color-border); border-radius: 10px; padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: 14px; background: var(--color-surface); }
.fb-kind-opt .ico, .fb-choice .ico { width: 16px; height: 16px; }
.fb-kind-opt input, .fb-choice input { margin: 0; }
.fb-kind-opt:has(input:checked) { border: 2px solid #2f6fe0; padding: 8px 13px; background: #f3f7fe; }
.fb-choice-ok:has(input:checked) { border: 2px solid #16a34a; padding: 8px 13px; background: #f0fdf4; color: #166534; }
.fb-choice-no:has(input:checked) { border: 2px solid #dc2626; padding: 8px 13px; background: #fef2f2; color: #b91c1c; }
.tk-field-error .fb-kinds .fb-kind-opt, .tk-field-error .fb-choices .fb-choice { border-color: var(--color-danger); }
.fb-drop { margin-top: 0; }
.fb-filelist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fb-filelist li { display: flex; align-items: center; gap: 8px; font-size: 13px; background: #f6f8fc; border-radius: 8px; padding: 6px 10px; }
.fb-filelist small { color: var(--color-text-muted); }
.fb-filelist button { margin-left: auto; border: 0; background: none; font-size: 16px; cursor: pointer; color: #64748b; }
.fb-section { margin-bottom: 14px; }
.fb-h { display: flex; align-items: center; gap: 7px; font-size: 15px; margin: 0 0 8px; }
.fb-h .ico { width: 18px; height: 18px; color: var(--color-primary); }
.fb-h:not(:first-child) { margin-top: 16px; }
.fb-text { white-space: pre-line; font-size: 14px; line-height: 1.6; }
.fb-files { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-file { display: flex; flex-direction: column; width: 150px; border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; color: var(--color-text); text-decoration: none; background: var(--color-surface); }
.fb-file:hover { border-color: #9fb7e8; text-decoration: none; }
.fb-file img { width: 100%; height: 96px; object-fit: cover; background: #f1f3f6; }
.fb-file-ic { height: 96px; display: flex; align-items: center; justify-content: center; background: #fdecec; color: #dc2626; }
.fb-file-ic .ico { width: 32px; height: 32px; }
.fb-file-name { padding: 6px 8px; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-direction: column; }
.fb-file-name small { font-weight: 400; color: var(--color-text-muted); }
.fb-wait { display: flex; align-items: center; gap: 7px; color: var(--color-text-muted); margin: 0; font-size: 14px; }
.fb-wait .ico { width: 17px; height: 17px; }
.fb-answer { border-radius: 10px; padding: 12px 14px; border-left: 4px solid; }
.fb-answer b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.fb-answer b .ico { width: 16px; height: 16px; }
.fb-answer small { display: block; color: var(--color-text-muted); font-size: 12px; margin: 2px 0 6px; }
.fb-answer-ok { background: #f0fdf4; border-color: #16a34a; }
.fb-answer-ok b { color: #166534; }
.fb-answer-no { background: #fef2f2; border-color: #dc2626; }
.fb-answer-no b { color: #b91c1c; }
.fb-answer-neutral { background: #f6f8fc; border-color: #9ca3af; }
.fb-formbar-in { border-top: 0; padding-top: 0; margin-top: 4px; }
@media (max-width: 760px) {
  .fb-fields-2 { grid-template-columns: 1fr !important; }
  .fb-row-g.tk-list-head { display: none; }
  .tk-row.fb-row-g { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .tk-row.fb-row-g .fb-who { grid-column: 1 / -1; }
}
html[data-theme="dark"] .fb-alert { background: #33270d; border-color: #6b5214; color: #fde68a; }
html[data-theme="dark"] .fb-filter.active, html[data-theme="dark"] .fb-kind-opt:has(input:checked) { background: rgba(47,111,224,.15); color: var(--color-text); }
html[data-theme="dark"] .fb-filelist li, html[data-theme="dark"] .fb-answer-neutral { background: rgba(255,255,255,.05); }
html[data-theme="dark"] .fb-answer-ok, html[data-theme="dark"] .fb-choice-ok:has(input:checked) { background: #12301d; }
html[data-theme="dark"] .fb-answer-no, html[data-theme="dark"] .fb-choice-no:has(input:checked) { background: #3a1517; }
html[data-theme="dark"] .fb-st-warn { background: #422c0a; color: #fde68a; }
html[data-theme="dark"] .fb-st-ok { background: #12301d; color: #bbf7d0; }
html[data-theme="dark"] .fb-st-danger { background: #4a1517; color: #fecaca; }
html[data-theme="dark"] .fb-st-neutral, html[data-theme="dark"] .fb-filter span { background: rgba(255,255,255,.08); color: var(--color-text); }

/* ---------- Controle de horas (play / pause) ---------- */
.tk-list-head.tk-mine, .tk-row.tk-mine { grid-template-columns: minmax(0, 1fr) 96px 108px 112px 120px 96px; }
@media (max-width: 1200px) { .tk-list-head.tk-mine, .tk-row.tk-mine { grid-template-columns: minmax(0, 1fr) 88px 100px 104px 112px 80px; } }
@media (max-width: 700px) { .tk-row.tk-mine { grid-template-columns: minmax(0, 1fr) auto; } .tk-row.tk-mine .tk-tmcell { grid-column: 1; } }
.tk-tmcell { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tk-tm-form { margin: 0; display: inline-flex; }
.tk-tm-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #d5deec; background: var(--color-surface); color: #64748b; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; transition: color .15s, border-color .15s, background .15s; }
.tk-tm-btn .ico { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.tk-tm-btn:hover { color: #2f6fe0; border-color: #9fb7e8; background: #f3f7fe; }
.tk-tm-btn.tk-tm-on { color: #fff; background: #2f6fe0; border-color: #2f6fe0; animation: tkTmPulse 2s infinite; }
.tk-tm-btn.tk-tm-wait { color: #b45309; border-color: #f3c46b; background: #fffbeb; text-decoration: none; }
@keyframes tkTmPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,111,224,.35); } 50% { box-shadow: 0 0 0 5px rgba(47,111,224,0); } }
.tk-tm-live { font-size: 12px; font-weight: 700; color: #2f6fe0; font-variant-numeric: tabular-nums; }
.tk-tm-total { font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; }
.tk-tm-pend { color: #b45309; font-weight: 600; }
.tk-tm-team { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.tk-tm-team .ico { width: 12px; height: 12px; }
.tk-head-acts { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-tm-start { display: inline-flex; align-items: center; gap: 6px; }
.tk-tm-start .ico { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.tk-tm-meta { display: inline-flex; align-items: center; gap: 4px; }
.tk-tm-meta .ico { width: 14px; height: 14px; }
.tk-tm-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.tk-tm-banner .ico { width: 17px; height: 17px; flex-shrink: 0; }
.tk-tm-banner-on { background: #eef3fe; border-color: #b9ccf3; color: #1d4fb8; }
.tk-tm-banner-on strong { font-variant-numeric: tabular-nums; }
.tk-tm-banner .tk-tm-form { margin-left: auto; }
.tk-tm-banner .btn .ico { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.tk-tm-dot { width: 9px; height: 9px; border-radius: 50%; background: #2f6fe0; animation: tkTmPulse 2s infinite; }
.tk-entry-time { float: right; display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: #1d4fb8; background: #eef3fe; border-radius: 999px; padding: 1px 8px; }
.tk-entry-time .ico { width: 12px; height: 12px; }
.tk-entry-time.tk-entry-time-zero { color: var(--color-text-muted); background: #f1f3f6; font-weight: 500; }
html[data-theme="dark"] .tk-tm-btn { border-color: var(--color-border); }
html[data-theme="dark"] .tk-tm-banner { background: #33270d; border-color: #6b5214; color: #fde68a; }
html[data-theme="dark"] .tk-tm-banner-on { background: rgba(47,111,224,.15); border-color: #2f4f86; color: #cfe0ff; }
html[data-theme="dark"] .tk-entry-time { background: rgba(47,111,224,.2); color: #cfe0ff; }
html[data-theme="dark"] .tk-entry-time.tk-entry-time-zero { background: rgba(255,255,255,.06); }

/* ---------- Compartilhar atividade (dez/2026) ---------- */
.tk-share { position: relative; max-width: 520px; }
.tk-opt { font-weight: 400; color: var(--color-text-muted); font-size: 12px; }
.tk-share-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface, #fff); color: var(--color-text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.tk-share-btn[aria-expanded="true"] { border-color: var(--color-primary); }
.tk-share-btn .ico { width: 16px; height: 16px; flex-shrink: 0; }
.tk-share-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-share-ph { color: var(--color-text-muted); }
.tk-share-panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--color-surface, #fff); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(15, 23, 42, .12); }
.tk-share-panel[hidden] { display: none; }
.tk-share-search { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--color-border); }
.tk-share-search .ico { width: 15px; height: 15px; color: var(--color-text-muted); }
.tk-share-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 13.5px; background: transparent; color: var(--color-text); }
.tk-share-list { list-style: none; margin: 0; padding: 4px 0; max-height: 240px; overflow-y: auto; }
.tk-share-list li[hidden] { display: none; }
.tk-share-list label { display: flex; align-items: center; gap: 9px; padding: 7px 12px; cursor: pointer; font-size: 14px; font-weight: 400; margin: 0; }
.tk-share-list label:hover { background: var(--color-primary-soft); }
.tk-share-list input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.tk-share-list small { margin-left: auto; color: var(--color-text-muted); font-size: 12px; }
.tk-share-none { padding: 8px 12px; font-size: 13px; color: var(--color-text-muted); }
.tk-share-foot { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-top: 1px solid var(--color-border); font-size: 12.5px; color: var(--color-text-muted); }
.tk-share-clear { border: 0; background: none; color: var(--color-primary); font: inherit; font-size: 12.5px; cursor: pointer; padding: 0; }
.tk-shared-pill { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary); font-size: 11.5px; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.tk-shared-pill .ico, .tk-shared-meta .ico { width: 13px; height: 13px; }
.tk-shared-meta { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; }
/* Janela de confirmacao: texto sempre no centro dos botoes (dez/2026). */
.tk-actions .btn, .tk-dlg .btn { justify-content: center; text-align: center; min-width: 110px; }

/* Feedbacks: botoes na linha das abas e barra de filtros (dez/2026). */
.tk-tabs .fb-tabs-acts { margin-left: auto; display: flex; gap: 8px; align-items: center; padding-bottom: 6px; }
.tk-tabs .fb-tabs-acts a { border-bottom: 1px solid transparent; margin-bottom: 0; padding: 8px 14px; font-size: 14px; }
.tk-tabs .fb-tabs-acts a.btn-primary { color: #fff; border-color: var(--color-primary); }
.tk-tabs .fb-tabs-acts a.tk-btn-excel { color: #fff; border-color: #107c41; }
.tk-tabs .fb-tabs-acts a:hover { color: #fff; }
.fb-filterbar { margin-bottom: 12px; }
@media (max-width: 760px) { .tk-tabs { flex-wrap: wrap; } .tk-tabs .fb-tabs-acts { margin-left: 0; width: 100%; } }
/* Novo feedback: Tipo sem escolha fica marcado em vermelho (dez/2026). */
.tk-field-error .fb-kind-opt { border-color: var(--color-danger); }
.tk-field-error .fb-lbl { color: var(--color-danger); }

/* Filtros de periodo: 'Criado ate' antes do inicio (dez/2026). */
.tk-filterbar .tk-period-err { grid-column: 1 / -1; flex-basis: 100%; width: 100%; margin: 0; }
.tk-filterbar label.tk-field-error input { border-color: var(--color-danger); }

/* Excluir usuario (dez/2026): lixeira ao lado do lapis e tela de confirmacao */
.ue-acts { display: inline-flex; gap: 6px; justify-self: end; flex-shrink: 0; }
.ue-edit-sp { width: 32px; height: 32px; flex-shrink: 0; display: inline-block; }
.ue-del-btn:hover { background: #fef2f2; color: var(--color-danger); }
html[data-theme="dark"] .ue-del-btn:hover { background: #3a1416; color: #fca5a5; }
.ue-del { max-width: 720px; padding: 22px; }
.ue-del-who { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border); margin-bottom: 16px; }
.ue-del-who .ue-member-txt b { font-size: 17px; }
.ue-del-who .ue-member-txt small { display: block; margin-top: 2px; }
.ue-del-warn { display: flex; gap: 10px; align-items: flex-start; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.ue-del-warn .ico { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-danger); }
html[data-theme="dark"] .ue-del-warn { background: #3a1416; border-color: #7f2a2f; color: #fecaca; }
.ue-del-lbl { margin: 16px 0 6px; font-weight: 600; }
.ue-del-list { margin: 0 0 8px; padding-left: 20px; line-height: 1.6; font-size: 14px; }

/* Gestao da equipe (dez/2026): 4 cards, com "Atividades atrasadas" */
.tk-kpis.tk-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tk-kpis.tk-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Gestao de tarefas (dez/2026): abas fixas no topo; tela da atividade em cards
   "Dados da atividade" e "Historico da atividade" com "Adicionar atualizacao". */
.tk-tabs.tk-tabs-fixed { position: sticky; top: 0; z-index: 15; background: var(--color-bg); margin-top: -12px; padding-top: 12px; }
.tk-box { padding: 18px 20px; margin-bottom: 16px; }
.tk-box-h { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin: 0 0 14px; color: var(--color-text); }
.tk-box-h .ico { width: 19px; height: 19px; color: var(--color-primary); }
.tk-box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tk-box-head .tk-box-h { margin: 0; }
.tk-box-link { font-size: 13px; font-weight: 600; color: var(--color-primary); }
.tk-ifield { position: relative; display: block; }
.tk-ifield-ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; pointer-events: none; color: #64748b; }
.tk-ifield-ic .ico { width: 16px; height: 16px; }
.tk-ifield select, .tk-ifield input { padding-left: 34px !important; width: 100%; }
.tk-ifield-star { color: #7c3aed; }
.tk-ifield-status[data-st="aberta"] .tk-ifield-ic { color: #2563eb; }
.tk-ifield-status[data-st="andamento"] .tk-ifield-ic { color: #0284c7; }
.tk-ifield-status[data-st="andamento"] select { background-color: #e0f2fe; color: #075985; font-weight: 600; }
.tk-ifield-status[data-st="aguardando"] .tk-ifield-ic { color: #b91c1c; }
.tk-ifield-status[data-st="concluida"] .tk-ifield-ic { color: #16a34a; }
.tk-ifield-status[data-st="concluida"] select { background-color: #dcfce7; color: #166534; font-weight: 600; }
.tk-share label .ico { width: 16px; height: 16px; color: var(--color-primary); vertical-align: -3px; margin-right: 2px; }
.tk-share-hint { font-size: 12.5px; color: var(--color-text-muted); margin: -2px 0 8px; }
.tk-timeline { list-style: none; margin: 0 0 16px; padding: 0 0 0 4px; }
.tk-tl-item { position: relative; padding: 0 0 14px 24px; }
.tk-tl-item::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 2px; background: #c9d8f5; }
.tk-tl-item:last-child::before { display: none; }
.tk-tl-item::after { content: ''; position: absolute; left: 0; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 3px #dbe6fb; }
.tk-tl-item.tk-entry-prazo::after { background: #f59e0b; box-shadow: 0 0 0 3px #fdecc8; }
.tk-tl-item.tk-entry-encerramento::after { background: #16a34a; box-shadow: 0 0 0 3px #cdeedb; }
.tk-tl-meta { font-size: 12.5px; color: var(--color-text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tk-tl-meta strong { color: var(--color-text); font-weight: 600; }
.tk-tl-kind { color: #b45309; font-weight: 600; }
.tk-tl-meta .tk-entry-time { margin-left: auto; }
.tk-tl-body { font-size: 14px; font-weight: 600; color: var(--color-text); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.tk-addup { background: #f3f7fe; border: 1px solid #dbe6fb; border-radius: 12px; padding: 14px 16px 6px; }
.tk-addup-h { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; margin: 0 0 10px; }
.tk-addup-h .ico { width: 18px; height: 18px; color: var(--color-primary); }
.tk-addup-h .tk-req-mark { font-weight: 400; }
.tk-addup-row { display: flex; gap: 14px; align-items: flex-start; }
.tk-addup-row .form-group { flex: 1; margin-bottom: 4px; }
.tk-addup-row textarea { min-height: 76px !important; background: #fff; }
.tk-addup-btn { white-space: nowrap; min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 700px) { .tk-addup-row { flex-direction: column; align-items: stretch; } }
html[data-theme="dark"] .tk-addup { background: #13203a; border-color: #263b63; }
html[data-theme="dark"] .tk-addup-row textarea { background: var(--color-surface); }
html[data-theme="dark"] .tk-ifield-status[data-st="andamento"] select { background-color: #0c2a3d; color: #7dd3fc; }
html[data-theme="dark"] .tk-ifield-status[data-st="concluida"] select { background-color: #10301e; color: #8fe0ad; }

/* Tela da atividade (dez/2026): cards de informacao no topo */
.tk-infocards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 4px 0 16px; max-width: 900px; }
.tk-ic { display: flex; align-items: center; gap: 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.tk-ic-ico { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tk-ic-ico .ico { width: 20px; height: 20px; }
.tk-ic-blue { background: #e7effd; color: #1d4fb8; }
.tk-ic-purple { background: #f1eafe; color: #6d28d9; }
.tk-ic-green { background: #dcfce7; color: #15803d; }
.tk-ic-gray { background: #eef1f5; color: #475569; }
.tk-ic-txt { display: flex; flex-direction: column; min-width: 0; }
.tk-ic-txt small { font-size: 12px; color: var(--color-text-muted); }
.tk-ic-txt b { font-size: 14.5px; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-ic-txt em { font-style: normal; font-size: 12px; color: var(--color-text-muted); }
html[data-theme="dark"] .tk-ic-blue { background: #1b2a44; color: #a9c8f5; }
html[data-theme="dark"] .tk-ic-purple { background: #2a1f45; color: #c4b5fd; }
html[data-theme="dark"] .tk-ic-green { background: #10301e; color: #8fe0ad; }
html[data-theme="dark"] .tk-ic-gray { background: #1f2a3b; color: #cbd5e1; }

/* Historico de atividades (dez/2026): titulo + link "Ver historico de alteracoes" */
.tk-hist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; max-width: 900px; }
.tk-hist-head .tk-h2 { margin-bottom: 10px; }
.tk-addup-card { padding: 0; border: 0; box-shadow: none; background: transparent; }
