
/* Enable underline on hover - extending style.css functionality */
.pcoded-navbar.theme-horizontal .pcoded-inner-navbar > li:hover:after,
.pcoded-navbar.theme-horizontal .pcoded-inner-navbar > li.nav-active:after {
    content: "";
    background-color: #38bdf8 !important;
    z-index: 4;
    position: absolute;
    left: 19px;
    top: auto;
    bottom: 5px;
    width: 23px;
    height: 2px;
    transition: all 0.3s ease;
}
.pcoded-navbar.theme-horizontal .pcoded-inner-navbar > li:hover > a,
.pcoded-navbar.theme-horizontal .pcoded-inner-navbar > li > a.active {
    color: #2c5aa0 !important;
}
#table-1 {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    font-size: 12px;
}

#table-1 th,
#table-1 td {
    padding: 0.5rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    text-align: center;
    white-space: nowrap;
}

#table-1 thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
}

#table-1 tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

#table-1 tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.table-responsive {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto; /* Thêm scroll ngang cho nhiều cột */
    border: 1px solid #dee2e6;
}


/* Laptop - 4 columns per row for first row, 3 for second */
@media (min-width: 992px) and (max-width: 1199px) {
    .statistics-row .col-lg-3:nth-child(n+5) {
        margin-top: 20px;
    }
}

/* Tablet - 2 columns per row */
@media (min-width: 769px) and (max-width: 991px) {
    .statistics-row .col-lg-3 {
        flex-basis: 50%;
        max-width: 50%;
    }
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    #table-1 {
        font-size: 10px;
    }
    
    #table-1 th,
    #table-1 td {
        padding: 0.25rem;
    }
    
}



/* ECharts container styling */
#mini-chart {
    width: 100%;
    height: 500px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

/* Form styling improvements */
.analytics-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

#btn_stat {
    background: #20c997;
    
}

#btn_excel {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    box-shadow: 0 4px 15px rgba(255,193,7,0.3);
}


.form-row {
    display: flex;
    align-items: end;
    gap: 15px;
    flex-wrap: wrap;
}

.form-group-modern {
    position: relative;
    margin-bottom: 25px;
}

.form-group-modern label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    background: white;
    padding: 0 8px;
    color: #6c757d;
    font-size: 14px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
}


.chart-container {
    /* background: white; */
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid #dee2e6;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .analytics-form {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .btn-primary {
        width: 100%;
        margin-top: 10px;
    }
    
    .d-flex {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* Utility classes */
.d-flex {
    display: flex !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.flex-fill {
    flex: 1 1 auto !important;
}

/* Icon spacing in buttons */
.btn i {
    margin-right: 8px;
}

.btn i:only-child {
    margin-right: 0;
}

/* Statistics row layout - 7 cards in one row for desktop */
.statistics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
}

@media (min-width: 1200px) {
    .statistics-row .stat-card-wrapper {
        flex: 1;
        min-width: calc(14.28% - 13px); /* 100% / 7 - gap */
        max-width: calc(14.28% - 13px);
    }
    
    .statistics-row .stat-card {
        margin-bottom: 0;
        min-height: 260px;
        padding: 20px 15px;
    }
    
    .statistics-row .stat-card .stat-icon {
        font-size: 2.8rem;
        margin-bottom: 12px;
    }
    
    .statistics-row .stat-card .stat-icon i {
        font-size: inherit;
    }
    
    .statistics-row .stat-card h6 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .statistics-row .stat-card .stat-number {
        font-size: 14px;
    }
    
    .statistics-row .stat-card .stat-label {
        font-size: 11px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .statistics-row .stat-card-wrapper {
        flex: 1;
        min-width: calc(25% - 12px); /* 4 cards per row */
        max-width: calc(25% - 12px);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .statistics-row .stat-card-wrapper {
        flex: 1;
        min-width: calc(33.33% - 10px); /* 3 cards per row */
        max-width: calc(33.33% - 10px);
    }
}

@media (max-width: 767px) {
    .statistics-row .stat-card-wrapper {
        flex: 1;
        min-width: calc(50% - 8px); /* 2 cards per row */
        max-width: calc(50% - 8px);
    }
}