/* Gradebook Management Public Styles */

.gbm-public-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gbm-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.gbm-dashboard-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 300;
}

.gbm-user-role {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.gbm-dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gbm-widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gbm-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.gbm-widget h3 {
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.gbm-widget-content {
    padding: 20px;
    min-height: 120px;
}

.gbm-loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 0;
}

.gbm-error {
    color: #dc3545;
    background: #f8d7da;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

/* Student Grades */
.gbm-student-grades {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.gbm-student-grades h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #495057;
    font-size: 24px;
    text-align: center;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.gbm-grades-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gbm-grades-table th {
    background: #007bff;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.gbm-grades-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.gbm-grades-table tr:hover {
    background: #f8f9fa;
}

.gbm-grades-table tr:last-child td {
    border-bottom: none;
}

/* Grade styling */
.gbm-grade-a {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.gbm-grade-b {
    background: #d1ecf1;
    color: #0c5460;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.gbm-grade-c {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.gbm-grade-d {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.gbm-grade-e {
    background: #f5c6cb;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* Parent Portal */
.gbm-parent-portal {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.gbm-parent-portal h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #495057;
    font-size: 24px;
    text-align: center;
    border-bottom: 2px solid #28a745;
    padding-bottom: 10px;
}

.gbm-children-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 5px;
}

.gbm-child-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    color: #6c757d;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.gbm-child-tab:hover {
    color: #495057;
    background: #f8f9fa;
}

.gbm-child-tab.active {
    color: #28a745;
    border-bottom-color: #28a745;
    background: #f8f9fa;
}

.gbm-child-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gbm-child-header {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 8px;
}

.gbm-child-header h4 {
    margin: 0 0 5px;
    font-size: 20px;
    font-weight: 600;
}

.gbm-child-header p {
    margin: 0;
    opacity: 0.9;
}

.gbm-child-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gbm-child-widgets .gbm-widget h5 {
    margin: 0;
    padding: 15px 20px;
    background: #e9ecef;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

/* AI Insights for Public */
.gbm-ai-insights {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid #2196f3;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.gbm-insight-header {
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.gbm-insight-item {
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    line-height: 1.6;
    color: #495057;
}

.gbm-insight-item:last-child {
    margin-bottom: 0;
}

/* Performance Charts */
.gbm-chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

.gbm-chart {
    max-height: 100%;
}

/* Progress Indicators */
.gbm-progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
    margin: 10px 0;
}

.gbm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Statistics Cards */
.gbm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gbm-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

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

.gbm-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.gbm-stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gbm-public-dashboard {
        padding: 15px;
    }
    
    .gbm-dashboard-header {
        padding: 20px;
    }
    
    .gbm-dashboard-header h2 {
        font-size: 24px;
    }
    
    .gbm-dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .gbm-child-widgets {
        grid-template-columns: 1fr;
    }
    
    .gbm-children-tabs {
        flex-direction: column;
    }
    
    .gbm-child-tab {
        text-align: left;
        border-bottom: 1px solid #e9ecef;
        border-radius: 0;
    }
    
    .gbm-child-tab.active {
        border-bottom-color: #28a745;
        border-left: 3px solid #28a745;
    }
    
    .gbm-grades-table {
        font-size: 14px;
    }
    
    .gbm-grades-table th,
    .gbm-grades-table td {
        padding: 8px 6px;
    }
    
    .gbm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gbm-student-grades,
    .gbm-parent-portal {
        padding: 20px 15px;
    }
    
    .gbm-grades-table {
        font-size: 12px;
    }
    
    .gbm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .gbm-chart-container {
        height: 250px;
    }
}

/* Print Styles */
@media print {
    .gbm-widget:hover {
        transform: none;
        box-shadow: none;
    }
    
    .gbm-dashboard-header {
        background: #f8f9fa !important;
        color: #495057 !important;
    }
    
    .gbm-child-header {
        background: #f8f9fa !important;
        color: #495057 !important;
    }
    
    .gbm-ai-insights {
        background: #f8f9fa !important;
    }
}

