/* --- BASE LAYOUT --- */
body {
    background-color: #f3f4f6 !important;
}

/* Desktop-only Layout Adjustments */
@media (min-width: 1024px) {
    body:has(.fi-sidebar) {
        padding-inline-start: 21rem !important; /* Sidebar 18rem + Gap 3rem */
    }

    .fi-sidebar {
        position: fixed !important;
        top: 1.5rem !important; /* Aligned with Main Content Top */
        inset-inline-start: 1.5rem !important;
        z-index: 10 !important;
        width: 18rem !important;
        height: calc(100vh - 3rem) !important;
        border-radius: 2rem !important;
    }

    .fi-main,
    .fi-layout main {
        margin: 1.5rem !important; /* Aligned with Sidebar Top */
        border-radius: 2rem !important;
        padding: 2.5rem !important;
        min-height: calc(100vh - 3rem) !important;
    }

    .fi-topbar {
        position: sticky !important;
        top: 1.5rem !important;
        z-index: 20 !important;
        margin: 1.5rem !important;
        border-radius: 1.5rem !important;
    }
}

.dark body {
    background-color: #030712 !important;
}

/* --- SIDEBAR: CLEAN & ALIGNED --- */
.fi-sidebar-header {
    display: none !important; /* Removes the top thing as requested */
}

.fi-sidebar {
    background-color: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(239, 68, 68, 0.1) !important;
}

.dark .fi-sidebar {
    background-color: rgba(31, 41, 55, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Sidebar Items as Pills */
.fi-sidebar-item {
    display: flex !important;
    justify-content: center !important;
    padding-inline: 0.5rem !important;
}
.fi-sidebar-item > a,
.fi-sidebar-item > button {
    border-radius: 9999px !important;
    width: fit-content !important;
    min-width: 15rem !important;
    max-width: calc(100% - 1rem) !important;
    padding-inline: 1.25rem !important;
}

.fi-sidebar-item.fi-active > a,
.fi-sidebar-item.fi-active > button {
    background-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
}

.dark .fi-sidebar-item.fi-active > a,
.dark .fi-sidebar-item.fi-active > button {
    box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.6) !important;
    color: #ef4444 !important;
}

/* --- MAIN CONTENT & TOPBAR --- */
.fi-main,
.fi-layout main {
    background-color: white !important;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05) !important;
}

.dark .fi-main,
.dark .fi-layout main {
    background-color: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
}

.fi-topbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1) !important;
}

.dark .fi-topbar {
    background-color: rgba(17, 24, 39, 0.8) !important;
}

/* --- NEON & GLOW --- */
.fi-header-heading,
h1,
[style*="font-size:1.8rem"] {
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}

.dark .fi-header-heading,
.dark h1,
.dark [style*="font-size:1.8rem"] {
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.6) !important;
}

/* Topbar Glow */
.fi-topbar {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1),
        0 0 15px rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}
.dark .fi-topbar {
    border: 1px solid rgba(239, 68, 68, 0.1) !important;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(239, 68, 68, 0.15) !important;
}

/* Notification & Profile Glow */
.fi-topbar-database-notifications-button button,
.fi-topbar-user-menu-button button {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3) !important;
    transition: all 0.3s ease !important;
}
.fi-topbar-database-notifications-button button:hover,
.fi-topbar-user-menu-button button:hover {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5) !important;
    transform: scale(1.05) !important;
}

.dark .fi-topbar-database-notifications-button button,
.dark .fi-topbar-user-menu-button button {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5) !important;
    transition: all 0.3s ease !important;
}
.dark .fi-topbar-database-notifications-button button:hover,
.dark .fi-topbar-user-menu-button button:hover {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.7) !important;
    transform: scale(1.05) !important;
}

/* Sidebar Icons & Labels Glow */
.fi-sidebar-item-icon {
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.3)) !important;
}
.fi-sidebar-item-label {
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.2) !important;
}

.dark .fi-sidebar-item-icon {
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5)) !important;
}
.dark .fi-sidebar-item-label {
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4) !important;
}

/* Badges Glow */
.fi-badge {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05),
        0 0 12px var(--badge-color, rgba(239, 68, 68, 0.2)) !important;
}

.dark .fi-badge {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05),
        0 0 12px var(--badge-color, rgba(239, 68, 68, 0.4)) !important;
}

.fi-ta-ctn {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1) !important;
}

.dark .fi-ta-ctn {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3) !important;
}

/* Group Labels */
.fi-sidebar-group-label {
    color: #ef4444 !important;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4) !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    margin-top: 1.2rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-thumb {
    background: #ef4444;
    border-radius: 10px;
}
