/* ==========================================================================
   SISTEMA DE GESTÃO DE MÍDIAS SOCIAIS 2.0 — TRISKEL WHITE LABEL DESIGN SYSTEM
   ========================================================================== */

/* Sora (variável, todos os pesos) e Material Symbols carregados via <link> no index.html */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

.material-symbol {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
  user-select: none;
}

.material-symbol.filled { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

@font-face {
  font-family: "Gambarino";
  src: url("https://fonts.cdnfonts.com/s/93121/Gambarino-Regular.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta oficial da marca Triskel (2026-08-25). Principal e Secundária têm
     um valor por modo — o mais escuro de cada par entra no modo claro (mais
     contraste contra fundo claro) e o mais claro entra no modo escuro (mais
     contraste contra fundo escuro); o par Preto/Branco vira texto+fundo base
     do app, também invertido por modo. */
  --primary: #08120d;
  --primary-hover: #26302b;
  --primary-light: #e6e7e7;
  --secondary: #86b945;
  --secondary-light: #edf5e3;

  /* Cor de TEXTO/ícone sobre um fundo `--primary`/`--secondary` (Fase 9 da
     auditoria 2026-09-08/09) — nunca fixar `#fff` direto num elemento com
     `background: var(--primary)`: como --primary é a cor mais escura de um
     par que INVERTE por tema (escura no claro, clara no escuro — ver o bloco
     [data-theme="dark"] logo abaixo), um `color: #fff` fixo funciona hoje
     (texto branco sobre fundo escuro) mas fica ilegível assim que o tema
     muda pra escuro (fundo vira claro, texto continua branco). Achado real:
     ~48 regras deste jeito (badges, botões, avatares, indicadores) —
     branco-sobre-quase-branco no modo escuro. Ver --on-primary/--on-secondary
     redefinidos no bloco de tema escuro. */
  --on-primary: #ffffff;
  --on-secondary: #ffffff;

  /* Acento raro (badges/detalhes pontuais) — mesmo valor nos dois modos. */
  --accent-muted: #7689a9;

  --tk-green-dark: #0a1f1a;
  --tk-green-deep: #0d3b2e;
  --tk-green-accent: #1a5c45;
  --tk-green-mid: #2a7a5e;
  --tk-sage: #c4cfc8;
  --tk-cream: #f5f7f5;

  --bg-page: #e9eef1;
  --bg-surface: #ffffff;
  --bg-sidebar: #fafbfa;
  --bg-input: #f2f5f3;

  --text-main: #131615;
  --text-muted: #5a6e62;
  --text-light: #8a9e92;

  --border-color: #d4ddd7;
  --border-focus: #08120d;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  
  --shadow-sm: 0 2px 8px rgba(10, 31, 26, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 31, 26, 0.08);
  --shadow-lg: 0 16px 40px rgba(10, 31, 26, 0.12);
  
  --font-serif: "Gambarino", "Playfair Display", Georgia, serif;
  --font-sans: "Sora", system-ui, -apple-system, sans-serif;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 76px;
}

/* ==========================================================================
   TEMA ESCURO — ligado via [data-theme="dark"] no <html>, controlado por
   applyTheme() em global-ui.js (Menu do perfil > Temas: Claro/Escuro/Sistema).
   Só redefine as variáveis de cor — raio/sombra/fonte ficam iguais.
   ========================================================================== */
:root[data-theme="dark"] {
  --primary: #d0d9d8;
  --primary-hover: #bbc3c2;
  --primary-light: #1b3229;
  --secondary: #abd27a;
  --secondary-light: #1a2012;

  /* --primary/--secondary viram claros no modo escuro — o texto/ícone por
     cima precisa virar escuro junto (ver explicação completa no :root). */
  --on-primary: #131615;
  --on-secondary: #131615;

  /* Achado do usuário (Fase 9, 2026-09-09): as superfícies do modo escuro
     estavam com um azul/cinza-azulado que não tem nada a ver com a marca
     (#171c2a, #12151f, #1f2534, #2a3040 — todas com o canal azul bem acima
     do verde/vermelho). Reconstruído como uma rampa MONOCROMÁTICA em verde,
     ancorada no mesmo `--tk-green-dark` (#0a1f1a) já usado nos poucos
     lugares fixos-escuros do app (painel visual do login, fundo de upload
     dark) — mesma família de cor, só variando claridade pra dar hierarquia
     (página mais escura → sidebar levemente mais escura ainda → superfície/
     card um pouco mais clara → campo de input mais claro → borda a mais
     clara de todas, ainda escura o bastante pra não virar destaque). */
  --bg-page: #0a1f1a;
  --bg-surface: #0f2b23;
  --bg-sidebar: #081a15;
  --bg-input: #15382d;

  --text-main: #e9eef1;
  --text-muted: #93a89c;
  --text-light: #66806f;

  --border-color: #234539;
  --border-focus: #d0d9d8;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

/* Barra de rolagem — sem isto, todo container com overflow usa a barra
   PADRÃO do navegador (cinza/branca, sempre a mesma independente do tema),
   o que destoava muito no modo escuro (achado do usuário, Fase 9,
   2026-09-09: "a barra de rolagem esta branca e se destacando"). Aplicado
   globalmente em `*` (não só html/body) pra cobrir também os painéis
   internos com scroll próprio que não têm uma barra dedicada definida. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* Tela neutra exibida enquanto a sessão (token → /api/state.php) ainda não
   resolveu quem está logado — acaba com o "flash" de dados de outro
   colaborador (achado real, Fase 1 da auditoria 2026-09-08): antes disso,
   o HTML de baixo (topbar/boas-vindas) só existia com valores vazios e
   ficava visível por uma fração de segundo antes do JS preenchê-lo. Ver
   applyLoginGate() em js/modules/perfil-menu.js — é quem esconde isto. */
#view-boot-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
}
#view-boot-loading svg {
  animation: tk-boot-spin 1.1s linear infinite;
  color: var(--primary);
}
@keyframes tk-boot-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Typography Hierarchy */
h1, h2, h3, .font-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-family: var(--font-sans); font-size: 15px; font-weight: 700; }

/* Main Layout Grid */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   SIDEBAR (COLLAPSIBLE TRISKEL WHITE SYSTEM)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-x: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  height: 70px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.agency-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  white-space: nowrap;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden; /* recorta o logo (object-fit:cover) nos cantos arredondados acima — sem isso a imagem "vazava" da caixa como se fosse um quadrado reto */
  box-shadow: 0 4px 12px rgba(26, 92, 69, 0.25);
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--primary);
}

/* Logo único (Configurações > Geral): some por padrão (input HTML sem src) —
   só aparece com a sidebar aberta, no lugar do ícone+"TRISKEL" padrão,
   quando .has-full-logo é ligada por renderSidebarBrand() (js/modules/
   perfil-menu.js). Fechada, quem assume é o .brand-icon acima (recorte
   quadrado automático do MESMO arquivo, via object-fit:cover). */
.brand-logo-full {
  display: none;
  max-height: 40px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.agency-brand.has-full-logo {
  width: 100%;
}
.sidebar:not(.collapsed) .agency-brand.has-full-logo {
  justify-content: center;
}
.sidebar:not(.collapsed) .agency-brand.has-full-logo .brand-icon,
.sidebar:not(.collapsed) .agency-brand.has-full-logo .brand-title {
  display: none;
}
.sidebar:not(.collapsed) .agency-brand.has-full-logo .brand-logo-full {
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
}

.nav-item:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(26, 92, 69, 0.2);
}

/* "Criação" tem 2 ações independentes: abrir a Home Central (ícone+texto) e
   abrir/fechar a lista de clientes (seta) — cada uma com seu próprio hitbox,
   em vez do botão inteiro disparar as duas coisas no mesmo clique. */
.nav-item-split {
  padding: 4px 6px 4px 8px;
  gap: 2px;
}

.nav-item-split:hover,
.nav-item-split.active {
  background: transparent;
  transform: none;
  box-shadow: none;
  color: var(--text-main);
}

