/*-------------------------------- header ----------------------------------- */

/* ==============================
   TEMA DRACULA
============================== */
:root {
  --bg-main: #282a36;
  --bg-second: #44475a;

  --text-main: #f8f8f2;
  --text-accent: #50fa7b;
  --text-sub: #bd93f9;

  --btn-bg: #6272a4;
  --btn-hover: #50fa7b;
  --btn-text: #f8f8f2;

  --accent: #ff79c6;
  --highlight: #f1fa8c;
  --cyan: #8be9fd;

  --font-main: "Poppins", sans-serif;
}

/* ==============================
   RESET
============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

/* ==============================
   NAVBAR CABEÇALHO
============================== */
header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
  background: var(--bg-main);
  /* ❗ removido sticky */
  position: relative; 
  top: 0;
  z-index: 10; /* não 1000 */

  /* Borda curva e brilho */
  box-shadow: 
      0 3px 8px rgba(0, 0, 0, 0.4),
      0 -1px 0px rgba(255, 255, 255, 0.06) inset,
      0 -4px 12px rgba(0, 200, 255, 0.25);

  border-radius: 0 0 20px 20px;
  overflow: visible; /* permite o toggle sair para fora */
}

/* 🔥 Borda animada usando gradient + suas variáveis */
header::after {
  overflow: hidden;
  pointer-events: none;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;

  background: linear-gradient(
    150deg, 
    var(--text-sub), 
    var(--btn-bg), 
    var(--accent)
  );

  background-size: 300% 100%;
  animation: bordaAnimada 5s linear infinite;
  border-radius: 0 0 20px 20px;
  z-index: -1; /* fica atrás do header REAL  */
}

@keyframes bordaAnimada {
  0% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

/* cada item */
.menu li {
  list-style: none;
  border-radius: 12px;
  padding: 0;
  transition: 0.25s ease;
}

/* Efeito ao passar o mouse */
.menu li:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px var(--accent);
}

/* Animação da borda */
.menu li:hover {
  background: linear-gradient(var(--bg-main), var(--bg-main)) padding-box,
              linear-gradient(150deg, var(--accent), var(--text-accent), var(--text-sub)) border-box;
}

.logo {
  text-decoration: none;
  font-size: 1.7rem;
  font-weight: bold;
  color: var(--accent);
}

.navbar .menu {
  display: flex;
  gap: 14px;
  list-style: none;
  padding: 8px 14px;

  background: rgba(68, 71, 90, 0.35);     /* vidro suave */
  backdrop-filter: blur(10px);
  border-radius: 16px;

  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);

  transition: 0.3s ease;
}

.navbar a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: .3s;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ícones menores */
.menu i {
  font-size: 1rem;
  opacity: 0.8;
  padding: 10px;
}

.navbar a:hover,
.navbar a.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
  box-shadow: 0 0 8px var(--text-sub);
}

/* menu toggle - menu que desaparece */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

.menu-toggle i {
  padding: 6px 10px;
  border-radius: 10px;

  background: rgba(68, 71, 90, 0.35);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);

  transition: .3s;
}

/* Portrait OU Tablet */
@media (orientation: portrait), (min-width: 640px) and (max-width: 1024px) {
  .menu {
    display: none;
    flex-direction: column;
    background: var(--bg-second);
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 15px;
    border-radius: 10px;
  }

  .menu.desactive{
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

/* ==============================
   RESPONSIVO
============================== */
@media(max-width: 900px) {
  .home {
    flex-direction: column;
    text-align: center;
  }

  .image-box img {
    width: 250px;
  }
}

/* ==============================
   SUBMENU (Conta -> Vendas)
============================== */

.submenu {
  position: relative;
}

.submenu .seta {
  margin-left: 6px;
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Caixa do submenu */
.submenu-list {
  display: none;
  position: absolute;
  top: 45px;
  right: 0;

  background: rgba(68, 71, 90, 0.35);

  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 10px;
  list-style: none;

  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);

  animation: fadeSub .25s ease;
  z-index: 2000;
}

@keyframes fadeSub {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.submenu-list li {
  margin: 4px 0;
}

.submenu-list a {
  padding: 8px 12px;
  display: block;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-main);
}

.submenu-list a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

/* Mostrar submenu quando passar o mouse */
.submenu:hover .submenu-list {
  display: block;
}

#user-header-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  margin: auto;
  border: 2px solid var(--text-sub);
  transition: transform 0.2s ease;
}

#user-header-avatar img:hover {
  transform: scale(1.3);
}

/* Mobile — submenu abre igual menu */
@media (orientation: portrait), (min-width: 640px) and (max-width: 1024px) {
  .submenu-list {
    position: static;
    display: none;
    margin-top: 8px;
  }

  .submenu:hover .submenu-list {
    display: block;
  }
}