

.fi-sidebar *:not(.fi-ta-sidebar-trigger):not(.fi-sidebar-trigger):not(.fi-icon-btn):not(.fi-active) {
    color: #233442;
}


/* Logo styling - Constrain to original header height */
.fi-brand-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 100% !important;
    max-height: 64px !important; /* Original Filament header height */
    padding: 0 !important;
    margin: 0 !important;
}

.fi-brand-logo img {
    height: 100% !important;
    max-height: 64px !important; /* Constrain to original header height */
    width: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Also constrain the topbar height to original */
.fi-topbar {
    background-color: #40B6F4 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    height: 64px !important; /* Force original height */
    min-height: 64px !important;
    max-height: 64px !important;
}

/* Hide the original brand completely - but not our logo container */
.fi-topbar .fi-brand:not(.fi-brand-logo),
.fi-brand:not(.fi-brand-logo),
.fi-topbar [class*="brand"]:not(.fi-brand-logo),
.fi-topbar [data-target*="brand"]:not(.fi-brand-logo),
.fi-logo:not(.fi-brand-logo) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Also hide any brand-related elements - but not our logo */
.fi-topbar a[href*="filament"]:not(.fi-brand-logo),
.fi-topbar a[href="/"]:not(.fi-brand-logo),
.fi-topbar .fi-ta-brand:not(.fi-brand-logo) {
    display: none !important;
}

/* Ensure our logo container stays visible */
.fi-brand-logo {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    width: 260px !important;
    height: auto !important;
}

/* Ensure logo doesn't interfere with header layout */
.fi-brand-logo:has(img) {
    min-width: auto !important;
    width: 260px !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .fi-brand-logo {
        max-height: 56px !important;
    }
    
    .fi-brand-logo img {
        max-height: 56px !important;
    }
    
    .fi-topbar {
        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;
    }
}

@media (max-width: 640px) {
    .fi-brand-logo {
        max-height: 48px !important;
    }
    
    .fi-brand-logo img {
        max-height: 48px !important;
    }
    
    .fi-topbar {
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
    }
}

/* Global font to Poppins */
* {
    font-family: 'Poppins', sans-serif !important;
}

/* Main content background */
.fi-main,
main,
.fi-content,
.fi-page {
    background-color: #F4F9FE !important;
}

/* Force light mode and hide theme toggle */
html, html *, .fi-topbar, .fi-sidebar, body {
    color-scheme: light !important;
}

/* Hide theme toggle button */
.fi-theme-toggle {
    display: none !important;
}

/* Hide any theme-related menu items */
.fi-dropdown-panel [data-theme-toggle],
.fi-dropdown-panel [data-theme] {
    display: none !important;
}

/* Force light mode for all elements - Override any dark mode styles */
:root:not(.dark),
:root,
.light,
.light * {
    --tw-bg-opacity: 1 !important;
    --tw-text-opacity: 1 !important;
    --tw-border-opacity: 1 !important;
}

/* Force remove dark class and any dark mode styling */
html.dark,
html.dark *,
.dark,
.dark * {
    color-scheme: light !important;
    background-color: white !important;
    color: rgb(17, 24, 39) !important;
}

/* Theme-aware Filament sidebar and header customization */

/* Force all header text to be white */
.fi-topbar,
.fi-topbar *,
.fi-topbar .fi-link,
.fi-topbar .fi-brand,
.fi-topbar span,
.fi-topbar div,
.fi-topbar button {
    color: white !important;
}

/* Header buttons and links with specific styling */
.fi-topbar .fi-link:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
}

/* Header search and other controls */
.fi-topbar input {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.fi-topbar input::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Header dropdowns and menus - Dark text on light background */
.fi-dropdown-panel * {
    color: rgb(17, 24, 39) !important; /* Dark text for light background */
}

.fi-dropdown-panel .fi-dropdown-item {
    color: rgb(17, 24, 39) !important;
}

.fi-dropdown-panel .fi-dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important; /* Subtle hover */
    color: rgb(17, 24, 39) !important;
}

