:root {
    --primary-color: #2dc43a;
    --secondary-color: #4bc932;
    --accent-color: #4fc3f7;
    --light-bg: #4fc3f7;
    /* --dark-bg: #032b43; */
    --dark-bg: #4fc3f7;
    --text-color: #333;
    --border-color: #dee2e6;
    --page-padding: 40px;
    --sidebar-width: 300px;
}

.page-wrapper {
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    max-width: 1800px;
    margin: 0 auto;
}

.body_container {
    display: flex;
    height: calc(100vh - 85px);
    overflow: hidden;
    margin-top: 110px;
    gap: 20px;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100%;
    overflow-y: auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-header {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 100%);
    color: white;
}

.sidebar-nav {
    /* padding: 0; */
    padding-bottom: 50px;
    list-style: none;
}

.nav-item-label {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item-label:hover {
    background-color: #c4ebf7;
    /* background-color: rgba(44, 62, 80, 0.05); */
}

.nav-item-icon {
    margin-right: 12px;
    font-size: 1rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.nav-item-text {
    margin-left: 3px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.nav-item-arrow {
    margin-left: 10px;
    transition: transform 0.2s ease;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.nav-item.active .nav-item-arrow {
    transform: rotate(90deg);
}

.nav-submenu {
    padding-left: 0;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(44, 62, 80, 0.03);
}

.nav-item.active .nav-submenu {
    max-height: 1000px;
}

.nav-subitem {
    padding: 10px 20px 10px 52px;
    position: relative;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    flex-direction: column;
    align-items: flex-start;
}

.nav-subitem-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.nav-subitem-content span {
    cursor: pointer;
}

.nav-subitem-content i {
    cursor: pointer;
}

.nav-subitem-content i:hover {
    font-size: 16px;
    transform: scale(1.2);
}

.nav-subitem:hover {
    background-color: rgb(199, 236, 247);
    /* background-color: rgba(44, 62, 80, 0.05); */
}

.nav-subitem::before {
    content: "";
    position: absolute;
    left: 35px;
    top: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

/* Third level menu - Vertical Expansion */
.nav-subsubmenu {
    padding-left: 0;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    width: 100%;
    margin-top: 5px;
}

.nav-subsubmenu p {
    font-size: 0.8rem;
    font-style: italic;
    white-space: nowrap;
    flex-shrink: 1;
    opacity: 0.85;
}

.nav-subitem.active .nav-subsubmenu {
    max-height: 1000px;
}

.nav-subsubitem {
    padding: 8px 20px;
    cursor: pointer;
    position: relative;
    font-size: 0.85rem;
    color: #353535;
    width: 100%;
}

.nav-subsubitem:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.nav-subsubitem::before {

    content: "";
    position: absolute;
    left: 10px;
    top: 18px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

/* Content Styles */
.content {
    flex-grow: 1;
    overflow-y: auto;
    height: 100%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.content-header {
    font-size: 1.3rem;
    font-weight: 600;
    padding: 13px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.content-header i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.content-main {
    padding: 20px;
}

/* Stats Cards */
.stats-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    /* text-align: center; */
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--secondary-color), var(--accent-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Tables Section */
.tables-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.table-wrapper {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-title {
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--primary-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f8f9fa;
    color: var(--primary-color);
    padding: 12px 20px;
    text-align: left;
    font-weight: 500;
    font-size: 0.9rem;
}

.data-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background-color: rgba(44, 62, 80, 0.03);
}

/* Charts Area */
.charts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.charts-container-top {
    display: flex;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 80vh;
}

.chart-card {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    padding: 20px;
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.height-chart-title {
    padding: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.chart-title i {
    margin-right: 8px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Special full-height chart */
.full-height-chart {
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.charts-container-bottom {
    padding: 20px;
    height: 60vh;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

#parallel {
    padding: 0 0 10px 0;
    cursor: default;
}

#broBar {
    cursor: default;
}

#barRace {
    padding: 0 20px 20px 20px;
    height: 100%;
    width: 100%;
}

.chart-control-btn {
    display: inline-block;
    padding: 5px 25px;
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(62, 142, 207, 0.3);
    font-size: 16px;
}

.chart-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 142, 207, 0.4);
}

.chart-control-btn:active {
    transform: translateY(0);
}

.chart-control-btn i {
    margin-right: 8px;
}

.small-charts {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 20px;
}


/* Responsive */
@media (max-width: 1400px) {
    :root {
        --sidebar-width: 260px;
    }
}

@media (max-width: 1200px) {
    :root {
        --page-padding: 20px;
        --sidebar-width: 240px;
    }

    .tables-section {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .charts-container {
        grid-template-columns: 1fr;
    }

    .full-height-chart {
        grid-column: auto;
        grid-row: auto;
        height: 350px;
    }

    .small-charts {
        grid-column: auto;
        grid-template-rows: auto;
    }
}

@media (max-width: 768px) {
    .body_container {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 60px;
        overflow: hidden;
    }

    .sidebar.expanded {
        max-height: 1000px;
    }

    .content {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}