/* =========================================================
   ACERVO — tema "terminal paranormal"
   Mude as cores aqui em cima para dar outra cara ao site.
   ========================================================= */
:root {
  --fundo: #050304;
  --fundoPainel: #0c0708;
  --fosforo: #ff3344;          /* vermelho do monitor */
  --fosforoForte: #ff6070;
  --fosforoApagado: #7a1f27;
  --texto: #e9d8d0;            /* branco osso */
  --textoApagado: #8a6f6c;
  --linha: #2a1215;
  --brilho: 0 0 6px rgba(255, 51, 68, .65), 0 0 18px rgba(255, 51, 68, .25);
  --fonteTerminal: "Share Tech Mono", "Consolas", monospace;
  --fonteTitulo: "VT323", "Consolas", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at center, #140809 0%, var(--fundo) 70%) fixed;
  color: var(--texto);
  font-family: var(--fonteTerminal);
  font-size: 15px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--fosforo); color: #000; }

/* ---------- Efeito de monitor CRT (linhas + vinheta + tremor) ---------- */
.crt::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, .28) 3px
  );
}
.crt::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 101;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .75) 100%);
  animation: tremor 6s infinite;
}
@keyframes tremor {
  0%, 100% { opacity: 1; }
  47% { opacity: 1; }
  48% { opacity: .82; }
  49% { opacity: 1; }
  92% { opacity: .9; }
}

/* barra de varredura que desce pela tela */
.varredura {
  position: fixed;
  left: 0;
  right: 0;
  height: 120px;
  top: -120px;
  pointer-events: none;
  z-index: 99;
  background: linear-gradient(to bottom, transparent, rgba(255, 51, 68, .05), transparent);
  animation: descer 7s linear infinite;
}
@keyframes descer { to { top: 100%; } }

.brilhante { color: var(--fosforo); text-shadow: var(--brilho); }

.cursor {
  display: inline-block;
  width: .6em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--fosforo);
  box-shadow: var(--brilho);
  animation: piscar 1s steps(1) infinite;
}
@keyframes piscar { 50% { opacity: 0; } }

/* título com falha de sinal (glitch) */
.glitch {
  position: relative;
  font-family: var(--fonteTitulo);
  color: var(--fosforo);
  text-shadow: var(--brilho);
  letter-spacing: .06em;
}
.glitch::before, .glitch::after {
  content: attr(data-texto);
  position: absolute;
  inset: 0;
  opacity: .8;
}
.glitch::before {
  color: #00e5ff;
  animation: falhaA 3.5s infinite steps(1);
  clip-path: inset(0 0 60% 0);
}
.glitch::after {
  color: #ff00aa;
  animation: falhaB 2.8s infinite steps(1);
  clip-path: inset(55% 0 0 0);
}
@keyframes falhaA {
  0%, 88%, 100% { transform: none; opacity: 0; }
  89% { transform: translate(-3px, -1px); opacity: .8; }
  92% { transform: translate(3px, 1px); opacity: .8; }
  95% { transform: translate(-1px, 0); opacity: .6; }
}
@keyframes falhaB {
  0%, 80%, 100% { transform: none; opacity: 0; }
  81% { transform: translate(3px, 1px); opacity: .8; }
  84% { transform: translate(-3px, 0); opacity: .8; }
}

/* =========================================================
   LOGIN
   ========================================================= */
.telaLogin {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.terminalLogin {
  width: min(640px, 100%);
  padding: 28px 30px 34px;
  border: 1px solid var(--fosforoApagado);
  background: rgba(12, 7, 8, .85);
  box-shadow: 0 0 0 1px #000, 0 0 40px rgba(255, 51, 68, .12), inset 0 0 60px rgba(255, 51, 68, .05);
  position: relative;
}
.terminalLogin::before {
  content: "TERMINAL 07 // CANAL CRIPTOGRAFADO";
  position: absolute;
  top: -10px;
  left: 18px;
  padding: 0 8px;
  background: var(--fundo);
  color: var(--fosforoApagado);
  font-size: 12px;
  letter-spacing: .15em;
}

.sigilo {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  color: var(--fosforo);
  filter: drop-shadow(0 0 6px rgba(255, 51, 68, .7));
  animation: girar 40s linear infinite;
}
.sigilo .aneis { transform-origin: 50% 50%; animation: girar 14s linear infinite reverse; }
@keyframes girar { to { transform: rotate(360deg); } }

.terminalLogin h1 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 46px;
  line-height: 1;
}

