@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined');

body, html {
    font-family: 'Poppins', sans-serif;
    height: 100%;
}

h1 {
    font-weight: 800;
}

li {
    list-style: none;
}

a {
    text-decoration: none;
}

.wrapper{ 
    display: flex;
}

.main {
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background-color: #fafbfe;
}

#sidebar {
    max-width: 70px;
    min-width: 70px;
    z-index: 1000; /* garante que fique por cima */
    transition: all 0.25s ease-in-out;
    background-color: #003587;
    display: flex;
    flex-direction: column;
}

#sidebar.expand {
    width: 240px;
    min-width: 240px;
}

#sidebar.hovered {
    width: 240px;
    min-width: 240px;
}

#toggle-btn {
    background-color: transparent;
    cursor: pointer;
    border: 0;
    padding: 1rem 1rem;
}

#toggle-btn i {
    font-size: 1.75rem;
    color: #fff;
    display: inline-flex;
    align-items: center; /* alinha verticalmente */
}

.sidebar-logo { 
    margin: auto 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0s;
}

/* Quando o sidebar expande manualmente */
#sidebar.expand .sidebar-logo {
    opacity: 1;
    transition-delay: 0.15s;
}

/* Quando o sidebar aparece só com hover */
#sidebar.hovered .sidebar-logo {
    opacity: 1;
    transition-delay: 0.15s;
}

/* Se o sidebar estiver colapsado, escondemos */
#sidebar:not(.expand):not(.hovered) .sidebar-logo {
    opacity: 0;
    pointer-events: none;
}

.sidebar-logo a {
    color: #FFF;
    font-weight: 600;
    font-size: 1.15rem;
}

.sidebar-logo a img{
    width: 140px;
}

#sidebar:not(.expand):not(.hovered) a.sidebar-link span:not(.icon-google) {
    opacity: 0;
    pointer-events: none;
    transition: all 0.1s ease-in-out;
  }

/* Quando .hovered estiver presente, anular o comportamento acima */
#sidebar.hovered span, #sidebar.hovered .sidebar-logo {
    display: inline-block !important;
    transition: all 1s ease-in-out !important;
}


/******/
/* Span dentro do link */
a.sidebar-link span {
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0.3s;
  }

  /* Quando expandir o sidebar, só então começar o fade-in */
#sidebar.expand a.sidebar-link span {
    opacity: 1;
    transition-delay: 0.25s; /* mesmo tempo da expansão do sidebar */
  }

  /* Se quiser também no hover (quando não estiver expandido) */
#sidebar.hovered a.sidebar-link span {
    opacity: 1;
    transition-delay: 0.5s;
  }

/******/

a.sidebar-link span > .icon-google{
    display: inline-block;
}

.sidebar-nav {
    flex: 1 1 auto;
    padding: 2rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center; /* vertical */
    gap: 0.5rem; /* espaçamento entre ícone e texto */
  }

a.sidebar-link {
    padding: 1.2rem 1.35rem;
    color: #FFF;
    position: relative;
    transition: all 0.35s;
    display: flex;
    font-size: 0.9rem;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

a.sidebar-link:hover{
    background-color: rgba(255, 255, 255, .075);
    border-left: 3px solid #3b7ddd;
}

.sidebar-link i{
    font-size: 1.2rem;
    margin-right: .75rem;
}


.sidebar-item{
    position: relative;
    
}

#sidebar:not(.expand) .sidebar-item .sidebar-dropdown{ 
    position: absolute;
    top: 0;
    left: 70px;
    background-color: #0e2238;
    padding: 0;
    min-width: 15rem;
    display: none;
}

#sidebar:not(.expand) .sidebar-item:hover .has-dropdown+.sidebar-dropdown{
    display: block;
    max-width: 15em;
    width: 100%;
    opacity: 1;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"]::after{
    border: solid;
    border-width: 0 .075rem .075rem 0;
    content: "";
    display: inline-block;
    padding: 2px;
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    transform: rotate(-135deg);
    transition: all .2s ease-out;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"].collapsed::after{
    transform: rotate(45deg);
    transition: all .2s ease-out;
}





.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px; /* ajusta como quiser */
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
  
    /* Essenciais para ativar os ícones */
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
  }

  

/* Screen size less than 768px */

@media (max-width:768px) {

    .sidebar-toggle {
        margin-left: -264px;
    }

    #sidebar.collapsed {
        margin-left: 0;
    }
}
