/* Professional Modern Sidebar Theme for Filament */

:root {
    /* Main Colors */
    --clr-manage: #3b82f6;
    --clr-messaging: #10b981;
    --clr-notifications: #f59e0b;
    --clr-reports: #8b5cf6;
    --clr-users: #ec4899;
    --clr-devices: #06b6d4;
    --clr-settings: #64748b;
    --clr-dashboard: #f43f5e;

    /* Ultra Light Backgrounds (for Hovers/Active) */
    --bg-manage: #eff6ff;
    --bg-messaging: #ecfdf5;
    --bg-notifications: #fffbeb;
    --bg-reports: #f5f3ff;
    --bg-users: #fdf2f8;
    --bg-devices: #ecfeff;
    --bg-settings: #f8fafc;
    --bg-dashboard: #fff1f2;
}

/* Global Sidebar Typography */
.fi-sidebar-nav-item>a,
.fi-sidebar-group-label,
.fi-sidebar-nav-item span {
    font-weight: 550 !important;
    /* Extra Bold as requested */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.fi-sidebar-nav-item>a {
    border-radius: 12px !important;
    margin: 4px 12px !important;
    border: 1px solid transparent;
}

/* Group Specific Styling */

/* --- 1. Dashboard --- */
.fi-sidebar-nav-item a[href$="/admin"] svg,
.fi-sidebar-nav-item a[href*="/dashboard"] svg {
    color: var(--clr-dashboard) !important;
}

.fi-sidebar-nav-item a[href$="/admin"] span,
.fi-sidebar-nav-item a[href*="/dashboard"] span {
    color: var(--clr-dashboard) !important;
}

.fi-sidebar-nav-item a[href$="/admin"]:hover,
.fi-sidebar-nav-item a[href*="/dashboard"]:hover {
    background-color: var(--bg-dashboard) !important;
    border-color: rgba(244, 63, 94, 0.2) !important;
}

.fi-sidebar-nav-item.fi-active:has(a[href$="/admin"])>a,
.fi-sidebar-nav-item.fi-active:has(a[href*="/dashboard"])>a {
    background-color: var(--bg-dashboard) !important;
    box-shadow: 0 4px 12px -2px rgba(244, 63, 94, 0.15);
}

/* --- 2. Manage --- */
.group-manage .fi-sidebar-group-label {
    color: var(--clr-manage) !important;
    opacity: 0.9;
}

.group-manage svg {
    color: var(--clr-manage) !important;
}

.group-manage .fi-sidebar-nav-item span {
    color: var(--clr-manage) !important;
}

.group-manage .fi-sidebar-nav-item>a:hover {
    background-color: var(--bg-manage) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

.group-manage .fi-sidebar-nav-item.fi-active>a {
    background-color: var(--bg-manage) !important;
    box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.15);
}

/* --- 3. Messaging --- */
.group-messaging .fi-sidebar-group-label {
    color: var(--clr-messaging) !important;
    opacity: 0.9;
}

.group-messaging svg {
    color: var(--clr-messaging) !important;
}

.group-messaging .fi-sidebar-nav-item span {
    color: var(--clr-messaging) !important;
}

.group-messaging .fi-sidebar-nav-item>a:hover {
    background-color: var(--bg-messaging) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

.group-messaging .fi-sidebar-nav-item.fi-active>a {
    background-color: var(--bg-messaging) !important;
    box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.15);
}

/* --- 4. Notifications --- */
.group-notifications .fi-sidebar-group-label {
    color: var(--clr-notifications) !important;
    opacity: 0.9;
}

.group-notifications svg {
    color: var(--clr-notifications) !important;
}

.group-notifications .fi-sidebar-nav-item span {
    color: var(--clr-notifications) !important;
}

.group-notifications .fi-sidebar-nav-item>a:hover {
    background-color: var(--bg-notifications) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}

.group-notifications .fi-sidebar-nav-item.fi-active>a {
    background-color: var(--bg-notifications) !important;
    box-shadow: 0 4px 12px -2px rgba(245, 158, 11, 0.15);
}

/* --- 5. Reports --- */
.group-reports .fi-sidebar-group-label {
    color: var(--clr-reports) !important;
    opacity: 0.9;
}

.group-reports svg {
    color: var(--clr-reports) !important;
}

.group-reports .fi-sidebar-nav-item span {
    color: var(--clr-reports) !important;
}

.group-reports .fi-sidebar-nav-item>a:hover {
    background-color: var(--bg-reports) !important;
    border-color: rgba(139, 92, 246, 0.2) !important;
}

.group-reports .fi-sidebar-nav-item.fi-active>a {
    background-color: var(--bg-reports) !important;
    box-shadow: 0 4px 12px -2px rgba(139, 92, 246, 0.15);
}

/* --- 6. Users --- */
.group-users .fi-sidebar-group-label {
    color: var(--clr-users) !important;
    opacity: 0.9;
}

.group-users svg {
    color: var(--clr-users) !important;
}

.group-users .fi-sidebar-nav-item span {
    color: var(--clr-users) !important;
}

.group-users .fi-sidebar-nav-item>a:hover {
    background-color: var(--bg-users) !important;
    border-color: rgba(236, 72, 153, 0.2) !important;
}

.group-users .fi-sidebar-nav-item.fi-active>a {
    background-color: var(--bg-users) !important;
    box-shadow: 0 4px 12px -2px rgba(236, 72, 153, 0.15);
}

/* --- 7. Devices --- */
.group-devices .fi-sidebar-group-label {
    color: var(--clr-devices) !important;
    opacity: 0.9;
}

.group-devices svg {
    color: var(--clr-devices) !important;
}

.group-devices .fi-sidebar-nav-item span {
    color: var(--clr-devices) !important;
}

.group-devices .fi-sidebar-nav-item>a:hover {
    background-color: var(--bg-devices) !important;
    border-color: rgba(6, 182, 212, 0.2) !important;
}

.group-devices .fi-sidebar-nav-item.fi-active>a {
    background-color: var(--bg-devices) !important;
    box-shadow: 0 4px 12px -2px rgba(6, 182, 212, 0.15);
}

/* --- 8. App Settings --- */
.group-settings .fi-sidebar-group-label {
    color: var(--clr-settings) !important;
    opacity: 0.9;
}

.group-settings svg {
    color: var(--clr-settings) !important;
}

.group-settings .fi-sidebar-nav-item span {
    color: var(--clr-settings) !important;
}

.group-settings .fi-sidebar-nav-item>a:hover {
    background-color: var(--bg-settings) !important;
    border-color: rgba(100, 116, 139, 0.2) !important;
}

.group-settings .fi-sidebar-nav-item.fi-active>a {
    background-color: var(--bg-settings) !important;
    box-shadow: 0 4px 12px -2px rgba(100, 116, 139, 0.15);
}

/* Sidebar General Polish */
.fi-sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.fi-sidebar-group-label {
    letter-spacing: 0.1em;
    font-size: 0.80rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.6rem !important;
    padding-left: 3px !important;
    text-transform: uppercase;
}

/* Subtle Active Indicator Dot or Bar */
.fi-sidebar-nav-item.fi-active>a::after {
    content: "";
    position: absolute;
    right: 12px;
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 8px currentColor;
}