/* ── HEADER ─────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 20px; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.header-marca { display: flex; align-items: center; gap: 12px; }
.header-logo-wrap img, .header-logo { height: 36px; object-fit: contain; border-radius: 6px; }
.header-titulo { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: #fff; }
.header-sub    { font-size: .78rem; color: rgba(255,255,255,.75); }

.header-acoes { display: flex; align-items: center; gap: 6px; }
.btn-cab {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.15); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 6px 12px; font-size: .85rem; font-weight: 500;
  transition: background .15s; position: relative;
}
.btn-cab:hover { background: rgba(255,255,255,.25); }
.btn-cab-txt  { display: none; }
.btn-sair     { background: rgba(255,255,255,.1); }
.badge-notif {
  position: absolute; top: -6px; right: -6px;
  background: var(--danger); color: #fff;
  border-radius: 99px; font-size: .7rem; font-weight: 700;
  padding: 1px 5px; min-width: 18px; text-align: center;
  border: 2px solid var(--primary);
}

@media (min-width: 640px) { .btn-cab-txt { display: inline; } }

/* ── MURAL ──────────────────────────────────────────────────── */
.mural { padding: 10px 20px; display: flex; flex-direction: column; gap: 8px; }

/* ── BUSCA ──────────────────────────────────────────────────── */
.busca-wrap-outer { padding: 16px 20px 8px; max-width: 1100px; margin: 0 auto; width: 100%; }
.busca-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 16px;
  box-shadow: var(--shadow);
}
.busca-icone { font-size: 1.1rem; color: var(--text-muted); flex-shrink: 0; }
.busca-wrap input {
  flex: 1; border: none; outline: none; font-size: 1rem;
  background: transparent; color: var(--text);
}
.busca-wrap input::placeholder { color: var(--text-faint); }
.btn-limpar {
  background: none; border: none; color: var(--text-muted); font-size: 1.1rem;
  padding: 2px 4px; border-radius: 4px;
}
.btn-limpar:hover { background: var(--surface-2); }