#saidaBoot {
  min-height: 180px;
  margin: 0 0 14px;
  white-space: pre-wrap;
  color: var(--textoApagado);
  font-size: 14px;
  line-height: 1.55;
}
#saidaBoot .ok { color: #6fdc8c; }
#saidaBoot .alerta { color: var(--fosforo); text-shadow: var(--brilho); }

.formLogin { display: none; }
.formLogin.visivel { display: block; animation: aparecer .4s ease-out; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } }

.linhaPrompt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--linha);
}
.linhaPrompt label {
  flex: none;
  color: var(--fosforo);
  text-shadow: var(--brilho);
  letter-spacing: .05em;
}
.linhaPrompt input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--texto);
  font: inherit;
  font-size: 17px;
  caret-color: var(--fosforo);
  letter-spacing: .06em;
}

.botaoTerminal {
  margin-top: 22px;
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--fosforo);
  border: 1px solid var(--fosforo);
  font: inherit;
  font-size: 16px;
  letter-spacing: .3em;
  text-shadow: var(--brilho);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.botaoTerminal:hover, .botaoTerminal:focus-visible {
  background: var(--fosforo);
  color: #000;
  text-shadow: none;
  outline: none;
}

.dicaPular {
  margin-top: 16px;
  text-align: center;
  color: var(--fosforoApagado);
  font-size: 12px;
  letter-spacing: .1em;
}

.resultadoAcesso {
  display: none;
  margin-top: 18px;
  padding: 12px;
  text-align: center;
  font-family: var(--fonteTitulo);
  font-size: 34px;
  letter-spacing: .12em;
}
.resultadoAcesso.negado {
  display: block;
  color: var(--fosforo);
  border: 1px solid var(--fosforo);
  text-shadow: var(--brilho);
  animation: piscarNegado .25s steps(1) 6;
}
.resultadoAcesso.concedido {
  display: block;
  color: #6fdc8c;
  border: 1px solid #6fdc8c;
  text-shadow: 0 0 8px rgba(111, 220, 140, .7);
}
@keyframes piscarNegado { 50% { opacity: .2; } }

/* tremida + flash vermelho ao errar a senha */
.tremer { animation: tremer .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes tremer {
  10%, 90% { transform: translate(-2px, 0); }
  20%, 80% { transform: translate(4px, 1px); }
  30%, 50%, 70% { transform: translate(-7px, -1px) skewX(4deg); }
  40%, 60% { transform: translate(7px, 1px) skewX(-4deg); }
}
.flashVermelho {
  position: fixed;
  inset: 0;
  z-index: 98;
  pointer-events: none;
  background: rgba(255, 0, 30, .35);
  mix-blend-mode: screen;
  animation: sumir .6s ease-out forwards;
}
@keyframes sumir { to { opacity: 0; } }

/* monitor "desligando" ao entrar */
.desligar { animation: desligar .55s ease-in forwards; }
@keyframes desligar {
  0% { transform: scale(1, 1); filter: brightness(1); }
  60% { transform: scale(1, .004); filter: brightness(3); }
  100% { transform: scale(0, .004); filter: brightness(5); }
}

/* =========================================================
   ESTANTE
   ========================================================= */
.topo {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 3, 4, .92);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--linha);
}
.topoLinha {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px 6px;
}
.topoLinha h1 { margin: 0; font-size: 38px; line-height: 1; flex: 1; }
.agente { color: var(--textoApagado); font-size: 13px; letter-spacing: .08em; }
.agente strong { color: var(--texto); font-weight: normal; }
.agente a { color: var(--fosforo); margin-left: 12px; }
.agente a:hover { text-shadow: var(--brilho); }