.nav-item-hitbox {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item-hitbox:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item-split.active .nav-item-hitbox {
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(26, 92, 69, 0.2);
}

.nav-arrow-hitbox {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-arrow-hitbox:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.badge-counter {
  margin-left: auto;
  background: rgba(10, 31, 26, 0.08);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
:root[data-theme="dark"] .badge-counter { background: rgba(255, 255, 255, 0.1); }
.chat-mention-badge { background: #c62828; color: #fff; margin-left: 6px; }
.nav-item.active .chat-mention-badge { background: #fff; color: #c62828; }
.chat-conv-item-mention-badge, .chat-conv-item-unread-badge { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 9px; flex-shrink: 0; }
.chat-conv-item-mention-badge { background: #c62828; color: #fff; }
.chat-conv-item-unread-badge { background: var(--primary); color: var(--on-primary); }
.chat-conv-item-mention-badge + .chat-conv-item-unread-badge { margin-left: 4px; }
.badge-origin-onboarding { background: #e3f2fd; color: #1565c0; }
.badge-origin-offboarding { background: #fff3e0; color: #e65100; }
:root[data-theme="dark"] .badge-origin-onboarding { background: #16324f; color: #8ec6ff; }
:root[data-theme="dark"] .badge-origin-offboarding { background: #4a3418; color: #ffc978; }

.nav-item.active .badge-counter {
  background: color-mix(in srgb, var(--on-primary) 25%, transparent);
  color: var(--on-primary);
}

/* Ponto de notificação NÃO fixo (ao contrário do badge-counter laranja do
   Portal do Cliente) — usado pela Academy pra sinalizar uma atualização
   nova ainda não vista, sem virar um contador permanente. */
.nav-badge-dot {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ed6c02;
  flex-shrink: 0;
}
.nav-item.active .nav-badge-dot { background: #ffffff; }

.sidebar.collapsed .brand-title,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .badge-counter,
.sidebar.collapsed .nav-badge-dot {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   MAIN CONTENT & TOPBAR
   ========================================================================== */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar.collapsed + .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

.topbar {
  height: 70px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(10px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-input);
  color: var(--text-main);
}

.global-search {
  position: relative;
  width: 340px;
}

.global-search input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-main);
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

/* input[type="search"] evita o autofill de credenciais salvas do Chrome
   "vazando" pra campos de busca sem relação com login (ver Manual, Seção 1) —
   por isso TODO campo de busca do sistema usa type="search" em vez de
   type="text". Regra global (não por seletor) pra tirar a lupa/"x" nativos
   do WebKit que viriam por padrão nesse tipo, mantendo o visual que já
   tínhamos em cada campo. */
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.global-search input:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 92, 69, 0.1);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 13px;
}

.search-shortcut {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.search-send-btn {
  right: 6px;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.search-send-btn .material-symbol {
  font-size: 14px;
}

.search-send-btn:hover {
  transform: translateY(-50%) scale(1.06);
}

/* Destaque piscante ao navegar de uma notificação/tarefa até sua origem —
   "brilha" 2-3 vezes para o usuário achar fácil onde o item está. */
@keyframes highlightFlash {
  0%, 100% { outline: 3px solid transparent; outline-offset: 3px; background-color: transparent; }
  15%, 45%, 75% { outline: 3px solid var(--primary); outline-offset: 3px; background-color: rgba(26, 92, 69, 0.10); }
  30%, 60%, 90% { outline: 3px solid transparent; outline-offset: 3px; background-color: transparent; }
}
.highlight-flash {
  animation: highlightFlash 1.8s ease-in-out;
  border-radius: var(--radius-sm);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-tv-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(26, 92, 69, 0.2);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tv-mode:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--tk-green-dark);
  color: var(--tk-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* ==========================================================================
   PAGE VIEWS & CONTAINERS
   ========================================================================== */
.content-viewport {
  padding: 32px;
  flex: 1;
}

.page-view {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Common Card Box */
.card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-box:hover {
  box-shadow: var(--shadow-md);
}

.card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   COMPONENTS & BUTTONS (TRISKEL PILLS)
   ========================================================================== */
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(26, 92, 69, 0.25);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-em_aprovacao { background: #fff4e5; color: #b76e00; border: 1px solid #ffe0b2; }
.status-aprovado { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.status-ajustes { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.status-rascunho { background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }
.status-agendado { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

/* No escuro, as versões pastel claras ficam berrantes contra o fundo escuro
   — troca pra um tom escuro da mesma cor + texto claro, mesmo mapeamento de
   matiz (laranja/verde/vermelho/cinza/azul). */
:root[data-theme="dark"] .status-em_aprovacao { background: #4a3418; color: #ffc978; border-color: #6b4d20; }
:root[data-theme="dark"] .status-aprovado { background: #1c3a22; color: #7ee395; border-color: #2c5334; }
:root[data-theme="dark"] .status-ajustes { background: #4a1e20; color: #ff9a9a; border-color: #6b2c2f; }
:root[data-theme="dark"] .status-rascunho { background: #2a2a2a; color: #b8b8b8; border-color: #444; }
:root[data-theme="dark"] .status-agendado { background: #16324f; color: #8ec6ff; border-color: #234a70; }
:root[data-theme="dark"] .monitor-channel-pill { background: #4a3418; color: #ffc978; }
:root[data-theme="dark"] .task-modal-warning.tight { background: #4a3418; color: #ffc978; }

/* Form Elements */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.input-control, .textarea-control, .select-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: var(--font-sans);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.input-control:focus, .textarea-control:focus, .select-control:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 92, 69, 0.1);
}

/* Upload Dropzone */
.upload-dropzone {
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Upload Field (imagens de marca em Configurações) */
.upload-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-preview {
  flex: 1;
  height: 64px;
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.upload-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.upload-preview-placeholder {
  font-size: 18px;
  opacity: 0.4;
}

.upload-field-wide .upload-preview { height: 56px; }
.upload-field-dark .upload-preview { background: var(--tk-green-dark); }

.upload-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.upload-actions .icon-action-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.toast-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-card.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-check .material-symbol { font-size: 14px; }

/* Toggle Switch */
.switch-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* Multi-select Pills */
.selected-client-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.client-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.client-pill-remove {
  cursor: pointer;
  opacity: 0.8;
  display: inline-flex;
}

.client-pill-remove .material-symbol { font-size: 14px; }

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

/* ==========================================================================
   FORM HEADER (subtela de cadastro — ícone + título + subtítulo)
   ========================================================================== */
.form-header-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.form-header-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-header-icon .material-symbol { font-size: 24px; }

.form-header-block h2 { margin-bottom: 2px; }
.form-header-block p { font-size: 13px; color: var(--text-muted); }

/* ==========================================================================
   PHOTO / LOGO UPLOAD
   ========================================================================== */
.photo-upload-field { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

.photo-upload-preview {
  width: 100%;
  min-height: 110px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
}

.photo-upload-preview:hover { border-color: var(--primary); background: var(--primary-light); }
.photo-upload-preview .material-symbol { font-size: 22px; }
.photo-upload-hint { font-weight: 500; color: var(--text-muted); font-size: 11.5px; }
.photo-upload-preview img { width: 100%; height: 110px; object-fit: contain; }

.logo-upload-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-upload-preview {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--text-light);
}

.logo-upload-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ==========================================================================
   ICON-PREFIXED INPUT (redes sociais, drive)
   ========================================================================== */
.input-icon-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.input-icon-group .material-symbol { color: var(--text-muted); flex-shrink: 0; }

.input-icon-group input {
  background: transparent;
  border: none;
  padding: 10px 0;
  font-size: 13.5px;
  font-family: var(--font-sans);
  color: var(--text-main);
  outline: none;
  flex: 1;
  min-width: 0;
}

.input-icon-group:focus-within { box-shadow: 0 0 0 3px rgba(26, 92, 69, 0.1); }

/* ==========================================================================
   SEARCHABLE MULTI-SELECT
   ========================================================================== */
.multiselect { position: relative; }

.multiselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.multiselect-trigger .material-symbol { color: var(--text-muted); font-size: 18px; }

.multiselect-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 400;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popoverFadeIn 0.15s ease;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.multiselect-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}

.multiselect-search .material-symbol { color: var(--text-light); font-size: 18px; }

.multiselect-search input {
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 13px;
  flex: 1;
  background: transparent;
}

.multiselect-list { max-height: 220px; overflow-y: auto; padding: 6px; }

.multiselect-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}

.multiselect-item:hover { background: var(--bg-input); }
.multiselect-item.selected { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.multiselect-check { margin-left: auto; font-size: 16px; }
.multiselect-empty { padding: 16px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* ==========================================================================
   SELECT CUSTOMIZADO — substitui a aparência nativa do <select> em formulários
   ========================================================================== */
.custom-select-wrapper { position: relative; }

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.custom-select-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-trigger .material-symbol { color: var(--text-muted); font-size: 18px; flex-shrink: 0; }

/* Item 38 do audit: os selects de "Colaborador"/"Função" do passo de fluxo
   ficam numa linha flex ao lado do campo de dias — sem isso, o wrapper
   (um <div> comum, sem flex:1 próprio) encolhia pro tamanho do conteúdo em
   vez de ocupar o mesmo espaço que o <select> nativo ocupava antes. */
.pauta-fluxo-step-body .custom-select-wrapper { flex: 1; min-width: 140px; }

.custom-select-panel {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
}

/* ==========================================================================
   TOOLBAR DE CRIAÇÃO — Filtros / Classificar / Visualização
   ========================================================================== */
.toolbar-btn-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 15px; height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.criacao-toolbar-dropdown-panel { max-height: 70vh; overflow-y: auto; }

.filter-accordion-section { padding: 4px 0; }
.filter-accordion-section + .filter-accordion-section { margin-top: 4px; border-top: 1px solid var(--border-color); }

.filter-accordion-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.filter-accordion-header:hover { background: var(--bg-input); }
.filter-accordion-header .material-symbol { font-size: 16px; color: var(--text-muted); }

.filter-accordion-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 4px 8px 22px;
  max-height: 200px;
  overflow-y: auto;
}

.filter-tag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.filter-clear-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.filter-clear-btn:hover { color: #c62828; border-color: #c62828; }

.filter-clear-btn-inline {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.filter-clear-btn-inline:hover { color: #c62828; }

.sort-radio-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}
.sort-radio-dot.checked {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 2px #fff;
}

.sort-direction-btn {
  padding: 8px 6px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  gap: 4px;
  white-space: nowrap;
}
.sort-direction-btn.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ==========================================================================
   CUSTOM LINK ROW — REORDER BUTTONS
   ========================================================================== */
.custom-link-reorder {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.custom-link-reorder button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 20px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-link-reorder button:hover { color: var(--primary); }
.custom-link-reorder .material-symbol { font-size: 14px; }

.client-pill-remove:hover { opacity: 1; }

/* Custom Links Row */
.custom-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  position: relative;
}

.icon-picker-trigger {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.popover-icon-grid {
  position: absolute;
  top: 52px; left: 10px;
  z-index: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  box-shadow: var(--shadow-lg);
  width: 220px;
}

.popover-icon-item {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
}
.popover-icon-item:hover { background: var(--primary-light); }

/* Item Row List */
.item-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pack-side-tab.item-card-list { gap: 16px; }
.pack-side-tab .item-row-card { padding: 14px 18px; }

.item-row-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.item-row-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.item-row-card .item-row-open-criacao {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.item-row-card:hover .item-row-open-criacao {
  opacity: 1;
  pointer-events: auto;
}

.item-row-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.item-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.post-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.post-row-title {
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-row-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-row-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}

/* Painel "Feed" (modo Lista) do Calendário Editorial — card empilhado
   (ícone/capa, título, cliente, data), não uma linha só de texto. */
.editorial-feed-list-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editorial-feed-list-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.editorial-feed-list-thumb {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 16px;
}

.editorial-feed-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-feed-list-info {
  flex: 1;
  min-width: 0;
}

.editorial-feed-list-title {
  font-weight: 700;
  font-size: 12.5px;
}

.editorial-feed-list-client {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.editorial-feed-list-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.editorial-feed-list-date .material-symbol {
  font-size: 13px;
}

.editorial-feed-list-status {
  flex-shrink: 0;
  align-self: flex-start;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 10.5px;
}

.icon-action-btn {
  position: relative;
  background: transparent; border: none;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-badge-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.icon-action-btn:hover { background: var(--bg-input); color: var(--primary); }

/* Member Avatars Stack */
.members-stack {
  display: flex; align-items: center; gap: 4px; margin-top: 4px;
}

.mini-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-input); color: var(--text-muted);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #ffffff;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 31, 26, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}

/* Achado real (2026-08-30): estes 3 modais abrem por cima do link público
   do Portal do Cliente (#view-portal-publico), que é uma página cheia
   position:fixed com z-index:10000 — dez vezes maior que o z-index:1000
   padrão de .modal-backdrop. O resultado: o modal tecnicamente "abria"
   (classe .active, display:flex, tudo certo no computed style) mas
   renderizava ATRÁS da página do portal, então nunca aparecia na tela —
   confirmado com document.elementFromPoint(), que retornava o conteúdo da
   página, não o modal, exatamente no ponto onde o modal deveria estar.
   Por isso os cliques do cliente pareciam "não fazer nada".
   #modal-confirm entrou na lista quando ganhou uma chamada real a partir
   do link público (descartar alterações do formulário de ajuste, ver
   closePortalPublicoAjusteFormWithConfirm() em portal-cliente.js) — sem
   isso, teria exatamente o mesmo bug. */
#modal-portal-publico-post,
#modal-portal-publico-ajustar,
#modal-portal-instagram-preview,
#modal-confirm {
  z-index: 10500;
}

.modal-backdrop.active { display: flex; }

.modal-box {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  width: 100%; max-width: 580px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}

/* ==========================================================================
   CHAT — layout estilo Slack/Pautta: sidebar de conversas + área principal
   + painel lateral opcional (Detalhes do canal ou Thread), auditado ao vivo
   2026-08-23 (ver memória project-pautta-chat-audit).
   ========================================================================== */
.chat-layout-grid {
  display: flex;
  height: calc(100vh - 230px);
  min-height: 520px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}

.chat-sidebar-channels {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-sidebar-topbar { display: flex; align-items: center; gap: 8px; padding: 12px; }
.chat-sidebar-search { flex: 1; padding: 7px 10px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-surface); font-size: 12.5px; }
.chat-sidebar-icon-btn { width: 30px; height: 30px; flex-shrink: 0; border: none; background: transparent; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat-sidebar-icon-btn:hover { background: var(--bg-input); color: var(--text-main); }
.chat-sidebar-list { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.chat-section-header {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 6px 4px; font-size: 10.5px; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px;
  cursor: pointer; user-select: none;
}
.chat-section-header .material-symbol { font-size: 15px; transition: transform 0.15s; }
.chat-section-header.collapsed .material-symbol { transform: rotate(-90deg); }
.chat-conv-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13px; color: var(--text-main);
}
.chat-conv-item:hover { background: rgba(0,0,0,0.04); }
.chat-conv-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.chat-conv-item-icon { font-size: 16px; color: var(--text-light); flex-shrink: 0; }
.chat-conv-item.active .chat-conv-item-icon { color: var(--primary); }
.chat-conv-item-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv-item-badge { background: var(--primary); color: var(--on-primary); font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
/* Canal de cliente desativado (Fase 8, item 32) — esmaecido, mas continua
   clicável/acessível pra retomar a conversa se precisar. */
.chat-conv-item.archived { opacity: 0.55; }
.chat-conv-item.archived:hover { opacity: 0.85; }

.chat-messages-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid var(--border-color); flex-shrink: 0;
}
.chat-header-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14.5px; }
.chat-header-title .material-symbol { color: var(--text-light); font-size: 18px; }
.chat-header-icons { display: flex; align-items: center; gap: 4px; }
.chat-header-icon-btn { width: 30px; height: 30px; border: none; background: transparent; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 17px; gap: 2px; }
.chat-header-icon-btn:hover { background: var(--bg-input); color: var(--text-main); }
.chat-header-icon-btn.active { background: var(--primary); color: var(--on-primary); }
.chat-header-member-count { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-muted); padding: 0 6px; }

.chat-search-bar { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.chat-search-input { flex: 1; border: none; outline: none; font-size: 13px; background: transparent; appearance: none; -webkit-appearance: none; }
.chat-search-input::-webkit-search-cancel-button,
.chat-search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.chat-search-results { border-bottom: 1px solid var(--border-color); max-height: 160px; overflow-y: auto; flex-shrink: 0; }
.chat-search-result-item { padding: 8px 18px; cursor: pointer; font-size: 12.5px; }
.chat-search-result-item:hover { background: var(--bg-input); }
.chat-search-result-item mark { background: #fff3b0; border-radius: 2px; }
.chat-search-filter-panel { position: absolute; z-index: 400; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 14px; width: 220px; }

.chat-messages-scroll { flex: 1; overflow-y: auto; padding: 16px 18px; }
.chat-empty-state { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 30px; }

.chat-message-row { display: flex; gap: 10px; padding: 6px 0; position: relative; border-radius: var(--radius-sm); }
.chat-message-row:hover { background: rgba(0,0,0,0.02); }
.chat-message-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.chat-message-body { flex: 1; min-width: 0; }
.chat-message-meta { display: flex; align-items: baseline; gap: 8px; }
.chat-message-author { font-weight: 800; font-size: 13px; }
.chat-message-time { font-size: 11px; color: var(--text-light); }
.chat-message-edited-tag { font-size: 10.5px; color: var(--text-light); }
.chat-message-pin-tag { font-size: 10.5px; color: var(--primary); display: inline-flex; align-items: center; gap: 2px; font-weight: 700; }
.chat-message-pin-tag .material-symbol { font-size: 12px; }
.chat-message-text { font-size: 13.5px; color: var(--text-main); line-height: 1.5; word-break: break-word; }
.chat-message-text a { color: var(--primary); text-decoration: underline; }
.chat-mention-chip { background: var(--primary-light); color: var(--primary); font-weight: 700; border-radius: 4px; padding: 0 4px; }
.chat-message-delivered { position: absolute; right: 8px; top: 8px; font-size: 13px; color: var(--text-light); }

.chat-message-actions {
  position: absolute; top: -14px; right: 8px; display: none; gap: 2px;
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 2px;
}
.chat-message-row:hover .chat-message-actions { display: flex; }
.chat-message-action-btn { width: 26px; height: 26px; border: none; background: transparent; border-radius: 4px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.chat-message-action-btn:hover { background: var(--bg-input); color: var(--text-main); }
.chat-message-action-btn.active { color: var(--primary); }
.chat-message-action-btn.danger:hover { color: #c62828; background: #ffebee; }

.chat-reactions-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chat-reaction-pill { display: flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--bg-input); border: 1px solid transparent; font-size: 12px; cursor: pointer; }
.chat-reaction-pill.mine { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

.chat-message-edit-box { display: flex; flex-direction: column; gap: 4px; }
.chat-message-edit-input { border: 1px solid var(--primary); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13.5px; min-height: 30px; }
.chat-message-edit-hint { font-size: 11px; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; }
.chat-message-edit-hint-actions { display: flex; gap: 4px; }

.chat-composer-wrap { border-top: 1px solid var(--border-color); padding: 10px 18px 14px; flex-shrink: 0; }
.chat-reply-preview { display: flex; align-items: center; gap: 8px; background: var(--bg-input); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 6px 10px; margin-bottom: 8px; }
.chat-reply-preview-body { flex: 1; min-width: 0; }
.chat-reply-preview-author { font-size: 11.5px; font-weight: 700; color: var(--primary); }
.chat-reply-preview-text { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-message-quote { display: flex; flex-direction: column; gap: 1px; background: var(--bg-input); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 5px 9px; margin-bottom: 4px; cursor: pointer; max-width: 320px; }
.chat-message-quote-author { font-size: 11px; font-weight: 700; color: var(--primary); }
.chat-message-quote-text { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-composer-hint { font-size: 11px; color: var(--text-light); margin-top: 6px; display: flex; justify-content: space-between; }
.chat-mention-popover { position: absolute; z-index: 500; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 220px; max-height: 220px; overflow-y: auto; }
.chat-mention-item { padding: 8px 12px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.chat-mention-item:hover, .chat-mention-item.highlighted { background: var(--bg-input); }
.chat-mention-item.chat-mention-all { color: var(--on-primary); background: var(--primary); font-weight: 700; }

.chat-side-panel { width: 320px; flex-shrink: 0; border-left: 1px solid var(--border-color); display: flex; flex-direction: column; background: var(--bg-surface); }
.chat-side-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border-color); font-weight: 800; font-size: 14px; }
.chat-detail-tabs { display: flex; border-bottom: 1px solid var(--border-color); }
.chat-detail-tab { flex: 1; padding: 10px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.chat-detail-tab.active { color: var(--primary); border-color: var(--primary); }
.chat-detail-tab-badge { margin-left: 4px; }
.chat-side-panel-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.chat-detail-member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.chat-side-panel-footer { padding: 12px 16px; border-top: 1px solid var(--border-color); }
.chat-media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chat-media-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.chat-link-item { padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.chat-link-item-title { font-size: 13px; font-weight: 700; color: var(--primary); }
.chat-link-item-url { font-size: 11.5px; color: var(--text-muted); }

.chat-thread-parent { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.chat-thread-reply-count { font-size: 11px; color: var(--text-muted); padding: 4px 16px; }
.chat-thread-composer { border-top: 1px solid var(--border-color); padding: 10px 16px 14px; }

/* ==========================================================================
   INÍCIO — WELCOME CARD & SUMMARY CARDS
   ========================================================================== */
.welcome-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.inicio-progress-ring { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.inicio-progress-ring circle#inicio-progress-circle { transition: stroke-dashoffset 0.4s ease; }
.inicio-progress-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: var(--text-main);
}

.welcome-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}

.welcome-text h2 { margin-bottom: 2px; }
.welcome-text p { font-size: 13px; color: var(--text-muted); }

.summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.summary-icon { font-size: 20px; display: block; margin-bottom: 8px; }
.summary-value { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--text-main); }
.summary-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ==========================================================================
   RINGS DE PROGRESSO (Dashboard) — anel circular via conic-gradient, sem SVG.
   ========================================================================== */
.progress-ring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
}

.progress-ring {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  background: conic-gradient(var(--primary) calc(var(--ring-pct) * 1%), var(--border-color) 0);
}

.progress-ring-inner {
  background: var(--bg-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--text-main);
}

.progress-ring-lg { width: 180px; height: 180px; }
.progress-ring-lg .progress-ring-inner { width: 148px; height: 148px; font-size: 26px; }

.progress-ring-sm { width: 96px; height: 96px; }
.progress-ring-sm .progress-ring-inner { width: 78px; height: 78px; font-size: 15px; }

.progress-ring-card { text-align: center; }
.progress-ring-card-label { font-size: 12px; font-weight: 700; color: var(--text-muted); }

/* ==========================================================================
   DASHBOARD — clone pixel-a-pixel do modelo da Pautta (auditado via DOM/CSS
   computado ao vivo em 2026-08-23: Tailwind + shadcn/ui + Recharts, cores
   adaptadas para a nossa marca — ver memória project-pautta-dashboard-audit)
   ========================================================================== */
.dash-page-inner { max-width: 1600px; margin: 0 auto; }

.dash-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 12px;
  min-height: 68px;
  padding: 12px 16px;
  margin-bottom: 24px;
  color: var(--on-primary);
  box-shadow: 0 10px 24px rgba(10, 31, 26, 0.18);
}
.dash-banner-meta { display: flex; flex-direction: column; gap: 2px; min-width: 88px; }
.dash-banner-label { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: color-mix(in srgb, var(--on-primary) 80%, transparent); line-height: 1; }
.dash-banner-date { font-size: 20px; font-weight: 700; line-height: 1; margin-top: 4px; }
.dash-banner-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-cycle-select {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  background: color-mix(in srgb, var(--on-primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-primary) 25%, transparent);
  color: var(--on-primary);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.dash-cycle-select:hover { background: color-mix(in srgb, var(--on-primary) 25%, transparent); }
.dash-icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--on-primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-primary) 25%, transparent);
  border-radius: 8px;
  color: var(--on-primary);
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.dash-icon-btn:hover { background: color-mix(in srgb, var(--on-primary) 25%, transparent); }

.dash-tv-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  background: color-mix(in srgb, var(--on-primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-primary) 25%, transparent);
  color: var(--on-primary);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.dash-tv-trigger-btn:hover { background: color-mix(in srgb, var(--on-primary) 25%, transparent); }
.dash-tv-trigger-btn .material-symbol { font-size: 18px; }

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
@media (min-width: 900px) { .dash-stats-row { grid-template-columns: repeat(5, 1fr); gap: 12px; } }
.dash-stat-tile {
  background: var(--bg-surface);
  border: 1px solid rgba(212, 221, 215, 0.5);
  border-radius: 16px;
  box-shadow: 0 2px 8px -2px rgba(10, 20, 16, 0.08);
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dash-stat-tile:hover { box-shadow: 0 8px 20px -4px rgba(10, 20, 16, 0.16); transform: scale(1.03); }
.dash-stat-tile .material-symbol { color: var(--primary); font-size: 20px; }
.dash-stat-value { font-size: 20px; font-weight: 800; color: var(--text-main); line-height: 1; }
.dash-stat-label { font-size: 11px; font-weight: 500; color: var(--text-muted); }

.dash-rings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (min-width: 1100px) { .dash-rings-grid { grid-template-columns: 360px 1fr; } }

.dash-main-ring-card {
  background: var(--bg-surface);
  border: 1px solid rgba(212, 221, 215, 0.3);
  border-radius: 16px;
  box-shadow: 0 10px 40px -10px rgba(26, 92, 69, 0.18);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-main-ring-card .dash-ring-wrap { max-width: 240px; }

.dash-setor-rings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 12px;
}
@media (min-width: 640px) { .dash-setor-rings { grid-template-columns: repeat(5, 1fr); } }
.dash-setor-rings .dash-ring-wrap { max-width: 110px; }

.dash-ring-card { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dash-ring-wrap { position: relative; width: 100%; aspect-ratio: 1; margin: 0 auto; }
.dash-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash-ring-track { fill: none; stroke: var(--border-color); }
.dash-ring-progress { fill: none; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.dash-ring-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--text-main);
}
.dash-ring-card-label { font-size: 14px; font-weight: 600; color: var(--text-main); text-align: center; }
.dash-setor-rings .dash-ring-card-label { font-size: 12.5px; font-weight: 600; }

.dash-line-chart { width: 100%; height: 180px; display: block; }
.dash-line-chart text { font-family: var(--font-sans); }

.dash-donuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.dash-donut-row { display: flex; align-items: center; gap: 24px; }
.dash-donut-svg-wrap { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
.dash-donut-svg { width: 100%; height: 100%; }
.dash-donut-arc { transition: stroke-width 0.15s; cursor: pointer; }
.dash-donut-arc.hovered { stroke-width: 20; }
.dash-donut-tooltip {
  position: absolute;
  z-index: 10;
  background: #0a1f1a;
  color: #ffffff;
  font-size: 11.5px;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(10, 20, 16, 0.2);
}
.dash-legend-list { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dash-legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 6px; transition: background 0.15s; }
.dash-legend-row:hover, .dash-legend-row.hovered { background: var(--bg-hover, rgba(0,0,0,0.04)); }
.dash-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dash-legend-name { flex: 1; }
.dash-legend-count { font-weight: 800; color: var(--text-muted); }

.dash-empty-state { text-align: center; color: var(--text-muted); font-size: 13px; padding: 30px 0; }

.dash-filter-count-badge {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.dash-stat-tile-clickable { cursor: pointer; }

/* ---- Gráfico de produtividade: hover interativo ---- */
.dash-chart-hover-target { cursor: crosshair; }
.dash-chart-guide { stroke: var(--text-light); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.dash-chart-dot { fill: var(--primary); stroke: #ffffff; stroke-width: 2; pointer-events: none; }
.dash-chart-tooltip { pointer-events: none; }
.dash-chart-tooltip-bg { fill: var(--text-main); opacity: 0.92; }
.dash-chart-tooltip-date { fill: var(--bg-page); }
.dash-chart-tooltip-count { fill: color-mix(in srgb, var(--bg-page) 85%, transparent); }

/* ---- Modal de lista (tiles clicáveis: Clientes 100% / Total / Feitos / Pendentes) ---- */
.dash-stat-list-modal { max-width: 480px; width: 92vw; max-height: 78vh; display: flex; flex-direction: column; }
.dash-stat-list-count-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
}
.dash-stat-list-body { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -8px; }
.dash-stat-list-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 40px 0; }

.dash-task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.dash-task-row:hover { background: var(--bg-hover, #f4f6f5); }
.dash-task-row-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; flex-shrink: 0; overflow: hidden;
}
.dash-task-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-task-status-icon { font-size: 20px; flex-shrink: 0; }
.dash-task-status-icon.done { color: var(--primary); }
.dash-task-status-icon.pending { color: var(--text-light); }
.dash-task-row-info { flex: 1; min-width: 0; }
.dash-task-row-title { font-size: 13.5px; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-task-row-sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-status-pill {
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 20px; flex-shrink: 0;
}
.dash-status-pill.feito { background: var(--primary); color: var(--on-primary); }
.dash-status-pill.pendente { background: var(--secondary); color: var(--on-secondary); }

/* ---- Modo TV do Dashboard: carrossel fullscreen auto-rotativo ----
   Layout FLUIDO de verdade: nada de "slide" de tamanho fixo escalado (isso
   deixava o conteúdo pequeno e sobrando fundo em telas com proporção
   diferente de 16:9 — monitores gigantes, verticais, TVs de 50"+). Aqui
   tudo é dimensionado em vw/vh/clamp(), então o conteúdo sempre ocupa a
   largura/altura reais da tela, do jeito que estiver (grande, pequena,
   vertical, ultrawide). O JS (updateDashTvChartSizing) só recalcula o
   viewBox dos gráficos SVG quando a tela muda de tamanho — a escala visual
   em si é 100% CSS. */
.dash-tv-overlay {
  position: fixed; inset: 0; z-index: 100000;
  /* Achado do usuário (Fase 9, 2026-09-09: "modos TV... bugados no modo
     escuro") — `--bg-main` nunca existiu como variável de verdade neste
     arquivo (as reais são --bg-page/--bg-surface/--bg-sidebar/--bg-input);
     o fallback `#f4f6f5` (cinza claro) sempre vencia, deixando o fundo do
     Modo TV preso no claro mesmo com o resto do app no escuro — e pior,
     com texto claro por cima (var(--text-main) do modo escuro), ficava
     ilegível. Vale pros 3 modais que reaproveitam esta mesma classe:
     Dashboard, Hall da Fama e Geral. */
  background: var(--bg-page);
  display: flex; align-items: center; justify-content: center;
  padding: 2.5vh 3vw;
  box-sizing: border-box;
  overflow: hidden;
}
.dash-tv-close {
  position: fixed; top: 20px; right: 24px; z-index: 100001;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-surface); border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(10, 20, 16, 0.12);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.dash-tv-stage { width: 100%; height: 100%; }
.dash-tv-page { display: none; width: 100%; height: 100%; overflow: hidden; }
.dash-tv-page.active { display: flex; flex-direction: column; justify-content: center; animation: dashTvFadeIn 0.4s ease; }
@keyframes dashTvFadeIn { from { opacity: 0; } to { opacity: 1; } }
.dash-tv-dots {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 100001; display: flex; gap: 8px;
}
.dash-tv-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-color); border: none; cursor: pointer; padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.dash-tv-dot.active { background: var(--primary); transform: scale(1.3); }

/* Reescala cada elemento do Dashboard em vw/vh só dentro do Modo TV — as
   mesmas classes .dash-banner/.dash-stat-tile/etc continuam com os valores
   fixos em px de sempre quando usadas fora do modo TV (dashboard normal). */
.dash-tv-overlay .dash-page-inner { max-width: none; width: 100%; margin: 0; }
.dash-tv-overlay .dash-banner { min-height: 8vh; padding: 1.6vh 2.4vw; border-radius: 1.1vw; margin-bottom: 2.4vh; }
.dash-tv-overlay .dash-banner-label { font-size: clamp(11px, 1vw, 20px); }
.dash-tv-overlay .dash-banner-date { font-size: clamp(20px, 2.6vw, 46px); }
.dash-tv-overlay .dash-stats-row { gap: 1.3vw; margin-bottom: 2.4vh; }
.dash-tv-overlay .dash-stat-tile { padding: 1.6vh 1vw; border-radius: 1vw; gap: 0.6vh; }
.dash-tv-overlay .dash-stat-tile .material-symbol { font-size: clamp(18px, 1.8vw, 32px); }
.dash-tv-overlay .dash-stat-value { font-size: clamp(20px, 2.4vw, 42px); }
.dash-tv-overlay .dash-stat-label { font-size: clamp(10px, 0.85vw, 15px); }
.dash-tv-overlay .dash-rings-grid { gap: 1.8vw; }
.dash-tv-overlay .dash-main-ring-card { padding: 1.8vw; border-radius: 1.2vw; }
.dash-tv-overlay .dash-setor-rings { gap: 1.8vh 1.2vw; }
.dash-tv-overlay .dash-ring-text { font-size: clamp(26px, 3.6vw, 64px) !important; }
.dash-tv-overlay .dash-setor-rings .dash-ring-text { font-size: clamp(12px, 1.3vw, 24px) !important; }
.dash-tv-overlay .dash-ring-card-label { font-size: clamp(12px, 1.1vw, 19px); }
.dash-tv-overlay .dash-setor-rings .dash-ring-card-label { font-size: clamp(10px, 0.85vw, 15px); }
.dash-tv-overlay .card-box { padding: 1.8vh 1.8vw; border-radius: 1.1vw; }
.dash-tv-overlay .dash-line-chart { height: 26vh; }
.dash-tv-overlay .dash-donuts-grid { gap: 1.8vw; }
.dash-tv-overlay .dash-donut-svg-wrap { width: clamp(90px, 8.5vw, 170px); height: clamp(90px, 8.5vw, 170px); }
.dash-tv-overlay .dash-legend-row { font-size: clamp(12px, 1vw, 17px); }
.dash-tv-overlay .dash-legend-count { font-size: clamp(11px, 0.95vw, 16px); }

/* ==========================================================================
   HALL DA FAMA (Modo TV) — ranking de colaboradores por tarefas concluídas
   no ciclo ativo, só quem tem "Ativo no Hall da Fama" marcado. Mesmo
   princípio fluido (vw/vh/clamp) do resto do Modo TV, sem tabela/cards
   fixos em px.
   ========================================================================== */
/* Grade simples de cards — NÃO é uma lista ranqueada com posições (achado
   real, 2026-09-04: a Pautta não numera "1º/2º" no Hall da Fama, só mostra
   um card por colaborador com os emblemas de verdade que ele já ganhou). */
.hallfama-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.hallfama-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hallfama-avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; margin-bottom: 12px; flex-shrink: 0; border: 2px solid var(--primary); }
.hallfama-name { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.hallfama-role { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.hallfama-badges-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.hallfama-badge-icon { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; cursor: default; }
.hallfama-badge-icon img { width: 100%; height: 100%; object-fit: contain; }
.hallfama-no-badges { font-size: 11.5px; color: var(--text-muted); font-style: italic; }
.hall-fama-empty { text-align: center; padding: 4vh; color: var(--text-muted); font-size: clamp(13px, 1.2vw, 18px); }

/* Modo TV — mesmo card, só maior (fluido em vw/vh, igual ao resto do Modo TV) */
.hallfama-grid-tv { grid-template-columns: repeat(auto-fill, minmax(16vw, 1fr)); gap: 1.8vw; }
.hallfama-grid-tv .hallfama-card { padding: 2.4vh 1.4vw; border-radius: 1.1vw; }
.hallfama-grid-tv .hallfama-avatar { width: 9vw; height: 9vw; margin-bottom: 1.4vh; }
.hallfama-grid-tv .hallfama-name { font-size: clamp(14px, 1.4vw, 24px); }
.hallfama-grid-tv .hallfama-role { font-size: clamp(11px, 1vw, 17px); margin-bottom: 1.4vh; }
.hallfama-grid-tv .hallfama-badge-icon { width: 3vw; height: 3vw; }
.hallfama-grid-tv .hallfama-no-badges { font-size: clamp(10px, 0.9vw, 15px); }

/* ==========================================================================
   ON TRACK (Painel de Controle) — filtros, tiles de estatística, lista de
   tarefas do escopo filtrado e seletor de intervalo de datas customizado.
   ========================================================================== */
.on-track-filter-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  margin-bottom: 16px; padding: 14px 16px; background: var(--bg-input);
  border: 1px solid var(--border-color); border-radius: 10px;
}
.on-track-filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.on-track-filter-field .form-label { margin: 0; font-size: 11.5px; }
.on-track-filter-field select:disabled { opacity: 0.5; cursor: not-allowed; }

.on-track-stat-row {
  display: grid; grid-template-columns: 1.2fr repeat(6, 1fr); gap: 10px; margin-bottom: 16px;
}
.on-track-stat-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 14px 8px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 10px;
  text-align: center;
}
.on-track-stat-tile strong { font-size: 20px; font-weight: 800; color: var(--text-main); }
.on-track-stat-tile span { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.on-track-stat-label-tile { flex-direction: row; gap: 8px; font-weight: 700; color: var(--text-main); }
.on-track-stat-label-tile .material-symbol { color: var(--text-muted); }

.on-track-task-row { gap: 4px; }
.on-track-status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
  white-space: nowrap; margin-left: 8px;
}
.on-track-status-concluida { background: #e3f4e6; color: #2e7d32; }
.on-track-status-pendente { background: #eef0ee; color: var(--text-muted); }
.on-track-status-aguardando_aprovacao { background: #fff3d6; color: #a06a00; }
.on-track-status-realoc { background: #fce8e6; color: #c62828; }
:root[data-theme="dark"] .on-track-status-concluida { background: #1c3a22; color: #7ee395; }
:root[data-theme="dark"] .on-track-status-pendente { background: #2a2f2c; color: var(--text-muted); }
:root[data-theme="dark"] .on-track-status-aguardando_aprovacao { background: #4a3418; color: #ffc978; }
:root[data-theme="dark"] .on-track-status-realoc { background: #4a1e20; color: #ff9a9a; }

.on-track-flag-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.on-track-flag-yellow { background: #f5b400; }
.on-track-flag-red { background: #d32f2f; }

.on-track-daterange-preset {
  background: none; border: none; text-align: left; padding: 7px 8px; border-radius: 6px;
  font-size: 12.5px; color: var(--text-main); cursor: pointer;
}
.on-track-daterange-preset:hover { background: var(--bg-input); }

.on-track-icon-upload-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color);
}
.on-track-icon-upload-row:last-of-type { border-bottom: none; }
.on-track-icon-upload-row .upload-preview { width: 40px; height: 40px; flex-shrink: 0; }

.performance-ring-warn { box-shadow: 0 0 0 2px #f5b400; border-radius: 50%; }
.performance-ring-danger { box-shadow: 0 0 0 2px #d32f2f; border-radius: 50%; }

@media (max-width: 1100px) {
  .on-track-stat-row { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   TABELA MATRIZ (Geral) — clientes x etapas de produção.
   ========================================================================== */
.matrix-table-wrap { overflow-x: auto; }

.matrix-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }

.matrix-table th, .matrix-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.matrix-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.matrix-table td:first-child, .matrix-table th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--bg-surface);
  font-weight: 700;
  color: var(--text-main);
}

.matrix-table tbody tr:hover td { background: var(--bg-input); }
.matrix-table tbody tr:hover td:first-child { background: var(--bg-input); }

.matrix-count-zero { color: var(--text-light); }

.matrix-client-cell { cursor: pointer; color: var(--primary); }
.matrix-client-cell:hover { text-decoration: underline; }

.matrix-ring-cell { cursor: pointer; }
.matrix-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}
.matrix-ring.done {
  border-color: var(--primary);
  background: var(--primary);
}
.matrix-ring-check { font-size: 13px; color: #ffffff; }

/* ---- Modo TV do Geral: mesmas regras fluidas (vw/vh/clamp) do Dashboard ---- */
.dash-tv-overlay .matrix-table { font-size: clamp(13px, 1.1vw, 20px); }
.dash-tv-overlay .matrix-table th, .dash-tv-overlay .matrix-table td { padding: 1.2vh 1.4vw; }
.dash-tv-overlay .matrix-ring { width: clamp(18px, 1.6vw, 30px); height: clamp(18px, 1.6vw, 30px); }
.dash-tv-overlay .matrix-ring-check { font-size: clamp(11px, 1vw, 18px); }

/* ---- Modal Gerenciar Colunas ---- */
.geral-columns-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.geral-column-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
}
.geral-column-row.dragging { opacity: 0.4; }
.geral-column-drag-handle { color: var(--text-light); cursor: grab; font-size: 18px; }
.geral-column-name { flex: 1; font-size: 13.5px; font-weight: 600; cursor: text; }
.geral-column-row-editing { padding: 6px; }
.geral-column-rename-input { flex: 1; }

/* ==========================================================================
   MONITORAMENTO — Conferência de publicações (clone auditado ao vivo na
   Pautta 2026-08-23). Lista de posts concluídos do dia + preview + painel
   de ações (Conferir/Sinalizar erro/Abrir post).
   ========================================================================== */
.monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.monitor-header-title { display: flex; align-items: center; gap: 12px; }
.monitor-header-title .material-symbol { font-size: 26px; color: var(--primary); }
.monitor-header-title h2 { font-size: 20px; margin: 0; }
.monitor-header-actions { display: flex; align-items: center; gap: 10px; }
.monitor-toggle-btn.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.monitor-nav-btn { border: 1px solid var(--border-color); border-radius: 50%; }
.monitor-date-btn { display: flex; align-items: center; gap: 8px; }

.monitor-layout {
  display: grid;
  grid-template-columns: 300px 1fr 380px;
  gap: 20px;
  align-items: start;
  min-height: 420px;
}
@media (max-width: 1100px) { .monitor-layout { grid-template-columns: 1fr; } }

.monitor-list-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.monitor-list-title { padding: 14px 16px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--border-color); }
.monitor-list-body { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; }
.monitor-list-empty { padding: 30px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

.monitor-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
}
.monitor-list-item:hover { background: var(--bg-hover, #f4f6f5); }
.monitor-list-item.active { background: var(--primary-light); }
.monitor-list-item-icon { color: var(--text-light); font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.monitor-list-item-icon.done { color: var(--primary); }
.monitor-list-item-info { flex: 1; min-width: 0; }
.monitor-list-item-title { font-size: 13.5px; font-weight: 700; color: var(--text-main); }
.monitor-list-item-sub { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.monitor-list-item-sub .material-symbol { font-size: 13px; }
.monitor-channel-tag { background: var(--bg-input); border-radius: 4px; padding: 1px 6px; font-weight: 700; }
.monitor-list-item-error { color: #c62828; font-size: 18px; flex-shrink: 0; }

.monitor-preview-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* sem post selecionado, o painel de detalhe (3ª coluna) fica escondido —
   o preview estica até a última coluna do grid pra alinhar com o card
   "Dias em aberto" em vez de deixar um vão vazio à direita. */
.monitor-preview-col.monitor-preview-full { grid-column: 2 / -1; }
.monitor-empty-state { color: var(--text-muted); font-size: 13.5px; }
.monitor-image-preview {
  width: 100%; height: 100%; min-height: 420px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
}
.monitor-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.monitor-image-preview .material-symbol { font-size: 48px; }

.monitor-detail-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.monitor-detail-client { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13.5px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.monitor-detail-client-avatar { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--primary); font-size: 12px; flex-shrink: 0; }
.monitor-detail-client-avatar img { width: 100%; height: 100%; object-fit: cover; }
.monitor-detail-post-title { font-size: 16px; font-weight: 800; }
.monitor-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.monitor-detail-meta .material-symbol { font-size: 14px; vertical-align: -2px; }
.monitor-detail-meta-pill { background: var(--bg-input); border-radius: var(--radius-pill); padding: 3px 10px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.monitor-channel-pill { background: #fff4e5; color: #b76e00; }
.monitor-detail-caption-label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.monitor-detail-caption { font-size: 13px; color: var(--text-main); min-height: 20px; margin-bottom: 6px; }

.monitor-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13.5px; cursor: pointer;
  border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-main);
  transition: all 0.15s;
}
.monitor-action-confirm { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.monitor-action-confirm.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.monitor-action-error { color: #c62828; border-color: #ffcdd2; }
.monitor-action-error:hover { background: #ffebee; }
.monitor-action-outline:hover { background: var(--bg-hover, #f4f6f5); }

.monitor-error-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: #ffebee; color: #c62828; font-size: 13px; font-weight: 600;
}
.monitor-error-badge span { flex: 1; }
.monitor-error-badge button { background: none; border: none; color: #c62828; cursor: pointer; display: flex; }

/* ==========================================================================
   FILTER TABS (Início / Tarefas)
   ========================================================================== */
.filter-tabs-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-input);
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover { color: var(--text-main); }

.tab-btn.active {
  background: var(--primary);
  color: var(--on-primary);
}

/* ==========================================================================
   CONFIGURAÇÕES — HEADER, ABAS E SUBTELAS
   ========================================================================== */
.config-header { margin-bottom: 24px; }
.config-header p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.config-tabs-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.config-nav-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.config-nav-btn:hover { color: var(--text-main); }

.config-nav-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.config-tab-content { display: none; }
.config-tab-content.active { display: block; animation: fadeIn 0.2s ease; }

.config-box-title { font-weight: 800; font-size: 18px; }

/* Toggle switch (on/off) reutilizável — Configurações do Kanban e futuras
   telas de automação/preferência. */
.toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--border-color);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.toggle-switch.on { background: var(--primary); }
.toggle-switch.on::after { transform: translateX(16px); }

.kanban-setting-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}
.kanban-setting-row:last-child { border-bottom: none; }
.kanban-setting-row-title { font-weight: 700; font-size: 12.5px; margin-bottom: 3px; }
.kanban-setting-row-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

.cascade-move-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 14px 8px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.cascade-move-option:hover { border-color: var(--primary); }
.cascade-move-option.selected { border-color: var(--primary); background: var(--primary-light); }
.cascade-move-option .material-symbol { font-size: 20px; color: var(--primary); }

/* Menu de contexto (clique direito) — favoritar cliente na sidebar */
.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.context-menu-item:hover { background: var(--primary-light); }

.subscreen-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.subscreen-back-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.subscreen-back-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

.icon-action-btn.delete:hover { background: #ffebee; color: #c62828; }

/* ==========================================================================
   PAUTA — KANBAN BOARD
   ========================================================================== */
.kanban-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 450px;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
}

.kanban-cards {
  flex: 1;
  min-height: 60px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.kanban-cards.drag-over {
  background: var(--primary-light);
  outline: 2px dashed var(--primary);
}

.kanban-card { cursor: grab; }

/* Onboarding/Offboarding (item 28 do audit, upgrade "estilo Trello" depois):
   arrastar usa o motor compartilhado do SortableJS (initSortableLists — ver
   .sortable-ghost/.sortable-drag genéricos) em vez do drag-and-drop nativo.
   Mantém só o "encaixe" suave de entrada do card ao renderizar, escopado a
   #onboarding-board de propósito — .kanban-card/.kanban-cards também é
   usado pela Pauta, que não deve ganhar essa animação sem ter sido pedida lá. */
#onboarding-board .kanban-card {
  animation: obKanbanCardSnapIn 0.18s ease;
}
@keyframes obKanbanCardSnapIn {
  from { opacity: 0; transform: scale(0.94) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Botão "adicionar pessoas" no card do quadro (item 26) — mesmo componente
   visual e mesmo comportamento hover-reveal do .production-card-add-people
   da Criação (canto superior direito, só aparece no hover do card). */
#onboarding-board .kanban-card-add-people {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
#onboarding-board .kanban-card:hover .kanban-card-add-people { opacity: 1; pointer-events: auto; }
#onboarding-board .kanban-card-add-people:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
#onboarding-board .kanban-card-add-people .material-symbol { font-size: 14px; }

/* Seção do Onboarding/Offboarding — agrupa várias colunas relacionadas sob
   um cabeçalho colapsável com cor e contador (mesmo mecanismo do Pautta
   original). Colapsada, encolhe pra uma faixa fina com o nome na vertical. */
.ob-section-group {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  padding: 10px;
  flex-shrink: 0;
  transition: width 0.25s ease;
}

.ob-section-group.collapsed {
  width: 52px;
  align-items: center;
}

.ob-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 6px 4px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: left;
}
.ob-section-header:hover { background: var(--bg-surface); }

.ob-section-group.collapsed .ob-section-header {
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding: 12px 4px;
}

.ob-section-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.ob-section-group.collapsed .ob-section-chevron { transform: rotate(-90deg); }

.ob-section-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ob-section-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-section-group.collapsed .ob-section-name {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  overflow: visible;
}

.ob-section-count {
  background: var(--bg-surface);
  color: var(--text-muted);
  margin-left: auto;
}
.ob-section-group.collapsed .ob-section-count { margin-left: 0; margin-top: auto; }

.ob-section-columns {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: opacity 0.2s ease;
}
.ob-section-group.collapsed .ob-section-columns { display: none; }

.ob-section-placeholder {
  opacity: 0.55;
  border-style: dashed;
  min-height: 60px;
  cursor: help;
}
.ob-section-placeholder .ob-section-columns { display: none; }

/* Linhas de seção/coluna aninhada dentro do painel "Gerenciar colunas" */
/* Botões da barra de ação em massa (Onboarding > Tarefas) — .btn-outline
   sozinho não é flex, então ícone+texto podiam quebrar linha (ícone em cima,
   texto embaixo) em espaços apertados; aqui força lado a lado com respiro. */
.ob-card-bulk-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 11.5px;
}

/* Histórico do card de Onboarding — linha com ícone colorido por tipo de
   evento, avatar+nome+horário numa linha e o texto da mudança embaixo. */
.ob-history-row {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  transition: background 0.12s ease;
}
.ob-history-row:hover { background: var(--bg-input); }

.ob-history-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Descrição de tarefa (Onboarding) renderizada em modo leitura — mesmo texto
   rico salvo pelo editor (initRichToolbars), só que fora do contenteditable. */
.ob-task-description-view { font-size: 13.5px; line-height: 1.6; }
.ob-task-description-view ul, .ob-task-description-view ol { padding-left: 20px; }

/* "Atualizar template desta etapa" (Onboarding > Tarefas) */
.ob-template-diff-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  transition: filter 0.15s ease;
}
.ob-template-diff-btn:hover { filter: brightness(1.08); }
.ob-template-diff-btn .badge-counter { margin-left: auto; }

.ob-template-diff-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  margin: 14px 0 6px;
}
.ob-template-diff-group-title:first-child { margin-top: 0; }

.ob-template-diff-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.ob-template-diff-row:hover { background: var(--bg-input); }

.ob-comment-row { display: flex; gap: 8px; margin-bottom: 14px; }
.ob-comment-actions {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.ob-comment-row:hover .ob-comment-actions { opacity: 1; pointer-events: auto; }

/* Anexo dentro de um comentário — clicável, abre a mesma visualização geral
   de Documentos (o anexo é sincronizado como documento real, mesmo id). */
.ob-comment-attachment {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--primary);
  cursor: pointer;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  width: fit-content;
  max-width: 100%;
}
.ob-comment-attachment:hover { background: var(--bg-input); }

/* Prévia (estilo WhatsApp) dos anexos já enviados ao storage mas ainda não
   confirmados no comentário — miniatura clicável + nome + botão remover,
   fica ACIMA da caixa de digitar até o envio. */
.ob-pending-attachments {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.ob-pending-attachment-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 6px 4px 4px;
  max-width: 180px;
}
.ob-pending-attachment-thumb {
  width: 32px; height: 32px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}
.ob-pending-attachment-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ob-pending-attachment-name {
  font-size: 11px;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.ob-pending-attachment-chip .icon-action-btn { width: 20px; height: 20px; flex-shrink: 0; }

/* Textarea da caixa de comentário — cresce com o texto até um teto, depois
   rola por dentro (não empurra mais o resto do painel pra fora da tela). */
.ob-comment-textarea {
  min-height: 32px;
  max-height: 120px;
  padding: 6px 14px;
  resize: none;
  overflow-y: auto;
  line-height: 1.4;
  font-family: inherit;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.ob-comment-textarea::-webkit-scrollbar { width: 6px; }
.ob-comment-textarea::-webkit-scrollbar-track { background: transparent; }
.ob-comment-textarea::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 999px; }

/* Documentos do card de Onboarding — linha com miniatura, nome clicável,
   metadados e ações que só aparecem no hover (abrir/baixar/renomear/excluir). */
.ob-doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  background: var(--bg-surface);
}

.ob-doc-thumb {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
}
.ob-doc-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ob-doc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ob-doc-name:hover { text-decoration: underline; }

.ob-doc-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.ob-doc-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.ob-doc-row:hover .ob-doc-actions { opacity: 1; pointer-events: auto; }

/* Visualização geral de documentos — quase tela cheia */
.ob-doc-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
}

.ob-doc-preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  color: #fff;
  flex-shrink: 0;
}

.ob-doc-preview-title { font-size: 14px; font-weight: 700; }

.ob-doc-preview-topbar-actions { display: flex; align-items: center; gap: 10px; }
.ob-doc-preview-counter { font-size: 12.5px; color: rgba(255, 255, 255, 0.7); }
.ob-doc-preview-topbar-actions .icon-action-btn { color: #fff; }
.ob-doc-preview-topbar-actions .icon-action-btn:hover { background: rgba(255, 255, 255, 0.15); }

.ob-doc-preview-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 20px 70px;
}
.ob-doc-preview-content img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.ob-doc-preview-content iframe { width: 100%; height: 100%; border: none; background: #fff; border-radius: 4px; }

.ob-doc-preview-nopreview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.ob-doc-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ob-doc-preview-nav:hover { background: rgba(255, 255, 255, 0.25); }
.ob-doc-preview-nav.prev { left: 16px; }
.ob-doc-preview-nav.next { right: 16px; }

/* Painel de mini-perfil (clique numa @menção) — desliza da direita, mesmo
   espírito de um "sheet" lateral. */
.mini-profile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.mini-profile-backdrop.open { opacity: 1; pointer-events: auto; }

.mini-profile-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--bg-surface);
  z-index: 2401;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.mini-profile-panel.open { transform: translateX(0); }

.mini-profile-cover {
  height: 90px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0.9;
  position: relative;
}
.mini-profile-close, .mini-profile-expand {
  position: absolute;
  top: 10px;
  background: rgba(255, 255, 255, 0.85) !important;
  color: var(--text-main) !important;
}
.mini-profile-close { right: 10px; }
.mini-profile-expand { left: 10px; }

/* Sem overlap com o banner (2026-09-05): a versão anterior sobrepunha o
   header no cover com margin-top negativo, mas a matemática do overlap
   deixava o NOME e o botão de mensagem meio dentro do gradiente — texto
   escuro em cima de fundo colorido, parecia "transparente"/ilegível.
   Agora tudo (avatar, nome, botão) fica limpo ABAIXO do banner. */
.mini-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 18px;
  border-bottom: 1px solid var(--border-color);
}

.mini-profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.mini-profile-name { font-size: 16.5px; font-weight: 800; color: var(--text-main); }
.mini-profile-role { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.mini-profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  overflow-x: auto;
}

.mini-profile-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.mini-profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.mini-profile-tasks { flex: 1; overflow-y: auto; padding: 12px 18px; }

.mini-profile-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-color);
}
.mini-profile-task-row:last-child { border-bottom: none; }
.mini-profile-task-title { font-size: 13.5px; font-weight: 600; color: var(--text-main); line-height: 1.4; }
.mini-profile-task-title.done { text-decoration: line-through; color: var(--text-muted); }
.mini-profile-task-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

.manage-columns-row.is-section { background: var(--bg-input); }
.manage-columns-section-members {
  margin-left: 20px;
  padding-left: 8px;
  border-left: 2px solid var(--border-color);
}
.manage-columns-section-empty {
  margin-left: 20px;
  padding: 6px 8px 6px 16px;
  font-size: 11px;
  color: var(--text-light);
  border-left: 2px dashed var(--border-color);
}

/* ==========================================================================
   PROGRESS BAR (Onboarding / Dashboard)
   ========================================================================== */
.progress-track {
  background: var(--bg-input);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  background: var(--primary);
  height: 100%;
  transition: width 0.3s ease;
}

/* ==========================================================================
   ONBOARDING — CHECKLIST
   ========================================================================== */
.onboarding-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
}

.onboarding-checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.onboarding-checklist-item .step-done {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ==========================================================================
   DASHBOARD — BARRAS DE STATUS
   ========================================================================== */
.dash-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 32px;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.dash-bar-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.dash-bar-value { font-size: 13px; font-weight: 700; text-align: right; }

/* ==========================================================================
   SIDEBAR SUBMENU (Criação > clientes)
   ========================================================================== */
.nav-arrow {
  margin-left: auto;
  display: flex;
  transition: transform 0.2s ease;
}

.nav-arrow.open { transform: rotate(90deg); }
.nav-arrow .material-symbol { font-size: 16px; }

.nav-submenu {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 2px;
  padding-left: 30px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.nav-submenu.open { max-height: 500px; }

.nav-submenu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.nav-submenu-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-submenu-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.nav-submenu-item .material-symbol { font-size: 14px; flex-shrink: 0; }

/* ==========================================================================
   CRIAÇÃO — CABEÇALHO DO QUADRO POR CLIENTE
   ========================================================================== */
.criacao-board-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.criacao-client-identity { display: flex; align-items: center; gap: 12px; }
.criacao-client-identity h2 { margin-bottom: 2px; }

.criacao-client-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-weight: 800;
  font-size: 15px;
}

.criacao-client-icon img { width: 100%; height: 100%; object-fit: cover; }

.client-avatar-mini {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 8px;
  font-weight: 800;
}
.client-avatar-mini img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   ONBOARDING — DETALHE DO CARD (stepper de etapas + layout de tarefas)
   ========================================================================== */
.ob-card-tab-content { }

/* Comentários — painel estilo WhatsApp: composer fixo embaixo, mensagens
   crescendo de baixo para cima (lista com scroll próprio, ancorada no fim). */
.ob-comments-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}
.ob-comments-panel.full { height: calc(100vh - 300px); min-height: 420px; }
.ob-comments-panel.side { height: 460px; }
.ob-comments-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* Fluxo normal (bloco), NÃO flex column + justify-content:flex-end — essa
     combinação (container flex ancorado no fim + overflow) é um caso de
     borda conhecido que trava o scroll ANTES do início do conteúdo mais
     antigo em vários motores; o "gruda embaixo" já é resolvido no JS
     (scrollTop = scrollHeight logo abaixo), sem depender do CSS pra isso. */
  padding: 14px;
  /* Scrollbar fina sem as setinhas nativas do Windows — sem isso, o
     scroll da lista de mensagens ficava com um scrollbar grosso e feio,
     fácil de confundir com o scroll interno da caixa de digitar. */
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.ob-comments-messages::-webkit-scrollbar { width: 6px; }
.ob-comments-messages::-webkit-scrollbar-track { background: transparent; }
.ob-comments-messages::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 999px; }
.ob-comments-composer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-color);
  padding: 10px 14px;
  background: var(--bg-surface);
}

.ob-card-stepper {
  display: flex; align-items: flex-start; gap: 0;
  overflow-x: auto; padding-bottom: 12px; margin-bottom: 16px;
}
.ob-card-stepper-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex-shrink: 0; width: 86px; padding: 4px 0;
}
.ob-card-stepper-step-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 0; width: 100%;
}
.ob-card-stepper-circle {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
  background: var(--text-light);
}
.ob-card-stepper-step.active .ob-card-stepper-circle { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.ob-card-stepper-step.past .ob-card-stepper-circle { background: #26a69a; }
.ob-card-stepper-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 1.2; }
.ob-card-stepper-step.active .ob-card-stepper-label { color: var(--text-main); }
.ob-card-stepper-here-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff9800; margin-top: 2px; }
.ob-card-stepper-move-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 2px;
  background: var(--border-color); border: none; cursor: pointer; padding: 0;
  transition: all 0.15s ease;
}
.ob-card-stepper-move-dot:hover { background: var(--primary); transform: scale(1.4); }
.ob-card-stepper-chevron { color: var(--text-light); margin-top: 13px; flex-shrink: 0; }

.ob-card-tarefas-layout {
  display: grid;
  grid-template-columns: 360px 1fr 360px;
  gap: 16px; align-items: start;
}
.ob-card-task-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 6px; border-radius: var(--radius-sm); cursor: pointer;
}
.ob-card-task-row:hover { background: var(--bg-input); }
.ob-card-task-row.selected { background: var(--primary-light); }
.ob-card-task-row-title { flex: 1; font-size: 13px; }
.ob-card-task-row.done .ob-card-task-row-title { text-decoration: line-through; color: var(--text-muted); }
.ob-card-task-checkbox {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-color);
  flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface);
}
.ob-card-task-checkbox.checked { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.ob-card-task-checkbox.checked .material-symbol { font-size: 13px; }

.ob-card-task-deadline-btn {
  flex-shrink: 0; border: 1px dashed var(--border-color); background: none; cursor: pointer;
  border-radius: var(--radius-sm); color: var(--text-light);
  width: 26px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; padding: 0 4px;
}
.ob-card-task-deadline-btn:hover { border-color: var(--primary); color: var(--primary); }
.ob-card-task-deadline-btn.set { border-style: solid; width: auto; color: var(--text-muted); border-color: var(--border-color); }
.ob-card-task-deadline-btn.set.overdue { color: #c62828; border-color: #c62828; background: #ffebee; }

@media (max-width: 1200px) {
  .ob-card-tarefas-layout { grid-template-columns: 1fr; }
}

.criacao-social-row { display: flex; align-items: center; gap: 12px; margin-top: 3px; }
.criacao-social-row a {
  color: var(--text-muted);
  display: flex;
  transition: color 0.2s ease;
}
.criacao-social-row a:hover { color: var(--primary); }
.criacao-social-row .material-symbol { font-size: 18px; }
/* Item 62 do audit: "Visão de calendário" e "Chat do cliente" no mesmo
   cabeçalho, mesma altura/estilo dos links sociais ao lado — um pouco
   maiores e mais espaçados do que a primeira versão, sem exagerar. */
.criacao-header-extra-link {
  color: var(--text-muted);
  display: flex;
  cursor: pointer;
  transition: color 0.2s ease;
}
.criacao-header-extra-link:hover { color: var(--primary); }
.criacao-header-extra-link .material-symbol { font-size: 18px; }

.criacao-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.avatar-stack { display: flex; align-items: center; }
.avatar-stack .mini-avatar {
  width: 26px; height: 26px;
  border: 2px solid #fff;
  margin-left: -8px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}
.avatar-stack .mini-avatar:first-child { margin-left: 0; }

#criacao-team-avatars.avatar-stack { cursor: pointer; }
#criacao-team-avatars.avatar-stack .mini-avatar {
  width: 34px; height: 34px;
  font-size: 13px;
  transition: transform 0.15s ease;
}
#criacao-team-avatars.avatar-stack .mini-avatar:hover { transform: translateY(-2px); z-index: 1; }

.criacao-toolbar .icon-action-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.ob-card-responsibles-btn {
  width: auto;
  min-width: 32px;
  padding: 0 8px 0 4px;
}
.ob-card-responsibles-btn .avatar-stack .mini-avatar { width: 24px; height: 24px; font-size: 10px; }
/* "+" sempre visível depois dos avatares já adicionados — sem ele, uma vez
   que já havia responsável nenhum ícone de adicionar aparecia mais. */
.ob-card-responsibles-add {
  background: var(--bg-input) !important;
  border: 1.5px dashed var(--border-color);
  color: var(--text-muted);
}

.criacao-toolbar .icon-action-btn.toggled {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.criacao-toolbar #btn-toggle-atrasadas.toggled {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
}

.criacao-search { position: relative; width: 200px; }
.criacao-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-family: var(--font-sans);
  outline: none;
}
.criacao-search input:focus { background: var(--bg-surface); border-color: var(--primary); }
.criacao-search .material-symbol { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--text-light); }

/* ==========================================================================
   CRIAÇÃO — QUADRO DE PRODUÇÃO (BLOCOS COLAPSÁVEIS)
   ========================================================================== */
.production-board {
  display: flex;
  gap: 14px;
  overflow-x: hidden;
  padding-bottom: 8px;
  align-items: flex-start;
  /* Cursor fica normal em repouso — só vira "mãozinha fechada" durante o
     arraste de fato (via .panning, ligado/desligado no mousedown/mouseup),
     pra não ficar incomodando o mouse à toa por cima da área toda. */
  /* Sem isso a altura do board é só a do conteúdo (a coluna mais alta), e a
     área em branco abaixo das colunas fica fora do elemento — o clique-e-
     -arraste (pan) não dispara ali. Estica até o fim da tela para que toda
     a área visível seja arrastável, não só onde os cards ficam. */
  min-height: calc(100vh - 200px);
}
.production-board.panning { cursor: grabbing; user-select: none; }
.production-board.panning * { cursor: grabbing !important; }

#production-board-scrollbar {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  z-index: 500;
  transition: left 0.2s ease;
  cursor: grab;
}
#production-board-scrollbar.dragging { cursor: grabbing; user-select: none; }
.sidebar.collapsed ~ #production-board-scrollbar { left: var(--sidebar-collapsed-width); }
#production-board-scrollbar-spacer { height: 1px; }

.production-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  min-width: 240px;
  width: 240px;
  min-height: 300px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.production-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

/* Bolinha de cor da coluna (item do audit: cor escolhida em "Gerenciar
   colunas" agora aparece de verdade no board, só no cabeçalho — nunca
   pintando a coluna inteira). */
.production-column-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.production-block-group {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  align-items: flex-start;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px;
  transition: border-color 0.15s ease;
}

.production-block-collapsed {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 40px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 0;
  cursor: pointer;
  flex-shrink: 0;
}

.production-block-collapsed { transition: background 0.15s ease; }
.production-block-collapsed:hover { background: var(--primary-light); }
.production-block-collapsed .badge-counter { margin-left: 0; }

.production-block-collapsed-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-main);
  letter-spacing: 0.2px;
}

.production-block-expanded-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.production-block-columns {
  display: flex;
  gap: 14px;
}

/* flex:1 (não só min-height) é essencial pro arrastar: sem isso, essa área
   só ocupava a altura dos cards que já tinha dentro, deixando um espaço
   "morto" abaixo (dentro da coluna, que é bem mais alta) onde soltar um
   card não registrava nada — obrigando a mirar numa faixa bem estreita
   (achado ao vivo do usuário). Com flex:1 ela preenche a coluna inteira. */
.production-cards { display: flex; flex-direction: column; gap: 10px; min-height: 40px; margin-bottom: 10px; flex: 1; }

.production-cards-empty {
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 18px 8px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-light);
}

.production-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.production-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.production-card { animation: productionCardSnapIn 0.18s ease; }
@keyframes productionCardSnapIn {
  from { opacity: 0; transform: scale(0.94) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   ARRASTAR ESTILO TRELLO (SortableJS) — classes genéricas usadas em todo
   board que passa por initSortableLists() (Criação, Onboarding/Offboarding,
   Calendário Editorial): o "fantasma" marca onde o card vai cair, o card
   escolhido fica meio apagado no lugar de origem, e o card "flutuante" que
   segue o mouse ganha uma leve inclinação/sombra, igual ao Trello.
   ========================================================================== */
.sortable-ghost {
  opacity: 0.5;
  background: var(--primary-light) !important;
  border: 2px dashed var(--primary) !important;
}
.sortable-ghost * { visibility: hidden; }
/* transition ligada na PRÓPRIA classe de estado (não só no elemento base) —
   assim o "pegar" o card (escala + sombra crescendo) anima suave em vez de
   saltar instantâneo pro estado final, pedido ao vivo do usuário. */
.sortable-chosen {
  cursor: grabbing;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sortable-drag {
  opacity: 0.95 !important;
  transform: rotate(-2deg) scale(1.03);
  box-shadow: var(--shadow-lg) !important;
  cursor: grabbing;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.sortable-fallback {
  opacity: 0.95 !important;
  transform: rotate(-2deg) scale(1.03);
  box-shadow: var(--shadow-lg) !important;
}

/* Capa do card (pack ou post) — imagem/identidade sangrando até a borda do
   card, "estilo Trello". Só aparece quando o toggle "Mostrar capas" está
   ligado; card sem imagem/anexo disponível simplesmente não ganha capa. */
.production-card-cover {
  position: relative;
  margin: -12px -12px 10px -12px;
  height: 92px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.production-card-cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.production-card-cover-client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.9);
  color: var(--text-main);
  font-weight: 800;
  font-size: 16px;
  z-index: 1;
}
.production-card-cover-client-avatar img { position: static; border-radius: 0; }
.production-card-cover-hover-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-align: center;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
}
.production-card-cover:hover .production-card-cover-hover-label { opacity: 1; }

.production-card-add-people {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.production-card:hover .production-card-add-people { opacity: 1; pointer-events: auto; }
.production-card-add-people:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.production-card-add-people .material-symbol { font-size: 14px; }

.production-card-client {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-card-client .material-symbol { font-size: 13px; }
.production-card-title { font-weight: 700; font-size: 13px; }

.production-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.production-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
}

.production-card-cycle {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

.production-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.production-card-footer-left { display: flex; align-items: center; gap: 10px; }

.production-card-docs {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.production-card-docs .material-symbol { font-size: 14px; }

.production-card-comments {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.production-card-comments .material-symbol { font-size: 14px; }

.production-card-urgent { color: #c62828; display: flex; }
.production-card-urgent .material-symbol { font-size: 16px; }

.btn-add-pack {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-add-pack:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.production-tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.production-tag-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  color: #fff;
}

.production-tag-option .tag-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.production-tag-option.selected { border-color: var(--text-main); }
.production-tag-option:not(.selected) { opacity: 0.55; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-picker-item {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  cursor: pointer;
  border: 2px solid transparent;
}
.avatar-picker-item.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* ==========================================================================
   RICH TEXT (Briefing / Legenda / Briefings do Carrossel)
   ========================================================================== */
.rich-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 6px;
}

.rich-toolbar-select {
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  padding: 4px 6px;
  cursor: pointer;
}

.rich-toolbar-divider { width: 1px; height: 18px; background: var(--border-color); margin: 0 4px; }

.rich-toolbar-btn {
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.rich-toolbar-btn:hover { background: var(--bg-surface); color: var(--primary); }
.rich-toolbar-btn.italic { font-style: italic; }
.rich-toolbar-btn.underline { text-decoration: underline; }

.rich-editable {
  min-height: 90px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: var(--font-sans);
  color: var(--text-main);
  outline: none;
  line-height: 1.6;
}

.rich-editable:focus { background: var(--bg-surface); border-color: var(--primary); }
.rich-editable:empty::before { content: attr(data-placeholder); color: var(--text-light); }

.emoji-picker-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  width: 200px;
}

.emoji-picker-item {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer; font-size: 16px;
}
.emoji-picker-item:hover { background: var(--bg-input); }

/* ==========================================================================
   ANEXOS
   ========================================================================== */
.attachments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.attachment-item {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.attachment-item img { width: 100%; height: 100%; object-fit: cover; }
.attachment-item .material-symbol { font-size: 24px; color: var(--text-light); }

.attachment-item-name {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 31, 26, 0.7);
  color: #fff;
  font-size: 9.5px;
  padding: 3px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-item-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(10, 31, 26, 0.75);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 12px;
}
.attachment-item-remove .material-symbol { font-size: 13px; color: #fff; }

/* ==========================================================================
   CARROSSEL — BRIEFINGS
   ========================================================================== */
.carousel-briefing-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  background: var(--bg-surface);
  cursor: grab;
}

.carousel-briefing-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.carousel-briefing-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.carousel-briefing-card-actions { display: flex; gap: 2px; }
.carousel-briefing-card-actions .icon-action-btn { width: 26px; height: 26px; }
.carousel-briefing-card-actions .material-symbol { font-size: 15px; }

/* ==========================================================================
   CARROSSEL — MÍDIAS
   ========================================================================== */
.carousel-main-preview {
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  margin-bottom: 12px;
}

.carousel-main-preview img { width: 100%; height: 100%; object-fit: cover; }

.carousel-thumbs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.carousel-thumb {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: grab;
  background: var(--bg-input);
}

.carousel-thumb.active { border-color: var(--primary); }
.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; }

.carousel-thumb-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  padding: 2px 0;
  letter-spacing: 0.3px;
}

.carousel-thumb-remove {
  position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(10, 31, 26, 0.75);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.carousel-thumb-remove .material-symbol { font-size: 12px; color: #fff; }

/* ==========================================================================
   AJUSTAR CAPA DO FEED
   ========================================================================== */
.icon-action-btn.toggled {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.feed-cover-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 31, 26, 0.4);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

#pack-feed-preview-grid.cover-edit-active .feed-preview-slot:hover .feed-cover-edit-overlay {
  display: flex;
}

.cover-adjust-crop-area {
  position: relative;
  aspect-ratio: 1080 / 1440;
  width: 100%;
  background: #111;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.cover-adjust-crop-area.dragging { cursor: grabbing; }

.cover-adjust-crop-area img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cover-adjust-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  pointer-events: none;
}

.cover-adjust-grid span {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   EMITIR ROTEIRO
   ========================================================================== */
.roteiro-option-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.roteiro-option-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.roteiro-option-card.selected { border-color: var(--primary); background: var(--primary-light); }

.roteiro-option-card .material-symbol {
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 8px;
}

.roteiro-option-title { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.roteiro-option-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ==========================================================================
   VISÃO DE CALENDÁRIO DO PACK
   ========================================================================== */
.pack-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.pack-calendar-weekday {
  background: var(--bg-surface);
  padding: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.pack-calendar-day {
  background: var(--bg-surface);
  min-height: 110px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.15s ease;
}

.pack-calendar-day.muted { background: var(--bg-input); }
.pack-calendar-day.drag-over { background: var(--primary-light); }

.pack-calendar-day-number {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
}

.pack-calendar-day.muted .pack-calendar-day-number { color: var(--text-light); }

.pack-calendar-day.today .pack-calendar-day-number {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
}

/* flex:1 pelo mesmo motivo do .production-cards: sem isso, num dia com
   poucos ou nenhum post a área de soltar de verdade era só uma faixinha no
   topo da célula, não a célula inteira (achado ao vivo do usuário no
   Calendário Editorial). */
.pack-calendar-day-posts { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.pack-calendar-post-card {
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 10.5px;
  cursor: grab;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  animation: calendarPostSnapIn 0.18s ease;
}
@keyframes calendarPostSnapIn {
  from { opacity: 0; transform: scale(0.92) translateY(-3px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.pack-calendar-post-card:hover { transform: translateY(-1px); }
.pack-calendar-post-card.dragging { opacity: 0.4; }

.pack-calendar-post-title {
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-calendar-post-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 700;
  margin-top: 2px;
}

.pack-calendar-post-meta .material-symbol { font-size: 12px; }
.pack-calendar-post-meta .post-calendar-time { margin-left: auto; opacity: 0.85; }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 26, 0.9);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox-backdrop.active { display: flex; }

.lightbox-backdrop img {
  max-width: 82vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); color: #fff; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); color: #fff; }
.lightbox-nav-prev { left: 24px; }
.lightbox-nav-next { right: 24px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   SELEÇÃO EM MASSA
   ========================================================================== */
.bulk-action-bar {
  position: fixed;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--tk-green-dark);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  color: #fff;
  flex-wrap: wrap;
  z-index: 900;
}

.bulk-action-bar .btn-outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.bulk-action-bar .btn-outline:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.bulk-action-bar .icon-action-btn { color: #fff; }
.bulk-action-bar .icon-action-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* ==========================================================================
   LINHA DE POST — checkbox de seleção, drag handle, alerta de data
   ========================================================================== */
.post-row-checkbox {
  width: 16px; height: 16px;
  flex-shrink: 0;
}

.post-row-drag-handle {
  cursor: grab;
  color: var(--text-light);
  display: flex;
  flex-shrink: 0;
}
.post-row-drag-handle .material-symbol { font-size: 16px; }

.post-row .post-row-drag-handle,
.post-row .post-row-checkbox,
.post-row .item-row-actions {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.post-row:hover .post-row-drag-handle,
.post-row:hover .post-row-checkbox,
.post-row:hover .item-row-actions {
  opacity: 1;
  pointer-events: auto;
}

.post-row .post-row-checkbox:checked {
  opacity: 1;
  pointer-events: auto;
}

.post-date-warning {
  color: #c62828;
  display: inline-flex;
  flex-shrink: 0;
}
.post-date-warning .material-symbol { font-size: 15px; }

/* ==========================================================================
   DETALHE DO POST — sidebar de navegação + drawer de ajustes/comentários
   ========================================================================== */
.post-nav-sidebar {
  width: 260px;
  flex-shrink: 0;
  animation: fadeIn 0.2s ease;
}

.post-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
}

.post-nav-item:hover { background: var(--bg-input); }
.post-nav-item.active { background: var(--primary-light); font-weight: 700; }

.post-nav-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
}

.post-nav-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-nav-item .material-symbol.post-nav-check {
  font-size: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

.post-adjustments-drawer {
  position: relative;
  width: 440px;
  max-width: 90vw;
  flex-shrink: 0;
  max-height: 80vh;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

.post-adjustments-drawer .config-tabs-nav { flex-wrap: nowrap; gap: 4px; }
.post-adjustments-drawer .config-nav-btn { padding: 12px 8px; white-space: nowrap; }

/* Drawer da Demanda Extra fica "tela inteira verticalmente" — acompanha o
   scroll da página em vez de encolher para caber no conteúdo, diferente do
   drawer do pack/post normal (que só cresce até 80vh). */
#demand-adjustments-drawer {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
}

.drawer-tabs-scroller { overflow-x: auto; padding-right: 40px; }

.drawer-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  z-index: 2;
  background: var(--bg-surface);
}

.mention {
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}
.mention:hover { text-decoration: underline; }

.comment-input-field { height: 32px; padding: 0 14px; }

/* ==========================================================================
   GERENCIAR COLUNAS — CRUD do pipeline
   ========================================================================== */
.manage-columns-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  overflow: hidden;
}

.manage-columns-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-input);
}

.manage-columns-section-body { padding: 4px; }

.manage-columns-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
}
.manage-columns-row:hover { background: var(--bg-input); }

.manage-columns-drag-handle {
  font-size: 16px;
  color: var(--text-light);
  cursor: grab;
  flex-shrink: 0;
}

.manage-columns-color-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border-color);
}

/* Item 42 do audit: "gatilho" de cor no modal de Nova Tarefa da Pauta —
   maior que o dot de coluna (é o controle principal aqui, não um acessório
   dentro de uma linha densa). Sem cor selecionada, mostra um ícone de
   paleta tracejado em vez de ficar em branco sem explicação nenhuma. */
.pauta-task-color-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border-color);
  display: flex; align-items: center; justify-content: center;
}
.pauta-task-color-dot.is-empty {
  background: var(--bg-input);
  border: 2px dashed var(--border-color);
  box-shadow: none;
  color: var(--text-light);
}
.pauta-task-color-dot.is-empty .material-symbol { font-size: 15px; }

/* Paleta de cores customizada (colunas/sessões de Onboarding, tags de
   destaque da Pauta) — grade em degradê vertical por família horizontal,
   recentes no topo, "+" abre o seletor nativo completo. */
.color-swatch-recent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.color-swatch-grid {
  display: flex;
  gap: 5px;
}

.color-swatch-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.color-swatch-cell {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s ease;
  flex-shrink: 0;
}

.color-swatch-cell:hover { transform: scale(1.15); }

.color-swatch-cell.selected {
  border-color: var(--text-main);
  box-shadow: 0 0 0 1px var(--bg-surface) inset;
}

.color-swatch-divider {
  height: 1px;
  background: var(--border-color);
  margin: 12px 0 10px;
}

.color-swatch-custom-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
  background: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  justify-content: center;
}
.color-swatch-custom-btn:hover { background: var(--bg-input); color: var(--text-main); }

/* Seletor de HEX customizado — expande dentro do próprio popover ao clicar
   em "Outra cor (HEX)" (item 61 do audit: nada de <input type="color">
   nativo do navegador, preso no canto da tela). Quadrado de
   saturação/brilho + barra de matiz + campo HEX, inspirado no padrão
   Canva/Figma mas no tamanho compacto do resto do sistema. */
.color-swatch-sv-square {
  position: relative;
  width: 100%;
  height: 110px;
  border-radius: var(--radius-sm);
  cursor: crosshair;
  overflow: hidden;
  margin-bottom: 10px;
  touch-action: none;
}
.color-swatch-sv-white-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
  pointer-events: none;
}
.color-swatch-sv-black-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
  pointer-events: none;
}
.color-swatch-sv-cursor {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.color-swatch-hue-slider {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  cursor: pointer;
  margin-bottom: 12px;
  touch-action: none;
}
.color-swatch-hue-cursor {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  background: transparent;
  pointer-events: none;
}
.color-swatch-hex-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-swatch-hex-preview {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--border-color);
}
.color-swatch-hex-row .input-control {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  padding: 6px 8px;
  text-transform: lowercase;
}
.color-swatch-hex-ok {
  padding: 6px 12px;
  font-size: 12.5px;
  flex-shrink: 0;
}

/* ==========================================================================
   FEEDBACK VISUAL DE ARRASTAR (lista de posts / preview do feed)
   ========================================================================== */
.post-row,
.feed-preview-slot,
.carousel-briefing-card,
.carousel-thumb {
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.post-row.dragging,
.feed-preview-slot.dragging,
.carousel-briefing-card.dragging,
.carousel-thumb.dragging {
  opacity: 0.4;
}

.post-row.drag-over-top { box-shadow: inset 0 2px 0 0 var(--primary); }
.post-row.drag-over-bottom { box-shadow: inset 0 -2px 0 0 var(--primary); }

/* Responsive Grid */
@media (max-width: 1024px) {
  .chat-side-panel { display: none; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .dash-bar-row { grid-template-columns: 110px 1fr 28px; gap: 8px; }
}

/* ==========================================================================
   RELATÓRIO DE CONTEÚDO — página pública somente leitura (?relatorio=<id>)
   ========================================================================== */
#view-relatorio-publico {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-page);
  z-index: 10000;
  font-family: var(--font-sans);
  flex-direction: column;
}

#view-portal-publico {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-page);
  z-index: 10000;
  font-family: var(--font-sans);
  flex-direction: column;
  overflow-y: auto;
}

#portal-publico-invalid { margin: 12vh auto 0; max-width: 420px; width: calc(100% - 40px); padding: 24px; }

#portal-publico-gate {
  max-width: 380px;
  width: calc(100% - 40px);
  margin: 12vh auto 0;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.portal-publico-gate-title { font-weight: 800; font-size: 20px; margin-bottom: 6px; color: var(--text-main); }
.portal-publico-gate-subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
#portal-publico-gate-error { color: #c62828; font-size: 12.5px; margin-bottom: 10px; }

/* Cartão reaproveitado pelo Modo TV público (#tv-publico-gate/#tv-publico-selector) */
.portal-publico-gate-card {
  max-width: 380px;
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

#view-tv-publico {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-page);
  z-index: 10000;
  font-family: var(--font-sans);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

/* Página pública — capa em degradê + cartão sobreposto com avatar, mesma
   estrutura da Pautta real (confirmado ao vivo, 2026-08-30): antes disso
   nosso portal era só um cartão centralizado sem capa nenhuma. */
#portal-publico-content { width: 100%; }
.portal-publico-cover { height: 130px; background: linear-gradient(135deg, color-mix(in srgb, var(--secondary) 35%, transparent), color-mix(in srgb, var(--secondary) 10%, transparent) 55%, var(--secondary)); }
.portal-publico-page-inner { max-width: 900px; margin: 0 auto; padding: 0 20px 40px; }
.portal-publico-footer { text-align: center; padding: 28px 0 4px; opacity: 0.55; }
.portal-publico-footer img { height: 18px; object-fit: contain; }
.portal-publico-footer span { font-family: var(--font-serif); font-size: 13px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-main); }
.portal-publico-header { display: flex; align-items: center; gap: 14px; margin: -34px 0 20px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 16px 20px; box-shadow: var(--shadow-md); position: relative; z-index: 1; }
.portal-publico-header > div { font-weight: 800; font-size: 20px; color: var(--text-main); }
#portal-publico-client-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--bg-input); border: 4px solid var(--bg-surface); overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; color: var(--text-muted); flex-shrink: 0; margin-top: -30px; box-shadow: var(--shadow-sm); }
#portal-publico-client-icon img { width: 100%; height: 100%; object-fit: cover; }

.portal-publico-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.portal-publico-tab { background: none; border: none; padding: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.portal-publico-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

.portal-publico-entrega-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.portal-publico-entrega-name { font-weight: 800; font-size: 16px; color: var(--text-main); }
.portal-publico-entrega-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.portal-publico-entrega-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.portal-publico-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.portal-publico-progress-bar { width: 80px; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.portal-publico-progress-fill { height: 100%; background: #2e7d32; }

.portal-publico-filter-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border-color); margin-bottom: 12px; }
.portal-publico-filter-tab { background: none; border: none; padding: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.portal-publico-filter-tab.active { color: var(--text-main); border-bottom-color: var(--primary); font-weight: 700; }

/* Barra de status (pílula) + selo circular no canto da miniatura — usado
   nas linhas da lista e nas grades (interna e pública). Confirmado ao vivo,
   pixel a pixel: é uma pílula à esquerda da miniatura, não uma borda; o selo
   é um ícone branco sobre um círculo colorido, não o inverso. */
.portal-status-bar-pill { width: 4px; border-radius: 999px; flex-shrink: 0; }
.portal-status-badge { position: absolute; top: 2px; right: 2px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 0 0 2px var(--bg-surface); }

.portal-publico-posts-layout { display: flex; gap: 24px; align-items: flex-start; }
#portal-publico-post-rows { flex: 1; min-width: 0; max-height: 420px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }
#portal-publico-post-rows::-webkit-scrollbar, #portal-instagram-preview-grid::-webkit-scrollbar { width: 6px; }
#portal-publico-post-rows::-webkit-scrollbar-track, #portal-instagram-preview-grid::-webkit-scrollbar-track { background: transparent; }
#portal-publico-post-rows::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 999px; }
#portal-instagram-preview-grid::-webkit-scrollbar-thumb { background: #444; border-radius: 999px; }
.portal-publico-post-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.portal-publico-post-row:hover { background: var(--bg-input); }
.portal-publico-post-row.selected { background: var(--primary-light); }
.portal-publico-post-row-icon { position: relative; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--bg-input); display: flex; align-items: center; justify-content: center; color: var(--text-light); flex-shrink: 0; overflow: visible; }
.portal-publico-post-row-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.portal-publico-post-row-title { font-weight: 700; font-size: 13px; }
.portal-publico-post-row-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }

/* "Visualização do Feed" — repaginado (2026-08-30): mais respiro entre as
   miniaturas, cantos mais arredondados, rótulo com ícone, e a proporção
   fixa 1080×1440 (a mesma dos posts de feed) em vez de quadrado — assim
   Stories/Reels não ficam "cada um de um tamanho", igual ao grid real do
   Instagram, que sempre recorta pro mesmo formato na grade do perfil. */
.portal-publico-feed-panel { width: 232px; flex-shrink: 0; }
.portal-publico-feed-label { font-size: 11px; font-weight: 800; letter-spacing: 0.3px; color: var(--text-light); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.portal-publico-feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.portal-publico-feed-grid-item { position: relative; aspect-ratio: 1080 / 1440; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--text-light); overflow: hidden; cursor: pointer; transition: opacity 0.15s; }
.portal-publico-feed-grid-item:hover { opacity: 0.85; }
.portal-publico-feed-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portal-publico-feed-grid-item-placeholder { font-size: 9px; text-align: center; padding: 4px; }

/* Modal de detalhe do post — a mídia se autoajusta à proporção real do
   tipo de post (1080×1440 pra feed/carrossel, 1080×1920 pra Story/Reels)
   com object-fit:contain, então a imagem nunca fica cortada — antes era
   uma caixa quadrada fixa que recortava qualquer post vertical. */
.portal-publico-post-media { width: 300px; flex-shrink: 0; background: var(--bg-input); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 13px; overflow: hidden; aspect-ratio: 1080 / 1440; }
.portal-publico-post-media.format-vertical { aspect-ratio: 1080 / 1920; }
.portal-publico-post-media img, .portal-publico-post-media video { width: 100%; height: 100%; object-fit: contain; }

.portal-instagram-preview-grid-item { aspect-ratio: 1080 / 1440; background: #1a1a1a; overflow: hidden; }
.portal-instagram-preview-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
#portal-instagram-preview-grid { scrollbar-width: thin; scrollbar-color: #444 transparent; }

.portal-publico-post-chat { width: 280px; flex-shrink: 0; border-left: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 16px; }
#portal-publico-post-chat-messages { flex: 1; overflow-y: auto; min-height: 120px; max-height: 280px; }
.portal-publico-post-chat-composer { display: flex; gap: 8px; border-top: 1px solid var(--border-color); padding-top: 10px; margin-top: 10px; }
.portal-publico-post-chat-composer textarea { flex: 1; resize: none; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px; font-family: var(--font-sans); font-size: 12.5px; }
.portal-publico-post-chat-composer button { background: var(--primary); color: var(--on-primary); border: none; border-radius: var(--radius-sm); width: 34px; flex-shrink: 0; cursor: pointer; }

/* Chat por post com resposta (pedido do usuário, 2026-09-03) */
.portal-publico-chat-reply-preview { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg-input); border-radius: var(--radius-sm); padding: 6px 10px; margin-top: 10px; }
.portal-publico-chat-reply-quote { background: var(--bg-input); border-left: 2px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 4px 8px; margin-bottom: 4px; font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-publico-chat-reply-btn { font-size: 10.5px; font-weight: 700; color: var(--text-light); cursor: pointer; margin-top: 2px; }
.portal-publico-chat-reply-btn:hover { color: var(--primary); }

.portal-publico-calendar-header { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.3px; color: var(--text-light); margin-bottom: 14px; }
.portal-publico-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
.portal-publico-calendar-daylabel { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 8px 0; background: var(--bg-input); border-bottom: 1px solid var(--border-color); }
/* Altura fixa (não min-height solto) + card de prévia sempre do mesmo
   tamanho (só 1 por dia, título+meta truncados numa linha cada) — antes
   cards com texto mais longo esticavam a célula e deixavam o mês "torto",
   confirmado ao vivo contra a Pautta que ela nunca deixa isso acontecer. */
.portal-publico-calendar-cell { height: 92px; border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 6px; font-size: 11px; color: var(--text-muted); overflow: hidden; }
.portal-publico-calendar-cell.muted { background: var(--bg-input); color: var(--text-light); }
.portal-publico-calendar-cell-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.portal-publico-calendar-daynum { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.portal-publico-calendar-count-badge { display: flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; border-radius: 999px; background: var(--primary); color: var(--bg-surface); font-size: 9.5px; font-weight: 700; padding: 0 3px; }
.portal-publico-calendar-post-card { background: var(--bg-input); border-left: 4px solid var(--primary); border-radius: 4px; padding: 3px 5px; margin-top: 4px; font-size: 10px; cursor: pointer; overflow: hidden; }
.portal-publico-calendar-post-card-title { font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-publico-calendar-post-card-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 760px) {
  .portal-publico-posts-layout { flex-direction: column; }
  .portal-publico-feed-panel { width: 100%; }
  #modal-portal-publico-post .modal-box > div[style*="display:flex"] { flex-direction: column; }
}

.relatorio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.relatorio-header-left { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.relatorio-title { font-size: 19px; font-weight: 800; color: var(--primary); }
.relatorio-month { font-size: 13px; font-weight: 700; color: var(--text-main); margin-top: 2px; }

.relatorio-client-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 20px;
  border-left: 1px solid var(--border-color);
}

.relatorio-client-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary);
  color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.relatorio-client-avatar img { width: 100%; height: 100%; object-fit: cover; }

.relatorio-header-right { display: flex; align-items: center; gap: 12px; }

.relatorio-switch {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}
.relatorio-switch button {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 12.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.relatorio-switch button.active { background: var(--primary); color: var(--on-primary); }

.relatorio-body { display: flex; flex: 1; min-height: 0; }

.relatorio-posts-col {
  width: 46%;
  max-width: 620px;
  min-width: 320px;
  overflow-y: auto;
  padding: 28px 32px;
  border-right: 1px solid var(--border-color);
}

.relatorio-side-col {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 28px 32px;
}

.relatorio-post-item { padding: 18px 0; }
.relatorio-post-item:first-child { padding-top: 0; }

.relatorio-post-title { font-weight: 800; font-size: 14px; margin-bottom: 10px; }

.relatorio-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.relatorio-tag-type {
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.relatorio-post-date {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.relatorio-post-date .material-symbol { font-size: 14px; }

.relatorio-post-cover {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: block;
}

.relatorio-field { font-size: 12.5px; margin-bottom: 10px; }
.relatorio-field strong { color: var(--primary); display: block; margin-bottom: 4px; }

.relatorio-chip {
  display: inline-block;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  margin: 0 4px 4px 0;
}

.relatorio-divider { border: none; border-top: 1px solid var(--border-color); margin: 0; }

.relatorio-grade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.relatorio-grade-slot {
  aspect-ratio: 1080 / 1440;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-input);
}
.relatorio-grade-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.relatorio-print-view { display: none; }

@media print {
  #view-relatorio-publico { position: static; display: block !important; }
  .relatorio-header-right,
  .relatorio-live-view { display: none !important; }
  .relatorio-print-view { display: block !important; padding: 32px; }
}

/* ==========================================================================
   ACADEMY — wiki interno (seções > páginas > subpáginas) + editor rich-text
   ========================================================================== */
#view-academy { padding: 0; height: calc(100vh - 100px); }

.academy-layout {
  display: flex;
  height: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}

.academy-sidebar {
  position: relative;
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.15s ease;
}
.academy-sidebar.narrow { width: 152px; }
.academy-sidebar.narrow .academy-sidebar-greeting { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.academy-sidebar.narrow #btn-academy-new-section,
.academy-sidebar.narrow #btn-academy-reorder-mode { display: none; }
.academy-sidebar.narrow .academy-doc-title { white-space: normal; line-height: 1.3; }
.academy-sidebar.narrow .academy-doc-row { align-items: flex-start; }

.academy-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
}
.academy-sidebar-greeting { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.academy-sidebar-header-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.academy-sidebar-header-actions .icon-action-btn.active { background: var(--primary-light); color: var(--primary); }

.academy-sidebar-tree { flex: 1; overflow-y: auto; padding: 8px 6px 16px; }

.academy-section-block { margin-bottom: 6px; }
.academy-section-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 8px 8px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-light);
}
.academy-section-header:hover { background: var(--bg-input); }
.academy-section-chevron { transition: transform 0.15s ease; }
.academy-section-chevron.collapsed { transform: rotate(-90deg); }
.academy-section-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.academy-row-actions { opacity: 0; flex-shrink: 0; transition: opacity 0.1s ease; }
.academy-section-header:hover .academy-row-actions,
.academy-doc-row:hover .academy-row-actions { opacity: 1; }

.academy-doc-tree { display: flex; flex-direction: column; }
.academy-doc-children { display: flex; flex-direction: column; }

.academy-doc-row-wrap { display: flex; flex-direction: column; }
.academy-doc-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
}
.academy-doc-row:hover { background: var(--bg-input); }
.academy-doc-row.active { background: var(--primary-light); color: var(--primary); }
.academy-doc-row.selected { background: var(--primary-light); }
.academy-doc-emoji { font-size: 14px; flex-shrink: 0; }
.academy-doc-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.academy-doc-lock { color: var(--text-light); flex-shrink: 0; }

.academy-select-checkbox {
  width: 17px; height: 17px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}
.academy-select-checkbox.checked { background: var(--primary); border-color: var(--primary); }

.academy-selection-bar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  padding: 7px 8px 7px 14px;
  z-index: 50;
  white-space: nowrap;
}
.academy-selection-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.academy-selection-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.academy-selection-btn:hover { background: var(--bg-input); }
.academy-selection-btn-danger { background: #c62828; border-color: #c62828; color: #ffffff; }
.academy-selection-btn-danger:hover { background: #a01f1f; }

.academy-add-page-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}
.academy-add-page-btn:hover { background: var(--bg-input); color: var(--primary); }

.academy-move-group-label { padding: 10px 6px 6px; font-size: 10.5px; font-weight: 800; color: var(--text-light); letter-spacing: 0.4px; }

/* ---- Painel do editor ---- */
.academy-editor-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.academy-editor-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 40px;
}

.academy-editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.academy-editor-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px 6px;
  flex-shrink: 0;
}
.academy-doc-emoji-btn {
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  line-height: 1;
}
.academy-doc-emoji-btn:hover { background: var(--bg-input); }
.academy-doc-title-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  background: transparent;
}
.academy-saved-indicator { font-size: 11px; font-weight: 600; color: #2e7d32; flex-shrink: 0; white-space: nowrap; }
.academy-saved-indicator.saving { color: var(--text-light); }

.academy-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 28px 10px;
  flex-shrink: 0;
}
.academy-tag-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.academy-tag-chip:hover { border-color: var(--primary); color: var(--primary); }
.academy-tag-remove { margin-left: 2px; font-size: 10px; color: var(--text-light); }
.academy-tag-remove:hover { color: #c62828; }
.academy-tag-add-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.academy-tag-add-btn:hover { border-color: var(--primary); color: var(--primary); }
.academy-tag-input {
  border: 1px solid var(--primary);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  width: 130px;
  outline: none;
}

.academy-toolbar {
  display: none;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  max-width: 460px;
  position: fixed;
  z-index: 400;
  top: 0; left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px 6px;
}
.academy-toolbar-dropdown { display: flex; }
.academy-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
}
.academy-toolbar-btn:hover { background: var(--bg-input); }
.academy-toolbar-btn-wide { width: auto; padding: 0 8px; font-size: 12px; font-weight: 600; }
.academy-toolbar-sep { width: 1px; height: 20px; background: var(--border-color); margin: 0 4px; }

.academy-doc-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 28px 60px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-main);
  outline: none;
}
.academy-doc-body h1 { font-size: 24px; font-weight: 800; margin: 20px 0 10px; }
.academy-doc-body h2 { font-size: 20px; font-weight: 800; margin: 18px 0 8px; }
.academy-doc-body h3 { font-size: 17px; font-weight: 700; margin: 16px 0 6px; }
.academy-doc-body h4 { font-size: 15px; font-weight: 700; margin: 14px 0 6px; }
.academy-doc-body p { margin: 0 0 6px; }
.academy-doc-body ul, .academy-doc-body ol { margin: 0 0 6px; padding-left: 24px; }
.academy-doc-body blockquote {
  margin: 10px 0;
  padding: 4px 16px;
  border-left: 3px solid var(--primary);
  color: var(--text-muted);
  font-style: italic;
}
.academy-doc-body hr { border: none; border-top: 1px solid var(--border-color); margin: 20px 0; }
.academy-doc-body a { color: var(--primary); text-decoration: underline; }
.academy-doc-body code, .academy-inline-code {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: "Courier New", monospace;
  font-size: 12.5px;
}
.academy-doc-body img.academy-doc-img { max-width: 100%; border-radius: var(--radius-sm); margin: 10px 0; }
.academy-video-embed { position: relative; width: 100%; max-width: 560px; aspect-ratio: 16/9; margin: 12px 0; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.academy-video-embed iframe { width: 100%; height: 100%; border: none; }
.academy-todo-list { list-style: none; padding-left: 4px; }
.academy-todo-list li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.academy-todo-list input[type="checkbox"] { margin-top: 4px; }
.academy-task-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 2px 10px 2px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.academy-task-chip:hover { filter: brightness(0.95); }

.academy-wiki-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--secondary-light);
  color: var(--secondary);
  border-bottom: 1px dashed var(--secondary);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.academy-wiki-chip:hover { filter: brightness(0.95); }

.academy-emoji-picker { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 10px; width: 260px; }
.academy-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-height: 220px; overflow-y: auto; }
.academy-emoji-item { background: transparent; border: none; font-size: 18px; padding: 5px; border-radius: 6px; cursor: pointer; }
.academy-emoji-item:hover { background: var(--bg-input); }

.academy-color-swatch-row { display: flex; gap: 6px; padding: 2px 10px 8px; }
.academy-color-swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-color); cursor: pointer; }
.academy-color-swatch:hover { transform: scale(1.1); }

/* ---- Permissões: página bloqueada / privada / compartilhada, comentários, auditoria ---- */
.academy-lock-badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; }
.academy-visibility-note {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 28px 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}
#btn-academy-comments { position: relative; }
#academy-comments-count {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--primary);
  color: var(--bg-surface);
  font-size: 9px;
  font-weight: 800;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.academy-comments-section {
  flex-shrink: 0;
  border-top: 1px solid var(--border-color);
  padding: 16px 28px 24px;
  background: var(--bg-sidebar);
}
.academy-comments-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--text-muted); margin-bottom: 10px; }
.academy-comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.academy-comment-row { display: flex; gap: 8px; }
.academy-comment-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.academy-comment-bubble { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px 10px; flex: 1; }
.academy-comment-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.academy-comment-author { font-size: 12px; font-weight: 700; }
.academy-comment-time { font-size: 10.5px; color: var(--text-light); }
.academy-comment-text { font-size: 13px; color: var(--text-main); white-space: pre-wrap; }
.academy-comment-delete { background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 14px; line-height: 1; }
.academy-comment-delete:hover { color: #c62828; }
.academy-comment-composer { display: flex; flex-direction: column; gap: 8px; }
.academy-comment-composer textarea { resize: vertical; min-height: 44px; }
.academy-comment-composer .btn-primary { align-self: flex-end; }
.academy-comments-empty { font-size: 12px; color: var(--text-light); }

.academy-share-visibility-options { display: flex; flex-direction: column; gap: 10px; }
.academy-share-radio-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; }
.academy-share-radio-row input { margin-top: 3px; }
.academy-share-people-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 6px; }
.academy-share-person-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.academy-share-person-row:hover { background: var(--bg-input); }

.academy-audit-list { display: flex; flex-direction: column; gap: 2px; }
.academy-audit-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--border-color); font-size: 12.5px; }
.academy-audit-row:last-child { border-bottom: none; }
.academy-audit-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-input); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-muted); }
.academy-audit-text strong { font-weight: 700; }
.academy-audit-time { font-size: 10.5px; color: var(--text-light); margin-top: 2px; }
.academy-audit-empty { font-size: 12px; color: var(--text-light); text-align: center; padding: 20px; }

/* ==========================================================================
   TAREFAS — catálogo de tipos de tarefa (não é a lista pessoal, que vive em
   Início > Minhas tarefas)
   ========================================================================== */
.task-type-selection-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.task-type-selection-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.task-type-table-header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}
.task-type-col-checkbox { width: 28px; flex-shrink: 0; align-items: center; justify-content: center; }
.task-type-col-sort {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}
.task-type-col-sort:hover { color: var(--text-main); }
.task-type-col-tag { flex: none; width: 220px; }

.task-type-select-checkbox {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
}
.task-type-select-checkbox.checked { background: var(--primary); border-color: var(--primary); }

.task-type-row {
  display: flex;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
}
.task-type-row:last-child { border-bottom: none; }
.task-type-row:hover { background: var(--bg-input); }
.task-type-row.selected { background: var(--primary-light); }
.task-type-col-name { flex: 1; }
.task-type-tag-pill {
  display: inline-block;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.task-type-tag-empty { color: var(--text-light); }
.task-type-row-actions { width: 32px; flex-shrink: 0; text-align: right; }

/* ==========================================================================
   VIEW MODE TOGGLE (Cartões/Lista) — reutilizável, usado em Clientes
   ========================================================================== */
.view-mode-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-mode-btn {
  background: var(--bg-surface);
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}
.view-mode-btn + .view-mode-btn { border-left: 1px solid var(--border-color); }
.view-mode-btn:hover { background: var(--bg-input); }
.view-mode-btn.active { background: var(--primary-light); color: var(--primary); }

/* ==========================================================================
   CLIENTES — visão em lista
   ========================================================================== */
.client-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.client-list-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.client-list-logo {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.client-list-logo img { width: 100%; height: 100%; object-fit: cover; }
.client-list-name-row { display: flex; align-items: center; gap: 8px; }
.client-list-name { font-weight: 700; font-size: 14.5px; }
.client-list-avatars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  cursor: pointer;
  width: fit-content;
}
.client-list-avatars-caret { font-size: 15px; color: var(--text-light); }
.client-list-row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.client-list-expand {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 14px 18px 18px;
  margin-top: -10px;
  margin-bottom: 10px;
}
.client-list-expand-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.client-list-expand-icons { display: flex; align-items: center; gap: 4px; }
.client-list-team-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.client-team-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}
.client-team-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ==========================================================================
   TIME — cards + página de perfil do colaborador
   ========================================================================== */
.team-card { cursor: pointer; transition: box-shadow 0.15s ease, transform 0.1s ease; }
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.team-role-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.team-clients-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}
.team-clients-dropdown-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Pedido do usuário (2026-09-02): a tela de perfil (Time > ver colaborador
   e Meu Perfil, ambas reaproveitando .team-profile-*) esticava 100% da
   largura da tela — igual à Pautta real, fica centralizada com largura
   máxima. */
#time-profile-view, #meuperfil-view-mode {
  max-width: 720px;
  margin: 0 auto;
}

.team-profile-banner {
  height: 130px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(120deg, #c9d9f2, #cdeee0);
  position: relative;
}
.team-profile-avatar {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px;
  border: 4px solid #ffffff;
}
.team-profile-header-card {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border-top: none;
  text-align: center;
  padding-top: 44px;
  margin-bottom: 16px;
}
.team-profile-header-card h2 { font-size: 18px; font-weight: 800; margin: 0; }
.team-profile-header-card p { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }

.team-profile-tabs { border-bottom: 1px solid var(--border-color); margin-bottom: 20px; display: flex; justify-content: center; }
.team-profile-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 4px;
  font-size: 13px; font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.team-profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.team-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.team-profile-grid h4 { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; margin: 0 0 8px; }
.team-profile-placeholder { font-size: 12.5px; color: var(--text-light); font-style: italic; margin: 0; }

.team-profile-clients-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.team-profile-client-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  overflow: hidden;
  cursor: default;
}
.team-profile-client-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   PAUTA — grade semanal de tarefas por colaborador (clone da Pautta real)
   ========================================================================== */
.pauta-header-gradient {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  padding: 20px 24px 16px;
  margin-bottom: 20px;
  color: var(--on-primary);
}
.pauta-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pauta-header-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; opacity: 0.85; margin-bottom: 2px; }
.pauta-header-title { font-size: 20px; font-weight: 800; margin: 0; color: var(--on-primary); }
.pauta-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pauta-cycle-btn {
  background: color-mix(in srgb, var(--on-primary) 16%, transparent) !important;
  border-color: color-mix(in srgb, var(--on-primary) 35%, transparent) !important;
  color: var(--on-primary) !important;
  display: flex; align-items: center; gap: 6px;
}
.pauta-cycle-btn:hover { background: color-mix(in srgb, var(--on-primary) 26%, transparent) !important; }
.pauta-search-box {
  display: flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--on-primary) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-primary) 35%, transparent);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  min-width: 220px;
}
.pauta-search-box .material-symbol { font-size: 18px; opacity: 0.85; }
.pauta-search-box input {
  background: transparent; border: none; outline: none; color: var(--on-primary);
  font-size: 13px; flex: 1;
}
.pauta-search-box input::placeholder { color: color-mix(in srgb, var(--on-primary) 75%, transparent); }

.pauta-toolbar { display: flex; align-items: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pauta-toolbar .icon-action-btn { background: color-mix(in srgb, var(--on-primary) 14%, transparent); color: var(--on-primary); position: relative; }
.pauta-toolbar .icon-action-btn:hover { background: color-mix(in srgb, var(--on-primary) 26%, transparent); }
.pauta-toolbar .icon-action-btn.toggled { background: var(--bg-surface); color: var(--primary); }

.pauta-provisionar-banner {
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--on-primary) 16%, transparent);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 12px;
  font-size: 12.5px; font-weight: 600;
}
.pauta-provisionar-banner .btn-outline { background: var(--bg-surface) !important; color: var(--primary) !important; border: none !important; padding: 4px 10px; }

.pauta-week-section { margin-bottom: 18px; }
.pauta-week-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px;
  cursor: pointer;
  font-weight: 800; font-size: 13px;
  color: var(--text-main);
}
.pauta-week-header .material-symbol { font-size: 20px; color: var(--text-muted); }
.pauta-week-header-range { color: var(--text-muted); font-weight: 600; font-size: 12px; }

