/* Custom CSS for School Management System */
body {
    background-color: #f8f9fa;
    color: #333;
    padding-top: 60px; /* Account for fixed navbar */
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Top Navbar */
.navbar {
    height: 60px;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Sidebar Styles */
.sidebar {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    width: 250px !important;
    height: calc(100vh - 60px) !important;
    background: #343a40 !important;
    color: white !important;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000 !important;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#sidebar {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    width: 250px !important;
    height: calc(100vh - 60px) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar.collapsed {
    transform: translateX(-250px);
}

.sidebar-header {
    background: #495057;
    border-bottom: 1px solid #495057;
}

.sidebar-header .text-center {
    padding: 15px 10px;
}

.sidebar-header small {
    font-size: 11px;
    line-height: 1.3;
    color: #adb5bd;
}

.sidebar-content {
    padding: 0;
}

.sidebar .nav {
    padding: 0;
}

.sidebar .nav-item {
    border-bottom: 1px solid #495057;
}

.sidebar .nav-link {
    color: #adb5bd;
    padding: 15px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    position: relative;
}

.sidebar .nav-link:hover {
    background: #495057;
    color: #fff;
    text-decoration: none;
}

.sidebar .nav-link.active {
    background: #007bff;
    color: #fff;
}

.sidebar .nav-link i {
    width: 18px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.sidebar .nav-link .float-end {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar .nav-link[aria-expanded="true"] .float-end {
    transform: rotate(180deg);
}

/* Submenu Styles */
.sidebar .collapse {
    background: #2c3034;
}

.sidebar .collapse .nav-link {
    padding: 12px 20px 12px 50px;
    font-size: 13px;
    color: #6c757d;
    border-bottom: none;
}

.sidebar .collapse .nav-link:hover {
    color: #fff;
    background: #495057;
}

.sidebar .collapse .nav-link.active {
    color: #007bff;
    background: #495057;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 60px);
    padding: 20px;
    background: #f8f9fa;
}

.main-content.expanded {
    margin-left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-250px);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    body {
        padding-top: 60px;
    }
}

/* Scrollbar Styling for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #343a40;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Force sidebar visibility */
#sidebar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background-color: white;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.stats-card .card-body {
    padding: 2rem;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Table styling for better visibility */
.table {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

.table td, .table th {
    color: #333 !important;
    border-color: #dee2e6 !important;
    background-color: transparent !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(108, 117, 125, 0.1) !important;
    color: #333 !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(108, 117, 125, 0.2) !important;
    color: #333 !important;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
}

.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #343a40;
}

.sidebar .nav-link {
    color: #adb5bd;
    padding: 1rem;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: #495057;
}

.sidebar .nav-link.active {
    color: white;
    background-color: #007bff;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.alert {
    border-radius: 10px;
}

.badge {
    font-size: 0.8rem;
}

.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .stats-card h3 {
        font-size: 2rem;
    }
}