/* ADDED to change content background */
body {
    background-color: #f4f9fa;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    z-index: 100;
    padding: 0; 
    height: calc(100vh - 60px);
    box-shadow: none; 
    background-color: rgba(244, 247, 250, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add a scrollbar if content overflows */
.sidebar-inner {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 2rem; /* Space at the bottom */
}


/* --- Sidebar navigation --- */
.sidebar .nav-item {
    /* Add space between top-level menu items */
    margin-bottom: 0.25rem;
}

.sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 500;
    /* Professional grey for inactive text */
    color: #6c757d; 
    padding: .625rem 1.5rem; /* Tweak padding */
    transition: all 0.2s ease-in-out;
    /* REMOVED: 'margin-right: 1.5rem;' which I added by mistake */
}

/* Remove Bootstrap's default dropdown arrow */
.sidebar .nav-link[data-bs-toggle="collapse"]::after {
    display: none;
}

/* Style icons to match text */
.sidebar .nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: #8a99a8; /* A muted icon color */
    transition: all 0.2s ease-in-out;
}

/* --- Active & Hover States --- */

/* Active link (like "Dashboard") */
.sidebar .nav-link.active {
    color: #0d6efd; /* Primary blue */
    font-weight: 600; /* Bolder */
    background-color: #ffffff; /* ADDED: White background */
    border-radius: 0 50px 50px 0; /* ADDED: Rounded on the right */
}
.sidebar .nav-link.active i {
    color: #0d6efd;
}

/* Hover state for all links */
.sidebar .nav-link:hover {
    color: #0d6efd;
    font-weight: 600; /* ADDED: Match active state */
    background-color: #ffffff; /* ADDED: White background */
    border-radius: 0 50px 50px 0; /* ADDED: Rounded on the right */
}
.sidebar .nav-link:hover i {
    color: #0d6efd;
}


/* --- Dropdown Arrow --- */
.sidebar .nav-link .menu-arrow {
    font-size: 0.75rem;
    position: absolute;
    right: 1.5rem;
    transition: transform 0.3s ease;
    color: #aeb5bc; /* Muted arrow */
}
.sidebar .nav-link:hover .menu-arrow {
    color: #0d6efd;
}
.sidebar .nav-link:not(.collapsed) .menu-arrow {
    transform: rotate(90deg);
}


/* --- Sub-menu styles --- */
.sub-menu {
    padding-left: 0; /* Remove default list padding */
    list-style: none;
    /* CHANGED: Set to white and restored original layout */
    background-color: #ffffff; 
    margin: 0.5rem 0.75rem;
    border-radius: 4px;
}

.sub-menu .nav-item {
    margin-bottom: 0;
}

.sub-menu .nav-link {
    color: #495057;
    /* Indent sub-items */
    padding: .5rem 1.5rem; 
    font-size: 0.875rem;
    font-weight: 400;
}
.sub-menu .nav-link:hover {
    color: #0d6efd;
    /* ADDED: Override parent hover */
    background-color: transparent; 
    border-radius: 0;
}