.pauta-grid { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-surface); }
.pauta-grid-inner { display: grid; grid-template-columns: 180px repeat(5, minmax(160px, 1fr)); min-width: 980px; }
.pauta-grid-corner, .pauta-grid-daycol-header {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 8px 10px;
  font-size: 11.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase;
}
.pauta-grid-daycol-header { text-align: center; }
.pauta-grid-daycol-header .pauta-daycol-date { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-light); text-transform: none; margin-top: 1px; }
.pauta-grid-collab-cell {
  position: sticky; left: 0; z-index: 1;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 10px;
  display: flex; align-items: center; gap: 8px;
}
.pauta-collab-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 12px;
  flex-shrink: 0;
}
.pauta-collab-info { min-width: 0; }
.pauta-collab-name { font-size: 12.5px; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pauta-collab-role { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pauta-grid-day-cell {
  position: relative;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 6px;
  min-height: 64px;
  display: flex; flex-direction: column; gap: 5px;
  transition: background 0.12s, outline-color 0.12s;
}
/* Feedback de arrastar (item 58), mesmo tratamento do board de Onboarding
   (item 28): borda tracejada na célula de destino + "encaixe" suave no card
   ao soltar. */
.pauta-grid-day-cell.drag-over {
  background: var(--primary-light);
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
}
.pauta-grid-day-cell.is-today { background: var(--bg-input); }
.pauta-grid-add-btn {
  display: none; align-items: center; justify-content: center;
  width: 100%; padding: 4px; border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color); background: transparent; color: var(--text-light); cursor: pointer;
}
.pauta-grid-day-cell:hover .pauta-grid-add-btn { display: flex; }

.pauta-task-card {
  background: var(--bg-input);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: grab;
  font-size: 11.5px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  animation: pautaTaskCardSnapIn 0.18s ease;
}
.pauta-task-card.done { opacity: 0.55; }
.pauta-task-card.done .pauta-task-title { text-decoration: line-through; }
.pauta-task-card.dragging { opacity: 0.4; transform: scale(1.03) rotate(-1deg); box-shadow: var(--shadow-md); }
@keyframes pautaTaskCardSnapIn {
  from { opacity: 0; transform: scale(0.94) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.pauta-task-card-top { display: flex; align-items: flex-start; gap: 5px; }
.pauta-task-check {
  width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--border-color);
  flex-shrink: 0; margin-top: 1px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: var(--bg-surface);
}
.pauta-task-check.checked { background: var(--primary); border-color: var(--primary); }
.pauta-task-check.checked .material-symbol { font-size: 10px; color: var(--on-primary); }
/* Checkbox de seleção múltipla (item 43) — mesmo tamanho do check de
   "concluída", mas circular pra não confundir os dois modos visualmente. */
.pauta-task-select-checkbox {
  width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border-color);
  flex-shrink: 0; margin-top: 1px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: var(--bg-surface);
}
.pauta-task-select-checkbox.checked { background: var(--primary); border-color: var(--primary); }
.pauta-task-select-checkbox.checked .material-symbol { font-size: 10px; color: var(--on-primary); }
.pauta-task-card.selected { background: var(--primary-light); outline: 1.5px solid var(--primary); cursor: pointer; }
.pauta-task-title { font-weight: 700; color: var(--text-main); line-height: 1.3; }
.pauta-task-client { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Item 45/46 do audit: "Nova tarefa" saiu do FAB flutuante (que conflitava
   com a bolinha de Atalhos rápidos, no mesmo canto) e virou o primeiro
   botão do cabeçalho — branco sólido sobre o gradiente, mesmo princípio de
   "CTA em destaque" que os outros controles do cabeçalho já usam (só que
   sólido, não translúcido, pra ficar visualmente a mais importante das três). */
.pauta-header-new-task-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--on-primary) !important; color: var(--primary) !important;
  border: none !important; border-radius: var(--radius-sm);
  padding: 8px 14px; font-size: 13px; font-weight: 800; cursor: pointer;
}
.pauta-header-new-task-btn:hover { background: color-mix(in srgb, var(--on-primary) 88%, transparent) !important; }

