body {
    font-family: 'Tajawal', sans-serif;
    background-color: #e7e7e7;
}

.white-bg {
    background-color: #FFFFFF;
}

.nav-item {
    position: relative;
}

.main-item {
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-item:hover {
    color: #dbbcbf; /* A subtle light grey */
}

.main-item:hover img {
    opacity: 0.6; /* Subtle visual feedback for interactive images */
}

.main-item .toggle-icon {
    transition: transform 0.3s ease;
}

.children-menu {
    position: fixed;
    left: -9999px;
    width: 200px;
    z-index: 2000;
    top: 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: transform 0.3s ease-in-out;
    border: 1px solid #E5E5E5;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.25);
    background-color: #FFFFFF;
    border-radius: 0px 0px 6px 6px;
    color: #291a2e !important;
}

.dashboard-component .children-menu {
    width: 300px;
}


.child-nav-item{
    background-color: #F5F5F5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.child-nav-item:hover {
    background-color: #e0e0e0; /* A slightly darker grey for children */
    color: #291a2e;
}

.nav-item.is-open .children-menu {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
}

.nav-item.is-open .main-item .toggle-icon {
    transform: rotate(180deg);
}

.children-menu .nav-item.has-grandchildren .toggle-icon {
    transition: transform 0.3s ease;
}

.children-menu .nav-item.has-grandchildren .toggle-icon.is-rotated {
    transform: rotate(180deg);
}

.children-menu .child-link {
    color: #291a2e; 
}

.children-menu .child-link:hover{
    color: #b67c80; 
}

.grandchildren-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.grandchildren-menu.is-expanded {
    max-height: 600px; /* Adjust as needed to accommodate content */
    transition: max-height 2s ease;

}

.grandchildren-menu .nav-item a{
    color: #291a2e; 
}

.grandchildren-menu .nav-item:hover a{
    color: #b67c80; 
}

#header-title h3 {
    color: #291a2d;
}

#contentHeader {
    background-color: #F9F6F6;
}

#searchBoxContainer {
    color: #874b50;
}

#searchBox {
    background-color: #f7f7f7;
    position: relative;
    display: flex;
    align-items: center;
    padding-right: 1rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#searchBox:hover {
    background-color: #e9e9e9;
}

#searchBox:focus-within {
    background-color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}


#searchBox input {
    background-color: transparent;
    flex-grow: 1;
    padding-left: 2.5rem;
    padding-right: 0;
    border: none;
    color: inherit;
}

#searchBox input::placeholder {
    color: #874b50;
    opacity: 1;
}


#searchBox input:focus {
    box-shadow: none;
    border-color: transparent;
}

#searchBox .bi-search {
    left: 1rem;
    z-index: 2;
    color: inherit !important;
}

#searchBox .shortcut-hint {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #874b50;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s ease-out;
}

#searchBox input:focus + .shortcut-hint {
    opacity: 0;
}

#searchBoxContainer .btn {
    color: #874b50;
    background-color: #f7f7f7;
    transition: background-color 0.3s ease;
    width: 38px;
    height: 38px;
    padding: 0 !important;
}

#searchBoxContainer .btn:hover {
     background-color: #e9e9e9;
     color: #6a3a3d;
}

#contentHeader .text-muted {
    color: #c8a78c !important;
}

#contentHeader svg {
    color: #874b50;
}

#current-datetime {
    direction: ltr;
}

.rounded-shadow {
    background: #FFFFFF;
    border: 1px solid #FEFEFE;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 30px;
    padding-bottom: 30px;
    box-shadow: 0px 10px 80px rgba(226, 236, 249, 0.5);
    border-radius: 16px;
}

.bar-chart-container .muted{
    color:grey;
}

/* Index Card Styles */

#index-cards .position-relative{
    z-index: 0;
}
.sidebar.position-sticky{
    z-index: 1;
}

/* Icon Circle */
.icon-circle {
    background-color: white; /* Default background color */
    top: -20px; /* Adjust to overlap */
    right: -20px; /* Adjust to overlap */
    width: 100px;
    height: 100px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.05);
    z-index: -1; /* Behind content */
}

