/*  Small Boxes - Colorful & Spaced */
.small-box {
    position: relative;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    text-align: center;
    margin-bottom: 20px; /* Adds space between boxes */
}

    .small-box:hover {
        transform: translateY(-5px);
        box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
    }

    /* Colorful Backgrounds */
    .small-box.bg-info {
        background: linear-gradient(135deg, #00c6ff, #0072ff);
    }
    /* Blue */
    .small-box.bg-success {
        background: linear-gradient(135deg, #56ab2f, #a8e063);
    }
    /* Green */
    .small-box.bg-warning {
        background: linear-gradient(135deg, #ffb347, #ffcc33);
    }
    /* Yellow */
    .small-box.bg-primary {
        background: linear-gradient(135deg, #6a11cb, #2575fc);
    }
    /* Purple-Blue */
    .small-box.bg-danger {
        background: linear-gradient(135deg, #ff416c, #ff4b2b);
    }
    /* Red */
    .small-box.bg-dark {
        background: linear-gradient(135deg, #f0f0f0, #d3d3d3);
    }
    /* Dark Gray */

    /* Inner Text */
    .small-box .inner h3 {
        font-size: 30px;
        font-weight: bold;
        margin: 0;
    }

    .small-box .inner p {
        font-size: 16px;
        margin-top: 5px;
        font-weight: bold;
    }

    /* Icons */
    .small-box .icon {
        font-size: 40px;
        position: absolute;
        top: 15px;
        right: 15px;
        opacity: 0.8;
        color: rgba(255, 255, 255, 0.8);
    }

/* Sidebar - More Colorful */
.sidebar {
    width: 250px;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding-top: 20px;
    position: fixed;
    left: 0;
    top: 0;
    transition: all 0.3s ease-in-out;
}

    .sidebar a {
        display: block;
        color: white;
        padding: 15px;
        text-decoration: none;
        font-size: 18px;
        transition: background 0.3s;
        font-weight: bold;
        border-radius: 5px;
    }

        .sidebar a:hover {
            background: linear-gradient(135deg, #1abc9c, #16a085);
        }

/*  Dashboard Layout */
.main-content {
    margin-left: 270px;
    padding: 20px;
}

/*  Responsive Design */
@media (max-width: 768px) {
    .small-box {
        padding: 15px;
        text-align: center;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }
}
canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 350px; /*  Prevents overflow on large screens */
}

@media (max-width: 768px) {
    canvas {
        max-height: 300px; /*  Smaller height on mobile */
    }
}


/* Sidebar Styles */
.wrapper {
    display: flex;
    height: 100vh;
}

/* Default sidebar width */
.sidebar {
    width: 250px;
    background: #343a40;
    color: white;
    padding: 15px;
    transition: all 0.3s ease-in-out;
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
}

    /* When collapsed, reduce width */
    .sidebar.collapsed {
        width: 60px;
    }

/* Main content area */
.content {
    flex-grow: 1;
    margin-left: 250px; /* Adjust according to sidebar width */
    transition: margin-left 0.3s ease-in-out;
    width: calc(100% - 250px);
}

/* When sidebar is collapsed */
.sidebar.collapsed ~ .content {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* Sidebar links */
.sidebar .nav-link {
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

    .sidebar .nav-link i {
        margin-right: 10px;
    }

    .sidebar .nav-link:hover {
        background: #495057;
        border-radius: 5px;
    }

/* Sidebar Toggle Button */
.btn-sidebar-toggle {
    border: none;
    background: none;
    font-size: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        left: -250px;
    }

        .sidebar.collapsed {
            left: 0;
        }

    .content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.collapsed ~ .content {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
}

.sidebar {
    width: 250px;
    height: 100vh;
    background: #343a40;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    padding-top: 20px;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar .brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
}

.sidebar .brand-text {
    display: block;
    transition: all 0.3s;
}

.sidebar.collapsed .brand-text {
    display: none;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    padding: 10px;
    transition: all 0.3s;
    white-space: nowrap; /* Prevent text wrapping */
}

    .sidebar .nav-link i {
        width: 30px;
        text-align: center;
        transition: all 0.3s;
    }

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 10px;
}

.content {
    margin-left: 250px;
    transition: all 0.3s ease-in-out;
    padding: 20px;
}

.sidebar.collapsed ~ .content {
    margin-left: 60px;
}