.pauta-empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.pauta-empty-state .material-symbol { font-size: 40px; color: var(--text-light); margin-bottom: 8px; }

/* Painel "Selecionar dias" — mesmo padrão de calendário custom do app, só que com dois campos De/Até */
.pauta-daterange-panel-actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-color); }

/* Fluxos de Pauta */
.pauta-fluxo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border-color); border-radius: var(--radius-md);
  margin-bottom: 10px; cursor: pointer; background: var(--bg-surface);
}
.pauta-fluxo-row:hover { border-color: var(--primary); }
.pauta-fluxo-row-name { font-weight: 700; font-size: 13.5px; flex: 1; }
.pauta-fluxo-row-steps { font-size: 12px; color: var(--text-muted); }

.pauta-fluxo-step-card {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 10px; position: relative;
}
.pauta-fluxo-step-badge {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 12px;
}
.pauta-fluxo-step-card.is-trigger .pauta-fluxo-step-badge { background: var(--secondary); }
.pauta-fluxo-step-body { flex: 1; display: grid; grid-template-columns: 1fr; gap: 8px; }
.pauta-fluxo-step-connector {
  width: 2px; height: 16px; background: var(--border-color); margin: -6px 0 -6px 26px;
}

.pauta-grid-collab-cell { cursor: pointer; }
.pauta-grid-collab-cell:hover .pauta-collab-name { color: var(--primary); }
.pauta-task-drag { color: var(--text-light); cursor: grab; }
.pauta-task-priority-flag { color: #FA5252; flex-shrink: 0; }
.pauta-task-lastminute-icon { color: #fb8c00; flex-shrink: 0; }
.pauta-task-weekendrisk-icon { color: #c62828; flex-shrink: 0; }
/* Item 48 do audit: a cor de destaque (item 42/tag) já aparecia como uma
   sliver na borda esquerda do card, mas isso não contava como "mostrar a
   tag" — adiciona uma bolinha visível ao lado dos outros ícones também. */
.pauta-task-tag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); }

/* Avisos ao vivo no modal de Nova/Editar Tarefa (prazo em cima da hora,
   prazo caindo no fim de semana) — ver js/modules/tarefas.js renderTaskModalWarnings. */
.task-modal-warning {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.4; margin-bottom: 12px;
}
.task-modal-warning .material-symbol { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.task-modal-warning.tight { background: #fff3e0; color: #b45309; }
.task-modal-warning.weekend { background: #ffebee; color: #b71c1c; font-weight: 600; }

/* ==========================================================================
   PAINÉIS LATERAIS DA PAUTA (Histórico / perfil resumido de colaborador)
   ========================================================================== */
.pauta-side-panel {
  position: fixed; top: 0; right: 0; height: 100vh; width: 380px;
  background: var(--bg-surface); box-shadow: var(--shadow-lg);
  z-index: 5000; overflow: hidden; display: flex; flex-direction: column;
}
.pauta-side-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 18px; color: var(--on-primary); font-weight: 800; font-size: 15px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  flex-shrink: 0;
}
.pauta-side-panel-header .icon-action-btn { color: var(--on-primary); }
.pauta-side-panel-body { padding: 14px 18px; flex: 1; overflow-y: auto; }
.pauta-history-item { padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.pauta-history-item-top { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; }
.pauta-history-item-top .material-symbol { font-size: 16px; }
.pauta-history-item-top.created .material-symbol { color: var(--primary); }
.pauta-history-item-top.done .material-symbol { color: #2e7d32; }
.pauta-history-item-tasktype { font-size: 12px; color: var(--text-main); margin: 4px 0 2px; }
.pauta-history-item-meta { font-size: 11.5px; color: var(--text-muted); }
.pauta-history-item-footer { font-size: 11px; color: var(--text-light); margin-top: 6px; }

.pauta-collab-panel-banner {
  height: 76px;
  background: linear-gradient(120deg, #c9d9f2, #cdeee0);
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 10px; flex-shrink: 0;
}
.pauta-collab-panel-header { text-align: center; padding: 0 18px 14px; margin-top: -34px; }
.pauta-collab-panel-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; border: 4px solid #ffffff;
  margin: 0 auto 8px;
}
.pauta-collab-panel-name { font-weight: 800; font-size: 15px; }
.pauta-collab-panel-role { color: var(--text-muted); font-size: 12.5px; }
.pauta-collab-panel-tabs {
  display: flex; border-bottom: 1px solid var(--border-color); padding: 0 8px; flex-shrink: 0;
}
.pauta-collab-panel-tab {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  padding: 10px 2px; font-size: 11px; font-weight: 700; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
}
.pauta-collab-panel-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.pauta-collab-panel-tab-badge {
  background: var(--bg-input); color: var(--text-muted); flex-shrink: 0;
  border-radius: 999px; font-size: 10px; font-weight: 800; padding: 1px 5px;
}
.pauta-collab-panel-tab.active .pauta-collab-panel-tab-badge { background: var(--primary); color: var(--on-primary); }
.pauta-collab-panel-body { padding: 12px 18px; flex: 1; overflow-y: auto; }
.pauta-collab-panel-task-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--border-color); font-size: 12.5px; cursor: pointer;
}
.pauta-collab-panel-task-row .pauta-task-check { flex-shrink: 0; }

/* Fluxos: pré-visualização da cascata */
.pauta-fluxo-preview-box {
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 16px; background: var(--bg-input);
}
.pauta-fluxo-preview-card {
  width: 160px; flex-shrink: 0; background: var(--bg-surface);
  border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 11.5px;
}
.pauta-fluxo-preview-card.is-trigger { background: var(--primary-light); }
.pauta-fluxo-preview-card-top { display: flex; align-items: center; gap: 5px; font-weight: 800; margin-bottom: 6px; }
.pauta-fluxo-preview-card-badge {
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex-shrink: 0;
}
.pauta-fluxo-preview-card-task { font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.pauta-fluxo-preview-card-assignee { color: var(--text-muted); font-size: 11px; display: flex; align-items: center; gap: 3px; }
.pauta-fluxo-preview-connector { width: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--text-light); margin-top: 20px; }

.pauta-fluxo-step-assignee-modes { display: flex; gap: 2px; }
.pauta-fluxo-step-assignee-modes button {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-muted); cursor: pointer;
}
.pauta-fluxo-step-assignee-modes button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.pauta-fluxo-step-assignee-modes button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.pauta-fluxo-step-assignee-modes button.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.pauta-fluxo-step-offset-input {
  width: 48px; border: 1px solid var(--border-color); border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none; text-align: center; height: 32px; font-size: 12.5px;
}

/* Nome da Tarefa — autocomplete pesquisável com criação inline (Nova Tarefa + passo de Fluxo) */
.pauta-tasktype-option {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
}
.pauta-tasktype-option:hover { background: var(--bg-input); }
.pauta-tasktype-option-create { color: var(--primary); font-weight: 700; }
.pauta-tasktype-section-label {
  font-size: 10.5px; font-weight: 800; color: var(--text-light); text-transform: uppercase;
  padding: 6px 10px 2px;
}
.pauta-tasktype-tag-pill {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; color: #fff; flex-shrink: 0;
}

/* Multi-select de clientes/colaboradores no modal de tarefa */
.pauta-multiselect-trigger {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  min-height: 38px; padding: 6px 10px; cursor: pointer;
}
.pauta-multiselect-chip {
  background: var(--primary-light); color: var(--primary); font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}
.pauta-multiselect-placeholder { color: var(--text-light); font-size: 13px; }

.pauta-color-swatches { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

/* Item 40 do audit: seletor de dias da semana pra recorrência — círculos
   Dom-Sáb, mesmo princípio de toggle-button já usado em vários lugares do
   sistema (ex.: modo de responsável do passo de fluxo). */
.pauta-weekday-picker { display: flex; gap: 6px; }
.pauta-weekday-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-color); background: var(--bg-surface);
  color: var(--text-muted); font-size: 12px; font-weight: 700; cursor: pointer;
}
.pauta-weekday-btn.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ==========================================================================
   PORTAL DO CLIENTE — abas dentro de uma entrega expandida (Posts / Calendário
   / Chat / Histórico / Visualizações), clone da Pautta real
   ========================================================================== */
.portal-delivery-tabs {
  display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border-color);
}
.portal-delivery-tab {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  padding: 8px 4px; margin-right: 14px;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
}
.portal-delivery-tab .material-symbol { font-size: 16px; }
.portal-delivery-tab:hover { color: var(--text-main); }
.portal-delivery-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.portal-calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden;
}
.portal-calendar-weekday {
  background: var(--bg-input); text-align: center; padding: 6px 0;
  font-size: 10.5px; font-weight: 800; color: var(--text-light); text-transform: uppercase;
}
.portal-calendar-cell {
  min-height: 74px; border-top: 1px solid var(--border-color); border-left: 1px solid var(--border-color);
  padding: 4px; font-size: 11px;
}
.portal-calendar-cell:nth-child(7n+1) { border-left: none; }
.portal-calendar-cell.muted { background: var(--bg-input); color: var(--text-light); }
.portal-calendar-daynum { font-weight: 700; margin-bottom: 3px; }
.portal-calendar-post-chip {
  background: var(--primary-light); color: var(--primary); border-radius: 4px;
  padding: 2px 5px; margin-bottom: 2px; font-size: 10px; font-weight: 600;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */
.login-screen { display: flex; height: 100vh; background: var(--bg-page); }
.login-visual {
  flex: 1.3;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: linear-gradient(135deg, var(--tk-green-dark) 0%, var(--primary) 55%, var(--secondary) 100%);
  position: relative; overflow: hidden;
}
.login-visual::before {
  content: ""; position: absolute; inset: -20%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.10), transparent 60%);
}
.login-visual-content { position: relative; color: var(--tk-cream); max-width: 420px; }
.login-visual-logo { font-family: var(--font-serif); font-size: 30px; font-weight: 700; letter-spacing: 1px; margin-bottom: 14px; }
.login-visual-content p { font-size: 15px; line-height: 1.6; opacity: 0.9; }
.login-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form-box { width: 100%; max-width: 340px; text-align: center; }
.login-form-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 24px;
}
.login-form-box h2 { font-size: 21px; }
.login-form-box .form-group { text-align: left; }

