/* =========================================================
   VARIABLES
   ========================================================= */
:root{
  --sidebar-w: 330px;
  --header-h: 108px;
}

/* =========================================================
   SHELL LAYOUT (aside + main)
   ========================================================= */
.fv-shell{
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.fv-main{
  min-width: 0;
}

/* =========================================================
   SIDEBAR – BASE (shared)
   ========================================================= */
.fv-sidebar{
  background: #fff;
  padding: 18px;
  border-radius: 22px;
  overflow: auto;
}

.sidebar{
  background: #fff;
  padding: 20px;
}

.sidebar-menu-content{
  display: grid;
  gap: 0;
  height: 35vh;
  position: sticky;
}

.sidebar-actions{
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* =========================================================
   PROFILE
   ========================================================= */
.profile-section{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

section.profile-section .edit-profile-btn {
    cursor: pointer;
}

.profile-section img{
  max-width: 50px;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  height: auto;
}

.profile-meta{
  text-align: left;
}

/* =========================================================
   MENU ITEMS
   ========================================================= */
.dashboard-menu-item{
  height: 55px;
}

.dashboard-menu-item .menu-link{
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 10px 0;
  border-radius: 999px;
  font-size: 16px;
  color: #5c6a94;
  transition: .18s ease;
  padding-left: 15px;
}

.dashboard-menu-item .menu-link:hover{
  background: #EEF2FF;
  color: #111827;
}

.dashboard-menu-item.is-active .menu-link{
  background: #EEF2FF;
  color: #325DE6;
}

.user-svg{
  width: 20px;
  height: auto;
}

.menu-badge-new{
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: #E1E8FECC;
  color: var(--main-primary-color);
}

.menu-badge-soon{
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: #00000014;
  color: #00000099;
}

.dashboard-menu-item.nav-item--disabled-soon .menu-link{
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  filter: saturate(0.7);
}

.dashboard-menu-item.nav-item--disabled-soon .menu-link:hover{
  background: transparent;
  color: #5c6a94;
}

/* =========================================================
   OVERLAY (shared)
   ========================================================= */
.fv-sidebar-mask{
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(17,24,39,.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

/* =========================================================
   DESKTOP BEHAVIOR
   ========================================================= */
@media (min-width: 981px){

  /* pinned sidebar */
  .fv-sidebar{
    position: sticky;
    top: var(--header-h);
    height: calc(100dvh - (var(--header-h) + 32px));
  }

  /* pages that SHOULD NOT show pinned sidebar */
  body:not(.show-side-bar) .fv-shell{
    grid-template-columns: 1fr;
  }

  body:not(.show-side-bar) #fvSidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: min(var(--sidebar-w), 420px);
    transform: translateX(-110%);
    border-radius: 0 22px 22px 0;
    transition: transform .22s ease;
    z-index: 1200;
  }

  body:not(.show-side-bar).is-sidebar-open #fvSidebar{
    transform: translateX(0);
  }

  body:not(.show-side-bar).is-sidebar-open .fv-sidebar-mask{
    opacity: 1;
    pointer-events: auto;
  }
}

/* =========================================================
   MOBILE DRAWER
   ========================================================= */
@media (max-width: 980px){

  .fv-shell{
    grid-template-columns: 1fr;
    gap: 0;
  }

  .fv-sidebar{
    position: fixed;
    top: 0;
    left: 0;
    width: min(var(--sidebar-w), 86vw);
    height: 100dvh;
    transform: translateX(-110%);
    transition: transform .22s ease;
    z-index: 1200;

    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(213,217,231,.9);
    border-radius: 0 22px 22px 0;
    box-shadow: 0 20px 50px rgba(15,23,42,.08);
  }

  body.is-sidebar-open .fv-sidebar{
    transform: translateX(0);
  }

  body.is-sidebar-open .fv-sidebar-mask{
    opacity: 1;
    pointer-events: auto;
  }

  body.is-sidebar-open{
    overflow: hidden;
  }

  body.is-sidebar-open .bottom-user-menu{
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }
}

/* =========================================================
   OPTIONAL
   ========================================================= */
/* =========================================================
   SIDEBAR CLOSE BUTTON (mobile drawer)
   ========================================================= */
.fv-sidebar-close{
   /* desktop default */
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(213,217,231,.9);
  background: rgba(255,255,255,.85);
  place-items: center;
  color: #4b5563;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: 
    background .18s ease,
    color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
  display: none;
}

/* hover / focus */
.fv-sidebar-close:hover{
  background: #EEF2FF;
  color: #325DE6;
  box-shadow: 0 6px 18px rgba(50,93,230,.18);
  transform: scale(1.05);
}

.fv-sidebar-close:active{
  transform: scale(.96);
}

/* =========================================================
   ENABLE ONLY ON MOBILE / DRAWER
   ========================================================= */
@media (max-width: 980px){
  .fv-sidebar-close{
    display: grid;
  }
}
