:root {
    --primary-color: #4b21b3;
    --primary-dark: #2c0d6b;
    --secondary-color: #018696;
    --secondary-dark: #015f77;
    --accent-color: #00c9d3;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.08);
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-light: rgba(255, 255, 255, 0.9);
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.16);
    --border-radius: 12px;
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-color);
    background-attachment: fixed;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: rgba(43, 21, 107, 0.9);
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

body:not(.sidebar-closed) .header {
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

.header .left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .logo {
    font-size: 28px;
    color: var(--accent-color);
}

.header .title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.header .right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header .user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.header .logout {
    color: white;
    text-decoration: none;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header .logout:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
/* 
/* Main Content Area */
.main-container {
    margin-top: var(--header-height);
    margin-left: 0;
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition);
}

body:not(.sidebar-closed) .main-container {
    margin-left: var(--sidebar-width);
}


/* Dashboard Content */
.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-light);
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    background: var(--card-hover);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 201, 211, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 18px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

/* Component Progress Styles */
.scrollable-components {
    overflow-y: auto;
    max-height: 300px;
    padding-right: 8px;
}

.scrollable-components::-webkit-scrollbar {
    width: 6px;
}

.scrollable-components::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.scrollable-components::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.component-item {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    margin-bottom: 16px;
}

.component-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.component-name {
    color: var(--text-light);
}

.component-percent {
    color: var(--accent-color);
    font-weight: 600;
}

.component-chart {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.component-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    border-radius: 10px;
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 220px;
    position: relative;
}

/* Stats Card */
.stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 10px 0;
    color: var(--text-light);
    line-height: 1;
}

.stats-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 240px;
    }

    .sidenav {
        transform: translateX(calc(-1 * var(--sidebar-width)));
        z-index: 100;
    }

    body.sidebar-closed .sidenav {
        transform: translateX(0);
    }

    body.sidebar-closed .header,
    body.sidebar-closed .main-container {
        left: 0;
        margin-left: 0;
        width: 100%;
    }

    .header {
        padding: 0 20px;
    }

    .header .title {
        font-size: 18px;
    }

    .header .user-name {
        display: none;
    }

    .header .logout span {
        display: none;
    }

    .header .logout {
        padding: 8px;
        border-radius: 50%;
    }

    .main-container {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 60px;
    }

    .header {
        padding: 0 15px;
    }

    .header .logo {
        font-size: 24px;
    }

    .page-title {
        font-size: 20px;
    }

    .main-container {
        padding: 15px;
    }
}