.linhaComando {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 24px 12px;
}
.linhaComando .caminhoPrompt { color: var(--fosforo); text-shadow: var(--brilho); white-space: nowrap; }
.linhaComando input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--texto);
  font: inherit;
  font-size: 16px;
  caret-color: var(--fosforo);
}
.linhaComando input::placeholder { color: var(--fosforoApagado); }

.barraStatus {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 0;
  color: var(--textoApagado);
  font-size: 12px;
  letter-spacing: .14em;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}
.barraStatus .pontoVivo {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #6fdc8c;
  box-shadow: 0 0 8px #6fdc8c;
  animation: piscar 2s steps(1) infinite;
}

.conteudoEstante { max-width: 1280px; margin: 0 auto; padding: 0 24px 60px; }

.prateleira { margin-top: 30px; }
.cabecalhoPrateleira {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--fosforo);
  text-shadow: var(--brilho);
  letter-spacing: .08em;
  font-size: 14px;
}
.cabecalhoPrateleira .pontilhado {
  flex: 1;
  border-bottom: 1px dotted var(--fosforoApagado);
  transform: translateY(-4px);
}
.cabecalhoPrateleira .quantidade { color: var(--textoApagado); text-shadow: none; }

.grade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 22px 18px;
}

.item {
  display: block;
  position: relative;
  opacity: 0;
  animation: chegar .5s ease-out forwards;
  animation-delay: calc(var(--ordem, 0) * 45ms);
}
@keyframes chegar { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

.capa {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--fundoPainel);
  border: 1px solid var(--linha);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.capa img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* capa "monitorada": tingida de vermelho até passar o mouse */
  filter: grayscale(1) sepia(1) hue-rotate(-50deg) saturate(3.2) brightness(.62) contrast(1.15);
  transition: filter .35s;
}
.capa::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .35) 3px);
  pointer-events: none;
  transition: opacity .3s;
}
.capa .semCapa {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  text-align: center;
  color: var(--fosforoApagado);
  font-size: 12px;
  letter-spacing: .15em;
}
.capa .semCapa .tipoGrande {
  font-family: var(--fonteTitulo);
  font-size: 54px;
  color: var(--fosforo);
  text-shadow: var(--brilho);
  line-height: 1;
}
.capa .abrir {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, .95), transparent);
  color: var(--fosforo);
  text-shadow: var(--brilho);
  font-size: 13px;
  letter-spacing: .12em;
  transform: translateY(100%);
  transition: transform .2s;
  z-index: 2;
}
.codigoArquivo {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 1px 5px;
  background: rgba(0, 0, 0, .75);
  border: 1px solid var(--fosforoApagado);
  color: var(--fosforo);
  font-size: 10px;
  letter-spacing: .12em;
}

.item:hover .capa, .item:focus-visible .capa {
  border-color: var(--fosforo);
  box-shadow: 0 0 0 1px var(--fosforo), 0 0 26px rgba(255, 51, 68, .35);
  transform: translateY(-4px);
}
.item:hover .capa img, .item:focus-visible .capa img { filter: none; }
.item:hover .capa::after { opacity: .35; }
.item:hover .abrir, .item:focus-visible .abrir { transform: none; }
.item:focus-visible { outline: none; }

.nomeLivro {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--texto);
  word-break: break-word;
}
.infoLivro {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--textoApagado);
}

.vazio {
  margin-top: 60px;
  text-align: center;
  color: var(--textoApagado);
  line-height: 1.8;
}
.vazio .brilhante { font-family: var(--fonteTitulo); font-size: 30px; }


/* ---------- Pastas, voltar e prompt com caminho ---------- */
.topoLinha h1 a { color: inherit; }

