/* Dashboard Specific Styles */

.dashboard-main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-header h1 {
    font-size: 32px;
    color: var(--text-color);
    margin: 0;
}

.dashboard-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-white);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:hover {
    border-color: var(--secondary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.metric-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

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

.metric-header h3 {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

.metric-header i {
    font-size: 24px;
    color: var(--primary-color);
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.metric-change {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.metric-change.positive {
    color: var(--success-color);
}

.metric-change i {
    font-size: 12px;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

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

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s;
}

.icon-btn:hover {
    background: var(--bg-light);
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Data Table Section */
.data-table-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
}

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

.table-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.table-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    width: 250px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: var(--bg-light);
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.data-table tbody tr {
    transition: background 0.3s;
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.data-table .positive {
    color: var(--success-color);
    font-weight: 600;
}

.action-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.action-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* India Map Section */
.map-section {
    margin-bottom: 30px;
}

.map-container-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.india-map-container {
    flex: 1;
    min-height: 500px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    border: 1px solid var(--border-color);
}

.india-map-container svg {
    width: 100%;
    height: 100%;
    max-height: 500px;
}

.india-map-container path {
    fill: #e6f3ff;
    stroke: #ffffff;
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.india-map-container path:hover {
    stroke-width: 3;
    stroke: var(--primary-color);
    filter: brightness(1.2);
    transform: scale(1.02);
    transform-origin: center;
}

.india-map-container path.high-value {
    fill: #0066cc;
}

.india-map-container path.medium-high-value {
    fill: #3399ff;
}

.india-map-container path.medium-value {
    fill: #66ccff;
}

.india-map-container path.low-value {
    fill: #99ddff;
}

.india-map-container path.very-low-value {
    fill: #e6f3ff;
}

.india-map-container path.no-data {
    fill: #cccccc;
    opacity: 0.6;
}

.map-legend {
    min-width: 200px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.map-legend h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 15px 0;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-color);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.legend-color.high {
    background: #0066cc;
}

.legend-color.medium-high {
    background: #3399ff;
}

.legend-color.medium {
    background: #66ccff;
}

.legend-color.low {
    background: #99ddff;
}

.legend-color.very-low {
    background: #e6f3ff;
}

.state-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
    z-index: 10000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    max-width: 250px;
}

.state-tooltip.show {
    display: block;
}

.state-tooltip .state-name {
    font-weight: 700;
    margin-bottom: 5px;
}

.state-tooltip .state-value {
    font-size: 12px;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-select {
        flex: 1;
        min-width: 150px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-controls {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .map-container-wrapper {
        flex-direction: column;
    }

    .map-legend {
        width: 100%;
    }

    .india-map-container {
        min-height: 400px;
    }
}
