/* School Management System - Complete Stylesheet */

/* ===================== GLOBAL STYLES ===================== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --mobile-nav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* ===================== SIDEBAR STYLES ===================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu li a i {
    font-size: 1.2rem;
    width: 30px;
    margin-right: 10px;
}

.sidebar-menu li a span {
    flex: 1;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu li.active a {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left: 4px solid var(--primary-color);
}

.sidebar-menu li a .badge {
    margin-left: auto;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===================== MAIN CONTENT ===================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.content-wrapper {
    padding: 30px;
    padding-bottom: 100px;
}

/* ===================== MOBILE BOTTOM NAVIGATION ===================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    height: var(--mobile-nav-height);
}

.mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    min-width: 44px;
    min-height: 44px;
}

.mobile-bottom-nav a i {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.mobile-bottom-nav a.active {
    color: var(--primary-color);
}

.mobile-bottom-nav a .badge {
    position: absolute;
    top: 5px;
    right: 20%;
    font-size: 0.65rem;
}

/* ===================== STATISTICS CARDS ===================== */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    color: white;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    margin-right: 20px;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* ===================== CARDS ===================== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ===================== BUTTONS ===================== */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    min-width: 36px;
    min-height: 36px;
}

/* ===================== TABLES ===================== */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #495057;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

/* ===================== FORMS ===================== */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ===================== BADGES ===================== */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 6px;
}

/* ===================== LOGIN PAGE ===================== */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ===================== GRADIENTS ===================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===================== ACTIVITY LIST ===================== */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    margin-right: 15px;
    color: var(--primary-color);
}

.activity-content {
    flex: 1;
}

/* ===================== RESPONSIVE STYLES ===================== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .content-wrapper {
        padding: 20px 15px;
        padding-bottom: 80px;
    }
}

@media (max-width: 576px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .table {
        font-size: 0.85rem;
    }
}

/* ===================== SCROLLBAR STYLING ===================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* ===================== UTILITIES ===================== */
.sidebar-toggle {
    font-size: 1.5rem;
    color: #333;
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}
