/* Fix Header Layout - Force Flexbox */
#header {
    display: flex !important;
    align-items: center;
    height: 65px;
    padding: 0 15px;
    background: #fff;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    z-index: 100;
}

/* Fix Hamburger Menu Button */
#header .hide-menu {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 15px !important;
    position: relative !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Fix Nav Container */
#header nav {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
}

#header .container-fluid {
    display: flex !important;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
}

/* Fix Logo */
#header #logo {
    display: flex !important;
    align-items: center;
    margin-right: 20px;
    height: 100%;
}

#header .logo-text {
    line-height: 1;
    margin: 0;
}

/* Fix Search Bar Area */
#header #top_search {
    margin: 0 !important;
    display: flex;
    align-items: center;
}

/* Fix Right Menu */
#header .navbar-right {
    display: flex;
    align-items: center;
    margin: 0 !important;
    margin-left: auto !important;
    height: 100%;
}

#header .navbar-right>li {
    display: flex;
    align-items: center;
    height: 100%;
}

#header .navbar-right>li>a {
    padding: 0 10px;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Sidebar Fixes */
.sidebar {
    width: 230px !important;
    transition: all 0.3s;
    z-index: 90;
    top: 65px !important;
    /* Push sidebar below header */
    height: calc(100% - 65px) !important;
    /* Adjust height to fit */
    position: fixed !important;
    /* Ensure it stays fixed */
}

body.hide-sidebar .sidebar {
    margin-left: -230px;
}

body.show-sidebar .sidebar {
    margin-left: 0;
}

/* Card Styles */
.simulacao-card {
    margin: 0 auto;
}

/* Sidebar User Profile Enhancements */
.sidebar-user-profile.crm-sidebar-profile {
    padding: 25px 15px 20px;
    /* Increased top padding */
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.crm-profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.crm-profile-image-wrapper {
    margin-bottom: 12px;
    position: relative;
}

.crm-profile-image-wrapper img.staff-profile-image-small {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.crm-profile-info {
    width: 100%;
}

.crm-profile-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.crm-profile-email {
    display: block;
    font-size: 12px;
    color: #64748b;
    word-break: break-all;
}

/* Hide the arrow as it might look weird with centered layout, or adjust it */
.crm-profile-arrow {
    display: none;
}

/* Hover effect */
.sidebar-user-profile.crm-sidebar-profile:hover {
    background: #e2e8f0;
}