.icon-circle img {
    width: 50px; /* Adjust icon size within circle */
    height: 50px;
}

/* Card Background Colors */
.card-bg-1 {
    background-color: #caa8a3; 
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.card-bg-1:hover {
    background-color: #b89792;
    transform: translateY(-5px);
}

.card-bg-2 {
    background-color: #D4C4BA; 
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.card-bg-2:hover {
    background-color: #c2b3a9;
    transform: translateY(-5px);
}

.card-bg-3 {
    background-color: #87a1ab; 
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.card-bg-3:hover {
    background-color: #76909a;
    transform: translateY(-5px);
}

.card-bg-4 {
    background-color: #C8A56B; 
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.card-bg-4:hover {
    background-color: #b7945a;
    transform: translateY(-5px);
}

.card-bg-1:hover .icon-circle,
.card-bg-2:hover .icon-circle,
.card-bg-3:hover .icon-circle,
.card-bg-4:hover .icon-circle {
    background-color: #ffffffb2;
}

/* General hover effects for links and buttons */
a {
    transition: color 0.3s ease;
}

a:hover {
    color: #874b50; /* A consistent hover color for links */
}

button {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

button:hover {
    opacity: 0.9; /* Slightly reduce opacity on hover for general buttons */
}

/* General hover effects for interactive elements */
[onclick]:hover, [data-bs-toggle]:hover, [data-toggle]:hover, [data-target]:hover, .clickable:hover {
    cursor: pointer;
    opacity: 0.9; /* Subtle visual feedback for interactive divs/elements */
    transition: opacity 0.3s ease;
}

img {
    transition: opacity 0.3s ease;
}

img:hover {
    opacity: 0.8; /* Subtle visual feedback for interactive images */
}


/* Responsive sidebar */
.sidebar {
    width: 280px;
}

@media (max-width: 767.98px) {
    body{
        padding-top:70px
    }
    .sidebar {
        width: 100%;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    #sidebar-placeholder {
        position: static;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .shown{
        background-color: #331D1F;
        padding-bottom: 150px;
        scrollbar-width: 2px; 
        scrollbar-color: #dbbcbf transparent; /* Custom scrollbar color */
        z-index: 1000; /* Ensure it's above other content */
    }
    .sidebar .children-menu {
        position: absolute;
        top: 200px;
        overflow-x: hidden;
        left: 0;
    }
}

.sidebar-toggle-menu {
    background-color: #331D1F;
    z-index: 1030; /* Ensure it's above other content */
}

.sidebar-toggle-button {
    border-color: #dbbcbf; /* Using a theme color for border */
    color: #dbbcbf; /* Using a theme color for text */
    background-color: transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.sidebar-toggle-button:hover {
    background-color: rgba(219, 188, 191, 0.1); /* Lighter shade of theme color for hover background */
    border-color: #dbbcbf;
    color: #dbbcbf;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); 
}


.dashboard-toggle {
    background-color: #e7e7e7;
}


.dashboard-cards-container {
    gap: 20px; /* Space between cards */
    justify-content: center;
    padding: 20px;
}

.dashboard-card {
    background-color: #f6efef; /* Light background for cards */
    text-decoration: none;
    color: #331c1f; /* Dark text color */
    font-size: large;
    width: 107px; /* Fixed width for each card */
    height: 100px; /* Fixed height for each card */
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.dashboard-card:hover {
    background-color: #e0e0e0; /* Slightly darker on hover */
    transform: translateY(-5px);
}

.dashboard-card.active {
    background-color: #874b50; /* Active card background color */
    color: #ffffff; /* Active card text color */
}

.dashboard-card.active .dashboard-card-icon svg {
    color: #f6efef; /* Active card icon color */
}

.dashboard-card-icon {
    margin-bottom: 10px;
}

.dashboard-card-icon svg {
    width: 30px;
    height: 30px;
    color: #874b50; /* Icon color */
    transition: color 0.3s ease;
}

