/* Comprehensive Dashboard Styles */

/* State Selector Bar */
.state-selector-bar {
    background: transparent;
    color: inherit;
    padding: 15px 0;
    border: none;
}

@media (max-width: 768px) {
    .state-selector-bar {
        min-height: 100px;
    }
}

.state-selector-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.state-selector-content label {
    font-size: 16px;
}

.state-select {
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.state-select option {
    background: var(--primary-color);
    color: white;
}

.last-updated {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.9;
}

/* Module Tabs */
.module-tabs {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.module-tab {
    padding: 15px 25px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.module-tab:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.module-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-light);
}

.module-tab i {
    font-size: 18px;
}

/* Module Content */
.module-content {
    display: none;
    animation: fadeIn 0.5s;
}

.module-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.module-title {
    font-size: 32px;
    color: var(--text-color);
    margin: 0;
}

.module-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Metrics Row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.metric-card-large {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.metric-card-large:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.metric-header-large {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.metric-header-large h3 {
    font-size: 18px;
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.improving,
.status-badge.high-growth {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge.stable {
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary-color);
}

.status-badge.declining {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.metric-value-large {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.metric-details {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    flex-wrap: wrap;
}

.metric-details .change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.metric-details .change.positive {
    color: var(--success-color);
}

.metric-details .baseline {
    color: var(--text-light);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.5s;
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.insight-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.insight-card h4 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insight-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.insight-item:last-child {
    border-bottom: none;
}

.insight-item span {
    color: var(--text-light);
    font-size: 14px;
}

.insight-item strong {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.insight-item strong.positive {
    color: var(--success-color);
}

/* Manpower Module Styles */
.manpower-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card-module {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.stat-card-module:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.stat-icon-module {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-content-module h3 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value-module {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.stat-change-module {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-change-module.positive {
    color: var(--success-color);
}

/* GSDP Module Styles */
.gsdp-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.gsdp-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.gsdp-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.gsdp-card h3 {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 15px;
    font-weight: 500;
}

.gsdp-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.gsdp-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.growth-rate {
    font-size: 20px;
    font-weight: 700;
}

.growth-rate.positive {
    color: var(--success-color);
}

.cagr {
    color: var(--text-light);
}

.status-indicator {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-indicator.high-growth {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-indicator.improving {
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary-color);
}

.status-indicator.stable {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280;
}

.status-indicator.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
}

/* Sector Breakdown */
.sector-breakdown {
    margin-top: 40px;
}

.sector-breakdown h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-color);
}

.sector-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.sector-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.sector-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.sector-card h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.sector-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.sector-percentage {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.sector-growth {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

.sector-growth.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

/* NDRF Module Styles */
.ndrf-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.ndrf-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.ndrf-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.ndrf-card h3 {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 15px;
    font-weight: 500;
}

.ndrf-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.ndrf-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-light);
}

.progress-indicator {
    margin-bottom: 15px;
}

.progress-bar-large {
    width: 100%;
    height: 12px;
    background: var(--bg-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill-large {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    transition: width 0.5s;
}

.progress-indicator span {
    font-size: 12px;
    color: var(--text-light);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.chart-card-module {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.chart-card-module h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.chart-card-module canvas {
    max-height: 300px;
}

/* Comprehensive Table */
.data-table-module {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.data-table-module h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
}

.comprehensive-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.comprehensive-table thead {
    background: var(--bg-light);
}

.comprehensive-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.comprehensive-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.comprehensive-table tbody tr {
    transition: background 0.3s;
}

.comprehensive-table tbody tr:hover {
    background: var(--bg-light);
}

/* Progress Indicators in Tables */
.progress-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-mini {
    flex: 1;
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    overflow: hidden;
}

.progress-mini-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 3px;
}

/* Filters Panel */
.filters-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.filter-group .btn {
    margin-top: 8px;
}

/* District Grid */
.district-breakdown {
    margin-top: 40px;
}

.district-breakdown h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-color);
}

.district-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.district-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.district-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.district-card h4 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.district-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.district-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.district-metric:last-child {
    border-bottom: none;
}

.district-metric span {
    color: var(--text-light);
    font-size: 14px;
}

.district-metric strong {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.district-status {
    margin-top: 15px;
}

/* Comparison Section */
.comparison-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.comparison-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.comparison-chart {
    height: 400px;
}

/* Table Header Module */
.table-header-module {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header-module h3 {
    margin: 0;
}

.table-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.stat-baseline {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

/* Performance Status */
.performance-status {
    margin-top: 40px;
}

.performance-status h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-color);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.status-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.status-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.status-card i {
    font-size: 36px;
    margin-bottom: 15px;
}

.status-card.high-growth {
    border-left: 4px solid var(--success-color);
}

.status-card.high-growth i {
    color: var(--success-color);
}

.status-card.improving {
    border-left: 4px solid var(--secondary-color);
}

.status-card.improving i {
    color: var(--secondary-color);
}

.status-card.stable {
    border-left: 4px solid var(--accent-color);
}

.status-card.stable i {
    color: var(--accent-color);
}

.status-card h4 {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.status-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.status-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.sector-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
}

/* Preparedness Section */
.preparedness-section {
    margin-top: 40px;
}

.preparedness-section h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-color);
}

.preparedness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.preparedness-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.preparedness-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.preparedness-card h4 {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 15px;
}

.preparedness-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.preparedness-status {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 10px;
    display: block;
}

/* Recovery Section */
.recovery-section {
    margin-top: 40px;
}

.recovery-section h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-color);
}

.recovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.recovery-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.recovery-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.recovery-card h4 {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 20px;
}

.recovery-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.recovery-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
}

.recovery-label {
    font-size: 14px;
    color: var(--text-light);
}

/* Severity Badge */
.severity-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.severity-badge.high {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.severity-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
}

.severity-badge.low {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .module-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .module-filters {
        width: 100%;
    }

    .module-filters .filter-select {
        flex: 1;
        min-width: 150px;
    }

    .metrics-row,
    .insights-grid,
    .manpower-metrics,
    .gsdp-metrics,
    .ndrf-metrics {
        grid-template-columns: 1fr;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .chart-card-module canvas {
        max-height: 250px;
    }

    .comprehensive-table {
        font-size: 12px;
    }

    .comprehensive-table th,
    .comprehensive-table td {
        padding: 8px 10px;
    }

    .state-selector-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .last-updated {
        margin-left: 0;
    }
}
