/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
}

/* Navigation */
nav {
    background-color: #333;
    color: white;
    padding: 1rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    padding: 0.5rem;
}

.nav-links a:hover {
    background-color: #555;
    border-radius: 4px;
}

/* Main content */
main {
    margin: 2rem auto;
    padding: 0 1rem;
}

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

/* Forms */
.form-container {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background-color: #333;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

button:hover {
    background-color: #555;
}

.btn-delete {
    background-color: #dc3545;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* Tables */
.list-container {
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f4f4f4;
    font-weight: bold;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Dashboard */
.dashboard {
    padding: 2rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #2563eb;
    margin: 1rem 0;
}

.quick-grades {
    margin-bottom: 2rem;
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.student-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.student-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.student-card p {
    color: #666;
    font-size: 0.9rem;
}

.recent-grades {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recent-grades table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.recent-grades th,
.recent-grades td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.recent-grades th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

/* Grades Page Styles */
.grades-container {
    padding: 2rem;
}

.student-selection {
    margin-bottom: 2rem;
}

.student-card.selected {
    border: 2px solid #2563eb;
    background: #eff6ff;
}

.grade-entry {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.subject-card {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.subject-card h4 {
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.semester-grades {
    display: grid;
    gap: 1rem;
}

.semester {
    display: grid;
    gap: 0.5rem;
}

.semester label {
    font-weight: 500;
    color: #4b5563;
}

.semester input[type="number"] {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    width: 100%;
}

td input[type="number"] {
    text-align: center;
    border:none;
}

td{ 
    background-color: white;
}

.semester button {
    margin-top: 0.5rem;
}

.semester select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 100%;
    background-color: white;
    font-size: 1rem;
    cursor: pointer;
}

.semester select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.semester select option {
    padding: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .student-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .subject-grid {
        grid-template-columns: 1fr;
    }

    .recent-grades {
        overflow-x: auto;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links a {
        display: inline-block;
        margin: 0.5rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }
} 