
/* MOBILE-FIRST: regole di base per mobile */

.navbar-horizontal {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: #1a237e;
  color: #fff;
  display: flex;
  align-items: center;
  z-index: 1300;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 0 1rem;
  font-size: 1rem;
  background: url('/image/25-255428_thumb.png') center center/cover no-repeat;
}
/*
.navbar-horizontal {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: #1a237e;
  color: #fff;
  display: flex;
  align-items: center;
  z-index: 1300;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 0 1rem;
  font-size: 1rem;
  background: url('./images/25-255428_thumb.png') center center/cover no-repeat;
}
  */

.navbar-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-right: 0.5rem;
  max-height: 40px;
}
.navbar-title {
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 1px;
  flex: 1;
}
.navbar-user-horizontal {
 /* position: relative; /* per il dropdown ancorato al trigger */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Sidebar verticale mobile: copre tutto lo schermo */
.navbar-vertical {
  position: fixed;
  left: -100vw;
  top: 30px;
  width: 100vw;
  min-height: 60px;
  background: #1a237e;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  z-index: 1301;
  transition: left 0.3s;
}




/*
.navbar-vertical {
  position: fixed;
  left: -100vw;
  top: 48px;
  width: 100vw;
  min-height: calc(100vh - 48px);
  z-index: 1301;
  transition: left 0.3s;
}
*/


.navbar-vertical.open {
  left: 0;
}
.navbar-vertical-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.navbar-vertical-menu > li {
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.navbar-vertical-menu > li:hover {
  background: #3949ab;
}
/* Overlay */
.navbar-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.2);
  z-index: 999;
}



/* Variante "card" bianca */
.navbar-vertical--card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* sfondo trasparente per mostrare overlay, card interna gestisce lo stile */
  background: transparent;
  
}

@media (min-width: 768px) {
 
 /*
  .navbar-horizontal {
    height: 60px;
    padding: 0 1.5rem;
    font-size: 1.1rem;
  }
*/


  .navbar-title {
    font-size: 1.1rem;
  }
  .user-trigger {
    padding: 8px 12px;
    font-size: 0.95rem;
  }
}

/* Desktop: sposta sotto la navbar desktop e riduci margini */
@media (min-width: 768px) {
  .navbar-vertical {
    top: 30px;
    min-height: calc(100vh - 60px);
   
  }
  .side-card {
    margin: 16px;
    min-width: 280px;
  }
}







.hamburger {
  background: transparent;
  border: none;
  box-shadow: none;
  width: 38px;
  height: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 4px;
  width: 28px;
  background: #fff;
  border-radius: 2px;
}



/* === User menu (trigger a destra) === */
.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #fff; /* utente bianco */
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.9rem; /* font ridotto */
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.user-trigger:hover,
.user-trigger.open {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.45);
}
.user-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arrow {
  margin-left: 2px;
  font-size: 0.85em;
}
/* Icona utente accanto al nome */
.user-icon {
  flex: 0 0 auto;
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 4px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}
/* === Dropdown utente: stile "card" bianca come screenshot === */
.user-dropdown {
  position: absolute;
  top: 52px; /* sotto la barra mobile (48) + margine */
  right: 0;
  min-width: 210px;
  border-radius: 10px;
  padding: 8px 6px;
  z-index: 302;
  /* card bianca */
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
}
@media (min-width: 768px) {
  .user-dropdown {
    top: 66px; /* sotto navbar desktop (60) */
    min-width: 220px;
  }
}
/* Voci del menu utente */
.user-item {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  column-gap: 10px;
  text-align: left;
  background: transparent;
  color: #111827; /* testo scuro */
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.user-item:hover {
  background: #f3f4f6; /* hover grigio chiaro */
}
/* Icona a sinistra della voce */
.user-item-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Riga di Logout in evidenza rosa/rosso */
.user-item.danger {
  color: #ff3366;
}
.user-item.danger .danger-text {
  color: #ff3366;
  font-weight: 600;
}
.user-item.danger:hover {
  background: rgba(255, 51, 102, 0.08);
}

/* Contenitore card interno (lista della sidebar) */
.side-card {
  list-style: none;
  padding: 6px; /* -2px rispetto a prima */
  margin: 10px; /* margine esterno più compatto */
  border-radius: 12px;
  /* LARGHEZZA: PASSA DA 260–280px A ~220–240px */
  min-width: 220px; /* prima 260/280 */
  max-width: 240px; /* blocco la crescita */
  /* card bianca con ombra e bordo leggero */
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
}
/* singola voce della sidebar, con griglia icona + testo */
.side-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
  color: #111827;
}
.side-item:hover {
  background: #f3f4f6; /* hover grigio chiaro */
}
/* icona nella sidebar */
.side-item-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* testo della voce */
.side-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* voce Logout evidenziata */
.side-item.danger,
.side-item .danger-text {
  color: #ff3366;
  font-weight: 600;
}
.side-item.danger:hover {
  background: rgba(255, 51, 102, 0.08);
}


/* === OVERRIDE: tutto bianco per utente a destra === */
.user-trigger,
.user-trigger .user-name,
.user-trigger .arrow {
  color: #fff !important;
}
.user-trigger .user-icon svg {
  fill: #fff !important;
  color: #fff !important;
}
.user-trigger b,
.user-trigger strong {
  color: #fff !important;
}
