:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

* { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

body { background: #f0f2f5; overflow-x: hidden; }

#wrapper { min-height: 100vh; }

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

#sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.sidebar-logo-text span { font-size: 0.95rem; }
.sidebar-logo-text small { font-size: 0.7rem; }

.sidebar-user {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-avatar img, .user-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar { width: 40px; height: 40px; }
.user-avatar-sm { width: 32px; height: 32px; }

.avatar-placeholder, .avatar-placeholder-sm {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.avatar-placeholder { width: 40px; height: 40px; font-size: 14px; }
.avatar-placeholder-sm { width: 32px; height: 32px; font-size: 11px; }

.sidebar-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex: 1;
}

.nav-divider {
    padding: 0.5rem 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
}

.nav-item .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.88rem;
}

.nav-item .nav-link i { font-size: 1.1rem; width: 20px; }

.nav-item .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nav-item .nav-link.active {
    background: rgba(102, 126, 234, 0.2);
    color: #fff;
    border-left-color: #667eea;
}

.nav-item .nav-link .badge { font-size: 0.65rem; padding: 0.2rem 0.5rem; }

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#page-content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#sidebar.collapsed + #page-content-wrapper {
    margin-left: 0;
}

.navbar { min-height: 60px; }

.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.card {
    border-radius: 12px;
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important; }

.card-header { border-radius: 12px 12px 0 0 !important; padding: 1rem 1.25rem; }

.table th { font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: #6c757d; }

.table td { vertical-align: middle; }

.table-hover tbody tr:hover { background: rgba(102, 126, 234, 0.04); }

.btn { border-radius: 8px; font-weight: 500; }

.btn-sm { border-radius: 6px; }

.alert { border-radius: 10px; border: none; }

.modal-content { border-radius: 12px; border: none; }

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-control-lg { padding: 0.65rem 1rem; font-size: 1rem; }

.pagination { gap: 2px; }
.page-link { border-radius: 6px !important; border: none; color: #495057; }
.page-item.active .page-link { background: var(--primary-gradient); color: #fff; }

.login-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.student-avatar-sm {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.event-date {
    min-width: 50px;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 0.6rem 1rem;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    background: transparent;
}

footer { margin-top: auto; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.show {
        margin-left: 0;
    }
    #page-content-wrapper {
        margin-left: 0 !important;
    }
    .container-fluid.p-4 { padding: 1rem !important; }
    .stat-card h2 { font-size: 1.5rem; }
}

@media (min-width: 769px) {
    #sidebar.collapsed {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.collapsed + #page-content-wrapper {
        margin-left: 0;
    }
}

.bg-success-subtle { background: #d1fae5; }
.text-success { color: #059669 !important; }
.bg-danger-subtle { background: #fee2e2; }
.text-danger { color: #dc2626 !important; }
.bg-warning-subtle { background: #fef3c7; }
.text-warning { color: #d97706 !important; }

.text-purple { color: #7c3aed; }
.bg-purple { background: #7c3aed; }
