@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    ---laranja: #FF6A00;
    ---cinza: #ecf0f1;
    ---azul: #2c3e50;
    ---azul-hover: #34495e;
    ---azul-escuro: #1a252f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato', sans-serif;
}

.table-primary th{
    background-color: var(---cinza)!important;
    border: none;
}

.btn-outline-primary{
    border: solid 1px var(---laranja)!important;
    color: var(---laranja)!important;
    background-color: transparent!important;
}

.btn-primary{
    border: solid 1px var(---laranja)!important;
    color: var(---laranja)!important;
    background-color: transparent!important;
}

.btn-primary:hover{
    border: solid 1px var(---laranja)!important;
    background-color: var(---laranja)!important;
    color: black!important;
    
}

.btn-outline-primary:hover{
    border: solid 1px var(---laranja)!important;
    background-color: var(---laranja)!important;
    color: black!important;
}

.hidden{
    display: none;
}

/* Header e Logo */
#div-logo {
    position: fixed;
    height: 10vh;
    width: 100vw;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(---cinza);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    /* border-bottom: 3px solid var(---laranja); */
}

/* Sidebar Principal */
#sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, var(---azul) 0%, var(---azul-escuro) 100%);
    height: 90vh;
    border-radius: 0 0px 0 0;
    position: fixed;
    width: 80px;
    z-index: 999;
    top: 10vh;
    left: 0;
    bottom: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);
}

#sidebar.open-sidebar {
    width: 260px;
}

/* Conteúdo da Sidebar */
#sidebar_content {
    padding: 8px 6px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Área do Usuário */
#user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 8px;
    /* background: rgba(255, 255, 255, 0.1); */
    border-radius: 10px;
    backdrop-filter: blur(10px);
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
}

#user i {
    font-size: 20px;
    color: var(---cinza);
    background: var(---laranja);
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#user_infos {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    flex: 1;
}

.nav-user {
    font-weight: 700;
    font-size: 16px;
    color: var(---cinza);
}

.nav-permin {
    font-size: 12px;
    color: var(---laranja) !important;
    font-weight: 600;
}

/* Itens do Menu */
#side_items {
    display: flex;
    flex-direction: column;
    gap: 3px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-item {
    position: relative;
    margin: 1px 4px;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.side-item > a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: var(---cinza);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
    position: relative;
    min-height: 40px;
}

.side-item > a i {
    font-size: 18px;
    width: 24px;
    height: 24px;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.side-item:hover > a i {
    transform: scale(1.1);
    color: var(---laranja);
}

.side-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
    border-radius: 6px;
    /* REMOVER: border-radius: 20px */
}

.side-item.active {
    background: var(---laranja);
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
}

.side-item.active > a {
    color: white;
    font-weight: 600;
}

.side-item.open {
    background: rgba(255, 106, 0, 0.1);
}

/* Submenus */
.sub-items {
    display: none;
    /* background: rgba(44, 54, 63, 0.9); */
    border-radius: 0 0 8px 8px;
    margin: 0 8px 4px 8px;
    padding: 6px 0;
    backdrop-filter: blur(10px);
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
}

.sub-items:not(.hidden) {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: block;
    padding: 10px 20px 10px 45px;
    color: var(---cinza);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    color: var(---laranja);
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(---laranja);
    padding-left: 50px;
}

.dropdown-item.active {
    color: var(---laranja);
    font-weight: 600;
    border-left-color: var(---laranja);
    background: rgba(255, 106, 0, 0.1);
}

.dropdown-item.active::before {
    content: "•";
    position: absolute;
    left: 25px;
    color: var(---laranja);
    font-weight: bold;
}

/* Descrição dos Itens */
.item-description {
    white-space: nowrap;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    line-height: 1.2;
}

#sidebar.open-sidebar .item-description {
    opacity: 1;
    transform: translateX(0);
}

/* Botão de Logout */
#logout {
    padding: 8px 6px; /* REDUZIDO O PADDING */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#logout_btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: rgba(255, 106, 0, 0.1);
    border: 1px solid rgba(255, 106, 0, 0.3);
    color: var(---cinza);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

#logout_btn:hover {
    background: var(---laranja);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.4);
}

#logout_btn a {
    color: inherit;
    text-decoration: none;
    flex: 1;
}

/* Scrollbar Personalizada */
#sidebar_content::-webkit-scrollbar {
    width: 4px;
}