/* --- Mobile (Medium and down) --- */
@media (max-width: 767.98px) {
    .sidebar {
        top: 60px; /* Position it below the header */
        height: calc(100vh - 60px);
        z-index: 1030;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding-top: 0; /* Remove top padding */
    }
    
    main {
        margin-left: 0 !important;
    }

    .navbar-toggler-icon {
        background-image: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .navbar-toggler-icon::before {
        content: '\F479';
        font-family: 'bootstrap-icons';
        font-size: 1.5rem;
        color: #333;
    }
}


/* --- Main content & Navbar (Keep these) --- */
.main-content {
    padding-top: 48px; /* Height of navbar */
    min-height: calc(100vh - 60px);
}
/* --- Navbar --- */
/* --- Navbar --- */
.navbar {
    height: 60px; /* Give the navbar a fixed height */
    border: none;
    box-shadow: none;
    background-color: #f4f7fa; /* ADDED */
}

/* Container for brand and mobile toggle */
.navbar-brand-wrapper {
    background-color: #f4f7fa; /* ADDED */
    height: 60px;
    width: 250px; /* Match sidebar width */
    border-bottom: none;
    border-right: none;
    
    /* Center the brand and toggler */
    display: flex;
    align-items: center;
}

.navbar-brand {
    color: #333;
    font-weight: 600;
    
    /* Remove old dark styles */
    background-color: transparent;
    box-shadow: none;
}
.navbar-brand i {
    font-size: 1.25rem;
}


/* Position the mobile toggler */
.navbar-toggler {
    border: none;
    margin-left: auto;
}
.navbar-toggler:focus {
    box-shadow: none;
}

/* Right-side menu items */
.navbar-menu-wrapper {
    height: 60px;
    padding-right: 1.5rem;
    border: none;
}
.navbar-menu-wrapper .nav-link i {
    font-size: 1.15rem;
}

/* --- Professional Mobile Notification Dropdown Enhancement --- */
.hn-dropdown {
    min-width: 320px;
    padding: 0.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    background-color: #f1f5f9; /* Soft tinted background to reduce noise */
}

/* --- Lightbox Backdrop Style --- */
#hn-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1040 !important; /* Above fixed-top navbar (1030) */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#hn-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Ensure the navbar itself stays above the backdrop when menu is open */
.navbar.hn-menu-open {
    z-index: 1050 !important;
}

/* Ensure the dropdown menu itself stays sharp */
.hn-dropdown {
    z-index: 1060 !important;
}

.hn-close-btn {
    background-color: rgba(0,0,0,0.05);
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.hn-close-btn:hover {
    background-color: rgba(0,0,0,0.1);
    transform: rotate(90deg);
}

.hn-item-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
}

.hn-item-clickable:hover {
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* --- Mobile Drill-down Transitions --- */
#hn-mobile-main-view, #hn-mobile-notifs-view {
    animation: hn-fade-in 0.3s ease-out;
}

@keyframes hn-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Notification List Scrollbar --- */
#un_list_mobile::-webkit-scrollbar {
    width: 6px;
}

#un_list_mobile::-webkit-scrollbar-track {
    background: transparent;
}

#un_list_mobile::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

#un_list_mobile::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.un-dropdown .un-header {
    padding: 1rem;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: 0.85rem;
    color: #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.un-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.un-item:hover {
    background-color: #f8fafc;
    transform: translateX(4px);
}

.un-item.unread {
    background-color: #f0f7ff;
    border-left: 3px solid #0d6efd;
}

@media (max-width: 575.98px) {
    .hn-dropdown {
        width: 94vw !important;
        max-width: 360px !important;
        position: fixed !important;
        top: 65px !important;
        left: 3vw !important;
        right: 3vw !important;
        margin: 0 auto !important;
        transform: none !important;
        border-radius: 0 !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    }
    
    .hn-dropdown .dropdown-header {
        padding: 1.25rem 1rem 0.75rem;
    }
}

.un-item .un-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #0d6efd;
    flex-shrink: 0;
    margin-top: 6px;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.un-item .un-dot.read {
    background-color: transparent;
    box-shadow: none;
}

.un-item .un-body {
    flex: 1;
    min-width: 0;
}

