/* Dashboard Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

.title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.filter-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-container label {
    margin-right: 5px;
}

.filter-container select, 
.filter-container input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    min-width: 150px;
}

.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.kpi-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.kpi-title {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.kpi-trend {
    font-size: 12px;
    margin-top: 5px;
}

.kpi-trend.positive {
    color: #28a745;
}

.kpi-trend.negative {
    color: #dc3545;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    margin-bottom: 20px;
}

.chart, .bar_chart {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin: 0 10px 20px;
    height: 400px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.chart-actions {
    display: flex;
    gap: 10px;
}

.chart-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    font-size: 14px;
    transition: color 0.2s ease;
}

.chart-actions button:hover {
    color: #2c3e50;
}

.chart-content {
    height: calc(100% - 40px);
}

.data-table-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, 
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.risk-score {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.risk-low {
    background-color: #d4edda;
    color: #155724;
}

.risk-medium {
    background-color: #fff3cd;
    color: #856404;
}

.risk-high {
    background-color: #f8d7da;
    color: #721c24;
}

.tab-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    transition: background-color 0.2s ease;
}

.tab:hover {
    background-color: #f8f9fa;
}

.tab.active {
    background-color: #fff;
    border-color: #dee2e6;
    border-bottom-color: #fff;
    margin-bottom: -1px;
    font-weight: 600;
    color: #2c3e50;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.legend-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.score-description {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.score-description p {
    margin: 5px 0;
    font-size: 14px;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

@media (max-width: 768px) {
    .kpi-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart, .bar_chart {
        flex: 100%;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .kpi-container {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-container select, 
    .filter-container input {
        width: 100%;
    }
}