@media (max-width: 760px) {
  .login-visual { display: none; }
}

/* ==========================================================================
   MENU DO PERFIL — Atalhos rápidos (botões flutuantes) + seletor de Temas.
   ========================================================================== */
.quick-shortcut-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 500;
}
#quick-shortcut-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quick-shortcut-stack.collapsed #quick-shortcut-buttons { display: none; }
.quick-shortcut-toggle {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--bg-input);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.quick-shortcut-toggle .material-symbol { font-size: 15px; transition: transform 0.2s ease; }
.quick-shortcut-stack.collapsed .quick-shortcut-toggle .material-symbol { transform: rotate(180deg); }
.quick-shortcut-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.quick-shortcut-btn:hover { transform: translateY(-2px) scale(1.05); background: var(--primary-light); }
.quick-shortcut-btn .material-symbol { font-size: 20px; }

/* ==========================================================================
   CHAT FLUTUANTE ("chat heads") — itens 63-68 do audit. Um único container
   fixo, em row-reverse: a primeira/mais recente janela fica mais à direita,
   colada ao lado da pilha de Atalhos; cada nova janela empurra as outras
   pra esquerda. Bolinhas minimizadas e janelas abertas dividem o mesmo fluxo.
   Ver js/modules/floating-chat.js.
   ========================================================================== */