.linhaComando .caminhoPrompt a { color: var(--fosforo); }
.linhaComando .caminhoPrompt a:hover { color: #fff; text-decoration: underline; }
.linhaComando .separador { color: var(--fosforoApagado); margin: 0 1px; }
.linhaComando .caminhoPrompt { overflow: hidden; text-overflow: ellipsis; max-width: 60%; }

.botaoSom {
  background: transparent;
  border: 0;
  color: var(--textoApagado);
  font: inherit;
  font-size: 13px;
  letter-spacing: .08em;
  cursor: pointer;
}
.botaoSom:hover { color: var(--fosforo); text-shadow: var(--brilho); }
.botaoSom.mudo { color: var(--fosforoApagado); }

.grade { margin-top: 26px; }

/* cartão de pasta: aba no topo + capas dos livros de dentro empilhadas */
.cartaoPasta {
  overflow: visible;
  border-top-left-radius: 0;
  background:
    linear-gradient(160deg, rgba(255, 51, 68, .10), transparent 60%),
    var(--fundoPainel);
}
.cartaoPasta::before {
  content: "";
  position: absolute;
  top: -9px;
  left: -1px;
  width: 42%;
  height: 9px;
  background: var(--fundoPainel);
  border: 1px solid var(--linha);
  border-bottom: 0;
  clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
  transition: border-color .2s;
}
.item:hover .cartaoPasta::before { border-color: var(--fosforo); background: #1a0b0d; }

.pilhaCapas {
  position: absolute;
  inset: 16% 14% 18%;
}
.pilhaCapas img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--fosforoApagado);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .7);
  transition: transform .3s, filter .35s;
}
.pilhaCapas img:nth-child(1) { transform: rotate(-9deg) translate(-6%, 2%); }
.pilhaCapas img:nth-child(2) { transform: rotate(6deg) translate(6%, 1%); }
.pilhaCapas img:last-child { transform: none; }
.item:hover .pilhaCapas img:nth-child(1) { transform: rotate(-16deg) translate(-16%, 3%); }
.item:hover .pilhaCapas img:nth-child(2) { transform: rotate(12deg) translate(16%, 2%); }
.item:hover .pilhaCapas img:last-child { transform: translateY(-4%); }

.cartaoVoltar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  color: var(--fosforoApagado);
  letter-spacing: .15em;
  font-size: 13px;
}
.cartaoVoltar .pontos {
  font-family: var(--fonteTitulo);
  font-size: 80px;
  line-height: .7;
  color: var(--fosforo);
  text-shadow: var(--brilho);
}
.item.voltar:hover .cartaoVoltar { color: var(--fosforo); }
.item.voltar .nomeLivro { color: var(--textoApagado); }

/* =========================================================
   TELA DE LIGAR + BIOS (login)
   ========================================================= */
.monitorDesligado {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: #000;
  cursor: pointer;
  color: var(--fosforoApagado);
  letter-spacing: .25em;
  font-size: 13px;
  text-align: center;
  padding: 20px;
}
.monitorDesligado .botaoPower {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid var(--fosforoApagado);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fosforo);
  transition: box-shadow .2s, border-color .2s;
}
.monitorDesligado:hover .botaoPower { border-color: var(--fosforo); box-shadow: var(--brilho); }
.monitorDesligado .led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff9a1f;
  box-shadow: 0 0 8px #ff9a1f;
  animation: piscar 1.6s steps(1) infinite;
}

/* o "risco" branco do tubo acendendo */
.ligando {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: #fff;
  animation: acender .7s ease-out forwards;
}
@keyframes acender {
  0% { transform: scale(0, .003); opacity: 1; }
  35% { transform: scale(1, .003); opacity: 1; }
  70% { transform: scale(1, 1); opacity: .9; }
  100% { transform: scale(1, 1); opacity: 0; }
}

