/* =========================
   BASE BODY
========================= */
.app-body {
  background: #0f1623;
  color: #fff;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  margin: 0;
}
.with-fixed-header { padding-top: 64px; }

/* =========================
   NAVBAR
========================= */
.app-header {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  min-height: 64px;
  background: #0f1623;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;   /* centra SOLO il contenitore interno */
  z-index: 1000;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* brand a sx, menu a dx */
  width: 100%;
  padding: 0.75rem 2rem;
  box-sizing: border-box;
}

/* Brand */
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .03em;
}
.brand:hover { opacity: .8; }

/* Menu */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  list-style: none;   /* no bullets */
  margin: 0;
  padding: 0;
}
.nav-item { list-style: none; }

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: .45rem .9rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s ease;
  line-height: 1.2;
}
.nav-link:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.15);
}

/* Registrati */
.nav-link.nav-primary {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.25);
}
.nav-link.nav-primary:hover {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.4);
}



.nav-button:hover { background: rgba(255,255,255,.1); }

/* =========================
   MAIN & FOOTER
========================= */
.page-main {
  width: 100%;
  padding: 0;  /* full width */
  margin: 0;
  box-sizing: border-box;
}

.app-footer {
  width: 100%;
  text-align: center;
  padding: 2rem;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  border-top: 1px solid rgba(255,255,255,.1);
  box-sizing: border-box;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 800px) {
  .nav-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  .brand { margin-bottom: .75rem; }
  .nav-list {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .4rem;
  }
  .nav-link {
    font-size: .8rem;
    padding: .4rem .7rem;
  }
  .with-fixed-header { padding-top: 80px; }
}

/* --- Safety overrides se accidentalmente carichi ancora public_portfolio.css in base.html --- */
header.app-header { max-width: none !important; margin: 0 !important; }
main.page-main   { max-width: none !important; margin: 0 !important; }
footer.app-footer{ max-width: none !important; margin: 0 !important; }


/* Uniforma il bottone Logout agli altri link */
.nav-button {
  font-size: .85rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  padding: .45rem .9rem !important;
  border-radius: .5rem !important;
  color: #fff !important;
  display: inline-block !important;
}

.nav-username {
  font-size: .85rem;
  opacity: .8;
  padding: .45rem .9rem;
  border-radius: .5rem;
}