/* User dropdown menu specific styling */
.fi-user-menu .fi-dropdown-panel .fi-dropdown-item {
    color: rgb(17, 24, 39) !important; /* Dark text */
}

.fi-user-menu .fi-dropdown-panel .fi-dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: rgb(17, 24, 39) !important;
}

/* User menu header section with user info */
.fi-user-menu .fi-dropdown-header * {
    color: rgb(17, 24, 39) !important; /* Dark text */
}

/* Specific targeting for logout button and forms */
.fi-user-menu .fi-dropdown-panel form button,
.fi-user-menu .fi-dropdown-panel form {
    color: rgb(17, 24, 39) !important;
}

/* Force all dropdown text to be dark */
.fi-dropdown-panel [class*="text-"] {
    color: rgb(17, 24, 39) !important;
}

/* Override any remaining white text in dropdowns */
.fi-dropdown-panel *,
.fi-dropdown-panel span,
.fi-dropdown-panel div,
.fi-dropdown-panel button,
.fi-dropdown-panel a {
    color: rgb(17, 24, 39) !important;
}

/* Account Widget - Show user name next to avatar with white text */
.fi-user-menu .fi-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: white !important;
}

.fi-user-menu .fi-link::after {
    content: attr(data-user-name) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: white !important;
}

/* Show name only on larger screens */
@media (min-width: 640px) {
    .fi-ta-user-menu .fi-ta-link::after {
        display: inline !important;
    }
}

@media (max-width: 639px) {
    .fi-ta-user-menu .fi-ta-link::after {
        display: none !important;
    }
}

/* Light mode sidebar styling with custom text color */
.fi-sidebar {
    background-color: rgb(255 255 255) !important;
    box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.fi-sidebar .fi-sidebar-brand {
    background-color: rgb(255 255 255) !important;
    border-bottom: 1px solid rgb(229 231 235) !important;
}

/* Sidebar text color - #233442 */
.fi-sidebar .fi-sidebar-heading {
    color: #233442 !important;
}

.fi-sidebar .fi-sidebar-item {
    color: #233442 !important;
}

.fi-sidebar .fi-sidebar-item.active {
    color: #233442 !important;
}
/* Light mode sidebar hover and active states */
.fi-sidebar .fi-sidebar-item:hover {
    background-color: rgb(243 244 246) !important;
}

.fi-sidebar .fi-sidebar-item.active {
    background-color: rgb(254 243 199) !important; /* Amber 100 for light mode */
}

/* Sidebar item buttons - all states */
.fi-sidebar-item > .fi-sidebar-item-btn {
    padding: 0.75rem 1rem !important; /* Increased padding */
    border-radius: 0.5rem !important; /* Rounded corners */
}

/* Active sidebar item button with very light 40B6F4 */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: rgba(64, 182, 244, 0.1) !important; /* Very light 40B6F4 */
    color: #309DD7 !important; /* Blue text for active menu */
}

/* Active sidebar item button text and icons */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn *,
.fi-sidebar-group.fi-active.fi-collapsible > .fi-sidebar-group-btn * {
    color: #309DD7 !important;
}

/* Sidebar group buttons - all states */
.fi-sidebar-group.fi-collapsible > .fi-sidebar-group-btn {
    padding: 0.75rem 1rem !important; /* Increased padding */
    border-radius: 0.5rem !important; /* Rounded corners */
}

/* Active sidebar item button - background only */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-sidebar-group.fi-active.fi-collapsible > .fi-sidebar-group-btn {
    background-color: rgba(64, 182, 244, 0.1) !important;
}

/* Active sidebar item label - color and bold only */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-group.fi-active.fi-collapsible > .fi-sidebar-group-btn .fi-sidebar-item-label {
    color: #40B6F4 !important;
    font-weight: 600 !important;
    background-color: transparent !important;
}

