
/* Notification Dot */
.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #EF4444;
    border-radius: 50%;
    border: 2px solid white; /* Matches sidebar bg usually */
    z-index: 10;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

/* Sidebar Dark Mode Adjustment */
[data-theme="dark"] .notification-dot {
    border-color: #1a202c;
}

/* Directory Search Styles */
.search-input-wrapper {
    position: relative;
    width: 100%;
}
.search-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.search-input {
    width: 100%;
    padding: 12px 12px 12px 40px !important;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-body);
    transition: all 0.2s;
}
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    background: white;
}
/* Topbar & Dropdowns Styles */
.topbar-wrapper {
    margin-bottom: 24px;
}
.topbar {
    background: #ffffff;
    padding: 12px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Soft shadow */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar-left h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2D3748;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.action-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #A0AEC0;
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-btn:hover {
    background: #F7FAFC;
    color: #7C4DFF;
}

/* Custom Dropdown */
.dropdown-container {
    position: relative;
}
.dropdown-menu-custom {
    position: absolute;
    right: 0;
    top: 150%;
    background: #ffffff;
    width: 240px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.04);
}
.dropdown-menu-custom.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #F0F2F5;
    margin-bottom: 4px;
}
.dropdown-header span {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1A202C;
}
.dropdown-item-custom {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #4A5568;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.dropdown-item-custom:hover {
    background: #F7FAFC;
    color: #7C4DFF;
    padding-left: 24px; /* Slight slide effect */
}
.dropdown-item-custom i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 1rem;
}
.dropdown-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 6px 0;
}
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 4px 8px 4px 4px;
    border-radius: 40px;
    transition: background 0.2s;
}
.user-profile-btn:hover {
    background: #F8F9FA;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C4DFF, #448AFF);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(124, 77, 255, 0.3);
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #2D3748;
    line-height: 1.2;
}
.user-role {
    font-size: 0.75rem;
    color: #718096;
}

/* Utilities */
.text-danger { color: #dc3545 !important; }
.text-success { color: #198754 !important; }
.text-primary { color: #0d6efd !important; }

@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    .topbar {
        padding: 12px 16px;
    }
}

/* Bootstrap-like Utilities for Layout */
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-column { flex-direction: column !important; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.ms-1 { margin-left: 4px !important; }
.ms-2 { margin-left: 8px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.text-muted { color: #A0AEC0 !important; }
.fw-bold { font-weight: 700 !important; }

/* Responsive Visibility */
@media (min-width: 769px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
}
@media (max-width: 768px) {
    .d-md-none { display: block !important; }
    .d-md-block { display: none !important; }
}

/* Sidebar Collapse (Desktop) */
@media (min-width: 769px) {
    .sidebar.collapsed {
        width: 80px;
    }
    /* Hide Text Elements */
    .sidebar.collapsed .nav-link span,
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .sidebar-brand,
    .sidebar.collapsed .logout-btn span,
    .sidebar.collapsed .notification-dot,
    .sidebar.collapsed #sidebar-notif-count
    {
        display: none !important;
    }
    
    /* Center Elements */
    .sidebar.collapsed .sidebar-header {
        padding: 0;
        justify-content: center;
    }
    .sidebar.collapsed .auth-logo i {
        margin: 0 !important;
    }
    .sidebar.collapsed .nav-link {
        justify-content: center;
        padding: 14px 0;
    }
    .sidebar.collapsed .nav-link i {
        margin: 0;
        font-size: 1.4rem;
    }
    .sidebar.collapsed .logout-btn {
        padding: 14px 0;
        justify-content: center;
    }
    .sidebar.collapsed .logout-btn i {
        margin: 0;
    }
    
    /* Adjust Main Content */
    .main-content.expanded {
        margin-left: 80px;
        width: calc(100% - 80px);
    }
}

/* ========================
   New Sidebar Header / Logo
   ======================== */
.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.logo-glass {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: transform 0.3s ease;
}

.logo-glass:hover {
    transform: scale(1.1) rotate(5deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
    white-space: nowrap; /* Prevent wrap */
    opacity: 1;
    transition: opacity 0.2s ease;
}

.brand-text .txt-bold {
    font-family: 'Poppins', sans-serif; /* Explicit font */
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.brand-text .txt-light {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Update Collapsed State for New Logo */
@media (min-width: 769px) {
    .sidebar.collapsed .brand-wrapper {
        justify-content: center;
        gap: 0;
        padding-left: 0;
    }
    
    .sidebar.collapsed .brand-text {
        opacity: 0;
        width: 0;
        display: none !important; /* Force hide */
    }
    
    .sidebar.collapsed .logo-glass {
        width: 40px;
        height: 40px;
        margin: 0;
        filter: drop-shadow(0 0 15px rgba(124, 77, 255, 0.6)); /* Purple glow */
    }
}

/* Update Logo Size - Bigger & Proportional */
.logo-glass {
    width: 58px !important;  /* Increased from 45px */
    height: 58px !important; /* Increased from 45px */
}

/* Update Text Size */
.brand-text .txt-bold {
    font-size: 1.8rem !important; /* Increased from 1.4rem */
    line-height: 1.1;
    margin-bottom: 2px;
}

.brand-text .txt-light {
    font-size: 0.85rem !important; /* Increased from 0.75rem */
    letter-spacing: 3px !important; /* Wider spacing */
}

/* Remove Sidebar Padding */
.sidebar-header {
    padding: 10px 20px !important; /* Tighter padding */
    height: 100px !important; /* Slightly taller container */
}

.brand-wrapper {
    gap: 12px !important; /* Reduce gap slightly due to bigger logo */
}

/* Adjust Collapsed State */
@media (min-width: 769px) {
    .sidebar.collapsed .logo-glass {
        width: 50px !important; /* Bigger collapsed logo */
        height: 50px !important;
    }
}