.telaBios {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding: 34px clamp(16px, 5vw, 60px);
  background: #000;
  color: #c9c3c0;
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
}
.telaBios .cabecalhoBios { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 22px; }
.telaBios .cabecalhoBios .sigiloBios { width: 54px; height: 54px; color: var(--fosforo); flex: none; }
.telaBios .destaqueBios { color: #fff; }
.telaBios .ok { color: #6fdc8c; }
.telaBios .barraBios {
  margin-top: 14px;
  white-space: pre;
  color: var(--fosforo);
  text-shadow: var(--brilho);
}
.telaBios .rodapeBios {
  position: absolute;
  left: clamp(16px, 5vw, 60px);
  bottom: 24px;
  color: #6c6461;
  font-size: 13px;
}
.telaBios.saindo { animation: sumir .35s ease-in forwards; }

/* =========================================================
   LEITOR
   ========================================================= */
.barraLeitor {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(5, 3, 4, .95);
  border-bottom: 1px solid var(--linha);
}
.barraLeitor .tituloLeitor {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--texto);
}
.barraLeitor .tituloLeitor .brilhante { margin-right: 6px; }
.barraLeitor button, .barraLeitor .voltar {
  padding: 5px 11px;
  background: transparent;
  color: var(--fosforo);
  border: 1px solid var(--fosforoApagado);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.barraLeitor button:hover, .barraLeitor .voltar:hover {
  border-color: var(--fosforo);
  box-shadow: 0 0 10px rgba(255, 51, 68, .35);
}
.barraLeitor .contador { color: var(--textoApagado); font-size: 13px; min-width: 84px; text-align: center; }
.barraLeitor input[type=number] {
  width: 64px;
  padding: 5px;
  background: transparent;
  color: var(--texto);
  border: 1px solid var(--fosforoApagado);
  font: inherit;
}

#paginas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 22px 8px 80px;
  user-select: none;
}
.pagina {
  max-width: 100%;
  background: #1a1112;
  box-shadow: 0 0 0 1px var(--linha), 0 6px 30px rgba(0, 0, 0, .8);
}
.pagina canvas { display: block; max-width: 100%; height: auto; }

#leitorEpub {
  height: calc(100vh - 52px);
  max-width: 900px;
  margin: 0 auto;
  background: #efe7da;
}

.carregando {
  padding: 60px 20px;
  text-align: center;
  color: var(--fosforo);
  text-shadow: var(--brilho);
  letter-spacing: .15em;
}

@media (max-width: 640px) {
  .topoLinha, .linhaComando, .barraStatus, .conteudoEstante { padding-left: 16px; padding-right: 16px; }
  .topoLinha h1 { font-size: 30px; }
  .agente strong { display: none; }
  .grade { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px 12px; }
  .terminalLogin { padding: 24px 18px 28px; }
  .terminalLogin h1 { font-size: 36px; }
  .barraLeitor .tituloLeitor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .item { opacity: 1; }
}

@media print { body { display: none; } }

/* na pasta o cartão não corta o conteúdo (por causa da aba),
   então o "> ENTRAR_" aparece por opacidade em vez de deslizar */
.cartaoPasta .abrir { transform: none; opacity: 0; transition: opacity .2s; }
.item:hover .cartaoPasta .abrir, .item:focus-visible .cartaoPasta .abrir { opacity: 1; }

/* ---------- Evidências (imagens) ---------- */
.etiquetaNovo {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  padding: 1px 6px;
  background: var(--fosforo);
  color: #000;
  font-size: 10px;
  letter-spacing: .15em;
  box-shadow: var(--brilho);
  animation: piscar 1.2s steps(1) infinite;
}

