:root {
  --cor-primaria: #0A1A2F;
  --cor-destaque: #F4741F;
  --cor-fundo: #F6F6F6;
  --cor-branco: #FFFFFF;
  --cor-texto: #2C2C2C;
  --azul-escuro: #0A1A2F;
  --laranja: #F4741F;
}

body {
  margin: 0;
  font-family: 'Mulish', Arial, sans-serif;
  background: var(--cor-fundo);
  color: var(--cor-texto);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background: var(--azul-escuro);
  color: var(--cor-branco);
  padding: 0;
  box-shadow: 0 2px 16px rgba(10,34,54,0.08);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 72px; /* Alterado de 48px para 72px */
  height: 68px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: -1px;
  margin-right: 20px;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  position: relative;
  color: var(--cor-branco);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  border-radius: 2px;
  background: var(--laranja);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(.77,0,.18,1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-profile a {
  position: relative;
  color: var(--cor-branco);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  padding: 4px 0;
}

.nav-profile a::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  border-radius: 2px;
  background: var(--laranja);
  transform: scaleX(0);
  transform-origin: left;

}

.nav-profile a:hover::after,
.nav-profile a.active::after {
  transform: scaleX(1);
}

.nav-profile a.active,
.nav-profile a:hover {
  color: var(--laranja);
}

.nav-links a:hover, 
.nav-profile a:hover {
  color: var(--laranja);
  font-size: 1.08rem;
  font-weight: 500;
  transition: color 0.2s;
}

/* Menu dropdown perfil */
.nav-profile.dropdown {
  position: relative;
  display: inline-block;
}

.profile-btn {
  background: none;
  border: none;
  color: var(--cor-branco);
  font-size: 1em;
  cursor: pointer;
  padding: 8px 16px;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #fff;
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(10,34,54,0.10);
  border-radius:  8px;
  z-index: 10;
  padding: 0;
  margin: 0;
  
}

.dropdown-content a {
  position: relative;
  display: block;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 14px 28px;
  color: #0a2236;
  text-decoration: none;
  border-radius: 0;
  background: none;
  transition: background 0.2s, color 0.2s;
  overflow: hidden;
}

/* Garante que todas as opções, incluindo "Sair", não tenham underline */
.dropdown-content a:visited,
.dropdown-content a:active,
.dropdown-content a:hover {
  text-decoration: none !important;
}

.dropdown-content a:hover,
.dropdown-content a.active {
  background-color: transparent;
}

.nav-profile:hover .dropdown-content {
  display: block;
}
.nav-links .dropdown-content a::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  background: #ff7d1a;
  border-radius: 0;
  transform: scaleX(2);
  transform-origin: right;
  transition: transform 0.2s;
}

.nav-links .dropdown-content a:hover::after {
  transform: scaleX(1);
}

