/* Sidebar Customization */
.fi-sidebar-item-active span {
    color: #10b981 !important;
}

.fi-sidebar-item-active .fi-sidebar-item-icon {
    color: #0056b3 !important;
}

/* Sidebar Header / Brand */
.fi-sidebar-header {
    background: #0c5526 !important;
    border-bottom: 2px solid #066025 !important;
    height: 5rem !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fi-sidebar-header span {
    color: white !important;
}

/* Sidebar Background */
aside.fi-sidebar,
.fi-sidebar>nav {
    background-color: #0c5526 !important;
    border-right: 1px solid #066025 !important;
}

.fi-sidebar-nav {
    background: #0c5526 !important;
}

/* Logo Glow Effect */
.fi-sidebar-header img {
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    transition: filter 0.3s ease;
}

.fi-sidebar-header img:hover {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1));
}

/* Sidebar Text Colors */
.fi-sidebar-item-label,
.fi-sidebar-group-label,
.fi-sidebar-item-icon {
    color: #ffffff !important;
}

.fi-sidebar-item:hover .fi-sidebar-item-label,
.fi-sidebar-item-active .fi-sidebar-item-label {
    color: #ffd700 !important;
}

/* Table Header Customization */
.fi-ta-header-cell {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    font-weight: 700;
}

thead.bg-gray-50 {
    background-color: #ecfdf5 !important;
}

th.fi-ta-header-cell {
    color: #166534 !important;
}

/* Legacy Login Styles Removed - Handled by Custom Blade Views */


/* General Buttons */
.fi-btn-primary {
    background-color: #16a34a !important;
}

.fi-btn-primary:hover {
    background-color: #15803d !important;
}

/* Strong Solid Palette (Non-Pastel) */
.bg-solid-emerald {
    background-color: #059669 !important;
}

.bg-solid-ocean {
    background-color: #1e40af !important;
}

.bg-solid-crimson {
    background-color: #e11d48 !important;
}

.bg-solid-indigo {
    background-color: #4f46e5 !important;
}

.bg-solid-amber {
    background-color: #d97706 !important;
}

.bg-solid-teal {
    background-color: #0d9488 !important;
}

.bg-solid-sidebar {
    background-color: #0c5526 !important;
    /* Sidebar Color match */
}

/* Force High-Contrast White Text for Solid Backgrounds */
[class*="bg-solid-"] .fi-wi-stats-overview-stat-label,
[class*="bg-solid-"] .fi-wi-stats-overview-stat-value,
[class*="bg-solid-"] .fi-wi-stats-overview-stat-description,
[class*="bg-solid-"] .fi-wi-stats-overview-stat-description-icon,
[class*="bg-solid-"] p,
[class*="bg-solid-"] h3,
[class*="bg-solid-"] span,
[class*="bg-solid-"] div {
    color: #ffffff !important;
}

[class*="bg-solid-"] .fi-wi-stats-overview-stat-description {
    opacity: 0.9;
}

/* Stat Card Base Overrides */
.fi-wi-stats-overview-stat {
    border-radius: 1.25rem !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

.fi-wi-stats-overview-stat-label {
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    /* Smaller label, close to sidebar item */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.fi-wi-stats-overview-stat-value {
    font-weight: 900 !important;
    font-size: 1.25rem !important;
    /* Smaller value, more compact */
    letter-spacing: -0.025em;
    line-height: 1.2 !important;
}

/* Catalog Card Custom Theming */
.catalog-card-mature {
    transition: all 0.3s ease !important;
}

.catalog-card-mature:hover {
    transform: scale(1.02) !important;
}

/* Catalog Typography Refinements */
.catalog-card-mature h3 {
    font-size: 0.875rem !important;
    /* 14px to match sidebar */
    line-height: 1.25rem !important;
}

.catalog-card-mature span,
.catalog-card-mature p {
    font-size: 0.75rem !important;
    /* 12px for smaller details */
}

/* Specific overrides for even smaller text if needed */
.catalog-card-mature .tracking-widest {
    font-size: 0.65rem !important;
}

/* Widget Grid Column Overrides */
/* Force 6 columns for macro indicators on md+ screens */
.macro-metrics-row .fi-wi-stats-overview-stats-ctn {
    display: grid !important;
    /* Force 6 columns on medium and above */
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    /* Tighter gap for better fit */
}

/* Fix for small screens to prevent overlap if forced to 6 */
@media (max-width: 1280px) {
    .macro-metrics-row .fi-wi-stats-overview-stats-ctn {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .macro-metrics-row .fi-wi-stats-overview-stats-ctn {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .macro-metrics-row .fi-wi-stats-overview-stats-ctn {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Force 3 columns for CSR stats on md+ screens */
.csr-stats-row .fi-wi-stats-overview-stats-ctn {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 1024px) {
    .csr-stats-row .fi-wi-stats-overview-stats-ctn {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* Catalog Button Modern Black */
.catalog-card-mature .fi-ac-action {
    background-color: #000000 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 0.7rem !important;
    /* ~11px */
    border-radius: 8px !important;
    padding: 8px 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    justify-content: center !important;
}

.catalog-card-mature .fi-ac-action:hover {
    background-color: #222222 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Completed Project Button */
.btn-completed {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 0.65rem !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    border: 1px dashed rgba(255, 255, 255, 0.2) !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: not-allowed !important;
}