@import url('https://fonts.googleapis.com/css2?family=DynaPuff:wght@400..700&display=swap');

:root {
  --cor-primaria: rgb(108, 66, 37);
  --cor-primaria-clara: rgb(135, 82, 46);
}

body {
  background-color: #111;
  color: #eee;
  display: flex;
  font-family: 'DynaPuff', sans-serif;
  height: 100vh;
  margin: 0;
}

h1, h2, h3 {
  color: var(--cor-primaria);
}

img {
  border-radius: 1em;
}

button {
  background-color: var(--cor-primaria);
  border: none;
  border-radius: 0.5em;
  color: #eee;
  cursor: pointer;
  font-family: 'DynaPuff', sans-serif;
  font-size: 1em;
  padding: 0.5em 1em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

button:hover {
  background-color: var(--cor-primaria-clara);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--cor-primaria-clara);
  outline-offset: 2px;
}

a {
  color: #eee;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0.5em;
  padding: 0.5em 1em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

a:hover {
  background-color: var(--cor-primaria-clara);
}

a.ativo {
  background-color: var(--cor-primaria);
}

.linha {
  display: flex;
  padding: 1em;
  gap: 1em;
}

.coluna {
  display: flex;
  flex-direction: column;
  padding: 1em;
  gap: 1em;
}

/* Tela de Login */
.login-logo {
  width: 6vw;
  position: absolute;
  top: 4em;
  left: 4em;
}

.login-info {
  flex: 3;
  align-items: center;
  justify-content: center;
}

.login-imagem {
  width: 50%;
}

.login-descricao {
  width: 60%;
  text-align: center;
}

.login-acao {
  flex: 1;
  background-color: #222;
  margin: 1em;
  border-radius: 1em;
  padding: 4em;
}

/* Layout Principal */
.sidebar {
  flex: 1;
  padding: 0;
  justify-content: space-between;
  background-color: #111;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0;
}

.sidebar-brand:hover {
  background-color: transparent;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 0.5em;
}

.sidebar-titulo {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--cor-primaria);
}

.botao-fechar-sidebar {
  display: none;
  background: none;
  padding: 0.5em;
}

.menu {
  gap: 1px;
}

.sidebar-rodape {
  gap: 0.5em;
  padding: 1em;
}

.perfil-selecionado-sidebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #222;
  border-radius: 0.5em;
  padding: 0.5em;
  margin-bottom: 0.5em;
}

.perfil-sidebar-info {
  display: flex;
  align-items: center;
  gap: 0.8em;
  overflow: hidden;
}

.perfil-sidebar-foto {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.perfil-sidebar-nome {
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #eee;
}

.botao-trocar-perfil {
  background: none;
  padding: 0.2em;
  border-radius: 0.3em;
  color: #ccc;
}

.botao-trocar-perfil:hover {
  background-color: #333;
  color: #eee;
}

.conteudo-principal {
  margin: 1em 1em 1em 0;
  padding: 0;
  flex: 3;
}

.cabecalho {
  justify-content: space-between;
  align-items: center;
}

.botao-menu {
  display: none;
  background: none;
  padding: 0.5em;
}

.titulo-pagina {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: var(--cor-primaria);
}

.acoes {
  padding: 0;
}

.conteudo-pagina {
  background-color: #222;
  border-radius: 1em;
  flex-grow: 1;
  padding: 2em;
}

/* Perfis */
.perfis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 250px);
  gap: 1.5em;
  width: 100%;
}

