
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    display: flex;
    height: 100vh;
    color: #333;
}

.container {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 250px;
    background-color: #ffffff;
    color: #333;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.logo {
    max-width: 100%;
    height: auto;
}

.sidebar-nav {
    flex-grow: 1;
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s, padding-left 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #f0f0f0;
    border-left: 3px solid #28a745;
    padding-left: 17px;
    color: #28a745;
    font-weight: 600;
}

.sidebar-nav a i {
    margin-right: 10px;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.user-profile {
    display: flex;
    align-items: center;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.dashboard-section {
    margin-top: 20px;
}

.card-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1 1 300px;
    text-align: center;
}

.card h3 {
    margin-top: 0;
    font-size: 18px;
    color: #28a745;
}

.card p {
    font-size: 24px;
    font-weight: 600;
    margin: 10px 0;
}

.academics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.class-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.students-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.students-table thead th {
    background-color: #28a745;
    color: #ffffff;
    padding: 12px 15px;
    text-align: left;
}

.students-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.students-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.students-table tbody tr:hover {
    background-color: #f0f0f0;
}

.back-button {
    display: inline-block;
    background-color: #28a745;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #218838;
}

.add-student-form {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.add-student-form h3 {
    margin-top: 0;
    font-size: 18px;
    color: #28a745;
}

.add-student-form form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-student-form input {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    flex: 1;
}

.add-student-form button {
    background-color: #28a745;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-student-form button:hover {
    background-color: #218838;
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 0 10px;
    }

    .sidebar-header {
        border-bottom: none;
        padding: 10px;
    }

    .sidebar-nav {
        display: flex;
        flex-grow: 1;
        justify-content: space-around;
        padding: 0;
    }

    .sidebar-nav a {
        padding: 15px 10px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .sidebar-nav a:hover,
    .sidebar-nav a.active {
        padding-left: 10px;
        border-left: none;
        border-bottom: 3px solid #28a745;
        background-color: transparent;
    }

    .add-student-form form {
        flex-direction: column;
        align-items: stretch;
    }
}
