* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.logo {
    padding: 25px 20px;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo i {
    font-size: 28px;
    color: #3498db;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 15px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(52, 152, 219, 0.2);
    color: white;
    border-left: 3px solid #3498db;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 15px 0;
}

.nav-item.logout {
    color: #e74c3c;
}

.nav-item.logout:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title h1 {
    font-size: 24px;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666;
}

.user-info i {
    font-size: 32px;
    color: #667eea;
}

.user-name {
    font-weight: 600;
}

/* Content */
.content {
    padding: 30px;
    flex: 1;
}

/* Messages */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
}

.alert-close:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar .logo span,
    .sidebar .nav-item span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .topbar {
        padding: 15px 20px;
    }
    
    .content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

