/* Ajustes do protótipo sobre o Tabler */

.logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px dashed currentColor;
  border-radius: 6px;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .05em;
  opacity: .8;
  flex-shrink: 0;
}
.logo-placeholder.grande { width: 4rem; height: 4rem; font-size: .8rem; }

.marca-texto { line-height: 1.1; text-align: left; }
.marca-texto small { display: block; font-weight: 400; opacity: .7; font-size: .75rem; }

.selo-basico { background: var(--tblr-green-lt); color: var(--tblr-green); }
.selo-completo { background: var(--tblr-purple-lt); color: var(--tblr-purple); }
.selo-opcional { background: var(--tblr-orange-lt); color: var(--tblr-orange); }
.selo { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: .2em .5em; border-radius: 4px; }

.faixa-prototipo { background: var(--tblr-yellow-lt); color: var(--tblr-yellow-darken, #8a6d00); font-size: .75rem; text-align: center; padding: .25rem; }

.linha-clicavel { cursor: pointer; }

/* Linha do tempo da ficha do animal */
.linha-tempo { list-style: none; margin: 0; padding: 0; position: relative; }
.linha-tempo::before { content: ''; position: absolute; left: 1.15rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--tblr-border-color); }
.linha-tempo li { position: relative; display: flex; gap: 1rem; padding: .6rem 0; }
.linha-tempo .marcador { position: relative; z-index: 1; width: 2.3rem; height: 2.3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.linha-tempo .novo { animation: destaque 2.5s ease-out; border-radius: 6px; }
@keyframes destaque { from { background: var(--tblr-yellow-lt); } to { background: transparent; } }
.linha-tempo .dia-rotulo { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tblr-primary); }
.linha-tempo li.compacto { padding: .15rem 0; font-size: .82rem; align-items: flex-start; }
.linha-tempo li.compacto .marcador { height: 1.3rem; font-size: .9rem; background: var(--tblr-bg-surface); }
.filtros-prontuario .btn { padding: .2rem .55rem; }

/* Fotos e anexos do prontuário */
.miniatura { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--tblr-border-color); cursor: zoom-in; }
.miniatura.sensivel { filter: blur(8px) grayscale(.6); }
.miniatura.sensivel:hover { filter: blur(4px) grayscale(.6); }
.miniatura-bloqueada { display: inline-flex; align-items: center; justify-content: center; background: var(--tblr-bg-surface-secondary); color: var(--tblr-secondary); font-size: 1.4rem; cursor: not-allowed; }
.anexo { display: inline-flex; align-items: center; padding: .2rem .55rem; border: 1px solid var(--tblr-border-color); border-radius: 6px; font-size: .8rem; text-decoration: none; }

/* Painel de medicações */
.list-group-item.dose-atrasada { border-left: 4px solid var(--tblr-red); background: rgba(214, 57, 57, .04); }

/* Mapa de baias */
.baia { border-top-width: 4px; }
.baia-livre { border-top-color: var(--tblr-green); }
.baia-parcial { border-top-color: var(--tblr-yellow); }
.baia-cheia { border-top-color: var(--tblr-red); }

.avatar-animal { width: 5rem; height: 5rem; font-size: 2.2rem; }
.avatar-animal img, .foto-preview { object-fit: cover; width: 100%; height: 100%; border-radius: inherit; }

/* Barras do dashboard */
.barras { display: flex; align-items: flex-end; gap: .75rem; height: 160px; padding-top: 1.25rem; }
.barras .coluna { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .25rem; }
.barras .barra { width: 100%; max-width: 42px; background: var(--tblr-primary); border-radius: 4px 4px 0 0; }
.barras .coluna:last-child .barra { background: var(--tblr-green); }
.barras .valor { font-size: .75rem; font-weight: 600; }
.barras .rotulo { font-size: .75rem; color: var(--tblr-secondary); }

