/* =========================================================
   ESTILOS DO LAYOUT PRINCIPAL
   ========================================================= */

:root {
  --phi-text: #191919;
  --phi-accent: #BF6B00;
  --phi-secondary: #615A48;
  --phi-bg: #FFFFFF;
  --phi-font: "Poppins", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--phi-bg);
  color: var(--phi-text);
  font-family: var(--phi-font);
}

a {
  color: var(--phi-accent);
}

.page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- HEADER (FLEXBOX) --- */
header {
  position: relative;
  z-index: 2;
  padding: 15px 18px;
  background: #fff url('/assets/thumbnail.png') no-repeat right center;
  background-size: auto 100%;
  border-bottom: 1px solid rgba(25, 25, 25, 0.08);
}

.header-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--phi-accent);
  letter-spacing: 0.5px;
  text-decoration: none;
}

/* --- PERFIL E AÇÕES DO USUÁRIO --- */
.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  
  /* --- PROTEÇÃO CONTRA A IMAGEM DE FUNDO --- */
  background: rgba(255, 255, 255, 0.85); /* Fundo branco com 85% de opacidade */
  padding: 6px 14px;                     /* Espaçamento interno */
  border-radius: 50px;                   /* Deixa o contorno arredondado (pílula) */
  backdrop-filter: blur(4px);            /* Desfoca a imagem que passar por baixo */
  box-shadow: 0 4px 12px rgba(0,0,0,0.06); /* Sombra suave para dar destaque */
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--phi-accent);
  color: #FFF;
  font-weight: 700;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(191, 107, 0, 0.3);
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(191, 107, 0, 0.4);
}

/* --- MENU DE NAVEGAÇÃO --- */
.main-nav-wrapper {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(25, 25, 25, 0.08);
  backdrop-filter: blur(5px);
}

.main-nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 25px;
  padding: 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  padding: 16px 0;
  color: var(--phi-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover {
  color: var(--phi-text);
}

.main-nav a.active {
  color: var(--phi-accent);
  border-bottom-color: var(--phi-accent);
}

.nav-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* --- Estrutura principal --- */
main {
  position: relative;
  z-index: 1;
  padding: 28px 18px 42px;
  max-width: 1100px;
  margin: 0 auto;
  flex: 1;
  width: 100%;
}

.card {
  background: var(--phi-bg);
  border: 1px solid rgba(25, 25, 25, 0.12);
  border-radius: 14px;
  padding: 28px;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--phi-accent);
  background: var(--phi-accent);
  color: var(--phi-bg);
  transition: opacity 0.2s;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.9;
}

.btn.secondary {
  background: transparent;
  color: var(--phi-secondary);
  border-color: rgba(97, 90, 72, 0.45);
}

.btn.secondary:hover {
  background: rgba(97, 90, 72, 0.05);
  color: var(--phi-text);
}

.btn-sair-header {
  padding: 6px 14px;
  font-size: 13px;
}

footer {
  position: relative;
  padding: 18px;
  color: var(--phi-secondary);
  font-size: 13px;
  border-top: 1px solid rgba(25, 25, 25, 0.12);
  text-align: center;
  background: var(--phi-bg);
}

@media (max-width: 980px) {
  header {
    padding-top: 0;
    background-image: none;
  }

  header::before {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: 16 / 4;
    background: url('/assets/thumbnail.png') no-repeat center;
    background-size: cover;
    margin-bottom: 12px;
  }

  .brand {
    font-size: 18px;
  }
}