/* Management Analytics Dashboard Styles */

/* Executive Dashboard Theme */
.management-dashboard {
    --primary-blue: #1971c2;
    --success-green: #2b8a3e;
    --warning-orange: #fd7e14;
    --danger-red: #e03131;
    --info-cyan: #0c8599;
    --bg-light: #f8f9fa;
    --border-light: #e9ecef;
}

/* Executive Summary Card */
.executive-summary-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.executive-summary-card .metric-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Performance Tier Colors */
.tier-excellent {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    border-left: 4px solid #2b8a3e;
}

.tier-good {
    background: linear-gradient(135deg, #8ce99a 0%, #69db7c 100%);
    border-left: 4px solid #51cf66;
}

.tier-average {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    border-left: 4px solid #fd7e14;
}

.tier-poor {
    background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 100%);
    border-left: 4px solid #fa5252;
}

.tier-critical {
    background: linear-gradient(135deg, #ff6b6b 0%, #e03131 100%);
    border-left: 4px solid #c92a2a;
}

/* Inspector Performance Categories */
.inspector-star-performer {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    border: 2px solid #fd7e14;
    box-shadow: 0 4px 20px rgba(253, 126, 20, 0.3);
}

.inspector-strong-performer {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    border: 2px solid #2b8a3e;
}

.inspector-average-performer {
    background: linear-gradient(135deg, #74c0fc 0%, #339af0 100%);
    border: 2px solid #1971c2;
}

.inspector-needs-support {
    background: linear-gradient(135deg, #ffa8a8 0%, #ff8787 100%);
    border: 2px solid #fa5252;
}

.inspector-urgent-attention {
    background: linear-gradient(135deg, #ff6b6b 0%, #e03131 100%);
    border: 2px solid #c92a2a;
    animation: pulse-urgent 2s infinite;
}

@keyframes pulse-urgent {
    0% { box-shadow: 0 0 0 0 rgba(224, 49, 49, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(224, 49, 49, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 49, 49, 0); }
}

/* Data Quality Issue Cards */
.issue-critical {
    border-left: 5px solid #e03131;
    background: linear-gradient(135deg, #ffe3e3 0%, #ffc9c9 100%);
}

.issue-warning {
    border-left: 5px solid #fd7e14;
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
}

.issue-success {
    border-left: 5px solid #37b24d;
    background: linear-gradient(135deg, #e6ffe6 0%, #ccf2cc 100%);
}

/* Management Navigation Buttons */
.mgmt-nav-button {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mgmt-nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Village Performance Cards */
.village-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.village-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--tier-color, #1971c2);
}

.village-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Progress Bars */
.custom-progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.custom-progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--progress-color) 0%, var(--progress-color-light) 100%);
    transition: width 0.6s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .executive-summary-card {
        margin: 0 -1rem;
    }
    
    .village-card,
    .inspector-card,
    .issue-card {
        margin: 0 -0.5rem;
    }
    
    .mgmt-nav-button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Tabs Styling */
.mantine-Tabs-tab {
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.mantine-Tabs-tab[data-active="true"] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border-color: #dee2e6;
    border-bottom: 2px solid #6c757d;
}

/* Action Buttons */
.action-button {
    background: linear-gradient(135deg, #1971c2 0%, #1c7ed6 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-button:hover {
    background: linear-gradient(135deg, #1864ab 0%, #1971c2 100%);
    transform: translateY(-1px);
}

.action-button-secondary {
    background: transparent;
    border: 2px solid #1971c2;
    color: #1971c2;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-button-secondary:hover {
    background: #1971c2;
    color: white;
}

/* Alert Enhancements */
.mantine-Alert-root {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Card Hover Effects */
.analytics-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.analytics-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Status Indicators */
.status-indicator {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.online {
    background: #51cf66;
    box-shadow: 0 0 0 2px rgba(81, 207, 102, 0.3);
}

.status-indicator.offline {
    background: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.3);
}

.status-indicator.warning {
    background: #ffd43b;
    box-shadow: 0 0 0 2px rgba(255, 212, 59, 0.3);
}
