/* Brand Logo Customization */
.ss-brand-logo-container {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-direction: row !important;
}

.ss-brand-logo-image {
    height: 30px !important;
    width: auto !important;
    flex-shrink: 0;
}

/* Login Page Specific */
.fi-simple-page .fi-simple-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hide standard sidebar header (logo) since it's now in the top header */
aside.fi-sidebar .fi-sidebar-header {
    display: none !important;
}

/* FULL-WIDTH TOPBAR OVERRIDE */
.fi-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 30 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.dark .fi-topbar {
    background-color: #0f172a !important;
    border-bottom: 1px solid #1e293b !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Adjust sidebar to sit beneath the new full-width topbar - ONLY ON DESKTOP */
@media (min-width: 1024px) {
    .fi-sidebar {
        top: 4rem !important;
        height: calc(100vh - 4rem) !important;
        z-index: 20 !important;
    }
}

/* Ensure mobile sidebar is on top of everything when active */
@media (max-width: 1023px) {
    .fi-sidebar {
        z-index: 50 !important;
    }
}

/* Ensure main content is pushed down so the fixed topbar doesn't cover it */
.fi-main {
    padding-top: 4rem !important;
}

/* Ensuring alignment in the dashboard header/sidebar */
.fi-sidebar-header > a,
.fi-topbar-header > a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

/* ===== WHITE SIDEBAR BACKGROUND ===== */
aside.fi-sidebar,
.fi-sidebar,
.fi-sidebar-nav,
.fi-sidebar-header,
.fi-sidebar-footer {
    background-color: #ffffff !important;
}

.dark aside.fi-sidebar,
.dark .fi-sidebar,
.dark .fi-sidebar-nav,
.dark .fi-sidebar-header,
.dark .fi-sidebar-footer {
    background-color: #0f172a !important;
}
.fi-sidebar {
    border-inline-end: 1px solid #f3f4f6 !important;
}

.dark .fi-sidebar {
    border-inline-end: 1px solid #1e293b !important;
}



.fi-sidebar-item-label {
    font-size: 0.95rem !important;
    font-weight: 400 !important; /* Softens the text so it doesn't look too dark/heavy */
}

.fi-sidebar-item-icon {
    height: 1.25rem !important;
    width: 1.25rem !important;
}

.fi-sidebar-group {
    margin-top: 0.5rem !important;
}

/* ===== KEY FIX: force button to single row ===== */
.fi-sidebar-group-button {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* ===== KEY FIX: label must shrink inside flex ===== */
.fi-sidebar-group-label {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

/* ===== KEY FIX: chevron must not push label down ===== */
.fi-sidebar-group-button svg {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: 1.15rem !important; /* Restored to a larger, default-style size */
    height: 1.15rem !important;
}



/* Global Page Header Heading */
.fi-header-heading {
    font-size: 1.5rem !important;
}
