.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.evidence-detail.grid .card-header {
    padding: 10px 25px;
    text-align: center;
    background: linear-gradient(86deg, #40ccdc 0%, #1a49ae 100%);
    color: white;
}

.grid .card-header {
    padding: 10px 25px;
    text-align: center;
    background: linear-gradient(86deg, #40ccdc 0%, #1a49ae 100%);
    color: white;
}

.evidence-detail .card-header {
    padding: 10px 25px;
    text-align: center;
    background: linear-gradient(86deg, #e5b942 0%, #ed4343 100%);
    color: white;
}

.card-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 0px;
}

.grid .card-header {
    padding: 10px 25px;
    text-align: center;
    background: linear-gradient(86deg, #40ccdc 0%, #1a49ae 100%);
    color: white;
}

.grid .card-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 0px;
}

.chart-container {
    padding: 20px;
    position: relative;
}

.evidence-detail.grid .chart-container {
    height: 75vh;
    overflow-x: scroll;
}

.chart-container .btn-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    justify-content: flex-end;
}

.chart-container .btn-group .action-button {
    padding: 12px 20px;
    background: #3379b7;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    color: #f8f9fa;
}

.chart {
    display: flex;
    align-items: end;
    justify-content: center;
    height: 300px;
    margin: 40px 0;
    position: relative;
}

.chart-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
}

.section-title {
    font-weight: 600;
    margin-bottom: 20px;
    color: #555;
    font-size: 14px;
}

.bars-group {
    display: flex;
    gap: 8px;
    align-items: end;
}

.bar {
    width: 60px;
    background: #a8d5a8;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bar:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.bar.high {
    height: 180px;
}

.bar.med {
    height: 120px;
}

.bar.low {
    height: 80px;
}

.y-axis {
    position: absolute;
    left: 0;
    top: 0;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.y-axis-label {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    font-weight: 500;
    color: #555;
}

.x-axis-label {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
    color: #555;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.legend-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}



.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dedede;
}

.data-table th {
    background: #e3e3e3;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table td {
    font-size: 13px;
}

.accordion {
    margin-top: 20px;
    transition: all 0.3s ease;

}

.accordion-toggle {
    width: 175px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    color: #3379b7;
}

.accordion-toggle:hover {
    background: #e9ecef;
}

.accordion-content {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 0 0 8px 8px;
    animation: slideDown .3s ease;
    transition: all 0.3s ease;
}

.accordion-content.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.modal-title {
    font-size: 22px;
    font-weight: 400;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    color: #000;
    background: #f8f9fa;
}

.legend-modal-content {
    display: grid;
    gap: 15px;
}

.legend-detail {
    display: flex;
    align-items: start;
    gap: 15px;

}

.legend-detail.red {
    border-color: #dc3545;
    background: #fff5f5;
}

.legend-detail.orange {
    border-color: #fd7e14;
    background: #fff8f0;
}

.legend-detail.yellow {
    border-color: #ffc107;
    background: #fffbf0;
}

.legend-detail.blue {
    border-color: #f0f8ff;
    background: #4ea4d5;
}

.legend-detail.gray {
    border-color: #6c757d;
    background: #f8f9fa;
}

.legend-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    padding: 12px;
}

.bpa-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bpa-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.bpa-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.bpa-description {
    opacity: 0.9;
    line-height: 1.5;
}

#selectionForm label {
    margin-bottom: 6px;
    padding: 2px 2px 2px 8px;
    font-size: .95rem;
    border-radius: 4px;
    margin-left: 18px;
}

#selectionForm label:hover {
    background: #e6e6e6;
    cursor: pointer;
}

#selectionForm label:active {
    background: #d8d8d8;
}