/* foto revelada, presa com fita: parece prova em quadro de investigação */
.evidencia .capa {
  padding: 9px 9px 30px;
  background: #d8cfc3;
  border-color: #3a2a26;
  transform: rotate(-1.6deg);
}
.evidencia:nth-child(even) .capa { transform: rotate(1.4deg); }
.evidencia .capa img { object-fit: cover; }
.evidencia .capa::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 3;
  width: 46%;
  height: 16px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 245, 220, .55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.evidencia .capa .semCapa { background: #120a0b; inset: 9px 9px 30px; }
.evidencia .codigoArquivo { top: auto; bottom: 6px; left: 9px; background: transparent; border-color: #8a3a3a; color: #6b1a22; }
.evidencia .etiquetaNovo { top: 14px; right: 14px; }
.evidencia .abrir { bottom: 30px; left: 9px; right: 9px; }
.item.evidencia:hover .capa, .item.evidencia:focus-visible .capa { transform: rotate(0) translateY(-4px) scale(1.03); }

/* ---------- Visualizador de evidência ---------- */
.palcoEvidencia {
  min-height: calc(100vh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px 40px;
  overflow: auto;
}
.molduraEvidencia {
  position: relative;
  max-width: 100%;
  padding: 12px 12px 46px;
  background: #d8cfc3;
  box-shadow: 0 0 0 1px #3a2a26, 0 20px 60px rgba(0, 0, 0, .85), 0 0 50px rgba(255, 51, 68, .12);
}
.molduraEvidencia img {
  display: block;
  max-width: min(100%, 1400px);
  max-height: calc(100vh - 170px);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  animation: revelar 1.3s ease-out both;
}
.molduraEvidencia.ampliada img { max-width: none; max-height: none; cursor: zoom-out; }
.molduraEvidencia .legenda {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4a2a26;
  font-size: 13px;
  letter-spacing: .1em;
}
.molduraEvidencia .carimbo {
  color: #a3141f;
  border: 2px solid #a3141f;
  padding: 0 6px;
  transform: rotate(-4deg);
  font-weight: bold;
}
/* a linha de varredura que passa revelando a foto */
.linhaRevela {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 3px;
  top: 12px;
  background: var(--fosforoForte);
  box-shadow: 0 0 14px 4px rgba(255, 51, 68, .7);
  animation: varrer 1.3s ease-out forwards;
  pointer-events: none;
}
@keyframes revelar {
  0% { clip-path: inset(0 0 100% 0); filter: brightness(2) grayscale(1); }
  100% { clip-path: inset(0 0 0 0); filter: none; }
}
@keyframes varrer {
  0% { top: 12px; opacity: 1; }
  95% { top: calc(100% - 46px); opacity: 1; }
  100% { top: calc(100% - 46px); opacity: 0; }
}
.barraLeitor .numeroEvidencia { color: var(--fosforo); text-shadow: var(--brilho); white-space: nowrap; }
.barraLeitor button:disabled { opacity: .3; cursor: default; box-shadow: none; }
.evidencia .abrir { transform: none; opacity: 0; transition: opacity .2s; }
.item.evidencia:hover .abrir, .item.evidencia:focus-visible .abrir { opacity: 1; }

/* =========================================================
   ONLINE, VISTO POR, RESTRITO, ALERTAS
   ========================================================= */
.botaoQuadro {
  color: var(--fosforo);
  font-size: 13px;
  letter-spacing: .08em;
}
.botaoQuadro:hover { text-shadow: var(--brilho); }

.agentesOnline strong { color: #6fdc8c; font-weight: normal; text-shadow: 0 0 6px rgba(111, 220, 140, .6); }
.agentesOnline { cursor: help; }

.vistoContagem { color: var(--fosforo); cursor: help; }

.seloRestrito {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  padding: 1px 6px;
  border: 1px solid #ffb020;
  color: #ffb020;
  background: rgba(0, 0, 0, .8);
  font-size: 10px;
  letter-spacing: .15em;
}
.infoRestrita { margin-top: 2px; font-size: 11px; color: #ffb020; letter-spacing: .05em; }

.barraLeitor .vistoPor {
  color: var(--textoApagado);
  font-size: 12px;
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34%;
}

.alertasAcervo {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}
.alertaNovo {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 34px 10px 10px;
  background: rgba(8, 3, 4, .96);
  border: 1px solid var(--fosforo);
  box-shadow: 0 0 0 1px #000, 0 0 30px rgba(255, 51, 68, .35);
  color: var(--texto);
  animation: chegarAlerta .45s cubic-bezier(.2, 1.4, .4, 1) both, pulsarAlerta 1.2s ease-in-out 3;
}
.alertaNovo img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--fosforoApagado);
}
.alertaNovo .tituloAlerta { color: var(--fosforo); text-shadow: var(--brilho); font-size: 13px; letter-spacing: .1em; }
.alertaNovo .nomeAlerta { margin-top: 2px; font-size: 15px; }
.alertaNovo .pastaAlerta { margin-top: 2px; font-size: 11px; color: var(--textoApagado); }
.alertaNovo .fecharAlerta {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: 0;
  color: var(--textoApagado);
  font-size: 18px;
  cursor: pointer;
}
.alertaNovo.saindo { animation: sumir .5s ease-in forwards; }
@keyframes chegarAlerta { from { transform: translateX(120%); opacity: 0; } }
@keyframes pulsarAlerta { 50% { box-shadow: 0 0 0 1px #000, 0 0 50px rgba(255, 51, 68, .7); } }

/* =========================================================
   QUADRO DE INVESTIGAÇÃO
   ========================================================= */
.paginaQuadro { overflow: hidden; height: 100vh; }

.barraFerramentas { flex-wrap: wrap; row-gap: 6px; }
.ferramenta {
  padding: 4px 10px;
  background: transparent;
  color: var(--fosforo);
  border: 1px solid var(--fosforoApagado);
  font: inherit;
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
}
.ferramenta:hover { border-color: var(--fosforo); box-shadow: 0 0 10px rgba(255, 51, 68, .35); }
.ferramenta.ativo { background: var(--fosforo); color: #000; box-shadow: var(--brilho); }
.ferramenta.perigo { color: #ffb020; border-color: #6a4a10; margin-left: auto; }

.barraStatusQuadro { padding-top: 8px; padding-bottom: 8px; }
.dicaQuadro { color: var(--fosforoApagado); }

.areaQuadro {
  position: relative;
  height: calc(100vh - 136px);
  overflow: auto;
  border-top: 1px solid var(--linha);
  cursor: grab;
}

/* cortiça escura com grade */
.quadro {
  position: relative;
  width: 3200px;
  height: 2200px;
  background:
    radial-gradient(circle at 20% 30%, rgba(120, 70, 40, .10), transparent 40%),
    radial-gradient(circle at 75% 65%, rgba(120, 30, 30, .10), transparent 45%),
    repeating-linear-gradient(0deg, rgba(255, 51, 68, .05) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, rgba(255, 51, 68, .05) 0 1px, transparent 1px 80px),
    radial-gradient(rgba(255, 220, 180, .035) 1px, transparent 1.5px) 0 0 / 7px 7px,
    #170d0b;
}

.camadaFios {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.camadaFios .fio {
  fill: none;
  stroke: #d0182a;
  stroke-width: 2.6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(255, 40, 60, .55));
}
.camadaFios .sombraFio { fill: none; stroke: rgba(0, 0, 0, .55); stroke-width: 3; }
.camadaFios .cliqueFio {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  pointer-events: stroke;
  cursor: pointer;
}
.camadaFios .cliqueFio:hover { stroke: rgba(255, 51, 68, .25); }

.cartaoQuadro {
  position: absolute;
  z-index: 3;
  transform: rotate(var(--inclinacao, 0deg));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .7);
  touch-action: none;
  cursor: grab;
  transition: transform .15s, box-shadow .15s;
}
.cartaoQuadro:hover { z-index: 4; }
.cartaoQuadro.arrastando {
  z-index: 10;
  cursor: grabbing;
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .85);
  transition: none;
}
.modoFio .cartaoQuadro { cursor: crosshair; }
.modoFio .cartaoQuadro:hover { box-shadow: 0 0 0 2px var(--fosforo), 0 8px 22px rgba(0, 0, 0, .7); }
.cartaoQuadro.escolhido { box-shadow: 0 0 0 3px var(--fosforo), 0 0 30px rgba(255, 51, 68, .6); }

.alfinete {
  position: absolute;
  top: -6px;
  left: 50%;
  z-index: 6;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a8a, #c3141f 45%, #5a0008);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .6);
}

.evidenciaQuadro {
  width: 172px;
  padding: 9px 9px 30px;
  background: #d8cfc3;
}
.evidenciaQuadro .fotoQuadro {
  height: 128px;
  background: #241a18;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.evidenciaQuadro .fotoQuadro img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.evidenciaQuadro .legendaQuadro {
  margin-top: 6px;
  color: #3a2622;
  font-size: 12px;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}
.evidenciaQuadro.restrito .fotoQuadro {
  color: #f3e9dc;
  font-size: 13px;
  letter-spacing: .2em;
  background: repeating-linear-gradient(-45deg, #111 0 12px, #1d1d1d 12px 24px);
}
.evidenciaQuadro.restrito .legendaQuadro { color: #a3141f; font-weight: bold; letter-spacing: .1em; }

.notaQuadro {
  width: 196px;
  min-height: 132px;
  padding: 16px 12px 24px;
  background:
    linear-gradient(90deg, transparent 22px, rgba(195, 20, 31, .35) 22px 23px, transparent 23px),
    repeating-linear-gradient(transparent 0 21px, rgba(60, 90, 140, .18) 21px 22px),
    #ebe1c0;
}
.notaQuadro textarea {
  width: 100%;
  min-height: 92px;
  padding: 0 0 0 16px;
  background: transparent;
  border: 0;
  outline: none;
  resize: vertical;
  color: #2a1c18;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 15px;
  line-height: 22px;
  cursor: text;
}
.notaQuadro textarea::placeholder { color: rgba(42, 28, 24, .45); }

.autorCartao {
  position: absolute;
  right: 9px;
  bottom: 7px;
  color: rgba(58, 38, 34, .65);
  font-size: 10px;
  letter-spacing: .1em;
}
.removerCartao {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 7;
  width: 22px;
  height: 22px;
  border: 0;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.cartaoQuadro:hover .removerCartao { opacity: 1; }
.removerCartao:hover { background: var(--fosforo); }

/* gaveta de evidências */
.gaveta {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 140;
  width: min(340px, 92vw);
  display: flex;
  flex-direction: column;
  background: rgba(8, 4, 5, .98);
  border-left: 1px solid var(--fosforo);
  box-shadow: -10px 0 40px rgba(0, 0, 0, .8);
  animation: abrirGaveta .25s ease-out;
}
@keyframes abrirGaveta { from { transform: translateX(100%); } }
.cabecalhoGaveta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 8px;
  letter-spacing: .1em;
}
.fecharGaveta { background: none; border: 0; color: var(--texto); font-size: 22px; cursor: pointer; }
.filtroGaveta {
  margin: 0 16px 10px;
  padding: 7px 10px;
  background: transparent;
  border: 1px solid var(--fosforoApagado);
  color: var(--texto);
  font: inherit;
}
.listaGaveta { flex: 1; overflow-y: auto; padding: 0 10px 20px; }
.itemGaveta {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
  padding: 7px 6px;
  background: none;
  border: 1px solid transparent;
  color: var(--texto);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.itemGaveta:hover { border-color: var(--fosforoApagado); background: rgba(255, 51, 68, .06); }
.itemGaveta.presoAgora { border-color: #6fdc8c; }
.itemGaveta img { width: 44px; height: 44px; object-fit: cover; flex: none; background: #1a1112; }
.nomeGaveta { display: block; font-size: 14px; }
.pastaGaveta { display: block; font-size: 11px; color: var(--textoApagado); letter-spacing: .05em; }

@media (max-width: 640px) {
  .areaQuadro { height: calc(100vh - 170px); }
  .dicaQuadro { display: none; }
  .ferramenta.perigo { margin-left: 0; }
}
.areaQuadro.movendo { cursor: grabbing; user-select: none; }
.resultadoAcesso.bloqueado { font-size: 26px; color: #ffb020; border-color: #ffb020; text-shadow: 0 0 8px rgba(255, 176, 32, .6); }
.botaoTerminal:disabled, .botaoTerminal:disabled:hover {
  background: transparent;
  color: var(--fosforoApagado);
  border-color: var(--fosforoApagado);
  text-shadow: none;
  cursor: not-allowed;
}