/* Active sidebar item icons and other elements */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn *,
.fi-sidebar-group.fi-active.fi-collapsible > .fi-sidebar-group-btn * {
    color: #40B6F4 !important;
}

/* Reduce row gap in sidebar navigation groups */
.fi-sidebar-nav-groups {
    gap: 1rem !important; /* 1rem row gap */
}

.fi-sidebar-nav{
    padding-top:0 !important;

}

/* Ensure theme toggle buttons remain visible */
.fi-sidebar .fi-ta-sidebar-trigger,
.fi-sidebar .fi-sidebar-trigger {
    color: #233442 !important;
}

/* Sidebar toggle button color */
.fi-icon-btn.fi-size-md.fi-sidebar-group-collapse-btn,
.fi-sidebar .fi-icon-btn.fi-size-md.fi-sidebar-group-collapse-btn,
.fi-sidebar .fi-icon.fi-size-md {
    color: #40B6F4 !important;
}

/* Target SVG inside toggle button */
.fi-icon-btn.fi-size-md.fi-sidebar-group-collapse-btn svg,
.fi-sidebar .fi-icon-btn.fi-size-md.fi-sidebar-group-collapse-btn svg,
.fi-sidebar .fi-icon.fi-size-md svg {
    color: #40B6F4 !important;
    fill: #40B6F4 !important;
}

/* Subtle transitions for smooth theme switching */
.fi-sidebar,
.fi-sidebar .fi-sidebar-item,
.fi-sidebar .fi-sidebar-brand {
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.fi-ac-btn-action.fi-color-primary{
    color: #FFFFFF !important;
}

/* Custom Topbar Styles */
.fi-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 1rem !important;
}

/* Topbar search, notifications, and user menu */
.fi-topbar input[type="text"] {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

.fi-topbar input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.fi-topbar input[type="text"]:focus {
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

/* Notification and user menu buttons in topbar */
.fi-topbar button {
    color: white !important;
}

.fi-topbar button:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Dropdown menus from topbar */
.fi-topbar .relative > div[x-show] {
    background-color: white !important;
    color: rgb(17, 24, 39) !important;
}

.fi-topbar .relative > div[x-show] * {
    color: rgb(17, 24, 39) !important;
}

/* User details in topbar */
.fi-topbar .text-right p {
    color: white !important;
}

/* Avatar in topbar */
.fi-topbar .rounded-full {
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

/* Ensure dropdowns have proper z-index */
.fi-topbar .relative > div[x-show] {
    z-index: 50 !important;
}

/* Hide the original Filament user menu/avatar */
.fi-user-menu,
.fi-topbar .fi-user-menu,
[data-slot="user-menu"],
.fi-topbar [data-slot="user-menu"] {
    display: none !important;
    visibility: hidden !important;
}

/* Style Filament Global Search in topbar */
.fi-topbar .fi-global-search-field {
    /* background-color: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important; */
    color: #111827 !important;
}

.fi-topbar .fi-global-search-field::placeholder {
    color: #6b7280 !important;
}

.fi-topbar .fi-global-search-field:focus {
    background-color: white !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}

/* Override the general .fi-topbar input color for search field */
.fi-topbar .fi-global-search input {
    color: #111827 !important;
}

.fi-topbar .fi-global-search input::placeholder {
    color: #6b7280 !important;
}

.fi-topbar .fi-global-search-field svg {
    color: #374151 !important;
}

/* Fix global search field icons - ensure they are visible in the input */
.fi-topbar .fi-global-search-field .fi-icon {
    color: #374151 !important;
    fill: #374151 !important;
}

/* Global search results dropdown */
.fi-global-search-results {
    background-color: white !important;
    color: #111827 !important;
}

.fi-global-search-results * {
    color: #111827 !important;
}

/* Fix global search dropdown icons */
.fi-global-search-results svg,
.fi-global-search-results [data-icon],
.fi-global-search-results i {
    color: #374151 !important;
    stroke: #374151 !important;
    fill: #374151 !important;
}