:root {
    --primary-color: #8fa1d8;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--light-color);
    overflow-x: hidden;
}

/* Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: #4e73df;
    background: linear-gradient(180deg, #6adddf 10%, #bebf88 100%);
    color: #fff;
    transition: all 0.3s;
    z-index: 999;
}

#sidebar.active {
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
}

#sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
}

#sidebar .logo {
    display: flex;
    align-items: center;
    color: #000000;
    font-size: 1.5rem;
    font-weight: 700;
}

#sidebar .logo i {
    font-size: 2rem;
    margin-right: 10px;
}

#sidebar.active .logo span {
    display: none;
}

#sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar ul li a {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover,
#sidebar ul li.active > a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

#sidebar.active ul li a span {
    display: none;
}

#sidebar ul li a i.fa-chevron-down {
    margin-right: 0;
    transition: transform 0.3s;
}

#sidebar ul li a[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}

#sidebar ul ul a {
    padding: 10px 20px 10px 50px;
    font-size: 0.9em;
}

/* Content */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Navbar */
.navbar {
    padding: 15px 20px;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: 0 0 35px 0 rgba(154, 161, 171, 0.15);
}

#sidebarCollapse {
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
}

#sidebarCollapse i {
    font-size: 1.5rem;
    color: var(--dark-color);
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    padding-right: 35px;
    border-radius: 20px;
    border: 1px solid #e3e6f0;
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

/* Notifications */
.notifications .nav-link {
    position: relative;
    padding: 10px;
}

.notifications i {
    font-size: 1.2rem;
    color: var(--dark-color);
}

.notifications .badge {
    position: absolute;
    top: 3px;
    right: 3px;
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
    background: var(--danger-color);
}

/* Profile */
.profile .nav-link {
    padding: 0 10px;
}

.profile img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* Dashboard Content */
.dashboard-content {
    padding: 20px;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Stats Cards */
.stats-cards .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(179, 122, 122, 0.05);
    transition: transform 0.3s;
}

.stats-cards .card:hover {
    transform: translateY(-5px);
}

.stats-cards .card-subtitle {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.stats-cards .icon-box {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-cards .icon-box i {
    font-size: 1.5rem;
    color: #fff;
}

/* Activity List */
.activity-list {
    margin-top: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #e3e6f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.activity-icon i {
    color: #fff;
    font-size: 1.2rem;
}

.activity-content h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.activity-content p {
    margin: 5px 0;
    color: var(--secondary-color);
    font-size: 0.85rem;
}

/* Task List */
.task-list {
    margin-top: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e3e6f0;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item .form-check-label {
    color: var(--dark-color);
    font-size: 0.9rem;
}

.task-item .badge {
    padding: 0.5em 0.8em;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        min-width: var(--sidebar-collapsed-width);
        max-width: var(--sidebar-collapsed-width);
        margin-left: calc(-1 * var(--sidebar-collapsed-width));
        position: fixed;
        height: 100vh;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content {
        width: 100%;
    }

    .stats-cards .col-md-3 {
        margin-bottom: 20px;
    }
}

/* Add these new gradient backgrounds */
.bg-gradient-brown {
    background: linear-gradient(45deg, #c6afa3, #7D5B4A);
}

.bg-gradient-red {
    background: linear-gradient(45deg, #e2bbbb, #ec4646);
}

.bg-gradient-blue {
    background: linear-gradient(45deg, #b1b7c3, #3860B9);
}

.bg-gradient-green {
    background: linear-gradient(45deg, #7dcf84, #47924e);
}

.bg-gradient-purple {
    background: linear-gradient(45deg, #a391b6, #13101A);
}

.bg-gradient-indigo {
    background: linear-gradient(45deg, #7c6497, #2A2133);
}

/* New gradient backgrounds for first row */
.bg-gradient-pink {
    background: linear-gradient(45deg, #adc7ae 0%, #298a30 100%);
}

.bg-gradient-yellow {
    background: linear-gradient(45deg, #ff7043 0%, #c63f17 100%);
}

.bg-gradient-grey {
    background: linear-gradient(45deg, #678797 0%, #01579b 100%);
}

.bg-gradient-sky .bg-gradient-blue {
    background: linear-gradient(45deg, #8e24aa 0%, #4a148c 100%);
}

.bg-gradient-purple {
    background: linear-gradient(45deg, #767fad 0%, #283593 100%);
}

.bg-gradient-orange {
    background: linear-gradient(45deg, #a47022 0%, #ba1c1c 100%);
}

/* Enhanced gradient effect */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(159, 82, 82, 0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.stat-card:hover::before {
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
}

/* Enhanced stat card hover effect */
/* Optimized card styles for horizontal layout */
.stat-card {
    height: 100%;
    min-width: 160px;
    transition: all 0.3s ease;
}

.stat-card .card-body {
    padding: 1rem;
}

.stat-card h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.stat-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
}

.stat-card .stat-icon i {
    font-size: 1.8rem;
    opacity: 0.8;
}

.stat-card .card-link {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .col-lg-2 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 768px) {
    .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .col-lg-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.stat-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon i {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card h4 {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

.stat-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-card .card-link {
    font-size: 0.9rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.stat-card .card-link:hover {
    opacity: 1;
    text-decoration: underline;
}