* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
    color: #333;
}

header, footer {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

header h1, footer p {
    margin: 0;
}

/* Top Navigation */
nav.top-nav {
    background-color: #f0f0f0;
    padding: 15px;
    border-bottom: 2px solid #007bff;
    margin-bottom: 20px;
    text-align: center;
}

nav.top-nav a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    transition: all 0.3s;
    display: inline-block;
}

nav.top-nav a:hover {
    background-color: #e3f2fd;
    border-radius: 4px;
    text-decoration: none;
}

main, .container, .report-container, .form-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
    border-bottom: 2px solid #007bff;
}

p {
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Navigation Lists */
ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    margin-bottom: 10px;
}

ul li a {
    display: block;
    padding: 12px 15px;
    background-color: #f0f0f0;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    transition: all 0.3s;
}

ul li a:hover {
    background-color: #e3f2fd;
    border-left-color: #0056b3;
    padding-left: 20px;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th {
    background-color: #007bff;
    color: white;
    padding: 14px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #0056b3;
}

td {
    padding: 12px 14px;
    border-bottom: 1px solid #e0e0e0;
}

tr:hover {
    background-color: #f5f5f5;
    transition: background-color 0.2s;
}

/* Buttons and Links in Tables */
a.btn, a.action-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin-right: 5px;
    transition: all 0.3s;
}

a.btn:hover, a.action-link:hover {
    background-color: #0056b3;
    box-shadow: 0 2px 5px rgba(0,123,255,0.3);
}

a.btn-danger {
    background-color: #dc3545;
}

a.btn-danger:hover {
    background-color: #c82333;
}

a.btn-success {
    background-color: #28a745;
}

a.btn-success:hover {
    background-color: #218838;
}

a.btn-warning {
    background-color: #ffc107;
    color: #333;
}

a.btn-warning:hover {
    background-color: #e0a800;
}

/* Form Elements */
form {
    margin: 20px 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

input[type="submit"],
button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

input[type="submit"]:hover,
button:hover {
    background-color: #0056b3;
    box-shadow: 0 2px 5px rgba(0,123,255,0.3);
}

/* Special Boxes */
.back-link {
    margin-bottom: 20px;
}

.back-link a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.back-link a:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.student-header {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.grade-summary {
    background-color: #e8f4f8;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.alert-error, .alert-danger {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #007bff;
    color: #0c5460;
}

/* No data message */
.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    main, .container, .report-container, .form-container {
        margin: 10px;
        padding: 15px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
    
    a.btn, a.action-link {
        padding: 6px 10px;
        font-size: 12px;
    }
}