/* Modern Analytics Dashboard Styles */

/* Header Section */
.analytics-header.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
    padding:1rem 3rem;
}

.analytics-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Section Titles */
.section-title {
    color: #2c3e50;
    font-weight: 600;
    display: inline-block;
}
.section-title svg {
    margin-right:10px;
}
/* Metric Cards */
.metric-card {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    height: 100%;
    min-height: 120px;
}
.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.info-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 2rem;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.2s ease;
}
.info-icon:hover {
    color: #2c3e50;
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.metric-icon.bg-primary {
    background-color: #008290;
}
.metric-icon.bg-success {
    background-color: #008290;
}
.metric-icon.bg-warning {
    background-color: #008290;
}
.metric-icon.bg-info {
    background-color: #008290;
}

.metric-content {
    flex: 1;
}

.metric-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
    line-height: 1.2;
}

.metric-content p {
    margin: 0;
    color: #1d2526;
    margin-top:6px;
    font-weight: 700;
    font-size: 1.4rem;
}

/* Platform Cards - smaller cards for platform analytics */
.platform-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
}

.platform-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}

.platform-card-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 1rem;
}

.platform-card-header h5 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.platform-card-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.platform-metric {
    text-align: center;
}

.platform-metric .metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    display: block;
}

.platform-metric .metric-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tab Navigation */
.nav-pills-custom {
    margin-bottom: 1rem;
}

.nav-pills-custom .nav-link {
    background: white;
    border: 2px solid #e9ecef;
    color: #6c757d;
    border-radius: 12px;
    padding: 12px 24px;
    margin-right: 8px;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
}
.platform-analytics-content .row{
    margin-bottom: 10px;
}
.nav-pills-custom .nav-link svg {
    margin-right:6px;
}
.nav-pills-custom .nav-link:hover {
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
}

.nav-pills-custom .nav-link.active {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    border-color: #3498db !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.nav-pills-custom .nav-link .badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: inherit;
}

.nav-pills-custom li{
    margin-bottom:12px;
}
.nav-pills-custom .nav-link.active .badge {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

/* Tab Content */
.tab-content {
    margin-top: 2rem;
}

.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-pane.show.active {
    display: block !important;
    opacity: 1;
    animation: fadeInUp 0.4s ease-in-out;
}

/* Tables */
.table-modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: none;
}
.table-modern tr td {
    border-bottom: 1px solid #f8f9fa;
    vertical-align: middle !important;
}
.table-modern thead th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.table-modern tbody td {
    padding: 1rem;
    border-color: #f8f9fa;
    vertical-align: middle;
}

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

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}
.indicator-table-number{
    font-size:14px;
    font-weight:700;
}
/* Performance Indicators */
.performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 600;
}

.performance-high {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.performance-medium {
    background: rgba(241, 196, 15, 0.1);
    color: #f39c12;
}

.performance-low {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Analytics Sections */
.analytics-section {
    margin-bottom: 3rem;
}

.analytics-section:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .metric-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .metric-icon {
        margin-bottom: 1rem;
    }
    
    .metric-content h3 {
        font-size: 1.5rem;
    }
    
    
    .nav-pills-custom .nav-link {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    .platform-card-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .analytics-header.gradient-bg {
        padding: 1.5rem !important;
    }
    
    .analytics-header h1 {
        font-size: 1.8rem;
    }
    
    .metric-card {
        padding: 1rem;
    }
    
    .metric-content h3 {
        font-size: 1.2rem;
    }
    
    .platform-card-metrics {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Legacy Analytics Support */
.analytics-indicators {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 6px;
    gap: 1rem;
    flex-wrap: wrap;
}

.analytics-indicator {
    padding: 10px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    background: white;
    border-radius: 8px;
    flex: 1;
    min-width: 150px;
}

.analytics-indicators .indicator-value {
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.analytics-indicators .indicator-title {
    margin-top: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.analytics-rating {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-bottom: 2rem;
}

.analytics-rating .fa-star {
    font-size: 35px;
    margin: 0 2px;
}

.analytics-rating .star-active {
    color: #ffd700;
}

.analytics-rating .star-inactive {
    color: #8e8e8e;
}

/* Chart Components */
.chart-controls {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.chart-controls .form-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: block;
}

.chart-controls .btn-group {
    margin-bottom: 0.5rem;
}

.chart-filters .btn-check:checked + .btn-outline-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.chart-filters .btn-check:checked + .btn-outline-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}



.chart-container {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border-radius: 0.5rem;
    padding: 2rem;
}

.chart-stats .bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.chart-stats .bg-light:hover {
    background-color: #e9ecef !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.chart-stats .h6 {
    color: #0d6efd;
    font-weight: 600;
    font-size: 1.8rem;
}

.chart-stats small {
    font-size: 1.8rem;
    color: #6c757d;
}

.chart-filters label {
    border: solid 1px #e9ecef;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.chart-filters label:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}
.chart-filters input[type="radio"].btn-check {
    display: none;
}

/* Chart responsive design */
@media (max-width: 768px) {
    .chart-controls .row {
        gap: 1rem;
    }
    
    .chart-controls .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .chart-filters .btn-group {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .chart-filters .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        margin-bottom: 0.5rem;
    }
    
    .chart-container {
        height: 300px !important;
    }
    
    .chart-stats .col-md-3 {
        margin-bottom: 0.5rem;
    }
}