@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Professional styling for School Management System */

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

.login-container {
    max-width: 450px;
    margin: 100px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-in;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input[type="text"], input[type="password"], input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.error {
    color: #e74c3c;
    margin-bottom: 15px;
    font-weight: 500;
}

.dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-in;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.nav {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.nav li {
    margin: 0 20px;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

.nav.active .hamburger div:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav.active .hamburger div:nth-child(2) {
    opacity: 0;
}

.nav.active .hamburger div:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    transition: width 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 10px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
}

.sidebar.collapsed .toggle-btn {
    right: 15px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 5px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar.collapsed .sidebar-nav a {
    padding: 12px 15px;
    justify-content: center;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #667eea;
}

.sidebar-nav a.active {
    background-color: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
}

.sidebar-nav .icon {
    margin-right: 15px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar.collapsed .sidebar-nav .icon {
    margin-right: 0;
}

.sidebar-nav .text {
    flex: 1;
}

.sidebar.collapsed .sidebar-nav .text {
    display: none;
}

.main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

body.has-collapsed-sidebar .main-content {
    margin-left: 60px;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.page-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-in;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .sidebar.collapsed {
        width: 100%;
        height: 60px;
    }

    .main-content {
        margin-left: 0;
        padding: 10px;
    }

    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }

    .sidebar-nav {
        display: flex;
        padding: 0;
    }

    .sidebar-nav ul {
        display: flex;
        width: 100%;
        justify-content: space-around;
    }

    .sidebar-nav li {
        margin: 0;
    }

    .sidebar-nav a {
        padding: 15px 10px;
        flex-direction: column;
        text-align: center;
        font-size: 12px;
    }

    .sidebar-nav .icon {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .sidebar-nav .text {
        display: block;
    }

    .toggle-btn {
        display: none;
    }

    .page-content {
        padding: 20px;
        margin: 10px 0;
    }
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.table th, .table td {
    border: 1px solid #e1e5e9;
    padding: 15px;
    text-align: left;
    transition: background-color 0.3s ease;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table tr:hover {
    background-color: #e9ecef;
}

.content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.content h3 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.content ul {
    list-style: none;
    padding: 0;
}

.content li {
    margin-bottom: 10px;
}

.content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}