/* Arredondamento só quando hover na 1ª ou última */
.nav-links .dropdown-content a:first-child:hover::after {
  border-bottom-left-radius: 8px;
}
.nav-links .dropdown-content a:last-child:hover::after {
  border-bottom-right-radius: 8px;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.perfil-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  width: 100%;
  background: var(--cor-branco);
  padding: 56px; /* Alterado de 40px para 56px */
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.perfil-flex {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.perfil-campos {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 320px;
}

label {
  font-weight: 500;
  margin-bottom: 4px;
}

input {
  padding: 12px;
  border: 1px solid #dde2e6;
  border-radius: 8px;
  font-size: 1rem;
}

input:focus {
  border-color: var(--cor-destaque);
  outline: none;
}

.button {
  background: var(--cor-destaque);
  color: var(--cor-branco);
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.button:hover {
  background: #e66a12;
}

#foto-perfil {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #ff7d1a;
  background: #fff;
  display: block;
}

.foto-preview {
  width: 120px;
  height: 120px;
  background: #dde2e6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #888;
}

.salvar-btn {
  width: 100%;
  margin-top: 12px;
}

.vincular-contas {
  display: flex;
  gap: 12px;
  margin-top: 0;
}

.vincular-btn {
  flex: 1 1 0;
  width: 50%;
  min-width: 0;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Botão customizado para upload de ficheiro */
.upload-btn-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  margin-top: 10px;
}

.btn-upload {
  background: var(--cor-destaque);
  color: var(--cor-branco);
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  display: block;
  text-align: center;
}

.btn-upload:hover {
  background: #e66a12;
}

.upload-btn-wrapper input[type="file"] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
  height: 100%;
  width: 100%;
}

/* Exemplo de CSS para upload de imagem bonito */

/* Container centralizado e espaçamento elegante */
.upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

/* Preview da imagem em círculo com sombra e efeito de hover */
.upload-preview {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #f5f6fa;
  box-shadow: 0 4px 16px rgba(10,34,54,0.10);
  object-fit: cover;
  object-position: center;
  border: 3px solid #ff7d1a;
  transition: box-shadow 0.3s, border-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.upload-preview:hover {
  box-shadow: 0 8px 32px rgba(10,34,54,0.18);
  border-color: #e86c00;
}

/* Esconde o input padrão */
.upload-input {
  display: none;
}

/* Botão customizado para upload */
.upload-label {
  display: inline-block;
  padding: 10px 32px;
  background: linear-gradient(90deg, #ff7d1a 60%, #ffb86c 100%);
  color: #fff;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(10,34,54,0.08);
  margin-top: 8px;
  border: none;
  outline: none;
}
.upload-label:hover, .upload-label:focus {
  background: linear-gradient(90deg, #e86c00 60%, #ff7d1a 100%);
  box-shadow: 0 4px 16px rgba(10,34,54,0.13);
}

/* Texto de instrução */
.upload-hint {
  color: #888;
  font-size: 0.97rem;
  margin-top: 2px;
  text-align: center;
  font-family: 'Poppins', Arial, sans-serif;
}

/* Responsivo */
@media (max-width: 600px) {
  .upload-preview {
    width: 90px;
    height: 90px;
  }
  .upload-label {
    padding: 8px 18px;
    font-size: 0.95rem;
  }
}

footer {
  background: var(--cor-primaria);
  color: var(--cor-branco);
  text-align: center;
  padding: 20px;
}

@media (max-width: 900px) {
  .perfil-flex {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }
  .perfil-foto {
    align-items: flex-start;
    min-width: 0;
  }
}

/* Dropdown exclusivo do perfil no Editar Perfil */
.perfil-dropdown {
  position: relative;
  display: inline-block;
}

.perfil-dropdown-btn {
  color: #0a2236;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.perfil-dropdown-btn:hover,
.perfil-dropdown-btn.active {
  background: #f5f6fa;
  color: #ff7d1a;
}

.perfil-dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background: #fff;
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(10,34,54,0.10);
  border-radius: 0 0 8px 8px;
  z-index: 10;
  padding: 8px 0;
}

.perfil-dropdown.open .perfil-dropdown-content {
  display: block;
}

.perfil-dropdown-content a {
  position: relative;
  display: block;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 14px 28px;
  color: #0a2236;
  text-decoration: none;
  background: none;
  transition: background 0.2s, color 0.2s;
  overflow: hidden;
}

/* Linha laranja ao hover, da direita para a esquerda */
.perfil-dropdown-content a::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  background: #ff7d1a;
  border-radius: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s;
}

.perfil-dropdown-content a:hover::after {
  transform: scaleX(1);
}

/* Arredondamento só quando hover na 1ª ou última */
.perfil-dropdown-content a:first-child:hover::after {
  border-bottom-left-radius: 8px;
}
.perfil-dropdown-content a:last-child:hover::after {
  border-bottom-right-radius: 8px;
}

.perfil-dropdown-content a:hover {
  background: #f5f6fa;
  color: #ff7d1a;
}