#selectionForm label input[type='checkbox'],
#selectionForm label input[type='radio'] {
    margin-left: -18px;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .chart {
        height: 250px;
        overflow-x: auto;
    }

    .chart-section {
        margin: 0 10px;
    }

    .bar {
        width: 45px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    .legend {
        flex-direction: column;
        align-items: center;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .card-header {
        padding: 10px;

    }

    .evidence-detail .card-title,
    .grid .card-title {
        font-size: 16px !important;
    }

    #selectionFrom .container {
        gap: 3px;
        padding: 3px;
    }

    #selectionform .column {
        padding: 8px;
    }

    #selectionForm label {
        padding: 0px;
        font-size: .85rem;
        line-height: 1.2rem;
        margin-left: 18px;
        /* align-content: center; */
    }

    #selectionForm label input[type='checkbox'],
    #selectionForm label input[type='radio'] {
        margin-left: -18px;
    }

    .settings-drawer h3,
    .settings-drawer #populationSelectors strong {
        font-size: .85rem !important;
        margin-bottom: 12px;
        display: flex;
    }

    .dashboard-card {
        margin-bottom: 15px !important;
    }

    .dashboard-card p,
    .grid .dashboard-card p {
        margin: 4px 0 5px;
        font-size: 15px;
    }

    .evidence-detail .card-header-outcome,
    .grid .card-header-outcome {
        padding: 6px 25px !important;
    }

    .evidence-detail.grid .chart-container {
        height: 75vh;
        overflow-y: scroll;
    }

}

/* Evidence Grid styles*/

/* Custom styles for the colored squares (desktop) */
.score-box {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    border: 1px solid #ccc;
}

/* Custom styles for the colored squares (mobile) */
.score-box-mobile {
    width: fit-content;
    height: 26px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 4px 10px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #333;
    border: 1px solid #ccc;
}

.bg-red-score {
    background-color: #e44d26;
    /* Tailwind red-500 */
    border: 1px solid #e44d26;
}

/* Inverse text color for red score box on mobile */
.score-box-mobile.bg-red-score {
    color: #ffffff;

}

.bg-yellow-score {
    background-color: #f7e626;
    border: 1px solid #f7e626;
}

.bg-orange-score {
    background-color: #FFA500;
    border: 1px solid #FFA500;
}

/* Inverse text color for orange score box on mobile */
.score-box-mobile.bg-orange-score {
    color: #000;
    border: 1px solid #FFA500;
}

.bg-info {
    background-color: #d7eef9;
    border: 1px solid #c8e1ec;
    padding: 20px;
    border-radius: 8px;
}

.bg-white-score {
    background-color: #ffffff;
    border: 1px solid #d9d9d9;
    ;
}

.bg-gray-score {
    background-color: #D9D9D9;
    border: 1px solid #D9D9D9;
}

.bg-green-score {
    background-color: #22c55e;
    border: 1px solid #22c55e;
}

.bg-light-blue-score {
    background-color: #4ea4d5;
    border: 1px solid #4ea4d5;
}

/* Inverse text color for light blue score box on mobile */
.score-box-mobile.bg-light-blue-score {
    color: #ffffff;
}

.overall-picture {
    background-color: #e8f0ff;
    color: #3379b7;
    font-weight: bold;

}

/* Added for the user's request */
.bg-blue-overall {
    background-color: #e8f0ff;
    color: #2F6FA7;
    font-weight: bold;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #e2e8f0;
}

.table-container {
    max-height: 70vh;
    overflow-y: auto;
}

.table-container {
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
}

.table-container th,
.table-container td {
    border: 1px solid #e5e7eb;
    letter-spacing: .02rem;
}


.table-container th {
    background: #e5e7eb;
}

/* Accordion specific styles */
.accordion-header {
    cursor: pointer;
    padding: .65rem .75rem;
    background-color: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #374151;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.accordion-content {
    padding: 0 .25rem .25rem .25rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: none;
    /* Hidden by default */
    animation: slideDown .3s ease;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    display: block;
    /* Shown when active */
}

.accordion-item-outcome {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.accordion-item-outcome.overall-picture {
    background-color: #e8f0ff;
    color: #3379b7;
}

.overall-picture {
    background-color: #e8f0ff;
    color: #3379b7;
}

.accordion-item-outcome div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.accordion-item-outcome div:last-child {
    margin-bottom: 0;
}

.accordion-item-outcome span:first-child {
    font-weight: 400;
    font-size: .95rem;
    color: #4b5563;
}

/* No specific styling for span:last-child here, as score-box-mobile handles it */
.arrow-icon {
    transition: transform 0.3s ease;
}

.arrow-icon.rotated {
    transform: rotate(180deg);
}

/* Hide table on small screens, show accordion */
@media (max-width: 767px) {
    .table-desktop {
        display: none;
    }

    .accordion-mobile {
        display: block;
    }
}

/* Hide accordion on large screens, show table */
@media (min-width: 768px) {
    .table-desktop {
        display: block;
    }

    .accordion-mobile {
        display: none;
    }
}

button {
    margin-right: 10px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}