.perfil-card {
  background-color: #333;
  border-radius: 1em;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 250px;
  height: 320px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.perfil-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

@media (max-width: 767px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  }

  .sidebar-aberta .sidebar {
    transform: translateX(0);
  }

  .sidebar-aberta .overlay {
    display: block;
  }

  .botao-fechar-sidebar {
    display: flex;
  }

  .conteudo-principal {
    margin: 0;
  }

  .botao-menu {
    display: flex;
  }

  .login-logo {
    width: 20vw;
    top: 2em;
    left: 2em;
  }

  .login-info {
    flex: none;
  }

  .login-imagem {
    width: 80%;
  }

  .login-descricao {
    width: 90%;
  }

  .login-acao {
    padding: 2em;
    margin: 1em;
  }

.perfil-capa-detalhe {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.perfil-foto-detalhe {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid white;
  object-fit: cover;
}

.perfil-info-detalhe {
  padding: 1rem;
}
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

.perfil-capa {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.perfil-info {
  padding: 1em;
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.perfil-foto {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #333;
  object-fit: cover;
  background-color: #222;
}

.perfil-nome {
  margin: 0.5em 0 0.2em 0;
  color: var(--cor-primaria);
  font-size: 1.2em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perfil-bio {
  font-size: 0.9em;
  color: #ccc;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Menu do Perfil */
.perfil-menu-container {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  z-index: 5;
}

.perfil-menu-botao {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
  color: #eee;
  backdrop-filter: blur(4px);
}

.perfil-menu-botao:hover {
  background: rgba(0, 0, 0, 0.6);
}

.perfil-menu-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background-color: #444;
  border-radius: 0.5em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 10;
  min-width: 160px;
  overflow: hidden;
}

.perfil-menu-dropdown.aberto {
  display: block;
}

.perfil-menu-item {
  padding: 0.8em 1em;
  display: flex;
  align-items: center;
  gap: 0.8em;
  cursor: pointer;
  color: #eee;
  font-size: 0.9em;
  width: 100%;
  background: none;
  border: none;
  border-radius: 0;
  text-align: left;
  justify-content: flex-start;
}

.perfil-menu-item:hover {
  background-color: #555;
}

.perfil-menu-item.remover {
  color: #ff6b6b;
}

.perfil-menu-item.remover:hover {
  background-color: rgba(255, 107, 107, 0.15);
}

.historico {
  margin-top: 2em;
  border-top: 1px solid #444;
  padding-top: 1em;
  color: #eee;
}

.historico h2 {
  color: var(--cor-primaria);
}

/* Contatos e Solicitações */
.contatos-acoes {
  display: flex;
  gap: 0.5em;
  margin-bottom: 1em;
}

.campo-copia-container {
  display: flex;
  gap: 0.5em;
  align-items: center;
}

.campo-copia-container input {
  flex: 1;
}

.secao-solicitacoes {
  margin-top: 2em;
}

.lista-solicitacoes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.item-solicitacao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #333;
  padding: 1em;
  border-radius: 0.5em;
  margin-bottom: 0.5em;
}

.item-solicitacao-info {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  overflow: hidden;
}

.item-solicitacao-id {
  font-size: 0.8em;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Formulários */
.form-perfil {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  max-width: 600px;
  margin: 0 auto;
}

.form-campo {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.form-campo label {
  font-weight: bold;
  color: #ccc;
}

.form-campo input[type="text"],
.form-campo textarea {
  background-color: #333;
  border: 1px solid #444;
  border-radius: 0.5em;
  color: #eee;
  font-family: 'DynaPuff', sans-serif;
  font-size: 1em;
  padding: 0.8em;
}

.form-campo input[type="text"]:focus,
.form-campo textarea:focus {
  outline: none;
  border-color: var(--cor-primaria-clara);
  background-color: #3a3a3a;
}

.form-campo textarea {
  resize: vertical;
  min-height: 100px;
}

/* Custom File Input */
.input-arquivo-container {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  align-items: flex-start;
}

.preview-container {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-top: 0.5em;
}

.preview-imagem {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.5em;
  border: 2px solid #444;
}

.nome-arquivo {
  font-size: 0.9em;
  color: #bbb;
}

/* Chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 400px;
  background-color: #1a1a1a;
  border-radius: 1em;
  margin-top: 2em;
  border: 1px solid #333;
  overflow: hidden;
}

.chat-mensagens {
  flex-grow: 1;
  padding: 1em;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.chat-mensagem {
  max-width: 80%;
  padding: 0.8em 1em;
  border-radius: 1em;
  position: relative;
}

.chat-mensagem p {
  margin: 0;
  word-wrap: break-word;
}

.chat-mensagem-rodape {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3em;
  margin-top: 0.3em;
}

.chat-mensagem-data {
  font-size: 0.7em;
  opacity: 0.6;
}

.chat-mensagem-status {
  font-size: 1.1em !important;
  opacity: 0.6;
}

.chat-mensagem-status.recebida {
  color: #4fc3f7;
  opacity: 1;
}

.chat-mensagem.minha {
  align-self: flex-end;
  background-color: var(--cor-primaria);
  color: #eee;
  border-bottom-right-radius: 0.2em;
}

.chat-mensagem.deles {
  align-self: flex-start;
  background-color: #333;
  color: #eee;
  border-bottom-left-radius: 0.2em;
}

.chat-form {
  display: flex;
  padding: 1em;
  gap: 0.5em;
  background-color: #222;
  border-top: 1px solid #333;
}

.chat-form input {
  flex-grow: 1;
  background-color: #333;
  border: 1px solid #444;
  border-radius: 0.5em;
  color: #eee;
  padding: 0.8em;
  font-family: 'DynaPuff', sans-serif;
}

.chat-form input:focus {
  outline: none;
  border-color: var(--cor-primaria-clara);
}

/* Estilos para Perfil Autenticado standalone */
.perfil-autenticado-body {
  background-color: transparent !important;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.perfil-autenticado-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.perfil-autenticado-icon {
  font-size: 48px !important;
  color: #ccc;
  transition: color 0.2s ease;
}

.perfil-autenticado-icon:hover {
  color: var(--cor-primaria-clara);
}

.perfil-autenticado-foto {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cor-primaria);
  transition: transform 0.2s ease;
}

.perfil-autenticado-foto:hover {
  transform: scale(1.05);
}

/* Estilos para Autenticar standalone */
.autenticar-body {
  background-color: #111;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.autenticar-container {
  background-color: #222;
  border-radius: 1em;
  padding: 3em;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5em;
}

.autenticar-logo {
  width: 80px;
  height: 80px;
}

.autenticar-botoes {
  display: flex;
  gap: 1em;
  width: 100%;
  justify-content: center;
}

.autenticar-botoes button {
  flex: 1;
  justify-content: center;
}
