:root {
--sidebar-width: 270px;
--topbar-height: 72px;
--primary: #176b57;
--primary-dark: #314079;
--primary-soft: #e9f5f1;
--background: #FFFFFF;
--surface: #fff;
--border: #dfe8e5;
--text: #213631;
--muted: #71807c;
--title-text:#5b6b7f;
}

html, body { min-height: 100%; background: var(--background); color: var(--text); }
body { margin: 0; }
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;

  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  flex-direction: column;

  overflow: hidden;
  background: var(--primary-dark);
  color: white;
}

/* Logo fisso in alto */
.sidebar-logo {
  display: flex;
  flex: 0 0 auto;
  min-height: var(--topbar-height);
  align-items: center;
  gap: 0.8rem;
  padding: 0 1.25rem;
  background: var(--background);
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  color: var(--title-text);
}

/* Informazioni utente fisse */
.sidebar-user {
  flex: 0 0 auto;
  padding: 1.25rem;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

/* Solo il menu centrale scorre */
.sidebar-menu {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.25rem 0.9rem;

  overflow-y: auto;
  overflow-x: hidden;

  /* Firefox */
  scrollbar-width: none;

  /* Internet Explorer/vecchio Edge */
  -ms-overflow-style: none;
}

/* Chrome, Safari ed Edge */
.sidebar-menu::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Logout fisso in basso */
.sidebar-footer {
  flex: 0 0 auto;
  padding: 1rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
  background: var(--background);
}


.logo-symbol {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: .8rem;
    background: white;
    color: var(--primary-dark);
    font-weight: 900;
}
.sidebar-user { padding: 1.25rem; border-bottom: 1px solid rgb(255 255 255 / 12%); }
.sidebar-user .user-role { color: rgb(255 255 255 / 65%); }
.sidebar-menu { flex: 1; padding: 1.25rem .9rem; }
.sidebar-menu .menu-label { padding-left: .75rem; color: rgb(255 255 255 / 48%); }
.sidebar-menu .menu-list a {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .2rem;
    padding: .72rem .8rem;
    border-radius: .7rem;
    color: rgb(0 0 0 / 80%);
}
.sidebar-menu .menu-list a:hover,
.sidebar-menu .menu-list a.is-active { background: rgb(255 255 255 / 12%); color: white; }
.nav-icon { width: 1.5rem; text-align: center; }
.sidebar-footer { padding: 1rem; border-top: 1px solid rgb(255 255 255 / 12%); }
.sidebar-footer .button { border: 0; }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.app-topbar {
    position: fixed;
    inset: 0 0 auto var(--sidebar-width);
    z-index: 30;
    display: flex;
    height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 3px 18px rgb(25 56 48 / 5%);
}

.mobile-brand { display: none; }
.menu-toggle { display: none !important; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.topbar-button
{
    position: relative;
    display: grid;
    width: 2.7rem;
    height: 2.7rem;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: white;
    color: var(--text);
    cursor: pointer;
}
.notification-dot
{
    position: absolute;
    top: -.35rem;
    right: -.35rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .28rem;
    border: 2px solid white;
    border-radius: 999px;
    background: #e5484d;
    color: white;
    font-size: .65rem;
    font-weight: 800;
    line-height: 1rem;
    text-align: center;
}

.page-content { padding: calc(var(--topbar-height) + 1.75rem) 1.75rem 2rem; }
.content-container { width: 100%; max-width: 1440px; margin: 0 auto; }
.mobile-overlay { display: none; }


.checklist-box {
  height: 160px;
  overflow-y: auto;
  padding: 0.75rem;
  border: 1px solid #dbdbdb;
  border-radius: 6px;
  background-color: #fff;
}

.checklist-item {
  display: block;
  padding: 0.4rem 0;
}

.checklist-item input {
  margin-right: 0.5rem;
}

@media screen and (max-width: 1023px)
{
    .app-sidebar
    {
        transform: translateX(-100%); transition: transform .22s ease;
    }
    .app-sidebar.is-open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .app-topbar { left: 0; height: 64px; padding: 0 1rem; }
    .mobile-brand { display: flex; }
    .menu-toggle
    {
        display: grid !important;
        place-items: center;
    }
    .mobile-brand { align-items: center; gap: .65rem; font-weight: 800; }
    .desktop-title { display: none; }
    .page-content { padding: calc(64px + 1rem) 1rem 1.5rem; }
    .mobile-overlay
    {
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgb(6 27 22 / 55%);
    }
    .mobile-overlay.is-open { display: block; }
}

/* Recupero password */
.recovery-token-container {
  display: grid;
  grid-template-columns: repeat(6, minmax(2.6rem, 1fr));
  gap: .65rem;
  max-width: 30rem;
  margin: 1rem auto 0;
}
.recovery-token-input {
  min-width: 0;
  height: 3.25rem;
  padding: .4rem;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
}
media. (max-width: 480px) {
  .recovery-token-container { gap: .35rem; }
  .recovery-token-input { height: 2.85rem; font-size: 1.1rem; }
}
