/* Sidebar Base */
.fi-sidebar {
    background-color: #2b1f1a !important; /* Dark Brown */
}

/* Wood texture background overlay for sidebar (removed due to messy full image) */
.fi-sidebar::after {
    display: none;
}

/* Sidebar Logo */
.fi-sidebar-header {
    background-color: transparent !important;
    z-index: 10;
    position: relative;
    padding-top: 1.5rem !important; /* Push the logo down */
    padding-bottom: 1rem !important;
}

.fi-sidebar-header a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.fi-sidebar-header img {
    height: 3.5rem !important; /* Scale it down slightly to fit perfectly */
    object-fit: contain;
}

/* Sidebar Items */
.fi-sidebar-nav {
    z-index: 10;
    position: relative;
}

.fi-sidebar-item-active > a {
    background-color: #8c5230 !important; /* Active gold/brown */
    border-radius: 8px !important;
}

/* Active text and icon color */
.fi-sidebar-item-active .fi-sidebar-item-label,
.fi-sidebar-item-active .fi-sidebar-item-icon {
    color: white !important;
}

/* Sidebar Un-active text and icon */
.fi-sidebar-item-label, 
.fi-sidebar-item-icon {
    color: #e5e7eb !important;
}

.fi-sidebar-item > a:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Topbar */
.fi-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

/* Body / Main Content Area */
.fi-main {
    background-color: #faf9f8 !important; /* Very light cream/grey */
}

/* Specific styling for custom stats widgets */
.dashboard-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.stat-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info h3 {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.stat-info p {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.stat-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.stat-footer {
    margin-top: 15px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-footer.up { color: #10b981; }
.stat-footer.down { color: #f59e0b; }

/* Dashboard Titles */
.fi-header-heading {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
}

.fi-header-subheading {
    font-size: 14px !important;
    color: #666 !important;
}
.fi-header-subheading span {
    color: #8c5230; /* Highlighted 'with your' */
    font-weight: 600;
}

/* Alpine x-show/x-transition sets inline display:block, which overrides
   Tailwind lg:hidden and leaves the mobile sidebar backdrop on desktop. */
@media (min-width: 1024px) {
    .fi-sidebar-close-overlay {
        display: none !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }
}

/* Action modal window was unmounted (e.g. after pagination) but Alpine
   still thinks the modal is open, so only the dark backdrop remains. */
.fi-modal:has(.fi-modal-window.hidden) > .fixed {
    display: none !important;
}
