/* Sistema ASSEJUR: estilos globais. Base visual do Sistema ASSETI com identidade da Assejur. */
:root {
    --brand-color: #0b3d63;
    --brand-color-light: #145a8c;
    --brand-dark: #082846;
    --accent-color: #9a6b1f;
    --accent-soft: rgba(154, 107, 31, 0.10);
    --sidebar-width: 248px;
    --sidebar-collapsed: 72px;
    --bg-app: #f3f4f6;
    --text-muted: #64748b;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-app);
    color: #1e293b;
}

.preload-transitions * { transition: none !important; }

/* ---------- Topbar flutuante ---------- */
.topbar-wrapper {
    /* Fundo sólido: ao rolar, o conteúdo não aparece na faixa acima do cabeçalho */
    padding: 14px 24px 8px;
    background: var(--bg-app);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.topbar-inner {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
}
.brand img { height: 34px; width: auto; }
.brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--text-muted); letter-spacing: .02em; }
.btn-icon {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; border: none; background: transparent; border-radius: 50%;
}
.btn-icon:hover { background-color: #f1f5f9; }
.dropdown-toggle-no-caret::after { display: none; }
.avatar-circle {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--brand-color); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem;
}

/* ---------- Estrutura: sidebar recolhível + conteúdo ---------- */
.app-wrapper { display: flex; min-height: calc(100vh - 70px); padding: 6px 24px 24px; gap: 20px; }
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--brand-color) 0%, var(--brand-dark) 100%);
    border-radius: 16px;
    color: #fff;
    padding: 14px 10px;
    align-self: flex-start;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-x: hidden;
    overflow-y: auto;
    transition: width .25s ease;
}
.sidebar .nav-section {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
    color: rgba(255, 255, 255, .55); padding: 12px 12px 4px; white-space: nowrap;
}
.sidebar .nav-link {
    color: rgba(255, 255, 255, .82);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex; align-items: center; gap: 10px;
    font-size: .92rem;
}
.sidebar .nav-section-botao { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; border-radius: 8px; text-align: left; cursor: pointer; }
.sidebar .nav-section-botao:hover { color: #fff; }
.sidebar .nav-section-botao i { font-size: .6rem; transition: transform .15s ease; }
.sidebar .nav-section-botao[aria-expanded="false"] i { transform: rotate(-90deg); }
.sidebar .nav-grupo.fechado { display: none; }
.sidebar.collapsed .nav-grupo.fechado { display: block; }
.sidebar .nav-link i { width: 20px; text-align: center; flex-shrink: 0; }
.sidebar .nav-link > span:not(.badge) { flex: 1; min-width: 0; }
.sidebar .nav-link > .badge { flex-shrink: 0; }
/* Bolinha vermelha do que chegou para a pessoa: aparece também com o menu recolhido, sobre o ícone */
.sidebar .menu-bolinha { min-width: 1.4rem; font-size: .72rem; }
.sidebar.collapsed .nav-link { position: relative; }
.sidebar.collapsed .nav-link > .menu-bolinha { display: inline-block; position: absolute; top: 2px; right: 6px; min-width: 1.1rem; padding: .2em .35em; font-size: .62rem; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar .nav-link.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }
.sidebar .nav-link.disabled { color: rgba(255, 255, 255, .35); }
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; }
.main-content { flex: 1; min-width: 0; }

@media (max-width: 991.98px) {
    .app-wrapper { flex-direction: column; padding: 12px; }
    .sidebar { width: 100%; position: static; max-height: none; display: none; }
    .sidebar.show-mobile { display: block; }
    .topbar-wrapper { padding: 12px 12px 8px; }
}