#sidebar_content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#sidebar_content::-webkit-scrollbar-thumb {
    background: var(---laranja);
    border-radius: 10px;
}

#sidebar_content::-webkit-scrollbar-thumb:hover {
    background: #ff8c00;
}

/* Indicador de Menu Aberto */
.side-item.open > a::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(---cinza);
    transition: transform 0.3s ease;
}

.side-item.open > a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Badge para Itens com Submenu */
.has-submenu::before {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(---laranja);
    border-radius: 50%;
    opacity: 0.7;
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding: 100px 10px 10px 10px;
    }

    #sidebar {
        min-width: 60px;
    }

    #sidebar.open-sidebar {
        min-width: 250px;
    }

    .side-item > a {
        padding: 10px 12px;
    }

    .dropdown-item {
        padding: 8px 15px 8px 40px;
    }
}

/* Efeito de Onda */
.side-item > a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.side-item > a:active::before {
    width: 100px;
    height: 100px;
}

/* Loading State */
.side-item.loading > a {
    opacity: 0.7;
    pointer-events: none;
}

.side-item.loading > a::after {
    content: "";
    position: absolute;
    right: 15px;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid var(---laranja);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Classes auxiliares */
.nav-icons-and-palavras {
    color: var(---cinza);
}

/* Estilos originais mantidos */


.dropdown-item:hover{
    color: darkorange;
}

.dropdown-item.active {
    font-weight: bold;
    color: darkorange !important;
    position: relative;
}

.dropdown-item.active::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background-color:#FF6A00;
    border-radius: 50%;
}

main {
    padding: 20px;
    z-index: 1;
    margin-left: 80px;
    margin-top: 10vh;
    transition: margin-left 0.3s ease;
}

#sidebar.open-sidebar ~ main {
    margin-left: 260px;
}

.btn-setor{
    width: 30vh;
    height: 2.8vw;
    font-size: 20px;
    margin-left: 10vw;
}

.sub-items{
    display: flex;
    flex-direction: column;
    display: none;
    margin-top: 0; 
    padding-top: 0; 
}

.sub-items:not(.hidden) {
    display: flex;
    flex-direction: column;
    margin-left: 0px;
    margin-top:0px;
}

.side-item a {
    justify-content: flex-start;
    gap: 12px;
    padding: 8px 10px;
    /* REMOVER: justify-content: center */
}

.side-item.active {
    /* margin-right: 7px; */
    background-color:#FF6A00 ;
}

.side-item.open > a {
    background-color: #1e3a8a;
    color: white;
}

.side-item:hover:not(.active),
#logout_btn:hover {
    /* background-color: #000000;
    margin-right: 7px; */
    border-radius: 20px;
}

.side-item a {
    justify-content: flex-start;
    gap: 14px;
    padding: 8px 12px;
}

.side-item.active a {
    color: #e3e9f7;
}

.side-item a i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    /* REMOVER estilos conflitantes */
}

/* #logout {
    padding: 12px;
}

#logout_btn {
    border: none;
    padding: 12px;
    font-size: 14px;
    display: flex;
    gap: 20px;
    align-items: center;
    border-radius: 8px;
    text-align: start;
    cursor: pointer;
    background-color: transparent;
} */

#open_btn {
    position: absolute;
    top: 30px;
    right: -10px;
    background-color: #4f46e5;
    color: #e3e9f7;
    border-radius: 100%;
    width: 20px;
    height: 20px;
    border: none;
    cursor: pointer;
}

#open_btn_icon {
    transition: transform .3s ease;
}

.btn-outline-primary{
    background-color: #ffffff !important;
}

.open-sidebar #open_btn_icon {
    transform: rotate(180deg);
}

.actions-cell {
    width: 40px;
    padding: 0;
    position: relative;
}

.custom-dropdown {
    display: inline-block;
    position: relative;
}

.dropdown-trigger {
    color: #666;
    padding: 5px 10px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.dropdown-trigger:hover {
    color: #333;
}

.dropdown-options {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    min-width: 140px;
    z-index: 100;
    display: none;
    flex-direction: column;
    padding: 5px 0;
}

.dropdown-options.show {
    display: flex;
}

.dropdown-options a {
    padding: 6px 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-options a:hover {
    background: #f5f5f5;
}

.dropdown-options i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

#user .fa-crown {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    display: inline !important;
}





