.analytics-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(40%, 200px), 1fr));
    gap: 20px;
}
.analytics-card {
    background: #fff;
    padding: 20px;
    border: 1px solid #e1e1e1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.analytics-card h2 {
    margin: 0;
    font-size: 18px;
}
.analytics-card p {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0 0;
}
.analytics-table-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    grid-gap: 20px;
}
#date-range-filter {
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}
#analytics-tables th, #analytics-tables td {
    text-align: left;
}
/* dropdown */
.dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 200px;
    z-index: 2;
}
.dropbtn {
    padding: 8px 20px !important;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.dropbtn:hover {
    background-color: #005fa3;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 2;
}
.dropdown-content li {
    color: black;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    margin-bottom: 0px;
}
.dropdown-content li:hover {
    background-color: #eee;
}
.dropdown-content li.active {
    background-color: #007cba;
    color: white;
}
.dropdown:hover .dropdown-content {
    display: block;
}
/* date range filter labels and inputs */
#date-range-filter label {
    display: inline;
    margin: 10px 0 5px;
    font-weight: bold;
}
#date-range-filter input[type="text"] {
    padding: 8px;
    width: 150px;
    border-radius: 4px;
    border: 1px solid #ccc;
}
#filter-button {
    background-color: #007cba;
    color: white;
    padding: 8px 20px;
}

#filter-button:hover {
    background-color: #005fa3;
}
.dropdown-content{
    width: 100%;
}
.analytics-cards-container.loading .analytics-card p{
    background: #eee;
    color: #eee;
    position: relative;
    overflow: hidden;
    max-width: 160px;
    margin: 10px auto 0px;
}
.analytics-cards-container.loading .analytics-card p::after{
    content: '';
    position: absolute;
    background: linear-gradient(90deg, #f1f1f1, #ddd 50%, #f1f1f1);
    display: block;
    box-shadow: 0 0 20px #f1f1f1;
    height: 100%;
    width: 25%;
    top: 0;
    left: 0;
    transition: all .4s ease;
    animation: loading 2s infinite linear;
}
@keyframes loading {
    0% {
        transform: translateX(-40px);
    }
    100% {
        transform: translateX(180px);
    }
}
.d-flex{
    display: flex;
}
.w-charts{
    flex-direction: column;
}
.w-charts .w-chart{
    flex: 1;
    overflow: auto;
    margin-bottom: 20px;
}
.w-chart.loading {
    position: relative;
    box-shadow: 0 0 20px #f1f1f1;
    min-height: 300px;
    overflow: hidden;
    opacity: .3;
}
.w-chart.loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgb(255 255 255 / 0%) 0%, rgb(0 0 0 / 40%) 50%, rgb(255 255 255 / 0%) 100%);
    width: 110%;
    animation: swipe 2s infinite linear;
}
@keyframes swipe {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/*********** MEDIA QUERY **************/
@media (max-width: 767px) {
    .analytics-cards-container{
        gap: 15px;
    }
    .analytics-table-container{
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}