/* Tema "Funcern" para o Tabler 1.7.
   Cores do Manual de Identidade Visual 2025:
     azul        #0C78FE  (primária)
     azul-escuro #0E3477  (primária)
     laranja     #F9684B  (secundária)
   Do site funcern.br: fonte Manrope, texto #0B1F4A, cinzas #F0F2F5 / #E4E7EC, cantos de 8px. */

:root,
[data-bs-theme="light"] {
  --fc-azul: #0C78FE;
  --fc-azul-escuro: #0E3477;
  --fc-laranja: #F9684B;
  --fc-tinta: #0B1F4A;

  /* Botões e links: um tom do azul oficial um pouco mais escuro (#0A66D9),
     para o texto branco ter contraste de leitura (5,4:1; o #0C78FE dá 4,1:1). */
  --tblr-primary: #0A66D9;
  --tblr-primary-rgb: 10, 102, 217;
  --tblr-primary-text-emphasis: #0B4FA8;
  --tblr-primary-bg-subtle: #E6F0FF;
  --tblr-primary-border-subtle: #B3D1FF;
  --tblr-link-color: #0A66D9;
  --tblr-link-color-rgb: 10, 102, 217;
  --tblr-link-hover-color: #0B4FA8;

  --tblr-body-color: #0B1F4A;
  --tblr-body-color-rgb: 11, 31, 74;
  --tblr-emphasis-color: #0B1F4A;
  --tblr-heading-color: #0B1F4A;
  --tblr-secondary-color: #5B6B86;
  --tblr-bg-surface: #ffffff;
  --tblr-bg-surface-secondary: #F0F2F5;
  --tblr-body-bg: #F0F2F5;
  --tblr-border-color: #E4E7EC;
  --tblr-border-radius: 8px;
  --tblr-card-border-radius: 8px;

  --tblr-font-sans-serif: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

body { font-feature-settings: normal; }
h1, h2, h3, .page-title, .card-title { font-weight: 800; letter-spacing: -0.01em; }

/* Faixa fina no topo, como no site: um trecho laranja e o resto azul. */
.faixa-marca {
  height: 3px;
  background: linear-gradient(90deg, var(--fc-laranja) 0 14%, var(--fc-azul) 14% 100%);
  position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
}
body { padding-top: 3px; }
.navbar-vertical { top: 3px !important; }

/* Menu lateral no azul-escuro institucional */
.navbar-vertical.navbar-funcern {
  background: var(--fc-azul-escuro);
  border-right: 0;
  --tblr-navbar-color: #C9D6EC;          /* 8,1:1 sobre o azul-escuro */
  --tblr-navbar-hover-color: #ffffff;
  --tblr-navbar-active-color: #ffffff;
}
.navbar-funcern .navbar-brand { padding: 1.25rem 0 1rem; }
.navbar-funcern .marca { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; }
.navbar-funcern .marca img { height: 30px; }
.navbar-funcern .marca b { display: block; font-weight: 800; font-size: 1rem; line-height: 1.1; }
.navbar-funcern .marca small { display: block; color: #9DB4D9; font-size: .72rem; font-weight: 500; }
.navbar-funcern .secao {
  color: #9DB4D9; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 1rem 1.5rem .35rem;
}
.navbar-funcern .nav-link { border-radius: 8px; margin: 1px .75rem; padding: .5rem .75rem; font-weight: 600; }
.navbar-funcern .nav-link:hover { background: rgba(255, 255, 255, .06); }
.navbar-funcern .nav-item.active > .nav-link {
  background: rgba(255, 255, 255, .10);
  box-shadow: inset 3px 0 0 var(--fc-laranja);   /* laranja só como detalhe, nunca com texto em cima */
}
.navbar-funcern .nav-link-icon { color: inherit; opacity: .9; }
.navbar-funcern .contador {
  margin-left: auto; background: var(--fc-azul); color: #fff; font-size: .7rem; font-weight: 700;
  border-radius: 999px; padding: .1rem .5rem;
}
.navbar-funcern .rodape-menu { border-top: 1px solid rgba(255, 255, 255, .08); padding: 1rem 1.5rem; }
.navbar-funcern .rodape-menu .usuario { color: #fff; font-weight: 600; font-size: .85rem; }
.navbar-funcern .rodape-menu .perfil { color: #9DB4D9; font-size: .72rem; }
.navbar-funcern .logo-funcern { height: 22px; opacity: .85; margin-top: 1rem; }

/* Cartões: borda clara e sombra suave, como os cards de notícia do site */
.card { border-color: var(--tblr-border-color); box-shadow: 0 1px 2px rgba(11, 31, 74, .04), 0 4px 16px rgba(11, 31, 74, .04); }
.stat .valor { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat .rotulo { color: var(--tblr-secondary-color); font-size: .8rem; font-weight: 600; }

/* Prioridade: barra lateral no item, cores de status (nunca as da marca) */
.prio { width: 4px; border-radius: 4px; align-self: stretch; }
.prio-4 { background: #D03B3B; } .prio-3 { background: #F08C00; } .prio-2 { background: #0A66D9; } .prio-1 { background: #AAB4C3; }

.btn { font-weight: 700; }
.badge { font-weight: 700; }

/* Tela de login */
.login-lado {
  background: var(--fc-azul-escuro) radial-gradient(circle at 85% 15%, rgba(12, 120, 254, .35), transparent 45%);
  color: #fff;
}
.login-lado .titulo { font-weight: 800; font-size: 2.2rem; line-height: 1.1; }
.login-lado p { color: #C9D6EC; }
.btn-microsoft { background: #fff; border: 1px solid #8C8C8C; color: #3c3c3c; font-weight: 600; }
.btn-microsoft:hover { background: #F3F3F3; color: #3c3c3c; }


/* --- Ajustes do sistema ------------------------------------------------ */
.navbar-funcern .menu-interno { display: flex; flex-direction: column; min-height: 100%; width: 100%; }
@media (min-width: 992px) {
  .navbar-funcern .navbar-collapse { align-items: stretch; }
}
.page-body h1, .page-body .h1 { font-weight: 800; }
.page-titulo { font-weight: 800; font-size: 1.35rem; margin: 0; }
.texto-quebra { white-space: pre-wrap; }
.alert .alert-icon { font-size: 1.25rem; }
.list-group-item-action strong { color: var(--tblr-body-color); }
.form-label { font-weight: 600; }
.form-text { color: var(--tblr-secondary-color); }
/* Badges de status: versão suave do Tabler (-lt), legível nos dois temas */
.badge { text-transform: none; letter-spacing: 0; }
/* Ações do painel da TI e seções recolhíveis */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "\203A"; float: right; transition: transform .15s; color: var(--tblr-secondary-color); }
details[open] > summary::after { transform: rotate(90deg); }
.card-header > summary, summary.card-header { display: flex; align-items: center; justify-content: space-between; }
.timeline-event-card { box-shadow: none; }
/* Métricas: os números grandes usam a fonte da marca */
.stat-valor { font-weight: 800; }
/* Linha do tempo: eventos simples (sem comentário) ficam compactos, alinhados ao lado do ícone */
.timeline-evento-simples { min-height: 2.5rem; display: flex; align-items: center; }
.timeline-icone-pequeno { background: transparent; color: var(--tblr-border-color); }
.timeline-icone-pequeno .ti { font-size: .9rem; color: #AAB4C3; }

/* Campo de anexos (static/js/anexos.js) */
.anexos-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  border: 1.5px dashed #B3C3DA; border-radius: 8px; background: #F8FAFD; padding: 1.1rem 1rem;
  text-align: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.anexos-area:hover, .anexos-area:focus-within { border-color: var(--tblr-primary); background: var(--tblr-primary-bg-subtle); }
.anexos-area-ativa { border-color: var(--tblr-primary); background: var(--tblr-primary-bg-subtle); border-style: solid; }
.anexos-area-cheia { cursor: not-allowed; opacity: .7; }
.anexos-area-icone { font-size: 1.75rem; color: var(--tblr-primary); }
.anexos-area-titulo { font-weight: 700; }
.anexos-area-dica { font-size: .8rem; color: var(--tblr-secondary-color); }
.anexos-avisos:not(:empty) { margin-top: .5rem; }
.anexos-lista { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.anexos-item { display: flex; align-items: center; gap: .75rem; border: 1px solid var(--tblr-border-color); border-radius: 8px; padding: .4rem .5rem; background: #fff; }
.anexos-miniatura { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.anexos-miniatura-icone { display: inline-flex; align-items: center; justify-content: center; background: var(--tblr-primary-bg-subtle); color: var(--tblr-primary); font-size: 1.3rem; }
.anexos-info { flex: 1; min-width: 0; }
.anexos-nome { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anexos-meta { font-size: .78rem; color: var(--tblr-secondary-color); }
