/* ---------------------------------------------------
   1. VARIÁVEIS GLOBAIS (IDENTIDADE REKLIMP)
----------------------------------------------------- */
:root {
    --admin-primary: #0277BD;
    --admin-primary-dark: #0D47A1;
    --admin-text: #455A64;
    --admin-bg: #F4F7F6;
    --admin-white: #ffffff;
    --sidebar-width: 260px;
}

/* ---------------------------------------------------
   2. ESTILOS BASE & TOPBAR
----------------------------------------------------- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--admin-bg);
    color: var(--admin-text);
    overflow-x: hidden;
}

.topbar-bg {
    background-color: var(--admin-white);
    border-bottom: 1px solid #e0e6ed;
    height: 70px;
    z-index: 1040;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
}

.hover-bg:hover {
    background-color: #f8f9fa;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Animação do Dropdown */
.animate-slide-in {
    animation: slideIn 0.2s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------------------------------------
   3. SIDEBAR (RESPONSIVO)
----------------------------------------------------- */
.sidebar {
    background-color: var(--admin-white);
    border-right: 1px solid #e0e6ed;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-bottom: 20px;
    position: fixed;
    top: 70px;
    left: -100%;
    width: var(--sidebar-width);
    height: calc(100vh - 70px);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar.show {
    left: 0;
}

@media (min-width: 768px) {
    .sidebar {
        position: sticky !important; 
        top: 70px;
        left: 0;
        height: calc(100vh - 70px);
        box-shadow: none;
        display: block;
        width: var(--sidebar-width) !important;
        min-width: var(--sidebar-width) !important;
    }
}

.sidebar .nav-link {
    font-weight: 500;
    color: #607D8B;
    padding: 14px 20px;
    border-radius: 8px;
    margin: 4px 10px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: var(--admin-primary);
    background-color: rgba(2, 119, 189, 0.05);
}

.sidebar .nav-link.active {
    color: var(--admin-primary);
    background-color: rgba(2, 119, 189, 0.1);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* ---------------------------------------------------
   4. OVERLAY (Fundo escuro no mobile)
----------------------------------------------------- */
#sidebar-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 70px);
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1045;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#sidebar-overlay.show {
    display: block;
}

/* Fix para modais */
#modalIconSelector {
    z-index: 1070 !important;
}

.modal-backdrop.show:nth-of-type(2) {
    z-index: 1060 !important;
    opacity: 0.3;
}