/* ---------- Componentes ---------- */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-header > div:first-child { flex: 1 1 22rem; min-width: 0; }
.page-header h1 { font-size: 1.4rem; font-weight: 700; margin: 0; color: #0f172a; }
.page-header .subtitulo { color: var(--text-muted); font-size: .9rem; }
.card { border: 0; border-radius: 14px; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }
.card-header { background: #fff; border-bottom: 1px solid #eef2f7; border-radius: 14px 14px 0 0 !important; font-weight: 600; }
.kpi { padding: 18px; }
.kpi .valor { font-size: 1.8rem; font-weight: 700; color: var(--brand-color); line-height: 1.1; }
.kpi .rotulo { color: var(--text-muted); font-size: .85rem; }
.kpi .icone { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-color); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.btn-primary { background-color: var(--brand-color); border-color: var(--brand-color); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--brand-color-light); border-color: var(--brand-color-light); }
.btn-outline-primary { color: var(--brand-color); border-color: var(--brand-color); }
.btn-outline-primary:hover { background-color: var(--brand-color); border-color: var(--brand-color); }
.text-brand { color: var(--brand-color) !important; }
.table > :not(caption) > * > * { vertical-align: middle; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.1); vertical-align: middle; }
.codigo { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; color: #475569; background: #f1f5f9; padding: 1px 6px; border-radius: 6px; }
.lista-cadastro .handle { cursor: grab; color: #94a3b8; }
.lista-cadastro tr.inativo td { opacity: .5; }
.sortable-ghost { background: var(--accent-soft) !important; }
.estado-ok { color: #198754; }
.estado-alerta { color: #b45309; }
.estado-erro { color: #b02a37; }
pre.yaml { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 14px; max-height: 420px; overflow: auto; font-size: .8rem; }

/* ---------- Demandas: Kanban, cartões, calendário e agenda ---------- */
.nav-pills .nav-link { color: #334155; border-radius: 10px; }
.nav-pills .nav-link.active { background-color: var(--brand-color); }
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-coluna { flex: 0 0 290px; background: #e9edf2; border-radius: 14px; padding: 10px; max-height: calc(100vh - 230px); display: flex; flex-direction: column; }
.kanban-cabecalho { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .9rem; padding: 4px 6px 10px; border-top: 3px solid; border-radius: 3px; padding-top: 8px; }
.kanban-cartoes { min-height: 60px; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.cartao-demanda { position: relative; background: #fff; border-radius: 10px; padding: 10px 12px; border-left: 4px solid #adb5bd; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); cursor: grab; }
.cartao-demanda:hover { box-shadow: 0 3px 10px rgba(15, 23, 42, .12); }
.cartao-demanda .titulo-cartao { font-size: .88rem; font-weight: 500; line-height: 1.3; }
.cartao-demanda .badge { position: relative; z-index: 2; }
.calendario { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendario-cabecalho { text-align: center; font-size: .75rem; font-weight: 600; color: var(--text-muted); padding: 4px 0; }
.calendario-dia { min-height: 96px; background: #f8fafc; border-radius: 8px; padding: 4px 6px; font-size: .75rem; overflow: hidden; }
.calendario-dia.fora { opacity: .45; }
.calendario-dia.hoje { outline: 2px solid var(--brand-color); background: #fff; }
.calendario-dia .numero { font-weight: 600; margin-bottom: 2px; }
.calendario-dia .evento { display: block; background: #fff; border-left: 3px solid #adb5bd; border-radius: 4px; padding: 1px 4px; margin-bottom: 2px; color: #1e293b; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* No calendário: o ID numa linha e o título curto na de baixo */
.calendario-dia .evento .evento-id { display: block; font-size: .68rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.calendario-dia .evento .evento-titulo { display: block; overflow: hidden; text-overflow: ellipsis; }
.agenda { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.agenda-dia { background: #e9edf2; border-radius: 14px; padding: 10px; }
.agenda-dia.hoje { background: var(--accent-soft); outline: 2px solid var(--accent-color); }
.agenda-cabecalho { padding: 2px 4px 10px; }
.agenda-lista { min-height: 8rem; align-content: start; }
.agenda.arrastando .agenda-lista { outline: 1px dashed rgba(13, 110, 253, .35); outline-offset: 2px; border-radius: 8px; }
.agenda .cartao-demanda { cursor: grab; }
[data-agenda-texto].agenda-salvo { border-color: var(--bs-success); }
.historico { max-height: 420px; overflow-y: auto; }
/* Nome de arquivo longo quebra dentro do cartão; ícone e tamanho/situação ficam fixos */
.anexo-linha { display: flex; align-items: flex-start; gap: 6px; }
.anexo-linha > i { flex-shrink: 0; margin-top: 3px; }
.anexo-linha .anexo-nome { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.anexo-linha > span:last-child { flex-shrink: 0; margin-left: auto; }
.texto-editavel { cursor: text; border-radius: 4px; padding: 0 2px; }
.texto-editavel:hover { background: #eef2f7; }
.tabela-curadoria select { min-width: 130px; font-size: .78rem; }
@media (max-width: 767.98px) {
    .calendario-dia { min-height: 60px; }
    .calendario-dia .evento { display: none; }
}

/* ---------- Pareceres: folha com a formatação da Assejur (recursos/modelo-parecer) ---------- */
.folha-parecer { background: #fff; max-width: 16cm; margin: 0 auto; padding: 1.2cm 1cm; font-family: Arial, Helvetica, sans-serif; font-size: 12pt; line-height: 1.42; color: #000; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.folha-parecer p { margin: 0 0 6pt; text-align: justify; }
.folha-parecer .par-titulo-documento { text-align: center; font-weight: bold; margin-bottom: 1em; }
.folha-parecer .par-cabecalho { text-align: left; }
.folha-parecer .par-paragrafo { text-indent: 0; }
.folha-parecer .par-titulo { font-weight: bold; text-transform: uppercase; margin: 1.42em 0; }
.folha-parecer .par-citacao { margin-left: 4cm; font-size: 11pt; }
.folha-parecer .par-item { margin-left: 5cm; }
.folha-parecer .par-data { text-align: right; margin-top: 1.42em; }
.folha-parecer .par-assinatura { text-align: center; margin-top: 3em; }
/* Destaques e tabelas (parecer do motor de anuidades; mesmas cores do PDF) */
.folha-parecer .par-destaque { text-indent: 0; }
.folha-parecer .par-destaque-secao { color: #0b3d6e; border-bottom: 2px solid #0b3d6e; padding-bottom: 2px; margin-top: 1.4em; }
.folha-parecer .par-destaque-bloco { color: #fff; background: #0b3d6e; padding: 4px 10px; margin-top: 1.2em; text-transform: none; }
.folha-parecer .par-destaque-subtitulo { font-weight: bold; color: #0b3d6e; margin-top: .9em; text-align: left; }
.folha-parecer .par-destaque-identificacao { text-align: center; color: #444; font-size: 10pt; }
.folha-parecer .par-destaque-memoria { background: #f3f6fa; border-left: 4px solid #9fb3c8; padding: 6px 10px; font-size: 10pt; line-height: 1.3; }
.folha-parecer .par-destaque-nota { background: #fff8e1; border-left: 4px solid #e0a800; padding: 6px 10px; font-size: 10pt; line-height: 1.3; }
.folha-parecer .par-destaque-total { background: #eef3f8; border: 1px solid #9fb3c8; padding: 6px 10px; font-weight: bold; }
.folha-parecer .par-destaque-situacao_prescrito { background: #fdecea; border-left: 6px solid #b42318; color: #7a1a12; padding: 7px 10px; font-weight: bold; }
.folha-parecer .par-destaque-situacao_risco { background: #fff4e5; border-left: 6px solid #d97706; color: #7c3d00; padding: 7px 10px; font-weight: bold; }
.folha-parecer .par-destaque-situacao_exigivel { background: #e9f7ef; border-left: 6px solid #1e8449; color: #145a32; padding: 7px 10px; font-weight: bold; }
.folha-parecer .par-destaque-conclusao { background: #eaf2fb; border-left: 6px solid #0b3d6e; padding: 7px 12px; }
.folha-parecer .par-tabela { width: 100%; border-collapse: collapse; margin: 6pt 0 10pt; font-size: 9.5pt; line-height: 1.25; }
.folha-parecer .par-tabela th { background: #0b3d6e; color: #fff; text-align: left; padding: 3px 6px; }
.folha-parecer .par-tabela td { padding: 3px 6px; border-bottom: 1px solid #c9d6e3; vertical-align: top; }
.folha-parecer .par-tabela .par-tabela-par td { background: #f3f6fa; }
.folha-parecer .par-tabela td.num, .folha-parecer .par-tabela th.num { text-align: right; white-space: nowrap; }
.folha-clicavel [data-indice] { cursor: pointer; border-radius: 3px; }
.folha-clicavel [data-indice]:hover { outline: 1px dashed #94a3b8; outline-offset: 2px; }
.folha-clicavel .par-espaco { background: repeating-linear-gradient(45deg, transparent, transparent 6px, #f1f5f9 6px, #f1f5f9 12px); }
.folha-clicavel .trecho-selecionado { outline: 2px solid var(--brand-color); outline-offset: 2px; }
.folha-clicavel .trecho-destacado { background: #fff3bf; transition: background .4s; }
/* Conversa do parecer */
.conversa { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #f8fafc; }
.mensagem { max-width: 80%; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px 12px 12px 2px; padding: 8px 12px; font-size: .9rem; align-self: flex-start; }
.mensagem.minha { align-self: flex-end; background: #e8f1fb; border-color: #c9ddf3; border-radius: 12px 12px 2px 12px; }
.mensagem-autor { font-size: .72rem; color: var(--text-muted); margin-bottom: 2px; }
.mensagem-citacao, .citacao-rascunho { border-left: 3px solid var(--accent-color); background: rgba(154, 107, 31, .07); padding: 4px 8px; margin: 2px 0 6px; font-size: .8rem; color: #475569; border-radius: 0 6px 6px 0; cursor: pointer; }
.citacao-rascunho { cursor: default; }
.barra-formato { position: absolute; left: 50%; transform: translateX(-50%); width: min(460px, 95%); z-index: 20; }

/* ---------- Login ---------- */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-dark) 100%);
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.login-card { width: 100%; max-width: 410px; border-radius: 18px; padding: 32px; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card img { height: 72px; }
.login-card h1 { font-size: 1.25rem; font-weight: 700; color: var(--brand-color); }

@media print {
    .topbar-wrapper, .sidebar, .no-print, .trilha { display: none !important; }
    .app-wrapper { padding: 0; }
    .folha-pauta { break-after: page; border: 0 !important; box-shadow: none !important; }
    .folha-pauta:last-of-type { break-after: auto; }
}
/* Folhas de pauta (etapa 6.3): linhas para anotar o julgamento à mão */
.folha-campos td { height: 2.4rem; }

/* Menções @login (etapa 4.3) */
.mencao { color: var(--bs-primary); font-weight: 600; }
.campo-mencoes, .modal-body { position: relative; }
.lista-mencoes { position: absolute; z-index: 1080; min-width: 240px; max-height: 220px; overflow-y: auto; }

/* Calendário: prazos processuais e providências ao lado das demandas */
.calendario .evento.evento-processo { border-left-color: #6f42c1; }
.calendario .evento.evento-providencia { border-left-color: #fd7e14; }
.legenda-evento { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.legenda-evento.evento-processo { background: #6f42c1; }
.legenda-evento.evento-providencia { background: #fd7e14; }
.calendario .evento.evento-demanda { border-left-color: #0b3d63; }
.legenda-evento.evento-demanda { background: #0b3d63; }
.calendario .evento.evento-pad { border-left-color: #b02a37; }
.legenda-evento.evento-pad { background: #b02a37; }
.calendario .evento.evento-sessao { border-left-color: #198754; }
.legenda-evento.evento-sessao { background: #198754; }
.calendario .evento.evento-intercorrente { border-left-color: #8a6d00; }
.legenda-evento.evento-intercorrente { background: #8a6d00; }
.trilha .breadcrumb { --bs-breadcrumb-divider: '›'; }
.busca-global { max-width: 520px; }

/* Listas longas dos painéis e da Minha mesa: tudo visível, com rolagem dentro do cartão */
.lista-rolavel { max-height: 28rem; overflow-y: auto; }
.lista-rolavel .cabecalho-fixo { position: sticky; top: 0; z-index: 2; }

/* Coordenação: linhas de carga que abrem os itens */
.linha-carga { cursor: pointer; }
.linha-carga[aria-expanded="true"] .fa-chevron-right { transform: rotate(90deg); }
.lote-barra { position: sticky; top: .5rem; z-index: 1020; }
.quadro-filtros { background: var(--bs-tertiary-bg, #f8f9fa); }
/* Gráficos de evolução do relatório consolidado */
.grafico-evolucao { width: 100%; height: auto; }
.grafico-evolucao text { font-size: 9px; fill: var(--text-muted); }
.grafico-evolucao .eixo { stroke: #cbd5e1; }
.grafico-evolucao .serie-1 { fill: var(--brand-color); }
.grafico-evolucao .serie-2 { fill: #7fb0d9; }
.grafico-evolucao .serie-3 { fill: var(--accent-color); }
.grafico-evolucao .linha { fill: none; stroke-width: 2; }
.grafico-evolucao .linha.serie-1 { stroke: var(--brand-color); }
.grafico-evolucao .linha.serie-3 { stroke: var(--accent-color); }
.legenda-cor { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.legenda-cor.serie-1 { background: var(--brand-color); }
.legenda-cor.serie-2 { background: #7fb0d9; }
.legenda-cor.serie-3 { background: var(--accent-color); }
.quadro-filtros .quadro-busca { max-width: 22rem; min-width: 12rem; flex: 1 1 14rem; }
.quadro-filtros .form-select { max-width: 11rem; }

/* Prévia ao passar o mouse sobre um registro */
.previa-cartao { position: absolute; z-index: 1090; width: 22rem; max-width: calc(100vw - 1rem); background: var(--bs-body-bg, #fff); border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .5rem; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.15); padding: .75rem; font-size: .8125rem; }
.previa-cartao .previa-desc { white-space: pre-line; color: var(--bs-secondary-color, #6c757d); max-height: 7.5rem; overflow: hidden; }
.previa-cartao dl { margin: .25rem 0; display: grid; grid-template-columns: auto 1fr; gap: 0 .5rem; }
.previa-cartao dt { font-weight: 500; color: var(--bs-secondary-color, #6c757d); }
.previa-cartao dd { margin: 0; }
.filtro-agenda { min-width: 14rem; }

/* ---------- Prescrição de anuidades: linha do tempo por exercício ---------- */
.anuidades-linha { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; }
.anuidade-celula { border-radius: 6px; padding: 4px 6px; text-align: center; line-height: 1.15; border: 1px solid transparent; }
.anuidade-celula .ano { display: block; font-weight: 600; }
.anuidade-celula .data { display: block; font-size: .7rem; opacity: .85; }
.anuidade-prescrito { background: #f8d7da; border-color: #f1aeb5; color: #58151c; }
.anuidade-em_risco { background: #fff3cd; border-color: #ffe69c; color: #664d03; }
.anuidade-exigivel { background: #d1e7dd; border-color: #a3cfbb; color: #0a3622; }
.anuidade-sem_valor { background: #e9ecef; border-color: #dee2e6; color: #495057; }
.legenda-anuidade { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; border: 1px solid; }
.anuidade-total-risco { background: #fff8e1; }
.anuidade-total-prescrito { background: #fdecee; }
.badge.anuidade-situacao-prescrito { background: #b02a37; }
.badge.anuidade-situacao-em_risco { background: #ffc107; color: #212529; }
.badge.anuidade-situacao-exigivel { background: #198754; }
.badge.anuidade-situacao-sem_debito { background: #6c757d; }
.calendario .evento.evento-anuidade { border-left-color: #c2410c; }
.legenda-evento.evento-anuidade { background: #c2410c; }

/* ---------- Conversa interna em painel lateral (etapa 9) ---------- */
.conversa-botao {
    position: fixed; right: 20px; bottom: 20px; z-index: 1045;
    width: 52px; height: 52px; border-radius: 50%; border: 0;
    background: var(--brand-color); color: #fff; font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(8, 40, 70, .28);
}
.conversa-botao:hover, .conversa-botao[aria-expanded="true"] { background: var(--brand-color-light); }
.conversa-contador {
    position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 11px; background: #dc2626; color: #fff; font-size: .72rem; font-weight: 700; line-height: 22px;
}
.conversa-painel {
    position: fixed; right: 20px; bottom: 84px; z-index: 1045;
    width: 360px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 120px));
    display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(8, 40, 70, .25);
}
.conversa-painel.d-none { display: none !important; }
.conversa-topo { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--brand-color); color: #fff; }
.conversa-topo .small { opacity: .85; }
.conversa-lista { flex: 1; overflow-y: auto; padding: .4rem 0; }
.conversa-secao { padding: .5rem .9rem .2rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.conversa-item { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .45rem .9rem; border: 0; background: none; font-size: .9rem; }
.conversa-item:hover { background: #f1f5f9; }
.conversa-ponto { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; flex: none; }
.conversa-ponto.online { background: #16a34a; }
.conversa-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.conversa-chat.d-none { display: none !important; }
.conversa-mensagens { flex: 1; overflow-y: auto; padding: .7rem; background: #f8fafc; display: flex; flex-direction: column; gap: .45rem; }
.conversa-msg { max-width: 85%; align-self: flex-start; padding: .45rem .65rem; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; font-size: .88rem; overflow-wrap: anywhere; }
.conversa-msg.minha { align-self: flex-end; background: #e6eef6; border-color: #c9d8e8; }
.conversa-autor { font-size: .74rem; font-weight: 700; color: var(--brand-color); }
.conversa-meta { font-size: .7rem; color: var(--text-muted); margin-top: .2rem; }
.conversa-meta .btn-link { font-size: .7rem; vertical-align: baseline; text-decoration: none; }
.conversa-mencao { font-weight: 600; color: var(--accent-color); }
.conversa-aviso { padding: .35rem .7rem; font-size: .7rem; color: var(--text-muted); border-top: 1px solid #e2e8f0; }
.conversa-envio { display: flex; gap: .4rem; padding: .5rem .7rem .7rem; }
.conversa-envio textarea { resize: none; }
.conversa-envio { position: relative; }
.conversa-envio .lista-mencoes { top: auto !important; bottom: calc(100% - .4rem); z-index: 1050; }
@media print { .conversa-botao, .conversa-painel { display: none !important; } }

/* ---------- Revisão de estética (etapa 10) ---------- */
/* Código de registro nunca quebra no meio (DEM-2026-\n0001) */
.codigo { white-space: nowrap; }
/* Hash e endereço longos quebram em qualquer ponto, sem sair do cartão */
.codigo.text-break, .text-break.codigo { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.evento-linha > div { min-width: 0; overflow-wrap: anywhere; }
/* Tabela de lista (DataTables) mais larga que a tela rola dentro da própria área, sem empurrar a página */
.dt-container > .row > div:has(> table.dataTable), .dt-container:has(> table.dataTable) { overflow-x: auto; }
.table .badge { white-space: normal; text-align: start; }
/* Tabela encostada na borda do cartão ganha o mesmo respiro do cabeçalho */
.card-body.p-0 > .table > :not(caption) > * > :first-child,
.card-body.p-0 > .table-responsive > .table > :not(caption) > * > :first-child,
.card > .table > :not(caption) > * > :first-child { padding-left: 1rem; }
.card-body.p-0 > .table > :not(caption) > * > :last-child,
.card-body.p-0 > .table-responsive > .table > :not(caption) > * > :last-child,
.card > .table > :not(caption) > * > :last-child { padding-right: 1rem; }
/* Quadro de prioridades: a coluna inteira recebe o que se solta, mesmo vazia */
.quadro-coluna { min-height: 10rem; }
.quadro-coluna [data-id] { cursor: grab; }
#quadroPrioridades.arrastando .quadro-coluna { background: rgba(13, 110, 253, .05); outline: 1px dashed rgba(13, 110, 253, .35); outline-offset: -4px; }
.faixa-teste { background: #fde68a; color: #713f12; text-align: center; font-size: .85rem; font-weight: 600; padding: .35rem 1rem; }
.rodape-versao { text-align: right; font-size: .75rem; color: #94a3b8; padding: 0 96px 12px 24px; } /* à direita fica o botão da conversa */
/* Menu lateral: a barra de rolagem aparece quando há mais itens que a altura */
.sidebar { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }
/* Espaço para o botão da conversa não cobrir o fim da página */
.main-content { padding-bottom: 72px; }
/* Anexos: arquivo e botão quebram linha na coluna estreita */
.anexo-arquivo { flex: 1 1 12rem; min-width: 0; }
/* Seleção múltipla (select2): muitas etiquetas não esticam a linha de filtros; a caixa rola */
.select2-container--bootstrap-5 .select2-selection--multiple { max-height: 4.6rem; overflow-y: auto; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered { flex-wrap: wrap; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { font-size: .78rem; padding: 0 .4rem; margin: 2px 4px 2px 0; }
.campo-curto { max-width: 5rem; }
/* Página do relator: parágrafo alterado desde a versão anterior, parágrafo retirado e parágrafo citável */
.texto-revisao [data-mudou] { background: #fef3c7; box-shadow: -4px 0 0 #f59e0b; }
.texto-retirado { text-decoration: line-through; color: #94a3b8; }
.paragrafo-citavel { cursor: pointer; }
