/*
  Tema novo (vinho + dourado, cartório) aplicado só à área do usuário logado
  (painel do cliente) — vem depois de estilo.css e só entra em vigor quando o
  body tem a classe "modo-painel" (ver mostrarTela() em app.js), então não
  afeta as telas de login/código/recuperar nem o painel administrativo.
*/

body.modo-painel {
  background: #f7f2e6;
}

body.modo-painel .foto,
body.modo-painel .veu-foto,
body.modo-painel .orbe {
  display: none;
}

/* --- Cabeçalho do painel do cliente --- */

header.topo.topo-cliente {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #faf6ec;
  border-bottom: 1px solid #d4b96a;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.topo-cliente .marca {
  justify-self: start;
}

.topo-cliente .marca img {
  height: 40px;
}

.topo-cliente .titulo-topo {
  justify-self: center;
  font-weight: 700;
  font-size: 18px;
  color: #2b1710;
  white-space: nowrap;
}

.topo-cliente .area-usuario-topo {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topo-cliente .avatar-usuario {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: #4a1410;
  color: #e8d9a8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

.topo-cliente .nome-usuario-topo {
  font-size: 14px;
  font-weight: 600;
  color: #2b1710;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .topo-cliente .nome-usuario-topo {
    display: none;
  }
}

.topo-cliente button#btn-sair {
  border-color: #d4b96a;
  color: #4a1410;
}

.topo-cliente button#btn-sair:hover {
  border-color: #4a1410;
  color: #2c0b08;
}

/* --- Cartões (blocos) --- */

#tela-painel .bloco {
  background: #fffdf8;
  border: 1px solid #ddd0b0;
  border-radius: 8px;
  padding: 24px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

#tela-painel .bloco h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #2b1710;
}

#tela-painel .subtitulo,
#tela-painel .detalhe-cartorio,
#tela-painel .item-correcao,
#tela-painel .caixa-noticias .item-noticia-data {
  color: #6b4a30;
}

/* --- Campos rotulados (Meus dados) --- */

#tela-painel .campo-dado {
  margin-bottom: 14px;
}

#tela-painel .rotulo-dado {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a7b63;
  margin-bottom: 2px;
}

#tela-painel .campo-dado p {
  margin: 0;
  font-weight: 600;
  color: #2b1710;
}

#tela-painel .linha-cartorio {
  border-bottom-color: #ece2c8;
}

#tela-painel .linha-cartorio .nome-cartorio {
  color: #2b1710;
}

#tela-painel .linha-botoes-dados {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* --- Botões --- */

#tela-painel button.primario {
  background: #4a1410;
  color: #e8d9a8;
  border: 1px solid #4a1410;
  border-radius: 6px;
  box-shadow: none;
}

#tela-painel button.primario:hover {
  background: #2c0b08;
  transform: none;
  box-shadow: none;
}

#tela-painel button.secundario {
  width: auto;
  background: #fffdf8;
  border: 1px solid #4a1410;
  color: #4a1410;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  margin-top: 0;
}

#tela-painel button.secundario:hover {
  background: #f3ead8;
  text-decoration: none;
}

#tela-painel button.secundario-forte {
  background: #fffdf8;
  border: 1px solid #4a1410;
  color: #4a1410;
  border-radius: 6px;
}

#tela-painel button.secundario-forte:hover {
  background: #f3ead8;
  border-color: #4a1410;
}

/* --- Tags de filtro (termos, TJs escolhidos) --- */

#tela-painel .tag-filtro {
  background: #f3ead8;
  color: #4a1410;
  border: 1px solid #d4b96a;
}

#tela-painel .tag-filtro button {
  background: rgba(74, 20, 16, 0.12);
  color: #4a1410;
}

#tela-painel .tag-filtro button:hover {
  background: #4a1410;
  color: #e8d9a8;
}

/* --- Caixinhas de marcar (STJ/STF/CNJ, Justiça Federal, LGPD etc.) --- */

#tela-painel input[type="checkbox"] {
  accent-color: #4a1410;
}

/* --- Abas de filtro (Adicionar filtro / Filtros salvos / Buscar agora) --- */

#tela-painel .aba-filtro {
  background: #fffdf8;
  border: 1px solid #4a1410;
  color: #4a1410;
  border-radius: 6px;
}

#tela-painel .aba-filtro.ativa {
  background: #f3ead8;
  border-color: #4a1410;
  color: #2c0b08;
}

#tela-painel .aba-filtro.aba-buscar-agora {
  background: #4a1410;
  color: #e8d9a8;
  border-color: #4a1410;
}

#tela-painel .aba-filtro.aba-buscar-agora:hover,
#tela-painel .aba-filtro.aba-buscar-agora.ativa {
  background: #2c0b08;
  color: #e8d9a8;
  border-color: #2c0b08;
}

/* --- Campos de formulário --- */

#tela-painel label {
  color: #6b4a30;
}

#tela-painel input[type="email"],
#tela-painel input[type="password"],
#tela-painel input[type="text"],
#tela-painel input[type="time"],
#tela-painel input[type="date"],
#tela-painel select,
#tela-painel textarea {
  background: #fffdf8;
  border: 1px solid #ddd0b0;
  border-radius: 6px;
  color: #2b1710;
}

#tela-painel input:focus,
#tela-painel select:focus,
#tela-painel textarea:focus {
  border-color: #4a1410;
  box-shadow: 0 0 0 3px rgba(74, 20, 16, 0.12);
}

/* --- Notícias --- */

#tela-painel .caixa-noticias .item-noticia a {
  color: #2b1710;
}

#tela-painel .caixa-noticias .item-noticia a:hover {
  color: #4a1410;
}

#tela-painel .caixa-noticias .item-noticia {
  border-bottom-color: #ece2c8;
}

/* --- Espaços de banner --- */

#tela-painel .espaco-banner-vazio {
  border-color: #d4b96a;
  background: rgba(255, 255, 255, 0.5);
  color: #8a7b63;
}

/* Encolhe a área toda (mantendo as proporções — nada fica achatado nem cortado) só o suficiente
   pra caber os 3 espaços de banner numa tela cheia sem precisar rolar. Em monitores com mais
   altura (900px ou mais, que é a maioria hoje) não precisa encolher nada — fica no tamanho
   normal, já que a resolução dá espaço de sobra. Só telas mais baixas (tipo notebook 1366×768)
   usam a versão reduzida. */
#tela-painel {
  zoom: 0.85;
}

@media (min-height: 850px) {
  #tela-painel {
    zoom: 1;
  }
}
