/* Navigation Fixes */

/* Fix logo display */
.navbar-brand img,
.logo img,
header img[src*="logo"] {
    max-height: 65px;
    width: auto;
    display: block;
}

/* DevExpress logo specific styles */
.header-logo,
.image-item img[src*="logo"],
.dx-i[src*="logo"] {
    max-height: 65px !important;
    width: auto !important;
    height: 65px !important;
    max-width: 220px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Ensure logo container doesn't break */
.image-item.vertically-aligned {
    display: flex !important;
    align-items: center !important;
    padding: 10px 20px !important;
    height: 100% !important;
}

.image-item.vertically-aligned a {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    line-height: 1 !important;
}

.image-item.vertically-aligned img {
    vertical-align: middle !important;
    margin: 0 auto !important;
}

/* Fix header panel height and layout */
.app-header {
    min-height: 80px !important;
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
}

/* Ensure header panel content is vertically centered */
.app-header > div {
    display: flex !important;
    align-items: center !important;
}

.left-block,
.right-block,
.menu-container {
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
}

.left-block {
    flex-shrink: 0 !important;
}

.right-block {
    flex-shrink: 0 !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
}

.menu-container {
    flex: 1 !important;
    justify-content: flex-end !important;
    padding: 0 20px !important;
}

.menu-container > div {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure all menu items are vertically centered */
.header-menu,
.header-menu .dx-menu,
.header-menu .dx-menu-horizontal {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.header-menu .dx-menu-item,
.header-menu .dx-menu-item-wrapper {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.header-menu .dx-menu-item-content {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 15px !important;
}

/* Application menu specific alignment */
.application-menu {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.application-menu .dx-menu-horizontal {
    height: 100% !important;
}

.application-menu .dx-menu-item {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.application-menu .dx-menu-item-content {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

/* Ensure account icon is on the far right */
.right-block .header-menu {
    display: flex !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
}

/* Account icon positioning */
.right-block .item.image-item {
    margin-left: 15px !important;
    display: flex !important;
    align-items: center !important;
}

/* Make navigation links smaller */
.nav-link,
.navbar-nav .nav-link,
.menu-item a,
.dx-menu-item-text {
    font-size: 14px !important;
}

/* Fix user icon with initials alignment */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* User initials styling */
.user-initials,
.account-image,
.account-background .account-image {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background-color: #ED2954 !important;
    background: linear-gradient(135deg, #ED2954 0%, #c91f43 100%) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

/* Account background container */
.account-background {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px !important;
    min-width: 50px !important;
}

/* Ensure proper sizing and display */
.item.image-item .account-background {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    visibility: visible !important;
}

.item.image-item .account-image {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    line-height: 40px !important;
    font-size: 14px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure right menu items are visible */
.right-block .dx-menu-item {
    display: flex !important;
    align-items: center !important;
}

.right-block .dx-menu-item-content {
    display: flex !important;
    align-items: center !important;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* User initials styling */
.user-initials,
.account-image,
.account-background .account-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ED2954 !important;
    background: linear-gradient(135deg, #ED2954 0%, #c91f43 100%) !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Account background container */
.account-background {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

/* Ensure proper sizing and display */
.item.image-item .account-background {
    display: flex;
    align-items: center;
    height: 100%;
}

.item.image-item .account-image {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    line-height: 40px !important;
    font-size: 14px !important;
}

.user-info .text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.user-info .user-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .email {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-container img {
    max-height: 50px;
    height: auto;
    width: auto;
    max-width: 200px;
}

/* Fix account initials circle */
.account-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.account-background {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}
