/* School Management System Frontend Styles */
.sms-portal {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
}

.sms-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.sms-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.sms-card-header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1em;
}

.sms-card-body {
    padding: 20px;
}

.sms-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sms-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.sms-stat-value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.sms-stat-label {
    opacity: 0.9;
    font-size: 0.9em;
}

.sms-grade-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.sms-grade-table th {
    background: #34495e;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.sms-grade-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.sms-grade-table tr:hover {
    background: #f8f9fa;
}

.sms-grade-excellent { color: #27ae60; font-weight: bold; }
.sms-grade-good { color: #2980b9; font-weight: bold; }
.sms-grade-average { color: #f39c12; font-weight: bold; }
.sms-grade-poor { color: #e74c3c; font-weight: bold; }

.sms-attendance-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 15px;
}

.sms-calendar-day {
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    font-size: 0.9em;
}

.sms-attendance-present { background: #d4edda; color: #155724; }
.sms-attendance-absent { background: #f8d7da; color: #721c24; }
.sms-attendance-late { background: #fff3cd; color: #856404; }

.sms-form-group {
    margin-bottom: 20px;
}

.sms-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.sms-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.sms-form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.sms-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.sms-btn-primary {
    background: #3498db;
    color: white;
}

.sms-btn-primary:hover {
    background: #2980b9;
}

.sms-btn-success {
    background: #27ae60;
    color: white;
}

.sms-btn-success:hover {
    background: #219a52;
}

.sms-btn-danger {
    background: #e74c3c;
    color: white;
}

.sms-btn-danger:hover {
    background: #c0392b;
}

.sms-alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.sms-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sms-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sms-alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.sms-loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.sms-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: sms-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes sms-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sms-dashboard {
        padding: 10px;
    }
    
    .sms-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sms-grade-table {
        font-size: 0.9em;
    }
    
    .sms-grade-table th,
    .sms-grade-table td {
        padding: 8px 10px;
    }
}

/* Print Styles */
@media print {
    .sms-portal {
        background: white;
    }
    
    .sms-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .sms-btn {
        display: none;
    }
}