.floating-chat-container {
  position: fixed;
  left: 12px; /* limita a largura total do container — sem isso, com várias
                 janelas abertas (item 68: até 5), elas ultrapassavam a borda
                 esquerda da tela e cobriam a sidebar. Com "left" definido, o
                 flex-shrink (padrão) das janelas passa a valer de verdade. */
  right: 84px;
  bottom: 24px;
  z-index: 499;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  pointer-events: none;
  overflow-x: auto;
}
.floating-chat-container > * { pointer-events: auto; }

.floating-chat-bubble {
  position: relative;
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  overflow: visible;
  animation: floatingChatPop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 0.15s ease;
}
.floating-chat-bubble:hover { transform: translateY(-2px) scale(1.05); }
.floating-chat-bubble-avatar { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.floating-chat-bubble-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.floating-chat-fallback-icon { font-size: 20px; color: var(--primary); }
.floating-chat-bubble-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #c62828;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--bg-page);
}
.floating-chat-bubble-close {
  position: absolute;
  top: -4px; left: -4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--text-muted);
  color: #fff;
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--bg-page);
}
.floating-chat-bubble-close .material-symbol { font-size: 12px; }
.floating-chat-bubble:hover .floating-chat-bubble-close { display: flex; }

.floating-chat-window {
  flex: 0 1 300px;
  min-width: 240px;
  height: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: floatingChatSlideUp 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.floating-chat-window-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border-color);
}
.floating-chat-window-identity { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.floating-chat-window-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.floating-chat-window-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.floating-chat-window-name { font-size: 13px; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floating-chat-window-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.floating-chat-window-actions .icon-action-btn,
.floating-chat-window-header > .icon-action-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.floating-chat-window-actions .icon-action-btn:hover,
.floating-chat-window-header > .icon-action-btn:hover { background: var(--primary-light); color: var(--primary); }
.floating-chat-window-actions .material-symbol,
.floating-chat-window-header > .icon-action-btn .material-symbol { font-size: 17px; }

.floating-chat-window-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.floating-chat-empty { margin: auto; text-align: center; font-size: 12.5px; color: var(--text-light); padding: 20px; }

.floating-chat-message-row { display: flex; align-items: flex-end; gap: 6px; max-width: 88%; }
.floating-chat-message-row.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.floating-chat-message-avatar { width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.floating-chat-message-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.floating-chat-message-bubble { background: var(--bg-input); border-radius: var(--radius-sm); padding: 6px 10px; }
.floating-chat-message-row.is-mine .floating-chat-message-bubble { background: var(--primary); color: var(--on-primary); }
.floating-chat-message-author { font-size: 10.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.floating-chat-message-html { font-size: 12.5px; line-height: 1.45; word-break: break-word; }
.floating-chat-message-time { font-size: 9.5px; opacity: 0.65; margin-top: 2px; text-align: right; }

.floating-chat-window-composer {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border-color);
}
.floating-chat-composer-editable {
  flex: 1;
  min-height: 32px;
  max-height: 90px;
  overflow-y: auto;
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: var(--radius-pill);
}
.floating-chat-send-btn { background: var(--primary); color: var(--on-primary); flex-shrink: 0; }
.floating-chat-send-btn:hover { background: var(--primary-hover); color: #fff; }
.floating-chat-send-btn .material-symbol { font-size: 16px; }

.floating-chat-window-full .floating-chat-search {
  flex-shrink: 0;
  margin: 8px 10px;
  width: calc(100% - 20px);
}
.floating-chat-window-subheader { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border-color); }
.floating-chat-full-list { flex: 1; overflow-y: auto; padding: 4px 6px 10px; }
.floating-chat-full-list-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.floating-chat-full-list-item:hover { background: var(--bg-input); }
.floating-chat-list-avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.floating-chat-list-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.floating-chat-list-name { font-size: 12.5px; color: var(--text-main); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floating-chat-list-badge { position: static; box-shadow: none; }

@keyframes floatingChatPop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes floatingChatSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 720px) {
  .floating-chat-container { right: 12px; }
  .floating-chat-window { width: calc(100vw - 24px); height: 60vh; }
}

.theme-picker { display: flex; gap: 10px; }
.theme-picker-option {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px; font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-picker-option .material-symbol { font-size: 20px; }
.theme-picker-option.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
/* Dentro do menu do perfil (mais estreito) o picker fica compacto */
#profile-menu-theme-picker .theme-picker-option { padding: 8px 4px; font-size: 10.5px; gap: 4px; }

/* ==========================================================================
   E-MAILS (Configurações > E-mails, só admin) — composição
   ========================================================================== */
.email-compose-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-surface-alt, var(--bg-surface));
}
.email-compose-body {
  min-height: 220px;
  max-height: 420px;
  overflow-y: auto;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-main);
  background: var(--bg-surface);
  outline: none;
}
.email-compose-body ul, .email-compose-body ol { padding-left: 22px; margin: 8px 0; }
.email-compose-body a { color: var(--primary); }

/* ==========================================================================
   TOUR DE PRIMEIRO ACESSO — spotlight sobre a tela real + balão de instrução
   (js/modules/tour.js). Recorte feito com box-shadow gigante em vez de
   clip-path, pra funcionar em qualquer formato de elemento sem cálculo extra.
   ========================================================================== */
.tour-spotlight {
  position: fixed;
  z-index: 9000;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}
.tour-tooltip {
  position: fixed;
  z-index: 9001;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,0.25));
  padding: 18px;
  transition: top 0.25s ease, left 0.25s ease;
}
.tour-tooltip-step { font-size: 11px; font-weight: 800; color: var(--text-light); letter-spacing: 0.04em; margin-bottom: 6px; }
.tour-tooltip-title { font-size: 15px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; }
.tour-tooltip-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.tour-tooltip-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-tooltip-skip { background: none; border: none; color: var(--text-light); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 4px; }
.tour-tooltip-skip:hover { color: var(--text-main); }