/* ── CATEGORIAS ─────────────────────────────────────────────── */
.conteudo { max-width: 1100px; margin: 0 auto; padding: 0 20px 80px; }
.lista-cats {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 20px; max-width: 1100px; margin: 0 auto;
}
.btn-cat {
  padding: 6px 16px; border-radius: 99px; font-size: .85rem; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted);
  transition: all .15s;
}
.btn-cat:hover { border-color: var(--primary-light); color: var(--primary); }
.btn-cat.ativo { background: var(--primary); color: #fff; border-color: var(--primary); }

.resultado-info { font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; }

/* ── CARDS DE MENSAGEM ──────────────────────────────────────── */
.lista-msgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 8px;
  align-items: start;
}
.msg-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); transition: box-shadow .2s;
  display: flex; flex-direction: column;
}
.msg-card:hover { box-shadow: var(--shadow-md); }
.msg-card.importante { border-left: 4px solid var(--warning); }
.msg-card.interno    { border-left: 4px solid var(--danger); background: #fff9f9; }

/* Responsivo: 2 colunas em tablet, 1 em celular */
@media (max-width: 1100px) { .lista-msgs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .lista-msgs { grid-template-columns: 1fr; } }

.msg-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.msg-titulo { font-weight: 600; font-size: .95rem; color: var(--text); }

.msg-texto {
  font-family: var(--font-body); font-size: .92rem; line-height: 1.7;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 0 12px;
  max-height: 200px; overflow-y: auto;
}

.msg-card-footer { display: flex; align-items: center; gap: 8px; }
.btn-copiar { }
.btn-fav { min-width: 36px; }
.btn-fav.favoritado { background: var(--primary-soft); border-color: var(--primary-light); }

/* ── PAINEL IMAGENS ─────────────────────────────────────────── */
.painel-lateral {
  position: fixed; right: 0; top: 0; bottom: 0; z-index: 200;
  width: min(360px, 95vw);
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.painel-inner { display: flex; flex-direction: column; height: 100%; padding: 20px; gap: 12px; }
.painel-header { display: flex; align-items: center; justify-content: space-between; }
.painel-header h2 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.overlay-painel { position: fixed; inset: 0; z-index: 190; background: rgba(0,0,0,.35); }

.grid-imagens { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow-y: auto; flex: 1; }
.img-card {
  background: var(--surface-2); border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.img-thumb { width: 100%; height: 90px; object-fit: cover; }
.img-card-info { padding: 6px 8px; flex: 1; }
.img-nome { font-size: .78rem; font-weight: 600; display: block; color: var(--text); }
.img-desc { font-size: .72rem; color: var(--text-muted); }
.btn-copiar-img { margin: 0 8px 8px; }

/* ── INFORMATIVOS ───────────────────────────────────────────── */
.info-item { margin-bottom: 4px; }
.info-item.nao-lido { border-left: 4px solid var(--primary); padding-left: 16px; }
.info-item.lido     { opacity: .8; }
.info-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.info-titulo { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.info-corpo {
  font-size: .92rem; line-height: 1.8; color: var(--text);
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 12px;
}
.info-acao { margin-top: 8px; }
.info-lido-msg { font-size: .85rem; color: var(--success); font-weight: 500; margin-top: 8px; }

/* ── RODAPÉ ─────────────────────────────────────────────────── */
.rodape {
  text-align: center; padding: 24px 20px;
  font-size: .8rem; color: var(--text-faint);
  border-top: 1px solid var(--border); margin-top: 40px;
}
.rodape a { color: var(--text-muted); }
.rodape a:hover { color: var(--primary); }

/* ── BANNERS DE AVISOS ───────────────────────────────────────── */
.mural-avisos {
  display: flex; flex-direction: column; gap: 0;
}
.aviso-carrossel {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  font-size: .88rem; line-height: 1.4;
  min-height: 40px;
  animation: slideIn .3s ease;
}
@keyframes slideIn { from { opacity:0; transform:translateX(6px); } to { opacity:1; transform:translateX(0); } }
.aviso-banner-icone { font-size: 1rem; flex-shrink: 0; }
.aviso-banner-corpo {
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap; flex: 1; min-width: 0;
}
.aviso-banner-corpo strong { font-weight: 700; }
.aviso-banner-corpo span { opacity: .85; }
.aviso-nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; }
.aviso-nav-btn {
  background: rgba(0,0,0,.1); border: none; cursor: pointer;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 1rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  color: inherit; transition: background .15s;
}
.aviso-nav-btn:hover { background: rgba(0,0,0,.2); }
.aviso-contador { font-size: .75rem; opacity: .7; min-width: 28px; text-align: center; }

/* ── BARRA DE INFORMATIVOS ───────────────────────────────────── */
.barra-informativos {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.barra-info-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 20px;
  background: none; border: none; cursor: pointer;
  font-size: .88rem; font-weight: 500; color: var(--text-muted);
  transition: background .15s; text-align: left;
}
.barra-info-btn:hover { background: var(--surface-2); color: var(--text); }
.barra-info-seta { margin-left: auto; font-size: 1.1rem; color: var(--text-faint); }
.badge-nolido {
  background: var(--danger); color: #fff;
  border-radius: 99px; padding: 1px 7px;
  font-size: .72rem; font-weight: 700;
}

/* ── LISTA DE INFORMATIVOS (modal) ───────────────────────────── */
.info-lista-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; transition: background .15s;
}
.info-lista-item:hover { background: var(--surface-2); border-radius: var(--radius-sm); }
.info-lista-item.nao-lido { font-weight: 600; }
.info-lista-item.lido { opacity: .7; }
.info-lista-status { font-size: 1.2rem; flex-shrink: 0; }
.info-lista-corpo { flex: 1; min-width: 0; }
.info-lista-corpo strong { display: block; }
.info-lista-corpo small { color: var(--text-muted); font-size: .78rem; }
.badge-nolido-sm {
  background: var(--danger); color: #fff;
  border-radius: 99px; padding: 2px 8px;
  font-size: .72rem; font-weight: 700; flex-shrink: 0;
}

/* ── BASE DE CONHECIMENTO FULLSCREEN ─────────────────────────── */
.tela-base {
  position: fixed; inset: 0; z-index: 900;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.tela-base-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.tela-base-header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.tela-base-titulo {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 800;
  margin: 0; color: var(--text);
}
.tela-base-sub {
  font-size: .82rem; color: var(--text-muted); margin: 2px 0 0;
}
.tela-base-busca {
  width: 280px; max-width: 100%;
}
.btn-fechar-tela {
  background: none; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 16px;
  font-size: .88rem; font-weight: 600; cursor: pointer;
  color: var(--text-muted); transition: all .15s; white-space: nowrap;
}
.btn-fechar-tela:hover { border-color: var(--danger); color: var(--danger); }

.tela-base-corpo {
  flex: 1; overflow-y: auto;
  padding: 28px 24px;
  max-width: 1100px; margin: 0 auto; width: 100%;
}

/* Seção por categoria */
.base-secao { margin-bottom: 36px; }
.base-secao-titulo {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* Grid de cards */
.base-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* Card de artigo */
.base-artigo-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: all .15s;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.base-artigo-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(37,99,235,.1);
  transform: translateY(-2px);
}
.base-artigo-card.destaque {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.base-card-badge {
  font-size: .72rem; font-weight: 700;
  color: var(--primary); text-transform: uppercase; letter-spacing: .05em;
}
.base-card-titulo {
  font-family: var(--font-display);
  font-size: .95rem; font-weight: 700;
  color: var(--text); margin: 0; line-height: 1.3;
}
.base-card-preview {
  font-size: .83rem; color: var(--text-muted);
  line-height: 1.5; flex: 1;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.base-card-footer {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 8px;
  border-top: 1px solid var(--border);
}
.base-card-cat {
  font-size: .75rem; color: var(--primary); font-weight: 600;
}
.base-card-data {
  font-size: .72rem; color: var(--text-faint);
}

/* ── INFORMATIVO MODAL ───────────────────────────────────────── */
.info-corpo-rich {
  padding: 0 !important; border: none !important;
  font-size: .95rem; line-height: 1.8;
}
.info-corpo-rich img { max-width: 100%; border-radius: var(--radius-sm); }
.info-corpo-rich iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--radius-sm); }

/* ── BADGE NO HEADER ─────────────────────────────────────────── */
.badge-cab-notif {
  background: var(--danger); color: #fff;
  border-radius: 99px; padding: 1px 6px;
  font-size: .68rem; font-weight: 700;
  margin-left: 2px; vertical-align: middle;
}

/* ── TELA DE LOGIN APRIMORADA ────────────────────────────────── */
.login-sub-empresa {
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: -6px 0 4px;
  text-align: center;
}
.login-icone-empresa {
  font-size: 3rem;
  line-height: 1;
}
.login-rodape {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 16px;
  font-size: .76rem; color: var(--text-faint);
}
.login-rodape a { color: var(--text-faint); }
.login-rodape a:hover { color: var(--primary); }

/* ── MODAL ARTIGO BASE DE CONHECIMENTO ───────────────────────── */
.modal-artigo-box {
  width: min(860px, 96vw) !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-artigo-box .modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 24px 28px;
}
.modal-artigo-titulo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 4px 0 0;
  color: var(--text);
}
.artigo-modal-cat {
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.modal-artigo-conteudo {
  padding: 0 !important;
  border: none !important;
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text);
}
.modal-artigo-conteudo h1,
.modal-artigo-conteudo h2,
.modal-artigo-conteudo h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--text);
}
.modal-artigo-conteudo h2 { font-size: 1.15rem; }
.modal-artigo-conteudo h3 { font-size: 1rem; color: var(--text-muted); }
.modal-artigo-conteudo ul,
.modal-artigo-conteudo ol {
  padding-left: 20px;
  margin: 8px 0;
}
.modal-artigo-conteudo li { margin: 6px 0; }
.modal-artigo-conteudo a {
  color: var(--primary);
  font-weight: 500;
  word-break: break-all;
}
.modal-artigo-conteudo a:hover { text-decoration: underline; }
.modal-artigo-conteudo p { margin: 8px 0; }
.modal-artigo-conteudo strong { font-weight: 700; }
.modal-artigo-conteudo img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
.modal-artigo-conteudo iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
