/* ============================================
   DASHBOARD DISCIPLINAR - ESTILOS ESPECÍFICOS
   ============================================ */

/* ============================================
   ANÁLISES - ESTILOS ESPECÍFICOS
============================================ */

/* Controles de Análise */
.analytics-controls {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.period-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.period-label {
    font-weight: 600;
    color: #323130;
}

.period-buttons {
    display: flex;
    gap: 4px;
}

.period-btn {
    padding: 8px 16px;
    border: 1px solid #e1dfdd;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #605e5c;
}

.period-btn:hover {
    background: #f8f7f6;
    border-color: #0078d4;
}

.period-btn.active {
    background: #0078d4;
    border-color: #0078d4;
    color: white;
}

.analytics-actions {
    display: flex;
    gap: 8px;
}

/* Grid de Análises */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.analytics-card {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.analytics-card.analytics-wide {
    grid-column: 1 / -1;
}

.analytics-header {
    margin-bottom: 16px;
    border-bottom: 1px solid #f3f2f1;
    padding-bottom: 12px;
}

.analytics-title {
    font-size: 16px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 4px;
}

.analytics-subtitle {
    font-size: 12px;
    color: #605e5c;
}

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

.chart-container.chart-small {
    height: 250px;
}

/* Insights */
.insights-section {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.insights-title {
    font-size: 18px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insights-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f7f6;
    border-radius: 6px;
    border-left: 4px solid #0078d4;
}

.insight-text {
    flex: 1;
    color: #323130;
    font-size: 14px;
}

.trend-indicator {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.trend-indicator.trend-up {
    background: #ffeaea;
    color: #dc3545;
}

.trend-indicator.trend-down {
    background: #e8f5e8;
    color: #28a745;
}

.trend-indicator.trend-stable {
    background: #fff5e6;
    color: #fd7e14;
}

/* Ranking */
.ranking-container {
    max-height: 400px;
    overflow-y: auto;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f8f7f6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ranking-item:hover {
    background: #f3f2f1;
}

.ranking-position {
    font-size: 18px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-weight: 600;
    color: #323130;
    margin-bottom: 4px;
}

.ranking-details {
    font-size: 12px;
    color: #605e5c;
}

.ranking-score {
    font-size: 20px;
    font-weight: bold;
    color: #dc3545;
    min-width: 40px;
    text-align: center;
}

/* Análise Preditiva */
.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.prediction-card {
    background: #f8f7f6;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.prediction-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.prediction-number {
    font-size: 24px;
    font-weight: bold;
    color: #323130;
    margin-bottom: 4px;
}

.prediction-label {
    font-weight: 600;
    color: #605e5c;
    margin-bottom: 4px;
}

.prediction-subtitle {
    font-size: 12px;
    color: #8a8886;
}

.prediction-recommendations {
    background: #f8f7f6;
    border-radius: 6px;
    padding: 16px;
}

.prediction-recommendations h4 {
    margin: 0 0 12px 0;
    color: #323130;
}

.prediction-recommendations ul {
    margin: 0;
    padding-left: 20px;
}

.prediction-recommendations li {
    margin-bottom: 8px;
    color: #605e5c;
}

/* ============================================
   RELATÓRIOS - SEÇÃO DE GRÁFICOS
============================================ */

.charts-section {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.charts-title {
    font-size: 18px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.chart-card {
    background: #f8f7f6;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-header {
    margin-bottom: 16px;
    border-bottom: 1px solid #e1dfdd;
    padding-bottom: 12px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 4px;
}

.chart-subtitle {
    font-size: 12px;
    color: #605e5c;
}

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

.chart-container.chart-small {
    height: 250px;
}

/* ============================================
   ESTATÍSTICAS RÁPIDAS
============================================ */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-primary .stat-icon {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: white;
}

.stat-danger .stat-icon {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.stat-warning .stat-icon {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #323130;
}

.stat-info .stat-icon {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #323130;
    line-height: 1;
    margin-bottom: 4px;
    animation: countUp 0.8s ease-out both;
}

@keyframes countUp {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.stat-label {
    font-size: 14px;
    color: #605e5c;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 12px;
    color: #107c10;
    font-weight: 500;
}

.student-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-box {
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    background: #f8f7f6;
}

.stat-box .stat-number {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-box .stat-label {
    font-size: 11px;
    color: #605e5c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   ANÁLISES E GRÁFICOS
============================================ */
.analytics-controls {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.period-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.period-label {
    font-size: 14px;
    font-weight: 600;
    color: #323130;
}

.period-buttons {
    display: flex;
    gap: 4px;
}

.period-btn {
    padding: 8px 16px;
    border: 1px solid #d1d0ce;
    border-radius: 4px;
    background: #ffffff;
    color: #323130;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background: #f3f2f1;
    border-color: #b3b0ad;
}

.period-btn.active {
    background: #0078d4;
    color: #ffffff;
    border-color: #0078d4;
}

.analytics-actions {
    display: flex;
    gap: 12px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.analytics-card {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.analytics-wide {
    grid-column: 1 / -1;
}

.analytics-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f2f1;
}

.analytics-title {
    font-size: 16px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 4px;
}

.analytics-subtitle {
    font-size: 12px;
    color: #605e5c;
}

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

.chart-small .chart-container {
    height: 250px;
}

/* ============================================
   INSIGHTS INTELIGENTES
============================================ */
.insights-section {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.insights-title {
    font-size: 18px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insights-container {
    display: grid;
    gap: 16px;
}

.insight-item {
    background: #f8f7f6;
    border: 1px solid #e1dfdd;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.insight-item:hover {
    background: #f3f2f1;
}

.insight-text {
    font-size: 14px;
    color: #323130;
    flex: 1;
}

.insight-highlight {
    font-weight: 700;
    color: #0078d4;
}

.trend-indicator {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trend-up {
    background: #fff0f0;
    color: #dc3545;
}

.trend-down {
    background: #f0fff0;
    color: #107c10;
}

.trend-stable {
    background: #f0f8ff;
    color: #0078d4;
}

/* ============================================
   RANKING E HEATMAP
============================================ */
.ranking-container {
    max-height: 400px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f2f1;
    transition: all 0.2s ease;
}

.ranking-item:hover {
    background: #f8f7f6;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-position {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f2f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-right: 16px;
    flex-shrink: 0;
}

.ranking-position.top-3 {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #323130;
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-weight: 600;
    color: #323130;
    margin-bottom: 2px;
}

.ranking-details {
    font-size: 12px;
    color: #605e5c;
}

.ranking-value {
    font-weight: 700;
    font-size: 16px;
    color: #dc3545;
}

.heatmap-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 16px;
}

.heatmap-day {
    aspect-ratio: 1;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.heatmap-day:hover {
    transform: scale(1.1);
}

.heatmap-header {
    background: #f3f2f1;
    color: #605e5c;
    font-weight: 700;
}

.heatmap-low {
    background: #e3f2fd;
    color: #1976d2;
}

.heatmap-medium {
    background: #fff3e0;
    color: #f57c00;
}

.heatmap-high {
    background: #ffebee;
    color: #d32f2f;
}

/* ============================================
   RELATÓRIOS DETALHADOS
============================================ */
.reports-container {
    display: grid;
    gap: 20px;
}

/* ============================================
   RESPONSIVIDADE ESPECÍFICA DO DASHBOARD
============================================ */
@media (max-width: 1024px) {
    .quick-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .analytics-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .period-selector {
        justify-content: space-between;
    }
    
    .period-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
}