/* ==========================================================================
   PROGRESSO DE LEITURA DA ACADEMY (admin) — reaproveita .progress-track/.progress-fill
   ========================================================================== */
.academy-read-progress-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.academy-read-progress-row .progress-track { flex: 1; }
.academy-read-progress-pct { font-size: 12px; font-weight: 800; color: var(--text-muted); width: 42px; text-align: right; flex-shrink: 0; }
#profile-menu-theme-picker .theme-picker-option .material-symbol { font-size: 16px; }

/* ==========================================================================
   REPOSITÓRIO DE MÍDIA POR CLIENTE (aba oculta, só Proprietário)
   ========================================================================== */
.repo-breadcrumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; color: var(--text-muted); }
.repo-breadcrumb-item { cursor: pointer; font-weight: 600; }
.repo-breadcrumb-item:hover, .repo-breadcrumb-item.current { color: var(--primary); }
.repo-breadcrumb-sep { color: var(--text-light); }

.repo-dropzone {
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  margin-bottom: 18px;
  color: var(--text-light);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.repo-dropzone.drag-over { border-color: var(--primary); background: var(--primary-light); }

.repo-folder-grid, .repo-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.repo-folder-card, .repo-file-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.repo-folder-card { cursor: pointer; }
.repo-folder-card:hover, .repo-file-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.repo-folder-card.drag-over { border-color: var(--primary); background: var(--primary-light); }
.repo-file-card.dragging { opacity: 0.4; }

.repo-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.repo-card-thumb { width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-input); display: flex; align-items: center; justify-content: center; }
.repo-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.repo-card-name { font-size: 12.5px; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-card-meta { font-size: 11px; color: var(--text-muted); }
.repo-card-keep-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }

.repo-system-attachment-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); margin-bottom: 8px; }
.repo-system-attachment-row:hover { border-color: var(--primary); }

/* ==========================================================================
   EMBLEMAS — catálogo (cards + hover menu) e assistente de atribuição em
   massa, espelhando o mecanismo real auditado ao vivo em
   workspace.pautta.app/emblemas (2026-09-04).
   ========================================================================== */
.badge-section-header { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; margin: 20px 0 12px; color: var(--text-main); }
.badge-section-header .material-symbol { font-size: 18px; color: var(--primary); }
.badge-section-count { font-size: 12px; font-weight: 700; color: var(--text-muted); background: var(--bg-input); border-radius: 20px; padding: 1px 9px; }

/* Grid — colunas FIXAS por breakpoint (2/3/4/5/6), medido ao vivo em
   workspace.pautta.app/emblemas (grid-cols-2 sm:3 md:4 lg:5 xl:6, gap-4).
   Achado real (2026-09-04): a versão anterior usava auto-fill/minmax, que
   deixa cada card esticar pra preencher o espaço quando cabem poucas
   colunas — em telas de laptop comuns isso produzia só 1-2 colunas com
   cards gigantes e esticados. Colunas fixas nunca deixam isso acontecer:
   o pior caso é sempre 2 cards por linha, igual no produto real. */
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 8px; }
@media (min-width: 640px) { .badge-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .badge-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1180px) { .badge-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1500px) { .badge-grid { grid-template-columns: repeat(6, 1fr); } }

.badge-card { position: relative; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px 16px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.badge-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md, 0 4px 14px rgba(0,0,0,0.08)); }
.badge-card-icon { width: 72px; height: 72px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge-card-icon img { width: 100%; height: 100%; object-fit: contain; }
.badge-card-icon .material-symbol { font-size: 40px; color: var(--text-muted); }
.badge-card-name { font-weight: 600; font-size: 12px; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge-card-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge-card-menu-btn { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 6px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); opacity: 0; transition: opacity .15s; }
.badge-card:hover .badge-card-menu-btn { opacity: 1; }
.badge-card-menu-btn:hover { background: var(--bg-hover); }

.badge-icon-dropzone { border: 2px dashed var(--border-color); border-radius: var(--radius-md); padding: 22px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); font-size: 13px; }
.badge-icon-dropzone:hover { border-color: var(--primary); color: var(--primary); }
.badge-icon-preview-thumb { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg-hover); flex-shrink: 0; }
.badge-icon-preview-thumb img { width: 100%; height: 100%; object-fit: cover; }

.badge-bulk-stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.badge-bulk-step-pill { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); padding: 4px 10px; border-radius: 20px; }
.badge-bulk-step-num { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-input); color: var(--text-muted); font-size: 11px; display: flex; align-items: center; justify-content: center; }
.badge-bulk-step-pill.active { color: var(--primary); }
.badge-bulk-step-pill.active .badge-bulk-step-num { background: var(--primary); color: var(--on-primary); }
.badge-bulk-step-pill.done { color: var(--primary); }
.badge-bulk-step-pill.done .badge-bulk-step-num { background: var(--primary); color: var(--on-primary); }
.badge-bulk-step-chevron { font-size: 16px; color: var(--border-color); }

/* Colunas FIXAS de propósito (não auto-fill/minmax) — achado real
   (2026-09-04): com auto-fill, o Chrome recalcula a contagem de colunas
   toda vez que a barra de rolagem interna (max-height:320px;overflow-y:
   auto) aparece/desaparece entre uma renderização e outra (a lista inteira
   é reconstruída a cada seleção), mudando a largura disponível em ~15px —
   o suficiente pra pular de 4 pra 3 colunas e reorganizar TODOS os cards.
   Resultado: clicar num card selecionava visualmente outro, porque o
   clique media a posição ANTES do recálculo. Colunas fixas nunca mudam
   contagem, então a grade nunca se reorganiza sozinha. */
.badge-bulk-picker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge-bulk-badge-item { position: relative; border: 2px solid var(--border-color); border-radius: var(--radius-md); padding: 10px; text-align: center; cursor: pointer; }
.badge-bulk-badge-item:hover { border-color: var(--primary); }
.badge-bulk-badge-item.selected { border-color: var(--primary); background: var(--primary-light); }
.badge-bulk-badge-item .badge-card-icon { width: 40px; height: 40px; margin: 0 auto 6px; }
.badge-bulk-badge-item-name { font-size: 11px; font-weight: 700; line-height: 1.3; }
.badge-bulk-badge-item-check { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: none; align-items: center; justify-content: center; font-size: 11px; }
.badge-bulk-badge-item.selected .badge-bulk-badge-item-check { display: flex; }
.badge-bulk-picker-section-label { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); margin: 10px 0 8px; }

.badge-bulk-collaborator-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.badge-bulk-collaborator-row:hover { background: var(--bg-hover); }
.badge-bulk-collaborator-row.selected { background: var(--primary-light); }
.badge-bulk-collaborator-checkbox { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--border-color); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.badge-bulk-collaborator-row.selected .badge-bulk-collaborator-checkbox { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.badge-bulk-confirm-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-input); border-radius: 20px; padding: 4px 10px 4px 4px; font-size: 12px; font-weight: 600; margin: 0 6px 6px 0; }
.badge-bulk-confirm-chip .badge-card-icon { width: 22px; height: 22px; margin: 0; }
.badge-bulk-confirm-chip .mini-avatar { width: 22px; height: 22px; border-radius: 50%; margin: 0; }