.un-item .un-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.un-item .un-msg {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.un-item:hover .un-msg {
    white-space: normal; /* Expand on hover if needed or keep as is */
}

.un-item .un-time {
    font-size: 0.75rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.un-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.hn-dropdown .dropdown-header {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-size: 0.7rem;
    color: #475569;
    padding: 1rem 0.75rem 0.5rem;
}

.hn-dropdown .dropdown-item {
    display: flex !important;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 14px;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.hn-dropdown .dropdown-item:hover {
    background-color: #fff;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Custom styles for the mobile sound switch */
.hn-dropdown .form-switch .form-check-input {
    background-color: #cbd5e1;
    border-color: #cbd5e1;
    transition: background-color 0.2s, border-color 0.2s, background-position 0.2s;
}

.hn-dropdown .form-switch .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.hn-dropdown .form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.hn-dropdown .hn-item-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 12px;
    margin-right: 14px;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

/* --- Module Accent Colors --- */
.hn-item-service { border-left: 4px solid #10b981 !important; }
.hn-item-service .hn-item-icon { background-color: #ecfdf5; color: #10b981; }

.hn-item-orders { border-left: 4px solid #8b5cf6 !important; }
.hn-item-orders .hn-item-icon { background-color: #f5f3ff; color: #8b5cf6; }

.hn-item-reviews { border-left: 4px solid #3b82f6 !important; }
.hn-item-reviews .hn-item-icon { background-color: #eff6ff; color: #3b82f6; }

.hn-item-tasks { border-left: 4px solid #f59e0b !important; }
.hn-item-tasks .hn-item-icon { background-color: #fffbeb; color: #f59e0b; }

.hn-item-chat { border-left: 4px solid #06b6d4 !important; }
.hn-item-chat .hn-item-icon { background-color: #ecfeff; color: #06b6d4; }

.hn-item-thinexa { border-left: 4px solid #14b8a6 !important; }
.hn-item-thinexa .hn-item-icon { background-color: #f0fdfa; color: #14b8a6; }

.hn-item-system { border-left: 4px solid #94a3b8 !important; }
.hn-item-system .hn-item-icon { background-color: #f8fafc; color: #64748b; }

.hn-dropdown .hn-item-info {
    flex: 1;
    min-width: 0;
    padding-right: 8px;
}

.hn-dropdown .hn-item-title {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 2px;
}

.hn-dropdown .hn-item-sub {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hn-dropdown .badge {
    padding: 0.4em 0.7em;
    font-size: 0.75rem;
}

.hn-dropdown .dropdown-divider {
    margin: 0.75rem 0;
    border-top: 1px solid #f1f5f9;
}

.hn-dropdown-system-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
}

/* --- Navbar Profile Fix --- */
.navbar-menu-wrapper .nav-link#profileDropdown {
    padding: 0; /* Remove padding from the image link */
}

.navbar-menu-wrapper .nav-link#profileDropdown::after {
    display: none; /* Hide Bootstrap's default dropdown arrow */
}


/* --- Styled Navbar Dropdown --- */
.navbar-dropdown {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    padding: 0; /* Remove default padding */
}

.navbar-dropdown .dropdown-header {
    padding: 1.25rem;
    border-bottom: 1px solid #dee2e6;
}

.navbar-dropdown .img-md {
    margin-bottom: 0.5rem;
}

.navbar-dropdown .dropdown-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-dropdown .dropdown-item:active {
    background-color: #f8f9fa; /* Match Bootstrap's default */
}

.navbar-dropdown .dropdown-item-icon {
    margin-right: 1rem;
    font-size: 1.1rem;
    color: #495057;
}

.navbar-dropdown .dropdown-item:hover .dropdown-item-icon {
    color: #0d6efd;
}

.navbar-nav .dropdown-menu {
    position: absolute; /* Ensures dropdown opens correctly */
}

/* --- Mobile Navbar Styles --- */
@media (max-width: 767.98px) {
    /* Make brand wrapper shrink on mobile */
    .navbar-brand-wrapper {
        width: auto; 
        flex-grow: 1;
        border-right: none;
    }
    .navbar-menu-wrapper {
        padding-right: 1rem;
    }
    /* Hide items on mobile to save space */
    .navbar-menu-wrapper .dropdown-toggle,
    .navbar-menu-wrapper .bi-calendar-event {
        display: none;
    }
}

/* --- General Link Styling --- */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
    color: #0b5ed7; /* Slightly darker blue on hover */
}

/* --- Show/Hide Password Icon --- */
.password-field-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
}
.password-toggle-icon:hover {
    color: #0d6efd;
}