/* Simulação do WhatsApp */
.celular { max-width: 360px; margin: 0 auto; border: 10px solid #1f2937; border-radius: 32px; overflow: hidden; background: #efeae2; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.celular .topo { background: #075e54; color: #fff; padding: .7rem 1rem; display: flex; align-items: center; gap: .6rem; }
.celular .topo .logo-placeholder { width: 2rem; height: 2rem; border-color: #fff; }
.celular .mensagens { height: 460px; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .4rem; }
.celular .msg { max-width: 82%; padding: .45rem .65rem; border-radius: 8px; font-size: .85rem; line-height: 1.35; white-space: pre-line; box-shadow: 0 1px 1px rgba(0,0,0,.1); color: #111; }
.celular .msg.bot { background: #fff; align-self: flex-start; }
.celular .msg.cidadao { background: #d9fdd3; align-self: flex-end; }
.celular .msg .foto-msg { display: flex; align-items: center; justify-content: center; height: 110px; background: #cbd5e1; border-radius: 6px; margin-bottom: .3rem; font-size: 2rem; color: #475569; }
.celular .digitando { align-self: flex-start; background: #fff; padding: .45rem .8rem; border-radius: 8px; font-size: .8rem; color: #666; }
.celular .rodape { background: #f0f2f5; padding: .5rem; display: flex; gap: .5rem; align-items: center; }
.celular .rodape .campo { flex: 1; background: #fff; border-radius: 20px; padding: .4rem .8rem; color: #999; font-size: .85rem; }

/* Termo de adoção */
.termo { max-width: 800px; margin: 0 auto; background: #fff; color: #111; padding: 2.5rem; font-size: .95rem; line-height: 1.55; }
.termo h1 { font-size: 1.2rem; text-align: center; margin: 1.5rem 0; }
.termo .assinaturas { display: flex; gap: 2rem; margin-top: 3.5rem; }
.termo .assinaturas div { flex: 1; border-top: 1px solid #111; text-align: center; padding-top: .3rem; font-size: .85rem; }

@media print {
  .d-print-none, .navbar, .page-header .btn-list, #toast-root { display: none !important; }
  .page-wrapper { margin: 0 !important; }
  body { background: #fff !important; }
  .termo { padding: 0; }
  /* Resumo para a gestão: 4 cartões por linha, para caber numa folha A4. */
  .resumo-item { flex: 0 0 25%; max-width: 25%; }
  .resumo-item .card-body { padding: .5rem; gap: .5rem !important; }
  .resumo-item .avatar { display: none; }
}

/* Menu lateral recolhível (telas grandes; no celular o Tabler já recolhe).
   Recolhido, vira uma faixa só com ícones; ao passar o mouse, abre por cima da página. */
.btn-recolher-menu { display: none; }
@media (min-width: 992px) {
  .navbar-vertical { transition: width .2s ease; }
  .page-wrapper { transition: margin-left .2s ease; }
  .navbar-vertical .btn-recolher-menu { display: inline-flex; position: absolute; top: 3.2rem; right: .75rem; width: 1.75rem; height: 1.75rem; min-height: 0; padding: 0; color: rgba(255,255,255,.6); z-index: 2; }
  .navbar-vertical .btn-recolher-menu .ti { font-size: 1.15rem; }
  .navbar-vertical .btn-recolher-menu:hover { color: #fff; }
  .btn-recolher-menu .ti-layout-sidebar-left-expand, .btn-recolher-menu .ti-pin { display: none; }
  body.menu-recolhido .btn-recolher-menu .ti-layout-sidebar-left-collapse { display: none; }
  body.menu-recolhido .btn-recolher-menu .ti-layout-sidebar-left-expand { display: inline-block; }

  body.menu-recolhido .navbar-vertical { width: 4.5rem !important; overflow-x: hidden; }
  body.menu-recolhido .page-wrapper { margin-left: 4.5rem !important; }
  body.menu-recolhido .navbar-vertical:not(:hover) .marca-texto,
  body.menu-recolhido.sem-hover .navbar-vertical .marca-texto,
  body.menu-recolhido .navbar-vertical:not(:hover) .nav-link-title,
  body.menu-recolhido.sem-hover .navbar-vertical .nav-link-title,
  body.menu-recolhido .navbar-vertical:not(:hover) .nav-link .badge.bg-purple-lt, body.menu-recolhido.sem-hover .navbar-vertical .nav-link .badge.bg-purple-lt,
  body.menu-recolhido .navbar-vertical:not(:hover) .nav-link .badge.bg-orange-lt, body.menu-recolhido.sem-hover .navbar-vertical .nav-link .badge.bg-orange-lt { display: none; }
  body.menu-recolhido .navbar-vertical:not(:hover) .btn-recolher-menu, body.menu-recolhido.sem-hover .navbar-vertical .btn-recolher-menu { right: 1.375rem; }
  body.menu-recolhido .navbar-vertical:not(:hover) .navbar-brand, body.menu-recolhido.sem-hover .navbar-vertical .navbar-brand { justify-content: center; width: 100%; }
  body.menu-recolhido .navbar-vertical:not(:hover) .nav-link, body.menu-recolhido.sem-hover .navbar-vertical .nav-link { justify-content: center; position: relative; }
  body.menu-recolhido .navbar-vertical:not(:hover) .nav-link-icon, body.menu-recolhido.sem-hover .navbar-vertical .nav-link-icon { margin-right: 0; }
  /* contador da triagem continua visível, sobre o ícone */
  body.menu-recolhido .navbar-vertical:not(:hover) .nav-link .badge.bg-red, body.menu-recolhido.sem-hover .navbar-vertical .nav-link .badge.bg-red { position: absolute; top: .2rem; right: .6rem; font-size: .6rem; padding: .1rem .3rem; }
  body.menu-recolhido:not(.sem-hover) .navbar-vertical:hover { width: 16rem !important; box-shadow: 4px 0 16px rgba(0,0,0,.25); }
  /* aberto pelo mouse: o botão vira alfinete, para fixar o menu aberto */
  body.menu-recolhido:not(.sem-hover) .navbar-vertical:hover .btn-recolher-menu .ti-layout-sidebar-left-expand { display: none; }
  body.menu-recolhido:not(.sem-hover) .navbar-vertical:hover .btn-recolher-menu .ti-pin { display: inline-block; }
}
